SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

ProcessModelScope has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class ProcessModelScope {
  @SerializedName("product")
  private List<Product> product = new ArrayList<Product>();

HealthModelScope has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class HealthModelScope {
  @SerializedName("hazard")
  private List<Hazard> hazard = new ArrayList<Hazard>();

ConsumptionModelScope has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class ConsumptionModelScope {
  @SerializedName("product")
  private List<Product> product = new ArrayList<Product>();

JsM12Schema has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

@JsonAutoDetect
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public class JsM12Schema implements ViewValue {
    
    static final String ATT_MODEL2 = "Model2";

MyDBTablesNew has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

public class MyDBTablesNew extends MyDBI {

    private static int SystemTabellen_LIST = 0;
    private static int BasisTabellen_LIST = 1;
    private static int Tenazitaet_LIST = 2;
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBTablesNew.java - About 2 hrs to fix

MathUtilities has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

public class MathUtilities {

    public static double EPSILON = 0.00001;

    private static Random random = null;

UIUtils has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

public class UIUtils {

    private UIUtils() {
    }

Consider simplifying this complex logical expression.
Open

          if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||
                span.from == null && lineNo$$1 != from.line ||
                span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&
              (!filter || filter(span.marker)))
            { found.push(span.marker.parent || span.marker); }
Severity: Critical
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 2 hrs to fix

Consider simplifying this complex logical expression.
Open

        if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
              span.from == null && lineNo != from.line ||
              span.from != null && lineNo == to.line && span.from >= to.ch) &&
            (!filter || filter(span.marker)))
          { found.push(span.marker.parent || span.marker) }
Severity: Critical
Found in de.bund.bfr.knime.fsklab.deprecatednodes/js-lib/codemirror/codemirror.js - About 2 hrs to fix

Consider simplifying this complex logical expression.
Open

        if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
              span.from == null && lineNo != from.line ||
              span.from != null && lineNo == to.line && span.from >= to.ch) &&
            (!filter || filter(span.marker)))
          { found.push(span.marker.parent || span.marker) }

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

                for (PmmXmlElementConvertable el : params.getElementSet()) {
                    ParamXml element = (ParamXml) el;

                    if (primaryGuesses.containsKey(element.name)) {
                        Point2D.Double guess = primaryGuesses.get(element
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/modelestimation/OneStepEstimationThread.java on lines 146..168

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

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

                for (PmmXmlElementConvertable el : secParams.getElementSet()) {
                    ParamXml element = (ParamXml) el;

                    if (secGuesses.containsKey(element.name)) {
                        Point2D.Double guess = secGuesses
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/modelestimation/OneStepEstimationThread.java on lines 110..132

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

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

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

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

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

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

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

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

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

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

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

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

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

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