---------------------------- Private helper methods
342111
private void setParents(Collection<? extends T> c) {
    for (T arg : c) {
      arg.setParent(_owner);
    }
  }
327556
function (string) {
  if (typeof string !== 'string') {
    throw Error('NOT_STRING')
  } else {
    string = string.trim();
  }

  if (string[0] === '$') {
    var expressionIdentifier = string.substr(1, 2);

    if (['ge', 'pg', 'ng', 'np'].includes(expressionIdentifier)) {
      var paramtersString = string;
      var fullIdentifier = null;

      switch (expressionIdentifier) {
        case 'ge':
          fullIdentifier = 'gettext';
          paramtersString = paramtersString.substr(8);
          break
        case 'pg':
          fullIdentifier = 'pgettext';
          paramtersString = paramtersString.substr(9);
          break
        case 'ng':
          fullIdentifier = 'ngettext';
          paramtersString = paramtersString.substr(9);
          break
        case 'np':
          fullIdentifier = 'npgettext';
          paramtersString = paramtersString.substr(10);
      }

      var parameters = parseParameters(expressionIdentifier, paramtersString.trim());

      return {
        identifier: fullIdentifier,
        parameters: parameters
      }
    } else {
      throw Error('NO_GETTEXT_IDENTIFIER')
    }
  } else {
    throw Error('INVALID_START')
  }

  function parseParameters (expressionIdentifier, parametersString) {
    var parameters = [];
    var inputLength = parametersString.length;

    if (inputLength > 0) {
      if (parametersString[0] !== '(') {
        throw Error('NO_START_BRACKET')
      }
      if (parametersString[inputLength - 1] !== ')') {
        throw Error('NO_END_BRACKET')
      }

      // Parameters structure.
      parametersString = parametersString.substr(1).slice(0, -1);
      var allowedNumberOfParameters = (function () {
        switch (expressionIdentifier) {
          case 'ge':
            return 1
          case 'pg':
            return 2
          case 'ng':
            return 3
          case 'np':
            return 4
        }
      })();

      // Characters iterator.
      var allowedQuoteSymbol = null;
      var parameterBuffer = [];
      for (var i = 0; i < parametersString.length; i++) {
        var char = parametersString.charAt(i);

        // Handle characters when parsing the last paramter that's supposed to be an integer and must not be wrapped with quotation marks.
        if (allowedQuoteSymbol === ',') {
          if (parameterBuffer.length > 0) {
            parameterBuffer.push(char);
          } else {
            if (char.trim().length === 0) {
              continue
            } else if (char === ',') {
              parameterBuffer.push(' ');
            } else {
              throw Error('MISSING_COMMA_BEFORE_LAST_PARAMETER')
            }
          }

          if (i === parametersString.length - 1) {
            if (parameterBuffer.length === 0) {
              throw Error('UNDEFINED_LAST_PARAMETER')
            } else {
              var parameterValue = parameterBuffer.join('').trim();

              if (!(!isNaN(+parameterValue) || parameterValue === '$n')) {
                if (parameterValue.indexOf(',') !== -1) {
                  throw Error('TOO_MANY_PARAMETERS')
                }
                throw Error('LAST_PARAMETER_NOT_NUMBER')
              }

              parameters.push(parameterValue === '$n' ? '$n' : +parameterValue);
            }
          }

          continue
        }

        // Handle characters when parsing normal text parameters.
        if (allowedQuoteSymbol === null && (char === '\'' || char === '"')) {
          allowedQuoteSymbol = char;
        } else if ((allowedQuoteSymbol === '\'' && char === '\'') || (allowedQuoteSymbol === '"' && char === '"')) {
          var previousChar = i >= 1 ? parametersString.charAt(i - 1) : null;

          if (previousChar !== '\\') {
            if (parameters.length >= allowedNumberOfParameters) {
              throw Error('TOO_MANY_PARAMETERS')
            } else {
              var parameterValue$1 = parameterBuffer.join('');

              // Add a valid parameter to the parameters array.
              parameters.push(parameterValue$1);
              parameterBuffer = [];

              // Change the quote symbol when expecting the next parameter to be an integer instead of a string.
              if ((expressionIdentifier === 'ng' && parameters.length === 2) || (expressionIdentifier === 'np' && parameters.length === 3)) {
                allowedQuoteSymbol = ',';
              } else {
                allowedQuoteSymbol = null;
              }
            }
          } else {
            parameterBuffer.push(char);
          }
        } else if (allowedQuoteSymbol !== null && allowedQuoteSymbol !== undefined && allowedQuoteSymbol !== false && char !== '\\') {
          parameterBuffer.push(char);
        }
      }

      if (parameters.length < allowedNumberOfParameters) {
        throw Error('PARAMETERS_INCORRECT')
      } else {
        return parameters
      }
    } else {
      throw Error('NO_PARAMETERS')
    }
  }
}
1218189
function(s) {
            var spl = s.split(constants.spDelim);
            this.id = spl[0];
            this.value = spl[1];
        }
962597
function checkAttributeSelector1(i) {
  const start = i;

  if (tokens[i].type === TokenType.LeftSquareBracket) i++;
  else return 0;

  let l;
  if (l = checkSC(i)) i += l;

  if (l = checkAttributeName(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkAttributeMatch(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkAttributeValue(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkAttributeFlags(i)) {
    i += l;
    if (l = checkSC(i)) i += l;
  }

  if (tokens[i].type === TokenType.RightSquareBracket) i++;
  else return 0;

  return i - start;
}
1117729
function(str, methodDec, methodName, method, methodsMap, options){
    var methodValue = getMethodValue(methodDec, methodName, method, methodsMap, options);
    if(str === methodDec) return methodValue;
    return str.replace(methodDec, function(){ return methodValue; });
  }
1334277
function(element, key) {
			var aData = element.getAggregation("customData");
			if (aData) {
				for (var i = 0; i < aData.length; i++) {
					if (aData[i].getKey() == key) {
						return aData[i];
					}
				}
			}
			return null;
		}
327407
function(a){
            if(!a || !this.isArray(a)) return; 

            var i = 0,start = 0,len = a.length;

            for(;i < len; i++){
             if(!this.isUndefined(a[i]) && !this.isNull(a[i]) && !(this.isEmpty(a[i]))){
              a[start]=a[i];
              start += 1;
            }
          }

          a.length = start;
          return a;
    }
747808
public function init(): void
    {
        parent::init();

        if ($this->default !== '' && $this->default !== null && !is_array($this->default)) {
            try {
                $default = Json::decode($this->default);

                if (is_array($default)) {
                    $this->default = $default;
                }
            } catch (InvalidArgumentException $exception) {}
        }
    }
54035
function (paths, obj, defaultValue = null) {
        if (!Array.isArray(paths)) {
            throw new Error("paths must be an array of strings");
        }

        let res = defaultValue;
        paths.some(path => {
            const result = this.getFlattened(path, obj, defaultValue);
            if (result !== defaultValue) {
                res = result;
                return true;
            }
            return false;
        });

        return res;
    }
13160
function(name, property, value, types) {
  if (!(types instanceof Array)) {
    types = [types];
  }
  if (types.indexOf(typeof value) === -1) {
    debug('%s \'%s\' expected %j got: %j', name, property, types, value);
    throw new Error(name + ' \'' + property + '\' expected one of type(s): \'' +
                    types.join(',') + '\' got type: \'' + typeof value + '\'');
  }
}
141654
function(parentValue, nameIndex) {

                                            if (nameIndex > defaultPropertyDepth) {
                                                defaultObserve = currentObserve;
                                                defaultReads = currentReads;
                                                defaultPropertyDepth = nameIndex;
                                                defaultScope = scope;

                                                defaultComputeReadings = can.__clearReading();
                                            }
                                        }
1112961
function (e) {
			if (e.which !== Common.ENTER_KEY || !this.$input.val().trim()) {
				return;
			}

			this.collection.create(this.newAttributes());
			this.$input.val('');
		}
1355319
function (definition) {
                var
                    result = new gpf.Parameter(),
                    typeDefaultValue;
                if (definition === gpf.Parameter.VERBOSE
                    || definition.prefix === gpf.Parameter.VERBOSE) {
                    definition = {
                        name: "verbose",
                        description: "Enable verbose mode",
                        type: "boolean",
                        defaultValue: false,
                        prefix: gpf.Parameter.VERBOSE
                    };
                } else if (definition === gpf.Parameter.HELP
                           || definition.prefix === gpf.Parameter.HELP) {
                    definition = {
                        name: "help",
                        description: "Display help",
                        type: "boolean",
                        defaultValue: false,
                        prefix: gpf.Parameter.HELP
                    };
                }
                gpf.json.load(result, definition);
                // name is required
                if (!result._name) {
                    gpf.Error.paramsNameRequired();
                }
                if (!result._multiple) {
                    /**
                     * When multiple is used, the default value will be an array
                     * if not specified.
                     * Otherwise, we get the default value based on the type
                     */
                    typeDefaultValue = this.DEFAULTS[result._type];
                    if (undefined === typeDefaultValue) {
                        gpf.Error.paramsTypeUnknown();
                    }
                    if (result.hasOwnProperty("_defaultValue")) {
                        result._defaultValue =
                            gpf.value(result._defaultValue, typeDefaultValue,
                                result._type);
                    }
                }
                return result;
            }
335194
function ( parser, params ) {
		var property, funcName, values;
		for ( property in params ) {
			funcName = 'set' + property.substring( 0, 1 ).toLocaleUpperCase() + property.substring( 1 );
			values = params[ property ];

			if ( typeof parser[ funcName ] === 'function' ) {

				parser[ funcName ]( values );

			} else if ( parser.hasOwnProperty( property ) ) {

				parser[ property ] = values;

			}
		}
	}
970700
function(d) {
        var a = d.attributes, i;
        if (a) {
          for (i = 0; i < a.length; i += 1) {
            if (typeof d[a[i].name] === 'function') d[a[i].name] = null;
          }
        }
        a = d.childNodes;
        if (a) {
          for (i = 0; i < a.length; i += 1) purge(d.childNodes[i]);
        }
      }
1270424
function isA(publicAPI, model = {}, name = null) {
  if (!model.isA) {
    model.isA = [];
  }

  if (name) {
    model.isA.push(name);
  }

  if (!publicAPI.isA) {
    publicAPI.isA = (className) => model.isA.indexOf(className) !== -1;
  }
}
1162965
function Property(path, node, scope, getObjectRef, file) {
  if (!node.method && node.kind === "init") return;
  if (!t.isFunction(node.value)) return;

  var replaceSupers = new _helpersReplaceSupers2["default"]({
    getObjectRef: getObjectRef,
    methodNode: node,
    methodPath: path,
    isStatic: true,
    scope: scope,
    file: file
  });

  replaceSupers.replace();
}