SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

File verilog.js has 504 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

(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/verilog/verilog.js - About 1 day to fix

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

      token: function(stream, state) {
        var match;

        switch (last(state.soyState)) {
          case "comment":
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/soy/soy.js - About 1 day to fix

Function tokenBase has 202 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenBase(stream, state) {
    var ch = stream.peek();

    // Comment
    if (stream.match("/*")) {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/sass/sass.js - About 1 day to fix

File ConsumptionModelSheetImporter.java has 503 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata.swagger;

import java.math.BigDecimal;
import java.util.HashMap;

DataModelGeneralInformation has 56 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 DataModelGeneralInformation {
  @SerializedName("name")
  private String name = null;

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

public class SettingsHelper {

    protected static final String CFG_SELECTEDID = "SelectedID";
    protected static final String CFG_CURRENTPARAMX = "CurrentParamX";
    protected static final String CFG_PARAMXVALUES = "ParamXValues";

MyTable has 56 methods (exceeds 20 allowed). Consider refactoring.
Open

public class MyTable {

    private String tableName = null;
    private String[] fieldNames = null;
    private String[] fieldTypes = null;
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 1 day to fix

Function initPagination has 199 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    BootstrapTable.prototype.initPagination = function () {
        if (!this.options.pagination) {
            this.$pagination.hide();
            return;
        } else {

File ToxicologicalModelSheetImporter.java has 498 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata.swagger;

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

File ParameterOptimizer.java has 497 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 prepareColumns has 198 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void prepareColumns() {
        Column c = this.getColumn(0);
        c.setReadOnly(true);

        if (actualTable != null) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.java - About 7 hrs to fix

Method codeM1DataSchema has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
Open

    private List<JsM1DataSchema> codeM1DataSchema(List<KnimeTuple> tuples) {

        List<JsM1DataSchema> schemas = new ArrayList<>(tuples.size());

        for (KnimeTuple tuple : tuples) {

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 SettingsHelper.java has 495 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 ReaderNodeModel.java has 495 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

Plotable has 55 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Plotable {

    private static final int FUNCTION_STEPS = 1000;
    private static final double EPSILON = 1e-5;

Method decodeM1DataSchemas has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
Open

    private List<KnimeTuple> decodeM1DataSchemas(List<JsM1DataSchema> schemas) {

        List<KnimeTuple> tuples = new ArrayList<>(schemas.size());

        KnimeSchema knimeSchema = SchemaFactory.createM1DataSchema();

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

    @Override
    protected void saveSettingsTo(NodeSettingsWO settings) throws InvalidSettingsException {
        set.setPreserveIds(preserveIdsBox.isSelected());
        set.setModelDepMin(DoNotUseToNull((String) depMinBox.getSelectedItem()));
        set.setModelDepMax(DoNotUseToNull((String) depMaxBox.getSelectedItem()));

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

    public static boolean passesFilter(final String literatureString, final Integer literatureID, final KnimeTuple tuple, final int level) throws PmmException {
        if (literatureString == null || literatureString.trim().isEmpty()) return true;
            PmmXmlDoc litXmlDoc = tuple.getPmmXml(level == 1 ? Model1Schema.ATT_EMLIT : Model2Schema.ATT_EMLIT);
            for (PmmXmlElementConvertable el : litXmlDoc.getElementSet()) {
                if (el instanceof LiteratureItem) {

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

    public void doLayout(final Collection<NodeContainer> nodes) {

        int X_STRETCH = 100;
        int Y_STRETCH = 120;

File HealthModelSheetImporter.java has 486 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata.swagger;

import java.math.BigDecimal;
import java.util.HashMap;
Severity
Category
Status
Source
Language