ampache/ampache

View on GitHub
public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js

Summary

Maintainability
F
5 days
Test Coverage

Function prettyPhoto has 649 lines of code (exceeds 200 allowed). Consider refactoring.
Open

    $.fn.prettyPhoto = function(pp_settings) {
        pp_settings = $.extend({
            hook: 'rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */
            animation_speed: 'fast', /* fast/slow/normal */
            ajaxcallback: function() {},
Severity: Major
Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 2 days to fix

    File jquery.prettyPhoto.js has 681 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    /* ------------------------------------------------------------------------
        Class: prettyPhoto
        Use: Lightbox clone for jQuery
        Author: Stephane Caron (http://www.no-margin-for-errors.com)
        Version: 3.1.6
    Severity: Major
    Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 6 hrs to fix

      Avoid deeply nested control flow statements.
      Open

                                      if (!settings.modal) {
                                          $.prettyPhoto.close();
                                          e.preventDefault();
                                      }
      Severity: Major
      Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 45 mins to fix

        Avoid too many return statements within this function.
        Open

                        return 'iframe';
        Severity: Major
        Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return 'inline';
          Severity: Major
          Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return 'image';
            Severity: Major
            Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return 'ajax';
              Severity: Major
              Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return 'custom';
                Severity: Major
                Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js - About 30 mins to fix

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

                                  $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){
                                      $.prettyPhoto.stopSlideshow();
                                      return false;
                                  });
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 501..504

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

                  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

                              $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){
                                  $.prettyPhoto.startSlideshow();
                                  return false;
                              });
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 486..489

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

                  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

                                  $pp_gallery.find('.pp_arrow_previous').click(function(){
                                      $.prettyPhoto.changeGalleryPage('previous');
                                      $.prettyPhoto.stopSlideshow();
                                      return false;
                                  });
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 869..873

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

                  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

                                  $pp_gallery.find('.pp_arrow_next').click(function(){
                                      $.prettyPhoto.changeGalleryPage('next');
                                      $.prettyPhoto.stopSlideshow();
                                      return false;
                                  });
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 875..879

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

                  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

                              $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){
                                  $.prettyPhoto.changePage('next');
                                  $.prettyPhoto.stopSlideshow();
                                  return false;
                              });
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 947..951

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

                  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

                              $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){
                                  $.prettyPhoto.changePage('previous');
                                  $.prettyPhoto.stopSlideshow();
                                  return false;
                              });
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 953..957

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

                  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

                                          toInject =  settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 2 other locations - About 40 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 318..318
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 345..345

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

                  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

                                          toInject = settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 2 other locations - About 40 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 318..318
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 358..358

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

                  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

                                          toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);
                  Severity: Major
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 2 other locations - About 40 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 345..345
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 358..358

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

                  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 (movie_width.indexOf('%') != -1) {
                                  movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true;
                              }
                  Severity: Minor
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 40 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 243..245

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

                  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 (movie_height.indexOf('%') != -1) {
                                  movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased = true;
                              }
                  Severity: Minor
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 40 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 246..248

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

                  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 (movie_id.indexOf('&') > 0) {
                                                  // Strip anything after the &
                                                  movie_id = movie_id.substr(0, movie_id.indexOf('&'));
                                              }
                  Severity: Minor
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 30 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 301..304

                  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

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

                              movie_height = (parseFloat(getParam('height',pp_images[set_position]))) ? getParam('height',pp_images[set_position]) : settings.default_height.toString();
                  Severity: Minor
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 30 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 238..238

                  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

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

                              movie_width = (parseFloat(getParam('width',pp_images[set_position]))) ? getParam('width',pp_images[set_position]) : settings.default_width.toString();
                  Severity: Minor
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 30 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 239..239

                  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

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

                                              if (movie_id.indexOf('?') > 0) {
                                                  // Strip anything after the ?
                                                  movie_id = movie_id.substr(0, movie_id.indexOf('?'));
                                              }
                  Severity: Minor
                  Found in public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js and 1 other location - About 30 mins to fix
                  public/lib/modules/prettyphoto/js/jquery.prettyPhoto.js on lines 305..308

                  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

                  There are no issues that match your filters.

                  Category
                  Status