SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Method mouseClicked has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void mouseClicked(MouseEvent e) {
        if (e.getButton() == MouseEvent.BUTTON3 && e.getSource() == table.getTableHeader()) {
            int index = table.convertColumnIndexToModel(table.columnAtPoint(e.getPoint()));
            String column = table.getModel().getColumnName(index);

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 80 (exceeds 5 allowed). Consider refactoring.
Open

        public Object getValueAt(int rowIndex, int columnIndex) {
            if (thePM == null) return null;
            if (rowIndex == 0) {
                DepXml dx = thePM.getDepXml();
                if (columnIndex < 2) return thePM.getDepVar();

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

    void insertNewRow(final boolean copySelected, final Vector<Object> vecIn) {
        MyTable myT = this.getActualTable();
        if (!this.actualTable.isReadOnly()) {
            //JScrollPane scroller = getScroller();
            this.getActualTable().saveProperties(this);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.java - About 1 day 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 updateChangeLog has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
Open

    private static boolean updateChangeLog(final String tablename, final int modifiedCol, final boolean deleted, final int oSize) {
        boolean result = true;
        boolean showMessages = false;
        ResultSet rs = DBKernel.getResultSet("SELECT " + DBKernel.delimitL("ID") + "," + DBKernel.delimitL("Alteintrag") + " FROM " + DBKernel.delimitL("ChangeLog") + " WHERE "
                + DBKernel.delimitL("Tabelle") + "='" + tablename + "'", false); //  + " AND " + DBKernel.delimitL("ID") + " > 169000"
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/UpdateChecker.java - About 1 day 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 importBufferedDataTable has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
Open

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

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

Cognitive Complexity

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

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

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

Further reading

Method run has 317 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void run() {
        try {
            KnimeRelationReader reader = new KnimeRelationReader(schema,
                    inTable);

File MainFrame.java has 695 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
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 1 day to fix

File fskdbview.js has 692 lines of code (exceeds 250 allowed). Consider refactoring.
Open

fskdbview = function () {
    
    var view = {
        version: "0.0.1"
    };

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

                case "to":
                    if (this.options.to_fixed) {
                        break;
                    }

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js and 1 other location - About 1 day to fix
de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js on lines 1077..1093

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

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

                case "from":
                    if (this.options.from_fixed) {
                        break;
                    }

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js and 1 other location - About 1 day to fix
de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js on lines 1095..1111

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

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

S2.define('select2/data/base',[
  '../utils'
], function (Utils) {
  function BaseAdapter ($element, options) {
    BaseAdapter.__super__.constructor.call(this);
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js and 1 other location - About 1 day to fix
de.bund.bfr.knime.pmm.nodes/js-lib/select2/4_0_3/debug/js/select2.js on lines 2995..3034

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

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

S2.define('select2/data/base',[
  '../utils'
], function (Utils) {
  function BaseAdapter ($element, options) {
    BaseAdapter.__super__.constructor.call(this);
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 3236..3275

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

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

File CreatorNodeModel.java has 689 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

File CreatorNodeModel.java has 689 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 2 locations. Consider refactoring.
Open

    "populationGroup": [{
        "id": "name",
        "label": "Name",
        "type": "text",
        "description": "Name of the population for which the model or data applies",
de.bund.bfr.knime.js/js-lib/bfr/fskmetadata_1.0.0.js on lines 418..481

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

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

    "populationGroup": [{
        "id": "name",
        "label": "Name",
        "type": "text",
        "description": "Name of the population for which the model or data applies",
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskmetadata_1.0.0.js and 1 other location - About 1 day to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor_data.js on lines 418..481

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

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

/*
 * An XML document type.
 * Localname: AgentRecipe
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.AgentRecipeDocument
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/InlineTableDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/MatrixRecipeDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/ProcessChainDataDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/ProcessChainDocumentImpl.java on lines 1..293

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

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

/*
 * An XML document type.
 * Localname: ProcessChainData
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.ProcessChainDataDocument
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/AgentRecipeDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/InlineTableDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/MatrixRecipeDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/ProcessChainDocumentImpl.java on lines 1..293

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

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

/*
 * An XML document type.
 * Localname: InlineTable
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.InlineTableDocument
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/AgentRecipeDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/MatrixRecipeDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/ProcessChainDataDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/ProcessChainDocumentImpl.java on lines 1..293

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

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

/*
 * An XML document type.
 * Localname: MatrixRecipe
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.MatrixRecipeDocument
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/AgentRecipeDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/InlineTableDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/ProcessChainDataDocumentImpl.java on lines 1..293
de.bund.bfr.knime.foodprocess.pcml/lib/src/de/bund/bfr/pcml10/impl/ProcessChainDocumentImpl.java on lines 1..293

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

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