As above, but create a List of PMultipleBind with one element, for convenience.
540425
protected List<PMultipleBind> getMultipleSetBindList(PExp setExp,
			ILexNameToken... patternNames)
	{
		List<PMultipleBind> setBindList = new Vector<PMultipleBind>();
		setBindList.add(getMultipleSetBind(setExp, patternNames));
		return setBindList;
	}
293403
@Override
    protected List<BenchmarkElement> arrangeList(final List<BenchmarkElement> elements) {
        final List<BenchmarkElement> elementList = new LinkedList<BenchmarkElement>();
        elementList.addAll(elements);
        return elementList;
    }
1092760
@Override
    public C.List<T> prepend(C.List<T> list) {
        return prependList(list);
    }
452520
def simpleListFactory(list_type):
    """"""
    def create(delegate, extra_args=None):
        """Create a Parser object for the specific tag type, on the fly"""
        return listParser(list_type, delegate, extra_args)
    return create
642597
String emitHumanDescription(List<Binding> bindings) {
    StringBuilder builder = new StringBuilder();
    switch (bindings.size()) {
      case 1:
        builder.append(bindings.get(0).getDescription());
        break;
      case 2:
        builder
            .append(bindings.get(0).getDescription())
            .append(" and ")
            .append(bindings.get(1).getDescription());
        break;
      default:
        for (int i = 0, count = bindings.size(); i < count; i++) {
          Binding requiredField = bindings.get(i);
          if (i != 0) {
            builder.append(", ");
          }
          if (i == count - 1) {
            builder.append("and ");
          }
          builder.append(requiredField.getDescription());
        }
        break;
    }
    return builder.toString();
  }
1028533
function preProcessBindings(bindingString) {
  var results = [];
  var bindingHandlers = this.bindingHandlers;
  var preprocessed;

  // Check for a Provider.preprocessNode property
  if (typeof this.preprocessNode === 'function') {
    preprocessed = this.preprocessNode(bindingString, this);
    if (preprocessed) { bindingString = preprocessed; }
  }

  for (var i = 0, j = this.bindingPreProcessors.length; i < j; ++i) {
    preprocessed = this.bindingPreProcessors[i](bindingString, this);
    if (preprocessed) { bindingString = preprocessed; }
  }

  function addBinding(name, value) {
    results.push("'" + name + "':" + value);
  }

  function processBinding(key, value) {
    // Get the "on" binding from "on.click"
    var handler = bindingHandlers.get(key.split('.')[0]);

    if (handler && typeof handler.preprocess === 'function') {
      value = handler.preprocess(value, key, processBinding);
    }

    addBinding(key, value);
  }

  arrayForEach(parseObjectLiteral(bindingString), function(keyValueItem) {
    processBinding(
      keyValueItem.key || keyValueItem.unknown,
      keyValueItem.value
    );
  });

  return results.join(',');
}
788154
public static <T> Collection<T> notNullElements(Collection<T> list, String name) {
        notEmpty(list, name);
        for (T ele : list) {
            notNull(ele, String.format("Collection %s element %s", name, ele));
        }
        return list;
    }
1323073
def p_source_element_list(self, p):
        
        if len(p) == 2:  # single source element
            p[0] = [p[1]]
        else:
            p[1].append(p[2])
            p[0] = p[1]
342442
@Override
	public NamingEnumeration<Binding> listBindings(Name name) throws NamingException
    {
        if (name.isEmpty())
            return new ListOfBindings(bindings.keys());

        Object target = lookup(name);
        if (target instanceof Context)
        {
            try
            {
                return ((Context)target).listBindings("");
            }
            finally
            {
                ((Context)target).close();
            }
        }
        throw new NotContextException(name + " cannot be listed");
    }
627373
private List<ExpandableWrapper<P, C>> generateFlattenedParentChildList(List<P> parentList) {
        List<ExpandableWrapper<P, C>> flatItemList = new ArrayList<>();

        int parentCount = parentList.size();
        for (int i = 0; i < parentCount; i++) {
            P parent = parentList.get(i);
            generateParentWrapper(flatItemList, parent, parent.isInitiallyExpanded());
        }

        return flatItemList;
    }
915425
def pmap(enumerable)
      return to_enum(:pmap, enumerable) unless block_given?
      if enumerable.count == 1
        enumerable.collect { |object| yield(object) }
      else
        enumerable.collect { |object| Thread.new { yield(object) } }.collect(&:value)
      end
    end
427568
public static Tuple of( Collection<VarBindingDef> tupleBindings)
    {
    Tuple tuple = new Tuple();
    
    boolean bindingsCompatible;
    Iterator<VarBindingDef> bindings;
    VarBindingDef nextBinding;
    for( bindings = tupleBindings.iterator(),
           bindingsCompatible = true; 

         bindings.hasNext()
           && (bindingsCompatible = isBindingCompatible( tuple, (nextBinding = bindings.next())));

         tuple.add( nextBinding));
    
    return
      bindingsCompatible && tuple.isCompatible()
      ? tuple
      : null;
    }
1085212
public static <T> Collection<List<T>> permutations(Collection<T> elements) {
        Collection<List<T>> result = new ArrayList<>();
        if (elements.isEmpty()) {
            result.add(new LinkedList<>());
            return result;
        }

        List<T> rest = new LinkedList<>(elements);
        T head = rest.remove(0);
        for (List<T> permutations : permutations(rest)) {
            List<List<T>> subLists = new ArrayList<>();
            for (int i = 0; i <= permutations.size(); i++) {
                List<T> subList = new ArrayList<>();
                subList.addAll(permutations);
                subList.add(i, head);
                subLists.add(subList);
            }
            result.addAll(subLists);
        }
        return result;
    }
187112
private Object[] createTargetArray(OpenType pElementType, int pLength) {
        if (pElementType instanceof SimpleType) {
            try {
                SimpleType simpleType = (SimpleType) pElementType;
			    Class elementClass = Class.forName(simpleType.getClassName());
                return (Object[]) Array.newInstance(elementClass, pLength);

            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException("Can't find class " + pElementType.getClassName() +
                                                   " for instantiating array: " + e.getMessage(),e);
            }
        } else if (pElementType instanceof CompositeType) {
            return new CompositeData[pLength];
		} else {
			throw new UnsupportedOperationException("Unsupported array element type: " + pElementType);
		}
    }
1032917
private ProcPattern createPattern(Pattern pattern) {
        if (pattern.isEmpty()) {
            throw new IllegalStateException("Pattern elements list can't be empty.");
        }

        List<ProcPatternElement> elements = new ArrayList<ProcPatternElement>();
        for (PatternElement element : pattern.getElements()) {
            elements.add(patternElementFactory.create(element));
        }
        return new ProcPattern(elements);
    }
504682
protected Collection invokePage(int pPageIndex, int pPageSize) {
        if(mDao instanceof BaseSelectPageMapper)
        {
            return ((BaseSelectPageMapper)mDao).selectPage(createModel(),pPageIndex,pPageSize);
        }
        else if( mDao instanceof MysqlSelectPageMapper)
        {
            return ((MysqlSelectPageMapper)mDao).selectPage(createModel(),pPageIndex,pPageSize);
        }
        else if(mDao instanceof  Mapper)
        {
            Mapper mapper= (Mapper)mDao;
            return mapper.selectByRowBounds(createModel(),new RowBounds(pPageIndex-1,pPageSize));
        }
        return new ArrayList();
    }
847427
@Override
    public NamingEnumeration<Binding> listBindings(String s) throws NamingException {
        return listBindings(newCompositeName(s));
    }