myems-admin/js/plugins/fullcalendar/fullcalendar.min.js

Summary

Maintainability
F
1 mo
Test Coverage

File fullcalendar.min.js has 4312 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * FullCalendar v1.6.4
 * Docs & License: http://arshaw.com/fullcalendar/
 * (c) 2013 Adam Shaw
 */
Severity: Major
Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 wk to fix

    Function AgendaView has 660 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function AgendaView(element, calendar, viewName) {
            var t = this;
    
    
            // exports
    Severity: Major
    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 3 days to fix

      Function AgendaEventRenderer has 536 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function AgendaEventRenderer() {
              var t = this;
      
      
              // exports
      Severity: Major
      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 2 days to fix

        Function DayEventRenderer has 463 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function DayEventRenderer() {
                var t = this;
        
        
                // exports
        Severity: Major
        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 2 days to fix

          Function BasicView has 359 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function BasicView(element, calendar, viewName) {
                  var t = this;
          
          
                  // exports
          Severity: Major
          Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 day to fix

            Function Calendar has 356 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function Calendar(element, options, eventSources) {
                    var t = this;
            
            
                    // exports
            Severity: Major
            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 day to fix

              Function View has 329 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function View(element, calendar, viewName) {
                      var t = this;
              
              
                      // exports
              Severity: Major
              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 day to fix

                Function EventManager has 303 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function EventManager(options, _sources) {
                        var t = this;
                
                
                        // exports
                Severity: Major
                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 day to fix

                  Function Header has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function Header(calendar, options) {
                          var t = this;
                  
                  
                          // exports
                  Severity: Major
                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 5 hrs to fix

                    Function renderSlotSegs has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function renderSlotSegs(segs, modifiedEventId) {
                    
                                var i, segCnt=segs.length, seg,
                                    event,
                                    top,
                    Severity: Major
                    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 4 hrs to fix

                      Function draggableSlotEvent has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function draggableSlotEvent(event, eventElement, timeElement) {
                                  var coordinateGrid = t.getCoordinateGrid();
                                  var colCnt = getColCnt();
                                  var colWidth = getColWidth();
                                  var snapHeight = getSnapHeight();
                      Severity: Major
                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 4 hrs to fix

                        Function draggableDayEvent has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function draggableDayEvent(event, eventElement, seg) {
                                    var isStart = seg.isStart;
                                    var origWidth;
                                    var revert;
                                    var allDay = true;
                        Severity: Major
                        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 3 hrs to fix

                          Function renderSection has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function renderSection(position) {
                                      var e = $("<td class='fc-header-" + position + "'/>");
                                      var buttonStr = options.header[position];
                                      if (buttonStr) {
                                          $.each(buttonStr.split(' '), function(i) {
                          Severity: Major
                          Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 3 hrs to fix

                            Function resizableDayEvent has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function resizableDayEvent(event, element, segment) {
                                        var isRTL = opt('isRTL');
                                        var direction = isRTL ? 'w' : 'e';
                                        var handle = element.find('.ui-resizable-' + direction); // TODO: stop using this class because we aren't using jqui for this
                                        var isResizing = false;
                            Severity: Major
                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 3 hrs to fix

                              Function formatDates has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function formatDates(date1, date2, format, options) {
                                      options = options || defaults;
                              
                                      if(!format){
                                          return '';
                              Severity: Major
                              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 3 hrs to fix

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

                                        function _fetchEventSource(source, callback) {
                                            var i;
                                            var fetchers = fc.sourceFetchers;
                                            var res;
                                            for (i=0; i<fetchers.length; i++) {
                                Severity: Major
                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 2 hrs to fix

                                  Function buildSkeleton has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function buildSkeleton() {
                                              var headerClass = tm + "-widget-header";
                                              var contentClass = tm + "-widget-content";
                                              var s;
                                              var d;
                                  Severity: Major
                                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 2 hrs to fix

                                    Function SelectionManager has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function SelectionManager() {
                                            var t = this;
                                    
                                    
                                            // exports
                                    Severity: Major
                                    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 2 hrs to fix

                                      Function buildHTMLForSegment has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              function buildHTMLForSegment(segment) {
                                                  var html = '';
                                                  var isRTL = opt('isRTL');
                                                  var event = segment.event;
                                                  var url = event.url;
                                      Severity: Major
                                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 2 hrs to fix

                                        Function buildDayTableBodyHTML has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                function buildDayTableBodyHTML() {
                                                    var headerClass = tm + "-widget-header"; // TODO: make these when updateOptions() called
                                                    var contentClass = tm + "-widget-content";
                                                    var date;
                                                    var today = clearTime(new Date());
                                        Severity: Minor
                                        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                          Function slotSegHtml has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                                  function slotSegHtml(event, seg) {
                                                      var html = "<";
                                                      var url = event.url;
                                                      var skinCss = getSkinCss(event, opt);
                                                      var classes = ['fc-event', 'fc-event-vert'];
                                          Severity: Minor
                                          Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                            Function parseISO8601 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
                                                    // derived from http://delete.me.uk/2005/03/iso8601.html
                                                    // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html
                                                    var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);
                                                    if (!m) {
                                            Severity: Minor
                                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                              Function renderSlotSelection has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                      function renderSlotSelection(startDate, endDate) {
                                                          var helperOption = opt('selectHelper');
                                                          coordinateGrid.build();
                                                          if (helperOption) {
                                                              var col = dateToCell(startDate).col;
                                              Severity: Minor
                                              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                Function start has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                                start: function(ev, ui) {
                                                                    trigger('eventDragStart', eventElement, event, ev, ui);
                                                                    hideEvents(event, eventElement);
                                                                    origWidth = eventElement.width();
                                                                    hoverListener.start(function(cell, origCell) {
                                                Severity: Minor
                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                  Function buildCellHTML has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                          function buildCellHTML(date) {
                                                              var contentClass = tm + "-widget-content";
                                                              var month = t.start.getMonth();
                                                              var today = clearTime(new Date());
                                                              var html = '';
                                                  Severity: Minor
                                                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                    Function fullCalendar has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        $.fn.fullCalendar = function(options) {
                                                    
                                                    
                                                            // method calling
                                                            if (typeof options == 'string') {
                                                    Severity: Minor
                                                    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                      Function buildDayTableHeadHTML has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                              function buildDayTableHeadHTML() {
                                                                  var headerClass = tm + "-widget-header";
                                                                  var date;
                                                                  var html = '';
                                                                  var weekText;
                                                      Severity: Minor
                                                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                        Function draggableDayEvent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                                function draggableDayEvent(event, eventElement) {
                                                                    var hoverListener = getHoverListener();
                                                                    var dayDelta;
                                                                    eventElement.draggable({
                                                                        delay: 50,
                                                        Severity: Minor
                                                        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                          Function setWidth has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                  function setWidth(width) {
                                                                      viewWidth = width;
                                                                      colPositions.clear();
                                                                      colContentPositions.clear();
                                                          
                                                          
                                                          Severity: Minor
                                                          Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                            Function resizableSlotEvent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                    function resizableSlotEvent(event, eventElement, timeElement) {
                                                                        var snapDelta, prevSnapDelta;
                                                                        var snapHeight = getSnapHeight();
                                                                        var snapMinutes = getSnapMinutes();
                                                                        eventElement.resizable({
                                                            Severity: Minor
                                                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                              Function MonthView has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  function MonthView(element, calendar) {
                                                                      var t = this;
                                                              
                                                              
                                                                      // exports
                                                              Severity: Minor
                                                              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                Function CoordinateGrid has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    function CoordinateGrid(buildFunc) {
                                                                
                                                                        var t = this;
                                                                        var rows;
                                                                        var cols;
                                                                Severity: Minor
                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                  Function sliceSegs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                          function sliceSegs(events, visEventEnds, start, end) {
                                                                              var segs = [],
                                                                                  i, len=events.length, event,
                                                                                  eventStart, eventEnd,
                                                                                  segStart, segEnd,
                                                                  Severity: Minor
                                                                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                    Function getSkinCss has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                        function getSkinCss(event, opt) {
                                                                            var source = event.source || {};
                                                                            var eventColor = event.color;
                                                                            var sourceColor = source.color;
                                                                            var optionColor = opt('eventColor');
                                                                    Severity: Minor
                                                                    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                      Function updateEvent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                              function updateEvent(event) { // update an existing event
                                                                                  var i, len = cache.length, e,
                                                                                      defaultEventEnd = getView().defaultEventEnd, // getView???
                                                                                      startDelta = event.start - event._start,
                                                                                      endDelta = event.end ?
                                                                      Severity: Minor
                                                                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                        Function HoverListener has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            function HoverListener(coordinateGrid) {
                                                                        
                                                                        
                                                                                var t = this;
                                                                                var bindType;
                                                                        Severity: Minor
                                                                        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                          Function AgendaWeekView has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                              function AgendaWeekView(element, calendar) {
                                                                                  var t = this;
                                                                          
                                                                          
                                                                                  // exports
                                                                          Severity: Minor
                                                                          Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                            Function BasicWeekView has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                function BasicWeekView(element, calendar) {
                                                                                    var t = this;
                                                                            
                                                                            
                                                                                    // exports
                                                                            Severity: Minor
                                                                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                              Function drag has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                              drag: function(ev, ui) {
                                                                              
                                                                                                  // NOTE: this `cell` value is only useful for determining in-bounds and all-day.
                                                                                                  // Bad for anything else due to the discrepancy between the mouse position and the
                                                                                                  // element position while snapping. (problem revealed in PR #55)
                                                                              Severity: Minor
                                                                              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                                Function slotSelectionMousedown has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                        function slotSelectionMousedown(ev) {
                                                                                            if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button
                                                                                                unselect(ev);
                                                                                                var dates;
                                                                                                hoverListener.start(function(cell, origCell) {
                                                                                Severity: Minor
                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                                  Function rangeToSegments has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                          function rangeToSegments(startDate, endDate) {
                                                                                              var rowCnt = t.getRowCnt();
                                                                                              var colCnt = t.getColCnt();
                                                                                              var segments = []; // array of segments to return
                                                                                  
                                                                                  
                                                                                  Severity: Minor
                                                                                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                                    Function daySelectionMousedown has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                            function daySelectionMousedown(ev) { // not really a generic manager method, oh well
                                                                                                var cellToDate = t.cellToDate;
                                                                                                var getIsCellAllDay = t.getIsCellAllDay;
                                                                                                var hoverListener = t.getHoverListener();
                                                                                                var reportDayClick = t.reportDayClick; // this is hacky and sort of weird
                                                                                    Severity: Minor
                                                                                    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                                      Function render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                              function render(date, delta) {
                                                                                      
                                                                                                  if (delta) {
                                                                                                      addMonths(date, delta);
                                                                                                      date.setDate(1);
                                                                                      Severity: Minor
                                                                                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                                        Function _renderDayEvents has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                                function _renderDayEvents(events, doAppend, doRowHeights) {
                                                                                        
                                                                                                    // where the DOM nodes will eventually end up
                                                                                                    var finalContainer = getDaySegmentContainer();
                                                                                        
                                                                                        
                                                                                        Severity: Minor
                                                                                        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                                          Function compileSlotSegs has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                                  function compileSlotSegs(events) {
                                                                                                      var colCnt = getColCnt(),
                                                                                                          minMinute = getMinMinute(),
                                                                                                          maxMinute = getMaxMinute(),
                                                                                                          d,
                                                                                          Severity: Minor
                                                                                          Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                                                                            Function eventDrop has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                            Open

                                                                                                    function eventDrop(e, event, dayDelta, minuteDelta, allDay, ev, ui) {
                                                                                            Severity: Major
                                                                                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 50 mins to fix

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

                                                                                                      function eventResize(e, event, dayDelta, minuteDelta, ev, ui) {
                                                                                              Severity: Minor
                                                                                              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                for (i2=i+1; i2<len; i2++) {
                                                                                                                    if (format.charAt(i2) == ']') {
                                                                                                                        var subformat = format.substring(i+1, i2);
                                                                                                                        var subres = formatDate(date, subformat, options);
                                                                                                                        if (subres != formatDate(otherDate, subformat, options)) {
                                                                                                Severity: Major
                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                          if (date) {
                                                                                                                              if (i2 == i+1) {
                                                                                                                                  res += "'";
                                                                                                                              }else{
                                                                                                                                  res += format.substring(i+1, i2);
                                                                                                  Severity: Major
                                                                                                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                else if (c == '{') {
                                                                                                                    date = date2;
                                                                                                                    otherDate = date1;
                                                                                                                }
                                                                                                                else if (c == '}') {
                                                                                                    Severity: Major
                                                                                                    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                          if (format.charAt(i2) == ')') {
                                                                                                                              var subres = formatDate(date, format.substring(i+1, i2), options);
                                                                                                                              if (parseInt(subres.replace(/\D/, ''), 10)) {
                                                                                                                                  res += subres;
                                                                                                                              }
                                                                                                      Severity: Major
                                                                                                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 45 mins to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                                    if (helperRes) {
                                                                                                                                        rect.position = 'absolute';
                                                                                                                                        selectionHelper = $(helperRes)
                                                                                                                                            .css(rect)
                                                                                                                                            .appendTo(slotContainer);
                                                                                                        Severity: Major
                                                                                                        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 45 mins to fix

                                                                                                          Consider simplifying this complex logical expression.
                                                                                                          Open

                                                                                                                  if (ignoreTimezone || !m[13]) {
                                                                                                                      var check = new Date(m[1], 0, 1, 9, 0);
                                                                                                                      if (m[3]) {
                                                                                                                          date.setMonth(m[3] - 1);
                                                                                                                          check.setMonth(m[3] - 1);
                                                                                                          Severity: Major
                                                                                                          Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 40 mins to fix

                                                                                                            Function rect has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                    t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive
                                                                                                            Severity: Minor
                                                                                                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 35 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                      return null;
                                                                                                              Severity: Major
                                                                                                              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 30 mins to fix

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

                                                                                                                            for (var row=0; row<rowCnt; row++) {
                                                                                                                
                                                                                                                                // first and last cell offset for the row
                                                                                                                                var rowCellOffsetFirst = row * colCnt;
                                                                                                                                var rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 day to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 7337..7373

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                    function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {
                                                                                                                        var forwardSegs = seg.forwardSegs;
                                                                                                                        var i;
                                                                                                                
                                                                                                                        if (seg.forwardCoord === undefined) { // not already computed
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 day to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6534..6567

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

                                                                                                                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

                                                                                                                    function computeForwardSlotSegs(levels) {
                                                                                                                        var i, level;
                                                                                                                        var j, seg;
                                                                                                                        var k;
                                                                                                                
                                                                                                                
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 6 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6478..6495

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        (function() {
                                                                                                                
                                                                                                                            if (opt('weekends') === false) {
                                                                                                                                hiddenDays.push(0, 6); // 0=sunday, 6=saturday
                                                                                                                            }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 6 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 7158..7180

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

                                                                                                                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

                                                                                                                    function computeSlotSegPressures(seg) {
                                                                                                                        var forwardSegs = seg.forwardSegs;
                                                                                                                        var forwardPressure = 0;
                                                                                                                        var i, forwardSeg;
                                                                                                                
                                                                                                                
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 5 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6500..6523

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

                                                                                                                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

                                                                                                                                    $.ajax($.extend({}, ajaxDefaults, source, {
                                                                                                                                        data: data,
                                                                                                                                        success: function(events) {
                                                                                                                                            events = events || [];
                                                                                                                                            var res = applyAll(success, this, arguments);
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 5 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1480..1498

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive
                                                                                                                
                                                                                                                            if (refreshCoordinateGrid) {
                                                                                                                                coordinateGrid.build();
                                                                                                                            }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 3 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 3328..3347

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive
                                                                                                                
                                                                                                                            if (refreshCoordinateGrid) {
                                                                                                                                coordinateGrid.build();
                                                                                                                            }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 3 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 2481..2500

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

                                                                                                                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

                                                                                                                    function applyAll(functions, thisObj, args) {
                                                                                                                        if ($.isFunction(functions)) {
                                                                                                                            functions = [ functions ];
                                                                                                                        }
                                                                                                                        if (functions) {
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 3 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 2297..2309

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

                                                                                                                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

                                                                                                                        function fetchEvents(start, end) {
                                                                                                                            rangeStart = start;
                                                                                                                            rangeEnd = end;
                                                                                                                            cache = [];
                                                                                                                            var fetchID = ++currentFetchID;
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1351..1361

                                                                                                                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

                                                                                                                                $(document).one('mouseup', function(ev) {
                                                                                                                                    hoverListener.stop();
                                                                                                                                    if (dates) {
                                                                                                                                        if (+dates[0] == +dates[1]) {
                                                                                                                                            reportDayClick(dates[0], true, ev);
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 3606..3614

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

                                                                                                                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

                                                                                                                                $(document).one('mouseup', function(ev) {
                                                                                                                                    hoverListener.stop();
                                                                                                                                    if (dates) {
                                                                                                                                        if (+dates[0] == +dates[1]) {
                                                                                                                                            reportDayClick(dates[0], false, ev);
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 5925..5933

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

                                                                                                                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

                                                                                                                    function computeSlotSegCollisions(seg, otherSegs, results) {
                                                                                                                        results = results || [];
                                                                                                                
                                                                                                                        for (var i=0; i<otherSegs.length; i++) {
                                                                                                                            if (isSlotSegCollision(seg, otherSegs[i])) {
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6572..6582

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

                                                                                                                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

                                                                                                                            headCells.each(function(i, _e) {
                                                                                                                                e = $(_e);
                                                                                                                                n = e.offset().left;
                                                                                                                                if (i) {
                                                                                                                                    p[1] = n;
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 3383..3391

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

                                                                                                                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

                                                                                                                            dayHeadCells.each(function(i, _e) {
                                                                                                                                e = $(_e);
                                                                                                                                n = e.offset().left;
                                                                                                                                if (i) {
                                                                                                                                    p[1] = n;
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 2573..2581

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

                                                                                                                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

                                                                                                                        function removeEventSource(source) {
                                                                                                                            sources = $.grep(sources, function(src) {
                                                                                                                                return !isSourcesEqual(src, source);
                                                                                                                            });
                                                                                                                            // remove all client events from that source
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1566..1575

                                                                                                                Duplicated Code

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

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

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

                                                                                                                Tuning

                                                                                                                This issue has a mass of 83.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        if (level0) {
                                                                                                                
                                                                                                                            for (i=0; i<level0.length; i++) {
                                                                                                                                computeSlotSegPressures(level0[i]);
                                                                                                                            }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6437..6446

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                    function setOuterWidth(element, width, includeMargins) {
                                                                                                                        for (var i=0, e; i<element.length; i++) {
                                                                                                                            e = $(element[i]);
                                                                                                                            e.width(Math.max(0, width - hsides(e, includeMargins)));
                                                                                                                        }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1744..1749

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                    function setOuterHeight(element, height, includeMargins) {
                                                                                                                        for (var i=0, e; i<element.length; i++) {
                                                                                                                            e = $(element[i]);
                                                                                                                            e.height(Math.max(0, height - vsides(e, includeMargins)));
                                                                                                                        }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 2 hrs to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1736..1741

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

                                                                                                                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

                                                                                                                            for (i=0; i<colCnt; i++) {
                                                                                                                                if (x >= cols[i][0] && x < cols[i][1]) {
                                                                                                                                    c = i;
                                                                                                                                    break;
                                                                                                                                }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 5999..6004

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

                                                                                                                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

                                                                                                                            for (i=0; i<rowCnt; i++) {
                                                                                                                                if (y >= rows[i][0] && y < rows[i][1]) {
                                                                                                                                    r = i;
                                                                                                                                    break;
                                                                                                                                }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 6005..6010

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        function trigger(name, thisObj) {
                                                                                                                            return calendar.trigger.apply(
                                                                                                                                calendar,
                                                                                                                                [name, thisObj || t].concat(Array.prototype.slice.call(arguments, 2), [t])
                                                                                                                            );
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6986..6991

                                                                                                                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

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

                                                                                                                        function cellToDate() {
                                                                                                                            var cellOffset = cellToCellOffset.apply(null, arguments);
                                                                                                                            var dayOffset = cellOffsetToDayOffset(cellOffset);
                                                                                                                            var date = dayOffsetToDate(dayOffset);
                                                                                                                            return date;
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 7222..7227

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

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

                                                                                                                    function vpadding(element) {
                                                                                                                        return (parseFloat($.css(element[0], 'paddingTop', true)) || 0) +
                                                                                                                            (parseFloat($.css(element[0], 'paddingBottom', true)) || 0);
                                                                                                                    }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 4 other locations - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1757..1760
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1763..1766
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1769..1772
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1786..1789

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

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

                                                                                                                    function vmargins(element) {
                                                                                                                        return (parseFloat($.css(element[0], 'marginTop', true)) || 0) +
                                                                                                                            (parseFloat($.css(element[0], 'marginBottom', true)) || 0);
                                                                                                                    }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 4 other locations - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1757..1760
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1763..1766
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1769..1772
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1780..1783

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

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

                                                                                                                    function hpadding(element) {
                                                                                                                        return (parseFloat($.css(element[0], 'paddingLeft', true)) || 0) +
                                                                                                                            (parseFloat($.css(element[0], 'paddingRight', true)) || 0);
                                                                                                                    }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 4 other locations - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1763..1766
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1769..1772
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1780..1783
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1786..1789

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                                for (var i=0; i<sources.length; i++) {
                                                                                                                                    if ($.isArray(sources[i].events)) {
                                                                                                                                        sources[i].events = $.grep(sources[i].events, filter, true);
                                                                                                                                    }
                                                                                                                                }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1679..1683

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

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

                                                                                                                    function hmargins(element) {
                                                                                                                        return (parseFloat($.css(element[0], 'marginLeft', true)) || 0) +
                                                                                                                            (parseFloat($.css(element[0], 'marginRight', true)) || 0);
                                                                                                                    }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 4 other locations - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1757..1760
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1769..1772
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1780..1783
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1786..1789

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

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

                                                                                                                    function hborders(element) {
                                                                                                                        return (parseFloat($.css(element[0], 'borderLeftWidth', true)) || 0) +
                                                                                                                            (parseFloat($.css(element[0], 'borderRightWidth', true)) || 0);
                                                                                                                    }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 4 other locations - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1757..1760
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1763..1766
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1780..1783
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 1786..1789

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                    function compareForwardSlotSegs(seg1, seg2) {
                                                                                                                        // put higher-pressure first
                                                                                                                        return seg2.forwardPressure - seg1.forwardPressure ||
                                                                                                                            // put segments that are closer to initial edge first (and favor ones with no coords yet)
                                                                                                                            (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6592..6599

                                                                                                                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 (!event.source) {
                                                                                                                                if (stick) {
                                                                                                                                    stickySource.events.push(event);
                                                                                                                                    event.source = stickySource;
                                                                                                                                }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1647..1653

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

                                                                                                                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

                                                                                                                    function firstDefined() {
                                                                                                                        for (var i=0; i<arguments.length; i++) {
                                                                                                                            if (arguments[i] !== undefined) {
                                                                                                                                return arguments[i];
                                                                                                                            }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 2312..2318

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

                                                                                                                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 ($.isFunction(source.data)) {
                                                                                                                                        // supplied as a function that returns a key/value object
                                                                                                                                        customData = source.data();
                                                                                                                                    }
                                                                                                                                    else {
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1452..1459

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

                                                                                                                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 (eventsByID[event._id]) {
                                                                                                                                    eventsByID[event._id].push(event);
                                                                                                                                }else{
                                                                                                                                    eventsByID[event._id] = [event];
                                                                                                                                }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 4679..4683

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

                                                                                                                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 (eventElementsByID[event._id]) {
                                                                                                                                eventElementsByID[event._id].push(element);
                                                                                                                            }else{
                                                                                                                                eventElementsByID[event._id] = [element];
                                                                                                                            }
                                                                                                                Severity: Major
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 1 hr to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 4649..4653

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        function getAndRenderEvents() {
                                                                                                                            if (!options.lazyFetching || isFetchNeeded(currentView.visStart, currentView.visEnd)) {
                                                                                                                                fetchAndRenderEvents();
                                                                                                                            }
                                                                                                                            else {
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 55 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 839..846

                                                                                                                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

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

                                                                                                                                                    .mousedown(function() {
                                                                                                                                                        button
                                                                                                                                                            .not('.' + tm + '-state-active')
                                                                                                                                                            .not('.' + tm + '-state-disabled')
                                                                                                                                                            .addClass(tm + '-state-down');
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 55 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 821..826

                                                                                                                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

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

                                                                                                                                                    function() {
                                                                                                                                                        button
                                                                                                                                                            .not('.' + tm + '-state-active')
                                                                                                                                                            .not('.' + tm + '-state-disabled')
                                                                                                                                                            .addClass(tm + '-state-hover');
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 55 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 811..816

                                                                                                                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

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

                                                                                                                            for (i=0; i<len; i++) {
                                                                                                                                if (events[i].allDay) {
                                                                                                                                    dayEvents.push(events[i]);
                                                                                                                                }else{
                                                                                                                                    slotEvents.push(events[i]);
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 55 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 8208..8215

                                                                                                                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

                                                                                                                        function trigger(name, thisObj) {
                                                                                                                            if (options[name]) {
                                                                                                                                return options[name].apply(
                                                                                                                                    thisObj || _element,
                                                                                                                                    Array.prototype.slice.call(arguments, 2)
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 50 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1044..1051

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

                                                                                                                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

                                                                                                                        function dateToCell(date) {
                                                                                                                            var dayOffset = dateToDayOffset(date);
                                                                                                                            var cellOffset = dayOffsetToCellOffset(dayOffset);
                                                                                                                            var cell = cellOffsetToCell(cellOffset);
                                                                                                                            return cell;
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 50 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 7271..7276

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        for (; i>=0; i--) {
                                                                                                                            res = obj[parts[i].toLowerCase()];
                                                                                                                            if (res !== undefined) {
                                                                                                                                return res;
                                                                                                                            }
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 50 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 2236..2241

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                            for (j=0; j<levels.length; j++) {
                                                                                                                                if (!computeSlotSegCollisions(seg, levels[j]).length) {
                                                                                                                                    break;
                                                                                                                                }
                                                                                                                            }
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 45 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6461..6465

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        function render(inc) {
                                                                                                                            if (!content) {
                                                                                                                                initialRender();
                                                                                                                            }
                                                                                                                            else if (elementVisible()) {
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 45 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 609..618

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                            return firstDefined(
                                                                                                                                event.durationEditable,
                                                                                                                                source.durationEditable,
                                                                                                                                opt('eventDurationEditable'),
                                                                                                                                event.editable,
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 40 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 4613..4621

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

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                            return firstDefined(
                                                                                                                                event.startEditable,
                                                                                                                                source.startEditable,
                                                                                                                                opt('eventStartEditable'),
                                                                                                                                event.editable,
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 40 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 4627..4635

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

                                                                                                                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 (eventStart < start) {
                                                                                                                                        segStart = cloneDate(start);
                                                                                                                                        isStart = false;
                                                                                                                                    }else{
                                                                                                                                        segStart = eventStart;
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 35 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 3795..3801

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

                                                                                                                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

                                                                                                                            event._id = event._id || (event.id === undefined ? '_fc' + eventGUID++ : event.id + '');
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 35 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 1797..1797

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

                                                                                                                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 (eventEnd > end) {
                                                                                                                                        segEnd = cloneDate(end);
                                                                                                                                        isEnd = false;
                                                                                                                                    }else{
                                                                                                                                        segEnd = eventEnd;
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 35 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 3788..3794

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

                                                                                                                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

                                                                                                                        buttonText: {
                                                                                                                            prev: "<span class='fc-text-arrow'>&lsaquo;</span>",
                                                                                                                            next: "<span class='fc-text-arrow'>&rsaquo;</span>",
                                                                                                                            prevYear: "<span class='fc-text-arrow'>&laquo;</span>",
                                                                                                                            nextYear: "<span class='fc-text-arrow'>&raquo;</span>",
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 2 other locations - About 35 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 76..85
                                                                                                                myems-admin/js/plugins/nouslider/angular-nouislider.js on lines 5..14

                                                                                                                Duplicated Code

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

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

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

                                                                                                                Tuning

                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                                " class='" + classes.join(' ') + "'" +
                                                                                                                                    " style=" +
                                                                                                                                    "'" +
                                                                                                                                    "position:absolute;" +
                                                                                                                                    "top:" + seg.top + "px;" +
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 35 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 5353..5358

                                                                                                                Duplicated Code

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

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

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

                                                                                                                Tuning

                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                        return s.replace(/&/g, '&amp;')
                                                                                                                            .replace(/</g, '&lt;')
                                                                                                                            .replace(/>/g, '&gt;')
                                                                                                                            .replace(/'/g, '&#039;')
                                                                                                                            .replace(/"/g, '&quot;')
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 35 mins to fix
                                                                                                                myems-admin/js/plugins/bootstrap-markdown/markdown.js on lines 1404..1408

                                                                                                                Duplicated Code

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

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

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

                                                                                                                Tuning

                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                                " class='" + classNames.join(' ') + "'" +
                                                                                                                                    " style=" +
                                                                                                                                    "'" +
                                                                                                                                    "position:absolute;" +
                                                                                                                                    "left:" + segment.left + "px;" +
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 35 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 3990..3995

                                                                                                                Duplicated Code

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

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

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

                                                                                                                Tuning

                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                    function isSlotSegCollision(seg1, seg2) {
                                                                                                                        return seg1.end > seg2.start && seg1.start < seg2.end;
                                                                                                                    }
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 30 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.js on lines 6586..6588

                                                                                                                Duplicated Code

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

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

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

                                                                                                                Tuning

                                                                                                                This issue has a mass of 45.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                                    if (event._id === modifiedEventId) {
                                                                                                                                        bindSlotSeg(event, eventElement, seg);
                                                                                                                                    }else{
                                                                                                                                        eventElement[0]._fci = i; // for lazySegBind
                                                                                                                                    }
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 30 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 5626..5630

                                                                                                                Duplicated Code

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

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

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

                                                                                                                Tuning

                                                                                                                This issue has a mass of 45.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                                if (event._id === modifiedEventId) {
                                                                                                                                    bindDaySeg(event, element, segment);
                                                                                                                                }else{
                                                                                                                                    element[0]._fci = i; // for lazySegBind
                                                                                                                                }
                                                                                                                Severity: Minor
                                                                                                                Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js and 1 other location - About 30 mins to fix
                                                                                                                myems-admin/js/plugins/fullcalendar/fullcalendar.min.js on lines 3920..3924

                                                                                                                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