QutBioacousticsResearchGroup/bioacoustic-workbench

View on GitHub

Showing 184 of 184 total issues

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

  def create
    @saved_search = SavedSearch.new(params[:saved_search])

    respond_to do |format|
      if @saved_search.save
Severity: Major
Found in app/controllers/saved_searches_controller.rb and 13 other locations - About 35 mins to fix
app/controllers/analysis_items_controller.rb on lines 39..46
app/controllers/analysis_jobs_controller.rb on lines 39..46
app/controllers/analysis_scripts_controller.rb on lines 39..46
app/controllers/audio_events_controller.rb on lines 39..46
app/controllers/audio_recordings_controller.rb on lines 50..57
app/controllers/bookmarks_controller.rb on lines 39..46
app/controllers/permissions_controller.rb on lines 39..46
app/controllers/photos_controller.rb on lines 42..49
app/controllers/progresses_controller.rb on lines 39..46
app/controllers/projects_controller.rb on lines 36..43
app/controllers/sites_controller.rb on lines 39..46
app/controllers/tags_controller.rb on lines 34..41
app/controllers/users_controller.rb on lines 39..46

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

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

  def create
    @photo = Photo.new(params[:photo])

    respond_to do |format|
      if @photo.save
Severity: Major
Found in app/controllers/photos_controller.rb and 13 other locations - About 35 mins to fix
app/controllers/analysis_items_controller.rb on lines 39..46
app/controllers/analysis_jobs_controller.rb on lines 39..46
app/controllers/analysis_scripts_controller.rb on lines 39..46
app/controllers/audio_events_controller.rb on lines 39..46
app/controllers/audio_recordings_controller.rb on lines 50..57
app/controllers/bookmarks_controller.rb on lines 39..46
app/controllers/permissions_controller.rb on lines 39..46
app/controllers/progresses_controller.rb on lines 39..46
app/controllers/projects_controller.rb on lines 36..43
app/controllers/saved_searches_controller.rb on lines 39..46
app/controllers/sites_controller.rb on lines 39..46
app/controllers/tags_controller.rb on lines 34..41
app/controllers/users_controller.rb on lines 39..46

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

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

  def create
    @bookmark = Bookmark.new(params[:bookmark])

    respond_to do |format|
      if @bookmark.save
Severity: Major
Found in app/controllers/bookmarks_controller.rb and 13 other locations - About 35 mins to fix
app/controllers/analysis_items_controller.rb on lines 39..46
app/controllers/analysis_jobs_controller.rb on lines 39..46
app/controllers/analysis_scripts_controller.rb on lines 39..46
app/controllers/audio_events_controller.rb on lines 39..46
app/controllers/audio_recordings_controller.rb on lines 50..57
app/controllers/permissions_controller.rb on lines 39..46
app/controllers/photos_controller.rb on lines 42..49
app/controllers/progresses_controller.rb on lines 39..46
app/controllers/projects_controller.rb on lines 36..43
app/controllers/saved_searches_controller.rb on lines 39..46
app/controllers/sites_controller.rb on lines 39..46
app/controllers/tags_controller.rb on lines 34..41
app/controllers/users_controller.rb on lines 39..46

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

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

  def create
    @permission = Permission.new(params[:permission])

    respond_to do |format|
      if @permission.save
Severity: Major
Found in app/controllers/permissions_controller.rb and 13 other locations - About 35 mins to fix
app/controllers/analysis_items_controller.rb on lines 39..46
app/controllers/analysis_jobs_controller.rb on lines 39..46
app/controllers/analysis_scripts_controller.rb on lines 39..46
app/controllers/audio_events_controller.rb on lines 39..46
app/controllers/audio_recordings_controller.rb on lines 50..57
app/controllers/bookmarks_controller.rb on lines 39..46
app/controllers/photos_controller.rb on lines 42..49
app/controllers/progresses_controller.rb on lines 39..46
app/controllers/projects_controller.rb on lines 36..43
app/controllers/saved_searches_controller.rb on lines 39..46
app/controllers/sites_controller.rb on lines 39..46
app/controllers/tags_controller.rb on lines 34..41
app/controllers/users_controller.rb on lines 39..46

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

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

  def create
    @audio_event = AudioEvent.new(params[:audio_event])

    respond_to do |format|
      if @audio_event.save
Severity: Major
Found in app/controllers/audio_events_controller.rb and 13 other locations - About 35 mins to fix
app/controllers/analysis_items_controller.rb on lines 39..46
app/controllers/analysis_jobs_controller.rb on lines 39..46
app/controllers/analysis_scripts_controller.rb on lines 39..46
app/controllers/audio_recordings_controller.rb on lines 50..57
app/controllers/bookmarks_controller.rb on lines 39..46
app/controllers/permissions_controller.rb on lines 39..46
app/controllers/photos_controller.rb on lines 42..49
app/controllers/progresses_controller.rb on lines 39..46
app/controllers/projects_controller.rb on lines 36..43
app/controllers/saved_searches_controller.rb on lines 39..46
app/controllers/sites_controller.rb on lines 39..46
app/controllers/tags_controller.rb on lines 34..41
app/controllers/users_controller.rb on lines 39..46

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

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

            return encodeURIComponent(str)
                .replace(/!/g, '%21')
                .replace(/'/g, '%27')
                .replace(/\(/g, '%28')
                .replace(/\)/g, '%29')
Severity: Minor
Found in lib/assets/javascripts/functions.js and 1 other location - About 35 mins to fix
lib/assets/javascripts/functions.js on lines 296..301

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

                if ($scope.results.name
                    && $scope.results.name.length > 0
                    && $scope.detailsForm.fullName.$valid
                    ) {

Severity: Minor
Found in app/assets/javascripts/angular/controllers/experiments.js and 1 other location - About 35 mins to fix
app/assets/javascripts/angular/controllers/experiments.js on lines 145..153

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

            return encodeURIComponent(val).
                replace(/%40/gi, '@').
                replace(/%3A/gi, ':').
                replace(/%24/g, '$').
                replace(/%2C/gi, ',').
Severity: Minor
Found in lib/assets/javascripts/functions.js and 1 other location - About 35 mins to fix
lib/assets/javascripts/functions.js on lines 279..284

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

                if ($scope.results.email
                    && $scope.results.email.length > 0
                    && $scope.detailsForm.email.$valid
                    ) {

Severity: Minor
Found in app/assets/javascripts/angular/controllers/experiments.js and 1 other location - About 35 mins to fix
app/assets/javascripts/angular/controllers/experiments.js on lines 135..143

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

Avoid too many return statements within this function.
Open

        if (proto && typeof proto.toString == 'function') return proto.toString;
Severity: Major
Found in lib/assets/javascripts/100-String.format.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return stringFromAny(params[num], format); //convert the input replacement to a proper string
    Severity: Major
    Found in lib/assets/javascripts/100-String.format.js - About 30 mins to fix

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

                  angular.forEach($scope.bigScope.spec.additionalResources.experimentCombinationCounts, function (value, key) {
                      var c = value.count;
                      if (minCount === null || c < minCount) {
                          minCount = c;
                      }
      Severity: Minor
      Found in app/assets/javascripts/angular/controllers/experiments.js and 1 other location - About 30 mins to fix
      app/assets/javascripts/angular/controllers/experiments.js on lines 839..844

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

      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

                      angular.forEach(containingObject, function (value, key) {
                          var c = value.count;
                          if (minCount === null || c < minCount) {
                              minCount = c;
                          }
      Severity: Minor
      Found in app/assets/javascripts/angular/controllers/experiments.js and 1 other location - About 30 mins to fix
      app/assets/javascripts/angular/controllers/experiments.js on lines 264..269

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

      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

      Avoid too many return statements within this function.
      Open

              return String.prototype.toString;
      Severity: Major
      Found in lib/assets/javascripts/100-String.format.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return ""; //no formatter, use empty string, this should *NEVER* happen.
        Severity: Major
        Found in lib/assets/javascripts/100-String.format.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return formatter.call(obj,format);
          Severity: Major
          Found in lib/assets/javascripts/100-String.format.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return String(source);
            Severity: Major
            Found in lib/assets/javascripts/100-String.format.js - About 30 mins to fix

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

                def update
                  @audio_recording = AudioRecording.find(params[:id])
              
                  respond_to do |format|
                    if @audio_recording.update_attributes(params[:audio_recording])
              Severity: Major
              Found in app/controllers/audio_recordings_controller.rb and 13 other locations - About 30 mins to fix
              app/controllers/analysis_items_controller.rb on lines 53..60
              app/controllers/analysis_jobs_controller.rb on lines 53..60
              app/controllers/analysis_scripts_controller.rb on lines 53..60
              app/controllers/audio_events_controller.rb on lines 53..60
              app/controllers/bookmarks_controller.rb on lines 53..60
              app/controllers/permissions_controller.rb on lines 53..60
              app/controllers/photos_controller.rb on lines 56..63
              app/controllers/progresses_controller.rb on lines 53..60
              app/controllers/projects_controller.rb on lines 53..60
              app/controllers/saved_searches_controller.rb on lines 53..60
              app/controllers/sites_controller.rb on lines 53..60
              app/controllers/tags_controller.rb on lines 48..55
              app/controllers/users_controller.rb on lines 53..60

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

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

                def update
                  @tag = Tag.find(params[:id])
              
                  respond_to do |format|
                    if @tag.update_attributes(params[:tag])
              Severity: Major
              Found in app/controllers/tags_controller.rb and 13 other locations - About 30 mins to fix
              app/controllers/analysis_items_controller.rb on lines 53..60
              app/controllers/analysis_jobs_controller.rb on lines 53..60
              app/controllers/analysis_scripts_controller.rb on lines 53..60
              app/controllers/audio_events_controller.rb on lines 53..60
              app/controllers/audio_recordings_controller.rb on lines 64..71
              app/controllers/bookmarks_controller.rb on lines 53..60
              app/controllers/permissions_controller.rb on lines 53..60
              app/controllers/photos_controller.rb on lines 56..63
              app/controllers/progresses_controller.rb on lines 53..60
              app/controllers/projects_controller.rb on lines 53..60
              app/controllers/saved_searches_controller.rb on lines 53..60
              app/controllers/sites_controller.rb on lines 53..60
              app/controllers/users_controller.rb on lines 53..60

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

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

                def update
                  @analysis_job = AnalysisJob.find(params[:id])
              
                  respond_to do |format|
                    if @analysis_job.update_attributes(params[:analysis_job])
              Severity: Major
              Found in app/controllers/analysis_jobs_controller.rb and 13 other locations - About 30 mins to fix
              app/controllers/analysis_items_controller.rb on lines 53..60
              app/controllers/analysis_scripts_controller.rb on lines 53..60
              app/controllers/audio_events_controller.rb on lines 53..60
              app/controllers/audio_recordings_controller.rb on lines 64..71
              app/controllers/bookmarks_controller.rb on lines 53..60
              app/controllers/permissions_controller.rb on lines 53..60
              app/controllers/photos_controller.rb on lines 56..63
              app/controllers/progresses_controller.rb on lines 53..60
              app/controllers/projects_controller.rb on lines 53..60
              app/controllers/saved_searches_controller.rb on lines 53..60
              app/controllers/sites_controller.rb on lines 53..60
              app/controllers/tags_controller.rb on lines 48..55
              app/controllers/users_controller.rb on lines 53..60

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

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

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

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

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

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language