SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

File app.simulation.js has 720 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*

version: 1.0.0
author: Ahmad Swaid
date: 17.12.2020
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 1 day to fix

Function jsep has 332 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        jsep = function(expr) {
            // `index` stores the character number we are currently at while `length` is a constant
            // All of the gobbles below will modify `index` as we move along
            var index = 0,
                charAtFunc = expr.charAt,
Severity: Major
Found in de.bund.bfr.knime.pmm.nodes/js-lib/jsep/0_3_1/debug/js/jsep.js - About 1 day to fix

File EmfMetadataModuleTest.java has 717 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import static org.junit.Assert.*;

import java.io.IOException;

File PredictorViewNodeDialog.java has 715 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 codeTuple has 328 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static Model1DataTuple codeTuple(KnimeTuple inTuple) {
        final Model1DataTuple outTuple = new Model1DataTuple();
        // process
        outTuple.condId = inTuple.getInt(TimeSeriesSchema.ATT_CONDID);
        outTuple.combaseId = inTuple.getString(TimeSeriesSchema.ATT_COMBASEID);

Function 32 has 325 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

File XLSTimeSeriesReaderNodeDialog.java has 705 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 generate_properties has 323 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Method fillHashtable has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
Open

    private static LinkedHashMap<Object, String> fillHashtable(final MyTable theTable, final String startDelim, final String delimiter, final String endDelim,
            final boolean goDeeper, final boolean forceUpdate, HashSet<MyTable> alreadyUsed) {
        if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) return DBKernel.myDBi.fillHashtable(theTable, startDelim, delimiter, endDelim, goDeeper, forceUpdate,
                alreadyUsed);
        if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.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

Function _createFormField has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
Open

    _createFormField ( param ) {
        let O = this;
        _log( 'PANEL SIM / _createFormField' );
        _log( param );

Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - 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 SwaggerSheetImporter.java has 704 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

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

Method getValueAt has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
Open

        public Object getValueAt(int rowIndex, int columnIndex) {
            if (thePM == null) return null;
            if (rowIndex == 0) {
                DepXml dx = thePM.getDepXml();
                if (columnIndex < 2) return thePM.getDepVar();

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

    @Override
    public void mouseClicked(MouseEvent e) {
        if (e.getButton() == MouseEvent.BUTTON3 && e.getSource() == table.getTableHeader()) {
            int index = table.convertColumnIndexToModel(table.columnAtPoint(e.getPoint()));
            String column = table.getModel().getColumnName(index);

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

    void insertNewRow(final boolean copySelected, final Vector<Object> vecIn) {
        MyTable myT = this.getActualTable();
        if (!this.actualTable.isReadOnly()) {
            //JScrollPane scroller = getScroller();
            this.getActualTable().saveProperties(this);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.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 updateChangeLog has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
Open

    private static boolean updateChangeLog(final String tablename, final int modifiedCol, final boolean deleted, final int oSize) {
        boolean result = true;
        boolean showMessages = false;
        ResultSet rs = DBKernel.getResultSet("SELECT " + DBKernel.delimitL("ID") + "," + DBKernel.delimitL("Alteintrag") + " FROM " + DBKernel.delimitL("ChangeLog") + " WHERE "
                + DBKernel.delimitL("Tabelle") + "='" + tablename + "'", false); //  + " AND " + DBKernel.delimitL("ID") + " > 169000"
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/UpdateChecker.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 importBufferedDataTable has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public BufferedDataTable importBufferedDataTable(String varName, boolean nonNumbersAsMissing,
      ExecutionContext exec) throws RException, CanceledExecutionException {

    final REXP typeRexp = eval("class(" + varName + ")", 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

Method run has 317 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void run() {
        try {
            KnimeRelationReader reader = new KnimeRelationReader(schema,
                    inTable);

File MainFrame.java has 695 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
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 1 day to fix

File fskdbview.js has 692 lines of code (exceeds 250 allowed). Consider refactoring.
Open

fskdbview = function () {
    
    var view = {
        version: "0.0.1"
    };

File CreatorNodeModel.java has 689 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