workcraft/workcraft

View on GitHub
workcraft/CfltPlugin/src/org/workcraft/plugins/cflt/ecc/SequenceHeuristic.java

Summary

Maintainability
D
2 days
Test Coverage

Avoid deeply nested control flow statements.
Open

                        if (!edgeNameToIsCovered.get(u + j)) {
                            int temp = vertexToLocalUncoveredDegree.get(j);
                            vertexToLocalUncoveredDegree.replace(j, temp + 1);
                        }

    Avoid deeply nested control flow statements.
    Open

                            if (!edgeNameToIsCovered.get(u + j) && !edgeNameToIsCovered.get(j + u)) {
                                edgeNameToIsCovered.replace(u + j, true);
                                edgeNameToIsCovered.replace(j + u, true);
    
                                int temp = vertexToUncoveredDegree.get(u);

      Avoid deeply nested control flow statements.
      Open

                              if (!i.equals(s)) {
                                  finalCliquesAsEdges.get(currentCliqueIndex).add(i + s);
                                  finalCliquesAsEdges.get(currentCliqueIndex).add(s + i);
      
                                  // Updating the number of cliques the edge is contained in

        Avoid deeply nested control flow statements.
        Open

                                if (!optionalEdgeSet.contains(u + j) || !optionalEdgeSet.contains(j + u)) {
                                    isOptional = false;
                                }

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

                      while (vertexToUncoveredDegree.get(i) > 0) {
                          if (currentCliqueSize > maxCliqueSize) {
                              maxCliqueSize = currentCliqueSize;
                          }
                          currentCliqueSize = 1;
          workcraft/CfltPlugin/src/org/workcraft/plugins/cflt/ecc/MaxMinHeuristic.java on lines 61..120

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

          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 (ArrayList<String> finalClique : finalCliquesAsVertices) {
                      //if the clique is not maximal
                      if (finalClique.size() < maxCliqueSize && !finalClique.isEmpty()) {
          
                          @SuppressWarnings("unchecked")
          workcraft/CfltPlugin/src/org/workcraft/plugins/cflt/ecc/MaxMinHeuristic.java on lines 133..164

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

          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 x = 0; x < finalCliquesAsVertices.size(); x++) {
                      if (EdgeCliqueCoverUtils.checkRedundancy(edgeNameToNoOfCliquesItsContainedIn, finalCliquesAsEdges.get(x))) {
          
                          for (String edge : finalCliquesAsEdges.get(x)) {
                              int temp = edgeNameToNoOfCliquesItsContainedIn.get(edge);
          workcraft/CfltPlugin/src/org/workcraft/plugins/cflt/ecc/MaxMinHeuristic.java on lines 181..192

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

          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 x = 0; x < finalCliquesAsEdges.size(); x++) {
                      boolean containsOnlyOptionalEdges = true;
                      for (String edge : finalCliquesAsEdges.get(x)) {
                          if (!optionalEdgeSet.contains(edge)) {
                              containsOnlyOptionalEdges = false;
          workcraft/CfltPlugin/src/org/workcraft/plugins/cflt/ecc/MaxMinHeuristic.java on lines 167..179

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

          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 (Edge edge : graph.getEdges()) {
                      edgeNameToIsCovered.put(edge.getFirstVertex() + edge.getSecondVertex(), false);
                      edgeNameToIsCovered.put(edge.getSecondVertex() + edge.getFirstVertex(), false);
          
                      edgeNameToNoOfCliquesItsContainedIn.put(edge.getFirstVertex() + edge.getSecondVertex(), 0);
          workcraft/CfltPlugin/src/org/workcraft/plugins/cflt/ecc/MaxMinHeuristic.java on lines 33..39

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

          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 (Edge edge : optionalEdges) {
                      optionalEdgeSet.add(edge.getFirstVertex() + edge.getSecondVertex());
                      optionalEdgeSet.add(edge.getSecondVertex() + edge.getFirstVertex());
                  }
          workcraft/CfltPlugin/src/org/workcraft/plugins/cflt/ecc/MaxMinHeuristic.java on lines 28..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 42.

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

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

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

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

          Refactorings

          Further Reading

          There are no issues that match your filters.

          Category
          Status