SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java

Summary

Maintainability
F
3 wks
Test Coverage

File SwaggerRiskModelSheetImporter.java has 937 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

Method retrieveParameter has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public Parameter retrieveParameter(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing parameter id");

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 retrieveGeneralInformation has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public PredictiveModelGeneralInformation retrieveGeneralInformation(Sheet sheet) {
        

        PredictiveModelGeneralInformation information = new PredictiveModelGeneralInformation();

Method retrieveParameter has 83 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Parameter retrieveParameter(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing parameter id");

Method retrieveGeneralInformation has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public PredictiveModelGeneralInformation retrieveGeneralInformation(Sheet sheet) {
        

        PredictiveModelGeneralInformation information = new PredictiveModelGeneralInformation();

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 retrieveStudy has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Study retrieveStudy(Sheet sheet) {

        // Check first mandatory properties
        if (sheet.getRow(STUDY__STUDY_TITLE).getCell(J).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing study title");

Method retrieveHazard has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Hazard retrieveHazard(Row row) {
        // Check mandatory properties
        if (row.getCell(X).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Hazard name is missing");
        }

Method retrievePopulationGroup has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public PopulationGroup retrievePopulationGroup(Row row) {
        
        // Check mandatory properties
        if (row.getCell(AK).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing population name");

Method retrieveStudy has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    public Study retrieveStudy(Sheet sheet) {

        // Check first mandatory properties
        if (sheet.getRow(STUDY__STUDY_TITLE).getCell(J).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing study title");

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 retrieveReference has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Reference retrieveReference(Row row) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing Is reference description?");

Method retrieveProduct has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Product retrieveProduct(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing product name");

Method retrieveHazard has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public Hazard retrieveHazard(Row row) {
        // Check mandatory properties
        if (row.getCell(X).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Hazard name is missing");
        }

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 retrievePopulationGroup has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public PopulationGroup retrievePopulationGroup(Row row) {
        
        // Check mandatory properties
        if (row.getCell(AK).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing population name");

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 retrieveContact has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private Contact retrieveContact(Row row, Map<String, Integer> columns) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(columns.get("mail")).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing mail");

Method retrieveStudySample has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public StudySample retrieveStudySample(Row row) {

        // Check mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing sample name");

Method retrieveBackground has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public GenericModelDataBackground retrieveBackground(Sheet sheet) {
        final GenericModelDataBackground background = new GenericModelDataBackground();

        try {
            final Study study = retrieveStudy(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 retrieveReference has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public Reference retrieveReference(Row row) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing Is reference description?");

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 retrieveAssay has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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);

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

    public Product retrieveProduct(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing product name");

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 retrieveContact has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private Contact retrieveContact(Row row, Map<String, Integer> columns) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(columns.get("mail")).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing mail");

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 retrieveStudySample has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public StudySample retrieveStudySample(Row row) {

        // Check mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing sample name");

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 retrieveQualityMeasures has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public QualityMeasures retrieveQualityMeasures(Sheet sheet) {
        QualityMeasures measures = new QualityMeasures();

        Cell sseCell = sheet.getRow(QUALITY_MEASURES__SSE).getCell(M);
        if (sseCell.getCellType() == Cell.CELL_TYPE_NUMERIC) {

Method retrieveDietaryAssessmentMethod has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public DietaryAssessmentMethod retrieveDietaryAssessmentMethod(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing methodological tool to collect data");

Method retrieveScope has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public ExposureModelScope retrieveScope(Sheet sheet) {
        

        ExposureModelScope scope = new ExposureModelScope();

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 retrieveAssay has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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 retrieveQualityMeasures has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public QualityMeasures retrieveQualityMeasures(Sheet sheet) {
        QualityMeasures measures = new QualityMeasures();

        Cell sseCell = sheet.getRow(QUALITY_MEASURES__SSE).getCell(M);
        if (sseCell.getCellType() == Cell.CELL_TYPE_NUMERIC) {

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 retrieveDietaryAssessmentMethod has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public DietaryAssessmentMethod retrieveDietaryAssessmentMethod(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing methodological tool to collect data");

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 34 to the 15 allowed.
Open

    public Parameter retrieveParameter(Row row) {

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 16 to the 15 allowed.
Open

    public Study retrieveStudy(Sheet sheet) {

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 22 to the 15 allowed.
Open

    public PredictiveModelGeneralInformation retrieveGeneralInformation(Sheet sheet) {

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 "country" 3 times.
Open

                put("country", T);

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 "givenName" 3 times.
Open

                put("givenName", N);

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 "region" 3 times.
Open

                put("region", Z);

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 "telephone" 3 times.
Open

                put("telephone", R);

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 "organization" 3 times.
Open

                put("organization", Q);

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 "zipCode" 3 times.
Open

                put("zipCode", V);

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 "familyName" 3 times.
Open

                put("familyName", P);

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 "title" 3 times.
Open

                put("title", L);

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 "streetAddress" 3 times.
Open

                put("streetAddress", X);

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 8 locations. Consider refactoring.
Open

    public PredictiveModelGeneralInformation retrieveGeneralInformation(Sheet sheet) {
        

        PredictiveModelGeneralInformation information = new PredictiveModelGeneralInformation();
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 145..255
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 217..327
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 144..255
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 144..254
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 144..254
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 223..334
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 212..322

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

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 11 locations. Consider refactoring.
Open

    public Parameter retrieveParameter(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing parameter id");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 854..963
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 911..1020
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 939..1049
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 1015..1128
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 862..971
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 931..1040
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 924..1033
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 930..1043
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 944..1053
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 862..971

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

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

Similar blocks of code found in 26 locations. Consider refactoring.
Open

    public Study retrieveStudy(Sheet sheet) {

        // Check first mandatory properties
        if (sheet.getRow(STUDY__STUDY_TITLE).getCell(J).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing study title");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 702..790
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 631..719
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 688..776
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 715..803
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 791..879
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 790..878
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 639..727
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 708..796
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 701..789
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 706..794
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 721..809
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 498..586
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 639..727
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 510..598
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DataModelSheetImporter.java on lines 461..549
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 475..563
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 526..614
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 530..618
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 482..570
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 502..590
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 520..608
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 483..571
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/QraModelSheetImporter.java on lines 532..620
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/RiskModelSheetImporter.java on lines 528..616
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 474..562

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

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

Similar blocks of code found in 12 locations. Consider refactoring.
Open

    public PopulationGroup retrievePopulationGroup(Row row) {
        
        // Check mandatory properties
        if (row.getCell(AK).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing population name");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 584..658
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 1037..1112
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 1094..1169
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 637..712
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 713..788
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 712..787
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 1045..1120
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 1114..1189
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 1127..1202
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 420..495
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 1045..1120

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

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 13 locations. Consider refactoring.
Open

    public Hazard retrieveHazard(Row row) {
        // Check mandatory properties
        if (row.getCell(X).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Hazard name is missing");
        }
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 507..582
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 608..683
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 560..635
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 636..711
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 635..710
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 559..634
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 628..703
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 621..696
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 626..701
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 641..716
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 343..418
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 559..634

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

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 10 locations. Consider refactoring.
Open

    public Product retrieveProduct(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing product name");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 443..505
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 367..429
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 344..406
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 371..433
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 366..428
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 364..426
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 357..419
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 361..423
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 377..439

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

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 13 locations. Consider refactoring.
Open

    public Reference retrieveReference(Row row) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing Is reference description?");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 533..600
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 510..577
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 462..529
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 538..605
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 537..604
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 461..528
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 530..597
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 523..590
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 528..595
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 543..610
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 245..312
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 461..528

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

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 12 locations. Consider refactoring.
Open

    private Contact retrieveContact(Row row, Map<String, Integer> columns) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(columns.get("mail")).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing mail");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 284..344
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 471..531
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 448..508
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 400..460
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 476..536
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 399..459
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 468..528
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 461..521
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 466..526
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 481..541
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 399..459

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

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 14 locations. Consider refactoring.
Open

    public StudySample retrieveStudySample(Row row) {

        // Check mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing sample name");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 838..891
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 722..775
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 779..832
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 806..859
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 882..935
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 881..934
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 730..783
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 799..852
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 792..845
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 797..850
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 812..865
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 589..642
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 730..783

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

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 14 locations. Consider refactoring.
Open

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 954..1004
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 801..851
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 858..908
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 886..936
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 962..1012
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 997..1047
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 809..859
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 878..928
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 871..921
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 877..927
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 891..941
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 705..755
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 809..859

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

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

    public QualityMeasures retrieveQualityMeasures(Sheet sheet) {
        QualityMeasures measures = new QualityMeasures();

        Cell sseCell = sheet.getRow(QUALITY_MEASURES__SSE).getCell(M);
        if (sseCell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 1135..1169
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 965..999
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 1022..1056
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 1051..1085
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 1130..1164
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 1170..1204
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 973..1007
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 1042..1076
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 1035..1069
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 1045..1079
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 1055..1089
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 863..897
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 973..1007
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 600..634
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 565..599
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 616..650
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 620..654
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 572..606
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 615..649
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 633..667
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 573..607
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/QraModelSheetImporter.java on lines 622..656
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/RiskModelSheetImporter.java on lines 618..652
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 587..621

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

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

    public GenericModelDataBackground retrieveBackground(Sheet sheet) {
        final GenericModelDataBackground background = new GenericModelDataBackground();

        try {
            final Study study = retrieveStudy(sheet);
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 321..365
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 280..324

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

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 12 locations. Consider refactoring.
Open

    public DietaryAssessmentMethod retrieveDietaryAssessmentMethod(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing methodological tool to collect data");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 893..929
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 1000..1036
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 1057..1093
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 1165..1201
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 936..972
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 1008..1044
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 1077..1113
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 1080..1116
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 1090..1126
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 644..680
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 1008..1044

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

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

    public ExposureModelScope retrieveScope(Sheet sheet) {
        

        ExposureModelScope scope = new ExposureModelScope();
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 329..370
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 335..376

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

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

    public ModelCategory retrieveModelCategory(Sheet sheet) {
        // Check mandatory properties and throw exception if missing
        if (sheet.getRow(MODEL_CATEGORY__MODEL_CLASS).getCell(J).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing model class");
        }
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 415..441
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 602..628
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 579..605
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 531..557
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 607..633
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 606..632
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 530..556
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 599..625
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 592..618
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 597..623
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 612..638
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 314..340
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 530..556
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 482..508
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 447..473
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 498..524
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 502..528
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 454..480
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 474..500
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 492..518
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 455..481
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/QraModelSheetImporter.java on lines 504..530
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/RiskModelSheetImporter.java on lines 500..526
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 446..472

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

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

Similar blocks of code found in 18 locations. Consider refactoring.
Open

    public Laboratory retrieveLaboratory(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing laboratory accreditation");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 931..952
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 778..799
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 835..856
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 863..884
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 939..960
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 974..995
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 786..807
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 855..876
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 848..869
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 854..875
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 868..889
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 682..703
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 786..807
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 654..675
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 592..613
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 610..631
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 564..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 144.

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

    public GenericModelModelMath retrieveModelMath(Sheet sheet) {
        
        final GenericModelModelMath math = new GenericModelModelMath();

        for (int rownum = MM_PARAMETER_ROW; rownum < sheet.getLastRowNum(); rownum++) {
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 253..279
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 294..321
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 180..210

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

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

Similar blocks of code found in 28 locations. Consider refactoring.
Open

    public Contact retrieveCreator(Row row) {
        @SuppressWarnings("serial")
        HashMap<String, Integer> columns = new HashMap<String, Integer>() {
            {
                put("mail", S);
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 243..261
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 263..282
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 430..448
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 450..469
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 407..425
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 427..446
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 359..377
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 379..398
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 435..453
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 455..474
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 429..448
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 450..470
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 358..376
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 378..397
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 427..445
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 447..466
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 420..438
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 440..459
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 425..443
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 445..464
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 440..458
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 460..479
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java on lines 457..476
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 139..157
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 159..178
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 358..376
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 378..397

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

Similar blocks of code found in 28 locations. Consider refactoring.
Open

    public Contact retrieveAuthor(Row row) {

        @SuppressWarnings("serial")
        HashMap<String, Integer> columns = new HashMap<String, Integer>() {
            {
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 243..261
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 263..282
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 430..448
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 450..469
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 407..425
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 427..446
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 359..377
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 379..398
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 435..453
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 455..474
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 429..448
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 450..470
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 358..376
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 378..397
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 427..445
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 447..466
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 420..438
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 440..459
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 425..443
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 445..464
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 440..458
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 460..479
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java on lines 437..455
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 139..157
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 159..178
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 358..376
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 378..397

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

There are no issues that match your filters.

Category
Status