mangroveorg/datawinners

View on GitHub
datawinners/main/ut_couch_fixtures.py

Summary

Maintainability
F
1 mo
Test Coverage

File ut_couch_fixtures.py has 1427 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta

from django.contrib.auth.models import User
Severity: Major
Found in datawinners/main/ut_couch_fixtures.py - About 3 days to fix

    Function load_sms_data_for_cli001 has 267 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def load_sms_data_for_cli001(manager):
        FEB = datetime(2011, 02, 28, hour=12, minute=00, second=00, tzinfo=UTC)
        MARCH = datetime(2011, 03, 01, tzinfo=UTC)
        DEC_2010 = datetime(2010, 12, 28, hour=00, minute=00, second=59, tzinfo=UTC)
        NOV_2010 = datetime(2010, 11, 26, hour=23, minute=59, second=59, tzinfo=UTC)
    Severity: Major
    Found in datawinners/main/ut_couch_fixtures.py - About 1 day to fix

      Function load_data has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def load_data():
          manager = load_manager_for_default_ut_account()
          initializer.run(manager)
          CLINIC_ENTITY_TYPE = [u"clinic"]
          WATER_POINT_ENTITY_TYPE = [u"waterpoint"]
      Severity: Major
      Found in datawinners/main/ut_couch_fixtures.py - About 2 hrs to fix

        Function load_sms_data_for_cli018 has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def load_sms_data_for_cli018(manager):
            JAN = datetime(2011, 01, 05, hour=12, minute=00, second=00, tzinfo=UTC)
            FEB = datetime(2011, 02, 28, hour=12, minute=00, second=00, tzinfo=UTC)
            MARCH = datetime(2011, 03, 11, tzinfo=UTC)
            APR = datetime(2011, 04, 01, tzinfo=UTC)
        Severity: Minor
        Found in datawinners/main/ut_couch_fixtures.py - About 1 hr to fix

          Function create_clinic_projects has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def create_clinic_projects(entity_type, manager):
              organization = Organization.objects.get(pk='SLX364903')
              Reminder.objects.filter(organization=organization).delete()
              questions = create_questions(entity_type)
          
          
          Severity: Minor
          Found in datawinners/main/ut_couch_fixtures.py - About 1 hr to fix

            Function register_datasender_for_org has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def register_datasender_for_org(email,name,mobile_number,location,short_code,gps):
            Severity: Minor
            Found in datawinners/main/ut_couch_fixtures.py - About 45 mins to fix

              Function load_clinic_entities has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def load_clinic_entities(CLINIC_ENTITY_TYPE, manager):
                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'MP', 'Bhopal'], short_code="cid001",
                                             geometry={"type": "Point", "coordinates": [23.2833, 77.35]},
                                             name="Test", firstname="Bhopal Clinic", mobile_number="123456")
                  e.set_aggregation_path("governance", ['India', 'MP', 'Bhopal'])
              Severity: Minor
              Found in datawinners/main/ut_couch_fixtures.py - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function load_data has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def load_data():
                  manager = load_manager_for_default_ut_account()
                  initializer.run(manager)
                  CLINIC_ENTITY_TYPE = [u"clinic"]
                  WATER_POINT_ENTITY_TYPE = [u"waterpoint"]
              Severity: Minor
              Found in datawinners/main/ut_couch_fixtures.py - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

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

              def create_project12(manager, questions):
                  questionnaire12 = Project(manager, name="Clinic DS W/O Submission (That)",
                                              form_code="cli012",
                                              fields=questions, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 5 other locations - About 2 days to fix
              datawinners/main/ut_couch_fixtures.py on lines 283..317
              datawinners/main/ut_couch_fixtures.py on lines 320..354
              datawinners/main/ut_couch_fixtures.py on lines 431..467
              datawinners/main/ut_couch_fixtures.py on lines 470..506
              datawinners/main/ut_couch_fixtures.py on lines 509..544

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

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

              def create_project15(manager, questions):
                  questionnaire15 = Project(manager, name="Clinic All DS Monthly Submission (following)",
                                              form_code="cli015",
                                              fields=questions, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 5 other locations - About 2 days to fix
              datawinners/main/ut_couch_fixtures.py on lines 283..317
              datawinners/main/ut_couch_fixtures.py on lines 320..354
              datawinners/main/ut_couch_fixtures.py on lines 393..428
              datawinners/main/ut_couch_fixtures.py on lines 431..467
              datawinners/main/ut_couch_fixtures.py on lines 470..506

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

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

              def create_project10(manager, questions):
                  questionnaire10 = Project(manager, name="Clinic DS W/O Submission (Following)",
                                              form_code="cli010",
                                              fields=questions, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 5 other locations - About 2 days to fix
              datawinners/main/ut_couch_fixtures.py on lines 283..317
              datawinners/main/ut_couch_fixtures.py on lines 393..428
              datawinners/main/ut_couch_fixtures.py on lines 431..467
              datawinners/main/ut_couch_fixtures.py on lines 470..506
              datawinners/main/ut_couch_fixtures.py on lines 509..544

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

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

              def create_project14(manager, questions):
                  questionnaire14 = Project(manager, name="Clinic DS W/O Monthly Submission (following)",
                                              form_code="cli014",
                                              fields=questions, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 5 other locations - About 2 days to fix
              datawinners/main/ut_couch_fixtures.py on lines 283..317
              datawinners/main/ut_couch_fixtures.py on lines 320..354
              datawinners/main/ut_couch_fixtures.py on lines 393..428
              datawinners/main/ut_couch_fixtures.py on lines 431..467
              datawinners/main/ut_couch_fixtures.py on lines 509..544

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

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

              def create_project13(manager, questions):
                  questionnaire13 = Project(manager, name="clinic13 test project",
                                              form_code="cli013",
                                              fields=questions, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 5 other locations - About 2 days to fix
              datawinners/main/ut_couch_fixtures.py on lines 283..317
              datawinners/main/ut_couch_fixtures.py on lines 320..354
              datawinners/main/ut_couch_fixtures.py on lines 393..428
              datawinners/main/ut_couch_fixtures.py on lines 470..506
              datawinners/main/ut_couch_fixtures.py on lines 509..544

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

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

              def create_project11(manager, questions):
                  questionnaire11 = Project(manager, name="Clinic All DS (Following)",
                                              form_code="cli011",
                                              fields=questions, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 5 other locations - About 2 days to fix
              datawinners/main/ut_couch_fixtures.py on lines 320..354
              datawinners/main/ut_couch_fixtures.py on lines 393..428
              datawinners/main/ut_couch_fixtures.py on lines 431..467
              datawinners/main/ut_couch_fixtures.py on lines 470..506
              datawinners/main/ut_couch_fixtures.py on lines 509..544

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

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

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

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

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

              Refactorings

              Further Reading

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

              def create_project3(manager, questions):
                  questionnaire3 = Project(manager, name="clinic3 test project",
                                             form_code="cli003",
                                             fields=questions, goals="This project is for automation",
                                             devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 6 other locations - About 4 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 231..241
              datawinners/main/ut_couch_fixtures.py on lines 244..254
              datawinners/main/ut_couch_fixtures.py on lines 257..267
              datawinners/main/ut_couch_fixtures.py on lines 270..280
              datawinners/main/ut_couch_fixtures.py on lines 586..596
              datawinners/main/ut_couch_fixtures.py on lines 599..609

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 78.

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

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

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

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

              Refactorings

              Further Reading

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

              def create_project17(manager, questions_):
                  questionnaire17 = Project(manager, name="Clinic17 Test Project",
                                              form_code="cli017",
                                              fields=questions_, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 6 other locations - About 4 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 218..228
              datawinners/main/ut_couch_fixtures.py on lines 231..241
              datawinners/main/ut_couch_fixtures.py on lines 244..254
              datawinners/main/ut_couch_fixtures.py on lines 257..267
              datawinners/main/ut_couch_fixtures.py on lines 270..280
              datawinners/main/ut_couch_fixtures.py on lines 599..609

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 78.

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

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

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

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

              Refactorings

              Further Reading

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

              def create_project5(manager, questions):
                  questionnaire5 = Project(manager, name="clinic5 test project",
                                             form_code="cli005",
                                             fields=questions, goals="This project is for automation",
                                             devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 6 other locations - About 4 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 218..228
              datawinners/main/ut_couch_fixtures.py on lines 231..241
              datawinners/main/ut_couch_fixtures.py on lines 257..267
              datawinners/main/ut_couch_fixtures.py on lines 270..280
              datawinners/main/ut_couch_fixtures.py on lines 586..596
              datawinners/main/ut_couch_fixtures.py on lines 599..609

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 78.

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

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

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

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

              Refactorings

              Further Reading

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

              def create_project7(manager, questions):
                  questionnaire7 = Project(manager, name="Clinic7 Test Project",
                                             form_code="cli007",
                                             fields=questions, goals="This project is for automation",
                                             devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 6 other locations - About 4 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 218..228
              datawinners/main/ut_couch_fixtures.py on lines 231..241
              datawinners/main/ut_couch_fixtures.py on lines 244..254
              datawinners/main/ut_couch_fixtures.py on lines 257..267
              datawinners/main/ut_couch_fixtures.py on lines 586..596
              datawinners/main/ut_couch_fixtures.py on lines 599..609

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 78.

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

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

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

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

              Refactorings

              Further Reading

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

              def create_project6(manager, questions):
                  questionnaire6 = Project(manager, name="Clinic6 Test Project",
                                             form_code="cli006",
                                             fields=questions, goals="This project is for automation",
                                             devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 6 other locations - About 4 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 218..228
              datawinners/main/ut_couch_fixtures.py on lines 231..241
              datawinners/main/ut_couch_fixtures.py on lines 244..254
              datawinners/main/ut_couch_fixtures.py on lines 270..280
              datawinners/main/ut_couch_fixtures.py on lines 586..596
              datawinners/main/ut_couch_fixtures.py on lines 599..609

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 78.

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

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

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

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

              Refactorings

              Further Reading

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

              def create_project4(manager, questions):
                  questionnaire4 = Project(manager, name="Clinic4 Test Project",
                                             form_code="cli004",
                                             fields=questions, goals="This project is for automation",
                                             devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 6 other locations - About 4 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 218..228
              datawinners/main/ut_couch_fixtures.py on lines 244..254
              datawinners/main/ut_couch_fixtures.py on lines 257..267
              datawinners/main/ut_couch_fixtures.py on lines 270..280
              datawinners/main/ut_couch_fixtures.py on lines 586..596
              datawinners/main/ut_couch_fixtures.py on lines 599..609

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 78.

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

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

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

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

              Refactorings

              Further Reading

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

              def create_project18(manager, questions_):
                  questionnaire18 = Project(manager, name="Test data sorting",
                                              form_code="cli018",
                                              fields=questions_, goals="This project is for automation",
                                              devices=["sms", "web", "smartPhone"], sender_group="close"
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 6 other locations - About 4 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 218..228
              datawinners/main/ut_couch_fixtures.py on lines 231..241
              datawinners/main/ut_couch_fixtures.py on lines 244..254
              datawinners/main/ut_couch_fixtures.py on lines 257..267
              datawinners/main/ut_couch_fixtures.py on lines 270..280
              datawinners/main/ut_couch_fixtures.py on lines 586..596

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 78.

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

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

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

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

              Refactorings

              Further Reading

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "261332592634"),
                               (NAME_FIELD, "David"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Haute matsiatra', u'Ambohimahasoa', u'Camp Robin']),
                               (SHORT_CODE_FIELD, "rep2"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[
                               (MOBILE_NUMBER_FIELD, "1234567890"),
                               (NAME_FIELD, "Shweta"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "917798987102"),
                               (NAME_FIELD, "AkshaY"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep7"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "2619876"),
                               (NAME_FIELD, "stefan"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep10"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "1234567891"),
                               (NAME_FIELD, "Shilpa"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep3"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "919970059125"),
                               (NAME_FIELD, "Ritesh"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep5"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "2619875"),
                               (NAME_FIELD, "mamy"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep11"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "917798987116"),
                               (NAME_FIELD, "RiteshY"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep6"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "37287364782"),
                               (NAME_FIELD, "Datasender test"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep13"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "1234567892"),
                               (NAME_FIELD, "Asif"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep4"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1437..1446
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

                  register(manager, entity_type=REPORTER_ENTITY_TYPE,
                           data=[(MOBILE_NUMBER_FIELD, "919049008976"),
                               (NAME_FIELD, "Ashwini"),
                               (LOCATION_TYPE_FIELD_NAME, [u'Madagascar', u'Menabe', u'Mahabo', u'Beronono']),
                               (SHORT_CODE_FIELD, "rep8"),
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 10 other locations - About 3 hrs to fix
              datawinners/main/ut_couch_fixtures.py on lines 1366..1376
              datawinners/main/ut_couch_fixtures.py on lines 1377..1386
              datawinners/main/ut_couch_fixtures.py on lines 1387..1396
              datawinners/main/ut_couch_fixtures.py on lines 1397..1406
              datawinners/main/ut_couch_fixtures.py on lines 1407..1416
              datawinners/main/ut_couch_fixtures.py on lines 1417..1426
              datawinners/main/ut_couch_fixtures.py on lines 1427..1436
              datawinners/main/ut_couch_fixtures.py on lines 1447..1456
              datawinners/main/ut_couch_fixtures.py on lines 1457..1466
              datawinners/main/ut_couch_fixtures.py on lines 1478..1487

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

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

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

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

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

              Refactorings

              Further Reading

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

                  last_week_date = str(LAST_WEEK.day) + "." + str(LAST_WEEK.month) + "." + str(LAST_WEEK.year)
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 4 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1009..1009
              datawinners/main/ut_couch_fixtures.py on lines 1091..1091
              datawinners/main/ut_couch_fixtures.py on lines 1154..1154
              datawinners/main/ut_couch_fixtures.py on lines 1217..1217

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

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

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

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

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

              Refactorings

              Further Reading

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

                  today_date = str(today.day) + "." + str(today.month) + "." + str(today.year)
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 4 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1043..1043
              datawinners/main/ut_couch_fixtures.py on lines 1091..1091
              datawinners/main/ut_couch_fixtures.py on lines 1154..1154
              datawinners/main/ut_couch_fixtures.py on lines 1217..1217

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

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

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

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

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

              Refactorings

              Further Reading

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

                  today_date = str(today.day) + "." + str(today.month) + "." + str(today.year)
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 4 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1009..1009
              datawinners/main/ut_couch_fixtures.py on lines 1043..1043
              datawinners/main/ut_couch_fixtures.py on lines 1091..1091
              datawinners/main/ut_couch_fixtures.py on lines 1154..1154

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

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

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

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

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

              Refactorings

              Further Reading

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

                  this_month = str(THIS_MONTH.day) + "." + str(THIS_MONTH.month) + "." + str(THIS_MONTH.year)
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 4 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1009..1009
              datawinners/main/ut_couch_fixtures.py on lines 1043..1043
              datawinners/main/ut_couch_fixtures.py on lines 1091..1091
              datawinners/main/ut_couch_fixtures.py on lines 1217..1217

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

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

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

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

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

              Refactorings

              Further Reading

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

                  last_week_date = str(PREV_MONTH.day) + "." + str(PREV_MONTH.month) + "." + str(PREV_MONTH.year)
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 4 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1009..1009
              datawinners/main/ut_couch_fixtures.py on lines 1043..1043
              datawinners/main/ut_couch_fixtures.py on lines 1154..1154
              datawinners/main/ut_couch_fixtures.py on lines 1217..1217

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

              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

                  question6 = SelectField(label="What aré symptoms?", code="SY", name="What aré symptoms?",
                                          options=[("Rapid weight loss", "a"), ("Dry cough", "b"), ("Pneumonia", "c"),
                                                   ("Memory loss", "d"), ("Neurological disorders ", "e")], single_select_flag=False,
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1289..1291

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

              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

                  question6 = SelectField(label="Symptoms", code="SY", name="What aré symptoms?",
                                          options=[("Rapid weight loss", "a"), ("Dry cough", "b"), ("Pneumonia", "c"),
                                                   ("Memory loss", "d"), ("Neurological disorders ", "e")], single_select_flag=False,
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 154..156

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

              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

                  question8 = SelectField(label="Required Medicines", code="RM", name="What are the required medicines?",
                                          options=[("Hivid", "a"), ("Rétrovir", "b"), ("Vidéx EC", "c"), ("Epzicom", "d")],
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 161..163

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

              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

                  question8 = SelectField(label="What are the required medicines?", code="RM", name="What are the required medicines?"
                      ,
                                          options=[("Hivid", "a"), ("Rétrovir", "b"), ("Vidéx EC", "c"), ("Epzicom", "d")],
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1296..1297

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

              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

                  question5 = SelectField(label="What is your blood group?", code="BG", name="What is your blood group?",
                                          options=[("O+", "a"), ("O-", "b"), ("AB", "c"), ("B+", "d")], single_select_flag=True,
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 151..152

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

              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

                  question5 = SelectField(label="What is your blood group?", code="BG", name="What is your blood group?",
                                          options=[("O+", "a"), ("O-", "b"), ("AB", "c"), ("B+", "d")], single_select_flag=True,
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 1286..1287

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

              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

                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'Madhya Pradesh', 'New Gwalior'],
                                             short_code="cid006", geometry={"type": "Point", "coordinates": [26.227112, 78.18708]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'Kerala', 'Kochi'], short_code="cid005",
                                             geometry={"type": "Point", "coordinates": [9.939248, 76.259625]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, WATER_POINT_ENTITY_TYPE, ['India', 'Gujrat', 'Ahmedabad'], short_code="wp01",
                                             geometry={"type": "Point", "coordinates": [23.0395677, 72.566005]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, WATER_POINT_ENTITY_TYPE, ['India', 'Gujrat', 'Bhuj'], short_code="wp02",
                                             geometry={"type": "Point", "coordinates": [23.251671, 69.66256]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'MP', 'Satna'], short_code="cid002",
                                             geometry={"type": "Point", "coordinates": [24.5667, 80.8333]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, WATER_POINT_ENTITY_TYPE, ['India', 'Haryana', 'Gurgaon'], short_code="wp03",
                                             geometry={"type": "Point", "coordinates": [28.46385, 77.017838]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121

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

              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

                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'MP', 'Bhopal'], short_code="cid001",
                                             geometry={"type": "Point", "coordinates": [23.2833, 77.35]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'MP', 'Khandwa'], short_code="cid004",
                                             geometry={"type": "Point", "coordinates": [21.8333, 76.3667]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'Madhya Pradesh', 'Indore'], short_code="cid007",
                                             geometry={"type": "Point", "coordinates": [22.7167, 75.8]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 68..69
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  e = define_entity_instance(manager, CLINIC_ENTITY_TYPE, ['India', 'MP', 'Jabalpur'], short_code="cid003",
                                             geometry={"type": "Point", "coordinates": [23.2, 79.95]},
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 9 other locations - About 1 hr to fix
              datawinners/main/ut_couch_fixtures.py on lines 52..53
              datawinners/main/ut_couch_fixtures.py on lines 60..61
              datawinners/main/ut_couch_fixtures.py on lines 76..77
              datawinners/main/ut_couch_fixtures.py on lines 84..85
              datawinners/main/ut_couch_fixtures.py on lines 92..93
              datawinners/main/ut_couch_fixtures.py on lines 100..101
              datawinners/main/ut_couch_fixtures.py on lines 111..112
              datawinners/main/ut_couch_fixtures.py on lines 120..121
              datawinners/main/ut_couch_fixtures.py on lines 128..129

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

              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

                  question2 = TextField(label="Name", code="NA", name="What is your namé?",
                                        constraints=[TextLengthConstraint(min=1, max=10)],
              Severity: Minor
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 55 mins to fix
              datawinners/main/ut_couch_fixtures.py on lines 141..142

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 37.

              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

                  question2 = TextField(label="What is your namé?", code="NA", name="What is your namé?",
                                        constraints=[TextLengthConstraint(min=1, max=10)],
              Severity: Minor
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 55 mins to fix
              datawinners/main/ut_couch_fixtures.py on lines 1276..1277

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

              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

                  if reports_flags:
                      reports_flag = reports_flags[0]
                  else:
                      reports_flag = Flag(name='reports')
                      reports_flag.save()
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 2 other locations - About 40 mins to fix
              datawinners/main/ut_couch_fixtures.py on lines 1521..1525
              datawinners/main/ut_couch_fixtures.py on lines 1528..1532

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

              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

                  if questionnaire_builder_flags:
                      questionnaire_builder_flag = questionnaire_builder_flags[0]
                  else:
                      questionnaire_builder_flag = Flag(name='questionnaire_builder')
                      questionnaire_builder_flag.save()
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 2 other locations - About 40 mins to fix
              datawinners/main/ut_couch_fixtures.py on lines 1528..1532
              datawinners/main/ut_couch_fixtures.py on lines 1535..1539

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

              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

                  if xlsform_edit_flags:
                      xlsform_edit_flag = xlsform_edit_flags[0]
                  else:
                      xlsform_edit_flag = Flag(name='xlsform_edit')
                      xlsform_edit_flag.save()
              Severity: Major
              Found in datawinners/main/ut_couch_fixtures.py and 2 other locations - About 40 mins to fix
              datawinners/main/ut_couch_fixtures.py on lines 1521..1525
              datawinners/main/ut_couch_fixtures.py on lines 1535..1539

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

              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

                  question3 = IntegerField(label="Father age", code="FA", name="What is age öf father?",
                                           constraints=[NumericRangeConstraint(min=18, max=100)],
              Severity: Minor
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 40 mins to fix
              datawinners/main/ut_couch_fixtures.py on lines 145..146

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

              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

                  question3 = IntegerField(label="What is age öf father?", code="FA", name="What is age öf father?",
                                           constraints=[NumericRangeConstraint(min=18, max=100)],
              Severity: Minor
              Found in datawinners/main/ut_couch_fixtures.py and 1 other location - About 40 mins to fix
              datawinners/main/ut_couch_fixtures.py on lines 1280..1281

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

              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