SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method loadFrom has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    void loadFrom(final InputStream is)
            throws IOException, XmlException {
        // use NonClosableInputStream to prevent multiple calling of close.
        // We do it in the next line.
        XmlObject xmlDoc = PCMLDocument.Factory.parse(

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

    public Object openNewWindow(final MyTable theNewTable, final Object value, final Object headerValue, final MyDBTable dbTable, final Integer row, final Integer col, final Object[][] conditions, boolean fromMMC, Filter mf, Component parent,
            String level1Expansion) {
        Object result = null;
        String titel = (headerValue == null) ? theNewTable.getTablename() : (DBKernel.getLanguage().equals("en") ? "Choose " + GuiMessages.getString((String) headerValue) + "..." : headerValue + " auswählen...");
        //JDialog.setDefaultLookAndFeelDecorated(true);
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 5 hrs to fix

Function initResourcesTab has 127 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function initResourcesTab(){
    if (window.location.protocol != '' && window.location.host != '') {
        // send AJAX request to acquire the JWT for the currently logged in
        // user. Subsequent requests need to carry the token in the
        // “Authorization” header

File ProcessNodeDocumentImpl.java has 377 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

Method run has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void run() {
        try {
            PmmXmlDoc modelXml = tuple.getPmmXml(Model1Schema.ATT_MODELCATALOG);
            String modelID = ((CatalogModelXml) modelXml.get(0)).id + "";

Function bounds has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.geo.bounds = function() {
    var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;
    var bound = {
      point: point,
      lineStart: lineStart,

Function 38 has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],38:[function(require,module,exports){
'use strict';

var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
var customRuleCode = require('./dotjs/custom');

StudyImpl has 38 methods (exceeds 20 allowed). Consider refactoring.
Open

public class StudyImpl extends MinimalEObjectImpl.Container implements Study {
    /**
     * The default value of the '{@link #getStudyIdentifier() <em>Study Identifier</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

Login has 38 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Login extends JFrame {

    /**
     * 
     */
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/Login.java - About 5 hrs to fix

ChildParent has 38 methods (exceeds 20 allowed). Consider refactoring.
Open

    public interface ChildParent extends org.apache.xmlbeans.XmlObject
    {
        public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
            org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ChildParent.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s4077A4D9BB1020F5A2B1C66D5D7AA2C8").resolveHandle("childparentec38elemtype");
        

ChildParentImpl has 38 methods (exceeds 20 allowed). Consider refactoring.
Open

    public static class ChildParentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements de.bund.bfr.pcml10.ChildParentDocument.ChildParent
    {
        private static final long serialVersionUID = 1L;
        
        public ChildParentImpl(org.apache.xmlbeans.SchemaType sType)

Method loadFromNodeSettings has 124 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public void loadFromNodeSettings(final NodeSettingsRO settings) {
    try {
      String modelName = settings.getString(MODEL_NAME, null);
      if (modelName != null) {
        template.setModelName(modelName);

File ParametricModelTest.java has 373 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 loadSettings has 123 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Method checkIfInputIsValid has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

    private void checkIfInputIsValid() {
        Map<String, JComboBox<String>> depVarBoxes = new LinkedHashMap<>();
        isValid = true;

        for (String model : comboBoxes.keySet()) {

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 33 (exceeds 5 allowed). Consider refactoring.
Open

    protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec)
            throws Exception {
        KnimeSchema schema = null;
        ModelType modelType = null;
        List<KnimeTuple> 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

Method execute has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

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

        KnimeSchema schema = null;
        ModelType modelType = 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 copyKennzahlen has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

    private void copyKennzahlen(final MyTable myT, final Integer oldID, final Integer newID, final Integer toRow) throws Exception {
        MyTable[] foreignFields = myT.getForeignFields();
        if (foreignFields != null) {
            for (int i=0; i<foreignFields.length; i++) {
                if (foreignFields[i] != null && foreignFields[i].getTablename().equals("DoubleKennzahlen")) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.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 getParameter has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

  public DataArray getParameter() {
    try {
      if (isOutputClosed) {
        // open Json file stream if it isn't already open
        if (isInputClosed) {

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

    private void plotBothStrict(XYPlot plot, Plotable plotable, String id,
            double minX, double maxX) throws ConvertException {
        String legend = shortLegend.get(id);
        List<Color> colorList = colorLists.get(id);
        List<Shape> shapeList = shapeLists.get(id);

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