Showing 14,752 of 14,752 total issues
Identical blocks of code found in 2 locations. Consider refactoring. Open
package de.bund.bfr.knime.fsklab.nodes.environment;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Optional;
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 95.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
public static ScriptHandler createHandler(String script_type, List<String> packages) throws Exception {
final ScriptHandler handler;
if (script_type == null) {
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 95.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Test
public void testConstructors() {
final Indep indep = new Indep();
assertThat(indep.name, is(nullValue()));
assertThat(indep.origname, is(nullValue()));
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 95.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Test
public void testConstructor() {
final Dep dep = new Dep();
assertThat(dep.name, is(nullValue()));
assertThat(dep.origname, is(nullValue()));
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 95.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method retrieveBackground
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GenericModelDataBackground retrieveBackground(Sheet sheet) {
GenericModelDataBackground background = new GenericModelDataBackground();
try {
- Create a ticketCreate a ticket
Method retrieveBackground
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GenericModelDataBackground retrieveBackground(Sheet sheet) {
GenericModelDataBackground background = new GenericModelDataBackground();
try {
- Create a ticketCreate a ticket
Method joinModels
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Model joinModels(JsonNode modelA, JsonNode modelB, ModelClass targetModelType) throws JsonProcessingException {
String modelAType = modelA.get("modelType").textValue();
Map<String, Object> modelAClass = ModelClass.valueOf(modelAType).swaggerDefinition;
- Create a ticketCreate a ticket
Method retrieveBackground
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GenericModelDataBackground retrieveBackground(Sheet sheet) {
final GenericModelDataBackground background = new GenericModelDataBackground();
try {
- Create a ticketCreate a ticket
Method retrieveBackground
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GenericModelDataBackground retrieveBackground(Sheet sheet) {
final GenericModelDataBackground background = new GenericModelDataBackground();
try {
final Study study = retrieveStudy(sheet);
- Create a ticketCreate a ticket
Method retrieveBackground
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GenericModelDataBackground retrieveBackground(Sheet sheet) {
GenericModelDataBackground background = new GenericModelDataBackground();
try {
- Create a ticketCreate a ticket
Method retrieveBackground
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GenericModelDataBackground retrieveBackground(Sheet sheet) {
final GenericModelDataBackground background = new GenericModelDataBackground();
try {
- Create a ticketCreate a ticket
Method retrieveBackground
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GenericModelDataBackground retrieveBackground(Sheet sheet) {
GenericModelDataBackground background = new GenericModelDataBackground();
try {
Study study = retrieveStudy(sheet);
- Create a ticketCreate a ticket
Method eIsSet
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MetadataPackage.STUDY__STUDY_IDENTIFIER:
return STUDY_IDENTIFIER_EDEFAULT == null ? studyIdentifier != null : !STUDY_IDENTIFIER_EDEFAULT.equals(studyIdentifier);
- Create a ticketCreate a ticket
Method eGet
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MetadataPackage.STUDY__STUDY_IDENTIFIER:
return getStudyIdentifier();
- Create a ticketCreate a ticket
Method saveSettingsTo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void saveSettingsTo(NodeSettingsWO settings)
throws InvalidSettingsException {
if (!selectionPanel.getSelectedIDs().isEmpty()) {
set.setSelectedID(selectionPanel.getSelectedIDs().get(0));
- Create a ticketCreate a ticket
Method getInSchema
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private KnimeSchema getInSchema(final DataTableSpec inSpec) throws InvalidSettingsException {
KnimeSchema result = null;
KnimeSchema inSchema = new TimeSeriesSchema();
boolean hasTS = false;
try {
- Create a ticketCreate a ticket
Method execute
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
final ExecutionContext exec) {
BufferedDataContainer container = exec.createDataContainer(TABLE_SPEC);
- Create a ticketCreate a ticket
Method loadSettingsFrom
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws NotConfigurableException {
String fileName;
int useStartValue;
double startElim;
- Create a ticketCreate a ticket
Method replaceCelsiusAndFahrenheit
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static void replaceCelsiusAndFahrenheit(KnimeTuple tuple) {
final String CELSIUS = "°C";
final String FAHRENHEIT = "°F";
final String KELVIN = "K";
- Create a ticketCreate a ticket
Method saveSettingsTo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void saveSettingsTo( final NodeSettingsWO settings ) {
try {
/*
Config c = settings.addConfig("DbConfigurationUi");
- Create a ticketCreate a ticket