SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Avoid deeply nested control flow statements.
Open

                        if (e.isShiftDown()) {
                            pm.setDepCategory(null);
                            pm.setDepUnit(null);
                            return;
                        }

Avoid deeply nested control flow statements.
Open

                        if (!pm_.equals(pmAll) && pmAll.estModelId == pm_.estModelId) {
                            System.err.println("WEW");
                        }

Avoid deeply nested control flow statements.
Open

                        for (String param : miscParams) {
                            miscs.get(param).remove(i);
                        }

Avoid deeply nested control flow statements.
Open

                        if (el instanceof EstModelXml) {
                            emx = (EstModelXml) el;
                            break;
                        }

Avoid deeply nested control flow statements.
Open

                        if (psmt.executeUpdate() > 0) {
                            result = DBKernel.getLastInsertedID(psmt);
                            File zipFile = new File(zipfile);
                            DBKernel.insertBLOB("PMMLabWorkflows", "Workflow", zipFile, result);
                        }

Avoid deeply nested control flow statements.
Open

                        if ((min != null && value < min)
                                || (max != null && value > max)) {
                            setWarningMessage(entry.getKey() + " = " + value
                                    + " is not in range " + min + " -> " + max);
                        }

Avoid deeply nested control flow statements.
Open

                        if (!hasArguments) {
                            plotable.getFunctionArguments().put(
                                    miscParams.get(i),
                                    new ArrayList<>(Arrays.asList(0.0)));
                        }

Avoid deeply nested control flow statements.
Open

                        for (PmmXmlElementConvertable el : estModel.getElementSet()) {
                            if (el instanceof EstModelXml) {
                                emx = (EstModelXml) el;
                                break;
                            }

Avoid deeply nested control flow statements.
Open

                        if (!secModels.containsKey(spm.estModelId)) secModels.put(spm.estModelId, new ArrayList<Integer>());

Method toDoc has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private PmmXmlDoc toDoc() throws InvalidSettingsException {
        PmmXmlDoc doc = new PmmXmlDoc();

        ParametricModel pm = finalizePM(-1);

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

Avoid deeply nested control flow statements.
Open

                        if (row == 0) {
                            pm.setDepCategory(categoryStr);
                            pm.setDepUnit(unit);
                        } else if (isIndep != null && isIndep instanceof Boolean && ((Boolean) isIndep)) {
                            pm.setIndepCategory(param, categoryStr);

Avoid deeply nested control flow statements.
Open

                            if (diff.getChanges().size() == 0) {
                                doc.remove(pxecL);
                                break;
                            }

Avoid deeply nested control flow statements.
Open

                        if (el instanceof CatalogModelXml) {
                            cmx = (CatalogModelXml) el;
                            break;
                        }

Method readDataTable has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private void readDataTable() {
        dependentParameters = new LinkedHashMap<>();
        primaryModelNames = new LinkedHashMap<>();
        independentParameterCategories = new LinkedHashMap<>();

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

Avoid deeply nested control flow statements.
Open

                        if (primaryModelNames.get(id).equals(modelName)) {
                            modelID = id;
                            break;
                        }

Method condSplit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private List<String> condSplit(final String misc) {
        if (misc == null) {
            return null;
        }
        List<String> result = new ArrayList<>();

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

Avoid deeply nested control flow statements.
Open

                            if (tslist.containsKey(condID)) tss.put(condID, tslist.get(condID));
                            else tss.put(condID, ts);

Avoid deeply nested control flow statements.
Open

                        if (!CellIO.getNameList(params).contains(
                                newDepVarSecName)) {
                            continue;
                        }

Avoid deeply nested control flow statements.
Open

                        for (PmmXmlElementConvertable el : miscs
                                .getElementSet()) {
                            MiscXml element = (MiscXml) el;

                            if (paramsConvertTo.containsKey(element.name)) {

Avoid deeply nested control flow statements.
Open

                            if (!Double.isNaN(guess.y)) {
                                maxGuessValues.add(guess.y);
                            } else {
                                maxGuessValues.add(null);
                            }
Severity
Category
Status
Source
Language