codefordayton/metroparks-tribute

View on GitHub

Showing 185 of 5,402 total issues

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

            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

            $.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($('.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($('.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

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

                if (options.horizontal == 'right') {
                    $wrapper.css('left', linkOffset.left + $tooltipanchor.outerWidth() + options.offsetleft);
                } else if (options.horizontal == 'leftedge') {
                    $wrapper.css('left', linkOffset.left + $tooltipanchor.outerWidth() - $tooltipanchor.outerWidth() +  options.offsetleft);
                } else if (options.horizontal == 'left') {
Severity: Major
Found in tribute_files/popup.js and 1 other location - About 1 day to fix
tribute_files/popup.js on lines 614..624

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

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 (options.vertical == 'bottom') {
                    $wrapper.css('top', linkOffset.top + $tooltipanchor.outerHeight() + options.offsettop);
                } else if (options.vertical == 'bottomedge') {
                    $wrapper.css('top', linkOffset.top + $tooltipanchor.outerHeight() - $el.outerHeight() + options.offsettop);
                } else if (options.vertical == 'top') {
Severity: Major
Found in tribute_files/popup.js and 1 other location - About 1 day to fix
tribute_files/popup.js on lines 601..611

Duplicated Code

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

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

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

Tuning

This issue has a mass of 303.

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(typeOfBox == "Amenity") {

        amenityInfoBoxes.each(function(){
        box = jQuery(this);
        boxData = jQuery(this).attr("data-info-box");
Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 day to fix
tribute_files/main.js on lines 278..301

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

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 (typeOfBox == "Activity") {
        activityInfoBoxes.each(function(){
        box = jQuery(this);
        boxData = jQuery(this).attr("data-info-box");

Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 day to fix
tribute_files/main.js on lines 253..301

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

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

                  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

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

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

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

    accordArea.children('h4').click(function(){
      if(!jQuery(this).parent().hasClass('open')) {
        jQuery(this).parent().addClass('open');
        jQuery(this).parent().siblings().removeClass('open');
        var id = jQuery(this).parent().attr('id');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 day to fix
tribute_files/main.js on lines 427..442

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

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

    accordArea.children('h4').click(function(){
      if(!jQuery(this).parent().hasClass('open')) {
        jQuery(this).parent().addClass('open');
        jQuery(this).parent().siblings().removeClass('open');
        var id = jQuery(this).parent().attr('id');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 day to fix
tribute_files/main.js on lines 858..873

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

Severity
Category
Status
Source
Language