burningpony/phd_checker

View on GitHub

Showing 103 of 103 total issues

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

                $(fx).animate({prop: 1}, {
                     duration : currentOpts.speedIn,
                     easing : currentOpts.easingIn,
                     step : _draw,
                     complete : _finish
Severity: Major
Found in public/fancybox/jquery.fancybox-1.3.4.js and 2 other locations - About 50 mins to fix
public/fancybox/jquery.fancybox-1.3.4.js on lines 409..414
public/fancybox/jquery.fancybox-1.3.4.js on lines 993..998

Duplicated Code

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

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

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            $(fx).animate({ prop: 0 }, {
                 duration : currentOpts.speedOut,
                 easing : currentOpts.easingOut,
                 step : _draw,
                 complete : _cleanup
Severity: Major
Found in public/fancybox/jquery.fancybox-1.3.4.js and 2 other locations - About 50 mins to fix
public/fancybox/jquery.fancybox-1.3.4.js on lines 409..414
public/fancybox/jquery.fancybox-1.3.4.js on lines 438..443

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

                        $(fx).animate({prop: 1}, {
                             duration : currentOpts.changeSpeed,
                             easing : currentOpts.easingChange,
                             step : _draw,
                             complete : finish_resizing
Severity: Major
Found in public/fancybox/jquery.fancybox-1.3.4.js and 2 other locations - About 50 mins to fix
public/fancybox/jquery.fancybox-1.3.4.js on lines 438..443
public/fancybox/jquery.fancybox-1.3.4.js on lines 993..998

Duplicated Code

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

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

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

Avoid deeply nested control flow statements.
Open

                        if (h == 0) tmph = 12 +'a';
                        else if (h < 12) tmph += 'a';
                        else tmph += 'p';
Severity: Major
Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 45 mins to fix

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

        var out = diff(
            o == "" ? [] : o.split(/\s+/),
            n == "" ? [] : n.split(/\s+/)
        );
    Severity: Minor
    Found in app/assets/javascripts/diff.js and 1 other location - About 45 mins to fix
    app/assets/javascripts/diff.js on lines 92..95

    Duplicated Code

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

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

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

    Avoid deeply nested control flow statements.
    Open

                                    if (aph == 12) h = 0;
                                    else h = aph;
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  } else if (aph == 12) h = 12;
                                  else h = aph + 12;
      Severity: Major
      Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 45 mins to fix

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

            var out = diff(
                o == "" ? [] : o.split(/\s+/),
                n == "" ? [] : n.split(/\s+/)
            );
        Severity: Minor
        Found in app/assets/javascripts/diff.js and 1 other location - About 45 mins to fix
        app/assets/javascripts/diff.js on lines 26..29

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                            title
                                .css({
                                    'width' : final_pos.width - (currentOpts.padding * 2),
                                    'paddingLeft' : currentOpts.padding,
                                    'paddingRight' : currentOpts.padding
        Severity: Minor
        Found in public/fancybox/jquery.fancybox-1.3.4.js and 1 other location - About 40 mins to fix
        public/fancybox/jquery.fancybox-1.3.4.js on lines 505..510

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 49.

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

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

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                            title
                                .css({
                                    'width' : final_pos.width - (currentOpts.padding * 2),
                                    'marginLeft' : currentOpts.padding,
                                    'marginRight' : currentOpts.padding
        Severity: Minor
        Found in public/fancybox/jquery.fancybox-1.3.4.js and 1 other location - About 40 mins to fix
        public/fancybox/jquery.fancybox-1.3.4.js on lines 536..541

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 49.

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

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

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

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

        Refactorings

        Further Reading

        Consider simplifying this complex logical expression.
        Open

                if (force || this.hour != hour || this.minute != minute || this.second != second || (this.ampm.length > 0 && this.ampm != ampm))
                    hasChanged = true;
        Severity: Major
        Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax)) {
                      hour = defaults.hourMin;
                      minute = defaults.minuteMin;
                      second = defaults.secondMin;
                  }
          Severity: Major
          Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                                } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
                                    e.preventDefault();
                                    $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
                                }
            Severity: Major
            Found in public/fancybox/jquery.fancybox-1.3.4.js - About 40 mins to fix

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

                              start_pos = {
                                  top     : pos.top,
                                  left : pos.left,
                                  width : wrap.width(),
                                  height : wrap.height()
              Severity: Minor
              Found in public/fancybox/jquery.fancybox-1.3.4.js and 1 other location - About 40 mins to fix
              public/fancybox/jquery.fancybox-1.3.4.js on lines 978..983

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 48.

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

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

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

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

              Refactorings

              Further Reading

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

                          final_pos = {
                              top     : pos.top ,
                              left : pos.left,
                              width :    wrap.width(),
                              height : wrap.height()
              Severity: Minor
              Found in public/fancybox/jquery.fancybox-1.3.4.js and 1 other location - About 40 mins to fix
              public/fancybox/jquery.fancybox-1.3.4.js on lines 378..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 48.

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

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

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

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

              Refactorings

              Further Reading

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

                                              te =
                                                  "(" +
                                                  ch +
                                                  " || " +
                                                  bch +
              Severity: Minor
              Found in app/assets/javascripts/simple_modal.js and 1 other location - About 35 mins to fix
              app/assets/javascripts/simple_modal.js on lines 585..596

              Duplicated Code

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

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

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                              le =
                                                  "(" +
                                                  cw +
                                                  " || " +
                                                  bcw +
              Severity: Minor
              Found in app/assets/javascripts/simple_modal.js and 1 other location - About 35 mins to fix
              app/assets/javascripts/simple_modal.js on lines 573..584

              Duplicated Code

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

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

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                          html += '<dt class="ui_tpicker_second_label" id="ui_tpicker_second_label_' + dp_id + '"' +
                                  ((o.showSecond) ? '' : noDisplay) + '>' + o.secondText + '</dt>';
              Severity: Minor
              Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 1 other location - About 30 mins to fix
              lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 265..266

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 45.

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

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

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

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

              Refactorings

              Further Reading

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

                          html += '<dt class="ui_tpicker_minute_label" id="ui_tpicker_minute_label_' + dp_id + '"' +
                                  ((o.showMinute) ? '' : noDisplay) + '>' + o.minuteText + '</dt>';
              Severity: Minor
              Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 1 other location - About 30 mins to fix
              lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 284..285

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 45.

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

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

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

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

              Refactorings

              Further Reading

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

                def c(total_responses: , responses_from_round:)
                  multiplier = case @option
                  when 1
                    0.20
                  when 2
              Severity: Minor
              Found in app/models/payment.rb and 1 other location - About 25 mins to fix
              app/models/payment.rb on lines 17..30

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 30.

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

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

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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