workcraft/workcraft

View on GitHub
workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasAnalysisTool.java

Summary

Maintainability
F
4 days
Test Coverage

Avoid deeply nested control flow statements.
Open

                                if (jcblast != null) jcblast.setSelected(false);

    Avoid deeply nested control flow statements.
    Open

                            if (rstr.equals(st)) {
                                vqc.setForegroundColor(Color.RED);
                            }

      Avoid deeply nested control flow statements.
      Open

                              if (rstr.equals(ql.name)) {
                                  vqc.setForegroundColor(Color.GREEN);
                              }

        Avoid deeply nested control flow statements.
        Open

                                        if (sjcb.isSelected()) index = jcbn.indexOf(sjcb) + 1;

          Avoid deeply nested control flow statements.
          Open

                                          if (sjcb.isSelected()) System.out.println("indexa==" + index);

            Avoid deeply nested control flow statements.
            Open

                                    if (node instanceof VisualQueueComponent) {
                                        vqc = (VisualQueueComponent) node;
                                        qc = vqc.getReferencedComponent();
                                        //System.out.println("x===" + xnet.getName(qc));
                                        String rstr;

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

                  public void relHighlight(String s, Xmas xnet, VisualXmas vnet) {
                      int typ = 0;
                      String str = "";
                      QueueComponent qc;
                      SyncComponent sc;
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 287..359

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

              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

                      while (sc.hasNextLine()) {
                          Scanner line = new Scanner(sc.nextLine());
                          Scanner nxt = new Scanner(line.next());
                          String check = nxt.next();
                          String str;
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 84..121
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 70..107

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

              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

                  public void localHighlight(String s, Xmas xnet, VisualXmas vnet) {
                      QueueComponent qc;
                      SyncComponent sc;
                      VisualQueueComponent vqc;
                      VisualSyncComponent vsc;
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 250..285
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 194..229

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

              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

                  public void activeHighlight(Xmas xnet, VisualXmas vnet) {
                      QueueComponent qc;
                      SyncComponent sc;
                      VisualQueueComponent vqc;
                      VisualSyncComponent vsc;
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 361..392
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 305..336

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

              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

                  private static void processQsl(String file) {
                      qslist.clear();
                      Scanner sc = null;
                      try {
                          sc = new Scanner(new File(file));
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 171..189
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 131..149

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

              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 ("advanced".equals(level)) {
                                      System.out.println("LEVEL IS ADVANCED ");
                                      File qslFile = XmasSettings.getTempVxmQslFile();
                                      processQsl(qslFile.getAbsolutePath());
              
              
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 375..386

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

              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

                  public void initHighlight(Xmas xnet, VisualXmas vnet) {
                      VisualQueueComponent vqc;
                      VisualSyncComponent vsc;
              
                      for (Node node : vnet.getNodes()) {
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 235..248
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 179..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 85.

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

                  private static String processLoc(String file) {
                      Scanner sc = null;
                      try {
                          sc = new Scanner(new File(file));
                      } catch (FileNotFoundException e) {
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasAnalysisTool.java on lines 162..176
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 155..169
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 191..205
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 207..221
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 115..129
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 151..165

              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

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

                  private static String processEq(String file) {
                      Scanner sc = null;
                      try {
                          sc = new Scanner(new File(file));
                      } catch (FileNotFoundException e) {
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasAnalysisTool.java on lines 126..140
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 155..169
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 191..205
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 207..221
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 115..129
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 151..165

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

                                  while ((s = stdInput.readLine()) != null) {
                                      //if (n == 1) test = checkType(s);
                                      if (test == -1) test = checkType(s);
                                      if (n > 0) str += s + '\n';
                                      n++;
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 583..588
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 369..374

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

              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 (test == 2) {
                                          if ("local".equals(highlight)) {
                                              localHighlight(str, xnet, vnet);
                                          } else if ("rel".equals(highlight)) {
                                              relHighlight(str, xnet, vnet);
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 618..625
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 395..403

              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

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

                  public int checkType(String s) {
              
                      if (s.contains("DEADLOCK FREE")) {
                          return 0;
                      } else if (s.contains("TRACE FOUND")) {
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasQueryTool.java on lines 223..233
              workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/tools/XmasVerificationTool.java on lines 167..177

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

              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