wikimedia/mediawiki-core

View on GitHub
resources/lib/ooui/oojs-ui-core.js

Summary

Maintainability
F
2 mos
Test Coverage

File oojs-ui-core.js has 6512 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * OOUI v0.49.1
 * https://www.mediawiki.org/wiki/OOUI
 *
 * Copyright 2011–2024 OOUI Team and other contributors.
Severity: Major
Found in resources/lib/ooui/oojs-ui-core.js - About 2 wks to fix

    Function computePosition has 117 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    OO.ui.PopupWidget.prototype.computePosition = function () {
        const popupPos = {},
            anchorCss = { left: '', right: '', top: '', bottom: '' },
            popupPositionOppositeMap = {
                above: 'below',
    Severity: Major
    Found in resources/lib/ooui/oojs-ui-core.js - About 4 hrs to fix

      Function OoUiSelectFileInputWidget has 117 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      OO.ui.SelectFileInputWidget = function OoUiSelectFileInputWidget( config ) {
          config = config || {};
      
          // Construct buttons before parent method is called (calling setDisabled)
          this.selectButton = new OO.ui.ButtonWidget( $.extend( {
      Severity: Major
      Found in resources/lib/ooui/oojs-ui-core.js - About 4 hrs to fix

        Function clip has 110 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        OO.ui.mixin.ClippableElement.prototype.clip = function () {
            if ( !this.clipping ) {
                // this.$clippableScrollableContainer and this.$clippableWindow are null, so the below
                // will fail
                return this;
        Severity: Major
        Found in resources/lib/ooui/oojs-ui-core.js - About 4 hrs to fix

          Function unsafeInfuse has 101 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          OO.ui.Element.static.unsafeInfuse = function ( elem, config, domPromise ) {
              // look for a cached result of a previous infusion.
              let $elem = $( elem );
          
              if ( $elem.length > 1 ) {
          Severity: Major
          Found in resources/lib/ooui/oojs-ui-core.js - About 4 hrs to fix

            Function computePosition has 91 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            OO.ui.mixin.FloatableElement.prototype.computePosition = function () {
                const newPos = { top: '', left: '', bottom: '', right: '' };
                const direction = this.$floatableContainer.css( 'direction' );
            
                let $offsetParent = this.$floatable.offsetParent();
            Severity: Major
            Found in resources/lib/ooui/oojs-ui-core.js - About 3 hrs to fix

              Function scrollIntoView has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              OO.ui.Element.static.scrollIntoView = function ( elOrPosition, config ) {
                  const deferred = $.Deferred();
              
                  // Configuration initialization
                  config = config || {};
              Severity: Major
              Found in resources/lib/ooui/oojs-ui-core.js - About 3 hrs to fix

                Function onDocumentKeyDown has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                OO.ui.SelectWidget.prototype.onDocumentKeyDown = function ( e ) {
                    let handled = false;
                
                    const currentItem =
                        ( this.isVisible() && this.findHighlightedItem() ) ||
                Severity: Major
                Found in resources/lib/ooui/oojs-ui-core.js - About 3 hrs to fix

                  Function toggle has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  OO.ui.PopupWidget.prototype.toggle = function ( show ) {
                      show = show === undefined ? !this.isVisible() : !!show;
                  
                      const change = show !== this.isVisible();
                  
                  
                  Severity: Major
                  Found in resources/lib/ooui/oojs-ui-core.js - About 2 hrs to fix

                    Function toggle has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    OO.ui.MenuSelectWidget.prototype.toggle = function ( visible ) {
                        visible = ( visible === undefined ? !this.visible : !!visible ) && !!this.items.length;
                        const change = visible !== this.isVisible();
                    
                        if ( visible && !this.warnedUnattached && !this.isElementAttached() ) {
                    Severity: Major
                    Found in resources/lib/ooui/oojs-ui-core.js - About 2 hrs to fix

                      Function OoUiPopupWidget has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      OO.ui.PopupWidget = function OoUiPopupWidget( config ) {
                          // Configuration initialization
                          config = config || {};
                      
                          // Parent constructor
                      Severity: Major
                      Found in resources/lib/ooui/oojs-ui-core.js - About 2 hrs to fix

                        Function OoUiTextInputWidget has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        OO.ui.TextInputWidget = function OoUiTextInputWidget( config ) {
                            // Configuration initialization
                            config = $.extend( {
                                labelPosition: 'after'
                            }, config );
                        Severity: Major
                        Found in resources/lib/ooui/oojs-ui-core.js - About 2 hrs to fix

                          Function OoUiFieldLayout has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          OO.ui.FieldLayout = function OoUiFieldLayout( fieldWidget, config ) {
                              // Allow passing positional parameters inside the config object
                              if ( OO.isPlainObject( fieldWidget ) && config === undefined ) {
                                  config = fieldWidget;
                                  fieldWidget = config.fieldWidget;
                          Severity: Major
                          Found in resources/lib/ooui/oojs-ui-core.js - About 2 hrs to fix

                            Function OoUiNumberInputWidget has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            OO.ui.NumberInputWidget = function OoUiNumberInputWidget( config ) {
                                const $field = $( '<div>' ).addClass( 'oo-ui-numberInputWidget-field' );
                            
                                // Configuration initialization
                                config = $.extend( {
                            Severity: Major
                            Found in resources/lib/ooui/oojs-ui-core.js - About 2 hrs to fix

                              Function OoUiComboBoxInputWidget has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              OO.ui.ComboBoxInputWidget = function OoUiComboBoxInputWidget( config ) {
                                  // Configuration initialization
                                  config = $.extend( {
                                      autocomplete: false
                                  }, config );
                              Severity: Major
                              Found in resources/lib/ooui/oojs-ui-core.js - About 2 hrs to fix

                                Function OoUiDropdownWidget has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                OO.ui.DropdownWidget = function OoUiDropdownWidget( config ) {
                                    // Configuration initialization
                                    config = $.extend( { indicator: 'down' }, config );
                                
                                    // Parent constructor
                                Severity: Minor
                                Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                  OO.ui.mixin.FlaggedElement.prototype.setFlags = function ( flags ) {
                                      const changes = {},
                                          add = [],
                                          remove = [],
                                          classPrefix = 'oo-ui-flaggedElement-';
                                  Severity: Minor
                                  Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                    Function adjustSize has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    OO.ui.MultilineTextInputWidget.prototype.adjustSize = function ( force ) {
                                        if ( force || this.$input.val() !== this.valCache ) {
                                            if ( this.autosize ) {
                                                this.$clone
                                                    .val( this.$input.val() )
                                    Severity: Minor
                                    Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                      Function isElementInViewport has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      OO.ui.mixin.FloatableElement.prototype.isElementInViewport = function ( $element, $container ) {
                                          const direction = $element.css( 'direction' );
                                      
                                          const elemRect = $element[ 0 ].getBoundingClientRect();
                                          let contRect;
                                      Severity: Minor
                                      Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                        OO.ui.MenuSelectWidget.prototype.onDocumentKeyDown = function ( e ) {
                                            let handled = false;
                                        
                                            const currentItem = this.findHighlightedItem() || this.findFirstSelectedItem();
                                        
                                        
                                        Severity: Minor
                                        Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                          OO.ui.FieldsetLayout = function OoUiFieldsetLayout( config ) {
                                              // Configuration initialization
                                              config = config || {};
                                          
                                              // Parent constructor
                                          Severity: Minor
                                          Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                            OO.ui.FieldLayout.prototype.createHelpElement = function ( help, $overlay ) {
                                                let helpId, helpWidget;
                                            
                                                if ( this.helpInline ) {
                                                    helpWidget = new OO.ui.LabelWidget( {
                                            Severity: Minor
                                            Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                              Function updateItemVisibility has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              OO.ui.MenuSelectWidget.prototype.updateItemVisibility = function () {
                                                  if ( !this.filterFromInput || !this.$input ) {
                                                      this.clip();
                                                      return;
                                                  }
                                              Severity: Minor
                                              Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                                OO.ui.SelectWidget.prototype.findRelativeSelectableItem = function ( item, offset, filter, wrap ) {
                                                    const step = offset > 0 ? 1 : -1,
                                                        len = this.items.length;
                                                    if ( wrap === undefined ) {
                                                        wrap = true;
                                                Severity: Minor
                                                Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                                  OO.ui.SelectFileInputWidget.prototype.updateUI = function () {
                                                      // Too early
                                                      if ( !this.selectButton ) {
                                                          return;
                                                      }
                                                  Severity: Minor
                                                  Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                                    OO.ui.SelectWidget.prototype.onDocumentKeyPress = function ( e ) {
                                                        if ( !e.charCode ) {
                                                            if ( e.keyCode === OO.ui.Keys.BACKSPACE && this.keyPressBuffer !== '' ) {
                                                                this.keyPressBuffer = this.keyPressBuffer.slice( 0, this.keyPressBuffer.length - 1 );
                                                                return false;
                                                    Severity: Minor
                                                    Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                                      OO.ui.mixin.FloatableElement.prototype.togglePositioning = function ( positioning ) {
                                                          if ( !this.$floatable || !this.$floatableContainer ) {
                                                              return this;
                                                          }
                                                      
                                                      
                                                      Severity: Minor
                                                      Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                                        OO.ui.mixin.LabelElement.static.highlightQuery = function ( text, query, compare, combineMarks ) {
                                                            let offset = -1,
                                                                comboLength = 0,
                                                                comboMarks = '',
                                                                comboRegex,
                                                        Severity: Minor
                                                        Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

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

                                                          OO.ui.FieldLayout.prototype.setAlignment = function ( value ) {
                                                              if ( value !== this.align ) {
                                                                  // Default to 'left'
                                                                  if ( [ 'left', 'right', 'top', 'inline' ].indexOf( value ) === -1 ) {
                                                                      value = 'left';
                                                          Severity: Minor
                                                          Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                            Function OoUiElement has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            OO.ui.Element = function OoUiElement( config ) {
                                                                if ( OO.ui.isDemo ) {
                                                                    this.initialConfig = config;
                                                                }
                                                                // Configuration initialization
                                                            Severity: Minor
                                                            Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                              Function OoUiButtonWidget has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                              OO.ui.ButtonWidget = function OoUiButtonWidget( config ) {
                                                                  // Configuration initialization
                                                                  config = config || {};
                                                              
                                                                  // Parent constructor
                                                              Severity: Minor
                                                              Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                Function toggleClipping has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                OO.ui.mixin.ClippableElement.prototype.toggleClipping = function ( clipping ) {
                                                                    clipping = clipping === undefined ? !this.clipping : !!clipping;
                                                                
                                                                    if ( clipping && !this.warnedUnattached && !this.isElementAttached() ) {
                                                                        OO.ui.warnDeprecation( 'ClippableElement#toggleClipping: Before calling this method, the element must be attached to the DOM.' );
                                                                Severity: Minor
                                                                Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                  Function getDimensions has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                  OO.ui.Element.static.getDimensions = function ( el ) {
                                                                      const doc = this.getDocument( el ),
                                                                          win = doc.defaultView;
                                                                  
                                                                      if ( win === el || el === doc.documentElement ) {
                                                                  Severity: Minor
                                                                  Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                    Function OoUiSelectWidget has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                    OO.ui.SelectWidget = function OoUiSelectWidget( config ) {
                                                                        // Configuration initialization
                                                                        config = config || {};
                                                                    
                                                                        // Parent constructor
                                                                    Severity: Minor
                                                                    Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                      Function onWheel has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                      OO.ui.NumberInputWidget.prototype.onWheel = function ( event ) {
                                                                          let delta = 0;
                                                                      
                                                                          if ( this.isDisabled() || this.isReadOnly() ) {
                                                                              return;
                                                                      Severity: Minor
                                                                      Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                        Function OoUiMultilineTextInputWidget has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                        OO.ui.MultilineTextInputWidget = function OoUiMultilineTextInputWidget( config ) {
                                                                            config = $.extend( {
                                                                                type: 'text'
                                                                            }, config );
                                                                        
                                                                        
                                                                        Severity: Minor
                                                                        Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                          Function OoUiInputWidget has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                          OO.ui.InputWidget = function OoUiInputWidget( config ) {
                                                                              // Configuration initialization
                                                                              config = config || {};
                                                                          
                                                                              // Parent constructor
                                                                          Severity: Minor
                                                                          Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                            Function setValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                            OO.ui.SelectFileInputWidget.prototype.setValue = function ( files ) {
                                                                                if ( files === undefined || typeof files === 'string' ) {
                                                                                    // Called during init, don't replace value if just infusing.
                                                                                    return this;
                                                                                }
                                                                            Severity: Minor
                                                                            Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                              Function getClosestScrollableContainer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                              OO.ui.Element.static.getClosestScrollableContainer = function ( el, dimension ) {
                                                                                  const doc = this.getDocument( el );
                                                                                  const rootScrollableElement = this.getRootScrollableElement( el );
                                                                                  // Browsers do not correctly return the computed value of 'overflow' when 'overflow-x' and
                                                                                  // 'overflow-y' have different values, so we need to check the separate properties.
                                                                              Severity: Minor
                                                                              Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                Function onDragEnterOrOver has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                OO.ui.SelectFileInputWidget.prototype.onDragEnterOrOver = function ( e ) {
                                                                                    let hasDroppableFile = false;
                                                                                
                                                                                    const dt = e.originalEvent.dataTransfer;
                                                                                
                                                                                
                                                                                Severity: Minor
                                                                                Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                  Function OoUiMessageWidget has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                  OO.ui.MessageWidget = function OoUiMessageWidget( config ) {
                                                                                      // Configuration initialization
                                                                                      config = config || {};
                                                                                  
                                                                                      // Parent constructor
                                                                                  Severity: Minor
                                                                                  Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                    Function selectItem has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                    OO.ui.SelectWidget.prototype.selectItem = function ( item ) {
                                                                                        if ( item ) {
                                                                                            if ( item.isSelected() ) {
                                                                                                return this;
                                                                                            } else if ( this.multiselect ) {
                                                                                    Severity: Minor
                                                                                    Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                      Function setOptionsData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                      OO.ui.DropdownInputWidget.prototype.setOptionsData = function ( options ) {
                                                                                          const widget = this;
                                                                                      
                                                                                          this.optionsDirty = true;
                                                                                      
                                                                                      
                                                                                      Severity: Minor
                                                                                      Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                        Function onClick has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                        OO.ui.CheckboxMultiselectWidget.prototype.onClick = function ( e ) {
                                                                                            const $lastClicked = this.$lastClicked,
                                                                                                $nowClicked = $( e.target ).closest( '.oo-ui-checkboxMultioptionWidget' )
                                                                                                    .not( '.oo-ui-widget-disabled' );
                                                                                        
                                                                                        
                                                                                        Severity: Minor
                                                                                        Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                          Function getFrameOffset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                          OO.ui.Element.static.getFrameOffset = function ( from, to, offset ) {
                                                                                              if ( !to ) {
                                                                                                  to = window;
                                                                                              }
                                                                                              if ( !offset ) {
                                                                                          Severity: Minor
                                                                                          Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                            Function isFocusableElement has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                            OO.ui.isFocusableElement = function ( $element ) {
                                                                                                const element = $element[ 0 ];
                                                                                            
                                                                                                // Anything disabled is not focusable
                                                                                                if ( element.disabled ) {
                                                                                            Severity: Minor
                                                                                            Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                              Function getItemFromLabel has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                              OO.ui.SelectWidget.prototype.getItemFromLabel = function ( label, prefix ) {
                                                                                                  const len = this.items.length;
                                                                                              
                                                                                                  let filter = this.getItemMatcher( label, 'exact' );
                                                                                              
                                                                                              
                                                                                              Severity: Minor
                                                                                              Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                                Function loadAndGetImageUrl has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                OO.ui.SelectFileInputWidget.prototype.loadAndGetImageUrl = function ( file ) {
                                                                                                    const deferred = $.Deferred(),
                                                                                                        reader = new FileReader();
                                                                                                
                                                                                                    if (
                                                                                                Severity: Minor
                                                                                                Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                                  Function OoUiMenuSelectWidget has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                  OO.ui.MenuSelectWidget = function OoUiMenuSelectWidget( config ) {
                                                                                                      // Configuration initialization
                                                                                                      config = config || {};
                                                                                                  
                                                                                                      // Parent constructor
                                                                                                  Severity: Minor
                                                                                                  Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                        if ( this.isClippedHorizontally() || this.isFloatableOutOfView() ) {
                                                                                                                            // If opening the popup in the normal direction causes it to be clipped,
                                                                                                                            // open in the opposite one instead
                                                                                                                            const normalWidth = this.$element.width();
                                                                                                                            this.isAutoFlipped = !this.isAutoFlipped;
                                                                                                    Severity: Major
                                                                                                    Found in resources/lib/ooui/oojs-ui-core.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                          if ( originalHeight > flippedHeight ) {
                                                                                                                              this.setVerticalPosition( this.originalVerticalPosition );
                                                                                                                          }
                                                                                                      Severity: Major
                                                                                                      Found in resources/lib/ooui/oojs-ui-core.js - About 45 mins to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                    if ( flags[ flag ] ) {
                                                                                                                        // Set
                                                                                                                        if ( !this.flags[ flag ] ) {
                                                                                                                            changes[ flag ] = true;
                                                                                                                            this.flags[ flag ] = true;
                                                                                                        Severity: Major
                                                                                                        Found in resources/lib/ooui/oojs-ui-core.js - About 45 mins to fix

                                                                                                          Avoid deeply nested control flow statements.
                                                                                                          Open

                                                                                                                              if ( this.isClippedVertically() || this.isFloatableOutOfView() ) {
                                                                                                                                  // If opening the popup in the normal direction causes it to be clipped,
                                                                                                                                  // open in the opposite one instead
                                                                                                                                  const normalHeight = this.$element.height();
                                                                                                                                  this.isAutoFlipped = !this.isAutoFlipped;
                                                                                                          Severity: Major
                                                                                                          Found in resources/lib/ooui/oojs-ui-core.js - About 45 mins to fix

                                                                                                            Consider simplifying this complex logical expression.
                                                                                                            Open

                                                                                                                if ( event.type === 'input' || event.type === 'mouseup' || ( event.type === 'keydown' && (
                                                                                                                    event.keyCode === OO.ui.Keys.ENTER ||
                                                                                                                    event.keyCode === OO.ui.Keys.UP ||
                                                                                                                    event.keyCode === OO.ui.Keys.DOWN
                                                                                                                ) ) ) {
                                                                                                            Severity: Major
                                                                                                            Found in resources/lib/ooui/oojs-ui-core.js - About 40 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                  return undefined;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                    return rootScrollableElement;
                                                                                                                Severity: Major
                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                              return false;
                                                                                                                  Severity: Major
                                                                                                                  Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                            return true;
                                                                                                                    Severity: Major
                                                                                                                    Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                          return false;
                                                                                                                      Severity: Major
                                                                                                                      Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                            return elemRect.top <= contRect.bottom && elemRect.bottom >= contRect.top &&
                                                                                                                                elemRect.left <= contRect.right && elemRect.right >= contRect.left;
                                                                                                                        Severity: Major
                                                                                                                        Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                              return false;
                                                                                                                          Severity: Major
                                                                                                                          Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                return true;
                                                                                                                            Severity: Major
                                                                                                                            Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                      return true;
                                                                                                                              Severity: Major
                                                                                                                              Found in resources/lib/ooui/oojs-ui-core.js - About 30 mins to fix

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

                                                                                                                                OO.ui.mixin.IconElement.prototype.setIconElement = function ( $icon ) {
                                                                                                                                    if ( this.$icon ) {
                                                                                                                                        this.$icon
                                                                                                                                            .removeClass( 'oo-ui-iconElement-icon oo-ui-icon-' + this.icon )
                                                                                                                                            .removeAttr( 'title' );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 7 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3253..3269

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

                                                                                                                                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

                                                                                                                                OO.ui.mixin.IndicatorElement.prototype.setIndicatorElement = function ( $indicator ) {
                                                                                                                                    if ( this.$indicator ) {
                                                                                                                                        this.$indicator
                                                                                                                                            .removeClass( 'oo-ui-indicatorElement-indicator oo-ui-indicator-' + this.indicator )
                                                                                                                                            .removeAttr( 'title' );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 7 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3113..3129

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

                                                                                                                                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

                                                                                                                                OO.ui.TextInputWidget.prototype.setValidityFlag = function ( isValid ) {
                                                                                                                                    const widget = this,
                                                                                                                                        setFlag = function ( valid ) {
                                                                                                                                            if ( !valid ) {
                                                                                                                                                widget.$input.attr( 'aria-invalid', 'true' );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 6 hrs to fix
                                                                                                                                resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js on lines 676..696

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

                                                                                                                                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

                                                                                                                                    OO.ui.Element.static.computeNativeScrollLeft = function ( normalizedOffset, el ) {
                                                                                                                                        // All browsers use the correct scroll type ('negative') on the root, so don't
                                                                                                                                        // do any fixups when looking at the root element
                                                                                                                                        const direction = isRoot( el ) ? 'ltr' : $( el ).css( 'direction' );
                                                                                                                                
                                                                                                                                
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 5 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1138..1155

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

                                                                                                                                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

                                                                                                                                    OO.ui.Element.static.computeNormalizedScrollLeft = function ( nativeOffset, el ) {
                                                                                                                                        // All browsers use the correct scroll type ('negative') on the root, so don't
                                                                                                                                        // do any fixups when looking at the root element
                                                                                                                                        const direction = isRoot( el ) ? 'ltr' : $( el ).css( 'direction' );
                                                                                                                                
                                                                                                                                
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 5 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1164..1181

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

                                                                                                                                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 ( !this.sawWheelEvent ) {
                                                                                                                                            if ( event.originalEvent.wheelDeltaX ) {
                                                                                                                                                delta = -event.originalEvent.wheelDeltaX;
                                                                                                                                            } else if ( event.originalEvent.wheelDeltaY ) {
                                                                                                                                                delta = event.originalEvent.wheelDeltaY;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 5 hrs to fix
                                                                                                                                resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 745..755

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

                                                                                                                                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

                                                                                                                                    for ( let i = 0; i < this.items.length; i++ ) {
                                                                                                                                        const pressed = this.items[ i ] === item;
                                                                                                                                        if ( this.items[ i ].isPressed() !== pressed ) {
                                                                                                                                            this.items[ i ].setPressed( pressed );
                                                                                                                                            if ( changed ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 5 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7779..7790

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

                                                                                                                                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

                                                                                                                                    for ( let i = 0; i < this.items.length; i++ ) {
                                                                                                                                        const highlighted = this.items[ i ] === item;
                                                                                                                                        if ( this.items[ i ].isHighlighted() !== highlighted ) {
                                                                                                                                            this.items[ i ].setHighlighted( highlighted );
                                                                                                                                            if ( changed ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 5 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7971..7982

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

                                                                                                                                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

                                                                                                                                OO.ui.mixin.IconElement = function OoUiMixinIconElement( config ) {
                                                                                                                                    // Configuration initialization
                                                                                                                                    config = config || {};
                                                                                                                                
                                                                                                                                    // Properties
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3206..3217

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

                                                                                                                                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

                                                                                                                                OO.ui.mixin.IndicatorElement = function OoUiMixinIndicatorElement( config ) {
                                                                                                                                    // Configuration initialization
                                                                                                                                    config = config || {};
                                                                                                                                
                                                                                                                                    // Properties
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3057..3068

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

                                                                                                                                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 ( clipWidth ) {
                                                                                                                                        // The hacks below are no longer needed for Firefox and Chrome after T349034,
                                                                                                                                        // but may still be needed for Safari. TODO: Test and maybe remove them.
                                                                                                                                
                                                                                                                                        // Set overflow to 'scroll' first to avoid browser bugs causing bogus scrollbars (T67059),
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5813..5839

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

                                                                                                                                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 ( clipHeight ) {
                                                                                                                                        // The hacks below are no longer needed for Firefox and Chrome after T349034,
                                                                                                                                        // but may still be needed for Safari. TODO: Test and maybe remove them.
                                                                                                                                
                                                                                                                                        // Set overflow to 'scroll' first to avoid browser bugs causing bogus scrollbars (T67059),
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5786..5812

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

                                                                                                                                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 (
                                                                                                                                                ( this.isClippedVertically() || this.isFloatableOutOfView() ) &&
                                                                                                                                                this.originalVerticalPosition !== 'center'
                                                                                                                                            ) {
                                                                                                                                                // If opening the menu in one direction causes it to be clipped, flip it
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js on lines 652..669

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

                                                                                                                                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

                                                                                                                                OO.ui.mixin.FloatableElement.prototype.setVerticalPosition = function ( position ) {
                                                                                                                                    if ( [ 'below', 'above', 'top', 'bottom', 'center' ].indexOf( position ) === -1 ) {
                                                                                                                                        throw new Error( 'Invalid value for vertical position: ' + position );
                                                                                                                                    }
                                                                                                                                    if ( this.verticalPosition !== position ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5128..5138

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

                                                                                                                                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

                                                                                                                                OO.ui.mixin.FloatableElement.prototype.setHorizontalPosition = function ( position ) {
                                                                                                                                    if ( [ 'before', 'after', 'start', 'end', 'center' ].indexOf( position ) === -1 ) {
                                                                                                                                        throw new Error( 'Invalid value for horizontal position: ' + position );
                                                                                                                                    }
                                                                                                                                    if ( this.horizontalPosition !== position ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5111..5121

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

                                                                                                                                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

                                                                                                                                    return function () {
                                                                                                                                        const context = this,
                                                                                                                                            args = arguments,
                                                                                                                                            later = function () {
                                                                                                                                                timeout = null;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 4 hrs to fix
                                                                                                                                resources/src/mediawiki.util/util.js on lines 198..214

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

                                                                                                                                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

                                                                                                                                OO.ui.RadioInputWidget.prototype.restorePreInfuseState = function ( state ) {
                                                                                                                                    OO.ui.RadioInputWidget.super.prototype.restorePreInfuseState.call( this, state );
                                                                                                                                    if ( state.checked !== undefined && state.checked !== this.isSelected() ) {
                                                                                                                                        this.setSelected( state.checked );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10546..10551

                                                                                                                                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

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

                                                                                                                                OO.ui.CheckboxInputWidget.prototype.restorePreInfuseState = function ( state ) {
                                                                                                                                    OO.ui.CheckboxInputWidget.super.prototype.restorePreInfuseState.call( this, state );
                                                                                                                                    if ( state.checked !== undefined && state.checked !== this.isSelected() ) {
                                                                                                                                        this.setSelected( state.checked );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10998..11003

                                                                                                                                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

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

                                                                                                                                OO.ui.NumberInputWidget.prototype.updateControlsDisabled = function () {
                                                                                                                                    const disabled = this.isDisabled() || this.isReadOnly();
                                                                                                                                    if ( this.minusButton ) {
                                                                                                                                        this.minusButton.setDisabled( disabled );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12728..12737

                                                                                                                                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

                                                                                                                                OO.ui.ComboBoxInputWidget.prototype.updateControlsDisabled = function () {
                                                                                                                                    const disabled = this.isDisabled() || this.isReadOnly();
                                                                                                                                    if ( this.dropdownButton ) {
                                                                                                                                        this.dropdownButton.setDisabled( disabled );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 14053..14062

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxInputWidget.static.gatherPreInfuseState = function ( node, config ) {
                                                                                                                                    const state = OO.ui.CheckboxInputWidget.super.static.gatherPreInfuseState( node, config );
                                                                                                                                    if ( config.$input ) {
                                                                                                                                        state.checked = config.$input.prop( 'checked' );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10931..10937

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

                                                                                                                                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

                                                                                                                                OO.ui.RadioInputWidget.static.gatherPreInfuseState = function ( node, config ) {
                                                                                                                                    const state = OO.ui.RadioInputWidget.super.static.gatherPreInfuseState( node, config );
                                                                                                                                    if ( config.$input ) {
                                                                                                                                        state.checked = config.$input.prop( 'checked' );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10422..10428

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

                                                                                                                                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

                                                                                                                                OO.ui.SelectWidget.prototype.findHighlightedItem = function () {
                                                                                                                                    for ( let i = 0; i < this.items.length; i++ ) {
                                                                                                                                        if ( this.items[ i ].isHighlighted() ) {
                                                                                                                                            return this.items[ i ];
                                                                                                                                        }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7687..7694

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

                                                                                                                                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

                                                                                                                                OO.ui.SelectWidget.prototype.findFirstSelectedItem = function () {
                                                                                                                                    for ( let i = 0; i < this.items.length; i++ ) {
                                                                                                                                        if ( this.items[ i ].isSelected() ) {
                                                                                                                                            return this.items[ i ];
                                                                                                                                        }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7733..7740

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

                                                                                                                                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

                                                                                                                                OO.ui.MenuSelectWidget.prototype.unbindDocumentKeyDownListener = function () {
                                                                                                                                    if ( this.$input ) {
                                                                                                                                        this.$input.off( 'keydown', this.onDocumentKeyDownHandler );
                                                                                                                                    } else {
                                                                                                                                        OO.ui.MenuSelectWidget.super.prototype.unbindDocumentKeyDownListener.call( this );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8628..8634

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

                                                                                                                                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

                                                                                                                                OO.ui.MenuSelectWidget.prototype.bindDocumentKeyDownListener = function () {
                                                                                                                                    if ( this.$input ) {
                                                                                                                                        this.$input.on( 'keydown', this.onDocumentKeyDownHandler );
                                                                                                                                    } else {
                                                                                                                                        OO.ui.MenuSelectWidget.super.prototype.bindDocumentKeyDownListener.call( this );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8639..8645

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

                                                                                                                                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

                                                                                                                                OO.ui.OptionWidget.prototype.setHighlighted = function ( state ) {
                                                                                                                                    if ( this.constructor.static.highlightable ) {
                                                                                                                                        this.highlighted = !!state;
                                                                                                                                        this.$element.toggleClass( 'oo-ui-optionWidget-highlighted', state );
                                                                                                                                        this.updateThemeClasses();
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7058..7065

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

                                                                                                                                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

                                                                                                                                OO.ui.OptionWidget.prototype.setPressed = function ( state ) {
                                                                                                                                    if ( this.constructor.static.pressable ) {
                                                                                                                                        this.pressed = !!state;
                                                                                                                                        this.$element.toggleClass( 'oo-ui-optionWidget-pressed', state );
                                                                                                                                        this.updateThemeClasses();
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7039..7046

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

                                                                                                                                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 ( item ) {
                                                                                                                                        if ( this.isVisible() && item.constructor.static.highlightable ) {
                                                                                                                                            this.highlightItem( item );
                                                                                                                                        } else {
                                                                                                                                            if ( this.screenReaderMode ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7479..7489

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

                                                                                                                                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 ( nextItem ) {
                                                                                                                                            if ( this.isVisible() && nextItem.constructor.static.highlightable ) {
                                                                                                                                                this.highlightItem( nextItem );
                                                                                                                                            } else {
                                                                                                                                                if ( this.screenReaderMode ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 3 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7586..7596

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

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxMultioptionWidget.prototype.setDisabled = function ( disabled ) {
                                                                                                                                    OO.ui.CheckboxMultioptionWidget.super.prototype.setDisabled.call( this, disabled );
                                                                                                                                    this.checkbox.setDisabled( this.isDisabled() );
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9213..9219

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

                                                                                                                                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

                                                                                                                                OO.ui.RadioOptionWidget.prototype.setDisabled = function ( disabled ) {
                                                                                                                                    OO.ui.RadioOptionWidget.super.prototype.setDisabled.call( this, disabled );
                                                                                                                                
                                                                                                                                    this.radio.setDisabled( this.isDisabled() );
                                                                                                                                
                                                                                                                                
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9562..9566

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

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxInputWidget.prototype.isIndeterminate = function () {
                                                                                                                                    // Resynchronize our internal data with DOM data. Other scripts executing on the page can modify
                                                                                                                                    // it, and we won't know unless they're kind enough to trigger a 'change' event.
                                                                                                                                    const indeterminate = this.$input.prop( 'indeterminate' );
                                                                                                                                    if ( this.indeterminate !== indeterminate ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10487..10495

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

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxInputWidget.prototype.isSelected = function () {
                                                                                                                                    // Resynchronize our internal data with DOM data. Other scripts executing on the page can modify
                                                                                                                                    // it, and we won't know unless they're kind enough to trigger a 'change' event.
                                                                                                                                    const selected = this.$input.prop( 'checked' );
                                                                                                                                    if ( this.selected !== selected ) {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10523..10531

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

                                                                                                                                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.$handle.on( {
                                                                                                                                        click: this.onClick.bind( this ),
                                                                                                                                        keydown: this.onKeyDown.bind( this ),
                                                                                                                                        focus: this.onFocus.bind( this ),
                                                                                                                                        blur: this.onBlur.bind( this )
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2102..2107

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

                                                                                                                                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

                                                                                                                                OO.ui.SearchInputWidget.prototype.onIndicatorClick = function ( e ) {
                                                                                                                                    if ( e.which === OO.ui.MouseButtons.LEFT ) {
                                                                                                                                        // Clear the text field
                                                                                                                                        this.setValue( '' );
                                                                                                                                        this.focus();
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12124..12131

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

                                                                                                                                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

                                                                                                                                OO.ui.SearchInputWidget.prototype.onIndicatorKeyDown = function ( e ) {
                                                                                                                                    if ( e.keyCode === OO.ui.Keys.ENTER ) {
                                                                                                                                        // Clear the text field
                                                                                                                                        this.setValue( '' );
                                                                                                                                        this.focus();
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12139..12146

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

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxMultiselectInputWidget.prototype.setDisabled = function ( state ) {
                                                                                                                                    this.checkboxMultiselectWidget.setDisabled( state );
                                                                                                                                    OO.ui.CheckboxMultiselectInputWidget.super.prototype.setDisabled.call( this, state );
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10679..10683
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11122..11126

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

                                                                                                                                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

                                                                                                                                OO.ui.RadioSelectInputWidget.prototype.setDisabled = function ( state ) {
                                                                                                                                    this.radioSelectWidget.setDisabled( state );
                                                                                                                                    OO.ui.RadioSelectInputWidget.super.prototype.setDisabled.call( this, state );
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10679..10683
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11356..11360

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

                                                                                                                                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

                                                                                                                                OO.ui.DropdownInputWidget.prototype.setDisabled = function ( state ) {
                                                                                                                                    this.dropdownWidget.setDisabled( state );
                                                                                                                                    OO.ui.DropdownInputWidget.super.prototype.setDisabled.call( this, state );
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11122..11126
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11356..11360

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

                                                                                                                                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

                                                                                                                                OO.ui.RadioSelectInputWidget.static.reusePreInfuseDOM = function ( node, config ) {
                                                                                                                                    config = OO.ui.RadioSelectInputWidget.super.static.reusePreInfuseDOM( node, config );
                                                                                                                                    // Cannot reuse the `<input type=radio>` set
                                                                                                                                    delete config.$input;
                                                                                                                                    return config;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11271..11276

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

                                                                                                                                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

                                                                                                                                    return function () {
                                                                                                                                        // Check how long it's been since the last time the function was
                                                                                                                                        // called, and whether it's more or less than the requested throttle
                                                                                                                                        // period. If it's less, run the function immediately. If it's more,
                                                                                                                                        // set a timeout for the remaining time -- but don't replace an
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/src/mediawiki.util/util.js on lines 240..254

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

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxMultiselectInputWidget.static.reusePreInfuseDOM = function ( node, config ) {
                                                                                                                                    config = OO.ui.CheckboxMultiselectInputWidget.super.static.reusePreInfuseDOM( node, config );
                                                                                                                                    // Cannot reuse the `<input type=checkbox>` set
                                                                                                                                    delete config.$input;
                                                                                                                                    return config;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11076..11081

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

                                                                                                                                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 ( position.top < padding.top || config.alignToTop ) {
                                                                                                                                            animations.scrollTop = containerDimensions.scroll.top + position.top - padding.top;
                                                                                                                                        } else if ( position.bottom < padding.bottom ) {
                                                                                                                                            animations.scrollTop = containerDimensions.scroll.top +
                                                                                                                                                // Scroll the bottom into view, but not at the expense
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1416..1423

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

                                                                                                                                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 ( position.left < padding.left ) {
                                                                                                                                            animations.scrollLeft = containerDimensions.scroll.left + position.left - padding.left;
                                                                                                                                        } else if ( position.right < padding.right ) {
                                                                                                                                            animations.scrollLeft = containerDimensions.scroll.left +
                                                                                                                                                // Scroll the right into view, but not at the expense
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1406..1413

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

                                                                                                                                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

                                                                                                                                OO.ui.NumberInputWidget.prototype.setDisabled = function ( disabled ) {
                                                                                                                                    // Parent method
                                                                                                                                    OO.ui.NumberInputWidget.super.prototype.setDisabled.call( this, disabled );
                                                                                                                                    this.updateControlsDisabled();
                                                                                                                                    return this;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8726..8733

                                                                                                                                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

                                                                                                                                OO.ui.mixin.ClippableElement.prototype.getHorizontalAnchorEdge = function () {
                                                                                                                                    if ( this.computePosition && this.positioning && this.computePosition().right !== '' ) {
                                                                                                                                        return 'right';
                                                                                                                                    }
                                                                                                                                    return 'left';
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5668..5673

                                                                                                                                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

                                                                                                                                OO.ui.mixin.ClippableElement.prototype.getVerticalAnchorEdge = function () {
                                                                                                                                    if ( this.computePosition && this.positioning && this.computePosition().bottom !== '' ) {
                                                                                                                                        return 'bottom';
                                                                                                                                    }
                                                                                                                                    return 'top';
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5646..5651

                                                                                                                                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

                                                                                                                                OO.ui.MenuSelectWidget.prototype.removeItems = function ( items ) {
                                                                                                                                    // Parent method
                                                                                                                                    OO.ui.MenuSelectWidget.super.prototype.removeItems.call( this, items );
                                                                                                                                
                                                                                                                                    this.updateItemVisibility();
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 14067..14072

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

                                                                                                                                OO.ui.ComboBoxInputWidget.prototype.setReadOnly = function () {
                                                                                                                                    // Parent method
                                                                                                                                    OO.ui.ComboBoxInputWidget.super.prototype.setReadOnly.apply( this, arguments );
                                                                                                                                    this.updateControlsDisabled();
                                                                                                                                    return this;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12742..12747
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 14077..14082

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

                                                                                                                                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

                                                                                                                                OO.ui.NumberInputWidget.prototype.setReadOnly = function () {
                                                                                                                                    // Parent method
                                                                                                                                    OO.ui.NumberInputWidget.super.prototype.setReadOnly.apply( this, arguments );
                                                                                                                                    this.updateControlsDisabled();
                                                                                                                                    return this;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12742..12747
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12752..12757

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

                                                                                                                                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

                                                                                                                                OO.ui.ComboBoxInputWidget.prototype.setDisabled = function () {
                                                                                                                                    // Parent method
                                                                                                                                    OO.ui.ComboBoxInputWidget.super.prototype.setDisabled.apply( this, arguments );
                                                                                                                                    this.updateControlsDisabled();
                                                                                                                                    return this;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12752..12757
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 14077..14082

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

                                                                                                                                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

                                                                                                                                OO.ui.RadioSelectInputWidget.prototype.setOptions = function ( options ) {
                                                                                                                                    const value = this.getValue();
                                                                                                                                
                                                                                                                                    this.setOptionsData( options );
                                                                                                                                
                                                                                                                                
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10692..10702
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11370..11380

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

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxMultiselectInputWidget.prototype.setOptions = function ( options ) {
                                                                                                                                    const value = this.getValue();
                                                                                                                                
                                                                                                                                    this.setOptionsData( options );
                                                                                                                                
                                                                                                                                
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10692..10702
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11135..11145

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

                                                                                                                                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

                                                                                                                                OO.ui.DropdownInputWidget.prototype.setOptions = function ( options ) {
                                                                                                                                    const value = this.getValue();
                                                                                                                                
                                                                                                                                    this.setOptionsData( options );
                                                                                                                                
                                                                                                                                
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11135..11145
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11370..11380

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

                                                                                                                                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

                                                                                                                                OO.ui.SearchInputWidget.prototype.setReadOnly = function ( state ) {
                                                                                                                                    OO.ui.SearchInputWidget.super.prototype.setReadOnly.call( this, state );
                                                                                                                                    this.updateSearchIndicator();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js on lines 136..140

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

                                                                                                                                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 ( this.indeterminate !== state ) {
                                                                                                                                        this.indeterminate = state;
                                                                                                                                        this.$input.prop( 'indeterminate', this.indeterminate );
                                                                                                                                        if ( !internal ) {
                                                                                                                                            this.setSelected( false, true );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10464..10471

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

                                                                                                                                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 ( this.selected !== state ) {
                                                                                                                                        this.selected = state;
                                                                                                                                        this.$input.prop( 'checked', this.selected );
                                                                                                                                        if ( !internal ) {
                                                                                                                                            this.setIndeterminate( false, true );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 2 hrs to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10507..10514

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

                                                                                                                                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

                                                                                                                                OO.ui.RadioInputWidget.prototype.simulateLabelClick = function () {
                                                                                                                                    if ( !this.isDisabled() ) {
                                                                                                                                        this.$input.trigger( 'click' );
                                                                                                                                    }
                                                                                                                                    this.focus();
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10536..10541

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxInputWidget.prototype.simulateLabelClick = function () {
                                                                                                                                    if ( !this.isDisabled() ) {
                                                                                                                                        this.$handle.trigger( 'click' );
                                                                                                                                    }
                                                                                                                                    this.focus();
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10988..10993

                                                                                                                                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

                                                                                                                                OO.ui.mixin.ClippableElement.prototype.setClippableContainer = function ( $clippableContainer ) {
                                                                                                                                    this.$clippableContainer = $clippableContainer;
                                                                                                                                    if ( this.$clippable ) {
                                                                                                                                        this.clip();
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5099..5104

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

                                                                                                                                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

                                                                                                                                OO.ui.mixin.FloatableElement.prototype.setFloatableContainer = function ( $floatableContainer ) {
                                                                                                                                    this.$floatableContainer = $floatableContainer;
                                                                                                                                    if ( this.$floatable ) {
                                                                                                                                        this.position();
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5518..5523

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

                                                                                                                                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.$input.on( {
                                                                                                                                        keypress: this.onKeyPress.bind( this ),
                                                                                                                                        blur: this.onBlur.bind( this ),
                                                                                                                                        focus: this.onFocus.bind( this )
                                                                                                                                    } );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 687..691

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

                                                                                                                                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.plusButton = new OO.ui.ButtonWidget( $.extend(
                                                                                                                                            {
                                                                                                                                                disabled: this.isDisabled(),
                                                                                                                                                tabIndex: -1,
                                                                                                                                                classes: [ 'oo-ui-numberInputWidget-plusButton' ],
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13736..13744

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

                                                                                                                                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

                                                                                                                                OO.ui.TextInputWidget.prototype.onIconMouseDown = function ( e ) {
                                                                                                                                    if ( e.which === OO.ui.MouseButtons.LEFT ) {
                                                                                                                                        this.focus();
                                                                                                                                        return false;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11635..11640

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

                                                                                                                                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

                                                                                                                                OO.ui.OptionWidget.prototype.isHighlightable = function () {
                                                                                                                                    return this.constructor.static.highlightable && !this.disabled && this.isVisible();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6972..6974

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

                                                                                                                                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

                                                                                                                                OO.ui.MultilineTextInputWidget.prototype.onElementAttach = function () {
                                                                                                                                    OO.ui.MultilineTextInputWidget.super.prototype.onElementAttach.call( this );
                                                                                                                                    this.adjustSize();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12320..12323

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

                                                                                                                                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

                                                                                                                                OO.ui.MultilineTextInputWidget.prototype.updatePosition = function () {
                                                                                                                                    OO.ui.MultilineTextInputWidget.super.prototype.updatePosition.call( this );
                                                                                                                                    this.adjustSize();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12303..12306

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

                                                                                                                                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.minusButton = new OO.ui.ButtonWidget( $.extend(
                                                                                                                                            {
                                                                                                                                                disabled: this.isDisabled(),
                                                                                                                                                tabIndex: -1,
                                                                                                                                                classes: [ 'oo-ui-numberInputWidget-minusButton' ],
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13746..13754

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

                                                                                                                                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

                                                                                                                                OO.ui.TextInputWidget.prototype.onIndicatorMouseDown = function ( e ) {
                                                                                                                                    if ( e.which === OO.ui.MouseButtons.LEFT ) {
                                                                                                                                        this.focus();
                                                                                                                                        return false;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11618..11623

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

                                                                                                                                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

                                                                                                                                OO.ui.OptionWidget.prototype.isPressable = function () {
                                                                                                                                    return this.constructor.static.pressable && !this.disabled && this.isVisible();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6962..6964

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

                                                                                                                                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

                                                                                                                                OO.ui.MenuSelectWidget.prototype.getVisibleItems = function () {
                                                                                                                                    return this.getItems().filter( function ( item ) {
                                                                                                                                        return item.isVisible();
                                                                                                                                    } );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 5137..5141

                                                                                                                                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 ( event.originalEvent.deltaY ) {
                                                                                                                                            delta = -event.originalEvent.deltaY;
                                                                                                                                        } else if ( event.originalEvent.deltaX ) {
                                                                                                                                            delta = event.originalEvent.deltaX;
                                                                                                                                        }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 738..742

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

                                                                                                                                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 ( this.verticalPosition === 'bottom' ) {
                                                                                                                                        newPos.bottom = $offsetParent.outerHeight() - containerPos.bottom;
                                                                                                                                    } else if ( this.verticalPosition === 'center' ) {
                                                                                                                                        newPos.top = containerPos.top +
                                                                                                                                            ( this.$floatableContainer.height() - this.$floatable.height() ) / 2;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5383..5388

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

                                                                                                                                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 ( this.horizontalPosition === 'end' ) {
                                                                                                                                        newPos.end = containerPos.end;
                                                                                                                                    } else if ( this.horizontalPosition === 'center' ) {
                                                                                                                                        newPos.left = containerPos.left +
                                                                                                                                            ( this.$floatableContainer.width() - this.$floatable.width() ) / 2;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5370..5375

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

                                                                                                                                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

                                                                                                                                OO.ui.FieldLayout.prototype.setWarnings = function ( warnings ) {
                                                                                                                                    this.warnings = warnings.slice();
                                                                                                                                    this.updateMessages();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13062..13066
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13092..13096
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13106..13110

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

                                                                                                                                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

                                                                                                                                OO.ui.FieldLayout.prototype.setSuccess = function ( successMessages ) {
                                                                                                                                    this.successMessages = successMessages.slice();
                                                                                                                                    this.updateMessages();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13062..13066
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13077..13081
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13106..13110

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

                                                                                                                                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

                                                                                                                                OO.ui.FieldLayout.prototype.setNotices = function ( notices ) {
                                                                                                                                    this.notices = notices.slice();
                                                                                                                                    this.updateMessages();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13062..13066
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13077..13081
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13092..13096

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

                                                                                                                                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

                                                                                                                                OO.ui.FieldLayout.prototype.setErrors = function ( errors ) {
                                                                                                                                    this.errors = errors.slice();
                                                                                                                                    this.updateMessages();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13077..13081
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13092..13096
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13106..13110

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

                                                                                                                                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 ( this.isDisabled() || ( e.which !== OO.ui.Keys.SPACE && e.which !== OO.ui.Keys.ENTER ) ) {
                                                                                                                                        return;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 2415..2417

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

                                                                                                                                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 ( this.isDisabled() || ( e.which !== OO.ui.Keys.SPACE && e.which !== OO.ui.Keys.ENTER ) ) {
                                                                                                                                        return;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 2399..2401

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

                                                                                                                                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

                                                                                                                                    return elemRect.top <= contRect.bottom && elemRect.bottom >= contRect.top &&
                                                                                                                                        elemRect.left <= contRect.right && elemRect.right >= contRect.left;
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/sinonjs/sinon.js on lines 1639..1640

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

                                                                                                                                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

                                                                                                                                    for ( i = 0; i < this.successMessages.length; i++ ) {
                                                                                                                                        this.$messages.append( this.makeMessage( 'success', this.successMessages[ i ] ) );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13133..13135
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13136..13138
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13142..13144

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

                                                                                                                                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

                                                                                                                                    for ( i = 0; i < this.notices.length; i++ ) {
                                                                                                                                        this.$messages.append( this.makeMessage( 'notice', this.notices[ i ] ) );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13133..13135
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13136..13138
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13139..13141

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

                                                                                                                                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

                                                                                                                                    for ( i = 0; i < this.errors.length; i++ ) {
                                                                                                                                        this.$messages.append( this.makeMessage( 'error', this.errors[ i ] ) );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13136..13138
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13139..13141
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13142..13144

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

                                                                                                                                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

                                                                                                                                    for ( i = 0; i < this.warnings.length; i++ ) {
                                                                                                                                        this.$messages.append( this.makeMessage( 'warning', this.warnings[ i ] ) );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13133..13135
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13139..13141
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13142..13144

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

                                                                                                                                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 ( !this.isDisabled() && ( e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) ) {
                                                                                                                                        if ( this.emit( 'click' ) ) {
                                                                                                                                            return false;
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4854..4857

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

                                                                                                                                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 ( !this.isDisabled() && ( e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) ) {
                                                                                                                                        this.setValue( !this.value );
                                                                                                                                        return false;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 2432..2436

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

                                                                                                                                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.loadAndGetImageUrl( this.currentFiles[ 0 ] ).done( function ( url ) {
                                                                                                                                                    this.$thumbnail.css( 'background-image', 'url( ' + url + ' )' );
                                                                                                                                                }.bind( this ) ).fail( function () {
                                                                                                                                                    this.$thumbnail.append(
                                                                                                                                                        new OO.ui.IconWidget( {
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/src/mediawiki.Upload.BookletLayout/mw.widgets.StashedFileWidget.js on lines 114..127

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

                                                                                                                                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 ( this.defaultSelected === undefined ) {
                                                                                                                                        this.defaultSelected = this.selected;
                                                                                                                                        this.$input[ 0 ].defaultChecked = this.defaultSelected;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10070..10073

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

                                                                                                                                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 ( this.defaultValue === undefined ) {
                                                                                                                                        this.defaultValue = this.value;
                                                                                                                                        this.$input[ 0 ].defaultValue = this.defaultValue;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10475..10478

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

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

                                                                                                                                OO.ui.PopupWidget.prototype.bindDocumentKeyDownListener = function () {
                                                                                                                                    this.getElementDocument().addEventListener( 'keydown', this.onDocumentKeyDownHandler, true );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6124..6126
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7503..7505
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7512..7514
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7640..7642

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

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

                                                                                                                                OO.ui.SelectWidget.prototype.bindDocumentKeyPressListener = function () {
                                                                                                                                    this.getElementDocument().addEventListener( 'keypress', this.onDocumentKeyPressHandler, true );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6115..6117
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6124..6126
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7503..7505
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7512..7514

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

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

                                                                                                                                OO.ui.SelectWidget.prototype.bindDocumentKeyDownListener = function () {
                                                                                                                                    this.getElementDocument().addEventListener( 'keydown', this.onDocumentKeyDownHandler, true );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6115..6117
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6124..6126
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7512..7514
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7640..7642

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

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

                                                                                                                                OO.ui.SelectWidget.prototype.unbindDocumentKeyDownListener = function () {
                                                                                                                                    this.getElementDocument().removeEventListener( 'keydown', this.onDocumentKeyDownHandler, true );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6115..6117
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6124..6126
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7503..7505
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7640..7642

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

                                                                                                                                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

                                                                                                                                            if ( !this.flags[ flag ] ) {
                                                                                                                                                changes[ flag ] = true;
                                                                                                                                                this.flags[ flag ] = true;
                                                                                                                                                add.push( className );
                                                                                                                                            }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3511..3515

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

                                                                                                                                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

                                                                                                                                    if ( clipping && !this.warnedUnattached && !this.isElementAttached() ) {
                                                                                                                                        OO.ui.warnDeprecation( 'ClippableElement#toggleClipping: Before calling this method, the element must be attached to the DOM.' );
                                                                                                                                        this.warnedUnattached = true;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5156..5159
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6212..6215
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8784..8787

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

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

                                                                                                                                OO.ui.PopupWidget.prototype.unbindDocumentKeyDownListener = function () {
                                                                                                                                    this.getElementDocument().removeEventListener( 'keydown', this.onDocumentKeyDownHandler, true );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6115..6117
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7503..7505
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7512..7514
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7640..7642

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

                                                                                                                                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

                                                                                                                                    if ( visible && !this.warnedUnattached && !this.isElementAttached() ) {
                                                                                                                                        OO.ui.warnDeprecation( 'MenuSelectWidget#toggle: Before calling this method, the menu must be attached to the DOM.' );
                                                                                                                                        this.warnedUnattached = true;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5156..5159
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5537..5540
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6212..6215

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

                                                                                                                                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

                                                                                                                                                if ( !this.flags[ flag ] ) {
                                                                                                                                                    changes[ flag ] = true;
                                                                                                                                                    this.flags[ flag ] = true;
                                                                                                                                                    add.push( className );
                                                                                                                                                }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3500..3504

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

                                                                                                                                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

                                                                                                                                    if ( positioning && !this.warnedUnattached && !this.isElementAttached() ) {
                                                                                                                                        OO.ui.warnDeprecation( 'FloatableElement#togglePositioning: Before calling this method, the element must be attached to the DOM.' );
                                                                                                                                        this.warnedUnattached = true;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5537..5540
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6212..6215
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8784..8787

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

                                                                                                                                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

                                                                                                                                    if ( show && !this.warnedUnattached && !this.isElementAttached() ) {
                                                                                                                                        OO.ui.warnDeprecation( 'PopupWidget#toggle: Before calling this method, the popup must be attached to the DOM.' );
                                                                                                                                        this.warnedUnattached = true;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5156..5159
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5537..5540
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8784..8787

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

                                                                                                                                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 ( OO.isPlainObject( fieldWidget ) && config === undefined ) {
                                                                                                                                        config = fieldWidget;
                                                                                                                                        fieldWidget = config.fieldWidget;
                                                                                                                                        buttonWidget = config.buttonWidget;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 1 hr to fix
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 300..304

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

                                                                                                                                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

                                                                                                                                        for ( let i = 0, len = this.items.length; i < len; i++ ) {
                                                                                                                                            this.items[ i ].updateDisabled();
                                                                                                                                        }
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 55 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 590..592

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

                                                                                                                                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

                                                                                                                                            if ( value === 'top' ) {
                                                                                                                                                this.$header.append( this.$help, this.$label );
                                                                                                                                                this.$body.append( this.$header, this.$field );
                                                                                                                                            } else if ( value === 'inline' ) {
                                                                                                                                                this.$header.append( this.$help, this.$label );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13020..13026
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13031..13037

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

                                                                                                                                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

                                                                                                                                            } else if ( value === 'inline' ) {
                                                                                                                                                this.$header.append( this.$label, this.$help );
                                                                                                                                                this.$body.append( this.$field, this.$header );
                                                                                                                                            } else {
                                                                                                                                                this.$header.append( this.$label, this.$help );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13028..13037
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13031..13037

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

                                                                                                                                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

                                                                                                                                            } else if ( value === 'inline' ) {
                                                                                                                                                this.$header.append( this.$help, this.$label );
                                                                                                                                                this.$body.append( this.$field, this.$header );
                                                                                                                                            } else {
                                                                                                                                                this.$header.append( this.$label );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13020..13026
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13028..13037

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

                                                                                                                                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

                                                                                                                                OO.ui.InputWidget.prototype.setInputId = function ( id ) {
                                                                                                                                    this.$input.attr( 'id', id );
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10043..10046

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

                                                                                                                                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

                                                                                                                                OO.ui.InputWidget.prototype.setDir = function ( dir ) {
                                                                                                                                    this.$input.prop( 'dir', dir );
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10114..10117

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

                                                                                                                                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

                                                                                                                                OO.ui.MessageWidget.static.iconMap = {
                                                                                                                                    notice: 'infoFilled',
                                                                                                                                    error: 'error',
                                                                                                                                    warning: 'alert',
                                                                                                                                    success: 'success'
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 50 mins to fix
                                                                                                                                resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js on lines 109..114

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

                                                                                                                                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

                                                                                                                                OO.ui.ComboBoxInputWidget.prototype.onMenuChoose = function ( item ) {
                                                                                                                                    this.setValue( item.getData() );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11101..11103
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4769..4771

                                                                                                                                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

                                                                                                                                OO.ui.RadioSelectInputWidget.prototype.onMenuSelect = function ( item ) {
                                                                                                                                    this.setValue( item.getData() );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12693..12695
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4769..4771

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

                                                                                                                                            if ( value === 'top' ) {
                                                                                                                                                this.$header.append( this.$label );
                                                                                                                                                this.$body.append( this.$header, this.$field, this.$help );
                                                                                                                                            } else if ( value === 'inline' ) {
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13034..13037

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

                                                                                                                                            } else {
                                                                                                                                                this.$header.append( this.$label );
                                                                                                                                                this.$body.append( this.$header, this.$help, this.$field );
                                                                                                                                            }
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13017..13020

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

                                                                                                                                        } else {
                                                                                                                                            newPos.right = ( isBody ? $( $offsetParent[ 0 ].ownerDocument.documentElement ) :
                                                                                                                                                $offsetParent ).outerWidth() - newPos.end;
                                                                                                                                        }
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5391..5394

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

                                                                                                                                        if ( direction === 'rtl' ) {
                                                                                                                                            newPos.right = ( isBody ? $( $offsetParent[ 0 ].ownerDocument.documentElement ) :
                                                                                                                                                $offsetParent ).outerWidth() - newPos.start;
                                                                                                                                        } else {
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 50 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 5402..5405

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

                                                                                                                                    this.$overlay = ( config.$overlay === true ?
                                                                                                                                        OO.ui.getDefaultOverlay() : config.$overlay ) || this.$element;
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 45 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 331..332

                                                                                                                                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

                                                                                                                                    this.$overlay = ( config.$overlay === true ?
                                                                                                                                        OO.ui.getDefaultOverlay() : config.$overlay ) || this.$element;
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 45 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 671..672

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

                                                                                                                                OO.ui.DropdownInputWidget.prototype.blur = function () {
                                                                                                                                    this.dropdownWidget.blur();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10830..10833
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11173..11176
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11181..11184
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11439..11442

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

                                                                                                                                OO.ui.CheckboxMultiselectInputWidget.prototype.focus = function () {
                                                                                                                                    this.checkboxMultiselectWidget.focus();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10830..10833
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10838..10841
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11173..11176
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11181..11184

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

                                                                                                                                OO.ui.DropdownInputWidget.prototype.focus = function () {
                                                                                                                                    this.dropdownWidget.focus();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10838..10841
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11173..11176
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11181..11184
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11439..11442

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

                                                                                                                                OO.ui.RadioSelectInputWidget.prototype.focus = function () {
                                                                                                                                    this.radioSelectWidget.focus();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10830..10833
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10838..10841
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11181..11184
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11439..11442

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

                                                                                                                                OO.ui.RadioSelectInputWidget.prototype.blur = function () {
                                                                                                                                    this.radioSelectWidget.blur();
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10830..10833
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10838..10841
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11173..11176
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11439..11442

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

                                                                                                                                OO.ui.CheckboxInputWidget.prototype.getInputElement = function () {
                                                                                                                                    return $( '<input>' ).attr( 'type', 'checkbox' );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10945..10947
                                                                                                                                resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js on lines 87..89

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

                                                                                                                                OO.ui.ComboBoxInputWidget.prototype.onMenuToggle = function ( isVisible ) {
                                                                                                                                    this.$element.toggleClass( 'oo-ui-comboBoxInputWidget-open', isVisible );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9060..9062
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3974..3976

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

                                                                                                                                OO.ui.RadioInputWidget.prototype.getInputElement = function () {
                                                                                                                                    return $( '<input>' ).attr( 'type', 'radio' );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10436..10438
                                                                                                                                resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js on lines 87..89

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

                                                                                                                                OO.ui.DropdownWidget.prototype.onMenuToggle = function ( isVisible ) {
                                                                                                                                    this.$element.toggleClass( 'oo-ui-dropdownWidget-open', isVisible );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12717..12719
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3974..3976

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxMultiselectInputWidget.prototype.onCheckboxesSelect = function () {
                                                                                                                                    this.setValue( this.checkboxMultiselectWidget.findSelectedItemsData() );
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9546..9548

                                                                                                                                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

                                                                                                                                OO.ui.CheckboxMultioptionWidget.prototype.onCheckboxChange = function () {
                                                                                                                                    this.setSelected( this.checkbox.isSelected() );
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 40 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 11294..11296

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

                                                                                                                                OO.ui.DropdownInputWidget.prototype.setLabelledBy = function ( id ) {
                                                                                                                                    this.dropdownWidget.setLabelledBy( id );
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 40 mins to fix
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.RowWidget.js on lines 163..165
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.RowWidget.js on lines 226..228
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 227..229
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 237..239

                                                                                                                                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

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

                                                                                                                                    OO.ui.mixin.LabelElement.call( this, $.extend( {
                                                                                                                                        $label: this.$element,
                                                                                                                                        invisibleLabel: true
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4344..4347

                                                                                                                                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

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

                                                                                                                                    OO.ui.mixin.LabelElement.call( this, $.extend( {
                                                                                                                                        $label: this.$element,
                                                                                                                                        invisibleLabel: true
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4419..4422

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

                                                                                                                                    OO.ui.mixin.GroupElement.call( this, $.extend( { $group: this.$element }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7132..7134
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13671..13671
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 1361..1361

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

                                                                                                                                OO.ui.DropdownWidget.prototype.onFocus = function () {
                                                                                                                                    this.menu.toggleScreenReaderMode( true );
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9119..9121
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 5475..5477

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

                                                                                                                                    OO.ui.mixin.GroupWidget.call( this, $.extend( {
                                                                                                                                        $group: this.$element
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13497..13497
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13671..13671
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 1361..1361

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

                                                                                                                                    OO.ui.mixin.GroupElement.call( this, $.extend( { $group: this.$element }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 3 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7132..7134
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 13497..13497
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 1361..1361

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

                                                                                                                                    OO.ui.mixin.RequiredElement.call( this, $.extend( {}, {
                                                                                                                                        // TODO: Display the required indicator somewhere
                                                                                                                                        indicatorElement: null
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10375..10378
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10900..10903

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

                                                                                                                                    OO.ui.mixin.RequiredElement.call( this, $.extend( {}, {
                                                                                                                                        // TODO: Display the required indicator somewhere
                                                                                                                                        indicatorElement: null
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10375..10378
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10611..10614

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

                                                                                                                                OO.ui.DropdownWidget.prototype.onBlur = function () {
                                                                                                                                    this.menu.toggleScreenReaderMode( false );
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9109..9111
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 5475..5477

                                                                                                                                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

                                                                                                                                OO.ui.Element.prototype.setData = function ( data ) {
                                                                                                                                    this.data = data;
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1653..1656

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

                                                                                                                                    OO.ui.mixin.RequiredElement.call( this, $.extend( {}, {
                                                                                                                                        // TODO: Display the required indicator somewhere
                                                                                                                                        indicatorElement: null
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 2 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10611..10614
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10900..10903

                                                                                                                                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

                                                                                                                                OO.ui.Element.prototype.getTagName = function () {
                                                                                                                                    return this.constructor.static.tagName;
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 976..978

                                                                                                                                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

                                                                                                                                OO.ui.Element.prototype.setElementGroup = function ( group ) {
                                                                                                                                    this.elementGroup = group;
                                                                                                                                    return this;
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1530..1533

                                                                                                                                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

                                                                                                                                OO.ui.Element.prototype.isElementAttached = function () {
                                                                                                                                    return this.$element[ 0 ].isConnected;
                                                                                                                                };
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-windows.js on lines 2215..2217

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

                                                                                                                                    } else if ( e.keyCode === OO.ui.Keys.RIGHT || e.keyCode === OO.ui.Keys.DOWN ) {
                                                                                                                                        nextItem = element.getRelativeFocusableItem( this, 1 );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 5 other locations - About 35 mins to fix
                                                                                                                                resources/lib/jquery.ui/jquery.ui.button.js on lines 191..193
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7435..7435
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9585..9589
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4172..4196
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4538..4560

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

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

                                                                                                                                                    e.keyCode === OO.ui.Keys.UP || e.keyCode === OO.ui.Keys.LEFT ? -1 : 1,
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 5 other locations - About 35 mins to fix
                                                                                                                                resources/lib/jquery.ui/jquery.ui.button.js on lines 191..193
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9585..9589
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9587..9589
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4172..4196
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4538..4560

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

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

                                                                                                                                    if ( e.keyCode === OO.ui.Keys.LEFT || e.keyCode === OO.ui.Keys.UP ) {
                                                                                                                                        nextItem = element.getRelativeFocusableItem( this, -1 );
                                                                                                                                    } else if ( e.keyCode === OO.ui.Keys.RIGHT || e.keyCode === OO.ui.Keys.DOWN ) {
                                                                                                                                        nextItem = element.getRelativeFocusableItem( this, 1 );
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 5 other locations - About 35 mins to fix
                                                                                                                                resources/lib/jquery.ui/jquery.ui.button.js on lines 191..193
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7435..7435
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9587..9589
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4172..4196
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 4538..4560

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

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

                                                                                                                                OO.ui.CheckboxMultioptionWidget.prototype.focus = function () {
                                                                                                                                    this.checkbox.focus();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 5 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12958..12960
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3983..3985
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.RowWidget.js on lines 233..235
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 244..246
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 251..253

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

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

                                                                                                                                OO.ui.mixin.TabIndexedElement.prototype.simulateLabelClick = function () {
                                                                                                                                    this.focus();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 2143..2145
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 925..927
                                                                                                                                resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 590..592
                                                                                                                                resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 714..716

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

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

                                                                                                                                OO.ui.FieldLayout.prototype.onLabelClick = function () {
                                                                                                                                    this.fieldWidget.simulateLabelClick();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 5 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9571..9573
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3983..3985
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.RowWidget.js on lines 233..235
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 244..246
                                                                                                                                resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 251..253

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

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

                                                                                                                                OO.ui.mixin.TabIndexedElement.prototype.onTabIndexedElementDisable = function () {
                                                                                                                                    this.updateTabIndex();
                                                                                                                                };
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 4 other locations - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 2231..2233
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 925..927
                                                                                                                                resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 590..592
                                                                                                                                resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 714..716

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

                                                                                                                                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 ( accessKey !== null ) {
                                                                                                                                                this.$accessKeyed.attr( 'accesskey', accessKey );
                                                                                                                                            } else {
                                                                                                                                                this.$accessKeyed.removeAttr( 'accesskey' );
                                                                                                                                            }
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4146..4150

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

                                                                                                                                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 ( target !== null ) {
                                                                                                                                            this.$button.attr( 'target', target );
                                                                                                                                        } else {
                                                                                                                                            this.$button.removeAttr( 'target' );
                                                                                                                                        }
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3775..3779

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

                                                                                                                                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

                                                                                                                                    const currentItem =
                                                                                                                                        ( this.isVisible() && this.findHighlightedItem() ) ||
                                                                                                                                        ( !this.multiselect && this.findSelectedItem() );
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7569..7570

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

                                                                                                                                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

                                                                                                                                    let item = ( this.isVisible() && this.findHighlightedItem() ) ||
                                                                                                                                        ( !this.multiselect && this.findSelectedItem() );
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 35 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 7414..7416

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

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

                                                                                                                                    OO.ui.mixin.AccessKeyedElement.call( this, $.extend( {
                                                                                                                                        $accessKeyed: this.$button
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4348..4350
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8964..8966
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9916..9918
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12874..12874
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 731..733
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2097..2099
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3150..3152

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

                                                                                                                                    OO.ui.mixin.ButtonElement.call( this, $.extend( {
                                                                                                                                        $button: this.$input
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4252..4254
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4338..4340
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4413..4415
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4494..4496
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8407..8407
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9910..9912
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3143..3145

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

                                                                                                                                    OO.ui.mixin.IndicatorElement.call( this, $.extend( {
                                                                                                                                        $indicator: this.$element
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4252..4254
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4338..4340
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4494..4496
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8407..8407
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9910..9912
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10224..10226
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3143..3145

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

                                                                                                                                    OO.ui.mixin.TitledElement.call( this, $.extend( { $titled: this.$label }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3992..3994
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4348..4350
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8964..8966
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9916..9918
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 731..733
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2097..2099
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3150..3152

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

                                                                                                                                    if ( OO.isPlainObject( fieldWidget ) && config === undefined ) {
                                                                                                                                        config = fieldWidget;
                                                                                                                                        fieldWidget = config.fieldWidget;
                                                                                                                                    }
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 12 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 701..704
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 1097..1100
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 1702..1705
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 1803..1806
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 1996..1999
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2059..2062
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2513..2516
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2752..2755
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 1029..1032
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 1193..1196
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3246..3249
                                                                                                                                resources/lib/ooui/oojs-ui-windows.js on lines 637..640

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

                                                                                                                                    OO.ui.mixin.ClippableElement.call( this, $.extend( { $clippable: this.$group }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4252..4254
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4338..4340
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4413..4415
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4494..4496
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9910..9912
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10224..10226
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3143..3145

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

                                                                                                                                    OO.ui.mixin.LabelElement.call( this, $.extend( {
                                                                                                                                        $label: this.$element
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4252..4254
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4338..4340
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4413..4415
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8407..8407
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9910..9912
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10224..10226
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3143..3145

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

                                                                                                                                    OO.ui.mixin.FlaggedElement.call( this, $.extend( {
                                                                                                                                        $flagged: this.$element
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3992..3994
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8964..8966
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9916..9918
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12874..12874
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 731..733
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2097..2099
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3150..3152

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

                                                                                                                                    OO.ui.mixin.TabIndexedElement.call( this, $.extend( {
                                                                                                                                        $tabIndexed: this.$handle
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3992..3994
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4348..4350
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9916..9918
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12874..12874
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 731..733
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2097..2099
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3150..3152

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

                                                                                                                                    OO.ui.mixin.GroupElement.call( this, $.extend( {
                                                                                                                                        $group: this.$element
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4338..4340
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4413..4415
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4494..4496
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8407..8407
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9910..9912
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10224..10226
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3143..3145

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

                                                                                                                                    OO.ui.mixin.IconElement.call( this, $.extend( {
                                                                                                                                        $icon: this.$element
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4252..4254
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4413..4415
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4494..4496
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8407..8407
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 9910..9912
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10224..10226
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3143..3145

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

                                                                                                                                    OO.ui.mixin.TabIndexedElement.call( this, $.extend( {
                                                                                                                                        $tabIndexed: this.$input
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4252..4254
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4338..4340
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4413..4415
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4494..4496
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8407..8407
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 10224..10226
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3143..3145

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

                                                                                                                                    OO.ui.mixin.AccessKeyedElement.call( this, $.extend( {
                                                                                                                                        $accessKeyed: this.$input
                                                                                                                                    }, config ) );
                                                                                                                                Severity: Major
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 7 other locations - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 3992..3994
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 4348..4350
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 8964..8966
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 12874..12874
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 731..733
                                                                                                                                resources/lib/ooui/oojs-ui-toolbars.js on lines 2097..2099
                                                                                                                                resources/lib/ooui/oojs-ui-widgets.js on lines 3150..3152

                                                                                                                                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

                                                                                                                                    if ( id === undefined ) {
                                                                                                                                        id = OO.ui.generateElementId();
                                                                                                                                        this.$tabIndexed.attr( 'id', id );
                                                                                                                                    }
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 6621..6624

                                                                                                                                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

                                                                                                                                    if ( id === undefined ) {
                                                                                                                                        id = OO.ui.generateElementId();
                                                                                                                                        this.$body.attr( 'id', id );
                                                                                                                                    }
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 2173..2176

                                                                                                                                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

                                                                                                                                            bottom: containerDimensions.rect.bottom - containerDimensions.borders.bottom -
                                                                                                                                                containerDimensions.scrollbar.bottom - elementPosition.bottom,
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1400..1401

                                                                                                                                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

                                                                                                                                            right: containerDimensions.rect.right - containerDimensions.borders.right -
                                                                                                                                                containerDimensions.scrollbar.right - elementPosition.right
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/ooui/oojs-ui-core.js and 1 other location - About 30 mins to fix
                                                                                                                                resources/lib/ooui/oojs-ui-core.js on lines 1396..1397

                                                                                                                                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

                                                                                                                                There are no issues that match your filters.

                                                                                                                                Category
                                                                                                                                Status