railstaichung/rails-taichung

View on GitHub

Showing 177 of 177 total issues

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

    if ('maxView' in options) {
      this.maxView = options.maxView;
    } else if ('maxView' in this.element.data()) {
      this.maxView = this.element.data('max-view');
    }
Severity: Major
Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..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 72.

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

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

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

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

Refactorings

Further Reading

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

    if ('wheelViewModeNavigationDelay' in options) {
      this.wheelViewModeNavigationDelay = options.wheelViewModeNavigationDelay;
    } else if ('wheelViewModeNavigationDelay' in this.element.data()) {
      this.wheelViewModeNavigationDelay = this.element.data('view-mode-wheel-navigation-delay');
    }
Severity: Major
Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..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 72.

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

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

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

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

Refactorings

Further Reading

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

    if ('forceParse' in options) {
      this.forceParse = options.forceParse;
    } else if ('dateForceParse' in this.element.data()) {
      this.forceParse = this.element.data('date-force-parse');
    }
Severity: Major
Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..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 72.

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

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

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

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

Refactorings

Further Reading

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

    if ('startView' in options) {
      this.startViewMode = options.startView;
    } else if ('startView' in this.element.data()) {
      this.startViewMode = this.element.data('start-view');
    }
Severity: Major
Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..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 72.

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

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

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

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

Refactorings

Further Reading

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

    if ('formatViewType' in options) {
      this.formatViewType = options.formatViewType;
    } else if ('formatViewType' in this.element.data()) {
      this.formatViewType = this.element.data('formatViewType');
    }
Severity: Major
Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..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 72.

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

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

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

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

Refactorings

Further Reading

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

    if ('wheelViewModeNavigation' in options) {
      this.wheelViewModeNavigation = options.wheelViewModeNavigation;
    } else if ('wheelViewModeNavigation' in this.element.data()) {
      this.wheelViewModeNavigation = this.element.data('view-mode-wheel-navigation');
    }
Severity: Major
Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..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 72.

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

Function place has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    place: function () {
      if (this.isInline) return;

      if (!this.zIndex) {
        var index_highest = 0;
Severity: Minor
Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 1 hr to fix

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

              if (this.viewMode != 0) {
                var oldViewMode = this.viewMode;
                this.showMode(-1);
                this.fill();
                if (oldViewMode == this.viewMode && this.autoclose) {
    Severity: Major
    Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
    app/assets/javascripts/bootstrap-datetimepicker.js on lines 1052..1064

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

    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

                  if (this.viewMode != 0) {
                    var oldViewMode = this.viewMode;
                    this.showMode(-1);
                    this.fill();
                    if (oldViewMode == this.viewMode && this.autoclose) {
    Severity: Major
    Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
    app/assets/javascripts/bootstrap-datetimepicker.js on lines 1306..1318

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

    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

    Function interfaceUpdate has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function interfaceUpdate(alt) //{{{
        // This method tweaks the interface based on options object.
        // Called when options are changed and at end of initialization.
        {
          if (options.allowResize) {
    Severity: Minor
    Found in app/assets/javascripts/jquery.Jcrop.js - About 1 hr to fix

      Function Primitives has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        this.Gmaps.Google.Primitives = function() {
          var factory;
          factory = {
            point: google.maps.Point,
            size: google.maps.Size,
      Severity: Minor
      Found in public/javascripts/gmaps_google.js - About 1 hr to fix

        Function _attachEvents has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _attachEvents: function () {
              this._detachEvents();
              if (this.isInput) { // single input
                this._events = [
                  [this.element, {
        Severity: Minor
        Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 1 hr to fix

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

                    $.Jcrop.Loader(this,function(){
                      $(this).css({display:'block',visibility:'hidden'});
                      api = $.Jcrop(this, options);
                      if ($.isFunction(callback)) callback.call(api);
                    });
          Severity: Major
          Found in app/assets/javascripts/jquery.Jcrop.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.Jcrop.js on lines 1604..1608

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

          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

                for(var i=0;i<m.length;i++) {
                  if (m[i] !== sel) n.push(m[i]);
                  m[i].toBack();
                }
          Severity: Major
          Found in app/assets/javascripts/Jcrop.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/Jcrop.js on lines 2286..2289

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

          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

                for(var i=0;i<m.length;i++) {
                  if (m[i] !== sel) n.push(m[i]);
                  m[i].toBack();
                }
          Severity: Major
          Found in app/assets/javascripts/Jcrop.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/Jcrop.js on lines 2172..2175

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

          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

              moveDate: function (date, dir) {
                if (!dir) return date;
                var new_date = new Date(date.valueOf());
                //dir = dir > 0 ? 1 : -1;
                new_date.setUTCDate(new_date.getUTCDate() + dir);
          Severity: Major
          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1146..1152

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

          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

                function createDragbars(li) //{{{
                {
                  var i;
                  for (i = 0; i < li.length; i++) {
                    dragbar[li[i]] = insertDragbar(li[i]);
          Severity: Major
          Found in app/assets/javascripts/jquery.Jcrop.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.Jcrop.js on lines 930..936

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

          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

                function createHandles(li) //{{{
                {
                  var i;
                  for (i = 0; i < li.length; i++) {
                    handle[li[i]] = insertHandle(li[i]);
          Severity: Major
          Found in app/assets/javascripts/jquery.Jcrop.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.Jcrop.js on lines 908..914

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

          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

                  else {
                    $(this).css({display:'block',visibility:'hidden'});
                    api = $.Jcrop(this, options);
                    if ($.isFunction(callback)) callback.call(api);
                  }
          Severity: Major
          Found in app/assets/javascripts/jquery.Jcrop.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.Jcrop.js on lines 1599..1603

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

          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

                    if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear()
                      && month <= this.startDate.getUTCMonth()
                      && day <= this.startDate.getUTCDate()) {
          Severity: Major
          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/bootstrap-datetimepicker.js on lines 825..827

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

          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