LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

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

        } catch (LpRestException ex) {
            Logger.getLogger(KPILoader.class.getName()).log(Level.SEVERE, "Calling corefacade pushKPIValues failed. ", ex);
            this.notifier.notifyProcessingStatus(this.computationProcessID, KBProcessingStatusType.ABORTED);
        } catch (IOException ex) {
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/kpi/dashboard/KPILoader.java on lines 89..92
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/kpi/dashboard/KPILoader.java on lines 95..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 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 3 locations. Consider refactoring.
Open

        } catch (IOException ex) {
            Logger.getLogger(KPILoader.class.getName()).log(Level.SEVERE, "Error when loading KPI data file. ", ex);
            this.notifier.notifyProcessingStatus(this.computationProcessID, KBProcessingStatusType.ABORTED);
        } catch (InvalidFormatException ex) {
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/kpi/dashboard/KPILoader.java on lines 89..92
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/kpi/dashboard/KPILoader.java on lines 92..95

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

  public AnnotationProperty getAnnotationProperty(OURI theURI) {
    if(ontologyService.isAnnotationProperty(theURI)) {
      return (AnnotationProperty) Utils.createOProperty(this,ontologyService,
          theURI.toString(), OConstants.ANNOTATION_PROPERTY);
    } else {
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/AbstractOntologyImpl.java on lines 1069..1076
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/AbstractOntologyImpl.java on lines 1077..1084

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

  public DatatypeProperty getDatatypeProperty(OURI theURI) {
    if(ontologyService.isDatatypeProperty(theURI)) {
      return (DatatypeProperty) Utils.createOProperty(this,ontologyService,
          theURI.toString(), OConstants.DATATYPE_PROPERTY);
    } else {
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/AbstractOntologyImpl.java on lines 1061..1068
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/AbstractOntologyImpl.java on lines 1077..1084

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

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

    @Override
    public void notifyTaskEndEvent(TaskEndEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/taskend",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 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 notifyTaskFailedEvent(TaskFailedEvent event) throws LpMonRestException {
        HttpClient httpClient = RestResource.getClient();
        String uri = String.format("%s/taskfailed",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 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 3 locations. Consider refactoring.
Open

        } catch (RecommenderException ex) {
            Logger.getLogger(KPILoader.class.getName()).log(Level.SEVERE, "KPI assessment failed. ", ex);
            this.notifier.notifyProcessingStatus(this.computationProcessID, KBProcessingStatusType.ABORTED);
        } catch (LpRestException ex) {
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/kpi/dashboard/KPILoader.java on lines 92..95
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/kpi/dashboard/KPILoader.java on lines 95..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 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 3 locations. Consider refactoring.
Open

  public ObjectProperty getObjectProperty(OURI theURI) {
    if(ontologyService.isObjectProperty(theURI)) {
      return (ObjectProperty) Utils.createOProperty(this,ontologyService,
          theURI.toString(), OConstants.OBJECT_PROPERTY);
    } else {
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/AbstractOntologyImpl.java on lines 1061..1068
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/AbstractOntologyImpl.java on lines 1069..1076

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(types != null) {
          Iterator iter = types.iterator();
          while(iter.hasNext()) {
            annotationTypesCB.addItem((String)iter.next());
          }
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewerOptions.java on lines 361..366
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/gate/creole/ontology/ocat/OntologyViewerOptions.java on lines 587..592

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

            offsetEl.setAttribute("y", (Float.valueOf(place.y).intValue()+Float.valueOf(place.h).intValue()+5)+"");
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNExport.java on lines 110..110

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

package eu.learnpad.or.rest.data;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

lp-core-platform/lp-cp-apis/src/main/java/eu/learnpad/or/rest/data/ResourceType.java on lines 1..28

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

            for(PL pl:transition.getNextList_safe())
                ret += pl.name + ": " + pn.getConnection(transition, pl).weight + ", ";
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNExport.java on lines 277..278

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

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
lp-core-platform/lp-cp-apis/src/main/java/eu/learnpad/or/rest/data/NotificationActionType.java on lines 1..23

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

        if (!theFile.exists()) {
          JOptionPane.showMessageDialog(instance,
              new JLabel("The ontology file " + theFile.getAbsolutePath() + " was not found"),
              "Error",
              JOptionPane.ERROR_MESSAGE);
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/GUILoadOptionsPane.java on lines 293..299

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

                            for (SequenceFlow sequenceFlow : out) {
                                if(sequenceFlow.getTargetRef() instanceof Gateway){
                                    outg=(Gateway) sequenceFlow.getTargetRef();
                                    outgateway = true;
                                }
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ModelLoops.java on lines 65..70

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

    public Recommendations getRecommendations(String modelSetId,
            String artifactId, String userId) {
        try {
            return this.cwBridge.getRecommendations(modelSetId, artifactId,
                    userId);
lp-collaborative-workspace/lp-cw-component/lp-cw-component-service/src/main/java/eu/learnpad/cw/service/script/LearnpadScriptService.java on lines 151..160

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

                                for (SequenceFlow sequenceFlow : in) {
                                    if(sequenceFlow.getSourceRef() instanceof Gateway){
                                        ing=(Gateway) sequenceFlow.getSourceRef();
                                        ingateway = true;
                                    }
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ModelLoops.java on lines 58..63

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