SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

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

/*

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

Function 4 has 162 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./fractions":4,"./helper":5}],4:[function(require,module,exports){
var isInt = require('./helper').isInt;
var gcd = require('./helper').gcd;
var lcm = require('./helper').lcm;

Function generate_dependencies has 162 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Method stepNew has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    private PmmTimeSeries stepNew(BufferedReader reader) throws IOException {
        // initialize next time series
        PmmTimeSeries next = new PmmTimeSeries();

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

    private MainFrame loadDBNew(MyDBI myDBi, String dbPath, Boolean autoUpdate, boolean openTheGui, boolean beInteractive) {
        MainFrame mf = null;
        MyDBTable myDB = null;
        boolean doUpdates = false;
        try {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/Login.java - About 6 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

File SettingsHelperTest.java has 434 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.pmm.predictorview;

import static org.junit.Assert.*;

import java.awt.Color;

Method doImportNewFormat has 160 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private int[] doImportNewFormat(HSSFWorkbook wb, JProgressBar progress) {
        int numSuccess = 0;
        int numFails = 0;
        HSSFSheet transactionSheet = wb.getSheet("NewTransactions");
        HSSFSheet businessSheet = wb.getSheet("Business_List");

Hazard has 46 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 Hazard {
  @SerializedName("type")
  private String type = null;

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

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

      String stringValue = (String) aValue;

Method getEditor has 157 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static JEditorPane getEditor(PCMLPortObjectSpec spec) {
        JEditorPane editor = new JEditorPane("text/html", "");
        editor.setEditable(false);
        
        StringBuilder buffer = new StringBuilder();

Function _createFormField has 157 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 6 hrs to fix

Function initRow has 157 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    BootstrapTable.prototype.initRow = function(item, i, data, parentDom) {
        var that=this,
            key,
            html = [],
            style = {},

File SettingsHelper.java has 428 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 getNumDBSuccesses has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

    private int getNumDBSuccesses(boolean conform, int level, String dbuuid, DataRow row, DataTableSpec outSpec,
            Connection conn) {
        int numDBSuccesses = 0;
        if (conform && (nodeSettings.deletePrimaryModels && level == 1
                || nodeSettings.deleteSecondaryModels && level == 2)) {

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

    private static void dbBackup(final JFrame frame, final File backupFile, final boolean silent) {
        if (backupFile != null && backupFile.getParentFile().exists() && DBKernel.DBFilesDa(DBKernel.HSHDB_PATH, DBKernel.dbKennung)) {
            try {
                if (backupFile.exists()) {
                    backupFile.delete();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/Backup.java - About 6 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 getFunctionSamplePoints has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice, List<String> warnings)
            throws ConvertException {

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

    public static PmmXmlDoc convertArrays2MiscXmlDoc(Array id, Array param, Array desc, Array value, Array unit, String dbuuid) {
        PmmXmlDoc miscDoc = new PmmXmlDoc();
        if (id != null) {
            try {
                Object[] sid = (Object[])id.getArray();

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

    _validateSimField ( field ) {
        let O = this;
        _log( 'PANEL SIM / _validateSimField' );
        _log( field );

Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 6 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 setUp has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @BeforeClass
    public static void setUp() {
        MAPPER = EMFModule.setupDefaultMapper().registerModule(new ThreeTenModule())
                .registerModule(new EmfMetadataModule());

Function size has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var effectSize = $.effects.effect.size = function( o, done ) {

    // Create element
    var original, baseline, factor,
        el = $( this ),
Severity
Category
Status
Source
Language