SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method run has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

      public void run() {
            try {
              if (progress != null) {
                  progress.setVisible(true);
                  progress.setStringPainted(true);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/exports/ExcelExport.java - About 3 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 run has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

                                @Override
                                public void run() {
                                    try {
                                        String tmpFolder = System.getProperty("java.io.tmpdir");
                                        String pathname = "";
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 3 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 execute has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
      throws Exception {

    FskPortObject portObj = new FskPortObject();

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

  private void creatRelationList(String relation, JoinerViewValue joinerProxyValue,
      List<JoinRelation> joinerRelation)
      throws InvalidSettingsException, JsonParseException, JsonMappingException, IOException {
    if (StringUtils.isNotBlank(relation)) {
      joinerProxyValue.joinRelations = relation;

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

    private boolean isPlotable(String paramX, String paramY) {
        boolean dataSetPlotable = false;
        boolean functionPlotable = false;
        List<Double> xs = valueLists.get(paramX);
        List<Double> ys = valueLists.get(paramY);

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

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

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 RunnerNodeModel.java has 302 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

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

 /** Temporary workaround for some metadata glitches. */
 var metadataFix = (metadata) =>   {
    // Ignore temporarily publication type
    // TODO: publicationType takes the abbreviation instead of the full string
    // used in the Reference dialog. Since KNIME runs getComponentValue twice,
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.utils.js - About 3 hrs to fix

Method handleConditions has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private String handleConditions(final Integer condId, final PmmXmlDoc misc, PmmTimeSeries ts) {
        String result = "";
        PreparedStatement ps;
        try {
            ps = conn.prepareStatement("DELETE FROM \"Versuchsbedingungen_Sonstiges\" WHERE \"Versuchsbedingungen\" = " + condId);

Function normal has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function normal(source, setState) {
    if (source.eatWhile(whiteCharRE)) {
      return null;
    }

Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/haskell/haskell.js - About 3 hrs to fix

Function drawSelectionRange has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function drawSelectionRange(cm, range$$1, output) {
    var display = cm.display, doc = cm.doc;
    var fragment = document.createDocumentFragment();
    var padding = paddingH(cm.display), leftSide = padding.left;
    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 3 hrs to fix

Function create has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        create(id, title, formData, port) {
            let O = this;
            // modal body
            let form = $( '<form class="form-striped" no-immidiate-submit></form>' )
            formData.forEach(prop => {
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.Dialog.js - About 3 hrs to fix

Function drawSelectionRange has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function drawSelectionRange(cm, range, output) {
  var display = cm.display, doc = cm.doc
  var fragment = document.createDocumentFragment()
  var padding = paddingH(cm.display), leftSide = padding.left
  var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right

Function drawSelectionRange has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function drawSelectionRange(cm, range, output) {
  var display = cm.display, doc = cm.doc
  var fragment = document.createDocumentFragment()
  var padding = paddingH(cm.display), leftSide = padding.left
  var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right

Function generate_uniqueItems has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

File ConversionUtils.java has 301 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;

File ProductImpl.java has 301 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 */
package metadata.impl;

import java.util.Date;

Method performExecute has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected PortObject[] performExecute(PortObject[] inObjects,
            ExecutionContext exec) throws Exception {
        
        BufferedDataTable table = (BufferedDataTable)inObjects[0];

Method openNewWindow has 80 lines of code (exceeds 25 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: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 3 hrs to fix

Method fillHashtable has 80 lines of code (exceeds 25 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: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 3 hrs to fix
Severity
Category
Status
Source
Language