Showing 14,752 of 14,752 total issues
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (!portObject.libs.isEmpty()) {
out.putNextEntry(new ZipEntry("library.list"));
List<String> libNames = portObject.libs.stream().map(f -> f.getName().split("\\_")[0])
.collect(Collectors.toList());
IOUtils.writeLines(libNames, "\n", out, "UTF-8");
- 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 78.
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
if (dbTable == null) {
f.setSize(DBKernel.mainFrame.getRightSize());
} else {
Dimension dim = dbTable.getSize();
try {
- 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 78.
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
if (result.getObject(Bfrdb.ATT_TEMPERATURE) != null) {
double dbl = result.getDouble(Bfrdb.ATT_TEMPERATURE);
MiscXml mx = new MiscXml(AttributeUtilities.ATT_TEMPERATURE_ID,AttributeUtilities.ATT_TEMPERATURE,AttributeUtilities.ATT_TEMPERATURE,dbl,Arrays.asList(Categories.getTempCategory().getName()),Categories.getTempCategory().getStandardUnit(), dbuuid);//"°C"); // Categories.getTempCategory().getStandardUnit()
miscDoc.add(mx);
}
- 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 78.
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
package de.bund.bfr.knime.fsklab.v1_9;
import java.io.Serializable;
import java.util.LinkedHashMap;
- 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 78.
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
public void loadSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
m_selectedSimulationIndex = settings.getInt(SIMULATION_INDEX);
m_modelMath = settings.getString(CFG_MODEL_MATH);
- 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 78.
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
@Override
public void loadFromNodeSettings(NodeSettingsRO settings) throws InvalidSettingsException {
selectedSimulationIndex = settings.getInt(CFG_SIMULATION_INDEX);
modelMath = settings.getString(CFG_MODEL_MATH);
- 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 78.
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 write
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public static void write(List<KnimeTuple> tuples, boolean isPMFX, String dir, String mdName, Metadata metadata,
boolean splitModels, String notes, ExecutionContext exec, ModelType modelType) throws Exception {
- Create a ticketCreate a ticket
Method openNewWindow
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public Object openNewWindow(final MyTable theNewTable, final Object value, final Object headerValue, final MyDBTable dbTable, final Integer row, final Integer col, final Object[][] conditions, boolean fromMMC, Filter mf) {
- Create a ticketCreate a ticket
Method defineTable4NewDBTable
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
private boolean defineTable4NewDBTable(MyTable myT, MyDBTable dbTable, final Object value, final Object headerValue, final MyTable theNewTable, MyDBTable newDBTable, final Integer row, final Integer col, final Object[][] conditions) {
- Create a ticketCreate a ticket
Method handleField
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
private static String handleField(final Object id, final MyTable[] foreignFields, final String[] mnTable, final int i, final boolean goDeeper, final String startDelim,
final String delimiter, final String endDelim, HashSet<MyTable> alreadyUsed) {
- Create a ticketCreate a ticket
Method handleField
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
private String handleField(final Object id, final MyTable[] foreignFields, final String[] mnTable, final int i, final boolean goDeeper, final String startDelim,
final String delimiter, final String endDelim, HashSet<MyTable> alreadyUsed) {
- Create a ticketCreate a ticket
Method addParam
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addParam(final String paramName, final Boolean isStartParam, final Double value, final Double error,
final Double min, final Double max, String category, String unit, String description) {
- Create a ticketCreate a ticket
Method convertStringLists2TSXmlDoc
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public static PmmXmlDoc convertStringLists2TSXmlDoc(Array t, Array tu, Array l, Array lu, Array lot, Array stddevs, Array wdhs, String modelUnit, String timeUnit) {
- Create a ticketCreate a ticket
Function createAtomic
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function createAtomic(x, y, width, height, modelName, inputs, outputs, modelIndex,simulations) {
- Create a ticketCreate a ticket
Method retrieveBackground
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public OtherModelDataBackground retrieveBackground(Sheet sheet) {
OtherModelDataBackground background = new OtherModelDataBackground();
try {
- Create a ticketCreate a ticket
Method deserialize
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public GenericModelModelMath deserialize(JsonParser parser, DeserializationContext context)
throws IOException, JsonProcessingException {
JsonNode node = parser.readValueAsTree();
- Create a ticketCreate a ticket
Method convertModel
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Model convertModel(JsonNode originalMetadata, ModelClass targetClass) throws JsonProcessingException {
String originalClass = originalMetadata.get("modelType").textValue();
Map<String, Object> originalModelClass = ModelClass.valueOf(originalClass).swaggerDefinition;
Map<String, Object> targetModelClass = targetClass.swaggerDefinition;
- Create a ticketCreate a ticket
Method deserialize
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public GenericModelScope deserialize(JsonParser parser, DeserializationContext context)
throws IOException, JsonProcessingException {
JsonNode node = parser.readValueAsTree();
- Create a ticketCreate a ticket
Method retrieveBackground
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public PredictiveModelDataBackground retrieveBackground(Sheet sheet) {
PredictiveModelDataBackground background = new PredictiveModelDataBackground();
try {
Study study = retrieveStudy(sheet);
background.setStudy(study);
- Create a ticketCreate a ticket
Method loadSettings
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void loadSettings( final Config config ) throws InvalidSettingsException {
int i;
Config c;
processName = config.getString(PARAM_PROCESSNAME);
- Create a ticketCreate a ticket