codefordayton/metroparks-tribute

View on GitHub
tribute_files/insivia-frmp-script.js

Summary

Maintainability
F
3 mos
Test Coverage

File insivia-frmp-script.js has 3013 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var $ = jQuery.noConflict();
(function($, root, undefined) {
  $(function() {
    'use strict';

Severity: Major
Found in tribute_files/insivia-frmp-script.js - About 1 wk to fix

    Function registration_calendar has 426 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function registration_calendar(today, facilityID, camping) {
          
          //camping = 1||0
          (camping) ? camping : camping = 0;
          
    Severity: Major
    Found in tribute_files/insivia-frmp-script.js - About 2 days to fix

      Function put_to_slide has 419 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function put_to_slide(api, target, type, id, tag, maxNum) {
            if (!api || !target) return;
            
            //Types: home, upcoming, event, location, tag, facility
            
      Severity: Major
      Found in tribute_files/insivia-frmp-script.js - About 2 days to fix

        Function api_call has 376 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function api_call(url, typeOfCall, m, y) {
              var results = '',
                  calendarEvents = '',
                  calendarListEvents = '',
                  pageCount;
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js - About 1 day to fix

          Function form_results has 357 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function form_results(query) {
                var url,
                    type,
                    results = '',
                    resultsFor = $('results-for'),
          Severity: Major
          Found in tribute_files/insivia-frmp-script.js - About 1 day to fix

            Function generate_pop_up has 348 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function generate_pop_up(api, id, type) {
                  var popUp = '',
                      url = baseUrl,
                      previous = document.referrer;
                  if(!api||!id) return;
            Severity: Major
            Found in tribute_files/insivia-frmp-script.js - About 1 day to fix

              Function build_calendar_and_list_view has 152 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function build_calendar_and_list_view(theMonth, theYear) {
                    var calendarBuild = '',
                        listViewBuild = '<div id="insivia-frmp-list-view"><div class="insivia-frmp-list-view-filters insivia-frmp-filter"></div><div class="insivia-frmp-list-view-wrapper"><!--<div class="insivia-frmp-list-nav-wrapper insivia-frmp-row"><span class="insivia-frmp-list-nav list-prev"><a href="#">&lt;</a></span><span class="insivia-frmp-list-nav list-next"><a href="#">&gt;</a></span></div>--><ul class="insivia-frmp-list-view-days">',
                        formBuild = '',
                        daysArray = days_in_month(theMonth, theYear),
              Severity: Major
              Found in tribute_files/insivia-frmp-script.js - About 6 hrs to fix

                Function the_cart has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function the_cart(programsSessionID, facilitiesSessionID) {
                            
                      var url1 = baseUrl,
                          url2 = baseUrl,
                          programCartItems = '<div id="insivia-frmp-program-cart"><h2 class="cart-sub-title">Registrations</h2><ul class="cart-list">',
                Severity: Major
                Found in tribute_files/insivia-frmp-script.js - About 5 hrs to fix

                  Function faux_pagination has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function faux_pagination(keyword) {
                        var browserURL = window.location.href,
                            apiURL = "https://reservations.metroparks.org/api/v1/programs/?keyword=",
                            url, pages,
                            alreadyPaged = $('.nav-links .page-numbers');
                  Severity: Major
                  Found in tribute_files/insivia-frmp-script.js - About 5 hrs to fix

                    Function append_new_month has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function append_new_month(theMonth, theYear, url) {      
                          var daysArray = days_in_month(theMonth, theYear),
                              w = 0,
                              d = 0,
                              m = theMonth,
                    Severity: Major
                    Found in tribute_files/insivia-frmp-script.js - About 3 hrs to fix

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

                          function get_options(target, field, type) {
                            var options = '',
                                url = '',
                                seriesIDArray = [],
                                seriesIDsArray = [];
                      Severity: Major
                      Found in tribute_files/insivia-frmp-script.js - About 3 hrs to fix

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

                            function google_map(api, type, typeOfMap, target, url) {
                              
                              if(!target) return;
                              
                              (url) ? url = url : url = '';
                        Severity: Major
                        Found in tribute_files/insivia-frmp-script.js - About 2 hrs to fix

                          Function is_openeings has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function is_openeings(openings, jsonString, formTitle, title, hasWaitingList) {
                                
                                if(!openings || !jsonString) return;
                                      
                                var registration_max;
                          Severity: Major
                          Found in tribute_files/insivia-frmp-script.js - About 2 hrs to fix

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

                                function search_results(url, append) {
                                  var results = '';
                                  //url = url.replace('%20&', '+%26');
                                  //url = url.replace('%20', '+');
                                  console.log(url);
                            Severity: Minor
                            Found in tribute_files/insivia-frmp-script.js - About 1 hr to fix

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

                                  function no_results(target, type) {
                                    
                                    (type) ? type = type : type = 'event';
                                    
                                    var message = '';
                              Severity: Minor
                              Found in tribute_files/insivia-frmp-script.js - About 1 hr to fix

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

                                    function eventRegister(trgt) {
                                      
                                      if(!trgt) return;
                                      
                                      var url = 'https://reservations.metroparks.org/api/v1/programs/register';
                                Severity: Minor
                                Found in tribute_files/insivia-frmp-script.js - About 1 hr to fix

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

                                      function generate_faux_page(target, query) {
                                        var pageUrl = window.location.href,
                                            urlQuery = '',
                                            thisApi = '',
                                            thisType = '',
                                  Severity: Minor
                                  Found in tribute_files/insivia-frmp-script.js - About 1 hr to fix

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

                                        function init_api_integration() {
                                          
                                          if(!navigator.cookieEnabled) {
                                            $('body').append('<div class="no-cookie-support">You must have browser cookies turned on in order to reserve a shelter or camping site or to register for a program.</div>');
                                          }
                                    Severity: Minor
                                    Found in tribute_files/insivia-frmp-script.js - About 1 hr to fix

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

                                          function form_functionality(source, target) {
                                            if(!source && !target) return;
                                            
                                            var inputArray = source.find('input'),
                                                selectArray = source.find('select'),
                                      Severity: Minor
                                      Found in tribute_files/insivia-frmp-script.js - About 1 hr to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                      if(queryBuild.indexOf('type') == -1) queryBuild += '&type='+inputArray[i][0];
                                        Severity: Major
                                        Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                            if(json.program.tags[l]) {
                                                              if(json.program.tags[l].marketing_color) {
                                                                series_color += ' series-'+json.program.tags[l].marketing_color;
                                                              }
                                                            }
                                          Severity: Major
                                          Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                              if($('#list-date-' + idBuild).length === 0) {
                                                                if( eventDay.getDay()+1 != 7 ) {
                                                                $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                } else {
                                                                  $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                            Severity: Major
                                            Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                            if( $('.nav-links .next').length ) {
                                                              
                                                              var it = parseInt($(alreadyPaged[alreadyPaged.length-1]).text()),
                                                                  b = it;
                                                                                
                                              Severity: Major
                                              Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                              if( inputArray[i][(inputArray[i].length-1)] == 'search' && source.find('input[id*='+inputArray[i][(inputArray[i].length-1)]+']').val() ) {
                                                                queryBuild = '?s='+source.find('input[id*='+inputArray[i][(inputArray[i].length-1)]+']').val();
                                                              }
                                                Severity: Major
                                                Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      for(var l = 0; l <= programs[k].tags.length; ++l) {
                                                                        if(programs[k].tags[l]) {
                                                                          if(programs[k].tags[l].marketing_color) {
                                                                            series_color += ' series-'+programs[k].tags[l].marketing_color;
                                                                          }
                                                  Severity: Major
                                                  Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                      for( var j = 0; j <= promises[i].responseJSON.programs.length; ++j) {
                                                                        if( promises[i].responseJSON.programs[j] ) {
                                                                          APIresults.push(promises[i].responseJSON.programs[j]);
                                                                        }
                                                                      }
                                                    Severity: Major
                                                    Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                                          if(APIresults[k].amenities.length) {
                                                                                            for(var l = 0; l<=APIresults[k].amenities.length; ++l) {
                                                                                              if(APIresults[k].amenities[l]) {
                                                                                                console.log(APIresults[k].name +' '+ APIresults[k].amenities[l].name);
                                                                                                results += '<li class="insivia-frmp-list-item-amenity '+slugify(APIresults[k].amenities[l].name)+'" data-name="'+APIresults[k].amenities[l].name+'" title="'+APIresults[k].amenities[l].name+'"></li>';
                                                      Severity: Major
                                                      Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                            if (json.permit_types.facilities[i]) {
                                                                              options += '<option value="' + json.permit_types.facilities[i].id + '">' + json.permit_types.facilities[i].name + '</option>';
                                                                            }
                                                        Severity: Major
                                                        Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                            if(json.facilities[i].address.address2) {
                                                                                              results += '<span class="insivia-frmp-list-item-address-2">'+json.facilities[i].address.address2+'</span> ';
                                                                                            }
                                                          Severity: Major
                                                          Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                if( $('#marker-ghost') ) {
                                                                                  
                                                                                  (type == 'camping') ? $('body').append('<span id="marker-ghost" data-id="'+$(this)[0].id+'" data-api="facilities" data-type="camp"></span>') : $('body').append('<span id="marker-ghost" data-id="'+$(this)[0].id+'" data-api="facilities" data-type="facility"></span>');
                                                            
                                                                                  generate_faux_page( $('#marker-ghost') );
                                                            Severity: Major
                                                            Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                              if($('#list-date-' + idBuild).length === 0) {
                                                                                $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + dayOfTheWeek.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + dayOfTheWeek + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                              }
                                                              Severity: Major
                                                              Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

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

                                                                    function put_to_slide(api, target, type, id, tag, maxNum) {
                                                                Severity: Minor
                                                                Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                      if (json.permit_types.camping[i]) {
                                                                                        options += '<option value="' + json.permit_types.camping[i].id + '">' + json.permit_types.camping[i].name + '</option>';
                                                                                      }
                                                                  Severity: Major
                                                                  Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                    for(var l = 0; l <= programs[k].tags.length; ++l) {
                                                                                      if(programs[k].tags[l]) {
                                                                                        if(programs[k].tags[l].marketing_color) {
                                                                                          series_color += ' series-'+programs[k].tags[l].marketing_color;
                                                                                        }
                                                                    Severity: Major
                                                                    Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                      if( $('.nav-links span.current').attr('class').indexOf('faux')>-1 || $('.nav-links span.current').next().attr('class').indexOf('faux')>-1 ) {
                                                                                        e.preventDefault();
                                                                                                        
                                                                                        if( $('.nav-links span.current').next().attr('class').indexOf('next') == -1 ) {
                                                                                          var thisE = $('.nav-links span.current').next(),
                                                                      Severity: Major
                                                                      Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                                              for(var k = 0; k<=json.facilities[i].amenities.length; ++k) {
                                                                                                                if(json.facilities[i].amenities[k]) {
                                                                                                                  
                                                                                                                  results += '<li class="insivia-frmp-list-item-amenity '+slugify(json.facilities[i].amenities[k].name)+'" data-name="'+json.facilities[i].amenities[k].name+'" title="'+json.facilities[i].amenities[k].name+'"></li>';
                                                                                                                }
                                                                        Severity: Major
                                                                        Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                                                for(var k = 0; k<=json.facilities[i].amenities.length; ++k) {
                                                                                                                  if(json.facilities[i].amenities[k]) {
                                                                                                                    
                                                                                                                    results += '<li class="insivia-frmp-list-item-amenity '+slugify(json.facilities[i].amenities[k].name)+'" data-name="'+json.facilities[i].amenities[k].name+'" title="'+json.facilities[i].amenities[k].name+'"></li>';
                                                                                                                  }
                                                                          Severity: Major
                                                                          Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                              if(APIresults[k].series_id) {
                                                                                              $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="series-'+APIresults[k].series_id+' insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                                              }
                                                                            Severity: Major
                                                                            Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                              if(json.dates[i].status == 'unavailable') {
                                                                                                $('#date-'+json.dates[i].date).attr('data-active', 0);
                                                                                              } else {
                                                                                                $('#date-'+json.dates[i].date).attr('data-active', 1).attr('data-value', json.dates[i].date);
                                                                                                                  
                                                                              Severity: Major
                                                                              Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                if( promises[i].responseJSON.programs[j] ) {
                                                                                                  programs.push(promises[i].responseJSON.programs[j]);
                                                                                                }
                                                                                Severity: Major
                                                                                Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                    for( var j = 0; j <= promises[i].responseJSON.facilities.length; ++j) {
                                                                                                      if( promises[i].responseJSON.facilities[j] ) {
                                                                                                        APIresults.push(promises[i].responseJSON.facilities[j]);
                                                                                                      }
                                                                                                    }
                                                                                  Severity: Major
                                                                                  Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                      if(classes.indexOf('faux-pagination') == -1) {
                                                                                                        
                                                                                                        ( parseInt( $(this).text() ) == 1) ? href = 'http://'+window.location.hostname+window.location.search : href = 'http://'+window.location.hostname+'/page/'+$(this).text()+'/'+window.location.search;
                                                                                                        
                                                                                                          $(this).replaceWith('<a class="page-numbers" href="'+href+'">'+$(this).text()+'</a>');
                                                                                    Severity: Major
                                                                                    Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                        for( var l = 0; l <= APIresults[k].tags.length; ++l ) {
                                                                                                          if(APIresults[k].tags[l]) {
                                                                                                            if(APIresults[k].tags[l].marketing_color) {
                                                                                                              seriesColor += ' series-'+APIresults[k].tags[l].marketing_color;
                                                                                                            }
                                                                                      Severity: Major
                                                                                      Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                            if(APIresults[k].address.address) {            
                                                                                                              results += '<p class="insivia-frmp-list-item-address-wrapper">'+
                                                                                                                          '<span class="insivia-frmp-list-item-address">'+APIresults[k].address.address+' ';
                                                                                                                          if(APIresults[k].address.address2) {
                                                                                                                            results += '<span class="insivia-frmp-list-item-address-2">'+APIresults[k].address.address2+'</span> ';
                                                                                        Severity: Major
                                                                                        Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                              if (!$(this).hasClass('hasEvent')) $(this).addClass('hasEvent');
                                                                                          Severity: Major
                                                                                          Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                                if( promises[i].responseJSON.programs[j] ) {
                                                                                                                  programs.push(promises[i].responseJSON.programs[j]);
                                                                                                                }
                                                                                            Severity: Major
                                                                                            Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                                    if( $(this).attr('id').indexOf( programs[k].begin_date )>-1 ) {
                                                                                                                      
                                                                                                                      if (!$(this).hasClass('hasEvent')) $(this).addClass('hasEvent');
                                                                                                                      var calTarget = 'insivia-frmp-calendar-day';
                                                                                                                      listTarget = 'insivia-frmp-list-view-day';
                                                                                              Severity: Major
                                                                                              Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                    if(prices[i]) {
                                                                                                                      formTitle = '<h3>'+ prices[i].description +' $'+ prices[i].price +'</h3>';
                                                                                                                      jsonString = '{"register" : [{"price_id" : "'+prices[i].id+'", "number_registering" : "1", "waiting_list":"'+hasWaitingList+'"}]}';
                                                                                                                      
                                                                                                                      popUp += is_openeings(openings, jsonString, formTitle, title, hasWaitingList);
                                                                                                Severity: Major
                                                                                                Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                      if(prices[i]) {
                                                                                                                        formTitle = '<h3>'+ prices[i].description +' $'+ prices[i].price +'</h3>';
                                                                                                                        jsonString = '{"register" : [{"price_id" : "'+prices[i].id+'", "number_registering" : "1", "waiting_list":"'+hasWaitingList+'"}]}';
                                                                                                                        
                                                                                                                        popUp += is_openeings(openings, jsonString, formTitle, title, hasWaitingList);
                                                                                                  Severity: Major
                                                                                                  Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                  if( $('.search-no-results').length && pages ) {
                                                                                                                    $('.blog-listing-area').html('');
                                                                                                                    search_results(url);
                                                                                                                  }
                                                                                                    Severity: Major
                                                                                                    Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                  if(query[i].indexOf('permits')>-1) {
                                                                                                                    url = baseUrl+facilitiesAPI+'/camping//permits/'+query[i].split('=')[1]+'?access_token='+accessToken;
                                                                                                                    break;
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                          if(url.indexOf('series_id=&') === -1) {
                                                                                                                            $('.series-title').html(APIresults[k].series_name);
                                                                                                                            $('.series-description').html(APIresults.series_description);
                                                                                                                          }
                                                                                                        Severity: Major
                                                                                                        Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                          Avoid deeply nested control flow statements.
                                                                                                          Open

                                                                                                                          if( $('.nav-links span.current').attr('class').indexOf('faux')>-1 ) {
                                                                                                                            e.preventDefault();
                                                                                                                            
                                                                                                                            if( $('.nav-links span.current').prev().attr('class').indexOf('faux') == -1 ) {
                                                                                                                              window.open($('.nav-links span.current').prev().attr('href'),'_self');
                                                                                                          Severity: Major
                                                                                                          Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                            Avoid deeply nested control flow statements.
                                                                                                            Open

                                                                                                                                if( promises[i].responseJSON.programs[j] ) {
                                                                                                                                  programs.push(promises[i].responseJSON.programs[j]);
                                                                                                                                }
                                                                                                            Severity: Major
                                                                                                            Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                              Avoid deeply nested control flow statements.
                                                                                                              Open

                                                                                                                                                if(json.facilities[i].address.address2) {
                                                                                                                                                  results += '<span class="insivia-frmp-list-item-address-2">'+json.facilities[i].address.address2+'</span> ';
                                                                                                                                                }
                                                                                                              Severity: Major
                                                                                                              Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                Open

                                                                                                                                    if (count <= 3) {
                                                                                                                                      $('#event-slide-' + beginDate).append(homeEvent);
                                                                                                                                      $('#event-slide-' + beginDate).attr('data-event-count', count);
                                                                                                                                    }
                                                                                                                Severity: Major
                                                                                                                Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                  Open

                                                                                                                                    if(json.facility.rental_rates.rental_rates[j].weekday_cost == 'closed') {
                                                                                                                                      popUp += '<li><span class="rental-rate">'+json.facility.rental_rates.rental_rates[j].weekday_cost+'</span></li>';
                                                                                                                                    } else {
                                                                                                                                      popUp += '<li><span class="rental-rate">$'+json.facility.rental_rates.rental_rates[j].weekday_cost.split('.')[0]+' weekdays</span></li>';
                                                                                                                                      popUp += '<li><span class="rental-rate">$'+json.facility.rental_rates.rental_rates[j].weekend_cost.split('.')[0]+' weekends</span></li>';
                                                                                                                  Severity: Major
                                                                                                                  Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                    Open

                                                                                                                                      if(json.programs[0].tags[l]) {
                                                                                                                                        if(json.programs[0].tags[l].marketing_color) {
                                                                                                                                          series_color += ' series-'+json.programs[0].tags[l].marketing_color;
                                                                                                                                        }
                                                                                                                                      }
                                                                                                                    Severity: Major
                                                                                                                    Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                      Open

                                                                                                                                      if(promises[i].responseJSON.cart.length) {
                                                                                                                                        for(var j = 0; j <= promises[i].responseJSON.cart.length; ++j) {
                                                                                                                                          if(promises[i].responseJSON.cart[j]) {
                                                                                                                                            
                                                                                                                                            cartItemStart = ( promises[i].responseJSON.cart[j].start_time.split(':')[0].charAt(0) == 0 ) ? promises[i].responseJSON.cart[j].start_time.split(':')[0].slice(1)+':'+promises[i].responseJSON.cart[j].start_time.split(':')[1] : promises[i].responseJSON.cart[j].start_time.split(':')[0]+':'+promises[i].responseJSON.cart[j].start_time.split(':')[1];
                                                                                                                      Severity: Major
                                                                                                                      Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                        Open

                                                                                                                                      if( $('.nav-links .next').length === 0 ) {
                                                                                                                                        $('.nav-links').append('<a class="next page-numbers">Next</a>');
                                                                                                                                      }
                                                                                                                        Severity: Major
                                                                                                                        Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                          Open

                                                                                                                                            switch(newURL[j].split('=')[0]) {
                                                                                                                                              case 'park_id':
                                                                                                                                                resultsForString += APIresults[0].park_name;
                                                                                                                                                break;
                                                                                                                                              case 'start_date':
                                                                                                                          Severity: Major
                                                                                                                          Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                            Open

                                                                                                                                                if(!promises[i].responseJSON.cart.length) {
                                                                                                                                                  $('.header-cart-area').removeClass('show').attr('data-cart', '/cart/');
                                                                                                                                                  $('.shopping-cart-number').html(promises[i].responseJSON.cart.length);
                                                                                                                                                }
                                                                                                                            Severity: Major
                                                                                                                            Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                              Open

                                                                                                                                                if(programs[k].tags[l]) {
                                                                                                                                                  if(programs[k].tags[l].marketing_color) {
                                                                                                                                                    series_color += ' series-'+programs[k].tags[l].marketing_color;
                                                                                                                                                  }
                                                                                                                                                }
                                                                                                                              Severity: Major
                                                                                                                              Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                Open

                                                                                                                                                     if( $(this).hasClass(listTarget) ) {
                                                                                                                                                      if(!programs[k].is_cancelled) cancellation = '<span class="red">'+programs[k].cancellation_reason+'</span>';
                                                                                                                                                      
                                                                                                                                                      $(this).find('ul.insivia-frmp-list-view-event-list').append('<li id="list-item-' + slugify(programs[k].title) + '-'+programs[k].begin_date+'" class="insivia-frmp-event">'+series+'<span class="insivia-frmp-event-title blue">' + '<a href="#' + slugify(programs[k].title) + '" class="popup-btn blue" data-api="'+programAPI+'" data-id="'+programs[k].program_number+'" data-type="program">' + programs[k].title + '</a>' + '</span>' + '<div class="insivia-frmp-list-view-event-bottom insivia-frmp-row">' + '<div class="insivia-frmp-list-view-event-left insivia-col-2">' + '<ul class="insivia-frmp-list-view-event-info-list">' + '<li class="insivia-frmp-list-view-event-info-item">' + '<span class="insivia-frmp-list-view-location-name">' + '<strong>' + programs[k].location_name + '</strong>' + '</span> | ' + '<span class="insivia-frmp-list-view-event-time">' + '<span class="insivia-frmp-list-view-event-start-time">' + start + '</span>' + ' - <span class="insivia-frmp-list-view-event-end-time">' + end + '</span>' + '</span>' + '</li>' + '<li class="insivia-frmp-list-view-event-info-item">' + '<strong><span class="insivia-frmp-list-view-ages">AGE: ' + displayAges + '</span> | ' + '<span class="insivia-frmp-list-view-price">' + displayPrice + '</span></strong>' + '</li>' + '</ul>' + '</div>' + '<div class="insivia-frmp-list-view-event-right insivia-col-2">' + '<div class="insivia-frmp-list-view-content">' + cancellation +trim_string(programs[k].description, 25) + '</div>' + '</div>' + '</div>' + '</li>');
                                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in tribute_files/insivia-frmp-script.js - About 45 mins to fix

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

                                                                                                                                      function is_openeings(openings, jsonString, formTitle, title, hasWaitingList) {
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in tribute_files/insivia-frmp-script.js - About 35 mins to fix

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

                                                                                                                                        function google_map(api, type, typeOfMap, target, url) {
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in tribute_files/insivia-frmp-script.js - About 35 mins to fix

                                                                                                                                      TODO found
                                                                                                                                      Open

                                                                                                                                              //TODO need $.when.apply();
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js by fixme

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

                                                                                                                                                  for(var i = 0; i<= json.facilities.length; ++i) {
                                                                                                                                                    if(json.facilities[i]) {
                                                                                                                                                      
                                                                                                                                                      results += '<li id="' + slugify(json.facilities[i].name) + '-shelter-list-item" class="insivia-frmp-list-item">'+
                                                                                                                                                                 '<span class="insivia-frmp-list-item-content insivia-frmp-row">'+                            
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 days to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1505..1555

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

                                                                                                                                      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(var i = 0; i<= json.facilities.length; ++i) {
                                                                                                                                                    if(json.facilities[i]) {
                                                                                                                                                      
                                                                                                                                                      results += '<li id="' + slugify(json.facilities[i].name) + '-shelter-list-item" class="insivia-frmp-list-item-item">'+
                                                                                                                                                                 '<span class="insivia-frmp-list-item-content insivia-frmp-row">'+                            
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 days to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1369..1419

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

                                                                                                                                      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

                                                                                                                                                  $.each($('.departure_date'), function() {
                                                                                                                                                      var departure_date = $(this).val(),
                                                                                                                                                          targetID = $(this).closest('form').attr('id'),
                                                                                                                                                          textArea = $('#'+targetID).find('textarea')[1],
                                                                                                                                                          jsnString = $(textArea).text(),
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3566..3583

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

                                                                                                                                      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

                                                                                                                                                  $.each($('.departure_time'), function() {
                                                                                                                                                      var departure_time = $(this).val(),
                                                                                                                                                          targetID = $(this).closest('form').attr('id'),
                                                                                                                                                          textArea = $('#'+targetID).find('textarea')[1],
                                                                                                                                                          jsnString = $(textArea).text(),
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3584..3601

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

                                                                                                                                      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

                                                                                                                                                          $.each($('.nav-links span.current'), function(i, val) {
                                                                                                                                                            var classes = $(this).attr('class'),
                                                                                                                                                                href,
                                                                                                                                                                dta = $(this).attr('data-page');  
                                                                                                                                                                              
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3992..4007

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

                                                                                                                                      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

                                                                                                                                                          $.each($('.nav-links span.current'), function(i, val) {
                                                                                                                                                            var classes = $(this).attr('class'),
                                                                                                                                                                href,
                                                                                                                                                                dta = $(this).attr('data-page');  
                                                                                                                                                                              
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 4036..4051

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

                                                                                                                                      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

                                                                                                                                            calendarBuild += '<div class="insivia-frmp-calendar-days-of-the-week insivia-frmp-row">' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[0].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[0] + '</div>' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[1].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[1] + '</div>' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[2].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[2] + '</div>' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[3].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[3] + '</div>' +
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 935..943

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

                                                                                                                                      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

                                                                                                                                            calendarBuild += '<div class="insivia-frmp-calendar-days-of-the-week insivia-frmp-row">' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[0].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[0] + '</div>' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[1].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[1] + '</div>' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[2].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[2] + '</div>' +
                                                                                                                                                              '<div class="insivia-frmp-calendar-' + dotwArray[3].toLowerCase() + ' insivia-frmp-calendar-day-of-the-week insivia-col-7">' + dotwArray[3] + '</div>' +
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3193..3201

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

                                                                                                                                      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

                                                                                                                                                        } else if( currentDay >= apr1 && currentDay <= oct31 ) {
                                                                                                                                                          //Apr 1 - Oct 31
                                                                                                                                                          if( $('#date-'+json.dates[i].date).attr('class') ) {
                                                                                                                                                            ( $('#date-'+json.dates[i].date).attr('class').indexOf('saturday')>-1 || $('#date-'+json.dates[i].date).attr('class').indexOf('sunday')>-1 ) ? $('#date-'+json.dates[i].date+' .insivia-frmp-calendar-day-events').html('<li class="starting-at">Starting at $'+json.facility.rental_rates.rental_rates[1].weekend_cost+'</li>') : $('#date-'+json.dates[i].date+' .insivia-frmp-calendar-day-events').html('<li class="starting-at">Starting at $'+json.facility.rental_rates.rental_rates[1].weekday_cost+'</li>');
                                                                                                                                                          }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3297..3312

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

                                                                                                                                      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( currentDay >= jan1 && currentDay <= mar31 ) {
                                                                                                                                                          //Jan 1 - Mar 31
                                                                                                                                                          if( $('#date-'+json.dates[i].date).attr('class') ) {
                                                                                                                                                            ( $('#date-'+json.dates[i].date).attr('class').indexOf('saturday')>-1 || $('#date-'+json.dates[i].date).attr('class').indexOf('sunday')>-1 ) ? $('#date-'+json.dates[i].date+' .insivia-frmp-calendar-day-events').html('<li class="starting-at">Starting at $'+json.facility.rental_rates.rental_rates[0].weekend_cost+'</li>') : $('#date-'+json.dates[i].date+' .insivia-frmp-calendar-day-events').html('<li class="starting-at">Starting at $'+json.facility.rental_rates.rental_rates[0].weekday_cost+'</li>');
                                                                                                                                                          }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3302..3312

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

                                                                                                                                      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

                                                                                                                                                            $(this).find('ul.insivia-frmp-list-view-event-list').append('<li id="list-item-' + slugify(programs[k].title) + '-'+programs[k].begin_date+'" class="insivia-frmp-event">'+series+'<span class="insivia-frmp-event-title blue">' + '<a href="#' + slugify(programs[k].title) + '" class="popup-btn blue" data-api="'+programAPI+'" data-id="'+programs[k].program_number+'" data-type="program">' + programs[k].title + '</a>' + '</span>' + '<div class="insivia-frmp-list-view-event-bottom insivia-frmp-row">' + '<div class="insivia-frmp-list-view-event-left insivia-col-2">' + '<ul class="insivia-frmp-list-view-event-info-list">' + '<li class="insivia-frmp-list-view-event-info-item">' + '<span class="insivia-frmp-list-view-location-name">' + '<strong>' + programs[k].location_name + '</strong>' + '</span> | ' + '<span class="insivia-frmp-list-view-event-time">' + '<span class="insivia-frmp-list-view-event-start-time">' + start + '</span>' + ' - <span class="insivia-frmp-list-view-event-end-time">' + end + '</span>' + '</span>' + '</li>' + '<li class="insivia-frmp-list-view-event-info-item">' + '<strong><span class="insivia-frmp-list-view-ages">AGE: ' + displayAges + '</span> | ' + '<span class="insivia-frmp-list-view-price">' + displayPrice + '</span></strong>' + '</li>' + '</ul>' + '</div>' + '<div class="insivia-frmp-list-view-event-right insivia-col-2">' + '<div class="insivia-frmp-list-view-content">' + cancellation +trim_string(programs[k].description, 25) + '</div>' + '</div>' + '</div>' + '</li>');
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1317..1317

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

                                                                                                                                      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

                                                                                                                                                                $(this).find('ul.insivia-frmp-list-view-event-list').append('<li id="list-item-' + slugify(programs[k].title) + '-'+programs[k].begin_date+'" class="insivia-frmp-event">'+series+'<span class="insivia-frmp-event-title blue">' + '<a href="#' + slugify(programs[k].title) + '" class="popup-btn blue" data-api="'+programAPI+'" data-id="'+programs[k].program_number+'" data-type="program">' + programs[k].title + '</a>' + '</span>' + '<div class="insivia-frmp-list-view-event-bottom insivia-frmp-row">' + '<div class="insivia-frmp-list-view-event-left insivia-col-2">' + '<ul class="insivia-frmp-list-view-event-info-list">' + '<li class="insivia-frmp-list-view-event-info-item">' + '<span class="insivia-frmp-list-view-location-name">' + '<strong>' + programs[k].location_name + '</strong>' + '</span> | ' + '<span class="insivia-frmp-list-view-event-time">' + '<span class="insivia-frmp-list-view-event-start-time">' + start + '</span>' + ' - <span class="insivia-frmp-list-view-event-end-time">' + end + '</span>' + '</span>' + '</li>' + '<li class="insivia-frmp-list-view-event-info-item">' + '<strong><span class="insivia-frmp-list-view-ages">AGE: ' + displayAges + '</span> | ' + '<span class="insivia-frmp-list-view-price">' + displayPrice + '</span></strong>' + '</li>' + '</ul>' + '</div>' + '<div class="insivia-frmp-list-view-event-right insivia-col-2">' + '<div class="insivia-frmp-list-view-content">' + cancellation+' '+trim_string(programs[k].description, 25) + '</div>' + '</div>' + '</div>' + '</li>');
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 892..892

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

                                                                                                                                      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

                                                                                                                                                            cartItemStart = ( promises[i].responseJSON.cart[j].start_time.split(':')[0].charAt(0) == 0 ) ? promises[i].responseJSON.cart[j].start_time.split(':')[0].slice(1)+':'+promises[i].responseJSON.cart[j].start_time.split(':')[1] : promises[i].responseJSON.cart[j].start_time.split(':')[0]+':'+promises[i].responseJSON.cart[j].start_time.split(':')[1];
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3699..3699

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

                                                                                                                                      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

                                                                                                                                                            cartItemEnd = ( promises[i].responseJSON.cart[j].end_time.split(':')[0].charAt(0) == 0 ) ? promises[i].responseJSON.cart[j].end_time.split(':')[0].slice(1)+':'+promises[i].responseJSON.cart[j].end_time.split(':')[1] : promises[i].responseJSON.cart[j].end_time.split(':')[0]+':'+promises[i].responseJSON.cart[j].end_time.split(':')[1];
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3697..3697

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

                                                                                                                                      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

                                                                                                                                                                  while(startVal <= endVal) {
                                                                                                                                                                    if(startVal < 12) {
                                                                                                                                                                      formBuild += '<option value="'+startVal+':00:00">'+startVal+':00 am</option>';
                                                                                                                                                                      formBuild += '<option value="'+startVal+':30:00">'+startVal+':30 am</option>';
                                                                                                                                                                    } else if(startVal == 12) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3441..3453

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

                                                                                                                                      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

                                                                                                                                                                  while(startVal <= endVal) {
                                                                                                                                                                    if(startVal < 12) {
                                                                                                                                                                      formBuild += '<option value="'+startVal+':00:00">'+startVal+':00 am</option>';
                                                                                                                                                                      formBuild += '<option value="'+startVal+':30:00">'+startVal+':30 am</option>';
                                                                                                                                                                    } else if(startVal == 12) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3477..3489

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

                                                                                                                                      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

                                                                                                                                                  $.each($('.number_registering'), function() {
                                                                                                                                          
                                                                                                                                                    $(this).on('change', function() {
                                                                                                                                                      var registering = $(this).val();
                                                                                                                                                      
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2617..2628

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

                                                                                                                                      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

                                                                                                                                              $.each($('.number_registering'), function() {
                                                                                                                                                $(this).on('change', function() {
                                                                                                                                                  var registering = $(this).val();
                                                                                                                                                  var targetID = $(this).closest('form').attr('id');            
                                                                                                                                                  var textArea = $('#'+targetID).children('textarea')[1];
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1592..1607

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

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                        var beginDate = programs[k].begin_date,
                                                                                                                                                            start = to_am_pm(programs[k].start_time),
                                                                                                                                                            end = to_am_pm(programs[k].end_time),
                                                                                                                                                            displayAges = (programs[k].age_range.match(/^[0-9]+$/)) ? 'All ages' : programs[k].age_range,
                                                                                                                                                            displayPrice = (programs[k].prices[0].price == '0.00') ? programs[k].prices[0].description : '$' + programs[k].prices[0].price,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 6 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 861..868

                                                                                                                                      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

                                                                                                                                                    var beginDate = programs[k].begin_date,
                                                                                                                                                        start = to_am_pm(programs[k].start_time),
                                                                                                                                                        end = to_am_pm(programs[k].end_time),
                                                                                                                                                        displayAges = (programs[k].age_range.match(/^[0-9]+$/)) ? 'All ages' : programs[k].age_range,
                                                                                                                                                        displayPrice = (programs[k].prices[0].price == '0.00') ? programs[k].prices[0].description : '$' + programs[k].prices[0].price,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 6 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1281..1288

                                                                                                                                      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

                                                                                                                                                    if(typeof prices == 'object') {
                                                                                                                                                      if( prices.length ) {
                                                                                                                                                        $.each( prices, function(i, val){
                                                                                                                                                          if(prices[i]) {
                                                                                                                                                            formTitle = '<h3>'+ prices[i].description +' $'+ prices[i].price +'</h3>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2532..2547

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

                                                                                                                                      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(typeof prices == 'object') {
                                                                                                                                                      if( prices.length ) {
                                                                                                                                                        $.each( prices, function(i, val){
                                                                                                                                                          if(prices[i]) {
                                                                                                                                                            formTitle = '<h3>'+ prices[i].description +' $'+ prices[i].price +'</h3>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2552..2567

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

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

                                                                                                                                                for( var i = 0; i <= promises.length; ++i) {
                                                                                                                                                  if(promises[i]) {
                                                                                                                                                    for( var j = 0; j <= promises[i].responseJSON.programs.length; ++j) {
                                                                                                                                                      if( promises[i].responseJSON.programs[j] ) {
                                                                                                                                                        programs.push(promises[i].responseJSON.programs[j]);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 417..425
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2805..2813

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 127.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                for( var i = 0; i <= promises.length; ++i) {
                                                                                                                                                  if(promises[i]) {
                                                                                                                                                    for( var j = 0; j <= promises[i].responseJSON.programs.length; ++j) {
                                                                                                                                                      if( promises[i].responseJSON.programs[j] ) {
                                                                                                                                                        programs.push(promises[i].responseJSON.programs[j]);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 417..425
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 849..857

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 127.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                    for( var i = 0; i <= promises.length; ++i) {
                                                                                                                                                      if(promises[i]) {
                                                                                                                                                        for( var j = 0; j <= promises[i].responseJSON.programs.length; ++j) {
                                                                                                                                                          if( promises[i].responseJSON.programs[j] ) {
                                                                                                                                                            programs.push(promises[i].responseJSON.programs[j]);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 849..857
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2805..2813

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 127.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                              cartItemDisplayDay = ( (new Date(promises[i].responseJSON.cart[j].date).getDay()+1) == 7 ) ? dotwArray[new Date(promises[i].responseJSON.cart[j].date).getDay()] : dotwArray[new Date(promises[i].responseJSON.cart[j].date).getDay()+1];
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3705..3705

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

                                                                                                                                      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

                                                                                                                                                              cartItemDisplayDay = ( (new Date(promises[i].responseJSON.cart[j].start_date).getDay()+1) == 7 ) ? dotwArray[new Date(promises[i].responseJSON.cart[j].start_date).getDay()] : dotwArray[new Date(promises[i].responseJSON.cart[j].start_date).getDay()+1];
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3721..3721

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

                                                                                                                                      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

                                                                                                                                                    if(json.program.tags) {
                                                                                                                                                      for(var l = 0; l <= json.program.tags.length; ++l) {
                                                                                                                                                        if(json.program.tags[l]) {
                                                                                                                                                          if(json.program.tags[l].marketing_color) {
                                                                                                                                                            series_color += ' series-'+json.program.tags[l].marketing_color;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 870..878
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1290..1298

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

                                                                                                                                      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

                                                                                                                                                    if(programs[k].tags) {
                                                                                                                                                      for(var l = 0; l <= programs[k].tags.length; ++l) {
                                                                                                                                                        if(programs[k].tags[l]) {
                                                                                                                                                          if(programs[k].tags[l].marketing_color) {
                                                                                                                                                            series_color += ' series-'+programs[k].tags[l].marketing_color;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1290..1298
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1952..1960

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

                                                                                                                                      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( query.indexOf('permits=&') == -1 ) {
                                                                                                                                                query = query.split('&');
                                                                                                                                                //if has permits
                                                                                                                                                for(var i = 0; i <= query.length; ++i) {
                                                                                                                                                  if(query[i].indexOf('permits')>-1) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2753..2765

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

                                                                                                                                      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

                                                                                                                                                        if(programs[k].tags) {
                                                                                                                                                          for(var l = 0; l <= programs[k].tags.length; ++l) {
                                                                                                                                                            if(programs[k].tags[l]) {
                                                                                                                                                              if(programs[k].tags[l].marketing_color) {
                                                                                                                                                                series_color += ' series-'+programs[k].tags[l].marketing_color;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 870..878
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1952..1960

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

                                                                                                                                      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( query.indexOf('permits=&') == -1 ) {
                                                                                                                                                query = query.split('&');
                                                                                                                                                //if has permits
                                                                                                                                                for(var i = 0; i <= query.length; ++i) {
                                                                                                                                                  if(query[i].indexOf('permits')>-1) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2772..2784

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

                                                                                                                                      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( !$('.insivia-frmp-list-view-days').children().length ) {
                                                                                                                                                      $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="series-'+programs[k].series_id+' insivia-frmp-list-view-' + dayOfTheWeek.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + dayOfTheWeek + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                                                                                                    } else {
                                                                                                                                                      if($('#list-date-' + idBuild).length === 0) {
                                                                                                                                                        $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + dayOfTheWeek.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + dayOfTheWeek + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3097..3099

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

                                                                                                                                      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(APIresults[k].series_id) {
                                                                                                                                                        $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="series-'+APIresults[k].series_id+' insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                                                                                                        }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2852..2858

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

                                                                                                                                      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

                                                                                                                                                      case 'camping':
                                                                                                                                                        for (var i = 0; i <= json.permit_types.camping.length; ++i) {
                                                                                                                                                          if (json.permit_types.camping[i]) {
                                                                                                                                                            options += '<option value="' + json.permit_types.camping[i].id + '">' + json.permit_types.camping[i].name + '</option>';
                                                                                                                                                          }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 775..781

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

                                                                                                                                      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

                                                                                                                                                      case 'facilities':
                                                                                                                                                        for (var i = 0; i <= json.permit_types.facilities.length; ++i) {
                                                                                                                                                          if (json.permit_types.facilities[i]) {
                                                                                                                                                            options += '<option value="' + json.permit_types.facilities[i].id + '">' + json.permit_types.facilities[i].name + '</option>';
                                                                                                                                                          }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 768..774

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

                                                                                                                                      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

                                                                                                                                              listViewBuild += '<li id="list-date-' + theYear + '-' + displayMonth + '-' + displayDay + '" class="insivia-frmp-list-view-' + dotwArray[w].toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active' + todayCSS + '"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[listDay.getMonth()] + ' ' + displayDay + ', ' + theYear + '</span> <span class="insivia-frmp-list-view-dotw">' + dotwArray[listDay.getDay()] + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 820..820

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

                                                                                                                                      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

                                                                                                                                              listViewBuild += '<li id="list-date-' + theYear + '-' + displayMonth + '-' + displayDay + '" class="insivia-frmp-list-view-' + dotwArray[w].toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active' + todayCSS + '"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[listDay.getMonth()] + ' ' + displayDay + ', ' + theYear + '</span> <span class="insivia-frmp-list-view-dotw">' + dotwArray[listDay.getDay()] + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 982..982

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

                                                                                                                                      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

                                                                                                                                            (url) ? url2 = url : url2 += programAPI+'?begin_date='+start.getFullYear()+'-'+(start.getMonth()+1)+'-'+start.getDate()+'&end_date='+start.getFullYear()+'-'+(start.getMonth()+1)+'-'+end.getDate()+'&access_token='+accessToken;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1217..1217

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

                                                                                                                                      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

                                                                                                                                                      url2 += programAPI+'?begin_date='+start.getFullYear()+'-'+(start.getMonth()+1)+'-'+start.getDate()+'&end_date='+start.getFullYear()+'-'+(start.getMonth()+1)+'-'+end.getDate()+'&access_token='+accessToken;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 831..831

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

                                                                                                                                      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

                                                                                                                                                formBuild = '<div class="insivia-frmp-shelter-list-filter insivia-frmp-filter">'+
                                                                                                                                                              '<form id="insivia-frmp-shelter-filter" name="insivia-frmp-shelter-filter" action="/">'+
                                                                                                                                                                '<ul class="insivia-frmp-shelter-filter-inputs insivia-frmp-row">'+
                                                                                                                                                                  '<li class="insivia-frmp-shelter-filter-input">'+
                                                                                                                                                                    '<label for="shelter-filter-parks" class="blue">Park</label>'+
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1470..1497

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

                                                                                                                                      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

                                                                                                                                                formBuild = '<div class="insivia-frmp-camp-list-filter insivia-frmp-filter">'+
                                                                                                                                                              '<form id="insivia-frmp-camp-filter" name="insivia-frmp-camp-filter" action="/">'+
                                                                                                                                                                '<ul class="insivia-frmp-camp-filter-inputs insivia-frmp-row">'+
                                                                                                                                                                  '<li class="insivia-frmp-camp-filter-input">'+
                                                                                                                                                                    '<label for="camp-filter-parks" class="blue">Park</label>'+
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1339..1366

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

                                                                                                                                      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

                                                                                                                                                  $('.insivia-frmp-gallery-link').click(function(e) {
                                                                                                                                                    e.preventDefault();
                                                                                                                                                    put_to_slide($(this).children('a').attr('data-api'), $(this), $(this).children('a').attr('data-type'), $(this).children('a').attr('data-id'));
                                                                                                                                                  });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1583..1586

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

                                                                                                                                      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

                                                                                                                                                  $('.insivia-frmp-gallery-link').click(function(e) {
                                                                                                                                                    e.preventDefault();
                                                                                                                                                    put_to_slide($(this).children('a').attr('data-api'), $(this), $(this).children('a').attr('data-type'), $(this).children('a').attr('data-id'));
                                                                                                                                                  });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1442..1445

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

                                                                                                                                      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(json.facility.photos.length) {
                                                                                                                                                    for(var i = 0; i<= json.facility.photos.length; ++i) {
                                                                                                                                                      if(json.facility.photos[i]) {
                                                                                                                                                        slides += '<div class="gallery-slide insivia-frmp-gallery" style="background: url(' + json.facility.photos[i].photo + ') center center no-repeat; background-size: cover;"></div>';
                                                                                                                                                      }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1808..1815

                                                                                                                                      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

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

                                                                                                                                              if(i == daysArray.length) {
                                                                                                                                                for(var n = w; n <= (dotwArray.length - 1); ++n) {
                                                                                                                                                  if(n == dotwArray.length || n === 0) break;
                                                                                                                                                  
                                                                                                                                                  calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3220..3227

                                                                                                                                      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

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

                                                                                                                                                  if(json.facility.photos.length) {                
                                                                                                                                                    for(var j = 0; j<= json.facility.photos.length; ++j) {
                                                                                                                                                      if(json.facility.photos[j]) {
                                                                                                                                                        popUp += '<div class="popup-slider" style="background:url('+json.facility.photos[j].thumbnail+') center center no-repeat; background-size: cover;"></div>';
                                                                                                                                                      }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 620..626

                                                                                                                                      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

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

                                                                                                                                              if(i == daysArray.length) {
                                                                                                                                                for(var n = w; n <= (dotwArray.length - 1); ++n) {
                                                                                                                                                  if(n == dotwArray.length || n === 0) break;
                                                                                                                                                  
                                                                                                                                                  calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 962..969

                                                                                                                                      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

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

                                                                                                                                                  $.each($('.insivia-frmp-lighbox-popup-close'),function() {
                                                                                                                                                    $(this).click(function() {
                                                                                                                                                      var previous = document.referrer;
                                                                                                                                                      ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut(800);
                                                                                                                                                    });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3246..3251
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3637..3642

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

                                                                                                                                      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

                                                                                                                                                            $.each($('.insivia-frmp-lighbox-popup-close'),function() {
                                                                                                                                                              $(this).click(function() {
                                                                                                                                                                var previous = document.referrer;
                                                                                                                                                                ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut(800);
                                                                                                                                                              });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3246..3251
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3523..3528

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

                                                                                                                                      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

                                                                                                                                            $.each($('.insivia-frmp-lighbox-popup-close'),function() {
                                                                                                                                              $(this).click(function() {
                                                                                                                                                var previous = document.referrer;
                                                                                                                                                ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut(800);
                                                                                                                                              });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3523..3528
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3637..3642

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

                                                                                                                                      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( eventDay.getDay()+1 != 7 ) {
                                                                                                                                                          $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                                                                                                          } else {
                                                                                                                                                            $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                                                                                                          }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2855..2857

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

                                                                                                                                      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($('#list-date-' + idBuild).length === 0) {
                                                                                                                                                        $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + dayOfTheWeek.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + dayOfTheWeek + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                                                                                                                                                      }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3102..3106

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

                                                                                                                                      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

                                                                                                                                                          case 'begin_date':
                                                                                                                                                            (newURL[0].slice(-1) == '=') ? resultsForString += 'Programs' : resultsForString += ' programs';
                                                                                                                                                            resultsForString += ' starting on ' + newURL[j].split('=')[1];
                                                                                                                                                            sameDay.push(newURL[j].split('=')[1]);
                                                                                                                                                            break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2948..2952

                                                                                                                                      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

                                                                                                                                                          case 'end_date':
                                                                                                                                                            (newURL[4].slice(-1) == '=') ? resultsForString += 'Programs' : resultsForString += ' and';
                                                                                                                                                            resultsForString +=' ending by ' + newURL[j].split('=')[1]; 
                                                                                                                                                            sameDay.push(newURL[j].split('=')[1]);                           
                                                                                                                                                            break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2943..2947

                                                                                                                                      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

                                                                                                                                                              programCartItems += '<li data-id="'+promises[i].responseJSON.cart[i].program_id+'" data-item-id="'+promises[i].responseJSON.cart[j].cart_item_id+'" class="cart-item insivia-frmp-row"><a href="/programs-events-finder/?id='+promises[i].responseJSON.cart[j].program_id+'&api=programs&type=program" class="blue cart-item-link">'+promises[i].responseJSON.cart[j].program_title+'</a><span class="item-info insivia-frmp-row"><span class="cart-item-date">'+cartItemDisplayDay+', '+monthsArray[ new Date(promises[i].responseJSON.cart[j].start_date).getMonth() ]+' '+cartItemDate+', '+new Date(promises[i].responseJSON.cart[j].start_date).getFullYear()+'</span><span class="cart-item-time"><span class="start-time">'+cartItemStart+'</span> to <span class="end-time">'+cartItemEnd+'</span></span>'+
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3725..3726

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

                                                                                                                                      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

                                                                                                                                                              facilityCartItems += '<li data-id="'+promises[i].responseJSON.cart[j].facility_id+'" data-item-id="'+promises[i].responseJSON.cart[j].cart_item_id+'" class="cart-item insivia-frmp-row"><a href="#" class="blue cart-item-link">'+promises[i].responseJSON.cart[j].facility+'</a>'+
                                                                                                                                                                                      '<span class="item-info insivia-frmp-row"><span class="cart-item-date">'+cartItemDisplayDay+', '+monthsArray[ new Date(promises[i].responseJSON.cart[j].date).getMonth() ]+' '+cartItemDate+', '+new Date(promises[i].responseJSON.cart[j].date).getFullYear()+'</span><span class="cart-item-time"><span class="start-time">'+cartItemStart+'</span> to <span class="end-time">'+cartItemEnd+'</span></span><span class="cart-item-price">$'+promises[i].responseJSON.cart[j].price+'</span>'+
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3710..3710

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

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                  var url = ( $(this).attr('data-api') == programAPI ) ? baseUrl+$(this).attr('data-api')+'/cart/'+$(this).attr('data-session')+'/delete?session_id='+$(this).attr('data-session')+'&price_id='+$(this).attr('data-price')+'&program_id='+$(this).attr('data-id')+'&access_token='+accessToken : baseUrl+$(this).attr('data-api')+'/cart/'+$(this).attr('data-session')+'/delete?session_id='+$(this).attr('data-session')+'&cart_item_id='+$(this).attr('data-id')+'&access_token='+accessToken;                        
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3761..3761

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

                                                                                                                                      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

                                                                                                                                                            cartItemEnd = ( parseInt(cartItemEnd.split(':')[0]) > 12 ) ? (parseInt(cartItemEnd.split(':')[0])-12)+':'+cartItemEnd.split(':')[1]+'pm' : cartItemEnd+'am';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3698..3698

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

                                                                                                                                      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

                                                                                                                                                            cartItemStart = ( parseInt(cartItemStart.split(':')[0]) > 12 ) ? (parseInt(cartItemStart.split(':')[0])-12)+':'+cartItemStart.split(':')[1]+'pm' : cartItemStart+'am';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3700..3700

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

                                                                                                                                      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

                                                                                                                                                queryBuild += '&'+selectArray[i][(selectArray[i].length-1)]+'='+source.find('select[id*='+selectArray[i][(selectArray[i].length-1)]+']').val();
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 193..193

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 80.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                       queryBuild += '&'+inputArray[i][(inputArray[i].length-2)]+'_'+inputArray[i][(inputArray[i].length-1)]+'='+source.find('input[id*='+inputArray[i][(inputArray[i].length-2)]+']').val() : queryBuild += '&'+inputArray[i][(inputArray[i].length-1)]+'='+source.find('input[id*='+inputArray[i][(inputArray[i].length-1)]+']').val();
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 183..183

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 80.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                    for (var i = 0; i < json.series.length; ++i) {
                                                                                                                                                      options += '<option value="' + json.series[i].id + '">' + json.series[i].name + '</option>';
                                                                                                                                                    }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 758..760

                                                                                                                                      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 (var i = 0; i < json.experiences.length; ++i) {
                                                                                                                                                    options += '<option value="' + json.experiences[i].id + '">' + json.experiences[i].name + '</option>';
                                                                                                                                                  }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 753..755

                                                                                                                                      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

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

                                                                                                                                            for (var i = 0; i < daysArray[0].getDay(); ++i) {
                                                                                                                                              calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
                                                                                                                                              ++w;
                                                                                                                                            }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3207..3210

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

                                                                                                                                      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 < daysArray[0].getDay(); ++i) {
                                                                                                                                              calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
                                                                                                                                              ++w;
                                                                                                                                            }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 949..952

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

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

                                                                                                                                                  $.each($('.reserve-now'), function() {
                                                                                                                                                    $(this).click(function(e) {
                                                                                                                                                      e.preventDefault();
                                                                                                                                                      registration_calendar(currentDate, $(this).attr('data-id'));
                                                                                                                                                    });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1452..1457
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1564..1569
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2580..2585
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2592..2597
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3130..3135

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                  $.each($('.reserve-now'), function() {
                                                                                                                                                    $(this).click(function(e) {
                                                                                                                                                      e.preventDefault();
                                                                                                                                                      registration_calendar(currentDate, $(this).attr('data-id'));
                                                                                                                                                    });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1421..1426
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1564..1569
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2580..2585
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2592..2597
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3130..3135

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                              case 'location':
                                                                                                                                                (id) ? id=id : console.error('No '+type+' ID assigned');
                                                                                                                                                url += api + '?park_id=' + id + '&access_token=' + accessToken;
                                                                                                                                                viewAllEvents = '<a href="/programs-events-finder/?parks='+id+'&topics=&experiences=&series=&start_date=&type=insivia&end_date=&search=" class="view_all_events">View All</a>';
                                                                                                                                                break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 374..378

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                  $.each($('.reserve-now'), function() {
                                                                                                                                                    $(this).click(function(e) {
                                                                                                                                                      e.preventDefault();
                                                                                                                                                      registration_calendar(currentDate, $(this).attr('data-id'));
                                                                                                                                                    });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1421..1426
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1452..1457
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2580..2585
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2592..2597
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3130..3135

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                  $.each($('.reserve-now'), function() {
                                                                                                                                                    $(this).click(function(e) {
                                                                                                                                                      e.preventDefault();
                                                                                                                                                      registration_calendar(currentDate, $(this).attr('data-id'));
                                                                                                                                                    });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1421..1426
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1452..1457
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1564..1569
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2580..2585
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2592..2597

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                              case 'event':
                                                                                                                                                (id) ? id=id : console.error('No '+type+' ID assigned');
                                                                                                                                                url += api + '?topic_id=' + id + '&access_token=' + accessToken;
                                                                                                                                                viewAllEvents = '<a href="/programs-events-finder/?parks=&topics='+id+'&experiences=&series=&start_date=&type=insivia&end_date=&search=" class="view_all_events">View All</a>';
                                                                                                                                                break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 379..383

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                            $.each($('.reserve-now'), function() {
                                                                                                                                              $(this).click(function(e) {
                                                                                                                                                e.preventDefault();
                                                                                                                                                registration_calendar(currentDate, $(this).attr('data-id'));
                                                                                                                                              });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1421..1426
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1452..1457
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1564..1569
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2592..2597
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3130..3135

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                $.each($('.reserve-now'), function() {
                                                                                                                                                  $(this).click(function(e) {
                                                                                                                                                    e.preventDefault();
                                                                                                                                                    registration_calendar(currentDate, $(this).attr('data-id'));
                                                                                                                                                  });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1421..1426
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1452..1457
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1564..1569
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2580..2585
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3130..3135

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                noEvents = '<div class="insivia-frmp-event-slider-content-bottom insivia-frmp-row no-program">' +
                                                                                                                                                '<div class="insivia-frmp-event-slider-content-left insivia-col-43">' +
                                                                                                                                                '<h3 class="insivia-frmp-event-slider-content-title">'+errorMessage+'</h3>' +
                                                                                                                                                '<span class="insivia-frmp-event-slider-content">' +
                                                                                                                                                '<span class="insivia-frmp-event-slider-content-date">' +
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 151..165

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 65.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                      series= '<a href="/programs-events-finder/?parks=&topics=&experiences=&series='+programs[k].series_id+'&start_date=&type=insivia&end_date=" class="insivia-frmp-event-series series-'+programs[k].series_id+'-link '+series_color+'">Part of ' + programs[k].series_name + ' series</a>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3017..3017

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 65.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                              var noEvents = '<div class="insivia-frmp-event-slide insivia-frmp-row no-program">' +
                                                                                                                                                  '<div class="insivia-frmp-event-slider-content-left insivia-col-43">' +
                                                                                                                                                  '<h3 class="insivia-frmp-event-slider-content-title">No programs are currently scheduled for this '+message+'.</h3>' +
                                                                                                                                                  '<span class="insivia-frmp-event-slider-content">' +
                                                                                                                                                  '<span class="insivia-frmp-event-slider-content-date">' +
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 246..260

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 65.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                        series = '<a href="/programs-events-finder/?parks=&topics=&experiences=&series='+APIresults[k].series_id+'&start_date=&type=insivia&end_date=" class="insivia-frmp-event-series series-'+APIresults[k].series_id+'-link'+seriesColor+'">Part of ' + APIresults[k].series_name + ' series</a>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2840..2840

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 65.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                            ( (parseInt(today.getMonth())+1)  < 10) ? startDate += '0'+(today.getMonth()+1) : startDate += today.getMonth()+1;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3260..3260

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

                                                                                                                                            ( (parseInt(lastDay.getMonth())+1) < 10 ) ? endDate += '0'+(lastDay.getMonth()+1) : endDate += lastDay.getMonth()+1;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3255..3255

                                                                                                                                      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

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

                                                                                                                                                        if (programs[k].series_name) series= '<a href="/programs-events-finder/?parks=&topics=&experiences=&series='+programs[k].series_id+'&start_date=&type=insivia&end_date=" class="insivia-frmp-event-series'+series_color+'">Part of ' + programs[k].series_name + ' series</a>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 879..879

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 59.

                                                                                                                                      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 (programs[k].series_name) series= '<a href="/programs-events-finder/?parks=&topics=&experiences=&series='+programs[k].series_id+'&start_date=&type=insivia&end_date=" class="insivia-frmp-event-series'+series_color+'">Part of ' + programs[k].series_name + ' series</a>';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1299..1299

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

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

                                                                                                                                                    $('.insivia-frmp-list-view-event-bottom').click(function() {
                                                                                                                                                      var near = $(this).prev('span').children('a');
                                                                                                                                                      generate_faux_page( $(near) );
                                                                                                                                                    });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 903..906
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2871..2874

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

                                                                                                                                                $('.insivia-frmp-list-view-event-bottom').click(function() {
                                                                                                                                                  var near = $(this).prev('span').children('a');
                                                                                                                                                  generate_faux_page( $(near) );
                                                                                                                                                });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1328..1331
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2871..2874

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

                                                                                                                                                $('.insivia-frmp-list-view-event-bottom').click(function() {
                                                                                                                                                  var near = $(this).prev('span').children('a');
                                                                                                                                                  generate_faux_page( $(near) );
                                                                                                                                                });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 903..906
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1328..1331

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 58.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                  for(var i = 1; i <= pageCount; ++i) {
                                                                                                                                                    var jsonRequest = $.getJSON(url+'&page='+i);
                                                                                                                                                    promises.push( jsonRequest );
                                                                                                                                                  }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 4 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 410..413
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 842..845
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2890..2893
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3837..3840

                                                                                                                                      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

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

                                                                                                                                                  for(var i = 1; i <= page; ++i) {
                                                                                                                                                    var jsonRequest = $.getJSON(url+'&page='+i);
                                                                                                                                                    promises.push( jsonRequest );
                                                                                                                                                  }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 4 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 410..413
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 842..845
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1255..1258
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3837..3840

                                                                                                                                      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

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

                                                                                                                                                for(var i = 1; i <= page; ++i) {
                                                                                                                                                  var jsonRequest = $.getJSON(url+'&page='+i);
                                                                                                                                                  promises.push( jsonRequest );
                                                                                                                                                }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 4 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 410..413
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 842..845
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1255..1258
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2890..2893

                                                                                                                                      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

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

                                                                                                                                              for(var i = 1; i <= pageCount; ++i) {
                                                                                                                                                var jsonRequest = $.getJSON(url2+'&page='+i);
                                                                                                                                                promises.push( jsonRequest );
                                                                                                                                              }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 4 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 410..413
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1255..1258
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2890..2893
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3837..3840

                                                                                                                                      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

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

                                                                                                                                                  for(var i = 1; i <= pagesCount; ++i) {
                                                                                                                                                    var jsonRequest = $.getJSON(url+'&page='+i);
                                                                                                                                                    promises.push( jsonRequest );
                                                                                                                                                  }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 4 other locations - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 842..845
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1255..1258
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2890..2893
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3837..3840

                                                                                                                                      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

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

                                                                                                                                                          case 'tag_id':
                                                                                                                                                            resultsForString += ' ' + $('#insivia-frmp-list-view-form-element-experiences option[value='+newURL[j].split('=')[1]+']').text()+' experiences';                      
                                                                                                                                                            break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2956..2958

                                                                                                                                      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

                                                                                                                                                          case 'series_id':
                                                                                                                                                            resultsForString += ' ' + $('#insivia-frmp-list-view-form-element-series option[value='+newURL[j].split('=')[1]+']').text()+' series';
                                                                                                                                                            break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 hr to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2953..2955

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

                                                                                                                                                case 'camp':
                                                                                                                                                  window.open(window.location.origin+'/rentals-permits/reserve-a-campsite/'+'?id='+thisID+'&api='+thisApi+'&type='+thisType, '_self');
                                                                                                                                                  break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 55 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2717..2719
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2720..2722

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

                                                                                                                                                case 'facility':
                                                                                                                                                  window.open(window.location.origin+'/rentals-permits/reserve-a-shelter/'+'?id='+thisID+'&api='+thisApi+'&type='+thisType, '_self');
                                                                                                                                                  break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 55 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2717..2719
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2723..2725

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

                                                                                                                                                case 'program':
                                                                                                                                                  window.open(window.location.origin+'/programs-events-finder/'+'?program_number='+thisID+'&api='+thisApi+'&type='+thisType, '_self');
                                                                                                                                                  break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 55 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2720..2722
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2723..2725

                                                                                                                                      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

                                                                                                                                                        displayMonthValue = ( (newDay.getMonth()+1) < 10 ) ? 0+''+(newDay.getMonth()+1) : (newDay.getMonth()+1),
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 50 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3030..3030

                                                                                                                                      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

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

                                                                                                                                                        displayMonthValue = ( (newDay.getMonth()+1) < 10 ) ? 0+''+(newDay.getMonth()+1) : (newDay.getMonth()+1);
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 50 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2846..2846

                                                                                                                                      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

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

                                                                                                                                                      price = (json.program) ? json.program.prices[0].price : json.programs[0].prices[0].price;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 50 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1856..1856
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1857..1857

                                                                                                                                      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

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

                                                                                                                                                  var priceID = (json.program) ? json.program.prices[0].id : json.programs[0].prices[0].id,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 50 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1849..1849
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1857..1857

                                                                                                                                      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

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

                                                                                                                                                      priceDescription = (json.program) ? json.program.prices[0].description : json.programs[0].prices[0].description,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 50 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1849..1849
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1856..1856

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

                                                                                                                                            $('input[type="button"]').click( function(e) {
                                                                                                                                              e.preventDefault();
                                                                                                                                              form_functionality($(this).closest('form'));
                                                                                                                                            });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 45 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1447..1450
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1571..1574

                                                                                                                                      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

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

                                                                                                                                                  $('input[type="button"]').click( function(e) {
                                                                                                                                                    e.preventDefault();
                                                                                                                                                    form_functionality($(this).closest('form'));
                                                                                                                                                  });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 45 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1101..1104
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1571..1574

                                                                                                                                      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

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

                                                                                                                                                  $('input[type="button"]').click( function(e) {
                                                                                                                                                    e.preventDefault();
                                                                                                                                                    form_functionality($(this).closest('form'));
                                                                                                                                                  });
                                                                                                                                      Severity: Major
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 45 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1101..1104
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1447..1450

                                                                                                                                      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

                                                                                                                                                    ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut();
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 45 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 700..700

                                                                                                                                      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

                                                                                                                                                } else if( $(this).attr('class').indexOf('next') == -1 ) {
                                                                                                                                                  if(month == 1) {
                                                                                                                                                    month = 12;
                                                                                                                                                    --year;
                                                                                                                                                  }
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 45 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3325..3339

                                                                                                                                      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

                                                                                                                                                if($(this).attr('class').indexOf('next')>-1) {
                                                                                                                                                  if(month == 12) {
                                                                                                                                                    month = 1;
                                                                                                                                                    ++year;
                                                                                                                                                  }
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 45 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3332..3339

                                                                                                                                      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

                                                                                                                                                        ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut();
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 45 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 2600..2600

                                                                                                                                      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

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

                                                                                                                                                  $.each($('.js-datepicker'), function() {
                                                                                                                                                    $(this).datepicker({
                                                                                                                                                      minDate: 0,
                                                                                                                                                      dateFormat: 'yy-mm-dd'
                                                                                                                                                    });
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1094..1099
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1576..1581

                                                                                                                                      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

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

                                                                                                                                                  $.each($('.js-datepicker'), function() {
                                                                                                                                                    $(this).datepicker({
                                                                                                                                                      minDate: 0,
                                                                                                                                                      dateFormat: 'yy-mm-dd'                
                                                                                                                                                    });
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1094..1099
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1435..1440

                                                                                                                                      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

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

                                                                                                                                            $.each($('.js-datepicker'), function() {
                                                                                                                                              $(this).datepicker({
                                                                                                                                                minDate: 0,
                                                                                                                                                dateFormat: 'yy-mm-dd'
                                                                                                                                              });
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1435..1440
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1576..1581

                                                                                                                                      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

                                                                                                                                                  $('.sub-slider .insivia-frmp-event-slide').click(function() {
                                                                                                                                                    $('.sub-slider').slick('slickGoTo', $(this).attr('data-slick-index'));
                                                                                                                                                  });
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 503..505

                                                                                                                                      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

                                                                                                                                                      $('#insivia-frmp-homepage-slider-dates .insivia-frmp-event-slide').click(function() {
                                                                                                                                                        $('#insivia-frmp-homepage-slider-dates').slick('slickGoTo', $(this).attr('data-slick-index'));
                                                                                                                                                      });
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 674..676

                                                                                                                                      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

                                                                                                                                                          popUp += '<li><span class="rental-rate">$'+json.facility.rental_rates.rental_rates[j].weekday_cost.split('.')[0]+' weekdays</span></li>';
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1787..1787

                                                                                                                                      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

                                                                                                                                                          popUp += '<li><span class="rental-rate">$'+json.facility.rental_rates.rental_rates[j].weekend_cost.split('.')[0]+' weekends</span></li>';
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 1 other location - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 1786..1786

                                                                                                                                      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

                                                                                                                                            (lastDay.getDate() < 10) ? endDate += '0'+lastDay.getDate() : endDate += lastDay.getDate();
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 276..276
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3257..3257

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                            (today.getDate() < 10) ? startDate += '0'+today.getDate() : startDate += today.getDate();
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 276..276
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3262..3262

                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

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

                                                                                                                                                    (now.getDate() < 10) ? queryEndDay = '0' + now.getDate(): queryEndDay = now.getDate();
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 35 mins to fix
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3257..3257
                                                                                                                                      tribute_files/insivia-frmp-script.js on lines 3262..3262

                                                                                                                                      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

                                                                                                                                      There are no issues that match your filters.

                                                                                                                                      Category
                                                                                                                                      Status