SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Function autocomplete has 147 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function autocomplete(originalname, inp, arr, store, schema, uischema, fieldName,currentArea) {
        /*
         * the autocomplete function takes two arguments, the text field element
         * and an array of possible autocompleted values:
         */

Function 24 has 147 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

File CellIO.java has 410 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 testEquals has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void testEquals() {
        FskMetaData fmd = new FskMetaData();
        fmd.modelName = "ESBL Ecoli in Broiler";
        fmd.modelId = "initialize_parents_animals.R";

Function treemap has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.layout.treemap = function() {
    var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
    function scale(children, k) {
      var i = -1, n = children.length, child, area;
      while (++i < n) {

Contact has 43 methods (exceeds 20 allowed). Consider refactoring.
Open

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class Contact {
  @SerializedName("title")
  private String title = null;

File HeaderDocumentImpl.java has 409 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * An XML document type.
 * Localname: Header
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.HeaderDocument

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

/*

version: 1.0.0
author: sascha obermüller
date: 04.12.2020
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.ui.js - About 5 hrs to fix

Function generate_format has 145 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Method getOutputTable has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public BufferedDataTable getOutputTable(String assignments,
            ExecutionContext exec) throws CanceledExecutionException,
            ConvertException {
        BufferedDataContainer container = exec

Method actionPerformed has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == modelButton) {
            Integer id;

Method defineTable4NewDBTable has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private boolean defineTable4NewDBTable(MyTable myT, MyDBTable dbTable, final Object value, final Object headerValue, final MyTable theNewTable, MyDBTable newDBTable, final Integer row, final Integer col, final Object[][] conditions) {
        boolean disableButtons = false;
        /*
         * String tn = ""; if (myT != null) { tn = myT.getTablename(); } if (myT
         * != null && tn.equals("Zutatendaten") && headerValue != null &&
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 5 hrs to fix

Method runFskPortObject has 144 lines of code (exceeds 25 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;

Function _bindEvents has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function _bindEvents() {
        originalinput.on('keydown.touchspin', function(ev) {
          var code = ev.keyCode || ev.which;

          if (code === 38) {
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/bootstrap-touchspin.js - About 5 hrs to fix

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

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
            final ExecutionContext exec) throws Exception {
        KnimeRelationReader reader = new KnimeRelationReader(
                SchemaFactory.createDataSchema(), inData[0]);

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

    public void loadSettings(NodeSettingsRO settings) {
        try {
            fileName = settings.getString(CFG_FILE_NAME);
        } catch (InvalidSettingsException e) {
        }

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

    private void go4ISM(PlausibleDialog4Krise pd4) throws SQLException {
        DBKernel.sendRequest("DROP FUNCTION IF EXISTS LD", false, true);
        if (DBKernel.sendRequest(
                "CREATE FUNCTION LD(x VARCHAR(255), y VARCHAR(255))\n" +
                "RETURNS INT\n" + 
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.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 readValues has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
Open

    private void readValues() {
        textField1.setText(""); textField1_exp.setText(""); checkBox1.setSelected(false);
        comboBox2.setSelectedIndex(0);
        textField3.setText(""); checkBox3.setSelected(false);
        textField4.setText(""); textField4_exp.setText(""); checkBox4.setSelected(false);

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

  private void checkForeignWindow2Open(final int row, final int col) {
    MyTable[] myTs = actualTable.getForeignFields();
    //System.out.println(lastClickedRow + "\t" + lastClickedCol + "\t" + myTs.length);
    if (col > 0 && col <= myTs.length && myTs[col-1] != null &&
            !myTs[col-1].getTablename().equals("DoubleKennzahlen")) { 
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.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

Severity
Category
Status
Source
Language