return populate(data, insertionOrder, false);
boolean result = false; ComponentData parent = data.getParent(); String id = getComponentAlibId(data); boolean isAdded = false; addComponentDataSubstitutions(data); substitutions.put(":assembly_id:", sqlQuote(assemblyId)); substitutions.put(":insertion_order:", String.valueOf(insertionOrder)); SortedSet oldArgs = (SortedSet) componentArgs.get(id); if (oldArgs == null) { insureAlib(); ResultSet rs; rs = executeQuery(stmt, dbp.getQuery("queryComponentArgs", substitutions)); oldArgs = new TreeSet(); while (rs.next()) { oldArgs.add(new Argument(rs.getString(1), rs.getFloat(2))); } rs.close(); if (parent != null) { rs = executeQuery(stmt, dbp.getQuery("checkComponentHierarchy", substitutions)); if (!rs.next()) { executeUpdate(dbp.getQuery("insertComponentHierarchy", substitutions)); isAdded = true; result = true; } rs.close(); } componentArgs.put(id, oldArgs); }  SortedSet newArgs = new TreeSet(); Object[] params = data.getParameters(); for (int i = 0; i < params.length; i++) { newArgs.add(new Argument(params[i].toString(), i)); }      int excess = newArgs.size() - oldArgs.size(); if (excess < 0) { throw new IllegalArgumentException("Attempt to remove " + (-excess) + " args from " + data); }            Iterator newIter = newArgs.iterator(); Iterator oldIter = oldArgs.iterator(); List argsToInsert = new ArrayList(); float prev = Float.NaN; while (oldIter.hasNext()) { Argument newArg = (Argument) newIter.next(); Argument oldArg = (Argument) oldIter.next(); while (!newArg.argument.equals(oldArg.argument)) {  excess--; if (excess < 0) { throw new IllegalArgumentException("Component args cannot be modified or removed: " + data); } if (Float.isNaN(prev)) prev = oldArg.order - 1f; argsToInsert.add(new Argument(newArg.argument, (prev + oldArg.order) * 0.5f)); newArg = (Argument) newIter.next(); } prev = oldArg.order; }  if (Float.isNaN(prev)) prev = 0f; while (newIter.hasNext()) { Argument newArg = (Argument) newIter.next(); prev += 1f; argsToInsert.add(new Argument(newArg.argument, prev)); }   for (Iterator i = argsToInsert.iterator(); i.hasNext(); ) { Argument arg = (Argument) i.next(); substitutions.put(":argument_value:", sqlQuote(arg.argument)); substitutions.put(":argument_order:", sqlQuote(String.valueOf(arg.order))); executeUpdate(dbp.getQuery("insertComponentArg", substitutions)); oldArgs.add(arg); result = true; }  if (data.getType().equals(ComponentData.AGENT)) { populateAgent(data, isAdded); result = true; }  ComponentData[] children = data.getChildren();      for (int i = 0, n = children.length; i < n; i++) { result |= populate(children[i], i, assemblyId); } return result;
    public boolean populate(ComponentData data, float insertionOrder)        throws SQLException    {        return populate(data, insertionOrder, false);    }