wahyd4/ocelots

View on GitHub

Showing 98 of 98 total issues

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

  $.fn.dropdown = function (option) {
    return this.each(function () {
      var $this = $(this)
        , data = $this.data('dropdown')
      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
Severity: Major
Found in public/bootstrap/js/bootstrap.js and 1 other location - About 3 hrs to fix
public/bootstrap/js/bootstrap.js on lines 130..137

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

Function open has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        open: function (group, opts) {
            if (!group) {
                return;
            }

Severity: Major
Found in public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js - About 3 hrs to fix

    Function _start has 98 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _start: function (index) {
                var coming = {},
                    obj,
                    href,
                    type,
    Severity: Major
    Found in public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js - About 3 hrs to fix

      Function _afterLoad has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _afterLoad: function () {
                  var coming   = F.coming,
                      previous = F.current,
                      placeholder = 'fancybox-placeholder',
                      current,
      Severity: Major
      Found in public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js - About 3 hrs to fix

        Consider simplifying this complex logical expression.
        Open

            if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
                (t == 'checkbox' || t == 'radio') && !el.checked ||
                (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
                tag == 'select' && el.selectedIndex == -1)) {
                    return null;
        Severity: Critical
        Found in public/jquery.form.js - About 3 hrs to fix

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

            , getTitle: function () {
                var title
                  , $e = this.$element
                  , o = this.options
          
          
          Severity: Major
          Found in public/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
          public/bootstrap/js/bootstrap.js on lines 1293..1302

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

          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

            , getContent: function () {
                var content
                  , $e = this.$element
                  , o = this.options
          
          
          Severity: Major
          Found in public/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
          public/bootstrap/js/bootstrap.js on lines 1165..1174

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

          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

          Function doSubmit has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function doSubmit() {
                      // make sure form attrs are set
                      var t = $form.attr('target'), a = $form.attr('action');
          
                      // update form attrs in IE friendly way
          Severity: Major
          Found in public/jquery.form.js - About 2 hrs to fix

            Function formToArray has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            $.fn.formToArray = function(semantic, elements) {
                var a = [];
                if (this.length === 0) {
                    return a;
                }
            Severity: Major
            Found in public/jquery.form.js - About 2 hrs to fix

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

                      prev: function ( direction ) {
                          var current = F.current;
              
                          if (current) {
                              if (!isString(direction)) {
              Severity: Major
              Found in public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js and 1 other location - About 2 hrs to fix
              public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js on lines 477..487

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 80.

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

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

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

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

              Refactorings

              Further Reading

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

                      next: function ( direction ) {
                          var current = F.current;
              
                          if (current) {
                              if (!isString(direction)) {
              Severity: Major
              Found in public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js and 1 other location - About 2 hrs to fix
              public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js on lines 490..500

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 80.

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

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

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

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

              Refactorings

              Further Reading

              Function bindEvents has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      bindEvents: function () {
                          var current = F.current,
                              keys;
              
                          if (!current) {
              Severity: Major
              Found in public/fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.js - About 2 hrs to fix

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

                        init: function (opts, obj) {
                            var that = this,
                                list,
                                thumbWidth  = opts.width  || 50,
                                thumbHeight = opts.height || 50,

                  Function show has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    , show: function () {
                        var $tip
                          , inside
                          , pos
                          , actualWidth
                  Severity: Minor
                  Found in public/bootstrap/js/bootstrap.js - About 1 hr to fix

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

                        function fileUploadXhr(a) {
                            var formdata = new FormData();
                    
                            for (var i=0; i < a.length; i++) {
                                formdata.append(a[i].name, a[i].value);
                    Severity: Minor
                    Found in public/jquery.form.js - About 1 hr to fix

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

                          var b = function () {
                              function l() {
                                  return c
                              }
                      
                      
                      Severity: Minor
                      Found in include.js - About 1 hr to fix

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

                                    if (b.appName == "Microsoft Internet Explorer") {
                                        var c = b.userAgent, d = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
                                        d.exec(c) != null && (a = parseFloat(RegExp.$1))
                                    }
                        Severity: Major
                        Found in include.js and 1 other location - About 1 hr to fix
                        include.js on lines 257..260

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 66.

                        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 (navigator.appName === "Microsoft Internet Explorer") {
                                        var b = navigator.userAgent, c = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
                                        c.exec(b) != null && (a = parseFloat(RegExp.$1))
                                    }
                        Severity: Major
                        Found in include.js and 1 other location - About 1 hr to fix
                        include.js on lines 358..361

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

                        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

                        Function open has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                return g() ? {open:function (e, g) {
                                    function q(a) {
                                        try {
                                            var b = JSON.parse(a.data);
                                            b.a === "ready" ? m.postMessage(o, l) : b.a === "error" ? g && (g(b.d), g = null) : b.a === "response" && (d(window, "message", q), d(window, "unload", p), p(), g && (g(null, b.d), g = null))
                        Severity: Minor
                        Found in include.js - About 1 hr to fix

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

                                      }, r = function (a, c, d) {
                                          if (typeof b.gotMessageObserver == "function")try {
                                              b.gotMessageObserver(a, d)
                                          } catch (h) {
                                              g("gotMessageObserver() raised an exception: " + h.toString())
                          Severity: Minor
                          Found in include.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language