SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

File EstimatedModelWriterNodeModel.java has 547 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 228 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void run() {
        try {
            List<KnimeTuple> tuples = PmmUtilities.getTuples(inTable, schema);
            List<String> miscParams = PmmUtilities.getMiscParams(tuples);

Method calculateInstantMixture has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
Open

    static PCMLPortObjectSpec calculateInstantMixture(final PortObjectSpec[] inSpecs, final FoodProcessSetting fps, FoodProcessNodeModel fpnm) {
        HashMap<Matrix, Double> newMatrixMix = new HashMap<Matrix, Double>();
        HashMap<Agent, ValueAndUnit> newAgentMix = new HashMap<Agent, ValueAndUnit>();
        Double fpVolume = null, newTemperature = null, newpH = null, newAw = null, newPressure = null;//, fpFlowSpeed = null, flowSpeedSum = null;
        

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

    @Override
    public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() != ItemEvent.SELECTED) {
            return;
        }

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

    public JFreeChart getChart(List<String> idsToPaint) {
        if (paramX == null || paramY == null) {
            return new JFreeChart(null, JFreeChart.DEFAULT_TITLE_FONT,
                    new XYPlot(), showLegend);
        }

File ReaderUtils.java has 540 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

import java.io.File;
import java.util.Arrays;
import java.util.HashMap;

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

  function drawWorkflow() {

    _graph = new joint.dia.Graph();

    _paper = new joint.dia.Paper({

Method doImportStandard has 223 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Function 21 has 223 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Method convertArrays2IndepXmlDoc has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertArrays2IndepXmlDoc(LinkedHashMap<String, String> varMap, Array name, Array min, Array max, Array categories, Array units, Array desc, boolean isPrimary) {
        PmmXmlDoc indepDoc = new PmmXmlDoc();
        if (name != null) {
            try {
                Object[] na = (Object[])name.getArray();

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

    var IonRangeSlider = function (input, options, plugin_count) {
        this.VERSION = "2.3.1";
        this.input = input;
        this.plugin_count = plugin_count;
        this.current_plugin = 0;
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js - About 1 day to fix

File FskPortObject.java has 536 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.fsklab;
/*
 ***************************************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *

File JoinerNodeModel.java has 535 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

Method monitoredAssign has 221 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Override
  public void monitoredAssign(final String name, final BufferedDataTable table,
      final ExecutionMonitor exec, final int batchSize, final String rType,
      final boolean sendRowNames) throws RException, CanceledExecutionException {

Function generate_custom has 221 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

PmmTimeSeries has 61 methods (exceeds 20 allowed). Consider refactoring.
Open

public class PmmTimeSeries extends KnimeTuple implements PmmXmlElementConvertable {
    
    public static final String ELEMENT_TIMESERIES = "TimeSeries";
    //private static final String ELEMENT_TSTUPLE = "TimeSeriesTuple";
    private static final String ELEMENT_TSXML = "TimeSeriesXml";

File PredictiveModelSheetImporter.java has 533 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata.swagger;

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

Method actionPerformed has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void actionPerformed(final ActionEvent e) {
          final PlausibleDialog pd = new PlausibleDialog(DBKernel.mainFrame); 
          final PlausibleDialog4Krise pd4 = new PlausibleDialog4Krise(DBKernel.mainFrame); 
          if (DBKernel.isKrise) pd4.setVisible(true);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.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 ExposureModelSheetImporter.java has 530 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata.swagger;

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

File WriterNodeModel.java has 529 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
Severity
Category
Status
Source
Language