LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

        for(int i=0;i<transitionNodeList.getLength();i++){
            String id = transitionNodeList.item(i).getAttributes().getNamedItem("id").getNodeValue();
            float[] xy = getPNMLElementCoordinatesXY(pnmlXml, id);
            pnm.processElement(id, "t", id, xy[0], xy[1]);
        }
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNImport.java on lines 766..770

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

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 i=0;i<transitionNodeList.getLength();i++){
                String id = transitionNodeList.item(i).getAttributes().getNamedItem("id").getNodeValue();
                float[] xy = getAdoxxElementCoordinatesXY(adoxxXml, id);
                pnm.processElement(id, "t", id, xy[0], xy[1]);
            }
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNImport.java on lines 834..838

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

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

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

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

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

Refactorings

Further Reading

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

              if (null == oTree) {
                Map namesVsNodes = new HashMap();
                ClassNode root = ClassNode.createRootNode(ontology,mapping,namesVsNodes);
                OntoTreeModel model = new OntoTreeModel(root);
                MappingTreeView view = new MappingTreeView(model,mapping,Gaze.this);
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology_Tools/src/com/ontotext/gate/vr/Gaze.java on lines 1943..1950

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

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

    } else {
//      qp_hasInstanceAllFor.setBinding("yyy1", new LiteralOrONodeIDImpl(theURI));
//      qp_hasInstanceAllFor.setBinding("yyy2", new LiteralOrONodeIDImpl(theClass));
      String query = qs_hasInstanceAllFor;
      query = query.replaceAll("yyy1", theURI.toTurtle());
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/OntologyServiceImplSesame.java on lines 3160..3172

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

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

    switch (restrictionType) {
      case OConstants.CARDINALITY_RESTRICTION:
        whatValueURI = OWL.CARDINALITY;
        break;
      case OConstants.MAX_CARDINALITY_RESTRICTION:
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/OntologyServiceImplSesame.java on lines 3431..3443

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

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

        if (num>0) {
            elementsBPMN.addAll(elementsBPMNtemp);
            setAllElements(Elementstemp);
            this.Suggestion += Messages.getString("LabelingLanes.SuggestionKO",l); //$NON-NLS-1$
            this.status = false;
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/labeling/LabelingPools.java on lines 68..76
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsageLanes.java on lines 67..75
lp-model-verification/verification-component-understandability-plugin/src/main/java/eu/learnpad/verification/plugin/bpmn/guideline/impl/notationusage/ConsistentUsagePools.java on lines 72..80

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

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

    switch (restrictionType) {
      case OConstants.ALL_VALUES_FROM_RESTRICTION:
        whatValueURI = OWL.ALLVALUESFROM;
        break;
      case OConstants.HAS_VALUE_RESTRICTION:
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/sesame/OntologyServiceImplSesame.java on lines 3333..3345

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

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

    public NotificationChain basicSetATTRIBUTEPROFILES(ATTRIBUTEPROFILESType newATTRIBUTEPROFILES, NotificationChain msgs) {
        ATTRIBUTEPROFILESType oldATTRIBUTEPROFILES = aTTRIBUTEPROFILES;
        aTTRIBUTEPROFILES = newATTRIBUTEPROFILES;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.ADOXML_TYPE__ATTRIBUTEPROFILES, oldATTRIBUTEPROFILES, newATTRIBUTEPROFILES);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetTranslations(Translations newTranslations, NotificationChain msgs) {
        Translations oldTranslations = translations;
        translations = newTranslations;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XwikiPackage.PAGE_SUMMARY__TRANSLATIONS, oldTranslations, newTranslations);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetMODELS(MODELSType newMODELS, NotificationChain msgs) {
        MODELSType oldMODELS = mODELS;
        mODELS = newMODELS;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.ADOXML_TYPE__MODELS, oldMODELS, newMODELS);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetAPPLICATIONMODELS(APPLICATIONMODELSType newAPPLICATIONMODELS, NotificationChain msgs) {
        APPLICATIONMODELSType oldAPPLICATIONMODELS = aPPLICATIONMODELS;
        aPPLICATIONMODELS = newAPPLICATIONMODELS;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.ADOXML_TYPE__APPLICATIONMODELS, oldAPPLICATIONMODELS, newAPPLICATIONMODELS);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetTO(TOType newTO, NotificationChain msgs) {
        TOType oldTO = tO;
        tO = newTO;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.CONNECTOR_TYPE__TO, oldTO, newTO);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetMODELGROUPS(MODELGROUPSType newMODELGROUPS, NotificationChain msgs) {
        MODELGROUPSType oldMODELGROUPS = mODELGROUPS;
        mODELGROUPS = newMODELGROUPS;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.ADOXML_TYPE__MODELGROUPS, oldMODELGROUPS, newMODELGROUPS);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetFROM(FROMType newFROM, NotificationChain msgs) {
        FROMType oldFROM = fROM;
        fROM = newFROM;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.CONNECTOR_TYPE__FROM, oldFROM, newFROM);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetMODELATTRIBUTES(MODELATTRIBUTESType newMODELATTRIBUTES, NotificationChain msgs) {
        MODELATTRIBUTESType oldMODELATTRIBUTES = mODELATTRIBUTES;
        mODELATTRIBUTES = newMODELATTRIBUTES;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.MODEL_TYPE__MODELATTRIBUTES, oldMODELATTRIBUTES, newMODELATTRIBUTES);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetObject(eu.learnpad.transformations.metamodel_corpus.xwiki.Object newObject, NotificationChain msgs) {
        eu.learnpad.transformations.metamodel_corpus.xwiki.Object oldObject = object;
        object = newObject;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XwikiPackage.SEARCH_RESULT__OBJECT, oldObject, newObject);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetATTRIBUTEPROFILE(ATTRIBUTEPROFILEType newATTRIBUTEPROFILE, NotificationChain msgs) {
        ATTRIBUTEPROFILEType oldATTRIBUTEPROFILE = aTTRIBUTEPROFILE;
        aTTRIBUTEPROFILE = newATTRIBUTEPROFILE;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.ATTRIBUTEPROFILES_TYPE__ATTRIBUTEPROFILE, oldATTRIBUTEPROFILE, newATTRIBUTEPROFILE);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetATTRPROFDIR(ATTRPROFDIRType newATTRPROFDIR, NotificationChain msgs) {
        ATTRPROFDIRType oldATTRPROFDIR = aTTRPROFDIR;
        aTTRPROFDIR = newATTRPROFDIR;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AdoPackage.ATTRIBUTEPROFILES_TYPE__ATTRPROFDIR, oldATTRPROFDIR, newATTRPROFDIR);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 114..122

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

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

    public NotificationChain basicSetSyntaxes(Syntaxes newSyntaxes, NotificationChain msgs) {
        Syntaxes oldSyntaxes = syntaxes;
        syntaxes = newSyntaxes;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XwikiPackage.XWIKI__SYNTAXES, oldSyntaxes, newSyntaxes);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 237..245
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 280..288
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 323..331
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 366..374
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 87..95
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 130..138
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 154..162
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 197..205
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 232..240
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 639..647
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 813..821

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

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 Set<OInstance> getSameInstance() {
      String[] oInsts = ontologyService.getSameIndividualAs(this.nodeId
              .toString());
      Set<OInstance> set = new HashSet<OInstance>();
      for(int i = 0; i < oInsts.length; i++) {
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/OInstanceImpl.java on lines 138..147

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

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