SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java

Summary

Maintainability
F
1 wk
Test Coverage

Method convertArrays2ParamXmlDoc has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertArrays2ParamXmlDoc(LinkedHashMap<String, String> varMap, Array name,
            Array value, Array timeUnit, Array categories, Array units, Array error, Array min, Array max, Array desc, Array paramType, Array P, Array t, Integer modelId, Integer emid) {
        PmmXmlDoc paramDoc = new PmmXmlDoc();
        if (name != null) {
            try {

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

    public static PmmXmlDoc convertStringLists2TSXmlDoc(Array t, Array tu, Array l, Array lu, Array lot, Array stddevs, Array wdhs, String modelUnit, String timeUnit) {
        PmmXmlDoc tsDoc = new PmmXmlDoc();
        if (t != null) {
            try {
                Object[] toksT = (Object[])t.getArray();

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

    public static PmmXmlDoc convertArrays2IndepXmlDoc(LinkedHashMap<String, String> varMap, Array name, Array min, Array max, Array categories, Array units, Array desc, boolean isPrimary) {
        PmmXmlDoc indepDoc = new PmmXmlDoc();
        if (name != null) {
            try {
                Object[] na = (Object[])name.getArray();

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

    public static PmmXmlDoc convertArrays2MiscXmlDoc(Array id, Array param, Array desc, Array value, Array unit, String dbuuid) {
        PmmXmlDoc miscDoc = new PmmXmlDoc();
        if (id != null) {
            try {
                Object[] sid = (Object[])id.getArray();

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

    private static void checkUnits(Object[] toksT, Object[] toksLu) {
        try {
            if (toksLu != null && toksLu.length > 0) {
                String unit = toksLu[0].toString();
                int i=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

File DbIo.java has 268 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 convertArrays2ParamXmlDoc has 15 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertArrays2ParamXmlDoc(LinkedHashMap<String, String> varMap, Array name,
            Array value, Array timeUnit, Array categories, Array units, Array error, Array min, Array max, Array desc, Array paramType, Array P, Array t, Integer modelId, Integer emid) {

Method convertStringLists2TSXmlDoc has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertStringLists2TSXmlDoc(Array t, Array tu, Array l, Array lu, Array lot, Array stddevs, Array wdhs, String modelUnit, String timeUnit) {
        PmmXmlDoc tsDoc = new PmmXmlDoc();
        if (t != null) {
            try {
                Object[] toksT = (Object[])t.getArray();

Method convertArrays2ParamXmlDoc has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertArrays2ParamXmlDoc(LinkedHashMap<String, String> varMap, Array name,
            Array value, Array timeUnit, Array categories, Array units, Array error, Array min, Array max, Array desc, Array paramType, Array P, Array t, Integer modelId, Integer emid) {
        PmmXmlDoc paramDoc = new PmmXmlDoc();
        if (name != null) {
            try {

Consider simplifying this complex logical expression.
Open

              if ((current == 0x9) ||
                  (current == 0xA) ||
                  (current == 0xD) ||
                  ((current >= 0x20) && (current <= 0xD7FF)) ||
                  ((current >= 0xE000) && (current <= 0xFFFD)) ||
Severity: Critical
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

                if (toksT.length > 0) {
                    Category modelUnitCat = modelUnit == null ? null : Categories.getCategoryByUnit(modelUnit);
                    Category timeUnitCat = timeUnit == null ? null : Categories.getCategoryByUnit(timeUnit);
                    int i=0;
                    for (Object time : toksT) {
Severity: Critical
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 1 hr to fix

Method convertArrays2IndepXmlDoc has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertArrays2IndepXmlDoc(LinkedHashMap<String, String> varMap, Array name, Array min, Array max, Array categories, Array units, Array desc, boolean isPrimary) {
        PmmXmlDoc indepDoc = new PmmXmlDoc();
        if (name != null) {
            try {
                Object[] na = (Object[])name.getArray();

Method convertStringLists2TSXmlDoc has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertStringLists2TSXmlDoc(Array t, Array tu, Array l, Array lu, Array lot, Array stddevs, Array wdhs, String modelUnit, String timeUnit) {

Method convertArrays2IndepXmlDoc has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static PmmXmlDoc convertArrays2IndepXmlDoc(LinkedHashMap<String, String> varMap, Array name, Array min, Array max, Array categories, Array units, Array desc, boolean isPrimary) {

Method convertArray2String has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static String convertArray2String(Array array) {
        String result = null;
        if (array != null) {
            try {
                Object[] o = (Object[])array.getArray();
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 55 mins 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 addCorrs has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private static ParamXml addCorrs(ParamXml px, int modelId, int emid) throws SQLException {
        Integer paramId = DBKernel.getID("ModellkatalogParameter", new String[]{"Modell", "Parametername", "Parametertyp"}, new String[]{modelId+"", px.origName, "2"}); // Bfrdb.PARAMTYPE_PARAM
        if (paramId == null) System.err.println("paramId = null... " + px.origName);
        Integer estParamId = DBKernel.getID("GeschaetzteParameter", new String[]{"GeschaetztesModell", "Parameter"}, new String[]{emid+"", paramId+""});
        ResultSet rs = DBKernel.getResultSet("SELECT \"param2\",\"Wert\" FROM \"GeschaetzteParameterCovCor\" WHERE \"param1\" = " + estParamId + " AND \"GeschaetztesModell\" = " + emid, false);
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 55 mins 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 stripNonValidXMLCharacters has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static String stripNonValidXMLCharacters(String in) {
          StringBuffer out = new StringBuffer(); // Used to hold the output.
          char current; // Used to reference the current character.

          if (in == null || ("".equals(in))) return ""; // vacancy test.
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 55 mins 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 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

Consider simplifying this complex logical expression.
Open

                if (sid != null && sid.length > 0) {
                    for (int i=0;i<sid.length;i++) {
                        Integer sidi = (sid[i] == null ? null : Integer.parseInt(sid[i].toString()));
                        String spas = (spa == null || spa[i] == null ? null : spa[i].toString());
                        String sdes = (sde == null || sde[i] == null ? null : sde[i].toString());
Severity: Major
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 40 mins to fix

Method getVarParMap has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static LinkedHashMap<String, String> getVarParMap(String varparStr) {
        LinkedHashMap<String, String> ret = new LinkedHashMap<>();
        if (varparStr != null) {
            String[] t1 = varparStr.split(",");
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 25 mins 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

Refactor this method to reduce its Cognitive Complexity from 74 to the 15 allowed.
Open

    public static PmmXmlDoc convertStringLists2TSXmlDoc(Array t, Array tu, Array l, Array lu, Array lot, Array stddevs, Array wdhs, String modelUnit, String timeUnit) {

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Refactor this method to reduce its Cognitive Complexity from 57 to the 15 allowed.
Open

    public static PmmXmlDoc convertArrays2IndepXmlDoc(LinkedHashMap<String, String> varMap, Array name, Array min, Array max, Array categories, Array units, Array desc, boolean isPrimary) {

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Refactor this method to reduce its Cognitive Complexity from 24 to the 15 allowed.
Open

    private static void checkUnits(Object[] toksT, Object[] toksLu) {

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Refactor this method to reduce its Cognitive Complexity from 86 to the 15 allowed.
Open

    public static PmmXmlDoc convertArrays2ParamXmlDoc(LinkedHashMap<String, String> varMap, Array name,

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Refactor this method to reduce its Cognitive Complexity from 41 to the 15 allowed.
Open

    public static PmmXmlDoc convertArrays2MiscXmlDoc(Array id, Array param, Array desc, Array value, Array unit, String dbuuid) {

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Identical blocks of code found in 5 locations. Consider refactoring.
Open

                        Double mad = (ma == null || ma[i] == null) ? Double.NaN : Double.parseDouble(ma[i].toString());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 175..175
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 193..193
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 246..246
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 281..281

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 5 locations. Consider refactoring.
Open

                        Double svd = (sv == null || sv[i] == null) ? Double.NaN : Double.parseDouble(sv[i].toString());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 175..175
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 193..193
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 246..246
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 247..247

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 5 locations. Consider refactoring.
Open

                        Double erd = (er == null || er[i] == null) ? Double.NaN : Double.parseDouble(er[i].toString());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 175..175
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 246..246
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 247..247
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 281..281

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 5 locations. Consider refactoring.
Open

                        Double vad = (va == null || va[i] == null) ? Double.NaN : Double.parseDouble(va[i].toString());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 193..193
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 246..246
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 247..247
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 281..281

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 5 locations. Consider refactoring.
Open

                        Double mid = (mi == null || mi[i] == null) ? Double.NaN : Double.parseDouble(mi[i].toString());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 175..175
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 193..193
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 247..247
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 281..281

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                                            toksL == null || toksL[i] == null ? null : convert(Double.parseDouble(toksL[i].toString()), toksLui, modelUnit, modelUnitCat),
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 99..99

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 42.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                                            toksSd == null || toksSd[i] == null ? null : convert(Double.parseDouble(toksSd[i].toString()), toksLui, modelUnit, modelUnitCat),
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 95..95

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 42.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        Integer estParamId = DBKernel.getID("GeschaetzteParameter", new String[]{"GeschaetztesModell", "Parameter"}, new String[]{emid+"", paramId+""});
de.bund.bfr.knime.pmm.bfrdbiface.lib/src/de/bund/bfr/knime/pmm/bfrdbiface/lib/Bfrdb.java on lines 1819..1819
de.bund.bfr.knime.pmm.bfrdbiface.lib/src/de/bund/bfr/knime/pmm/bfrdbiface/lib/Bfrdb.java on lines 1829..1830

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                        if (ct != null && ct[i] != null) px.t = Double.parseDouble(ct[i].toString());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 205..205

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                        if (cp != null && cp[i] != null) px.P = Double.parseDouble(cp[i].toString());
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java on lines 206..206

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status