LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

      if(ontologyService.hasClass(ontology.createOURI(list[i].getUri()))) {
        domain.add(Utils.createOClass(this.ontology,
                this.ontologyService, list[i].getUri(), list[i].getClassType()));
        continue;
      }
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/OInstanceImpl.java on lines 285..290

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

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(ontologyService.hasClass(ontology.createOURI(
          list[i].getUri()))) {
          values.add(Utils.createOClass(this.ontology,
                  this.ontologyService, list[i].getUri(), list[i].getClassType()));
          continue;
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/RDFPropertyImpl.java on lines 376..380

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

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

            } catch (Exception x) {
              JOptionPane.showMessageDialog(Gaze.this,
                "Unable to load Ontology.\n"
                +"file:///"+selected.getAbsolutePath()+"\n"
                +"Due to:\n"+x.getClass()+":"+x.getMessage()
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1051..1058
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1099..1106
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1226..1233
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1271..1278
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1786..1793
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1826..1833

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

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 (null!=listArea && null!=gazList) {
                gazList.setMode(gazList.STRING_MODE);
                boolean mdfd = gazList.isModified();
                gazList.updateContent(listArea.getText());
                gazList.setModified(mdfd);
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 278..283

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

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 i = 0; i < list.size(); i++) {
      byte type = getPropertyType(ontology.createOURI(list.get(i)));
      properties.add(new Property(type, list.get(i)));
    }
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/OntologyServiceImplSesame.java on lines 1763..1766

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

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 i = 0; i < list.size(); i++) {
      byte type = getPropertyType(ontology.createOURI(list.get(i)));
      properties.add(new Property(type, list.get(i)));
    }
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/OntologyServiceImplSesame.java on lines 1713..1716

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

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

            } catch (Exception x) {
              JOptionPane.showMessageDialog(Gaze.this,
                "Unable to load linear definition (corrupted format).\n"
                +"file:///"+selected.getAbsolutePath()+"\n"
                +"Due to:\n"+x.getClass()+":"+x.getMessage()
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1051..1058
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1099..1106
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1226..1233
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1271..1278
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1786..1793
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1956..1963

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

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

            } catch (Exception x) {
              JOptionPane.showMessageDialog(Gaze.this,
                "Unable to load linear definition (corrupted format).\n"
                +"file:///"+selected.getAbsolutePath()+"\n"
                +"Due to:\n"+x.getClass()+":"+x.getMessage()
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1051..1058
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1226..1233
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1271..1278
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1786..1793
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1826..1833
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1956..1963

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

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

            } catch (Exception x) {
              JOptionPane.showMessageDialog(Gaze.this,
                "Unable to load Gazetteer List (corrupted format).\n"
                +"file:///"+selected.getAbsolutePath()+"\n"
                +"Due to:\n"+x.getClass()+":"+x.getMessage()
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1051..1058
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1099..1106
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1271..1278
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1786..1793
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1826..1833
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1956..1963

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

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

            } catch (Exception x) {
              JOptionPane.showMessageDialog(Gaze.this,
                "Unable to load linear definition (corrupted format).\n"
                +"file:///"+selected.getAbsolutePath()+"\n"
                +"Due to:\n"+x.getClass()+":"+x.getMessage()
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1051..1058
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1099..1106
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1226..1233
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1271..1278
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1826..1833
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1956..1963

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

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

        String query = "prefix omm:   <http://ikm-group.ch/archiMEO/omm#> \n"
                + "prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n"
                + "prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> \n"
                + "prefix owl:   <http://www.w3.org/2002/07/owl#> \n"
                + "CONSTRUCT {\n"
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/rules/DroolsRulesManager.java on lines 61..73

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

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

        String hugeRule = "import eu.learnpad.simulator.mon.event.GlimpseBaseEventBPMN;\n\t\t" +
                "import eu.learnpad.simulator.mon.manager.ResponseDispatcher;\n\t\t" +
                "import eu.learnpad.simulator.mon.manager.RestNotifier;\n\t\t" +
                "import eu.learnpad.simulator.mon.utils.NotifierUtils;\n\t\t" +
                "import eu.learnpad.simulator.mon.rules.DroolsRulesManager;\n\t\t" +
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/analyzer/BasicAnnotator.java on lines 86..98

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

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

    public static void notifyProcessEnd(Long processTimeStamp, ProcessEndEvent event) {
        try {
            RestNotifier.getCoreFacade().notifyProcessEndEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "ProcessStopEvent sent");
        } catch (LpRestException e) {
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 36..43
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 46..53
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 55..62
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 73..80
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 82..89
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 91..98
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..107
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 109..117

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

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

    public static void notifySimulationEnd(Long processTimeStamp, SimulationEndEvent event) {
        try {
            RestNotifier.getCoreFacade().notifySimulationEndEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "SimulationStopEvent sent");
        } catch (LpRestException e) {
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 36..43
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 55..62
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 64..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 73..80
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 82..89
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 91..98
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..107
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 109..117

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

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

    public static void notifyTaskStart(Long processTimeStamp, TaskStartEvent event) {
        try {
            RestNotifier.getCoreFacade().notifyTaskStartEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "TaskStartEvent sent");
        } catch (LpRestException e) {
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 36..43
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 46..53
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 55..62
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 64..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 82..89
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 91..98
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..107
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 109..117

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

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

    public static void notifySimulationStart(Long processTimeStamp, SimulationStartEvent event) {
        try {
            RestNotifier.getCoreFacade().notifySimulationStartEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "SimulationStartEvent sent");
        } catch (LpRestException e) {
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 46..53
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 55..62
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 64..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 73..80
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 82..89
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 91..98
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..107
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 109..117

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

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

    public static void notifyTaskFailed(Long processTimeStamp, TaskFailedEvent event) {
        try {
            RestNotifier.getCoreFacade().notifyTaskFailedEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "TaskFailedEvent sent");
        } catch (LpRestException e) {
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 36..43
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 46..53
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 55..62
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 64..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 73..80
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 91..98
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..107
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 109..117

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

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

    public static void notifyTaskEnd(Long processTimeStamp, TaskEndEvent event) {
        try {
            RestNotifier.getCoreFacade().notifyTaskEndEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "TaskEndEvent sent");
        } catch (LpRestException e) {
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 36..43
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 46..53
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 55..62
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 64..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 73..80
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 82..89
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..107
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 109..117

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

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

    public static void notifyScoreUpdate(Long processTimeStamp, ScoreUpdateEvent event)  {
        
        try {
            RestNotifier.getCoreFacade().notifyScoreUpdateEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "ScoreUpdateEvent sent");
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 36..43
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 46..53
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 55..62
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 64..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 73..80
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 82..89
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 91..98
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..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 55.

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

    public static void notifyProcessStart(Long processTimeStamp, ProcessStartEvent event) {
        try {
            RestNotifier.getCoreFacade().notifyProcessStartEvent(event);
            DebugMessages.println(TimeStamp.getCurrentTime(), RestNotifier.class.getSimpleName(), "ProcessStartEvent sent");
        } catch (LpRestException e) {
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 36..43
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 46..53
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 64..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 73..80
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 82..89
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 91..98
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 100..107
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/manager/RestNotifier.java on lines 109..117

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

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language