CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        $scope.getRange = function (from, to) {
            var result = [];

            for (var i = from; i <= to; i++)
                result.push(i);
Severity: Major
Found in Web.Admin/ClientApp/Controllers/controller.results.js and 1 other location - About 1 hr to fix
Web.Admin/ClientApp/Controllers/controller.highscores.js on lines 38..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 60.

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 4 locations. Consider refactoring.
Open

Language.shortcuts = [
    { input : '[space]', output : '&nbsp;' },
    { input : '[enter]', output : '<br />' } ,
    { input : '[j]', output : 'testing' },
    { input : '[7]', output : '&amp;' }
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/javascript.js on lines 15..20
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/php.js on lines 56..61
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/vbscript.js on lines 112..117

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

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 4 locations. Consider refactoring.
Open

Language.shortcuts = [
    { input : '[space]', output : '&nbsp;' },
    { input : '[enter]', output : '<br />' } ,
    { input : '[j]', output : 'testing' },
    { input : '[7]', output : '&amp;' }
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/asp.js on lines 112..117
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/javascript.js on lines 15..20
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/vbscript.js on lines 112..117

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

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

        function loadProfiles() {
            dataService.LoadProfiles($scope.model.year).then(function (data) {
                $scope.model.Profiles = data.data;
            });
        };
Severity: Major
Found in Web.Admin/AdminApp/Controllers/controller.reports.js and 2 other locations - About 1 hr to fix
Web.Admin/AdminApp/Controllers/controller.reports.js on lines 45..49
Web.Admin/AdminApp/Controllers/controller.reports.js on lines 158..163

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

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

      (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth : 
        this.handles[0].style.width.replace(/px$/,""));
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/slider.js on lines 52..53

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

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 4 locations. Consider refactoring.
Open

Language.snippets = [
    { input : 'dw', output : 'document.write(\'$0\');' },
    { input : 'getid', output : 'document.getElementById(\'$0\')' },
    { input : 'fun', output : 'function $0(){\n\t\n}' },
    { input : 'func', output : 'function $0(){\n\t\n}' }
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/asp.js on lines 112..117
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/php.js on lines 56..61
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/vbscript.js on lines 112..117

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

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

        function loadGuestPackages() {
            dataService.LoadGuestPackages($scope.model.year)
                .then(function (response) {
                    $scope.model.GuestPackages = response.data;
                });
Severity: Major
Found in Web.Admin/AdminApp/Controllers/controller.reports.js and 2 other locations - About 1 hr to fix
Web.Admin/AdminApp/Controllers/controller.reports.js on lines 45..49
Web.Admin/AdminApp/Controllers/controller.reports.js on lines 59..63

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

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 4 locations. Consider refactoring.
Open

Language.shortcuts = [
    { input : '[space]', output : '&nbsp;' },
    { input : '[enter]', output : '<br />' } ,
    { input : '[j]', output : 'testing' },
    { input : '[7]', output : '&amp;' }
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/asp.js on lines 112..117
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/javascript.js on lines 15..20
Web.Admin/2014/wordpress/wp-includes/js/codepress/languages/php.js on lines 56..61

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

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

function getUserSetting( name, def ) {
    var obj = getAllUserSettings();

    if ( obj.hasOwnProperty(name) )
        return obj[name];
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/utils.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/js/utils.dev.js on lines 120..130

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

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

      (this.handles[0].offsetHeight != 0 ? 
        this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) : 
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/slider.js on lines 54..55

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

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

        function loadAlternates() {
            dataService.LoadAlternates($scope.model.year).then(function (data) {
                $scope.model.Alternates = data.data;
            });
        };
Severity: Major
Found in Web.Admin/AdminApp/Controllers/controller.reports.js and 2 other locations - About 1 hr to fix
Web.Admin/AdminApp/Controllers/controller.reports.js on lines 59..63
Web.Admin/AdminApp/Controllers/controller.reports.js on lines 158..163

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

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

function getUserSetting( name, def ) {
    var o = getAllUserSettings();

    if ( o.hasOwnProperty(name) )
        return o[name];
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/utils.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/utils.js on lines 132..142

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

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

        $scope.getRange = function (from, to) {
            var result = [];

            for (var i = from; i <= to; i++)
                result.push(i);
Severity: Major
Found in Web.Admin/ClientApp/Controllers/controller.highscores.js and 1 other location - About 1 hr to fix
Web.Admin/ClientApp/Controllers/controller.results.js on lines 98..105

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

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

            queue: function (fn){
                var
                      _idx = 0
                    , _length = 0
                    , _fail = false
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

    Function workFn has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function workFn() {
          var modules = currentSpec.$modules || [];
          var strictDi = !!currentSpec.$injectorStrict;
          modules.unshift('ngMock');
          modules.unshift('ng');
    Severity: Minor
    Found in Web.Admin/z-scripts/angular-mocks.js - About 1 hr to fix

      Function _getSizes has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _getSizes: function() {
      
              var self = this,
                  norm = {
                      small: '72c',
      Severity: Minor
      Found in Web.Admin/2015/js/galleria/plugins/picasa/galleria.picasa.js - About 1 hr to fix

        Function add has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                add: function(elem, to, from, hide) {
                    if ( !elem || Galleria.TOUCH ) {
                        return;
                    }
                    if (!idle.bound) {
        Severity: Minor
        Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

          Function setNumSelection has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              setNumSelection : function(postid) {
                  var sel, elX = $('#imgedit-sel-width-' + postid), elY = $('#imgedit-sel-height-' + postid),
                      x = this.intval( elX.val() ), y = this.intval( elY.val() ),
                      img = $('#image-preview-' + postid), imgh = img.height(), imgw = img.width(),
                      sizer = this.hold['sizer'], x1, y1, x2, y2, ias = this.iasapi;
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js - About 1 hr to fix

            Function start has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            start: function(e, ui) {
                                var height, width, parent, children, tempHolder;
            
                                // handle placement for rtl orientation
                                if ( api.isRTL )
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 1 hr to fix

              Function save has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  save : function(id) {
                      var params, fields, page = $('.post_status_page').val() || '';
              
                      if( typeof(id) == 'object' )
                          id = this.getId(id);
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/js/inline-edit-post.dev.js - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language