SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method doExport has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
Open

    public void doExport(final String filename, final MyDBTable myDB, final JProgressBar progress, final boolean exportFulltext, final String zeilen2Do) {
        //filename = "C:/Users/Armin/Documents/private/freelance/BfR/Data/100716/Matrices_BLS-Liste.xls";
      Runnable runnable = new Runnable() {
      public void run() {
            try {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/exports/ExcelExport.java - About 5 hrs 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 updateParamValues has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
Open

    private static void updateParamValues(List<KnimeTuple> tuples,
            Map<KnimeTuple, List<KnimeTuple>> tupleCombinations) {
        Map<Integer, Map<String, Double>> paramSums = new LinkedHashMap<>();
        Map<Integer, Map<String, Integer>> paramCounts = new LinkedHashMap<>();
        Map<Integer, Map<String, Double>> paramValues = new LinkedHashMap<>();

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

    public BufferedDataTable execute(final ExecutionContext exec) {
        Map<NameAndDbId, Integer> columns = createColumnMap(pcmlDoc);
        Map<String, ProcessNode> processNodes = createProcessNodeMap(pcmlDoc);

        Double timeDiff = 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 OneStepEstimationThread.java has 406 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 JSONDataTable.java has 405 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.node.editableTable;

/*
 * ------------------------------------------------------------------------
 *  Copyright by KNIME GmbH, Konstanz, Germany

File AddonC.java has 404 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 MetadataDocument.java has 404 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 execute has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

        ResultSet result;
        Bfrdb db;

Method insertCondition has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private Integer insertCondition(Integer condId, final Integer tempId, final Integer phId, final Integer awId, final String agentName, final String matrixName,
            final String combaseId, Integer matrixId, Integer agentId, final String agentDetail, final String matrixDetail, PmmXmlDoc misc, final String comment, final Integer qs, final Boolean checked, PmmXmlDoc lit,
            PmmTimeSeries ts) {

        String warnings = "";

File GoogleSheetImporterTest.java has 403 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

Method loadSettings has 141 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void loadSettings(NodeSettingsRO settings) {
        try {
            selectedIDs = XmlConverter.xmlToObject(
                    settings.getString(CFG_SELECTEDIDS),
                    new ArrayList<String>());

Method createChart has 141 lines of code (exceeds 25 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]");

Function token has 141 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        token: function (stream, state) {
            if (state.indentStack == null && stream.sol()) {
                // update indentation, but only if indentStack is empty
                state.indentation = stream.indentation();
            }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/scheme/scheme.js - About 5 hrs to fix

Method setValueAt has 140 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void setValueAt(Object aValue, int rowIndex, int columnIndex) {

      if (columnIndex == 1) {
        String stringValue = (String) aValue;

File toastr.js has 400 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Toastr
 * Copyright 2012-2015
 * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.
 * All Rights Reserved.
Severity: Minor
Found in de.bund.bfr.knime.pmm.nodes/js-lib/toastr/2_1_3/debug/js/toastr.js - About 5 hrs to fix

Function initToolbar has 140 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    BootstrapTable.prototype.initToolbar = function () {
        var that = this,
            html = [],
            timeoutId = 0,
            $keepOpen,

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

    public void flush16le() throws UnsupportedEncodingException, FileNotFoundException, IOException, PmmException {
        StringBuffer buf = new StringBuffer();
        for (PmmTimeSeries candidate : buffer) {
            String organism = "";
            String matrix = "";

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 37 (exceeds 5 allowed). Consider refactoring.
Open

    public static boolean doRestore(final MyDBTable myDB, final File scriptFile, final boolean silent, boolean doReconnect) {
        boolean result = true;
        if (scriptFile != null && scriptFile.exists()) {
            if (!silent) {
                int returnVal = JOptionPane.showConfirmDialog(DBKernel.mainFrame,
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/BackupMyDBI.java - About 5 hrs 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 getUP has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

    public static boolean getUP(String dbPath) {
        boolean result = false;
        DBKernel.closeDBConnections(false);

        String sa = getDefaultSA();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 5 hrs 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 equals has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return 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

Severity
Category
Status
Source
Language