SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Function d3_geom_voronoiTessellate has 268 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_geom_voronoiTessellate(points, callback) {
    var Sites = {
      list: points.map(function(v, i) {
        return {
          index: i,

Method getTableCellRendererComponent has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
Open

          public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int columnIndex) {
              JComponent c;
              if (columnIndex == 0) {
                    Boolean indep = (Boolean) table.getValueAt(rowIndex, 2);
                    if (indep == null) indep = false;

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

Function 35 has 262 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],35:[function(require,module,exports){
'use strict';
module.exports = function generate_required(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;

Method saveNodes has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
Open

    private void saveNodes(WorkflowManager parent, Integer wfID) {
        /*
        DBKernel.sendRequest("INSERT INTO " + DBKernel.delimitL("ProzessElemente") + " () VALUES ()", false);
        DBKernel.sendRequest("INSERT INTO " + DBKernel.delimitL("Matrices") + " () VALUES ()", false);
        DBKernel.sendRequest("INSERT INTO " + DBKernel.delimitL("Zutatendaten") + " () VALUES ()", false);

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

File FSKEditorJSNodeModel.java has 600 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

Function ParametersTable has 260 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function ParametersTable(depvars, indepvars) {
        /**
         * Table select with border. Extends Select.
         */
        function TableSelect(entries) {

Function generate_required has 260 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

File GeneralXLSImporter.java has 595 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/imports/GeneralXLSImporter.java - About 1 day to fix

File EstimatedModelReaderNodeModel.java has 587 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 step has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
Open

    private PmmTimeSeries step(BufferedReader reader) throws IOException {
        // initialize next time series
        PmmTimeSeries next = new PmmTimeSeries();

        while (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

ChartConfigPanel has 68 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ChartConfigPanel extends JPanel implements ActionListener,
        TextListener, ChangeListener, MouseListener {

    public static final int NO_PARAMETER_INPUT = 1;
    public static final int PARAMETER_FIELDS = 2;

Function drawWorkflow has 250 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function drawWorkflow() {

    _graph = new joint.dia.Graph();

    _paper = new joint.dia.Paper({

Function zoom has 248 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.behavior.zoom = function() {
    var view = {
      x: 0,
      y: 0,
      k: 1

Method join has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
Open

    private JsonNode join(JsonNode metadataA, Map<String, Object> originalClassA, JsonNode metadataB,
            Map<String, Object> originalClassB, Map<String, Object> targetClass) {

        Map<String, Object> classAProperties = getProperties(originalClassA);
        Map<String, Object> classBProperties = getProperties(originalClassB);

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

    public static void check4Updates_176_177() {
        new GeneralXLSImporter().doImport("/org/hsh/bfr/db/res/Einheiten_140312.xls", null, false);

        DBKernel.sendRequest(
                "ALTER TABLE " + DBKernel.delimitL("Station") + " ADD COLUMN " + DBKernel.delimitL("Serial") + " VARCHAR(16383) BEFORE " + DBKernel.delimitL("Kommentar"), false);
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 doRestore has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
Open

    private static boolean doRestore(String path, final MyDBTable myDB, final File targzFile, final boolean silent, boolean doReconnect) {
        boolean result = true;
        if (targzFile != null && targzFile.exists()) {
            if (!silent) {
                int returnVal = JOptionPane.showConfirmDialog(DBKernel.mainFrame,
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/Backup.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

File ModelEditorNodeModel.java has 576 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.pmm.editor;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

File MyDBI.java has 576 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/MyDBI.java - About 1 day to fix

File SettingsHelper.java has 574 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 2 has 242 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./src/equations":2,"./src/expressions":3,"./src/fractions":4,"./src/parser":7}],2:[function(require,module,exports){
var Expression = require('./expressions').Expression;
var Variable = require('./expressions').Variable;
var Term = require('./expressions').Term;
var Fraction = require('./fractions');
Severity
Category
Status
Source
Language