SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

package de.bund.bfr.knime.pmm.js.common.schema;

import org.knime.core.node.InvalidSettingsException;
import org.knime.core.node.NodeSettingsRO;
import org.knime.core.node.NodeSettingsWO;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/ModelList.java on lines 1..65
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM12SchemaList.java on lines 1..49
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1DataSchemaList.java on lines 1..52
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM2SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsTimeSeriesSchemaList.java on lines 1..49

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

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

package de.bund.bfr.knime.pmm.js.common.schema;

import org.knime.core.node.InvalidSettingsException;
import org.knime.core.node.NodeSettingsRO;
import org.knime.core.node.NodeSettingsWO;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/ModelList.java on lines 1..65
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM12SchemaList.java on lines 1..49
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1DataSchemaList.java on lines 1..52
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsTimeSeriesSchemaList.java on lines 1..49

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

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

package de.bund.bfr.knime.pmm.js.common.schema;

import org.knime.core.node.InvalidSettingsException;
import org.knime.core.node.NodeSettingsRO;
import org.knime.core.node.NodeSettingsWO;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/ModelList.java on lines 1..65
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM12SchemaList.java on lines 1..49
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM2SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsTimeSeriesSchemaList.java on lines 1..49

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

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

package de.bund.bfr.knime.pmm.js.common.schema;

import org.knime.core.node.InvalidSettingsException;
import org.knime.core.node.NodeSettingsRO;
import org.knime.core.node.NodeSettingsWO;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/ModelList.java on lines 1..65
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM12SchemaList.java on lines 1..49
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1DataSchemaList.java on lines 1..52
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM2SchemaList.java on lines 1..50

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

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 6 locations. 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
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM12SchemaList.java on lines 1..49
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1DataSchemaList.java on lines 1..52
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM2SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsTimeSeriesSchemaList.java on lines 1..49

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

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

package de.bund.bfr.knime.pmm.js.common.schema;

import org.knime.core.node.InvalidSettingsException;
import org.knime.core.node.NodeSettingsRO;
import org.knime.core.node.NodeSettingsWO;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/ModelList.java on lines 1..65
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1DataSchemaList.java on lines 1..52
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM1SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsM2SchemaList.java on lines 1..50
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/common/schema/JsTimeSeriesSchemaList.java on lines 1..49

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

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

                if (busRow != null) {
                    nameRec = getStrVal(busRow.getCell(1)); //
                    streetRec = getStrVal(busRow.getCell(2)); //
                    streetNoRec = getStrVal(busRow.getCell(3), 10); //
                    zipRec = getStrVal(busRow.getCell(4), 10); //
org.hsh.bfr.db/src/org/hsh/bfr/db/imports/custom/LieferkettenImporterEFSA.java on lines 362..378

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

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

                if (busRow != null) {
                    nameSup = getStrVal(busRow.getCell(1)); //
                    streetSup = getStrVal(busRow.getCell(2)); //
                    streetNoSup = getStrVal(busRow.getCell(3), 10); //
                    zipSup = getStrVal(busRow.getCell(4), 10); //
org.hsh.bfr.db/src/org/hsh/bfr/db/imports/custom/LieferkettenImporterEFSA.java on lines 329..345

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

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

    public Parameter retrieveParameter(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing parameter id");

Method checkTable4ISM has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private LinkedHashMap<String[], LinkedHashSet<String[]>> checkTable4ISM(String tablename, String[] fieldnames, int[] maxScores,
            String otherTable, String otherTableField, String[] otherTableDesires, boolean gentle) throws SQLException {
        LinkedHashMap<String[], LinkedHashSet<String[]>> ldResult = new LinkedHashMap<>();
        if (maxScores.length != fieldnames.length) {
            System.err.println("fieldnames and simScores with different size...");
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.java - About 3 hrs to fix

Method loadPortObject has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Method createUI has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private void createUI() {

    final NodeContext nodeContext = NodeContext.getContext();
    final WorkflowManager wfm = nodeContext.getWorkflowManager();
    final WorkflowContext workflowContext = wfm.getContext();

File KnimeTuple.java has 315 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

Function inTag has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function inTag (stream, state) {
      // Attempt to match a dot that precedes a property
      if (state.waitDot) {
        state.waitDot = false;

Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/django/django.js - About 3 hrs to fix

Function registerEventHandlers has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function registerEventHandlers(cm) {
    var d = cm.display;
    on(d.scroller, "mousedown", operation(cm, onMouseDown));
    // Older IE's will not fire a second mousedown for a double click
    if (ie && ie_version < 11)
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 3 hrs to fix

Function tree has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function tree(d, i) {
      var nodes = hierarchy.call(this, d, i), root = nodes[0];
      function firstWalk(node, previousSibling) {
        var children = node.children, layout = node._tree;
        if (children && (n = children.length)) {

Function parseDate has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        parseDate: function(date, format, language) {
            if (date instanceof Date) return date;
            if (typeof format === 'string')
                format = DPGlobal.parseFormat(format);
            if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) {

Function registerEventHandlers has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function registerEventHandlers(cm) {
  var d = cm.display
  on(d.scroller, "mousedown", operation(cm, onMouseDown))
  // Older IE's will not fire a second mousedown for a double click
  if (ie && ie_version < 11)

Function registerEventHandlers has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function registerEventHandlers(cm) {
  var d = cm.display
  on(d.scroller, "mousedown", operation(cm, onMouseDown))
  // Older IE's will not fire a second mousedown for a double click
  if (ie && ie_version < 11)

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

    "modelEquation": [{
        "id": "name",
        "label": "Name",
        "type": "text",
        "description": "A name given to the model equation",
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskmetadata_1.0.0.js and 1 other location - About 3 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 861..885

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

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