override in List if needed
352420
protected final function _getItems($select = null)
    {
        if (!$select) $select = $this->_getSelect();
        if (!$select) return array();

        return $this->getData()->parent->getComponent()->getItems($select);
    }
89551
function removeOverrides( element, overrides )
	{
		var attributes = overrides && overrides.attributes ;

		if ( attributes )
		{
			for ( var i = 0 ; i < attributes.length ; i++ )
			{
				var attName = attributes[i][0], actualAttrValue ;

				if ( ( actualAttrValue = element.getAttribute( attName ) ) )
				{
					var attValue = attributes[i][1] ;

					// Remove the attribute if:
					//    - The override definition value is null ;
					//    - The override definition valie is a string that
					//      matches the attribute value exactly.
					//    - The override definition value is a regex that
					//      has matches in the attribute value.
					if ( attValue === null ||
							( attValue.test && attValue.test( actualAttrValue ) ) ||
							( typeof attValue == 'string' && actualAttrValue == attValue ) )
						element.removeAttribute( attName ) ;
				}
			}
		}

		removeNoAttribsElement( element );
	}
135249
function overrideConfig( path, value ) {
      beforeAll( () => {
         configurationOverrides[ path ] = value;
      } );
      afterAll( () => {
         delete configurationOverrides[ path ];
      } );
   }
907180
def force_list(element):
    
    if element is None:
        return []

    if isinstance(element, (collections.Iterator, list)):
        return element

    return [element]
1356233
def extendlist(lst, i, value=''):
    """"""
    if i < len(lst):
        pass
    else:
        lst.extend([value, ] * (i - len(lst) + 1))
623979
private List<ClassInfo> getOverrideOrder() {
        if (overrideOrder == null) {
            overrideOrder = getOverrideOrder(new HashSet<ClassInfo>(), new ArrayList<ClassInfo>());
        }
        return overrideOrder;
    }
579625
def extend(self, item):
        """"""
        if not isinstance(item, list):
            raise TypeError(
                'You can only extend lists with lists. '
                'You supplied \"%s\"' % type(item))
        for entry in item:
            if not isinstance(entry, str):
                raise TypeError(
                    'Members of this object must be strings. '
                    'You supplied \"%s\"' % type(entry))
            list.append(self, entry)
865880
function isInList(value, listOfValues, msg) {
    value = value.toLowerCase().trim();
    if (listOfValues.indexOf(value) === -1) {
        throw new Error(msg);
    }
}
1035963
def wrap(cls, value):
        ''' 

        '''
        if isinstance(value, list):
            if isinstance(value, PropertyValueList):
                return value
            else:
                return PropertyValueList(value)
        else:
            return value
465830
def override(cls):
    

    def check_override(method):
        if method.__name__ not in dir(cls):
            raise NameError("{} does not override any method of {}".format(
                method, cls))
        return method

    return check_override
511372
def extend_unique(list1, list2):
    """"""
    for item in list2:
        if item not in list1:
            list1.append(item)
769001
function overrideWithEnvironment (object, environment) {
  if (object.environments && object.environments[environment]) {
    const newObject = Object.assign(
      {},
      object,
      object.environments[environment]
    )
    delete newObject.environments
    return newObject
  }

  return object
}
91843
function(options, target, override) {
        newTarget = [];

        if (override) {

            // if collection, comparison will be done uppon the `id` attribute
            if (
                typeof(options[0]) == 'object' && typeof(options[0].id) != 'undefined'
                && typeof(target[0]) == 'object' && typeof(target[0].id) != 'undefined'
            ) {

                newTarget       = JSON.parse(JSON.stringify(target));
                var _options    = JSON.parse(JSON.stringify(options));
                var next        = null;

                for (var a = 0, aLen = target.length; a < aLen; ++a) {

                    for (var n = next || 0, nLen = _options.length; n < nLen; ++n) {
                        if ( typeof(_options[n].id) != 'undefined' && _options[n].id === target[a].id ) {
                            newTarget[a] = _options[n];

                            next = n+1;
                            break
                        } else {
                            newTarget.push(_options[n]);

                            next = n+1;
                            break
                        }
                    }
                }

                return newTarget

            } else { // normal case `arrays` or merging from a blank collection
                return options
            }
        }

        if ( options.length == 0 &&  target.length > 0) {
            newTarget = target;
        }

        if ( target.length == 0 && options.length > 0) {
            for (var a = 0; a < options.length; ++a ) {
                target.push(options[a]);
            }
        }

        if (newTarget.length == 0 && target.length > 0) {
            // ok, but don't merge objects
            for (var a = 0; a < target.length; ++a ) {
                if ( typeof(target[a]) != 'object' && newTarget.indexOf(target[a]) == -1)
                    newTarget.push(target[a]);
            }
        }

        if ( target.length > 0 ) {

            // if collection, comparison will be done uppon the `id` attribute
            if (
                typeof(options[0]) == 'object' && typeof(options[0].id) != 'undefined'
                && typeof(target[0]) == 'object' && typeof(target[0].id) != 'undefined'
            ) {

                newTarget       = JSON.parse(JSON.stringify(target))
                var _options    = JSON.parse(JSON.stringify(options));
                var next        = null;

                for (var a = 0, aLen = newTarget.length; a < aLen; ++a) {
                    end:
                        for (var n = next || 0, nLen = _options.length; n < nLen; ++n) {

                            if (
                                _options[n] != null && typeof(_options[n].id) != 'undefined' && _options[n].id !== newTarget[a].id

                            ) {
                                newTarget.push(_options[n]);

                                next = n+1;
                                break end;
                            } else if( _options[n] != null && typeof(_options[n].id) != 'undefined' && _options[n].id === newTarget[a].id ) {

                                next = n+1;
                                break end;

                            } else {
                                break end;
                            }

                        }


                }

                return newTarget


            } else { // normal case `arrays`
                for (var a = 0; a < options.length; ++a ) {
                    if ( target.indexOf(options[a]) > -1 && override) {
                        target.splice(target.indexOf(options[a]), 1, options[a])
                    } else {
                        if (newTarget.indexOf(options[a]) == -1)
                            newTarget.push(options[a]);
                    }
                }
            }


        }

        if (newTarget.length > 0 && target.length > 0 ) {
            return newTarget
        }
    }
990819
def apply_filter_list(func, obj):
    """"""
    if isinstance(obj, (list, tuple)):
        return [func(item) for item in obj]
    return func(obj)
899304
public static boolean overrides(
      DeclaredType type, Types types, String methodName, TypeMirror... params) {
    return overrides(asElement(type), types, methodName, params);
  }
933338
function triggerIfHandlerList(handlerList, event) {
    if(handlerList !== undefined) {
        for(var n=0; n<handlerList.length; n++) {
            handlerList[n](event)
        }
    }
}
1156518
function() {
				if ( list ) {
					var args = arguments,
						argIndex = 0,
						argLength = args.length;
					for ( ; argIndex < argLength ; argIndex++ ) {
						for ( var i = 0; i < list.length; i++ ) {
							if ( args[ argIndex ] === list[ i ] ) {
								// Handle firingIndex and firingLength
								if ( firing ) {
									if ( i <= firingLength ) {
										firingLength--;
										if ( i <= firingIndex ) {
											firingIndex--;
										}
									}
								}
								// Remove the element
								list.splice( i--, 1 );
								// If we have some unicity property then
								// we only need to do this once
								if ( flags.unique ) {
									break;
								}
							}
						}
					}
				}
				return this;
			}