LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

    public void setAPPLICATIONMODELS(APPLICATIONMODELSType newAPPLICATIONMODELS) {
        if (newAPPLICATIONMODELS != aPPLICATIONMODELS) {
            NotificationChain msgs = null;
            if (aPPLICATIONMODELS != null)
                msgs = ((InternalEObject)aPPLICATIONMODELS).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AdoPackage.ADOXML_TYPE__APPLICATIONMODELS, null, msgs);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 252..264
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 295..307
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 381..393
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 102..114
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 145..157
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 169..181
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 212..224
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 247..259
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 654..666
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 828..840
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 129..141

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

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 void setMODELGROUPS(MODELGROUPSType newMODELGROUPS) {
        if (newMODELGROUPS != mODELGROUPS) {
            NotificationChain msgs = null;
            if (mODELGROUPS != null)
                msgs = ((InternalEObject)mODELGROUPS).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AdoPackage.ADOXML_TYPE__MODELGROUPS, null, msgs);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 252..264
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 295..307
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 338..350
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 102..114
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 145..157
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 169..181
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 212..224
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 247..259
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 654..666
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 828..840
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 129..141

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

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 void setTO(TOType newTO) {
        if (newTO != tO) {
            NotificationChain msgs = null;
            if (tO != null)
                msgs = ((InternalEObject)tO).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AdoPackage.CONNECTOR_TYPE__TO, null, msgs);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 252..264
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 295..307
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 338..350
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 381..393
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 102..114
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 145..157
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 169..181
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 247..259
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 654..666
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 828..840
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 129..141

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

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

        case COL_RES_STRING:
          String resStr = "";
          if(res != null && document != null) {
            resStr = Utils.stringFor(document, res);
          }
lp-ontology-recommender/src/main/resources/gate/plugins/Tools/src/gate/qa/AnnotationDiffExporter.java on lines 343..357

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

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 void setObject(eu.learnpad.transformations.metamodel_corpus.xwiki.Object newObject) {
        if (newObject != object) {
            NotificationChain msgs = null;
            if (object != null)
                msgs = ((InternalEObject)object).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XwikiPackage.SEARCH_RESULT__OBJECT, null, msgs);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 252..264
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 295..307
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 338..350
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 381..393
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 102..114
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 145..157
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 169..181
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 212..224
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 247..259
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 654..666
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 129..141

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

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 void setATTRIBUTEPROFILE(ATTRIBUTEPROFILEType newATTRIBUTEPROFILE) {
        if (newATTRIBUTEPROFILE != aTTRIBUTEPROFILE) {
            NotificationChain msgs = null;
            if (aTTRIBUTEPROFILE != null)
                msgs = ((InternalEObject)aTTRIBUTEPROFILE).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AdoPackage.ATTRIBUTEPROFILES_TYPE__ATTRIBUTEPROFILE, null, msgs);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 252..264
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 295..307
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 338..350
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 381..393
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 102..114
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 169..181
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 212..224
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 247..259
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 654..666
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 828..840
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 129..141

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

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 void setMODELS(MODELSType newMODELS) {
        if (newMODELS != mODELS) {
            NotificationChain msgs = null;
            if (mODELS != null)
                msgs = ((InternalEObject)mODELS).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AdoPackage.ADOXML_TYPE__MODELS, null, msgs);
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 252..264
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 338..350
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ADOXMLTypeImpl.java on lines 381..393
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 102..114
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/ATTRIBUTEPROFILESTypeImpl.java on lines 145..157
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 169..181
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/CONNECTORTypeImpl.java on lines 212..224
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/MODELTypeImpl.java on lines 247..259
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageSummaryImpl.java on lines 654..666
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 828..840
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/XWikiImpl.java on lines 129..141

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

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

        case COL_KEY_STRING:
          String keyStr = "";
          if(key != null && document != null) {
            keyStr = Utils.stringFor(document, key);
          }
lp-ontology-recommender/src/main/resources/gate/plugins/Tools/src/gate/qa/AnnotationDiffExporter.java on lines 366..379

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

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<DatatypeProperty> getSetDatatypeProperties() {
      Property[] properties = ontologyService.getDatatypeProperties(
              this.nodeId.toString());
      Set<DatatypeProperty> dataProps = new HashSet<DatatypeProperty>();
      for(int i = 0; i < properties.length; i++) {
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/OInstanceImpl.java on lines 359..376

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

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<RDFProperty> getSetRDFProperties() {
      Property[] properties = ontologyService.getRDFProperties(
              this.nodeId.toString());
      Set<RDFProperty> rdfProps = new HashSet<RDFProperty>();
      for(int i = 0; i < properties.length; i++) {
lp-ontology-recommender/src/main/resources/gate/plugins/Ontology/src/gate/creole/ontology/impl/OInstanceImpl.java on lines 480..497

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case XwikiPackage.OBJECT_SUMMARY__ID:
                return getId();
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 589..618
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 623..652

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

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

    @Override
    public Vector<Path> getBPMNPaths(String idBPMN) {
        String query = "select * from path where id_bpmn = \'"+idBPMN+"';";
        Vector<Path> retrievedPath = new Vector<Path>();
        
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 79..103

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case XwikiPackage.ATTACHMENT__ID:
                return getId();
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 623..652
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 587..616

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case XwikiPackage.HISTORY_SUMMARY__PAGE_ID:
                return getPageId();
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 589..618
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 587..616

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

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

    @Override
    public Vector<Path> getBPMNPaths(String idBPMN) {
        String query = "select * from glimpse.path where id_bpmn = \'"+idBPMN+"';";
        Vector<Path> retrievedPath = new Vector<Path>();
        
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 85..109

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

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

Ext.data.DataReader.Error = Ext.extend(Ext.Error, {
    constructor : function(message, arg) {
        this.arg = arg;
        Ext.Error.call(this, message);
    },
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 269..275
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 3932..3938
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-json-debug.js on lines 433..439

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

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

Ext.data.DataProxy.Error = Ext.extend(Ext.Error, {
    constructor : function(message, arg) {
        this.arg = arg;
        Ext.Error.call(this, message);
    },
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 269..275
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 3225..3231
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-json-debug.js on lines 433..439

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

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

Ext.data.Api.Error = Ext.extend(Ext.Error, {
    constructor : function(message, arg) {
        this.arg = arg;
        Ext.Error.call(this, message);
    },
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 3225..3231
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 3932..3938
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-json-debug.js on lines 433..439

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

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

Ext.data.JsonReader.Error = Ext.extend(Ext.Error, {
    constructor : function(message, arg) {
        this.arg = arg;
        Ext.Error.call(this, message);
    },
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 269..275
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 3225..3231
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/data-foundation-debug.js on lines 3932..3938

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

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

    selectPrevious : function(keepExisting){
        if(this.hasPrevious()){
            this.selectRow(this.last-1, keepExisting);
            this.grid.getView().focusRow(this.last);
            return true;
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/pkg-grid-foundation-debug.js on lines 6048..6055

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

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