workcraft/workcraft

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

Summary

Maintainability
D
1 day
Test Coverage

Avoid deeply nested control flow statements.
Open

                        if (node instanceof Condition) {
                            phase.add((Condition) node);
                        }
Severity: Major
Found in workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if (e1 instanceof TransitionNode) {
                                TransitionNode[] subResult = new TransitionNode[2];
                                subResult[0] = (TransitionNode) e1;
                                subResult[1] = e;
                                result.add(subResult);
    Severity: Major
    Found in workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              for (ONGroup nextGroup : groups) {
                                  if (nextGroup.contains(con.getSecond())) {
                                      result.add(con);
                                  }
                              }
      Severity: Major
      Found in workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if (e1 instanceof TransitionNode) {
                                    TransitionNode[] subResult = new TransitionNode[2];
                                    subResult[0] = e;
                                    subResult[1] = (TransitionNode) e1;
                                    result.add(subResult);
        Severity: Major
        Found in workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java - About 45 mins to fix

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

              private Collection<Condition> forwardSearch(Node node) {
                  Collection<Condition> result = new HashSet<>();
                  Stack<Node> stack = new Stack<>();
                  Collection<Node> visit = new HashSet<>();
          
          
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 277..302

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

          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

              private Collection<Condition> backWardSearch(Node node) {
                  Collection<Condition> result = new HashSet<>();
                  Stack<Node> stack = new Stack<>();
                  Collection<Node> visit = new HashSet<>();
          
          
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 250..275

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

          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 ArrayList<Condition> getMaximalPhase(Phase phase) {
                  ArrayList<Condition> result = new ArrayList<>();
                  for (Condition c : phase) {
                      boolean isMaximal = true;
                      for (Condition pre : this.getPostPNCondition(c)) {
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 458..473

          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

              public ArrayList<Condition> getMinimalPhase(Phase phase) {
                  ArrayList<Condition> result = new ArrayList<>();
                  for (Condition c : phase) {
                      boolean isMinimal = true;
                      for (Condition pre : this.getPrePNCondition(c)) {
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 489..504

          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

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

                          for (Node node : group.getComponents()) {
                              if (net.getInputSONConnectionTypes((MathNode) node).contains(Semantics.BHVLINE)) {
                                  isInput = true;
                              }
                              if (net.getOutputSONConnectionTypes((MathNode) node).contains(Semantics.BHVLINE)) {
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 414..421

          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

                      for (Node node : group.getComponents()) {
                          if (net.getInputSONConnectionTypes((MathNode) node).contains(Semantics.BHVLINE)) {
                              isInput = true;
                          }
                          if (net.getOutputSONConnectionTypes((MathNode) node).contains(Semantics.BHVLINE)) {
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 439..446

          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

                                  for (Marking max1 : maxMarkings) {
                                      Phase phase = new Phase();
                                      for (Node node : PathAlgorithm.dfs2(min1, max1, net)) {
                                          if (node instanceof Condition) {
                                              phase.add((Condition) node);
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 92..100

          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

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

                          if (!allMarkings.keySet().contains(group)) {
                              Phase phase = new Phase();
                              for (Node node : PathAlgorithm.dfs2(min, max, net)) {
                                  if (node instanceof Condition) {
                                      phase.add((Condition) node);
          workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/BSONAlg.java on lines 119..127

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

              public Collection<ONGroup> getLowerGroups(Condition upperCondition) {
                  Collection<ONGroup> result = new HashSet<>();
          
                  for (Node pre : getPreBhvSet(upperCondition)) {
                      result.add(net.getGroup(pre));
          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/StgPlugin/src/org/workcraft/plugins/stg/utils/MutexUtils.java on lines 256..262

          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