LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

        initEAttribute(getINSTANCEType_Group(), ecorePackage.getEFeatureMapEntry(), "group", null, 0, -1, INSTANCEType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1693..1693
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1703..1703
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1716..1716
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1775..1775
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1812..1812
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2568..2568

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

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(BPUtils.existBPMNObject(pn, bpFromObjectId)){
                pnFromObjectIdList = BPUtils.getPNIdsFromBPMNId(pn, bpFromObjectId);
            }else{
                if(pn.existPlace(bpFromObjectId))
                    pnFromObjectIdList = new String[]{bpFromObjectId};
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/verifier/Engine.java on lines 102..107
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/verifier/Engine.java on lines 149..154

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

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

    public static byte[] readFile(File file) throws Exception{
        RandomAccessFile raf = new RandomAccessFile(file, "r");
        byte[] ret = new byte[(int)raf.length()];
        raf.read(ret);
        raf.close();
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/utils/IOUtils.java on lines 45..51
lp-model-verification/verification-component/src/main/java/eu/learnpad/verification/utils/IOUtils.java on lines 43..49

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

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

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

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

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

Refactorings

Further Reading

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

        initEAttribute(getCONNECTORType_Group(), ecorePackage.getEFeatureMapEntry(), "group", null, 0, -1, CONNECTORType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1693..1693
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1703..1703
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1754..1754
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1775..1775
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1812..1812
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2568..2568

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

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

        initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1725..1725
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2417..2417
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2418..2418

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

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

        initEReference(getPageSummary_Translations(), this.getTranslations(), null, "translations", null, 1, 1, PageSummary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1669..1669
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1670..1670
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1671..1671
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1672..1672
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1689..1689
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1690..1690
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1714..1714
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1715..1715
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1797..1797
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2550..2550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2594..2594

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

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

        initEReference(getCONNECTORType_TO(), this.getTOType(), null, "tO", null, 1, 1, CONNECTORType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1669..1669
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1670..1670
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1671..1671
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1672..1672
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1689..1689
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1690..1690
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1714..1714
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1797..1797
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2521..2521
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2550..2550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2594..2594

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

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

        initEReference(getSearchResult_Object(), this.getObject(), null, "object", null, 0, 1, SearchResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1669..1669
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1670..1670
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1671..1671
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1672..1672
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1689..1689
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1690..1690
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1714..1714
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1715..1715
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1797..1797
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2521..2521
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2594..2594

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

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

        initEReference(getADOXMLType_APPLICATIONMODELS(), this.getAPPLICATIONMODELSType(), null, "aPPLICATIONMODELS", null, 0, 1, ADOXMLType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1669..1669
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1670..1670
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1672..1672
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1689..1689
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1690..1690
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1714..1714
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1715..1715
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1797..1797
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2521..2521
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2550..2550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2594..2594

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

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

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

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

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

Refactorings

Further Reading

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

        initEAttribute(getSyntaxes_Syntax(), theXMLTypePackage.getString(), "syntax", null, 0, -1, Syntaxes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1693..1693
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1703..1703
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1716..1716
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1754..1754
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1775..1775
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1812..1812

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

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

    public static float relativeGlobal(Vector<Float> relativeBPScoreExecutedByUser) {
        float relativeGlobal = 0;
        for (int i = 0; i<relativeBPScoreExecutedByUser.size(); i++) {
            relativeGlobal += relativeBPScoreExecutedByUser.get(i);
        }
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 20..26
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 44..50
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 60..66
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 68..74

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

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

        initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1725..1725
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1726..1726
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2417..2417

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

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

        initEReference(getXWiki_Syntaxes(), this.getSyntaxes(), null, "syntaxes", null, 1, 1, XWiki.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1669..1669
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1670..1670
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1671..1671
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1672..1672
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1689..1689
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1690..1690
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1714..1714
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1715..1715
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1797..1797
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2521..2521
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2550..2550

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

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

        initEReference(getCONNECTORType_FROM(), this.getFROMType(), null, "fROM", null, 1, 1, CONNECTORType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1669..1669
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1670..1670
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1671..1671
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1672..1672
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1689..1689
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1690..1690
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1715..1715
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1797..1797
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2521..2521
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2550..2550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2594..2594

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

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(BPUtils.existBPMNObject(pn, bpToObjectId)){
                pnToObjectIdList = BPUtils.getPNIdsFromBPMNId(pn, bpToObjectId);
            }else{
                if(pn.existPlace(bpToObjectId))
                    pnToObjectIdList = new String[]{bpToObjectId};
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/verifier/Engine.java on lines 102..107
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/verifier/Engine.java on lines 139..144

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

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

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

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

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

Refactorings

Further Reading

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

        initEAttribute(getATTRIBUTEPROFILEType_Group(), ecorePackage.getEFeatureMapEntry(), "group", null, 0, -1, ATTRIBUTEPROFILEType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1703..1703
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1716..1716
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1754..1754
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1775..1775
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/AdoPackageImpl.java on lines 1812..1812
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2568..2568

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

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

    public static byte[] readFile(File file) throws Exception{
        RandomAccessFile raf = new RandomAccessFile(file, "r");
        byte[] ret = new byte[(int)raf.length()];
        raf.read(ret);
        raf.close();
lp-model-verification/lp-verification-component/src/main/java/eu/learnpad/verificationComponent/utils/IOUtils.java on lines 47..53
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/utils/IOUtils.java on lines 45..51

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

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

    public static float learnerRelativeGlobal(Vector<Float> learnerRelativeBPScores) {
        float relativeGlobal = 0;
        for(int i = 0; i<learnerRelativeBPScores.size(); i++) {
            relativeGlobal += learnerRelativeBPScores.get(i);
        }
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 20..26
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 44..50
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 52..58
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/utils/ComputeLearnerScore.java on lines 60..66

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

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

        initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XwikiPackageImpl.java on lines 2416..2416

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

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

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

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

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

Refactorings

Further Reading

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

            for(int i=0;i<currentMark.length;i++)
                if(currentMark[i]!=0)
                    places += placeList.get(i).name+" ";
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/modelcheckers/LOLA.java on lines 140..142

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

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