SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

  d3_selectionPrototype.text = function(value) {
    return arguments.length ? this.each(typeof value === "function" ? function() {
      var v = value.apply(this, arguments);
      this.textContent = v == null ? "" : v;
    } : value == null ? function() {
de.bund.bfr.knime.pmm.nodes/js-src/de/bund/bfr/knime/pmm/js/modelplotter/d3.js on lines 716..725

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

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

        updateTo: function () {
            this.result.to = this.options.to;
            this.result.to_percent = this.convertToPercent(this.result.to);
            this.result.to_pretty = this._prettify(this.result.to);
            if (this.options.values) {
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js and 1 other location - About 5 hrs to fix
de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js on lines 2143..2150

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

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

  @Override
  protected PortObject[] performExecute(PortObject[] inObjects, ExecutionContext exec)
      throws Exception {
    nodeWithId = NodeContext.getContext().getNodeContainer().getNameWithID();
    nodeName = NodeContext.getContext().getNodeContainer().getName();

Method optimize has 137 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void optimize(AtomicInteger progress, int nParameterSpace,
            int nLevenberg, boolean stopWhenSuccessful) {
        List<Double> paramMin = new ArrayList<>();
        List<Integer> paramStepCount = new ArrayList<>();
        List<Double> paramStepSize = new ArrayList<>();

File SettingsHelper.java has 394 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 RTokenMaker.java has 394 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* The following code was generated by JFlex 1.4.1 on 01.03.13 09:50 */

/*
 * 02/28/2013
 *

File RTokenMaker.java has 394 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* The following code was generated by JFlex 1.4.1 on 01.03.13 09:50 */

/*
 * 02/28/2013
 *

File RTokenMaker.java has 394 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* The following code was generated by JFlex 1.4.1 on 01.03.13 09:50 */

/*
 * 02/28/2013
 *

Method createMainComponent has 136 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private ChartAllPanel createMainComponent() {
        if (set.isStandardVisibleColumns()) {
            set.setVisibleColumns(reader.getStandardVisibleColumns());
        }

Method loadDB has 136 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private MainFrame loadDB(Boolean autoUpdate, boolean openTheGui, boolean beInteractive) {
        MainFrame mf = null;
        MyDBTable myDB = null;
        boolean doUpdates = false;
        try {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/Login.java - About 5 hrs to fix

Function generate_items has 136 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function generate_items(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;
  var $dataLvl = it.dataLevel;
  var $schema = it.schema[$keyword];

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

            if (functionErrors != null) {
                YIntervalSeriesCollection functionDataset = new YIntervalSeriesCollection();
                DeviationRenderer functionRenderer = new DeviationRenderer(
                        true, false);
                YIntervalSeries series = new YIntervalSeries(legend);
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/ChartCreator.java on lines 964..1009

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

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

        if (id == null) {
            ;
        } else if (foreignFields != null && i > 1 && foreignFields.length > i - 2 && foreignFields[i - 2] != null) {
            if (goDeeper) {
                LinkedHashMap<Object, String> hashBox = fillHashtable(foreignFields[i - 2], startDelim, delimiter, endDelim,
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java and 1 other location - About 5 hrs to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java on lines 908..932

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

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 (int i = 0; i < paramDoc.size(); i++) {
            final ParamXml paramXml = (ParamXml) paramDoc.get(i);

            final HashMap<String, Double> obtainedCorrelations = paramXml.correlations;
            final String[] obtainedCorrelationNames = new String[obtainedCorrelations.size()];
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 417..449

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

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

            if (functionErrors != null) {
                YIntervalSeriesCollection functionDataset = new YIntervalSeriesCollection();
                DeviationRenderer functionRenderer = new DeviationRenderer(
                        true, false);
                YIntervalSeries series = new YIntervalSeries(legend);
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/ChartCreator.java on lines 860..905

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

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 (int i = 0; i < paramSecDoc.size(); i++) {
                final ParamXml paramSecXml = (ParamXml) paramSecDoc.get(i);

                final HashMap<String, Double> obtainedCorrelations = paramSecXml.correlations;
                final String[] obtainedCorrelationNames = new String[obtainedCorrelations.size()];
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 378..410

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

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

        if (id == null) {
            ;
        } else if (foreignFields != null && i > 1 && foreignFields.length > i - 2 && foreignFields[i - 2] != null) {
            if (goDeeper) {
                LinkedHashMap<Object, String> hashBox = fillHashtable(foreignFields[i - 2], startDelim, delimiter, endDelim,
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java and 1 other location - About 5 hrs to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java on lines 466..487

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

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

    @Override
    protected void loadSettingsFrom(NodeSettingsRO settings,
            BufferedDataTable[] input) throws NotConfigurableException {
        try {
            set = new SettingsHelper();

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

    private void readModelTable() {
        boolean containsData = SchemaFactory.createM12DataSchema().conforms(
                modelTable);
        Map<KnimeTuple, List<KnimeTuple>> tuples;

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

    private String getWhere() {
        String result = " WHERE TRUE";

        if (agentID > 0) result += " AND \"Agens\" = " + agentID;
        if (agentString != null && !agentString.trim().isEmpty()) {

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

Severity
Category
Status
Source
Language