SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Method getReihenfolge has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
Open

        private Vector<Integer> getReihenfolge(Vector<Integer[]> org_dst) {
            Vector<Integer> indexReihenfolge = new Vector<>();
            Integer[] int2 = org_dst.get(0);
            int[] valsA = new int[2];
            int[] valsE = new int[2];

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

    private void checkeDoppeltVergebeneDKZs(final Statement anfrage) {
        System.err.println("checkeDoppeltVergebeneDKZs - Start");
        LinkedHashMap<String, MyTable> myTables = DBKernel.myDBi.getAllTables();
        Hashtable<Integer, String> hash = new Hashtable<>();
        for(String key : myTables.keySet()) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MergeDBsAPriori.java - About 6 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 generateJoinerRelationAdvanced has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
Open

  public static List<JoinRelationAdvanced> generateJoinerRelationAdvanced(FskPortObject portObject,
      LinkedHashMap<String, Object[]> originalNamesMap, List<Parameter> topLevelJoinedModelParams, List<JoinRelation> joinRelations,
       AtomicInteger index, List<JoinRelationAdvanced> joinRelationList, LinkedHashMap<String, String> ModelsToSuffixMap, List<JoinRelation> foundRelation) {
    if (joinRelationList == null) {
      joinRelationList = new ArrayList<>();

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

        @Override
        public Object getValueAt(int row, int column) {
            switch (column) {
            case 0:
                return ids.get(row);

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

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

        checkMaxInterval: function (p_current, p_next, type) {
            var o = this.options,
                current,
                next;

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js and 1 other location - About 6 hrs to fix
de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js on lines 1856..1883

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

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

        checkMinInterval: function (p_current, p_next, type) {
            var o = this.options,
                current,
                next;

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js and 1 other location - About 6 hrs to fix
de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js on lines 1885..1912

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

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

    public void loadSettings(NodeSettingsRO settings) {
        try {
            fileName = settings.getString(CFG_FILE_NAME);
        } catch (InvalidSettingsException e) {
        }

Method generateStatUpModellTables has 168 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @SuppressWarnings("unchecked")
    private void generateStatUpModellTables(final MyTable literatur, final MyTable tenazity_raw_data, final LinkedHashMap<Object, String> hashZeit, final MyTable Konzentrationseinheiten, LinkedHashMap<Boolean, String> hYNB) {
        MyTable PMMLabWorkflows = new MyTable("PMMLabWorkflows", new String[]{"Workflow"},
                new String[]{"BLOB(100M)"},
                new String[]{null},
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBTablesNew.java - About 6 hrs to fix

Method loadFSKPortObject has 168 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @SuppressWarnings("unchecked")
    public FskPortObject loadFSKPortObject(PortObjectZipInputStream in, PortObjectSpec spec,
        ExecutionMonitor exec) throws IOException, CanceledExecutionException {

      String modelScript = "";

Method importBufferedDataTable has 168 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Override
  public BufferedDataTable importBufferedDataTable(String varName, boolean nonNumbersAsMissing,
      ExecutionContext exec) throws RException, CanceledExecutionException {

    final REXP typeRexp = eval("class(" + varName + ")", true);

Function 40 has 168 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],40:[function(require,module,exports){
module.exports={
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://json-schema.org/draft-07/schema#",
    "title": "Core schema meta-schema",

File TableReader.java has 446 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

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

                format: $.proxy(function(ix, format){
                    if (arguments.length === 0){
                        ix = this.dates.length - 1;
                        format = this.o.format;
                    } else if (typeof ix === 'string'){
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/bootstrap-datepicker.js and 1 other location - About 6 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/bootstrap-datepicker/1_6_4/debug/js/bootstrap-datepicker.js on lines 456..468

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

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

                format: $.proxy(function(ix, format){
                    if (arguments.length === 0){
                        ix = this.dates.length - 1;
                        format = this.o.format;
                    }
de.bund.bfr.knime.js/src/js/lib/bootstrap-datepicker.js on lines 454..465

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

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

MetadataAdapterFactory has 48 methods (exceeds 20 allowed). Consider refactoring.
Open

public class MetadataAdapterFactory extends AdapterFactoryImpl {
    /**
     * The cached model package.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

SettingsHelper has 48 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SettingsHelper {

    protected static final String CFG_SELECTEDID = "SelectedID";
    protected static final String CFG_CURRENTPARAMX = "CurrentParamX";
    protected static final String CFG_SELECTEDVALUESX = "SelectedValuesX";

ProcessParameters has 48 methods (exceeds 20 allowed). Consider refactoring.
Open

public interface ProcessParameters extends org.apache.xmlbeans.XmlObject
{
    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ProcessParameters.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s121DA543B1FCBC764F9DFAF30A6E9DAF").resolveHandle("processparametersf629type");
    

ProcessParametersImpl has 48 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ProcessParametersImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements de.bund.bfr.pcml10.ProcessParameters
{
    private static final long serialVersionUID = 1L;
    
    public ProcessParametersImpl(org.apache.xmlbeans.SchemaType sType)

File RunnerNodeModel.java has 444 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

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

    "dietaryAssessmentMethod": [{
        "id": "collectionTool",
        "label": "Methodological tool to collect data",
        "type": "text",
        "description": "Food diaries, interview, 24-hour recall interview, food propensy questionnaire, portion size measurement aids, eating outside questionnaire",
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js and 2 other locations - About 6 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor_data.js on lines 621..657
de.bund.bfr.knime.js/js-lib/bfr/fskmetadata_1.0.0.js on lines 621..657

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

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

Severity
Category
Status
Source
Language