SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java

Summary

Maintainability
F
1 wk
Test Coverage

Method codeTuple has 328 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static Model1DataTuple codeTuple(KnimeTuple inTuple) {
        final Model1DataTuple outTuple = new Model1DataTuple();
        // process
        outTuple.condId = inTuple.getInt(TimeSeriesSchema.ATT_CONDID);
        outTuple.combaseId = inTuple.getString(TimeSeriesSchema.ATT_COMBASEID);

File ModelEditorNodeModel.java has 576 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.pmm.editor;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

Method codeTuple has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
Open

    public static Model1DataTuple codeTuple(KnimeTuple inTuple) {
        final Model1DataTuple outTuple = new Model1DataTuple();
        // process
        outTuple.condId = inTuple.getInt(TimeSeriesSchema.ATT_CONDID);
        outTuple.combaseId = inTuple.getString(TimeSeriesSchema.ATT_COMBASEID);

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 decodeTuple has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static KnimeTuple decodeTuple(final Model1DataTuple m1DataTuple) {
        final KnimeTuple outTuple = new KnimeTuple(SchemaFactory.createM1DataSchema());

        outTuple.setValue(TimeSeriesSchema.ATT_CONDID, m1DataTuple.condId);
        outTuple.setValue(TimeSeriesSchema.ATT_COMBASEID, m1DataTuple.combaseId);

Method decodeTuple has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public static KnimeTuple decodeTuple(final Model1DataTuple m1DataTuple) {
        final KnimeTuple outTuple = new KnimeTuple(SchemaFactory.createM1DataSchema());

        outTuple.setValue(TimeSeriesSchema.ATT_CONDID, m1DataTuple.condId);
        outTuple.setValue(TimeSeriesSchema.ATT_COMBASEID, m1DataTuple.combaseId);

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 performExecute has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected PortObject[] performExecute(PortObject[] inObjects, ExecutionContext exec) throws Exception {
        final BufferedDataTable table = (BufferedDataTable) inObjects[0];
        final List<KnimeTuple> tuples = PmmUtilities.getTuples(table, SchemaFactory.createM1DataSchema());

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

    public static Model1DataTuple codeTuple(KnimeTuple inTuple) {

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

Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
Open

    protected void useCurrentValueAsDefault() {

There are several reasons for a method not to have a method body:

  • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
  • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
  • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

Noncompliant Code Example

public void doSomething() {
}

public void doSomethingElse() {
}

Compliant Solution

@Override
public void doSomething() {
  // Do nothing because of X and Y.
}

@Override
public void doSomethingElse() {
  throw new UnsupportedOperationException();
}

Exceptions

Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

public abstract class Animal {
  void speak() {  // default implementation ignored
  }
}

Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
Open

    public void setHideInWizard(boolean hide) {

There are several reasons for a method not to have a method body:

  • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
  • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
  • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

Noncompliant Code Example

public void doSomething() {
}

public void doSomethingElse() {
}

Compliant Solution

@Override
public void doSomething() {
  // Do nothing because of X and Y.
}

@Override
public void doSomethingElse() {
  throw new UnsupportedOperationException();
}

Exceptions

Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

public abstract class Animal {
  void speak() {  // default implementation ignored
  }
}

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

        for (int i = 0; i < paramDoc.size(); i++) {
            final ParamXml paramXml = (ParamXml) paramDoc.get(i);

            final HashMap<String, Double> obtainedCorrelations = paramXml.correlations;
            final String[] obtainedCorrelationNames = new String[obtainedCorrelations.size()];
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 417..449

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

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

            for (int i = 0; i < paramSecDoc.size(); i++) {
                final ParamXml paramSecXml = (ParamXml) paramSecDoc.get(i);

                final HashMap<String, Double> obtainedCorrelations = paramSecXml.correlations;
                final String[] obtainedCorrelationNames = new String[obtainedCorrelations.size()];
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 378..410

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

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

        if (mdLitDoc != null) {
            final Literature[] mdLiteratureArray = new Literature[mdLitDoc.size()];
            for (int i = 0; i < mdLitDoc.size(); i++) {
                final LiteratureItem literatureItem = (LiteratureItem) mdLitDoc.get(i);
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 494..518
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 521..546

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

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

        if (emLitDoc != null) {
            final Literature[] emLiteratureArray = new Literature[emLitDoc.size()];
            for (int i = 0; i < emLitDoc.size(); i++) {
                final LiteratureItem literatureItem = (LiteratureItem) emLitDoc.get(i);
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 276..301
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 494..518

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

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

        if (mLitDoc != null) {
            final Literature[] mLiteratureArray = new Literature[mLitDoc.size()];
            for (int i = 0; i < mLitDoc.size(); i++) {
                final LiteratureItem literatureItem = (LiteratureItem) mLitDoc.get(i);
                final Literature literature = new Literature();
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 276..301
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 521..546

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

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 (indepDoc != null) {
            final Indep[] indepArray = new Indep[indepDoc.size()];
            for (int i = 0; i < indepDoc.size(); i++) {
                final IndepXml indepXml = (IndepXml) indepDoc.get(i);
                final Indep indep = new Indep();
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 474..491

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

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 (indepSecDoc != null) {
            final Indep[] indepSecArray = new Indep[indepSecDoc.size()];
            for (int i = 0; i < indepSecDoc.size(); i++) {
                final IndepXml indepSecXml = (IndepXml) indepSecDoc.get(i);
                final Indep indepSec = new Indep();
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 455..471

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

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 (catalogModelXml != null) {
            final CatalogModel catalogModel = new CatalogModel();
            catalogModel.id = catalogModelXml.id;
            catalogModel.name = catalogModelXml.name;
            catalogModel.formula = catalogModelXml.formula;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 324..333

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

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 (catalogModelSecXml != null) {
            final CatalogModel catalogModelSec = new CatalogModel();
            catalogModelSec.id = catalogModelSecXml.id;
            catalogModelSec.name = catalogModelSecXml.name;
            catalogModelSec.formula = catalogModelSecXml.formula;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 307..316

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

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

        for (final Literature literature : m1DataTuple.emLit.getLiterature()) {
            emLitDoc.add(new LiteratureItem(literature.author, literature.year, literature.title,
                    literature.abstractText, literature.journal, literature.volume, literature.issue, literature.page,
                    literature.approvalMode, literature.website, literature.type, literature.comment, literature.id,
                    literature.dbuuid));
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 594..599
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 653..658

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

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

        for (final Literature literature : m1DataTuple.litMd.getLiterature()) {
            mdLitDoc.add(new LiteratureItem(literature.author, literature.year, literature.title,
                    literature.abstractText, literature.journal, literature.volume, literature.issue, literature.page,
                    literature.approvalMode, literature.website, literature.type, literature.comment, literature.id,
                    literature.dbuuid));
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 653..658
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 662..667

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

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

        for (final Literature literature : m1DataTuple.mLit.getLiterature()) {
            mLitDoc.add(new LiteratureItem(literature.author, literature.year, literature.title,
                    literature.abstractText, literature.journal, literature.volume, literature.issue, literature.page,
                    literature.approvalMode, literature.website, literature.type, literature.comment, literature.id,
                    literature.dbuuid));
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 594..599
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 662..667

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

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 (matrixXml != null) {
            final Matrix matrix = new Matrix();
            matrix.id = matrixXml.id;
            matrix.name = matrixXml.name;
            matrix.detail = matrixXml.detail;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 216..223

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

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 (agentXml != null) {
            final Agent agent = new Agent();
            agent.id = agentXml.id;
            agent.name = agentXml.name;
            agent.detail = agentXml.detail;
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/editor/ModelEditorNodeModel.java on lines 226..233

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

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

            final ParamXml paramXml = new ParamXml(param.name, param.origName, param.isStart, param.value, param.error,
                    param.min, param.max, param.p, param.t, param.minGuess, param.maxGuess, param.category, param.unit,
                    param.description, correlations);
de.bund.bfr.knime.pmm.nodes.tests/src/de/bund/bfr/knime/pmm/js/common/ParamTest.java on lines 118..119

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

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

            timeSeriesDoc.add(new TimeSeriesXml(timeSeries.name, timeSeries.time, timeSeries.timeUnit,
                    timeSeries.origTimeUnit, timeSeries.concentration, timeSeries.concentrationUnit,
                    timeSeries.concentrationUnitObjectType, timeSeries.origConcentrationUnit,
                    timeSeries.concentrationStdDev, timeSeries.numberOfMeasurements));
de.bund.bfr.knime.pmm.nodes.tests/src/de/bund/bfr/knime/pmm/js/common/TimeSeriesTest.java on lines 84..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 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

There are no issues that match your filters.

Category
Status