core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts

Summary

Maintainability
F
1 mo
Test Coverage

File exploration-warnings.service.spec.ts has 2267 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

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

            Hola: {
              classifier_model_id: null,
              solicit_answer_details: false,
              card_is_checkpoint: true,
              linked_skill_id: null,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 862..930

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

    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

              State: {
                classifier_model_id: null,
                solicit_answer_details: false,
                card_is_checkpoint: false,
                linked_skill_id: null,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 534..602

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

    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

        explorationStatesService.init(
          {
            Hola: {
              classifier_model_id: null,
              solicit_answer_details: false,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 107..173

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

    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

        explorationStatesService.init(
          {
            Hola: {
              classifier_model_id: null,
              solicit_answer_details: false,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 985..1051

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

    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

              State3: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State1: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State1: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State2: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State3: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State4: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State2: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State4: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State7: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State6: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State5: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2029..2079

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

    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

              State5: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1293..1343
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1344..1394
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1395..1445
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1446..1496
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1497..1547
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1548..1598
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1599..1649
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1825..1875
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1876..1926
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1927..1977
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1978..2028

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

    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

              interaction: {
                confirmed_unclassified_answers: [],
                solution: null,
                id: 'TextInput',
                answer_groups: [
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2093..2140

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

    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

                interaction: {
                  confirmed_unclassified_answers: [],
                  solution: null,
                  id: 'TextInput',
                  answer_groups: [
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1087..1134

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

    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

              End: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: false,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1650..1694

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

    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

              End: {
                classifier_model_id: null,
                solicit_answer_details: false,
                linked_skill_id: null,
                card_is_checkpoint: true,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2210..2254

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

    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

                  answer_groups: [
                    {
                      rule_specs: [],
                      training_data: [],
                      tagged_skill_misconception_id: null,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 234..269
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1775..1810

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

    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

                answer_groups: [
                  {
                    rule_specs: [],
                    training_data: [],
                    tagged_skill_misconception_id: null,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 1775..1810
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2159..2194

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

    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

                  answer_groups: [
                    {
                      rule_specs: [],
                      training_data: [],
                      tagged_skill_misconception_id: null,
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 234..269
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 2159..2194

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

    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

    class MockExplorationParamChangesService {
      savedMemento = [
        {
          customizationArgs: {
            parse_with_jinja: false,
    core/templates/pages/exploration-editor-page/services/parameter-metadata.service.spec.ts on lines 27..53

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

    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

        expect(explorationWarningsService.getWarnings()).toEqual([
          {
            type: 'critical',
            message:
              'Please ensure the value of parameter "ParamChange2"' +
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 176..200
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 624..648

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

    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

        expect(explorationWarningsService.getWarnings()).toEqual([
          {
            type: 'critical',
            message:
              'Please ensure the value of parameter "ParamChange2" is' +
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 491..515
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 624..648

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

    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

        expect(explorationWarningsService.getWarnings()).toEqual([
          {
            type: 'critical',
            message:
              'Please ensure the value of parameter "ParamChange2" is' +
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 176..200
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 491..515

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

    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

        expect(explorationWarningsService.getWarnings()).toEqual([
          {
            type: 'critical',
            message:
              'Please ensure the value of parameter "ParamChange2" is set' +
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 749..772

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

    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

          expect(explorationWarningsService.getWarnings()).toEqual([
            {
              type: 'critical',
              message:
                'Please ensure the value of parameter "ParamChange2" is set' +
    core/templates/pages/exploration-editor-page/services/exploration-warnings.service.spec.ts on lines 304..327

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

    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

    There are no issues that match your filters.

    Category
    Status