codefordayton/metroparks-tribute

View on GitHub

Showing 185 of 5,402 total issues

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 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 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(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 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

              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

    jQuery('.events-calendar-view-btn').click(function(){
      if(!jQuery(this).hasClass('open')) {
        jQuery(this).addClass('open');
        jQuery(this).siblings().removeClass('open');
        jQuery('#insivia-frmp-calendar').addClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 3 hrs to fix
tribute_files/main.js on lines 976..984

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

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

     jQuery('.events-list-view-btn').click(function(){
      if(!jQuery(this).hasClass('open')) {
        jQuery(this).addClass('open');
        jQuery(this).siblings().removeClass('open');
        jQuery('#insivia-frmp-calendar').removeClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 3 hrs to fix
tribute_files/main.js on lines 986..994

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

                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

      (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

          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

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

        } else if (isVideo.dailymotion) {

            a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
            if (this.core.s.dailymotionPlayerParams) {
                a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
Severity: Major
Found in tribute_files/lightgallery.min.js and 2 other locations - About 3 hrs to fix
tribute_files/lightgallery.min.js on lines 237..271
tribute_files/lightgallery.min.js on lines 246..271

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

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

        } else if (isVideo.vimeo) {

            a = '?autoplay=' + autoplay + '&api=1';
            if (this.core.s.vimeoPlayerParams) {
                a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
Severity: Major
Found in tribute_files/lightgallery.min.js and 2 other locations - About 3 hrs to fix
tribute_files/lightgallery.min.js on lines 237..271
tribute_files/lightgallery.min.js on lines 255..271

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

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 (isVideo.youtube) {

            a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
            if (this.core.s.youtubePlayerParams) {
                a = a + '&' + $.param(this.core.s.youtubePlayerParams);
Severity: Major
Found in tribute_files/lightgallery.min.js and 2 other locations - About 3 hrs to fix
tribute_files/lightgallery.min.js on lines 246..271
tribute_files/lightgallery.min.js on lines 255..271

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

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

Severity
Category
Status
Source
Language