workcraft/workcraft

View on GitHub
workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java

Summary

Maintainability
F
1 wk
Test Coverage

Avoid deeply nested control flow statements.
Open

                        if (cn2 instanceof JComboBox) {
                            JComboBox cb = (JComboBox) cn2;
                            String str = cb.getSelectedItem().toString();
                            //System.out.println("Found " + str);
                            if ("asynchronous".equals(str)) {

    Avoid deeply nested control flow statements.
    Open

                            if (checksynclist(cnet.getName(cpNode)) == 1) {
                                synclist.add(new Sync(cnet.getName(cpNode), "", cnet.getName(sc), "i", sc.getGr(), 0));
                            } else {
                                storeSname(cnet.getName(cpNode), cnet.getName(sc), sc.getGr(), 0);
                            }

      Avoid deeply nested control flow statements.
      Open

                              if (checksynclist(cnet.getName(cpNode)) == 1) {
                                  synclist.add(new Sync(cnet.getName(cpNode), "", cnet.getName(sc), "i", sc.getGr(), 0));
                              } else {
                                  storeSname(cnet.getName(cpNode), cnet.getName(sc), sc.getGr(), 0);
                              }

        Avoid deeply nested control flow statements.
        Open

                                if (cn2 instanceof JTextField) {
                                    JTextField tf = (JTextField) cn2;
                                    String str = tf.getText();
                                    if (n == 2) {
                                        slist1.add(str);

          Avoid deeply nested control flow statements.
          Open

                                  if (checksynclist(cnet.getName(cpNode)) == 1) {
                                      synclist.add(new Sync(cnet.getName(cpNode), cnet.getName(sc), "", "o", sc.getGr(), cno));
                                  } else {
                                      storeSname2(cnet.getName(cpNode), cnet.getName(sc), sc.getGr(), 0);
                                  }

            Avoid deeply nested control flow statements.
            Open

                                    if (cn2 instanceof JComboBox) {
                                        JComboBox cb = (JComboBox) cn2;
                                        sel = (String) cb.getSelectedItem();
                                    } else if (cn2 instanceof JTextField) {
                                        JTextField tf = (JTextField) cn2;

              Avoid deeply nested control flow statements.
              Open

                                      if (checksynclist(cnet.getName(cpNode)) == 1) {
                                          synclist.add(new Sync(cnet.getName(cpNode), "", cnet.getName(sc), "i", sc.getGr(), 0));
                                      } else {
                                          storeSname(cnet.getName(cpNode), cnet.getName(sc), sc.getGr(), 0);
                                      }

                Avoid deeply nested control flow statements.
                Open

                                        if (checksynclist(cnet.getName(cpNode)) == 1) {
                                            if (cno == 1) {
                                                cno2 = 2;
                                            } else if (cno == 2) {
                                                cno2 = 1;

                  Avoid deeply nested control flow statements.
                  Open

                                          if (checksynclist(cnet.getName(cpNode)) == 1) {
                                              synclist.add(new Sync(cnet.getName(cpNode), cnet.getName(sc), "", "o", sc.getGr(), cno));
                                          } else {
                                              storeSname2(cnet.getName(cpNode), cnet.getName(sc), sc.getGr(), 0);
                                          }

                    Avoid deeply nested control flow statements.
                    Open

                                            if (checksynclist(cnet.getName(cpNode)) == 1) {
                                                synclist.add(new Sync(cnet.getName(cpNode), cnet.getName(sc), "", "o", sc.getGr(), cno));
                                            } else {
                                                storeSname2(cnet.getName(cpNode), cnet.getName(sc), sc.getGr(), 0);
                                            }

                      Avoid deeply nested control flow statements.
                      Open

                                              if (checksynclist(cnet.getName(cpNode)) == 1) {
                                                  synclist.add(new Sync(cnet.getName(cpNode), "", cnet.getName(sc), "i", sc.getGr(), 0));
                                              } else {
                                                  storeSname(cnet.getName(cpNode), cnet.getName(sc), sc.getGr(), 0);
                                              }

                        Avoid deeply nested control flow statements.
                        Open

                                                if (checksynclist(cnet.getName(cpNode)) == 1) {
                                                    if (cno == 1) {
                                                        cno2 = 2;
                                                    } else if (cno == 2) {
                                                        cno2 = 1;

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

                                  for (VisualGroup vg: Hierarchy.getDescendantsOfType(vnet.getRoot(), VisualGroup.class)) {
                                      for (VisualComponent vp: vg.getComponents()) {
                                          if (vp instanceof VisualSourceComponent) {
                                              VisualSourceComponent vsc = (VisualSourceComponent) vp;
                                              SourceComponent sc = vsc.getReferencedComponent();
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/JsonExportCommand.java on lines 86..123

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

                          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 void writeJsonOutJoin(final VisualXmas vnet, final VisualJoinComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final JoinComponent sc = vsc.getReferencedComponent();
                                  int cno = 0;
                                  int cno2 = 0;
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 700..730

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

                          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 void writeJsonOutMerge(final VisualXmas vnet, final VisualMergeComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final MergeComponent sc = vsc.getReferencedComponent();
                                  int cno = 0;
                                  int cno2 = 0;
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 751..781

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

                          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 void writeJsonInSwitch(final VisualXmas vnet, final VisualSwitchComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final SwitchComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getOutputs()) {
                                      int cno = 0;
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 582..601
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 603..622

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

                          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 void writeJsonInMerge(final VisualXmas vnet, final VisualMergeComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final MergeComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getOutputs()) {
                                      int cno = 0;
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 561..580
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 603..622

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

                          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 void writeJsonInFork(final VisualXmas vnet, final VisualForkComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final ForkComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2: sc.getOutputs()) {
                                      int cno = 0;
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 561..580
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 582..601

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

                          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

                              private void writeJsonOutFork(final VisualXmas vnet, final VisualForkComponent vn) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final ForkComponent sc = vn.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getInputs()) {
                                      for (Connection c : cnet.getConnections(contactNode2)) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 643..660
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 662..679
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 681..698

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

                          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

                              private void writeJsonOutFunction(final VisualXmas vnet, final VisualFunctionComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final FunctionComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getInputs()) {
                                      for (Connection c : cnet.getConnections(contactNode2)) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 662..679
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 681..698
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 732..749

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

                          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

                              private void writeJsonOutSwitch(final VisualXmas vnet, final VisualSwitchComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final SwitchComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getInputs()) {
                                      for (Connection c : cnet.getConnections(contactNode2)) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 643..660
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 662..679
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 732..749

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

                          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

                              private void writeJsonOutQueue(final VisualXmas vnet, final VisualQueueComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final QueueComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getInputs()) {
                                      for (Connection c : cnet.getConnections(contactNode2)) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 643..660
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 681..698
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 732..749

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

                          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 void writeJsonInFunction(final VisualXmas vnet, final VisualFunctionComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final FunctionComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getOutputs()) {
                                      for (Connection c : cnet.getConnections(contactNode2)) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 544..559

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

                          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 void writeJsonInQueue(final VisualXmas vnet, final VisualQueueComponent vsc) {
                                  final Xmas cnet = vnet.getMathModel();
                                  final QueueComponent sc = vsc.getReferencedComponent();
                                  for (XmasContact contactNode2 : sc.getOutputs()) {
                                      for (Connection c : cnet.getConnections(contactNode2)) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 527..542

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

                          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

                                          } else if (node instanceof VisualQueueComponent) {
                                              VisualQueueComponent vsc3 = (VisualQueueComponent) node;
                                              QueueComponent sc3 = vsc3.getReferencedComponent();
                                              int qno = sc3.getGr();
                                              for (int i2 = 0; i2 < grnums1.size(); i2++) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 382..391

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

                          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

                                          } else if (node instanceof VisualSourceComponent) {
                                              VisualSourceComponent vsc2 = (VisualSourceComponent) node;
                                              SourceComponent sc2 = vsc2.getReferencedComponent();
                                              int sno = sc2.getGr();
                                              for (int i1 = 0; i1 < grnums1.size(); i1++) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 391..400

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

                          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

                                          } else if (vn1 instanceof VisualSyncComponent) {    //vn1
                                              if (vn2 instanceof VisualFunctionComponent) {
                                                  writeJsonOutFunction(vnet, (VisualFunctionComponent) vn2);
                                              } else if (vn2 instanceof VisualQueueComponent) {
                                                  writeJsonOutQueue(vnet, (VisualQueueComponent) vn2);
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 488..502

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                          if (vn2 instanceof VisualSyncComponent) {   //vn2
                                              if (vn1 instanceof VisualFunctionComponent) {
                                                  writeJsonInFunction(vnet, (VisualFunctionComponent) vn1);
                                              } else if (vn1 instanceof VisualQueueComponent) {
                                                  writeJsonInQueue(vnet, (VisualQueueComponent) vn1);
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 502..516

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

                          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 static void storeSname2(String str, String str2, int gr, int cno) {
                                  for (Sync s : synclist) {
                                      if (s.name1.equals(str)) {
                                          s.name2 = str2;
                                          if (cno == 0) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 102..116

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

                          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 static void storeSname(String str, String str2, int gr, int cno) {
                                  for (Sync s : synclist) {
                                      if (s.name1.equals(str)) {
                                          s.name3 = str2;
                                          if (cno == 0) {
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 118..132

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                      if ("o".equals(s4)) {  //new
                                          if (cno == 0) {
                                              l1 = s4;
                                          } else if (cno == 1) {
                                              l1 = "b";
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 77..86

                          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

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

                                      } else {
                                          if (cno == 0) {
                                              l2 = s4;
                                          } else if (cno == 1) {
                                              l2 = "b";
                          workcraft/XmasPlugin/src/org/workcraft/plugins/xmas/commands/SynchronisationCommand.java on lines 68..77

                          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

                          There are no issues that match your filters.

                          Category
                          Status