SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  @Test
  public void testConvertModel_genericModel_toProcessModel() throws JsonProcessingException, IOException {
    ConversionUtils utils = new ConversionUtils();

    // Example data
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 25..35
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 37..47
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 49..59
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 61..71
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 73..83
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 85..95
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 109..119
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 121..131
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 133..143
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 145..155

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 51.

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

  public void reSelectSimulation(FskPortObject fskObj, int index) {
    fskObj.selectedSimulationIndex = index;
    if (fskObj instanceof CombinedFskPortObject) {
      reSelectSimulation(((CombinedFskPortObject) fskObj).getFirstFskPortObject(), index);
      reSelectSimulation(((CombinedFskPortObject) fskObj).getSecondFskPortObject(), index);
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_9_0/de/bund/bfr/knime/fsklab/v1_9/runner/RunnerNodeModel.java on lines 169..175
de.bund.bfr.knime.fsklab.nodes/src/de/bund/bfr/knime/fsklab/v2_0/runner/RunnerNodeModel.java on lines 362..368

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 51.

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

      private Connection getDefaultConnection() {
        Connection result = null;
        String connStr = "jdbc:default:connection";
        try {
            result = DriverManager.getConnection(connStr);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTrigger.java and 1 other location - About 40 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/MainKernel.java on lines 195..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 51.

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

  public PythonScriptHandler() throws IOException {

    PythonKernelOptions m_kernelOptions = new PythonKernelOptions();
    controller = new PythonKernel(m_kernelOptions);
    
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_7_2/de/bund/bfr/knime/fsklab/nodes/PythonScriptHandler.java on lines 24..32

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 51.

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

  public PythonScriptHandler() throws IOException {
    // automatically receive information about used Python Version (2.7 or 3.x)
    PythonKernelOptions m_kernelOptions = new PythonKernelOptions();
    controller = new PythonKernel(m_kernelOptions);
 // set up backend (rendering engine) for matplotlib for image handling:
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_9_0/de/bund/bfr/knime/fsklab/nodes/v1_9/PythonScriptHandler.java on lines 25..36

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 51.

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

      private static Connection getDefaultConnection() {
          Connection result = null;
            String connStr = "jdbc:default:connection";
            try {
                result = DriverManager.getConnection(connStr);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MainKernel.java and 1 other location - About 40 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/MyTrigger.java on lines 298..308

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 51.

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

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Model {\n");
    
de.bund.bfr.knime.fsklab.metadata.model/gen/de/bund/bfr/metadata/swagger/DataModelModelMath.java on lines 79..87

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 51.

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

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DataModelModelMath {\n");
    
de.bund.bfr.knime.fsklab.metadata.model/gen/de/bund/bfr/metadata/swagger/Model.java on lines 72..80

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 51.

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

Consider simplifying this complex logical expression.
Open

                if (o != null && o.length > 0) {
                    for (int i = 0; i < o.length; i++) {
                        pm.addIndepVar(o[i].toString(), mi == null || mi[i] == null ? null : Double.parseDouble(mi[i].toString()),
                                ma == null || ma[i] == null ? null : Double.parseDouble(ma[i].toString()), c == null || c[i] == null ? null : c[i].toString(), u == null
                                        || u[i] == null ? null : u[i].toString(), d[i] == null ? null : d[i].toString());

Consider simplifying this complex logical expression.
Open

             if (cols2Search == null || cols2Search.size() == 0 || cols2Search.contains(col)) {
                 boolean isMN = (col > 0 && mnTable != null && mnTable.length > col-1 && mnTable[col-1] != null);
                     if (myDBTable1.getColumn(col).getType() != java.sql.Types.BOOLEAN && !isMN) {
                         Object o = tm.getValueAt(row, col+1);
                         if (o != null) { // sonst Fehler in z.B. Methoden bei der Suchfunktion
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/editoren/MyFilter.java - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

          if (DBKernel.isKrise && pd4.okPressed || !DBKernel.isKrise && pd.okPressed && (!pd.radioButton3.isSelected() || ids != null)) {
              Runnable runnable = new Runnable() {
                @Override
                public void run() {
                      try {          
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.java - About 40 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

Consider simplifying this complex logical expression.
Open

            if (paramIndex >= 0) {
                LinkedHashMap<Double, Double> timeSeries = new LinkedHashMap<Double, Double>();
                boolean paramDone = false;
                String process = null, lastP = null;

Consider simplifying this complex logical expression.
Open

      if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
           (!inner.state.context && inner.state.tokenize.isInText)) ||
          (state.md_inside && stream.current().indexOf(">") > -1)) {
        state.f = inlineNormal;
        state.block = blockNormal;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/markdown/markdown.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

        else if (indentStatements &&
            (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') ||
            (ctx.type == "statement" && curPunc == "newstatement")))
          pushContext(state, stream.column(), "statement");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/ttcn/ttcn.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

        else if (indentStatements && (((ctx.type == "}" || ctx.type == "top")
            && curPunc != ';') || (ctx.type == "statement"
            && curPunc == "newstatement")))
          pushContext(state, stream.column(), "statement");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/ttcn-cfg/ttcn-cfg.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

      if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") {
        return "bracket";
      }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stex/stex.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

            if (functions && functions.propertyIsEnumerable(word) ||
                    (stream.current().match(/^#@?[a-z0-9_]+ *$/i) && stream.peek()=="(") &&
                     !(functions && functions.propertyIsEnumerable(word.toLowerCase()))) {
                state.beforeParams = true;
                state.lastTokenWasBuiltin = false;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/velocity/velocity.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

        } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
            ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
          // Dedent relative to current context.
          indent = Math.max(0, cx.indent - indentUnit);
        }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/css/css.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

        if ((stream.string.match(/^[a-z][\w-]*\(/i) && endOfLine(stream)) ||
            wordIsBlock(firstWordOfLine(stream)) ||
            /(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(firstWordOfLine(stream)) ||
            (!stream.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/) &&
             wordIsTag(firstWordOfLine(stream)))) {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 40 mins to fix
Severity
Category
Status
Source
Language