/*
(non-Javadoc)
@see net.roboconf.dm.internal.rest.api.IApplicationWs
#listChildrenInstances(java.lang.String, java.lang.String, boolean)
438259
@Override
	public List<Instance> listChildrenInstances( String applicationName, String instancePath, boolean allChildren ) {

		List<Instance> result = new ArrayList<> ();
		Application app = this.manager.applicationMngr().findApplicationByName( applicationName );

		// Log
		if( instancePath == null )
			this.logger.fine( "Request: list " + (allChildren ? "all" : "root") + " instances for " + applicationName + "." );
		else
			this.logger.fine( "Request: list " + (allChildren ? "all" : "direct") + " children instances for " + instancePath + " in " + applicationName + "." );

		// Find the instances
		Instance inst;
		if( app != null ) {
			if( instancePath == null ) {
				if( allChildren )
					result.addAll( InstanceHelpers.getAllInstances( app ));
				else
					result.addAll( app.getRootInstances());
			}

			else if(( inst = InstanceHelpers.findInstanceByPath( app, instancePath )) != null ) {
				if( allChildren ) {
					result.addAll( InstanceHelpers.buildHierarchicalList( inst ));
					result.remove( inst );
				} else {
					result.addAll( inst.getChildren());
				}
			}
		}

		// Bug #64: sort instance paths for the clients
		Collections.sort( result, new InstanceComparator());
		return result;
	}
995129
@Override
    public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
            Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {

        return jcrRepository(repositoryId).getChildren(login(repositoryId), folderId, filter, includeAllowableActions,
                includePathSegment, maxItems, skipCount, this, context.isObjectInfoRequired());
    }
247354
public static List<Long> childrenToReplicaHSIds(Collection<String> children)
    {
        List<Long> replicas = new ArrayList<Long>(children.size());
        for (String child : children) {
            long HSId = Long.parseLong(CoreZK.getPrefixFromChildName(child));
            replicas.add(HSId);
        }
        return replicas;
    }
1341311
protected List<R> visitChildren(ParentNode<? extends N> node) {
    List<R> results = new ArrayList<>(node.numChildren());
    for (N child : node.getChildren()) {
      results.add(visit(child));
    }
    return results;
  }
866695
public static List<Resource> getChildrenByType(final Resource resource, List<String> typeSet) {
        final ArrayList<Resource> children = new ArrayList<>();
        if (resource != null) {
            for (final Resource child : resource.getChildren()) {
                for (String type : typeSet) {
                    if (isResourceType(child, type)) {
                        children.add(child);
                        break;
                    }
                }
            }
        }
        return children;
    }
1170788
public List<String> getChildren(String path, Stat stat, Watcher watcher)
    throws KeeperException.NoNodeException {
        return dataTree.getChildren(path, stat, watcher);
    }
1072631
private static List<WComponent> copyChildren(final List<WComponent> children) {
		ArrayList<WComponent> copy;

		if (children == null) {
			copy = new ArrayList<>(1);
		} else {
			copy = new ArrayList<>(children);
		}

		return copy;
	}
748846
public void setInstanceProfileList(java.util.Collection<InstanceProfile> instanceProfileList) {
        if (instanceProfileList == null) {
            this.instanceProfileList = null;
            return;
        }

        this.instanceProfileList = new com.amazonaws.internal.SdkInternalList<InstanceProfile>(instanceProfileList);
    }
995053
public java.util.List<String> getInstancesList() {
        if (instancesList == null) {
            instancesList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instancesList;
    }
1373137
@Override
    protected List<ScenarioSpec> getChildren() {
        TestPackageRoot rootPackageAnnotation = testClass.getAnnotation(TestPackageRoot.class);
        JsonTestCases jsonTestCasesAnnotation = testClass.getAnnotation(JsonTestCases.class);
        validateSuiteAnnotationPresent(rootPackageAnnotation, jsonTestCasesAnnotation);

        if (rootPackageAnnotation != null) {
            /*
             * Different scenarios with same name -or- Same scenarios with same name more than once is prevented
             */
            smartUtils.checkDuplicateScenarios(rootPackageAnnotation.value());

            return smartUtils.getScenarioSpecListByPackage(rootPackageAnnotation.value());

        } else {
            List<JsonTestCase> jsonTestCases = Arrays.asList(testClass.getAnnotationsByType(JsonTestCase.class));
            List<String> allEndPointFiles = jsonTestCases.stream()
                    .map(thisTestCase -> thisTestCase.value())
                    .collect(Collectors.toList());

            return allEndPointFiles.stream()
                    .map(testResource -> {
                        try {
                            return smartUtils.jsonFileToJava(testResource, ScenarioSpec.class);
                        } catch (IOException e) {
                            throw new RuntimeException("Exception while deserializing to Spec. Details: " + e);
                        }
                    })
                    .collect(Collectors.toList());
        }
    }
1111063
public List<XNElement> childrenWithName(final String name) {
        List<XNElement> result = new ArrayList<>();
        for (XNElement c : children) {
            if (Objects.equals(c.name, name)) {
                result.add(c);
            }
        }
        return result;
    }
711524
@Override
  public Collection<ConfigKeyPath> getChildren(ConfigKeyPath configKey) {
    try {
      return this.childrenMap.get(configKey, () -> this.fallback.getChildren(configKey));
    } catch (ExecutionException ee) {
      throw new RuntimeException(ee);
    }
  }
33870
public final void readChildren(ObjectInputStream in) throws IOException, ClassNotFoundException {
        int childCount = in.readInt();
        for (int i = 0; i < childCount; i++) {
            internalAdd(in.readObject(), false);
        }
    }
22322
public List<VoltXMLElement> findChildren(String name)
    {
        List<VoltXMLElement> retval = new ArrayList<>();
        for (VoltXMLElement vxe : children) {
            if (name.equals(vxe.name)) {
                retval.add(vxe);
            }
        }
        return retval;
    }
306952
private static JSONArray parseChildShapesRecursive(ArrayList<Shape> childShapes) throws JSONException {
        if (childShapes != null) {
            JSONArray childShapesArray = new JSONArray();

            for (Shape childShape : childShapes) {
                JSONObject childShapeObject = new JSONObject();

                childShapeObject.put("resourceId",
                                     childShape.getResourceId().toString());
                childShapeObject.put("properties",
                                     parseProperties(childShape.getProperties()));
                childShapeObject.put("stencil",
                                     parseStencil(childShape.getStencilId()));
                childShapeObject.put("childShapes",
                                     parseChildShapesRecursive(childShape.getChildShapes()));
                childShapeObject.put("outgoing",
                                     parseOutgoings(childShape.getOutgoings()));
                childShapeObject.put("bounds",
                                     parseBounds(childShape.getBounds()));
                childShapeObject.put("dockers",
                                     parseDockers(childShape.getDockers()));

                if (childShape.getTarget() != null) {
                    childShapeObject.put("target",
                                         parseTarget(childShape.getTarget()));
                }

                childShapesArray.put(childShapeObject);
            }

            return childShapesArray;
        }

        return new JSONArray();
    }
1091102
protected static List<FieldDescriptor> getChildFieldDescriptors(final Descriptor type) {
    final List<FieldDescriptor> fields = new ArrayList<FieldDescriptor>();

    for (final FieldDescriptor field : type.getFields()) {
      if (field.getJavaType() == JavaType.MESSAGE) {
        fields.add(field);
      }
    }

    for (final FieldDescriptor field : type.getExtensions()) {
      if (field.getJavaType() == JavaType.MESSAGE) {
        fields.add(field);
      }
    }

    return Collections.unmodifiableList(fields);
  }
1083991
def ListChildren(self, urn):
    """"""
    result = self.MultiListChildren([urn])
    try:
      return result[urn]
    except KeyError:
      return []