SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method performExecute has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    protected PortObject[] performExecute(PortObject[] inObjects,
            ExecutionContext exec) throws Exception {
        
        BufferedDataTable table = (BufferedDataTable)inObjects[0];

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

    public void loadSettings(NodeSettingsRO settings) {
        try {
            selectedIDs = XmlConverter.xmlToObject(
                    settings.getString(CFG_SELECTEDIDS),
                    new ArrayList<String>());

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

  public void loadFromNodeSettings(final NodeSettingsRO settings) {
    try {
      String modelName = settings.getString(MODEL_NAME, null);
      if (modelName != null) {
        template.setModelName(modelName);

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

    public String doImport(final String filename, final JProgressBar progress, final boolean showResults) {
          Runnable runnable = new Runnable() {
            @SuppressWarnings("resource")
            public void run() {
                  try {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/imports/SQLScriptImporter.java - About 4 hrs to fix

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

    private String getDBLField(String xlsFieldName, String dbFieldName) {
        if (xlsFieldName.startsWith(dbFieldName + "-")) {
            if (xlsFieldName.startsWith(dbFieldName + "-Wert")) return dbFieldName;//"Einzelwert";
            if (xlsFieldName.startsWith(dbFieldName + "-Wiederholungen")) return dbFieldName;//"Wiederholungen";
            if (xlsFieldName.startsWith(dbFieldName + "-Exponent")) return dbFieldName;//"Exponent";
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/imports/GeneralXLSImporter.java - About 4 hrs to fix

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

        private int getReihenfolgePrev(Vector<Integer[]> org_dst, Vector<Integer> indexReihenfolge) {
            int wegPfeile = 0; // Ein Knoten kann mehrere Pfeile haben, die ihn verlassen ..., z.B. Salami_Test_Britta, gleich der erste Knoten "Wareneingang" führt zum einen zu "Speck (Meat, Raw)" zum anderen zu "Schweinefleich , roh (Meat, Raw)"
            if (indexReihenfolge != null) {
                Vector<Vector<Integer>> rhflgn = new Vector<>();
                int firstIndex = indexReihenfolge.get(0);

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

  @Override
  public JoinerViewRepresentation getViewRepresentation() {

    JoinerViewRepresentation representation;

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

    private static void updatePrimaryIndepRanges(List<KnimeTuple> tuples,
            Map<KnimeTuple, List<KnimeTuple>> tupleCombinations) {
        Map<Integer, Map<String, Double>> indepMin = new LinkedHashMap<>();
        Map<Integer, Map<String, Double>> indepMax = new LinkedHashMap<>();

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

    public double[][] getPoints(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY,
            Map<String, Integer> choice) throws ConvertException {
        List<Double> xList = valueLists.get(paramX);
        List<Double> yList = valueLists.get(paramY);

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

        @Override
        public String getColumnName(int column) {
            switch (column) {
            case 0:
                return 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

File DatabaseDeleteNodeModel.java has 349 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

File MetaDataPane2.java has 349 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 ***************************************************************************************************
 * Copyright (c) 2017 Federal Institute for Risk Assessment (BfR), Germany
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the

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

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

Function constructor has 109 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor( metadata, img , state ,  modelScript, visScript , readme ) {
        super( metadata, img , modelScript, visScript, readme ) ;
        this._schema = schemas.processModel;
        if(state){
            this.panels = this._createPanels();
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.schemas.js - About 4 hrs to fix

Function constructor has 109 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor( metadata, img , state, modelScript, visScript , readme ) {
        super( metadata, img , modelScript, visScript, readme );
        this._schema = schemas.dataModel;
        if(state){
            this.panels = this._createPanels();
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.schemas.js - About 4 hrs to fix

Function init has 109 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    joinerNode.init = function(representation, value) {
        modelType = (value.modelType ? value.modelType
                : "GenericModel");
        window.modelPrefix = modelType.charAt(0).toUpperCase() + modelType.slice(1);
        if(!value.modelMetaData || value.modelMetaData == "null" ){

ContactImpl has 34 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ContactImpl extends MinimalEObjectImpl.Container implements Contact {
    /**
     * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

HazardImpl has 34 methods (exceeds 20 allowed). Consider refactoring.
Open

public class HazardImpl extends MinimalEObjectImpl.Container implements Hazard {
    /**
     * The default value of the '{@link #getHazardType() <em>Hazard Type</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

ReferenceImpl has 34 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ReferenceImpl extends MinimalEObjectImpl.Container implements Reference {
    /**
     * The default value of the '{@link #isIsReferenceDescription() <em>Is Reference Description</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

Parameter has 34 methods (exceeds 20 allowed). Consider refactoring.
Open

public interface Parameter extends EObject {
    /**
     * Returns the value of the '<em><b>Parameter ID</b></em>' attribute.
     * <!-- begin-user-doc -->
     * <p>
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/Parameter.java - About 4 hrs to fix
Severity
Category
Status
Source
Language