SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java

Summary

Maintainability
F
3 wks
Test Coverage

Method getModelTuples has a Cognitive Complexity of 316 (exceeds 5 allowed). Consider refactoring.
Open

    public Map<String, KnimeTuple> getModelTuples(File file, String sheet, Map<String, Object> columnMappings,
            String agentColumnName, Map<String, AgentXml> agentMappings, String matrixColumnName,
            Map<String, MatrixXml> matrixMappings, KnimeTuple modelTuple, Map<String, String> modelMappings,
            Map<String, String> modelParamErrors, String modelDepMin, String modelDepMax, String modelDepUnit,
            String modelIndepMin, String modelIndepMax, String modelIndepUnit, String modelRmse, String modelR2,

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getTimeSeriesTuples has a Cognitive Complexity of 130 (exceeds 5 allowed). Consider refactoring.
Open

    public Map<String, KnimeTuple> getTimeSeriesTuples(File file, String sheet, Map<String, Object> columnMappings,
            String timeUnit, String concentrationUnit, String agentColumnName, Map<String, AgentXml> agentMappings,
            String matrixColumnName, Map<String, MatrixXml> matrixMappings, boolean preserveIds, List<Integer> usedIds)
                    throws Exception {
        Workbook wb = getWorkbook(file);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getModelTuples has 438 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Map<String, KnimeTuple> getModelTuples(File file, String sheet, Map<String, Object> columnMappings,
            String agentColumnName, Map<String, AgentXml> agentMappings, String matrixColumnName,
            Map<String, MatrixXml> matrixMappings, KnimeTuple modelTuple, Map<String, String> modelMappings,
            Map<String, String> modelParamErrors, String modelDepMin, String modelDepMax, String modelDepUnit,
            String modelIndepMin, String modelIndepMax, String modelIndepUnit, String modelRmse, String modelR2,

File XLSReader.java has 873 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*******************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by

Method getTimeSeriesTuples has 239 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Map<String, KnimeTuple> getTimeSeriesTuples(File file, String sheet, Map<String, Object> columnMappings,
            String timeUnit, String concentrationUnit, String agentColumnName, Map<String, AgentXml> agentMappings,
            String matrixColumnName, Map<String, MatrixXml> matrixMappings, boolean preserveIds, List<Integer> usedIds)
                    throws Exception {
        Workbook wb = getWorkbook(file);

Method getModelTuples has 35 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public Map<String, KnimeTuple> getModelTuples(File file, String sheet, Map<String, Object> columnMappings,
            String agentColumnName, Map<String, AgentXml> agentMappings, String matrixColumnName,
            Map<String, MatrixXml> matrixMappings, KnimeTuple modelTuple, Map<String, String> modelMappings,
            Map<String, String> modelParamErrors, String modelDepMin, String modelDepMax, String modelDepUnit,
            String modelIndepMin, String modelIndepMax, String modelIndepUnit, String modelRmse, String modelR2,

Method getTimeSeriesTuples has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public Map<String, KnimeTuple> getTimeSeriesTuples(File file, String sheet, Map<String, Object> columnMappings,
            String timeUnit, String concentrationUnit, String agentColumnName, Map<String, AgentXml> agentMappings,
            String matrixColumnName, Map<String, MatrixXml> matrixMappings, boolean preserveIds, List<Integer> usedIds)

Method getMissingData has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public List<Integer> getMissingData(File file, String sheet, String column) throws Exception {
        List<Integer> missing = new ArrayList<>();
        Workbook wb = getWorkbook(file);
        Sheet s = wb.getSheet(sheet);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid deeply nested control flow statements.
Open

                            if (!hasSameValue(param, value, misc)) {
                                warnings.add("Variable conditions cannot be imported: " + "Only first value for "
                                        + column + " is used");
                            }

Method getData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private String getData(Cell cell) {
        if (cell != null) {
            if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
                CellValue value = evaluator.evaluate(cell);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getValuesInColumn has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public Set<String> getValuesInColumn(File file, String sheet, String column) throws Exception {
        Set<String> valueSet = new LinkedHashSet<>();
        Workbook wb = getWorkbook(file);
        Sheet s = wb.getSheet(sheet);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method isEndOfFile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean isEndOfFile(Sheet sheet, int i) {
        Row row = sheet.getRow(i);

        if (row == null) {
            return true;

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Refactor this method to reduce its Cognitive Complexity from 316 to the 15 allowed.
Open

    public Map<String, KnimeTuple> getModelTuples(File file, String sheet, Map<String, Object> columnMappings,

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Refactor this method to reduce its Cognitive Complexity from 130 to the 15 allowed.
Open

    public Map<String, KnimeTuple> getTimeSeriesTuples(File file, String sheet, Map<String, Object> columnMappings,

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Define a constant instead of duplicating this literal " is not valid (" 24 times.
Open

                        warnings.add(column + " value in row " + (firstRow.getRowNum() + 1) + " is not valid ("

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " is missing" 21 times.
Open

                    warnings.add(timeColumnName + " value in row " + (row.getRowNum() + 1) + " is missing");

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " value in row " 45 times.
Open

                        warnings.add(column + " value in row " + (firstRow.getRowNum() + 1) + " is not valid ("

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Sheet not found" 4 times.
Open

            throw new Exception("Sheet not found");

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                    if (r2 != null) {
                        Cell cell = row.getCell(columns.get(r2));

                        if (hasData(cell)) {
                            try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 814..828
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 846..860

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 136.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                    if (aic != null) {
                        Cell cell = row.getCell(columns.get(aic));

                        if (hasData(cell)) {
                            try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 814..828
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 830..844

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 136.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                    if (rmse != null) {
                        Cell cell = row.getCell(columns.get(rmse));

                        if (hasData(cell)) {
                            try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 830..844
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 846..860

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 136.

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

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

                        if (mapping != null) {
                            Cell cell = row.getCell(columns.get(mapping));

                            if (hasData(cell)) {
                                try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 651..664
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 668..681
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 740..753
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 778..791
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 793..806

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 128.

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

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

                        if (maxColumn != null) {
                            Cell maxCell = row.getCell(columns.get(maxColumn));

                            if (hasData(maxCell)) {
                                try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 651..664
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 668..681
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 725..738
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 740..753
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 778..791

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 128.

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

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

                if (errorMapping != null) {
                    Cell cell = row.getCell(columns.get(errorMapping));

                    if (hasData(cell)) {
                        try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 651..664
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 725..738
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 740..753
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 778..791
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 793..806

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 128.

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

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

                        if (error != null) {
                            Cell cell = row.getCell(columns.get(error));

                            if (hasData(cell)) {
                                try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 651..664
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 668..681
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 725..738
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 778..791
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 793..806

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 128.

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

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

                if (mapping != null) {
                    Cell cell = row.getCell(columns.get(mapping));

                    if (hasData(cell)) {
                        try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 668..681
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 725..738
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 740..753
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 778..791
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 793..806

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 128.

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

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

                        if (minColumn != null) {
                            Cell minCell = row.getCell(columns.get(minColumn));

                            if (hasData(minCell)) {
                                try {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 651..664
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 668..681
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 725..738
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 740..753
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 793..806

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 128.

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

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            if (hasData(depMinCell)) {
                try {
                    ((DepXml) depXml.get(0)).min = Double.parseDouble(getData(depMinCell).replace(",", "."));
                } catch (NumberFormatException e) {
                    warnings.add(modelDepMin + " value in row " + (rowNumber + 1) + " is not valid ("
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 565..574
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 576..585
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 587..596

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 118.

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

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            if (hasData(indepMaxCell)) {
                try {
                    ((IndepXml) indepXml.get(0)).max = Double.parseDouble(getData(indepMaxCell).replace(",", "."));
                } catch (NumberFormatException e) {
                    warnings.add(modelIndepMax + " value in row " + (rowNumber + 1) + " is not valid ("
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 554..563
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 565..574
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 576..585

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 118.

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

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            if (hasData(depMaxCell)) {
                try {
                    ((DepXml) depXml.get(0)).max = Double.parseDouble(getData(depMaxCell).replace(",", "."));
                } catch (NumberFormatException e) {
                    warnings.add(modelDepMax + " value in row " + (rowNumber + 1) + " is not valid ("
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 554..563
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 576..585
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 587..596

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 118.

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

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            if (hasData(indepMinCell)) {
                try {
                    ((IndepXml) indepXml.get(0)).min = Double.parseDouble(getData(indepMinCell).replace(",", "."));
                } catch (NumberFormatException e) {
                    warnings.add(modelIndepMin + " value in row " + (rowNumber + 1) + " is not valid ("
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 554..563
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 565..574
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 587..596

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 118.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                if (hasData(timeCell)) {
                    try {
                        time = Double.parseDouble(getData(timeCell).replace(",", "."));
                    } catch (NumberFormatException e) {
                        warnings.add(timeColumnName + " value in row " + (row.getRowNum() + 1) + " is not valid ("
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 296..305
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 307..316

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 112.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                if (hasData(logcCell)) {
                    try {
                        logc = Double.parseDouble(getData(logcCell).replace(",", "."));
                    } catch (NumberFormatException e) {
                        warnings.add(logcColumnName + " value in row " + (row.getRowNum() + 1) + " is not valid ("
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 285..294
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 307..316

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 112.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                if (hasData(stdDevCell)) {
                    try {
                        stdDev = Double.parseDouble(getData(stdDevCell).replace(",", "."));
                    } catch (NumberFormatException e) {
                        warnings.add(stdDevColumnName + " value in row " + (row.getRowNum() + 1) + " is not valid ("
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 285..294
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 296..305

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 112.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                        if (hasData(cell)) {
                            String data = getData(cell).replace(".0", "").replace(",0", "");

                            try {
                                ((EstModelXml) secEstXml.get(0)).dof = Integer.parseInt(data) - secParamXml.size();
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 633..641

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 94.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (hasData(dataPointsCell)) {
                String data = getData(dataPointsCell).replace(".0", "").replace(",0", "");

                try {
                    ((EstModelXml) estXml.get(0)).dof = Integer.parseInt(data) - paramXml.size();
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 865..874

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 94.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (hasData(agentCell) && agentMappings.get(getData(agentCell)) != null) {
                agentXml.add(new AgentXml(agentMappings.get(getData(agentCell))));
            } else {
                agentXml.add(new AgentXml());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 489..497

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 86.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (hasData(matrixCell) && matrixMappings.get(getData(matrixCell)) != null) {
                matrixXml.add(new MatrixXml(matrixMappings.get(getData(matrixCell))));
            } else {
                matrixXml.add(new MatrixXml());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 479..487

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 86.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            if (hasData(r2Cell)) {
                try {
                    ((EstModelXml) estXml.get(0)).r2 = Double.parseDouble(getData(r2Cell).replace(",", "."));
                } catch (NumberFormatException e) {
                    warnings.add(
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 606..613
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 624..631

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 82.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            if (hasData(rmseCell)) {
                try {
                    ((EstModelXml) estXml.get(0)).rms = Double.parseDouble(getData(rmseCell).replace(",", "."));
                } catch (NumberFormatException e) {
                    warnings.add(modelRmse + " value in row " + (rowNumber + 1) + " is not valid (" + getData(rmseCell)
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 615..622
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 624..631

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 82.

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

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            if (hasData(aicCell)) {
                try {
                    ((EstModelXml) estXml.get(0)).aic = Double.parseDouble(getData(aicCell).replace(",", "."));
                } catch (NumberFormatException e) {
                    warnings.add(
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 606..613
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 615..622

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 82.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (modelDepUnit != null && !modelDepUnit.equals(((DepXml) depXml.get(0)).unit)) {
                ((DepXml) depXml.get(0)).unit = modelDepUnit;
                ((CatalogModelXml) modelXml.get(0)).id = MathUtilities.getRandomNegativeInt();
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 598..601

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 68.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (modelIndepUnit != null && !modelIndepUnit.equals(((IndepXml) indepXml.get(0)).unit)) {
                ((IndepXml) indepXml.get(0)).unit = modelIndepUnit;
                ((CatalogModelXml) modelXml.get(0)).id = MathUtilities.getRandomNegativeInt();
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 549..552

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 68.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                } else if (mapping.equals(AttributeUtilities.AGENT_DETAILS)) {
                    agentDetailsColumn = columns.get(column);
                } else if (mapping.equals(AttributeUtilities.MATRIX_DETAILS)) {
                    matrixDetailsColumn = columns.get(column);
                }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 132..136

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 48.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                } else if (mapping.equals(AttributeUtilities.AGENT_DETAILS)) {
                    agentDetailsColumn = columns.get(column);
                } else if (mapping.equals(AttributeUtilities.MATRIX_DETAILS)) {
                    matrixDetailsColumn = columns.get(column);
                }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 418..422

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 48.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (hasData(matrixCell) && matrixMappings.get(getData(matrixCell)) != null) {
                matrixXml.add(matrixMappings.get(getData(matrixCell)));
            } else {
                matrixXml.add(new MatrixXml());
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 210..214

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 46.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (hasData(agentCell) && agentMappings.get(getData(agentCell)) != null) {
                agentXml.add(agentMappings.get(getData(agentCell)));
            } else {
                agentXml.add(new AgentXml());
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 216..220

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 46.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                        if (!unit.equals(element.unit)) {
                            element.unit = unit;
                            ((CatalogModelXml) secModelXml.get(0)).id = MathUtilities.getRandomNegativeInt();
                        }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 765..768

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 44.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                        if (!category.equals(element.category)) {
                            element.category = category;
                            ((CatalogModelXml) secModelXml.get(0)).id = MathUtilities.getRandomNegativeInt();
                        }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XLSReader.java on lines 770..773

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 44.

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

Further Reading

There are no issues that match your filters.

Category
Status