LearnPAd/learnpad

View on GitHub

Showing 1,823 of 4,261 total issues

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

                if(!ENIPrule1){
                    String rec = Messages.getString("PresentationClarity.MaxListRecomandation",language); //$NON-NLS-1$
                    Annotation rule1 = new Annotation(id,type,0,0,rec);
                    listannotation.add(rule1);
                    log.trace(rec);
lp-content-analysis/src/main/java/eu/learnpad/ca/analysis/presentation/PresentationClarity.java on lines 180..186
lp-content-analysis/src/main/java/eu/learnpad/ca/analysis/presentation/PresentationClarity.java on lines 222..228
lp-content-analysis/src/main/java/eu/learnpad/ca/analysis/presentation/PresentationClarity.java on lines 232..239
lp-content-analysis/src/main/java/eu/learnpad/ca/analysis/presentation/PresentationClarity.java on lines 251..257

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

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

        private void LoadJAPEPragmaticAmbiguity(ArrayList<String> JAPEs){
            String sep = File.separator;
            JAPEs.add("pragmaticambiguity"+sep+"annotate_pragmatic_ambiguity_names_adjective.jape");
            JAPEs.add("pragmaticambiguity"+sep+"annotate_pragmatic_ambiguity_names_alone.jape");
            JAPEs.add("pragmaticambiguity"+sep+"annotate_pragmatic_ambiguity_names_specified.jape");
lp-content-analysis/src/main/java/eu/learnpad/ca/gate/GateThread.java on lines 184..192
lp-content-analysis/src/main/java/eu/learnpad/ca/gate/GateThread.java on lines 194..202

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

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

            case ADOXX_TYPE:
                metamodel_in = "metamodels/adoxx/ado.ecore";
                metamodel_out = "metamodels/xwiki/XWIKI.ecore";
                atlStream = this.getClass().getClassLoader().getResourceAsStream(ADOXX2XWIKI_ATL_TRANSFORMATION);
                atlStreams.add(atlStream);
lp-model-transformer/src/main/java/eu/learnpad/transformations/launchers/ATLTransformationLauncher.java on lines 49..56

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetMajorVersion() {
        int oldMajorVersion = majorVersion;
        boolean oldMajorVersionESet = majorVersionESet;
        majorVersion = MAJOR_VERSION_EDEFAULT;
        majorVersionESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetScore() {
        float oldScore = score;
        boolean oldScoreESet = scoreESet;
        score = SCORE_EDEFAULT;
        scoreESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetMinorVersion() {
        int oldMinorVersion = minorVersion;
        boolean oldMinorVersionESet = minorVersionESet;
        minorVersion = MINOR_VERSION_EDEFAULT;
        minorVersionESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetObjectNumber() {
        int oldObjectNumber = objectNumber;
        boolean oldObjectNumberESet = objectNumberESet;
        objectNumber = OBJECT_NUMBER_EDEFAULT;
        objectNumberESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetMajorVersion() {
        int oldMajorVersion = majorVersion;
        boolean oldMajorVersionESet = majorVersionESet;
        majorVersion = MAJOR_VERSION_EDEFAULT;
        majorVersionESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetSize() {
        int oldSize = size;
        boolean oldSizeESet = sizeESet;
        size = SIZE_EDEFAULT;
        sizeESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

    @Override
    public InputStream getModel(String modelSetId, ModelSetType type) throws LpRestException {
        String attachmentName = String.format("%s.%s", modelSetId, type);
        String fileName = "adoxx_modelset.xml";
        java.nio.file.Path filePath = Paths.get(fileName);
lp-core-platform/lp-cp-xwiki-implementation/src/main/java/eu/learnpad/core/impl/cw/XwikiController.java on lines 153..161

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetId() {
        int oldId = id;
        boolean oldIdESet = idESet;
        id = ID_EDEFAULT;
        idESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetReplyTo() {
        Integer oldReplyTo = replyTo;
        boolean oldReplyToESet = replyToESet;
        replyTo = REPLY_TO_EDEFAULT;
        replyToESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

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

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

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

Refactorings

Further Reading

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

    public void unsetMinorVersion() {
        int oldMinorVersion = minorVersion;
        boolean oldMinorVersionESet = minorVersionESet;
        minorVersion = MINOR_VERSION_EDEFAULT;
        minorVersionESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/ObjectSummaryImpl.java on lines 543..550
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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

    @Override
    public InputStream getModel(String modelSetId, ModelSetType type) throws LpRestException {
        String attachmentName = String.format("%s.%s", modelSetId, type);
        // TODO: Adapt the name dynamically for Adoxx or MagicDraw
        String fileName = "adoxx_modelset.xml";
lp-core-platform/lp-cp-xwiki-implementation/src/main/java/eu/learnpad/core/impl/or/XwikiController.java on lines 102..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 61.

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

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

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

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

Refactorings

Further Reading

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

    public void unsetNumber() {
        int oldNumber = number;
        boolean oldNumberESet = numberESet;
        number = NUMBER_EDEFAULT;
        numberESet = false;
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/AttachmentImpl.java on lines 377..384
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 260..267
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/CommentImpl.java on lines 432..439
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 449..456
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/HistorySummaryImpl.java on lines 495..502
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 344..351
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/PageImpl.java on lines 390..397
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 714..721
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/SearchResultImpl.java on lines 781..788

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

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 (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') {
                meta.css += ' x-grid3-dirty-cell';
            }
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/pkg-grid-foundation-debug.js on lines 2329..2331

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

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 (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') {
                    meta.css += ' x-grid3-dirty-cell';
                }
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/pkg-grid-foundation-debug.js on lines 3228..3230

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

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

function fly(el){
    if(!libFlyweight){
        libFlyweight = new Ext.Element.Flyweight();
    }
    libFlyweight.dom = el;
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/prototype/ext-prototype-adapter-debug.js on lines 1741..1747

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

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(var j = 0, cj; cj = cn[j]; j++){
                    if(cj.nodeName == utag || cj.nodeName == tagName  || tagName == '*'){
                        result[++ri] = cj;
                    }
                }
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/ext-core-debug.js on lines 1439..1443

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

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

            {
                key: [Ext.EventObject.LEFT,Ext.EventObject.UP],
                fn: function(){
                    this.moveFocus('left');
                },
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 1790..1799

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

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