SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method getTableCellRendererComponent has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        public Component getTableCellRendererComponent(JTable table,
                Object color, boolean isSelected, boolean hasFocus, int row,
                int column) {

Avoid deeply nested control flow statements.
Open

                            if (!hasSameValue(param, value, misc)) {
                                warnings.add("Variable conditions cannot be imported: " + "Only first value for "
                                        + column + " is used");
                            }

Method addMisc has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public void addMisc(int attrID, String attribute, String description, Double value, List<String> categories, String unit) throws PmmException {

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

    @Override
    public Element toXmlElement() {        
        Element ret = new Element(ELEMENT_TIMESERIES);        
        try {        
            if (getCondId() != 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 getAllButBoundaryCondition has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public static String getAllButBoundaryCondition(String formula) {
        String cond = getBoundaryCondition(formula);

        if (cond != null) {
            String f = formula.replace("*(((((" + cond + ")))))", "");

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 getTableCellRendererComponent has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        public Component getTableCellRendererComponent(JTable table,
                Object value, boolean isSelected, boolean hasFocus, int row,
                int column) {

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

    public void setSettings(Config c) throws InvalidSettingsException {        
        setLevel(c.getInt(ModelReaderUi.PARAM_LEVEL, 1));
        setModelClass(c.getString(ModelReaderUi.PARAM_MODELCLASS));
        setModelFilterEnabled(c.getBoolean( ModelReaderUi.PARAM_MODELFILTERENABLED ));
        if (c.containsKey(PARAM_MODELLISTINT)) enableModelList(c.getIntArray(ModelReaderUi.PARAM_MODELLISTINT));

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 (mx.name.equalsIgnoreCase(mx2Add.name)) {
                                paramFound = true;
                                break;
                            }

Avoid deeply nested control flow statements.
Open

                        if (!var.equals(AttributeUtilities.TIME)) {
                            variableValues.get(var).add(miscValues.get(var));
                        }

Avoid deeply nested control flow statements.
Open

                        if (modelNameEnabled(cmx.name)) return true;

Avoid deeply nested control flow statements.
Open

                        if (miscs.get(var).get(i) == null) {
                            isNull = true;
                            break;
                        }

Avoid deeply nested control flow statements.
Open

                            if (before) {
                                pm.estModelId = foreignDbIdsTable.get(key);
                                emxDB.id = foreignDbIdsTable.get(key);
                                fromToXmlDB.set(i, emxDB);
                            } else if (foreignDbIdsTable.get(key).intValue() != emxDB.id.intValue()) {

Avoid deeply nested control flow statements.
Open

                            if (before) {
                                pm.modelId = foreignDbIdsTable.get(key);
                                cmxDB.id = foreignDbIdsTable.get(key);
                                fromToXmlDB.set(i, cmxDB);
                            } else if (foreignDbIdsTable.get(key).intValue() != cmxDB.id.intValue()) {

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

    public static List<Double> getDoubleList(DataCell cell) {
        if (cell.isMissing()) {
            return 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 (key != null && foreignDbIdsTable.containsKey(key)) {
                            if (before) {
                                liDB.id = foreignDbIdsTable.get(key);
                                fromToXmlDB.set(i, liDB);
                            } else if (foreignDbIdsTable.get(key).intValue() != liDB.id.intValue()) {

Method setMIDs has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static HashMap<Integer, Integer> setMIDs(boolean before, String attr, String dbTablename,
            HashMap<Integer, Integer> foreignDbIdsTable, KnimeTuple row, ParametricModel pm) throws PmmException {

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

    public static List<Integer> getIntList(DataCell cell) {
        if (cell.isMissing()) {
            return 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 (key != null && key <= -1 && key >= -3)
                            continue; // ATT_TEMPERATURE_ID, ATT_PH_ID or

Avoid deeply nested control flow statements.
Open

                        if (!p.equals(process)) {
                            newP = true;
                            if (process != null) {
                                if (!pFilled) {
                                    ranges.add(new Point2D.Double(processStart, time));

Method convertArrays2MiscXmlDoc has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertArrays2MiscXmlDoc(Array id, Array param, Array desc, Array value, Array unit, String dbuuid) {
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 45 mins to fix
Severity
Category
Status
Source
Language