SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method performExecute has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

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

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

    public void setParameters(String paramY,
            Map<String, List<Double>> parametersX,
            Map<String, Double> minParamXValues,
            Map<String, Double> maxParamXValues,
            Map<String, List<String>> categories, Map<String, String> units,

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

    @Override
    protected void saveSettingsTo(NodeSettingsWO settings) throws InvalidSettingsException {
        set.setPreserveIds(preserveIdsBox.isSelected());
        set.setModelDepMin(DoNotUseToNull((String) depMinBox.getSelectedItem()));
        set.setModelDepMax(DoNotUseToNull((String) depMaxBox.getSelectedItem()));

Function Form has 139 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Form(metadata) {
        var form = $('<form class="form-horizontal"></form>');
        form.metadata = metadata;

        // modelName input

File textile.js has 398 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(mod) {
  if (typeof exports == "object" && typeof module == "object") { // CommonJS
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/textile/textile.js - About 5 hrs to fix

Function tokenizer has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenizer(stream,state) {
    // in multi-line string
    if (state.in_string) {
      state.in_string = (!doubleQuote(stream));
      return rval(state,stream,"string");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/erlang/erlang.js - About 5 hrs to fix

Function apply has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Defaults.prototype.apply = function (options) {
    options = $.extend(true, {}, this.defaults, options);

    if (options.dataAdapter == null) {
      if (options.ajax != null) {
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js - About 5 hrs to fix

Function d3_geo_clipExtent has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_geo_clipExtent(x0, y0, x1, y1) {
    return function(listener) {
      var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), segments, polygon, ring;
      var clip = {
        point: point,

Function 27 has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./_limit":12,"./_limitItems":13,"./_limitLength":14,"./_limitProperties":15,"./allOf":16,"./anyOf":17,"./comment":18,"./const":19,"./contains":20,"./dependencies":22,"./enum":23,"./format":24,"./if":25,"./items":27,"./multipleOf":28,"./not":29,"./oneOf":30,"./pattern":31,"./properties":32,"./propertyNames":33,"./ref":34,"./required":35,"./uniqueItems":36,"./validate":37}],27:[function(require,module,exports){
'use strict';
module.exports = function generate_items(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;

File FSKEditorJSNodeDialog.java has 396 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

ParameterImpl has 41 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ParameterImpl extends MinimalEObjectImpl.Container implements Parameter {
    /**
     * The default value of the '{@link #getParameterID() <em>Parameter ID</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

MdReaderUi has 41 methods (exceeds 20 allowed). Consider refactoring.
Open

public class MdReaderUi extends JPanel {
    
    /**
     * 
     */

RController has 41 methods (exceeds 20 allowed). Consider refactoring.
Open

public class RController implements IRController {

  private final NodeLogger LOGGER = NodeLogger.getLogger(getClass());

  private static final String TEMP_VARIABLE_NAME = "knimertemp836481";

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());
        }
Severity
Category
Status
Source
Language