SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method doImport has 183 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public String doImport(final String filename, final JProgressBar progress, final boolean showResults) {
            errorMessage = "";
          Runnable runnable = new Runnable() {
          public void run() {
            try {

Method readFskPortObject has 182 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private FskPortObject readFskPortObject(CombineArchive archive, List<String> ListOfPaths,
      int readLevel) throws Exception {
    Map<String, URI> URIS = FSKML.getURIS(1, 0, 12);

    Model model = new Model();

Function to_normal has 182 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function to_normal(stream, state) {
    var token = null;

    if (stream.sol() && stream.match(rx_examples, false)) {
      change(state, to_mode, {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/rst/rst.js - About 7 hrs to fix

File erlang.js has 470 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

/*jshint unused:true, eqnull:true, curly:true, bitwise:true */
/*jshint undef:true, latedef:true, trailing:true */
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/erlang/erlang.js - About 7 hrs to fix

Function solveFor has 182 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Equation.prototype.solveFor = function(variable) {
    if (!this.lhs._hasVariable(variable) && !this.rhs._hasVariable(variable)) {
        throw new TypeError("Invalid Argument (" + variable.toString() + "): Variable does not exist in the equation.");
    }

File jsep.js has 469 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//     JavaScript Expression Parser (JSEP) 0.3.1
//     JSEP may be freely distributed under the MIT License
//     http://jsep.from.so/

/*global module: true, exports: true, console: true */
Severity: Minor
Found in de.bund.bfr.knime.pmm.nodes/js-lib/jsep/0_3_1/debug/js/jsep.js - About 7 hrs to fix

Method refreshFKs has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
Open

    private static void refreshFKs(final String tableName, final boolean dropOnly) {
        // Foreign Keys setzen, ACHTUNG: immer checken, wenn ein Fehler auftritt
        ResultSet rs = DBKernel.getResultSet("SELECT TABLE_NAME, CONSTRAINT_NAME, CONSTRAINT_TYPE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS", false);
        try {
            if (rs != null && rs.first()) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/UpdateChecker.java - About 7 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 closeDBConnections has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
Open

    public static boolean closeDBConnections(final boolean kompakt) {
        if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) return DBKernel.myDBi.closeDBConnections(kompakt);
        boolean result = true;
        try {
            if (localConn != null && !localConn.isClosed()) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 7 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 getUsersFromChangeLog has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
Open

    private static LinkedHashMap<Integer, Vector<String>> getUsersFromChangeLog(final Statement anfrage, final String tablename, final Integer tableID, final String username,
            final boolean showDeletedAsWell) {
        LinkedHashMap<Integer, Vector<String>> result = new LinkedHashMap<>();
        Vector<String> entries = new Vector<>();
        String sql = "SELECT " + delimitL("TabellenID") + "," + delimitL("Username") + "," + delimitL("Zeitstempel") + "," + delimitL(tablename) + "." + delimitL("ID") + " AS "
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 7 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 getFunctionErrors has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
Open

    public double[][] getFunctionErrors(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {
        if (function == 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

MyNewDoubleEditor has 51 methods (exceeds 20 allowed). Consider refactoring.
Open

public class MyNewDoubleEditor extends JDialog {

    /**
     * 
     */

MyDBI has 51 methods (exceeds 20 allowed). Consider refactoring.
Open

public abstract class MyDBI {
    public abstract LinkedHashMap<String, MyTable> getAllTables();

    public abstract LinkedHashMap<Integer, String> getTreeStructure();
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java - About 7 hrs to fix

File TableReader.java has 462 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 setValue has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
Open

    public void setValue(Object value) {
        String sql = "";
        String result = "";
        if (value == null) {
            this.setText("");

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

    public BufferedDataTable createBufferedDataTable(final ExecutionContext exec) {
        DataTableSpec spec = m_spec.createDataTableSpec();
        BufferedDataContainer container = exec.createDataContainer(spec);
        for (JSONDataTableRow row : m_rows) {
            DataCell[] dataCells = new DataCell[row.getData().length];

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 ManualModelConfNodeModel.java has 459 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

SettingsHelper has 50 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SettingsHelper {

    protected static final String CFG_SELECTEDIDS = "SelectedIDs";
    protected static final String CFG_COLORS = "Colors";
    protected static final String CFG_SHAPES = "Shapes";

Method computePrimary has 175 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static List<KnimeTuple> computePrimary(List<KnimeTuple> tuples,
            boolean perDataSet) {
        Map<String, KnimeTuple> tupleMap = new LinkedHashMap<>();
        Map<String, Set<Integer>> usedCondIDs = new LinkedHashMap<>();
        Map<String, List<Double>> targetValueMap = new LinkedHashMap<>();

Method loadFSKPortObject has 174 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @SuppressWarnings("unchecked")
    public FskPortObject loadFSKPortObject(PortObjectZipInputStream in, PortObjectSpec spec,
        ExecutionMonitor exec) throws IOException, CanceledExecutionException {

      String modelScript = "";

Method loadSettingsFrom has 173 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected void loadSettingsFrom(NodeSettingsRO settings, BufferedDataTable[] input)
            throws NotConfigurableException {
        SettingsHelper set = new SettingsHelper();
Severity
Category
Status
Source
Language