LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

    if(index >= 0) {
      aValue = aName.substring(index + 1, aName.length());
    }
    else {
      aValue = aName;
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewer.java on lines 395..400
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewer.java on lines 498..503

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    public SimpleRobotFactory(RepositoryService repositoryService,
            TaskService taskService, AbstractFormHandler formHandler) {
        super();
        this.repositoryService = repositoryService;
        this.taskService = taskService;
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/datastructures/LearnPadTaskSubmissionResult.java on lines 39..45
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/monitoring/event/AbstractSimEvent.java on lines 60..66
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/robot/RobotUserEventReceiver.java on lines 63..71
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/TaskServlet.java on lines 77..83
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 68..74
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 97..103
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 137..143
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/msg/userchat/send/ReceiveMsg.java on lines 43..48

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

        try {
            httpClient.executeMethod(getMethod);
            String url = getMethod.getResponseBodyAsString();
            return url;
        } catch (IOException e) {
lp-core-platform/lp-cp-xwiki-implementation/src/main/java/eu/learnpad/core/impl/cw/XwikiCoreFacadeRestResource.java on lines 348..354
lp-core-platform/lp-cp-xwiki-implementation/src/main/java/eu/learnpad/core/impl/cw/XwikiCoreFacadeRestResource.java on lines 459..465

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

      if(index >= 0) {
        aValue = aName.substring(index + 1, aName.length());
      }
      else {
        aValue = aName;
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewer.java on lines 294..299
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewer.java on lines 395..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 40.

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void notifySimulationStartEvent(SimulationStartEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/simulationstart",RestResource.REST_URI);
        sendEvent(httpClient, event, uri);
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 59..64
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 66..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 73..78
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 80..85
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 87..92
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 94..99
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 101..106
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 108..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void notifyTaskStartEvent(TaskStartEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/taskstart",RestResource.REST_URI);
        sendEvent(httpClient, event, uri);            
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 52..57
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 59..64
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 66..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 73..78
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 87..92
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 94..99
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 101..106
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 108..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public Vector<Path> savePathsForBPMN(Vector<Path> vector) {

        for (int i = 0; i<vector.size(); i++) {
            savePath(vector.get(i));
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 448..455

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

        try {
            httpClient.executeMethod(getMethod);
            String url = getMethod.getResponseBodyAsString();
            return url;
        } catch (IOException e) {
lp-core-platform/lp-cp-xwiki-implementation/src/main/java/eu/learnpad/core/impl/cw/XwikiCoreFacadeRestResource.java on lines 328..334
lp-core-platform/lp-cp-xwiki-implementation/src/main/java/eu/learnpad/core/impl/cw/XwikiCoreFacadeRestResource.java on lines 348..354

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    if(index >= 0) {
      aValue = aName.substring(index + 1, aName.length());
    }
    else {
      aValue = aName;
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewer.java on lines 294..299
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewer.java on lines 498..503

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void notifyProcessStartEvent(ProcessStartEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/processstart",RestResource.REST_URI);
        sendEvent(httpClient, event, uri);            
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 52..57
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 59..64
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 73..78
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 80..85
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 87..92
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 94..99
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 101..106
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 108..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void notifyScoreUpdateEvent(ScoreUpdateEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/scoreupdate",RestResource.REST_URI);
        sendEvent(httpClient, event, uri);            
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 52..57
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 59..64
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 66..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 73..78
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 80..85
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 87..92
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 94..99
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 101..106

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

                                "receives:\n" +
                                "eventData: " + receivedEvent.getEventData() + "\n" +
                                "eventName: " + receivedEvent.getEventName() + "\n" +
                                "timestamp: " + receivedEvent.getTimeStamp());
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/impl/ComplexEventProcessorImpl.java on lines 160..163

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    } finally {
      if(is != null) {
        try {
          is.close();
        } catch(Exception ex) {
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/AbstractOntologyImplSesame.java on lines 252..260

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

              try {
                ontology = OntologyUtilities.getOntology(ourl);
                ontology.addOntologyModificationListener(Gaze.this);
              } catch (ResourceInstantiationException x) {
                x.printStackTrace(Err.getPrintWriter());
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 416..421

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

                                "receives:\n" +
                                "eventData: " + receivedEvent.getEventData() + "\n" +
                                "eventName: " + receivedEvent.getEventName() + "\n" +
                                "timestamp: " + receivedEvent.getTimeStamp() + "\n" +
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/impl/ComplexEventProcessorImpl.java on lines 168..171

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

        public UIProcessSocket(IProcessManager userEventReceiver,
                IUserHandler uiHandler, IFormHandler formHandler) {
            super();
            this.userEventReceiver = userEventReceiver;
            this.uiHandler = uiHandler;
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/datastructures/LearnPadTaskSubmissionResult.java on lines 39..45
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/monitoring/event/AbstractSimEvent.java on lines 60..66
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/robot/RobotUserEventReceiver.java on lines 63..71
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/robot/activiti/simplerobot/SimpleRobotFactory.java on lines 47..53
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/TaskServlet.java on lines 77..83
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 68..74
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 97..103
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/msg/userchat/send/ReceiveMsg.java on lines 43..48

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    public RobotUserEventReceiver(
            IRobotFactory<TaskInput, Map<String, Object>> robotFactory,
            IRobotInputExtractor<TaskInput> inputExtractor,
            IProcessManager processManager) {
        super();
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/datastructures/LearnPadTaskSubmissionResult.java on lines 39..45
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/monitoring/event/AbstractSimEvent.java on lines 60..66
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/robot/activiti/simplerobot/SimpleRobotFactory.java on lines 47..53
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/TaskServlet.java on lines 77..83
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 68..74
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 97..103
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/UIProcessServlet.java on lines 137..143
lp-simulation-environment/simulator/src/main/java/eu/learnpad/simulator/uihandler/webserver/msg/userchat/send/ReceiveMsg.java on lines 43..48

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void notifySimulationEndEvent(SimulationEndEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/simulationend",RestResource.REST_URI);
        sendEvent(httpClient, event, uri);        
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 52..57
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 66..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 73..78
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 80..85
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 87..92
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 94..99
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 101..106
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 108..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void notifySessionScoreUpdateEvent(SessionScoreUpdateEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/sessionscoreupdate",RestResource.REST_URI);
        sendEvent(httpClient, event, uri);    
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 52..57
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 59..64
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 66..71
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 73..78
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 80..85
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 87..92
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 94..99
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/api/impl/SimulatorMonCoreFacadeRESTResource.java on lines 108..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    while(q.hasNext()) {
      Value v = q.nextFirstAsValue();
      properties.add (
              Utils.createOProperty(ontology,
                this, v.toString(),OConstants.DATATYPE_PROPERTY)
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/OntologyServiceImplSesame.java on lines 2643..2649

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language