techvision/brails4

View on GitHub
app/assets/javascripts/calendar_generator.js

Summary

Maintainability
F
3 wks
Test Coverage

Function setCalendar has 862 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $A.setCalendar = function(pId, trigger, targ, commentsEnabled, callback, config){

        var config = config || {},

        // Control the behavior of date selection clicks
Severity: Major
Found in app/assets/javascripts/calendar_generator.js - About 4 days to fix

    File calendar_generator.js has 869 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
    ARIA Calendar Module R1.3.4
    Copyright 2010-2013 Bryan Garaventa (WhatSock.com)
    Part of AccDC, a Cross-Browser JavaScript accessibility API, distributed under the terms of the Open Source Initiative OSI - MIT License
    */
    Severity: Major
    Found in app/assets/javascripts/calendar_generator.js - About 2 days to fix

      Function runAfter has 305 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                              runAfter: function(dc){
                                  var nMonth = function(){
                                      var month = dc.range.current.month == 11 ? 0 : dc.range.current.month + 1,
                                          year = month > 0 ? dc.range.current.year : dc.range.current.year + 1,
                                          day = dc.range.current.mDay > dc.range[month].max ? dc.range[month].max : dc.range.current.mDay;
      Severity: Major
      Found in app/assets/javascripts/calendar_generator.js - About 1 day to fix

        Function keydown has 105 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                                                    keydown: function(ev){
                                                        changePressed(ev);
                                                        var k = ev.which || ev.keyCode;
        
                                                        if ((k >= 37 && k <= 40) || k == 27 || (k >= 33 && k <= 36)){
        Severity: Major
        Found in app/assets/javascripts/calendar_generator.js - About 4 hrs to fix

          Function runBefore has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                                  runBefore: function(dc){
                                      if (config.ajax && typeof config.ajax === 'function' && !dc.stopAjax && !dc.ajaxLoading){
                                          dc.ajaxLoading = dc.cancel = true;
                                          config.ajax.apply(dc,
                                                          [
          Severity: Major
          Found in app/assets/javascripts/calendar_generator.js - About 3 hrs to fix

            Function reset has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                    reset: function(){
                                        var dc = this;
            
                                        if (dc.openEditor){
                                            dc.comments = dc.parent.range[dc.parent.range.current.month].comments;
            Severity: Major
            Found in app/assets/javascripts/calendar_generator.js - About 2 hrs to fix

              Function runAfter has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                                      runAfter: function(dc){
                                          $A.query('button', dc.containerDiv, function(){
                                              dc.commentBtn = this;
                                              $A.bind(this,
                                                              {
              Severity: Minor
              Found in app/assets/javascripts/calendar_generator.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                                            if (dc.openEditor){
                                                dc.comments = dc.parent.range[dc.parent.range.current.month].comments;
                
                                                if (!dc.textarea)
                                                    dc.textarea = $A.query('textarea', dc.containerDiv, function(){
                Severity: Critical
                Found in app/assets/javascripts/calendar_generator.js - About 1 hr to fix

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

                                                      dc.textarea = $A.query('textarea', dc.containerDiv, function(){
                                                          $A.css(this,
                                                                          {
                                                                          visibility: '',
                                                                          display: ''
                  Severity: Minor
                  Found in app/assets/javascripts/calendar_generator.js - About 1 hr to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                                            if ((dc.range.current.mDay - 7) > 0){
                                                                                dc.range.current.mDay -= 7;
                                                                                dc.setFocus(dc.range.index[dc.range.current.mDay - 1], this);
                                                                            }
                    
                    
                    Severity: Major
                    Found in app/assets/javascripts/calendar_generator.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                                          else if (k == 40){
                                                                              if ((dc.range.current.mDay + 7) <= dc.range[dc.range.current.month].max){
                                                                                  dc.range.current.mDay += 7;
                                                                                  dc.setFocus(dc.range.index[dc.range.current.mDay - 1], this);
                                                                              }
                      Severity: Major
                      Found in app/assets/javascripts/calendar_generator.js - About 45 mins to fix

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

                            $A.setCalendar = function(pId, trigger, targ, commentsEnabled, callback, config){
                        Severity: Minor
                        Found in app/assets/javascripts/calendar_generator.js - About 45 mins to fix

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

                                                      var nMonth = function(){
                                                          var month = dc.range.current.month == 11 ? 0 : dc.range.current.month + 1,
                                                              year = month > 0 ? dc.range.current.year : dc.range.current.year + 1,
                                                              day = dc.range.current.mDay > dc.range[month].max ? dc.range[month].max : dc.range.current.mDay;
                                                          dc.date = new Date(year, month, day);
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 1 day to fix
                          app/assets/javascripts/calendar_generator.js on lines 364..372

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

                          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

                                                      }, pMonth = function(){
                                                          var month = dc.range.current.month < 1 ? 11 : dc.range.current.month - 1,
                                                              year = month < 11 ? dc.range.current.year : dc.range.current.year - 1,
                                                              day = dc.range.current.mDay > dc.range[month].max ? dc.range[month].max : dc.range.current.mDay;
                                                          dc.date = new Date(year, month, day);
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 1 day to fix
                          app/assets/javascripts/calendar_generator.js on lines 356..364

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

                          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

                                                      $A.bind('#' + dc.prevBtnId,
                                                                      {
                                                                      click: function(ev){
                                                                          pMonth();
                                                                          ev.preventDefault();
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 1 day to fix
                          app/assets/javascripts/calendar_generator.js on lines 612..638

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

                          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

                                                      $A.bind('#' + dc.nextBtnId,
                                                                      {
                                                                      click: function(ev){
                                                                          nMonth();
                                                                          ev.preventDefault();
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 1 day to fix
                          app/assets/javascripts/calendar_generator.js on lines 585..611

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

                          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 (wd != dc.iterS && dc.range.current.mDay > 1){
                                                                                      while (dc.range.current.wDay != dc.iterS && $A.getEl(dc.baseId + (dc.range.current.mDay - 1))){
                                                                                          dc.range.current.wDay = (dc.range.current.wDay - 1) < 0 ? 6 : dc.range.current.wDay - 1;
                                                                                          dc.range.current.mDay--;
                                                                                      }
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 7 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 569..575

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

                          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 (wd != dc.iterE && dc.range.current.mDay < dc.range[dc.range.current.month].max){
                                                                                      while (dc.range.current.wDay != dc.iterE && $A.getEl(dc.baseId + (dc.range.current.mDay + 1))){
                                                                                          dc.range.current.wDay = (dc.range.current.wDay + 1) > 6 ? 0 : dc.range.current.wDay + 1;
                                                                                          dc.range.current.mDay++;
                                                                                      }
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 7 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 559..565

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

                          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 ($A.inArray(dc.range.current.mDay, dc.range[dc.range.current.month].disabled[dc.range.current.year]
                                                                                  || dc.range[dc.range.current.month].disabled['*'] || []) === -1){
                                                                                  handleClick.apply(this,
                                                                                                  [
                                                                                                  ev,
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 4 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 416..424

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

                          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 ($A.inArray(dc.range.current.mDay, dc.range[dc.range.current.month].disabled[dc.range.current.year]
                                                                                  || dc.range[dc.range.current.month].disabled['*'] || []) === -1){
                                                                                  handleClick.apply(this,
                                                                                                  [
                                                                                                  ev,
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 4 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 435..443

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

                          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

                                                      var lbl = dc.parent.range.current.mDay + ', ' + dc.parent.range.wDays[dc.parent.range.current.wDay].lng + ' '
                                                          + dc.parent.range[dc.parent.range.current.month].name + ' ' + dc.parent.range.current.year, pre = '';
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 4 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 880..882

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

                          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

                                                                          title: dc.parent.range.current.mDay + ', '
                                                                              + dc.parent.range.wDays[dc.parent.range.current.wDay].lng + ' '
                                                                              + dc.parent.range[dc.parent.range.current.month].name + ' ' + dc.parent.range.current.year
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 4 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 800..801

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

                          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 (wd != dc.iterS && dc.range.current.mDay > 1){
                                                                                      dc.range.current.mDay--;
                                                                                      dc.range.current.wDay = (wd - 1) < 0 ? 6 : wd - 1;
                                                                                      dc.setFocus(dc.range.index[dc.range.current.mDay - 1], this);
                                                                                  }
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 3 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 482..495

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

                          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

                                                          $A.setAttr(dc.commentBtn,
                                                                          {
                                                                          title: (config.editor && config.editor.role || 'Edit') + ' ' + $A.reg[pId + 'commentTooltip'].role
                                                                          }).innerHTML = config.editor && config.editor.role || 'Edit';
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 888..891

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

                          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

                                                          $A.setAttr(dc.commentBtn,
                                                                          {
                                                                          title: (config.editor && config.editor.action1 || 'Save') + ' ' + $A.reg[pId + 'commentTooltip'].role
                                                                          }).innerHTML = config.editor && config.editor.action1 || 'Save';
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 905..908

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

                          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

                                                                                      var month = dc.range.current.month == 11 ? 0 : dc.range.current.month + 1,
                                                                                          year = month > 0 ? dc.range.current.year : dc.range.current.year + 1;
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 505..506

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 88.

                          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

                                                                                      var month = dc.range.current.month < 1 ? 11 : dc.range.current.month - 1,
                                                                                          year = month < 11 ? dc.range.current.year : dc.range.current.year - 1;
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 489..490

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                                                  {
                                                                                  shrt: config.days && config.days[4] ? config.days[4].s : 'T',
                                                                                  lng: config.days && config.days[4] ? config.days[4].l : 'Thursday'
                                                                                  },
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 6 other locations - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 150..153
                          app/assets/javascripts/calendar_generator.js on lines 154..157
                          app/assets/javascripts/calendar_generator.js on lines 158..161
                          app/assets/javascripts/calendar_generator.js on lines 162..165
                          app/assets/javascripts/calendar_generator.js on lines 170..173
                          app/assets/javascripts/calendar_generator.js on lines 174..177

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                                                  {
                                                                                  shrt: config.days && config.days[2] ? config.days[2].s : 'T',
                                                                                  lng: config.days && config.days[2] ? config.days[2].l : 'Tuesday'
                                                                                  },
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 6 other locations - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 150..153
                          app/assets/javascripts/calendar_generator.js on lines 154..157
                          app/assets/javascripts/calendar_generator.js on lines 162..165
                          app/assets/javascripts/calendar_generator.js on lines 166..169
                          app/assets/javascripts/calendar_generator.js on lines 170..173
                          app/assets/javascripts/calendar_generator.js on lines 174..177

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                                                  {
                                                                                  shrt: config.days && config.days[5] ? config.days[5].s : 'F',
                                                                                  lng: config.days && config.days[5] ? config.days[5].l : 'Friday'
                                                                                  },
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 6 other locations - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 150..153
                          app/assets/javascripts/calendar_generator.js on lines 154..157
                          app/assets/javascripts/calendar_generator.js on lines 158..161
                          app/assets/javascripts/calendar_generator.js on lines 162..165
                          app/assets/javascripts/calendar_generator.js on lines 166..169
                          app/assets/javascripts/calendar_generator.js on lines 174..177

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                                                  {
                                                                                  shrt: config.days && config.days[1] ? config.days[1].s : 'M',
                                                                                  lng: config.days && config.days[1] ? config.days[1].l : 'Monday'
                                                                                  },
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 6 other locations - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 150..153
                          app/assets/javascripts/calendar_generator.js on lines 158..161
                          app/assets/javascripts/calendar_generator.js on lines 162..165
                          app/assets/javascripts/calendar_generator.js on lines 166..169
                          app/assets/javascripts/calendar_generator.js on lines 170..173
                          app/assets/javascripts/calendar_generator.js on lines 174..177

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                                                  {
                                                                                  shrt: config.days && config.days[6] ? config.days[6].s : 'S',
                                                                                  lng: config.days && config.days[6] ? config.days[6].l : 'Saturday'
                                                                                  }
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 6 other locations - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 150..153
                          app/assets/javascripts/calendar_generator.js on lines 154..157
                          app/assets/javascripts/calendar_generator.js on lines 158..161
                          app/assets/javascripts/calendar_generator.js on lines 162..165
                          app/assets/javascripts/calendar_generator.js on lines 166..169
                          app/assets/javascripts/calendar_generator.js on lines 170..173

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                                                  {
                                                                                  shrt: config.days && config.days[3] ? config.days[3].s : 'W',
                                                                                  lng: config.days && config.days[3] ? config.days[3].l : 'Wednesday'
                                                                                  },
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 6 other locations - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 150..153
                          app/assets/javascripts/calendar_generator.js on lines 154..157
                          app/assets/javascripts/calendar_generator.js on lines 158..161
                          app/assets/javascripts/calendar_generator.js on lines 166..169
                          app/assets/javascripts/calendar_generator.js on lines 170..173
                          app/assets/javascripts/calendar_generator.js on lines 174..177

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                                                  {
                                                                                  shrt: config.days && config.days[0] ? config.days[0].s : 'S',
                                                                                  lng: config.days && config.days[0] ? config.days[0].l : 'Sunday'
                                                                                  },
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 6 other locations - About 2 hrs to fix
                          app/assets/javascripts/calendar_generator.js on lines 154..157
                          app/assets/javascripts/calendar_generator.js on lines 158..161
                          app/assets/javascripts/calendar_generator.js on lines 162..165
                          app/assets/javascripts/calendar_generator.js on lines 166..169
                          app/assets/javascripts/calendar_generator.js on lines 170..173
                          app/assets/javascripts/calendar_generator.js on lines 174..177

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

                          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 ((dc.range.current.mDay + 7) <= dc.range[dc.range.current.month].max){
                                                                                      dc.range.current.mDay += 7;
                                                                                      dc.setFocus(dc.range.index[dc.range.current.mDay - 1], this);
                                                                                  }
                          
                          
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 499..518

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

                          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 ((dc.range.current.mDay - 7) > 0){
                                                                                      dc.range.current.mDay -= 7;
                                                                                      dc.setFocus(dc.range.index[dc.range.current.mDay - 1], this);
                                                                                  }
                          
                          
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 522..535

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

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

                                                                  0:
                                                                                  {
                                                                                  name: config.months && config.months[0] ? config.months[0] : 'January',
                                                                                  max: 31,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  2:
                                                                                  {
                                                                                  name: config.months && config.months[2] ? config.months[2] : 'March',
                                                                                  max: 31,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  6:
                                                                                  {
                                                                                  name: config.months && config.months[6] ? config.months[6] : 'July',
                                                                                  max: 31,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  1:
                                                                                  {
                                                                                  name: config.months && config.months[1] ? config.months[1] : 'February',
                                                                                  max: 28,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  4:
                                                                                  {
                                                                                  name: config.months && config.months[4] ? config.months[4] : 'May',
                                                                                  max: 31,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  8:
                                                                                  {
                                                                                  name: config.months && config.months[8] ? config.months[8] : 'September',
                                                                                  max: 30,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  3:
                                                                                  {
                                                                                  name: config.months && config.months[3] ? config.months[3] : 'April',
                                                                                  max: 30,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  7:
                                                                                  {
                                                                                  name: config.months && config.months[7] ? config.months[7] : 'August',
                                                                                  max: 31,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  9:
                                                                                  {
                                                                                  name: config.months && config.months[9] ? config.months[9] : 'October',
                                                                                  max: 31,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  5:
                                                                                  {
                                                                                  name: config.months && config.months[5] ? config.months[5] : 'June',
                                                                                  max: 30,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  10:
                                                                                  {
                                                                                  name: config.months && config.months[10] ? config.months[10] : 'November',
                                                                                  max: 30,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 141..147

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

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

                                                                  11:
                                                                                  {
                                                                                  name: config.months && config.months[11] ? config.months[11] : 'December',
                                                                                  max: 31,
                                                                                  disabled: {},
                          Severity: Major
                          Found in app/assets/javascripts/calendar_generator.js and 11 other locations - About 1 hr to fix
                          app/assets/javascripts/calendar_generator.js on lines 64..70
                          app/assets/javascripts/calendar_generator.js on lines 71..77
                          app/assets/javascripts/calendar_generator.js on lines 78..84
                          app/assets/javascripts/calendar_generator.js on lines 85..91
                          app/assets/javascripts/calendar_generator.js on lines 92..98
                          app/assets/javascripts/calendar_generator.js on lines 99..105
                          app/assets/javascripts/calendar_generator.js on lines 106..112
                          app/assets/javascripts/calendar_generator.js on lines 113..119
                          app/assets/javascripts/calendar_generator.js on lines 120..126
                          app/assets/javascripts/calendar_generator.js on lines 127..133
                          app/assets/javascripts/calendar_generator.js on lines 134..140

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

                          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 (wd != dc.iterE && dc.range.current.mDay < dc.range[dc.range.current.month].max){
                                                                                      dc.range.current.mDay++;
                                                                                      dc.range.current.wDay = (wd + 1) > 6 ? 0 : wd + 1;
                                                                                      dc.setFocus(dc.range.index[dc.range.current.mDay - 1], this);
                                                                                  }
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 55 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 569..575

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

                          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

                                                                          focus: function(ev){
                                                                              if (dc.parent.children[0].loaded)
                                                                                  dc.parent.children[0].close();
                                                                          },
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 55 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 841..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 53.

                          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 ((dc.parent.range[dc.parent.range.current.month].disabled[dc.parent.range.current.year]
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 55 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 805..805

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

                          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

                                                                                  focus: function(ev){
                                                                                      if (dc.parent.children[0].loaded)
                                                                                          dc.parent.children[0].close();
                                                                                  },
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 55 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 916..919

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

                          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

                                                              dc.parent.range[dc.parent.range.current.month].disabled[dc.parent.range.current.year]) !== -1)
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 55 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 803..803

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

                          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 (dc.comments[dc.parent.range.current.year]
                                                              && dc.comments[dc.parent.range.current.year][dc.parent.range.current.mDay])
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 35 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 887..887

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 46.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                              dc.textarea.value = dc.comments[dc.parent.range.current.year][dc.parent.range.current.mDay];
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 35 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 885..886

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

                                                      var disabled = dc.range[dc.range.current.month].disabled[dc.range.current.year],
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 2 other locations - About 30 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 288..288
                          app/assets/javascripts/calendar_generator.js on lines 387..387

                          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

                                                                                          day = dc.range.current.mDay + 7 - dc.range[dc.range.current.month].max;
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 1 other location - About 30 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 522..522

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

                                                          comments = dc.range[dc.range.current.month].comments[dc.range.current.year],
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 2 other locations - About 30 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 286..286
                          app/assets/javascripts/calendar_generator.js on lines 387..387

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

                                                                              var tooltipDC = dc.children[0], year = dc.range[dc.range.current.month].comments[dc.range.current.year],
                          Severity: Minor
                          Found in app/assets/javascripts/calendar_generator.js and 2 other locations - About 30 mins to fix
                          app/assets/javascripts/calendar_generator.js on lines 286..286
                          app/assets/javascripts/calendar_generator.js on lines 288..288

                          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