workcraft/workcraft

View on GitHub

Showing 1,897 of 2,488 total issues

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

                if (needsMultiLineMessage) {
                    LogUtils.logMessage("  " + traceText);
                } else {
                    LogUtils.logMessage("Projection to '" + title + "': " + traceText);
                }
workcraft/MpsatVerificationPlugin/src/org/workcraft/plugins/mpsat_verification/tasks/CompositionOutputInterpreter.java on lines 109..113
workcraft/MpsatVerificationPlugin/src/org/workcraft/plugins/mpsat_verification/tasks/ConformationOutputInterpreter.java on lines 54..58

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

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

                if (!modEnvExportResult.isSuccess()) {
                    if (modEnvExportResult.isCancel()) {
                        return Result.cancel();
                    }
                    return Result.failure(new VerificationChainOutput(
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 65..71
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 82..88
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 83..89
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 96..102
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/StrictImplementationCheckTask.java on lines 99..105
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/CheckTask.java on lines 55..61
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/DeadlockFreenessCheckTask.java on lines 58..64
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/OutputPersistencyCheckTask.java on lines 55..61
workcraft/PolicyPlugin/src/org/workcraft/plugins/policy/tasks/DeadlockFreenessTask.java on lines 54..60

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

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

            if (!envExportResult.isSuccess()) {
                if (envExportResult.isCancel()) {
                    return Result.cancel();
                }
                return Result.failure(new VerificationChainOutput(
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 65..71
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 82..88
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 83..89
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 96..102
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 112..118
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/CheckTask.java on lines 55..61
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/DeadlockFreenessCheckTask.java on lines 58..64
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/OutputPersistencyCheckTask.java on lines 55..61
workcraft/PolicyPlugin/src/org/workcraft/plugins/policy/tasks/DeadlockFreenessTask.java on lines 54..60

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

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

            if (!exportResult.isSuccess()) {
                if (exportResult.isCancel()) {
                    return Result.cancel();
                }
                return Result.failure(new VerificationChainOutput(
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 65..71
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 82..88
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 83..89
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 96..102
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 112..118
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/StrictImplementationCheckTask.java on lines 99..105
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/CheckTask.java on lines 55..61
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/OutputPersistencyCheckTask.java on lines 55..61
workcraft/PolicyPlugin/src/org/workcraft/plugins/policy/tasks/DeadlockFreenessTask.java on lines 54..60

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

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

            if (!mpsatResult.isSuccess()) {
                if (mpsatResult.isCancel()) {
                    return Result.cancel();
                }
                return Result.failure(new VerificationChainOutput(
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/CheckTask.java on lines 69..75
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/CheckTask.java on lines 83..89
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/CheckTask.java on lines 103..109
workcraft/DfsPlugin/src/org/workcraft/plugins/dfs/tasks/OutputPersistencyCheckTask.java on lines 68..74

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

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

                if ((firstTransition.getDirection() != TransitionEvent.Direction.DESTABILISE)
                        && (secondTransition.getDirection() == TransitionEvent.Direction.STABILISE)) {
                    throw new InvalidConnectionException("Only unstable signal can stabilise.");
                }
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 103..106
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 135..138
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 139..142
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 143..146
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 147..150

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

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

            if ((firstSignal.getInitialState() == Signal.State.HIGH)
                    && (secondTransition.getDirection() == TransitionEvent.Direction.RISE)) {
                throw new InvalidConnectionException("Signal is already high.");
            }
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 103..106
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 107..110
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 135..138
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 139..142
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 147..150

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

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

                if (!unfoldingResult.isSuccess()) {
                    if (unfoldingResult.isCancel()) {
                        return Result.cancel();
                    }
                    return Result.failure(new VerificationChainOutput(
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 109..115
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 175..181
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 240..246
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 270..276
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/SpotChainTask.java on lines 140..145

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

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

                    if (!persistencyMpsatResult.isSuccess()) {
                        if (persistencyMpsatResult.isCancel()) {
                            return Result.cancel();
                        }
                        return Result.failure(new VerificationChainOutput(
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 109..115
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 175..181
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 224..230
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 240..246
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/SpotChainTask.java on lines 140..145

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

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

                if ((firstTransition.getDirection() == TransitionEvent.Direction.STABILISE)
                        && (secondTransition.getDirection() != TransitionEvent.Direction.DESTABILISE)) {
                    throw new InvalidConnectionException("Signal at unknown state can only destabilise.");
                }
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 107..110
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 135..138
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 139..142
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 143..146
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 147..150

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

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

                if (!modPcompResult.isSuccess()) {
                    if (modPcompResult.isCancel()) {
                        return Result.cancel();
                    }
                    return Result.failure(new VerificationChainOutput(
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/AssertionCheckTask.java on lines 92..98
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/tasks/CheckTask.java on lines 201..207

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

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

            } else if (direction == TransitionEvent.Direction.DESTABILISE) {
                if ((previousState != Signal.State.HIGH) && (previousState != Signal.State.LOW)) {
                    consistent = false;
                }
            }
workcraft/WtgPlugin/src/org/workcraft/plugins/wtg/utils/VerificationUtils.java on lines 786..790
workcraft/WtgPlugin/src/org/workcraft/plugins/wtg/utils/VerificationUtils.java on lines 782..786

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

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

            if ((firstSignal.getInitialState() != Signal.State.UNSTABLE)
                    && (secondTransition.getDirection() == TransitionEvent.Direction.STABILISE)) {
                throw new InvalidConnectionException("Only unstable signal can stabilise.");
            }
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 103..106
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 107..110
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 135..138
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 143..146
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 147..150

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

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

            if ((firstSignal.getInitialState() == Signal.State.STABLE)
                    && (secondTransition.getDirection() != TransitionEvent.Direction.DESTABILISE)) {
                throw new InvalidConnectionException("Signal at unknown state can only destabilise.");
            }
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 103..106
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 107..110
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 139..142
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 143..146
workcraft/DtdPlugin/src/org/workcraft/plugins/dtd/VisualDtd.java on lines 147..150

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

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

    public static Set<String> getMutexPlaceReferences(Stg stg) {
        HashSet<String> result = new HashSet<>();
        for (StgPlace place: stg.getMutexPlaces()) {
            result.add(stg.getNodeReference(place));
        }
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/utils/CircuitUtils.java on lines 624..630
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/utils/CircuitUtils.java on lines 632..638
workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 396..404

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

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

    @Override
    public boolean hitTest(Point2D pointInParentSpace) {
        Rectangle2D labelBB = getLabelBoundingBox();
        if (labelBB != null && labelBB.contains(pointInParentSpace)) return true;
        return super.hitTest(pointInParentSpace);
workcraft/FsmPlugin/src/org/workcraft/plugins/fsm/VisualEvent.java on lines 139..144

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

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

        for (int popiter = 0; popiter < inputnodes.size(); ++popiter) {
            for (int inner = 0; inner < inputnodes.size(); ++inner) {
                adjMatrix[popiter][inner] = false;
            }
        }
workcraft/ParityPlugin/src/org/workcraft/plugins/parity/Parser.java on lines 27..31

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

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

        @Override
        public Dnf visit(Not node) {
            negation = !negation;
            try {
                return node.getX().accept(this);
workcraft/WorkcraftCore/src/org/workcraft/formula/cnf/CnfGenerator.java on lines 30..38

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

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

    private PropertyDescriptor getArcConditionProperty(VisualArc arc) {
        return new PropertyDeclaration<>(String.class, "Condition",
                value -> arc.setCondition(parseFormula(value)),
                () -> StringGenerator.toString(arc.getCondition()))
                .setCombinable().setTemplatable();
workcraft/CpogPlugin/src/org/workcraft/plugins/cpog/VisualCpog.java on lines 229..234
workcraft/CpogPlugin/src/org/workcraft/plugins/cpog/VisualCpog.java on lines 236..241

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

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

        try {
            VisualConnection inputConnection = circuit.connect(fromNode, inputContact);
            ConnectionHelper.addControlPoints(inputConnection, prefixControlPoints);
        } catch (InvalidConnectionException e) {
            throw new RuntimeException(e.getMessage());
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/utils/GateUtils.java on lines 123..128

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

Severity
Category
Status
Source
Language