CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        {
            var xa = x1, xb = x2, ya = y1, yb = y2;
            if (x2 < x1)
            {
                xa = x2;
Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 41..45

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

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

{var c=Coords.getFixed();if(c.w>options.minSelect[0]&&c.h>options.minSelect[1])
{Selection.enableHandles();Selection.done();}
else
{Selection.release();}
Tracker.setCursor(options.allowSelect?'crosshair':'default');};function newSelection(e)
Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 926..938

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

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

<?php
/**
 * The template for displaying Category pages
 *
 * Used to display archive-type pages for posts in a category.
Web.Admin/2014/wordpress/wp-content/themes/twentytwelve/tag.php on lines 1..52

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

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

<?php
/**
 * The template for displaying Tag pages
 *
 * Used to display archive-type pages for posts in a tag.
Web.Admin/2014/wordpress/wp-content/themes/twentytwelve/category.php on lines 1..51

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

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 reservationController has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var reservationController = function ($scope, $http, $q, $location, modalFactory, dataService, moment) {
        var url = $location.absUrl();
        var lastSlash = url.lastIndexOf('/');
        var province = url.slice(lastSlash + 1);
        var year = url.slice(lastSlash - 4, lastSlash);
Severity: Major
Found in Web.Admin/AdminApp/Controllers/controller.reservation.js - About 3 hrs to fix

    Function registerEventHandlers has 97 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function registerEventHandlers() {
                editor.on('keydown', function(e) {
                    if (e.isDefaultPrevented()) {
                        return;
                    }

      Method media_upload_form has 97 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function media_upload_form( $errors = null ) {
          global $type, $tab;
      
          $flash_action_url = admin_url('async-upload.php');
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 3 hrs to fix

        Method column_comment has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function column_comment( $comment ) {
                global $comment_status;
                $post = get_post();
        
                $user_can = $this->user_can;

          Method read_entry has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function read_entry($f, $lineno = 0) {
                  $entry = new Translation_Entry();
                  // where were we in the last step
                  // can be: comment, msgctxt, msgid, msgid_plural, msgstr, msgstr_plural
                  $context = '';
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/pomo/po.php - About 3 hrs to fix

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

                        if(xx > x1) { // right side
                          if(xx - x1 < min_x) {
                            xx = x1 + min_x;
                          } else if (xx - x1 > max_x) {
                            xx = x1 + max_x;
            Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 300..311

            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

                            $scope.model.Teams.forEach(function (team) {
                                if (team.Coach && team.Coach.IsManager) $scope.managers.push(team.Coach);
                                $scope.managers = $scope.managers.concat(team.Bowlers.filter(function (x) { return x.IsManager; }));
                            });
            Severity: Major
            Found in Web.Admin/ClientApp/Controllers/controller.contingent.js and 1 other location - About 3 hrs to fix
            Web.Admin/ClientApp/Controllers/controller.contingent.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 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

                        } else if (xx < x1) { // left side
                          if(x1 - xx < min_x) {
                            xx = x1 - min_x
                          } else if (x1 - xx > max_x) {
                            xx = x1 - max_x;
            Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 289..311

            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

                            $scope.model.Teams.forEach(function (team) {
                                if (team.Coach && team.Coach.IsDelegate) $scope.delegates.push(team.Coach);
                                $scope.delegates = $scope.delegates.concat(team.Bowlers.filter(function (x) { return x.IsDelegate; }));
                            });
            Severity: Major
            Found in Web.Admin/ClientApp/Controllers/controller.contingent.js and 1 other location - About 3 hrs to fix
            Web.Admin/ClientApp/Controllers/controller.contingent.js on lines 21..24

            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

            Function extractFiles has 96 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function extractFiles(evt, callback, allowDir, multiple) {
                    var files = [], rejFiles = [], items = evt.dataTransfer.items, processing = 0;
            
                    function addFile(file) {
                        if (validate(scope, $parse, attr, file, evt)) {
            Severity: Major
            Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 3 hrs to fix

              Function extractFiles has 96 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function extractFiles(evt, callback, allowDir, multiple) {
                      var files = [], rejFiles = [], items = evt.dataTransfer.items, processing = 0;
              
                      function addFile(file) {
                          if (validate(scope, $parse, attr, file, evt)) {
              Severity: Major
              Found in Web.Admin/z-scripts/ng-file-upload.js - About 3 hrs to fix

                Method wp_prepare_revisions_for_js has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null ) {
                    $post = get_post( $post );
                    $revisions = $authors = array();
                    $now_gmt = time();
                
                
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/revision.php - About 3 hrs to fix

                  Method get_body_class has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function get_body_class( $class = '' ) {
                      global $wp_query, $wpdb, $current_user;
                  
                      $classes = array();
                  
                  
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 3 hrs to fix

                    Function DataSanitizer has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    var DataSanitizer = (function () {
                                        function DataSanitizer() {
                                        }
                                        DataSanitizer.sanitizeKeyAndAddUniqueness = function (key, map) {
                                            var origLength = key.length;
                    Severity: Major
                    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 3 hrs to fix

                      File jquery.form.dev.js has 325 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*
                       * jQuery Form Plugin
                       * version: 2.02 (12/16/2007)
                       * @requires jQuery v1.1 or later
                       *
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery.form.dev.js - About 3 hrs to fix

                        Function createStates has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                createStates: function() {
                                    var options = this.options;
                        
                                    // Add the default states.
                                    this.states.add([
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language