SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

    return $e.attr('data-content')
      || (typeof o.content == 'function' ?
            o.content.call($e[0]) :
            o.content)
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/bootstrap/3_3_7/debug/js/bootstrap.js on lines 1674..1675

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

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

            Object.values(O.inputs).forEach(input => {
                if (!input.validate()) isValid = false;
            });
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.FormPanel.js and 1 other location - About 40 mins to fix
de.bund.bfr.knime.js/src/js/app/app.editable.mt.Dialog.js on lines 104..106

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

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

      if (ch == '"') {
        if (stream.skipTo('"')) {
          stream.next();
          return "string";
        } else {
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/commonlisp/commonlisp.js on lines 41..61

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

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

         stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} );
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/ntriples/ntriples.js on lines 129..129

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

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

        stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;});
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/ntriples/ntriples.js on lines 120..120

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

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

    values: function() {
      var values = [];
      this.forEach(function(value) {
        values.push(value);
      });
de.bund.bfr.knime.pmm.nodes/js-src/de/bund/bfr/knime/pmm/js/modelplotter/d3.js on lines 247..253

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

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

    keys: function() {
      var keys = [];
      this.forEach(function(key) {
        keys.push(key);
      });
de.bund.bfr.knime.pmm.nodes/js-src/de/bund/bfr/knime/pmm/js/modelplotter/d3.js on lines 361..367

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

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

      if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
de.bund.bfr.knime.pmm.nodes/js-src/de/bund/bfr/knime/pmm/js/modelplotter/d3.js on lines 4181..4181

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

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 11 locations. Consider refactoring.
Open

  @Test
  public void testConvertModel_genericModel_toOtherModel() 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 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 97..107
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

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

  @Test
  public void testConvertModel_genericModel_toHealthModel() 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 97..107
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 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

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

  @Test
  public void testConvertModel_genericModel_toRiskModel() 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 97..107
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 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

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

  @Test
  public void testConvertModel_genericModel_toGenericModel() throws Exception {
    ConversionUtils utils = new ConversionUtils();

    // Example data
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 97..107
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

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

  @Test
  public void testConvertModel_genericModel_toToxicologicalModel() 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 97..107
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

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

  @Test
  public void testConvertModel_genericModel_toQraModel() 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 97..107
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

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 11 locations. Consider refactoring.
Open

  @Test
  public void testConvertModel_genericModel_toDataModel() 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 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 97..107
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

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

  @Test
  public void testConvertModel_genericModel_toPredictiveModel() 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 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 97..107
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

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

  @Test
  public void testConvertModel_genericModel_toExposureModel() 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 85..95
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/ConversionUtilsTest.java on lines 97..107
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_7_2/de/bund/bfr/knime/fsklab/nodes/v1_7_2/runner/RunnerNodeModel.java on lines 161..167
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 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_7_2/de/bund/bfr/knime/fsklab/nodes/v1_7_2/runner/RunnerNodeModel.java on lines 161..167
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_9_0/de/bund/bfr/knime/fsklab/v1_9/runner/RunnerNodeModel.java on lines 169..175

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 11 locations. Consider refactoring.
Open

  @Test
  public void testConvertModel_genericModel_toConsumptionModel() 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 97..107
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

Severity
Category
Status
Source
Language