workcraft/workcraft

View on GitHub
workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java

Summary

Maintainability
D
2 days
Test Coverage

Avoid too many return statements within this method.
Open

        return result;

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

                if (isInitial(lc)) {
                    for (Condition uc : getUpperConditions(lc)) {
                        if (!uc.getStartTime().isSpecified() || !lc.getStartTime().isSpecified()) {
                            continue;
                        }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 301..314

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

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

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

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

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

    Refactorings

    Further Reading

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

                if (isFinal(lc)) {
                    for (Condition uc : getUpperConditions(lc)) {
                        if (!uc.getEndTime().isSpecified() || !lc.getEndTime().isSpecified()) {
                            continue;
                        }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 285..298

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

    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

            for (Node post : getPostPNSet(t)) {
                Interval start2 = ((Time) post).getStartTime();
                if (!start2.equals(end)) {
                    result.add("Concurrently inconsistency: finish" + nodeStr(t) + timeStr(end.toString()) + " != start"
                            + nodeStr(post) + timeStr(start2.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 142..148

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

    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

            for (Node pre : getPrePNSet(t)) {
                Interval end2 = ((Time) pre).getEndTime();
                if (!end2.equals(start)) {
                    result.add("Concurrently inconsistency: start" + nodeStr(t) + timeStr(start.toString()) + " != finish"
                            + nodeStr(pre) + timeStr(end2.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 133..139

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

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

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

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

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

    Refactorings

    Further Reading

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

            if (!i2.isOverlapping(start)) {
                result.add("Node inconsistency: finish" + nodeStr(node) + " - duration" + nodeStr(node) + "="
                        + timeStr(i2.toString()) + " is not consistent with start" + nodeStr(node)
                        + timeStr(start.toString()) + ".");
            }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 118..122

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

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

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

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

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

    Refactorings

    Further Reading

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

            if (!i3.isOverlapping(dur)) {
                result.add("Node inconsistency: finish" + nodeStr(node) + " - start" + nodeStr(node) + "="
                        + timeStr(i3.toString()) + " is not consistent with duration" + nodeStr(node)
                        + timeStr(dur.toString()) + ".");
            }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 100..104

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

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

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

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

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

    Refactorings

    Further Reading

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

                    if (!(input.getStartTime().equals(output.getStartTime()))) {
                        subResult.add("Sync inconsistency: start" + nodeStr(input) + timeStr(input.getStartTime().toString())
                                + " != start" + nodeStr(output) + timeStr(output.getStartTime().toString()));
    
                    }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 216..221

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

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

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

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

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

    Refactorings

    Further Reading

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

                    if (!(input.getDuration().equals(output.getDuration()))) {
    
                        subResult.add("Sync inconsistency: duration" + nodeStr(input) + timeStr(input.getDuration().toString())
                                + " != duration" + nodeStr(output) + timeStr(output.getDuration().toString()));
    
    
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 211..215

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

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

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

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

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

    Refactorings

    Further Reading

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

                if (gsu > hsu) {
                    subStr.add("Behavioural inconsistency: maxStart" + nodeStr(v0) + timeStr(gsu.toString()) + " > "
                            + "maxStart" + nodeStr(v1) + timeStr(hsu.toString()) + ".");
                }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 266..269

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

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

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

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

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

    Refactorings

    Further Reading

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

                if (gsl > hsl) {
                    subStr.add("Behavioural inconsistency: minStart" + nodeStr(v0) + timeStr(gsl.toString()) + " > "
                            + "minStart" + nodeStr(v1) + timeStr(hsl.toString()) + ".");
                }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 270..273

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

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

                try {
                    value = t.getEndTime().getMin();
                    HourMins.validValue(value);
                } catch (TimeOutOfBoundsException e) {
                    result.add("Time out of bound: minFinish" + nodeStr(t) + timeStr(value.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 349..354
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 355..360
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 367..372
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 373..378
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 379..384

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

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

                try {
                    value = t.getStartTime().getMin();
                    HourMins.validValue(value);
                } catch (TimeOutOfBoundsException e) {
                    result.add("Time out of bound: minStart" + nodeStr(t) + timeStr(value.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 355..360
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 361..366
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 367..372
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 373..378
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 379..384

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

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

                try {
                    value = t.getStartTime().getMax();
                    HourMins.validValue(value);
                } catch (TimeOutOfBoundsException e) {
                    result.add("Time out of bound: maxStart" + nodeStr(t) + timeStr(value.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 349..354
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 361..366
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 367..372
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 373..378
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 379..384

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

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

                try {
                    value = t.getEndTime().getMax();
                    HourMins.validValue(value);
                } catch (TimeOutOfBoundsException e) {
                    result.add("Time out of bound: maxFinish" + nodeStr(t) + timeStr(value.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 349..354
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 355..360
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 361..366
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 373..378
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 379..384

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

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

                try {
                    value = t.getDuration().getMin();
                    HourMins.validValue(value);
                } catch (TimeOutOfBoundsException e) {
                    result.add("Time out of bound: minDur" + nodeStr(t) + timeStr(value.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 349..354
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 355..360
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 361..366
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 367..372
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 379..384

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

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

                try {
                    value = t.getDuration().getMax();
                    HourMins.validValue(value);
                } catch (TimeOutOfBoundsException e) {
                    result.add("Time out of bound: maxDur" + nodeStr(t) + timeStr(value.toString()) + ".");
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 349..354
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 355..360
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 361..366
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 367..372
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 373..378

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

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

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

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

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

    Refactorings

    Further Reading

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

            if (tsu > tfu) {
                result.add("Node inconsistency: maxStart" + nodeStr(node) + timeStr(tsu.toString()) + " > maxFinish"
                        + nodeStr(node) + timeStr(tfu.toString()) + ".");
            }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 68..71

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

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

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

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

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

    Refactorings

    Further Reading

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

            if (tsl > tfl) {
                result.add("Node inconsistency: minStart" + nodeStr(node) + timeStr(tsl.toString()) + " > minFinish"
                        + nodeStr(node) + timeStr(tfl.toString()) + ".");
            }
    workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ConsistencyAlg.java on lines 72..75

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

    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