CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        initialize: function() {
            this.listenTo( this.model, 'change:offset', this.render );
            this.listenTo( this.model, 'change:hovering', this.toggleVisibility );
            this.listenTo( this.model, 'change:scrubbing', this.toggleVisibility );
        },
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/revisions.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/media-models.js on lines 382..386

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

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 ( isDown ) {
                    if ( isSearchFocused ) {
                        selected = firstVisible;
                    } else if ( this.selected && this.selected.nextAll( '.widget-tpl:visible' ).length !== 0 ) {
                        selected = this.selected.nextAll( '.widget-tpl:visible:first' );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js on lines 331..337

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

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

        bindAttachmentListeners: function() {
            this.listenTo( this.attachment, 'sync', this.setLinkTypeFromUrl );
            this.listenTo( this.attachment, 'sync', this.setAspectRatio );
            this.listenTo( this.attachment, 'change', this.updateSize );
        },
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-models.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/js/revisions.js on lines 760..764

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

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

        [HttpGet]
        [OutputCache(NoStore = true, Duration = 0, VaryByParam = "None")]
        public JsonResult Rooms(string year, string province)
        {
            if (string.IsNullOrWhiteSpace(province))
Severity: Major
Found in Web.Admin/Controllers/ContingentController.cs and 2 other locations - About 1 hr to fix
Web.Admin/Controllers/ContingentController.cs on lines 102..116
Web.Admin/Controllers/ContingentController.cs on lines 134..149

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

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

        [HttpGet]
        [OutputCache(NoStore = true, Duration = 0, VaryByParam = "None")]
        public JsonResult PracticePlan(string year, string province)
        {

Severity: Major
Found in Web.Admin/Controllers/ContingentController.cs and 2 other locations - About 1 hr to fix
Web.Admin/Controllers/ContingentController.cs on lines 102..116
Web.Admin/Controllers/ContingentController.cs on lines 118..132

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

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

        [HttpGet]
        [OutputCache(NoStore = true, Duration = 0, VaryByParam = "None")]
        public JsonResult TravelPlans(string year, string province)
        {
            if (string.IsNullOrWhiteSpace(province))
Severity: Major
Found in Web.Admin/Controllers/ContingentController.cs and 2 other locations - About 1 hr to fix
Web.Admin/Controllers/ContingentController.cs on lines 118..132
Web.Admin/Controllers/ContingentController.cs on lines 134..149

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

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

        getMatrix: function (image){
            var
                  m  = api.extend({}, this.matrix)
                , sw = m.sw = m.sw || image.videoWidth || image.naturalWidth ||  image.width
                , sh = m.sh = m.sh || image.videoHeight || image.naturalHeight || image.height
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

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

        init : function() {
            var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit');
    
            t.type = $('table.widefat').hasClass('page') ? 'page' : 'post';
            t.what = '#'+t.type+'-';
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/js/inline-edit-post.dev.js - About 1 hr to fix

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

          ajaxDel: function( e, s ) {
              e = $(e); s = s || {};
              var list = this, cls = wpList.parseClass(e,'delete'), element;
              s = wpList.pre.call( list, e, s, 'delete' );
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 1 hr to fix

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

                function createMenu(context) {
                    var menuButton, menu, menuItems, isUserDefined, removedMenuItems;
        
                    removedMenuItems = tinymce.makeMap((settings.removed_menuitems || '').split(/[ ,]/));
        
        

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

              SWFUpload.prototype.updateTracking = function (file, bytesUploaded) {
                  var tracking = this.fileSpeedStats[file.id];
                  if (!tracking) {
                      this.fileSpeedStats[file.id] = tracking = {};
                  }

            Method display_theme has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function display_theme($theme, $actions = null, $show_details = true) {
                global $themes_allowedtags;
            
                if ( empty($theme) )
                    return;
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.php - About 1 hr to fix

              Method unzip_file has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function unzip_file($file, $to) {
                  global $wp_filesystem;
              
                  if ( ! $wp_filesystem || !is_object($wp_filesystem) )
                      return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/file.php - About 1 hr to fix

                Method run has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function run($options) {
                
                        $defaults = array(     'package' => '', //Please always pass this.
                                            'destination' => '', //And this
                                            'clear_destination' => false,
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php - About 1 hr to fix

                  Method screen_options has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function screen_options($screen) {
                      switch ( $screen ) {
                          case 'edit':
                              $per_page_label = __('Posts per page:');
                              break;
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 1 hr to fix

                    Method touch_time has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
                        global $wp_locale, $post, $comment;
                    
                        if ( $for_post )
                            $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ) ? false : true;
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 1 hr to fix

                      Method get_entries has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function get_entries($process_post_func=NULL) {
                              set_magic_quotes_runtime(0);
                      
                              $doing_entry = false;
                              $is_wxr_file = false;
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/import/wordpress.php - About 1 hr to fix

                        Method import_post has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function import_post( $post ) {
                                global $wpdb;
                        
                                // Make sure we haven't already imported this one
                                if ( $this->get_wp_post_ID( $post['itemid'] ) )
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.php - About 1 hr to fix

                          Method greet has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function greet() {
                                  ?>
                                  <div class="narrow">
                                  <form action="admin.php?import=livejournal" method="post">
                                  <?php wp_nonce_field( 'lj-api-import' ) ?>
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.php - About 1 hr to fix

                            Method widget_akismet_register has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function widget_akismet_register() {
                                if ( function_exists('register_sidebar_widget') ) :
                                function widget_akismet($args) {
                                    extract($args);
                                    $options = get_option('widget_akismet');
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.php - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language