LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

    public ConsistentUsageLanes(Definitions diagram, Locale l){
        super(diagram,l);
        this.l=l;
        this.id = "11"; //$NON-NLS-1$
        this.Description = Messages.getString("ConsistentUsageLanes.Description",l); //$NON-NLS-1$
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ActivityDescription.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ApplyHierarchicalStructure.java on lines 21..29
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/MinimizeGatewayHeterogeneity.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/MinimizeModelSize.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ModelLoops.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/appearence/LinearMessageFlows.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/appearence/LinearSequenceFlows.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/appearence/ProcessOrientation.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingANDGateways.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingActivities.java on lines 19..27
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingConvergingGateways.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingDataObject.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingEvents.java on lines 21..29
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingLanes.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingMessageEvent.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingPools.java on lines 22..30
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingStartandEndEvents.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingXORGateway.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LoopMarkerAnnotation.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/BalanceGateways.java on lines 23..30
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsageEndEvents.java on lines 27..35
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsagePools.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsageStartEvents.java on lines 22..30
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ExclusiveGatewayMarking.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ExplicitStartEndEvents.java on lines 21..29
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/RestrictUsageTerminateEndEvent.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/SplitAndJoinFlows.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/UsageDefaultFlows.java on lines 20..26
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/UsageInclusiveORGateways.java on lines 18..26
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/UsageMeaningfulGateways.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/explicitGateways.java on lines 26..34

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

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

    public UsageInclusiveORGateways(Definitions diagram, Locale l){
        super(diagram,l);
        this.l=l;
        this.id = "21"; //$NON-NLS-1$
        this.Description = Messages.getString("UsageInclusiveORGateways.Description",l); //$NON-NLS-1$
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ActivityDescription.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ApplyHierarchicalStructure.java on lines 21..29
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/MinimizeGatewayHeterogeneity.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/MinimizeModelSize.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ModelLoops.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/appearence/LinearMessageFlows.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/appearence/LinearSequenceFlows.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/appearence/ProcessOrientation.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingANDGateways.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingActivities.java on lines 19..27
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingConvergingGateways.java on lines 25..33
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingDataObject.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingEvents.java on lines 21..29
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingLanes.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingMessageEvent.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingPools.java on lines 22..30
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingStartandEndEvents.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingXORGateway.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LoopMarkerAnnotation.java on lines 23..31
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/BalanceGateways.java on lines 23..30
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsageEndEvents.java on lines 27..35
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsageLanes.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsagePools.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsageStartEvents.java on lines 22..30
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ExclusiveGatewayMarking.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ExplicitStartEndEvents.java on lines 21..29
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/RestrictUsageTerminateEndEvent.java on lines 24..32
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/SplitAndJoinFlows.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/UsageDefaultFlows.java on lines 20..26
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/UsageMeaningfulGateways.java on lines 20..28
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/explicitGateways.java on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void setLearnerRelativeGlobalScore(String learnerID, float learnerRelativeGlobalScore) {
         String query = " update glimpse.learner set relative_global_score = "+
                 learnerRelativeGlobalScore + ";";
     
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 482..496
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 498..512
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 521..535

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void setLearnerAbsoluteGlobalScore(String learnerID, float absoluteGlobalScore) {
         String query = " update glimpse.learner set absolute_global_score = "+
                 absoluteGlobalScore + ";";
     
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 482..496
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 505..519
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 521..535

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

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

/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
lp-core-platform/lp-cp-apis/src/main/java/eu/learnpad/ca/rest/ColloborativeContentVerifications.java on lines 1..41

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void setLearnerAbsoluteGlobalScore(String learnerID, float absoluteGlobalScore) {
         String query = " update glimpse.learner set absolute_global_score = "+
                 absoluteGlobalScore + ";";
     
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 482..496
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 498..512
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 505..519

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

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.ca.rest;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
lp-core-platform/lp-cp-apis/src/main/java/eu/learnpad/ca/rest/StaticContentVerifications.java on lines 1..60

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void setLearnerRelativeGlobalScore(String learnerID, float learnerRelativeGlobalScore) {
         String query = " update glimpse.learner set relative_global_score = "+
                 learnerRelativeGlobalScore + ";";
     
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 498..512
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 505..519
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 521..535

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

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

    protected int searchSubProcess(SubProcess sub, StringBuilder ret, int i){

        for ( FlowElement fe : sub.getFlowElements()) {
            if(fe instanceof SubProcess){
                SubProcess ssub = (SubProcess) fe;
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/ApplyHierarchicalStructure.java on lines 69..83

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

    public void setId(int newId) {
        int oldId = id;
        id = newId;
        boolean oldIdESet = idESet;
        idESet = true;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 363..370
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 418..425
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 435..442
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 481..488
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 529..536
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 330..337
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 376..383
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 700..707
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 767..774

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

    public void setMinorVersion(int newMinorVersion) {
        int oldMinorVersion = minorVersion;
        minorVersion = newMinorVersion;
        boolean oldMinorVersionESet = minorVersionESet;
        minorVersionESet = true;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 363..370
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 246..253
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 418..425
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 435..442
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 529..536
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 330..337
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 376..383
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 700..707
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 767..774

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

    public void setScore(float newScore) {
        float oldScore = score;
        score = newScore;
        boolean oldScoreESet = scoreESet;
        scoreESet = true;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 363..370
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 246..253
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 418..425
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 435..442
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 481..488
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 529..536
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 330..337
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 376..383
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 700..707

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

    public void setReplyTo(Integer newReplyTo) {
        Integer oldReplyTo = replyTo;
        replyTo = newReplyTo;
        boolean oldReplyToESet = replyToESet;
        replyToESet = true;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 363..370
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 246..253
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 435..442
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 481..488
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 529..536
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 330..337
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 376..383
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 700..707
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 767..774

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

    public void setMajorVersion(int newMajorVersion) {
        int oldMajorVersion = majorVersion;
        majorVersion = newMajorVersion;
        boolean oldMajorVersionESet = majorVersionESet;
        majorVersionESet = true;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 363..370
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 246..253
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 418..425
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 435..442
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 481..488
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 529..536
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 376..383
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 700..707
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 767..774

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

                for(int x=0;x<messegesFromEndNodeList.getLength();x++){
                    String targetType = (String) XMLUtils.execXPath(messegesFromEndNodeList.item(x), "./*[local-name()='TO' or local-name()='to']/@class", XPathConstants.STRING);
                    if(!messageFlowExcludeFromToElemList.contains(targetType))
                        isMessageEnd = true;
                }
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNImport.java on lines 434..438

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

    public void setMinorVersion(int newMinorVersion) {
        int oldMinorVersion = minorVersion;
        minorVersion = newMinorVersion;
        boolean oldMinorVersionESet = minorVersionESet;
        minorVersionESet = true;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 363..370
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 246..253
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 418..425
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 435..442
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 481..488
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 529..536
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 330..337
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 700..707
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 767..774

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

        while (resSet.hasNext()) {
            QuerySolution querySolution = resSet.next();
            Resource res = querySolution.getResource("instance");

            if (res.getURI() != null) {
lp-ontology-recommender/src/main/java/eu/learnpad/ontology/persistence/util/OntUtil.java on lines 60..68

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

        if (!elementsBPMN.isEmpty()) {
            this.Suggestion += Messages.getString("explicitGateways.SuggestionKO",l); //$NON-NLS-1$
            this.status = false;
        }else{
            this.status = true;
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/SplitAndJoinFlows.java on lines 62..68
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/UsageMeaningfulGateways.java on lines 62..68

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

    public boolean existTransition(String name){
        if(name == null || name.isEmpty())
            throw new IllegalArgumentException("ERROR: Name is empty or null");
        name = name.replaceAll("(\\W|_)+", "");
        for(TR transition:transitionList)
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/PetriNet.java on lines 348..356

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

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

                for(int x=0;x<messagesToStartNodeList.getLength();x++){
                    String sourceType = (String) XMLUtils.execXPath(messagesToStartNodeList.item(x), "./*[local-name()='FROM' or local-name()='from']/@class", XPathConstants.STRING);
                    if(!messageFlowExcludeFromToElemList.contains(sourceType))
                        isMessageStart = true;
                }
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNImport.java on lines 463..467

Duplicated Code

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

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

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

Tuning

This issue has a mass of 64.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language