SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method initComponents has 399 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @SuppressWarnings({ "serial" })
    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        // Generated using JFormDesigner non-commercial license
        depVarLabel = new JLabel();

Method go4Table has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
Open

    private void go4Table(final String tn, final Vector<String> result, final int id1, final int id2, final MyTable myT, final boolean showOnlyDataFromCurrentUser) {
        if (!tn.equals("Users")) {
            if (id1 < 0 && id2 < 0 &&
                    !tn.equals("ChangeLog") && !tn.equals("DateiSpeicher") && !tn.equals("Users") &&
                    !tn.equals("Matrices") && !tn.equals("Methoden") && !tn.equals("Tierkrankheiten") &&
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

Method runFskPortObject has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
Open

  public FskPortObject runFskPortObject(ScriptHandler handler, FskPortObject fskObj,
      ExecutionContext exec) throws Exception {
    LOGGER.info("Running Model: " + fskObj);
    if (fskObj instanceof CombinedFskPortObject) {
      CombinedFskPortObject comFskObj = (CombinedFskPortObject) fskObj;

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 JoinerNodeModel.java has 829 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 codeM12DataSchema has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring.
Open

    private List<JsM12DataSchema> codeM12DataSchema(List<KnimeTuple> tuples) {

        // sort tuples according to primary models
        // combined model = (Model1Schema + TimeSeriesSchema) + n x Model2Schema
        Map<Integer, List<KnimeTuple>> tertiaryModelMap = new HashMap<>();

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

package metadata;

import de.bund.bfr.metadata.swagger.ConsumptionModel;
import de.bund.bfr.metadata.swagger.DataModel;
import de.bund.bfr.metadata.swagger.DoseResponseModel;
Severity: Major
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 1 day to fix

Method setMIDs has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
Open

    public static HashMap<Integer, Integer> setMIDs(boolean before, String attr, String dbTablename,
            HashMap<Integer, Integer> foreignDbIdsTable, KnimeTuple row, ParametricModel pm) throws PmmException {
        if (dbTablename.equals("Literatur")) {
            PmmXmlDoc lili = row.getPmmXml(attr);
            if (lili != 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

File FoodProcessNodeModel.java has 805 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 addEditorMethods has 383 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function addEditorMethods(CodeMirror) {
    var optionHandlers = CodeMirror.optionHandlers;

    var helpers = CodeMirror.helpers = {};

Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 1 day to fix

Method execute has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception {

        ResultSet result;
        Bfrdb db;

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

    private JFreeChart createChart(DataTableSpec spec, List<DataRow> rowList, DataTable table,
            List<String> usedParameters, String xUnits, boolean equidistantProcesses, boolean plotLines, boolean plotPoints) {
        LinkedList<XYDataset> dataSets = new LinkedList<XYDataset>();
        LinkedList<XYDataset> equiDataSets = new LinkedList<XYDataset>();
        int timeIndex = spec.findColumnIndex(AttributeUtilities.TIME + " [s]");

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 MyNewDoubleEditor.java has 800 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 perl.js has 800 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

// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08)
// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com)
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/perl/perl.js - About 1 day to fix

Function addEditorMethods has 378 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function addEditorMethods(CodeMirror) {
  var optionHandlers = CodeMirror.optionHandlers

  var helpers = CodeMirror.helpers = {}

Function addEditorMethods has 378 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function addEditorMethods(CodeMirror) {
  var optionHandlers = CodeMirror.optionHandlers

  var helpers = CodeMirror.helpers = {}

Method mergeInportNSettings has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
Open

    @SuppressWarnings("unused")
    private void mergeInportNSettings(BufferedDataTable[] inData) {
        if (inData != null && inData.length == 1) {
            HashMap<Integer, ParametricModel> mlist = new HashMap<>();
            HashMap<Integer, PmmTimeSeries> tslist = new HashMap<>();

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

    public static Vector<String[]> getPlausibilityRow(MyDBTable table, MyTable myT, int row, String idField) {
        String tablename = myT.getTablename();
        Vector<String[]> result = new Vector<>();
        String idConf;
        if (idField.equalsIgnoreCase("ID")) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 1 day to fix

File CreatorNodeModel.java has 782 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 getDiff has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
Open

    private HashMap<Integer, HashMap<String, Object[]>> getDiff(PmmXmlDoc inputDoc, PmmXmlDoc outputDoc) {
        HashMap<Integer, HashMap<String, Object[]>> result = new HashMap<>();
           Javers javers = JaversBuilder.javers().build();

           /*

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

    @Override
    public BufferedDataTable getOutputTable(String assignments,
            ExecutionContext exec) throws CanceledExecutionException,
            ConvertException {
        BufferedDataContainer buf = exec.createDataContainer(SchemaFactory

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

Severity
Category
Status
Source
Language