SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method handleSuchfeldChange has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    void handleSuchfeldChange(final KeyEvent e, final boolean doFilter) {
        if (!filterChangeAllowed) return;
        if (isFormVisible()) {
            return;
        }
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBPanel.java - About 4 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 cellValueChanged has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public Object cellValueChanged(int row, int col, Object oldValue, Object newValue) {
        //System.out.println(row + "\t" + col + "\t" + oldValue + "\t" + newValue);
        try {
            if (theTable.getMyCellPropertiesModel() instanceof MyCellPropertiesModel) {
                if (theTable.getColumn(col-1).getColumnName().equals("Geprueft") && oldValue == null && newValue != 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

Method openNewWindow has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public Object openNewWindow(final MyTable theNewTable, final Object value, final Object headerValue, final String mnTable, final String mnID, final MyDBForm dbForm, final JDialog owner) {
        Object result = null;
        String titel = (headerValue == null) ? theNewTable.getTablename() : (DBKernel.getLanguage().equals("en") ? "Choose " + GuiMessages.getString((String) headerValue) + "..." : headerValue + " auswählen...");
        //JDialog f = new JDialog(DBKernel.mainFrame, titel, dbForm != null);
        JDialog f = new JDialog(owner == null ? DBKernel.mainFrame : owner, titel);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 4 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 compare has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public int compare(Object o1, Object o2) {
        String version1 = (String) o1;
        String version2 = (String) o2;

        VersionTokenizer tokenizer1 = new VersionTokenizer(version1);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/VersionComprator.java - About 4 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 updateParametersPanel has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    private void updateParametersPanel() {
        if (type == NO_PARAMETER_INPUT) {
            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

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

        _createFormField ( name, mandatory, type, helperText, value, vocabulary, port ) {
            let O = this;
            _log( 'PANEL SIM / _createFormField' );
            _log( name );

Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js - About 4 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

Function parseDate has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        parseDate: function(date, format, language, assumeNearby){
            if (!date)
                return undefined;
            if (date instanceof Date)
                return date;
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/bootstrap-datepicker.js - About 4 hrs to fix

Function leftButtonSelect has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function leftButtonSelect(cm, event, start, behavior) {
  var display = cm.display, doc = cm.doc
  e_preventDefault(event)

  var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges

Function leftButtonSelect has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function leftButtonSelect(cm, event, start, behavior) {
  var display = cm.display, doc = cm.doc
  e_preventDefault(event)

  var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges

Function getComponentValue has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  view.getComponentValue = function () {
    if (!isValidModel(_value.joinerModelsData)) {
      _value.joinerModelsData = {
        firstModel: [],
        secondModel: [],

File PredictiveModelGeneralInformation.java has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4

File GenericModelGeneralInformation.java has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4

File OtherModelGeneralInformation.java has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4

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

    @Override
    public void actionPerformed(ActionEvent event) {
        if (event.getSource() == xlsButton) {
            loadFromXLS();
        } else if (event.getSource() == clearButton) {

File ModelTableModel.java has 355 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 ManualModelEditorNodeDialog.java has 355 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 constructor has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor( metadata, img , state ,  modelScript, visScript , readme ) {
        super( metadata, img , modelScript, visScript, readme ) ;
        this._schema = schemas.consumptionModel;
        if(state){
            this.panels = this._createPanels();
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.schemas.js - About 4 hrs to fix

Function _createComplexPanel has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _createComplexPanel(data, formData, title, dialog) {
            let O = this;

            // tab-pane
            let $panel = $('<div class="tab-pane h-100" role="tabpanel"></div>')
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.TablePanel.js - About 4 hrs to fix

MyDBForm has 35 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("rawtypes")
public class MyDBForm extends JPanel {
    
    /**
     * 
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.java - About 4 hrs to fix

EmfMetadataModuleTest has 35 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("static-method")
public class EmfMetadataModuleTest {

    private static ObjectMapper MAPPER;

Severity
Category
Status
Source
Language