estimancy/projestimate

View on GitHub
app/workers/organization_duplicate_project_worker.rb

Summary

Maintainability
F
1 wk
Test Coverage

Method execute_duplication has a Cognitive Complexity of 162 (exceeds 5 allowed). Consider refactoring.
Open

  def execute_duplication(project_id, new_organization_id, user_id)

    user = User.find(user_id)

    #begin
Severity: Minor
Found in app/workers/organization_duplicate_project_worker.rb - About 3 days 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

Method execute_duplication_SAVE has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring.
Open

  def execute_duplication_SAVE(project_id, new_organization_id, user_id)

    user = User.find(user_id)

    #begin
Severity: Minor
Found in app/workers/organization_duplicate_project_worker.rb - About 2 days 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

Method execute_duplication has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def execute_duplication(project_id, new_organization_id, user_id)

    user = User.find(user_id)

    #begin
Severity: Major
Found in app/workers/organization_duplicate_project_worker.rb - About 6 hrs to fix

    Method execute_duplication_SAVE has 127 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def execute_duplication_SAVE(project_id, new_organization_id, user_id)
    
        user = User.find(user_id)
    
        #begin
    Severity: Major
    Found in app/workers/organization_duplicate_project_worker.rb - About 5 hrs to fix

      File organization_duplicate_project_worker.rb has 303 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      class OrganizationDuplicateProjectWorker
        include Sidekiq::Worker
      
        def perform(est_model_id, new_organization_id, user_id)
          est_model = Project.find(est_model_id)
      Severity: Minor
      Found in app/workers/organization_duplicate_project_worker.rb - About 3 hrs to fix

        Avoid deeply nested control flow statements.
        Open

                        unless pf.nil?
                          new_field = new_organization.fields.where(copy_id: pf.field_id).first
                          pf.views_widget_id = widget_copy.id
                          pf.field_id = new_field.nil? ? nil : new_field.id
                          pf.save
        Severity: Major
        Found in app/workers/organization_duplicate_project_worker.rb - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                          estimation_value_id = new_estimation_value.nil? ? nil : new_estimation_value.id
          Severity: Major
          Found in app/workers/organization_duplicate_project_worker.rb - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            unless pf.nil?
                              new_field = new_organization.fields.where(copy_id: pf.field_id).first
                              pf.views_widget_id = widget_copy.id
                              pf.field_id = new_field.nil? ? nil : new_field.id
                              pf.save
            Severity: Major
            Found in app/workers/organization_duplicate_project_worker.rb - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              estimation_value_id = new_estimation_value.nil? ? nil : new_estimation_value.id
              Severity: Major
              Found in app/workers/organization_duplicate_project_worker.rb - About 45 mins to fix

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

                        new_mp.guw_unit_of_work_groups.each do |guw_group|
                          new_pbs_project_element = new_prj_components.find_by_copy_id(guw_group.pbs_project_element_id)
                          new_pbs_project_element_id = new_pbs_project_element.nil? ? nil : new_pbs_project_element.id
                
                          #technology
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 1 other location - About 5 hrs to fix
                app/controllers/organizations_controller.rb on lines 334..386

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

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

                        if old_mp.view
                          old_mp_view_widgets = old_mp.view.views_widgets.all
                          old_mp_view_widgets.each do |view_widget|
                            new_view_widget_mp = ModuleProject.find_by_project_id_and_copy_id(new_prj.id, view_widget.module_project_id)
                            new_view_widget_mp_id = new_view_widget_mp.nil? ? nil : new_view_widget_mp.id
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 2 other locations - About 4 hrs to fix
                app/controllers/organizations_controller.rb on lines 302..323
                app/workers/organization_duplicate_project_worker.rb on lines 142..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 142.

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

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

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

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

                Refactorings

                Further Reading

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

                        if old_mp.view
                          old_mp_view_widgets = old_mp.view.views_widgets.all
                          old_mp_view_widgets.each do |view_widget|
                            new_view_widget_mp = ModuleProject.find_by_project_id_and_copy_id(new_prj.id, view_widget.module_project_id)
                            new_view_widget_mp_id = new_view_widget_mp.nil? ? nil : new_view_widget_mp.id
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 2 other locations - About 4 hrs to fix
                app/controllers/organizations_controller.rb on lines 302..323
                app/workers/organization_duplicate_project_worker.rb on lines 368..389

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 142.

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

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

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

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

                Refactorings

                Further Reading

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

                        ["input", "output"].each do |io|
                          new_mp.pemodule.pe_attributes.each do |attr|
                            old_prj.pbs_project_elements.each do |old_component|
                              new_prj_components.each do |new_component|
                                ev = new_mp.estimation_values.where(pe_attribute_id: attr.id, in_out: io).first
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 5 other locations - About 2 hrs to fix
                app/controllers/organizations_controller.rb on lines 410..420
                app/controllers/projects_controller.rb on lines 1580..1590
                app/controllers/projects_controller.rb on lines 1956..1966
                app/models/project.rb on lines 402..412
                app/workers/organization_duplicate_project_worker.rb on lines 423..433

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 83.

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

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

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

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

                Refactorings

                Further Reading

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

                        ["input", "output"].each do |io|
                          new_mp.pemodule.pe_attributes.each do |attr|
                            old_prj.pbs_project_elements.each do |old_component|
                              new_prj_components.each do |new_component|
                                ev = new_mp.estimation_values.where(pe_attribute_id: attr.id, in_out: io).first
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 5 other locations - About 2 hrs to fix
                app/controllers/organizations_controller.rb on lines 410..420
                app/controllers/projects_controller.rb on lines 1580..1590
                app/controllers/projects_controller.rb on lines 1956..1966
                app/models/project.rb on lines 402..412
                app/workers/organization_duplicate_project_worker.rb on lines 248..258

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 83.

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

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

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

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

                Refactorings

                Further Reading

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

                        new_mp.guw_unit_of_work_groups.each do |guw_group|
                          new_pbs_project_element = new_prj_components.find_by_copy_id(guw_group.pbs_project_element_id)
                          new_pbs_project_element_id = new_pbs_project_element.nil? ? nil : new_pbs_project_element.id
                          guw_group.update_attribute(:pbs_project_element_id, new_pbs_project_element_id)
                
                
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 3 other locations - About 1 hr to fix
                app/controllers/projects_controller.rb on lines 1557..1569
                app/controllers/projects_controller.rb on lines 1933..1945
                app/models/project.rb on lines 379..391

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 61.

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

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

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

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

                Refactorings

                Further Reading

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

                      new_prj.project_securities.where('group_id IS NOT NULL').each do |project_security|
                        new_security_level = new_organization.project_security_levels.where(copy_id: project_security.project_security_level_id).first
                        new_group = new_organization.groups.where(copy_id: project_security.group_id).first
                        if new_security_level.nil? || new_group.nil?
                          project_security.destroy
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 2 other locations - About 50 mins to fix
                app/controllers/organizations_controller.rb on lines 253..260
                app/workers/organization_duplicate_project_worker.rb on lines 92..99

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

                      new_prj.project_securities.where('group_id IS NOT NULL').each do |project_security|
                        new_security_level = new_organization.project_security_levels.where(copy_id: project_security.project_security_level_id).first
                        new_group = new_organization.groups.where(copy_id: project_security.group_id).first
                        if new_security_level.nil? || new_group.nil?
                          project_security.destroy
                Severity: Major
                Found in app/workers/organization_duplicate_project_worker.rb and 2 other locations - About 50 mins to fix
                app/controllers/organizations_controller.rb on lines 253..260
                app/workers/organization_duplicate_project_worker.rb on lines 324..331

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

                      new_prj_components.each do |new_c|
                        new_ancestor_ids_list = []
                        new_c.ancestor_ids.each do |ancestor_id|
                          ancestor_id = PbsProjectElement.find_by_pe_wbs_project_id_and_copy_id(new_c.pe_wbs_project_id, ancestor_id).id
                          new_ancestor_ids_list.push(ancestor_id)
                Severity: Minor
                Found in app/workers/organization_duplicate_project_worker.rb and 3 other locations - About 25 mins to fix
                app/controllers/organizations_controller.rb on lines 234..241
                app/models/project.rb on lines 324..331
                app/workers/organization_duplicate_project_worker.rb on lines 73..80

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 30.

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

                      new_prj_components.each do |new_c|
                        new_ancestor_ids_list = []
                        new_c.ancestor_ids.each do |ancestor_id|
                          ancestor_id = PbsProjectElement.find_by_pe_wbs_project_id_and_copy_id(new_c.pe_wbs_project_id, ancestor_id).id
                          new_ancestor_ids_list.push(ancestor_id)
                Severity: Minor
                Found in app/workers/organization_duplicate_project_worker.rb and 3 other locations - About 25 mins to fix
                app/controllers/organizations_controller.rb on lines 234..241
                app/models/project.rb on lines 324..331
                app/workers/organization_duplicate_project_worker.rb on lines 305..312

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

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

                      new_prj.project_securities.where('user_id IS NOT NULL').each do |project_security|
                        new_security_level = new_organization.project_security_levels.where(copy_id: project_security.project_security_level_id).first
                        if new_security_level.nil?
                          project_security.destroy
                        else
                Severity: Minor
                Found in app/workers/organization_duplicate_project_worker.rb and 2 other locations - About 20 mins to fix
                app/controllers/organizations_controller.rb on lines 264..269
                app/workers/organization_duplicate_project_worker.rb on lines 335..340

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

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

                      new_prj.project_securities.where('user_id IS NOT NULL').each do |project_security|
                        new_security_level = new_organization.project_security_levels.where(copy_id: project_security.project_security_level_id).first
                        if new_security_level.nil?
                          project_security.destroy
                        else
                Severity: Minor
                Found in app/workers/organization_duplicate_project_worker.rb and 2 other locations - About 20 mins to fix
                app/controllers/organizations_controller.rb on lines 264..269
                app/workers/organization_duplicate_project_worker.rb on lines 103..108

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

                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

                          unless new_wbs_activity.nil?
                            new_wbs_activity_ratio = new_wbs_activity.wbs_activity_ratios.where(copy_id: activity_input.wbs_activity_ratio_id).first
                            unless new_wbs_activity_ratio.nil?
                              activity_input.update_attributes(wbs_activity_id: new_wbs_activity.id, wbs_activity_ratio_id: new_wbs_activity_ratio.id)
                Severity: Minor
                Found in app/workers/organization_duplicate_project_worker.rb and 1 other location - About 15 mins to fix
                app/controllers/organizations_controller.rb on lines 400..403

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

                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