SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

FSMRTemplate has 116 methods (exceeds 20 allowed). Consider refactoring.
Open

public interface FSMRTemplate extends Serializable {

    /**
     * Returns the model name of this {@link FSMRTemplate}.
     *
Severity: Major
Found in de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/openfsmr/FSMRTemplate.java - About 2 days to fix

FSMRTemplateImpl has 116 methods (exceeds 20 allowed). Consider refactoring.
Open

public class FSMRTemplateImpl implements FSMRTemplate {

    private static final long serialVersionUID = -3414978919227860002L;

    private String modelName;

Function generate_validate has 450 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function generate_validate(it, $keyword, $ruleType) {
  var out = '';
  var $async = it.schema.$async === true,
    $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
    $id = it.self._getId(it.schema);

File RAKIPSheetImporter.java has 914 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

File SwaggerDataModelSheetImporter.java has 911 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

Method doImport has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring.
Open

        public String doImport(final String filename, final JProgressBar progress, final boolean showResults) {
            errorMessage = "";
          Runnable runnable = new Runnable() {
          public void run() {
            try {

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

  Tags.prototype.query = function (decorated, params, callback) {
    var self = this;

    this._removeOldTags();

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js and 1 other location - About 2 days to fix
de.bund.bfr.knime.pmm.nodes/js-lib/select2/4_0_3/debug/js/select2.js on lines 3544..3605

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

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

  Tags.prototype.query = function (decorated, params, callback) {
    var self = this;

    this._removeOldTags();
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 3796..3857

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

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 test.js has 906 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function() {
  var config = {tabSize: 4, indentUnit: 2}
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/markdown/test.js - About 2 days to fix

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

        for (KnimeTuple tuple : tuples) {
            DepXml depXml = (DepXml) tuple
                    .getPmmXml(Model2Schema.ATT_DEPENDENT).get(0);
            EstModelXml estXml = (EstModelXml) tuple.getPmmXml(
                    Model2Schema.ATT_ESTMODEL).get(0);
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/secondarypredictorview/TableReader.java on lines 170..314

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

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 (KnimeTuple tuple : tuples) {
            DepXml depXml = (DepXml) tuple
                    .getPmmXml(Model2Schema.ATT_DEPENDENT).get(0);
            EstModelXml estXml = (EstModelXml) tuple.getPmmXml(
                    Model2Schema.ATT_ESTMODEL).get(0);
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/secondarymodelanddataview/TableReader.java on lines 172..315

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

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 TimeSeriesCreatorNodeDialog.java has 904 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

Method run has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring.
Open

      public void run() {
        try {
              if (progress != null) {
                  progress.setVisible(true);
                  progress.setStringPainted(true);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/imports/custom/MyRisImporter.java - About 2 days 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 getModelTuples has 438 lines of code (exceeds 25 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 addFunctionFromSelection has 438 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function addFunctionFromSelection(selectedModel,onlySecondaryModel,mode,headless)
    {    
        var manaual = !isRealValue(selectedModel)&&!isRealValue(onlySecondaryModel)&&!isRealValue(mode)
        if(manaual){
            onlySecondaryModel = _onlySecondaryModel;

Method doImportStandard has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
Open

    private int[] doImportStandard(HSSFWorkbook wb, JProgressBar progress, String filename) {
        int numSuccess = 0;
        int numFails = 0;
        HSSFSheet transactionSheet = wb.getSheet("Transactions");

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

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

    var datepickerPlugin = function(option){
        var args = Array.apply(null, arguments);
        args.shift();
        var internal_return;
        this.each(function(){
de.bund.bfr.knime.js/src/js/lib/bootstrap-datepicker.js on lines 1631..1673

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

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

    var datepickerPlugin = function(option){
        var args = Array.apply(null, arguments);
        args.shift();
        var internal_return;
        this.each(function(){
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/bootstrap-datepicker.js and 1 other location - About 2 days to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/bootstrap-datepicker/1_6_4/debug/js/bootstrap-datepicker.js on lines 1680..1722

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

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 WriterUtils.java has 879 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.pmm.common.writer;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;

File XLSReader.java has 873 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
Category
Status
Source
Language