Program: 79035
Project: 79035
Buggy source:
public Object[] getChildren(Object parent){
  ArrayList childrenList=new ArrayList();
  if (parent instanceof Object[]) {
    Object[] array=(Object[])parent;
    if (array instanceof Operator[]) {
      return array;
    }
    for (int i=0; i < array.length; i++) {
      Object[] children=getChildren(array[i]);
      childrenList.addAll(Arrays.asList(children));
    }
  }
 else   if (parent instanceof String) {
    if (PARAMETERS.equals(parent)) {
      childrenList.add(ALL);
    }
 else     if (ALL.equals(parent)) {
      childrenList.addAll(moduleHandle.getAllParameters());
    }
 else {
      if (DATASETS.equals(parent)) {
        childrenList.addAll(dataSetList);
        childrenList.add(0,childrenList.toArray());
      }
 else       if (BIRT_OBJECTS.equals(parent)) {
        childrenList.addAll(getClassList(false));
      }
 else       if (NATIVE_OBJECTS.equals(parent)) {
        childrenList.addAll(getClassList(true));
      }
 else       if (OPERATORS.equals(parent)) {
        childrenList.add(OPERATORS_ASSIGNMENT);
        childrenList.add(OPERATORS_COMPARISON);
        childrenList.add(OPERATORS_COMPUTATIONAL);
        childrenList.add(OPERATORS_LOGICAL);
        childrenList.add(0,childrenList.toArray());
      }
    }
  }
 else   if (parent instanceof IClassInfo) {
    IClassInfo classInfo=(IClassInfo)parent;
    for (Iterator iter=classInfo.getMembers().iterator(); iter.hasNext(); ) {
      childrenList.add(new ILocalizableInfo[]{classInfo,(IMemberInfo)iter.next()});
    }
    for (Iterator iter=classInfo.getMethods().iterator(); iter.hasNext(); ) {
      childrenList.add(new ILocalizableInfo[]{classInfo,(IMethodInfo)iter.next()});
    }
  }
 else   if (parent instanceof DataSetHandle) {
    DataSetItemModel[] models=DataSetManager.getCurrentInstance().getColumns(((DataSetHandle)parent),false);
    childrenList.addAll(Arrays.asList(models));
  }
  Object[] children=childrenList.toArray();
  if (filterList != null && !filterList.isEmpty()) {
    for (Iterator iter=filterList.iterator(); iter.hasNext(); ) {
      Object obj=iter.next();
      if (obj instanceof ExpressionFilter) {
        children=((ExpressionFilter)obj).filter(parent,children);
      }
    }
  }
  return children;
}

Fixed version (ground truth):
public Object[] getChildren(Object parent){
  ArrayList childrenList=new ArrayList();
  if (parent instanceof Object[]) {
    Object[] array=(Object[])parent;
    if (array instanceof Operator[]) {
      return array;
    }
    for (int i=0; i < array.length; i++) {
      Object[] children=getChildren(array[i]);
      childrenList.addAll(Arrays.asList(children));
    }
  }
 else   if (parent instanceof String) {
    if (PARAMETERS.equals(parent)) {
      childrenList.add(ALL);
      for (Iterator iter=moduleHandle.getAllParameters().iterator(); iter.hasNext(); ) {
        Object obj=iter.next();
        if (obj instanceof ParameterGroupHandle) {
          childrenList.add(obj);
        }
      }
    }
 else     if (ALL.equals(parent)) {
      for (Iterator iter=moduleHandle.getAllParameters().iterator(); iter.hasNext(); ) {
        Object obj=iter.next();
        if (obj instanceof ParameterHandle) {
          childrenList.add(obj);
        }
      }
    }
 else {
      if (DATASETS.equals(parent)) {
        childrenList.addAll(dataSetList);
        childrenList.add(0,childrenList.toArray());
      }
 else       if (BIRT_OBJECTS.equals(parent)) {
        childrenList.addAll(getClassList(false));
      }
 else       if (NATIVE_OBJECTS.equals(parent)) {
        childrenList.addAll(getClassList(true));
      }
 else       if (OPERATORS.equals(parent)) {
        childrenList.add(OPERATORS_ASSIGNMENT);
        childrenList.add(OPERATORS_COMPARISON);
        childrenList.add(OPERATORS_COMPUTATIONAL);
        childrenList.add(OPERATORS_LOGICAL);
        childrenList.add(0,childrenList.toArray());
      }
    }
  }
 else   if (parent instanceof IClassInfo) {
    IClassInfo classInfo=(IClassInfo)parent;
    for (Iterator iter=classInfo.getMembers().iterator(); iter.hasNext(); ) {
      childrenList.add(new ILocalizableInfo[]{classInfo,(IMemberInfo)iter.next()});
    }
    for (Iterator iter=classInfo.getMethods().iterator(); iter.hasNext(); ) {
      childrenList.add(new ILocalizableInfo[]{classInfo,(IMethodInfo)iter.next()});
    }
  }
 else   if (parent instanceof DataSetHandle) {
    DataSetItemModel[] models=DataSetManager.getCurrentInstance().getColumns(((DataSetHandle)parent),false);
    childrenList.addAll(Arrays.asList(models));
  }
 else   if (parent instanceof ParameterGroupHandle) {
    childrenList.addAll(((ParameterGroupHandle)parent).getParameters().getContents());
  }
  Object[] children=childrenList.toArray();
  if (filterList != null && !filterList.isEmpty()) {
    for (Iterator iter=filterList.iterator(); iter.hasNext(); ) {
      Object obj=iter.next();
      if (obj instanceof ExpressionFilter) {
        children=((ExpressionFilter)obj).filter(parent,children);
      }
    }
  }
  return children;
}