SiLeBAT/FSK-Lab

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

Summary

Maintainability
F
2 wks
Test Coverage

File Plotable.java has 962 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*******************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by

Plotable has 55 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Plotable {

    private static final int FUNCTION_STEPS = 1000;
    private static final double EPSILON = 1e-5;

Method getFunctionSamplePointsErrors has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePointsErrors(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice) throws ConvertException {
        if (function == null) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getFunctionErrors has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
Open

    public double[][] getFunctionErrors(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {
        if (function == null) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getFunctionSamplePoints has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice, List<String> warnings)
            throws ConvertException {

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

    public double[][] getPoints(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY,
            Map<String, Integer> choice) throws ConvertException {
        List<Double> xList = valueLists.get(paramX);
        List<Double> yList = valueLists.get(paramY);

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

    public double[][] getFunctionSamplePointsErrors(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice) throws ConvertException {
        if (function == null) {

Method getFunctionErrors has 103 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public double[][] getFunctionErrors(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {
        if (function == null) {

Method getFunctionSamplePoints has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice, List<String> warnings)
            throws ConvertException {

Method isPlotable has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean isPlotable() {
        if (type == FUNCTION || type == FUNCTION_SAMPLE) {
            for (String param : functionParameters.keySet()) {
                if (functionParameters.get(param) == null) {
                    return false;

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

    private Double getValueX(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY, Double y,
            double minX, double maxX, Double minY, Double maxY, DJep parser,
            Node f) {
        if (y == null) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method isPlotable has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean isPlotable(String paramX, String paramY) {
        boolean dataSetPlotable = false;
        boolean functionPlotable = false;
        List<Double> xs = valueLists.get(paramX);
        List<Double> ys = valueLists.get(paramY);

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

    public double[][] getFunctionPoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {
        if (function == null) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getInverseFunctionSamplePoints has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public double[][] getInverseFunctionSamplePoints(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice, List<String> warnings)
            throws ConvertException {

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

    public double[][] getFunctionPoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {
        if (function == null) {

Method getValueX has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private Double getValueX(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY, Double y,
            double minX, double maxX, Double minY, Double maxY, DJep parser,
            Node f) {
        if (y == null) {

Method getPoints has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public double[][] getPoints(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY,
            Map<String, Integer> choice) throws ConvertException {
        List<Double> xList = valueLists.get(paramX);
        List<Double> yList = valueLists.get(paramY);

Method getInverseFunctionSamplePoints has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public double[][] getInverseFunctionSamplePoints(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice, List<String> warnings)
            throws ConvertException {

Method getValueX has 13 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private Double getValueX(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY, Double y,
            double minX, double maxX, Double minY, Double maxY, DJep parser,
            Node f) {

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

    public int getNumberOfCombinations() {
        int nMax = 0;

        if (functionArguments.size() == 1) {
            String arg = new ArrayList<>(functionArguments.keySet()).get(0);

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

    public double[][] getFunctionSamplePoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice, List<String> warnings)

Method getInverseFunctionSamplePoints has 12 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getInverseFunctionSamplePoints(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice, List<String> warnings)

Method getAllChoices has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public List<Map<String, Integer>> getAllChoices() {
        List<Map<String, Integer>> choices = new ArrayList<>();
        List<String> argList = new ArrayList<>(functionArguments.keySet());
        List<Integer> choice = new ArrayList<>(Collections.nCopies(
                argList.size(), 0));

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

    public double[][] getInverseFunctionSamplePoints(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, List<String> warnings) throws ConvertException {

Method getFunctionSamplePointsErrors has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePointsErrors(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice) throws ConvertException {

Method getFunctionSamplePoints has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            List<String> warnings) throws ConvertException {

Method getFunctionPoints has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getFunctionPoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {

Method getFunctionErrors has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getFunctionErrors(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {

Method isPlotable has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private boolean isPlotable(String paramX, String paramY) {
        boolean dataSetPlotable = false;
        boolean functionPlotable = false;
        List<Double> xs = valueLists.get(paramX);
        List<Double> ys = valueLists.get(paramY);

Method getFunctionErrors has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getFunctionErrors(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY)

Method getFunctionSamplePointsErrors has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePointsErrors(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY) throws ConvertException {

Method getFunctionPoints has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public double[][] getFunctionPoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY)

Method isPlotable has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public boolean isPlotable() {
        if (type == FUNCTION || type == FUNCTION_SAMPLE) {
            for (String param : functionParameters.keySet()) {
                if (functionParameters.get(param) == null) {
                    return false;

Method getAllChoices has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public List<Map<String, Integer>> getAllChoices() {
        List<Map<String, Integer>> choices = new ArrayList<>();
        List<String> argList = new ArrayList<>(functionArguments.keySet());
        List<Integer> choice = new ArrayList<>(Collections.nCopies(
                argList.size(), 0));

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

    public static Double inverseTransform(Double value, String transform) {
        if (value == null) {
            return null;
        } else if (transform.equals(ChartConstants.NO_TRANSFORM)) {
            return value;

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

    public static Double transform(Double value, String transform) {
        if (value == null) {
            return null;
        } else if (transform.equals(ChartConstants.NO_TRANSFORM)) {
            return value;

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

    public Map<String, List<Double>> getPossibleArgumentValues(boolean useData,
            boolean useMinMax) {
        Map<String, List<Double>> args = new LinkedHashMap<>();

        for (String var : functionArguments.keySet()) {

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

    public double[][] getPoints(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY,
            Map<String, Integer> choice) throws ConvertException {

Avoid deeply nested control flow statements.
Open

                        if (!fixedValue.equals(values.get(i))) {
                            usedPoints.set(i, false);
                        }

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

    public double[][] getPoints(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY)

Avoid too many return statements within this method.
Open

            return Math.pow(10.0, value);

Avoid too many return statements within this method.
Open

                return null;

Avoid too many return statements within this method.
Open

                    return null;

Avoid too many return statements within this method.
Open

            return Math.log(value);

Avoid too many return statements within this method.
Open

            return Math.sqrt(value);

Avoid too many return statements within this method.
Open

            return value;

Avoid too many return statements within this method.
Open

        return null;

Avoid too many return statements within this method.
Open

            return getValueX(paramX, paramY, unitX, unitY, transformX,
                    transformY, y, midX, maxX, midY, maxY, parser, f);

Avoid too many return statements within this method.
Open

            return null;

Avoid too many return statements within this method.
Open

            return null;

Avoid too many return statements within this method.
Open

            return null;

Avoid too many return statements within this method.
Open

        return points;

Avoid too many return statements within this method.
Open

        return null;

Avoid too many return statements within this method.
Open

            return value * value;

Avoid too many return statements within this method.
Open

            return Math.log10(value);

Avoid too many return statements within this method.
Open

        return null;

Avoid too many return statements within this method.
Open

            return value;

Avoid too many return statements within this method.
Open

        return points;

Avoid too many return statements within this method.
Open

        return points;

Avoid too many return statements within this method.
Open

        return points;

Avoid too many return statements within this method.
Open

            return Math.exp(value);

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

    public boolean isPlotable() {

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

See

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

    public double[][] getPoints(String paramX, String paramY, String unitX,

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

See

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

    public double[][] getFunctionPoints(String paramX, String paramY,

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

See

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

    private Double getValueX(String paramX, String paramY, String unitX,

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

See

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

    public double[][] getFunctionSamplePointsErrors(String paramX,

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

See

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

    public double[][] getFunctionErrors(String paramX, String paramY,

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

See

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

    public double[][] getFunctionSamplePoints(String paramX, String paramY,

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

See

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

    public double[][] getInverseFunctionSamplePoints(String paramX,

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

See

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

    private boolean isPlotable(String paramX, String paramY) {

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

Rename field "function" to prevent any misunderstanding/clash with field "FUNCTION" defined on line 51.
Open

    private String function;

Looking at the set of methods in a class, including superclass methods, and finding two methods or fields that differ only by capitalization is confusing to users of the class. It is similarly confusing to have a method and a field which differ only in capitalization or a method and a field with exactly the same name and visibility.

In the case of methods, it may have been a mistake on the part of the original developer, who intended to override a superclass method, but instead added a new method with nearly the same name.

Otherwise, this situation simply indicates poor naming. Method names should be action-oriented, and thus contain a verb, which is unlikely in the case where both a method and a member have the same name (with or without capitalization differences). However, renaming a public method could be disruptive to callers. Therefore renaming the member is the recommended action.

Noncompliant Code Example

public class Car{

  public DriveTrain drive;

  public void tearDown(){...}

  public void drive() {...}  // Noncompliant; duplicates field name
}

public class MyCar extends Car{
  public void teardown(){...}  // Noncompliant; not an override. It it really what's intended?

  public void drivefast(){...}

  public void driveFast(){...} //Huh?
}

Compliant Solution

public class Car{

  private DriveTrain drive;

  public void tearDown(){...}

  public void drive() {...}  // field visibility reduced
}

public class MyCar extends Car{
  @Override
  public void tearDown(){...}

  public void drivefast(){...}

  public void driveReallyFast(){...}

}

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

                for (int i = 0; i < paramList.size() - 1; i++) {
                    for (int j = i + 1; j < paramList.size(); j++) {
                        Object obj1 = parser.evaluate(derivatives.get(paramList
                                .get(i)));
                        Object obj2 = parser.evaluate(derivatives.get(paramList
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 490..508

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

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 < paramList.size() - 1; i++) {
                    for (int j = i + 1; j < paramList.size(); j++) {
                        Object obj1 = parser.evaluate(derivatives.get(paramList
                                .get(i)));
                        Object obj2 = parser.evaluate(derivatives.get(paramList
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 770..788

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

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 (String param : paramList) {
                    Object obj = parser.evaluate(derivatives.get(param));

                    if (!(obj instanceof Double)) {
                        failed = true;
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 758..768

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

                for (String param : paramList) {
                    Object obj = parser.evaluate(derivatives.get(param));

                    if (!(obj instanceof Double)) {
                        failed = true;
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 478..488

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 ((minY <= y && midY >= y) || (minY >= y && midY <= y)) {
            return getValueX(paramX, paramY, unitX, unitY, transformX,
                    transformY, y, minX, midX, minY, midY, parser, f);
        }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 1141..1144

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

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 ((midY <= y && maxY >= y) || (midY >= y && maxY <= y)) {
            return getValueX(paramX, paramY, unitX, unitY, transformX,
                    transformY, y, midX, maxX, midY, maxY, parser, f);
        }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 1136..1139

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

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 (maxY == null) {
            parser.setVarValue(
                    paramX,
                    convertFromUnit(paramX, inverseTransform(maxX, transformX),
                            unitX));
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 1082..1095

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

        if (minY == null) {
            parser.setVarValue(
                    paramX,
                    convertFromUnit(paramX, inverseTransform(minX, transformX),
                            unitX));
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 1097..1110

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

            if (x == null || x < minX || x > maxX) {
                points[0][i] = Double.NaN;
                points[1][i] = Double.NaN;
                continue;
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 741..745

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

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 (x == null || x < minX || x > maxX) {
                points[0][n] = Double.NaN;
                points[1][n] = Double.NaN;
                continue;
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 595..599

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

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionArguments.keySet()) {
            if (!param.equals(paramX)) {
                parser.addConstant(param,
                        functionArguments.get(param).get(choice.get(param)));
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 444..449
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 572..577
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 717..722
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 857..862

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

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionArguments.keySet()) {
            if (!param.equals(paramX)) {
                parser.addConstant(param,
                        functionArguments.get(param).get(choice.get(param)));
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 341..346
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 572..577
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 717..722
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 857..862

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

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionArguments.keySet()) {
            if (!param.equals(paramX)) {
                parser.addConstant(param,
                        functionArguments.get(param).get(choice.get(param)));
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 341..346
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 444..449
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 572..577
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 857..862

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

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionArguments.keySet()) {
            if (!param.equals(paramX)) {
                parser.addConstant(param,
                        functionArguments.get(param).get(choice.get(param)));
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 341..346
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 444..449
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 717..722
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 857..862

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

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionArguments.keySet()) {
            if (!param.equals(paramX)) {
                parser.addConstant(param,
                        functionArguments.get(param).get(choice.get(param)));
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 341..346
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 444..449
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 572..577
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 717..722

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

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

        for (String param : functionParameters.keySet()) {
            if (functionParameters.get(param) == null) {
                return null;
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 333..339
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 420..426
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 564..570

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionParameters.keySet()) {
            if (functionParameters.get(param) == null) {
                return null;
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 333..339
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 420..426
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 849..855

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionParameters.keySet()) {
            if (functionParameters.get(param) == null) {
                return null;
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 333..339
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 564..570
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 849..855

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        for (String param : functionParameters.keySet()) {
            if (functionParameters.get(param) == null) {
                return null;
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 420..426
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 564..570
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 849..855

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    public Double convertFromUnit(String param, Double value, String unit)
            throws ConvertException {
        String newUnit = units.get(param);
        Category category = Categories.getCategoryByUnit(newUnit);
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 998..1004

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

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

    public double[][] getFunctionSamplePoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            List<String> warnings) throws ConvertException {
        return getFunctionSamplePoints(paramX, paramY, unitX, unitY,
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 824..831

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

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

    public Double convertToUnit(String param, Double value, String unit)
            throws ConvertException {
        String currentUnit = units.get(param);
        Category category = Categories.getCategoryByUnit(currentUnit);
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 1006..1012

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

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

    public double[][] getInverseFunctionSamplePoints(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, List<String> warnings) throws ConvertException {
        return getInverseFunctionSamplePoints(paramX, paramY, unitX, unitY,
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/chart/Plotable.java on lines 539..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 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

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

            for (int i = 0; i < argList.size(); i++) {
                map.put(argList.get(i), choice.get(i));
            }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/math/MathUtilities.java on lines 187..189
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/math/MathUtilities.java on lines 215..217

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status