Program: 140400
Project: 140400
Buggy source:
public Object[] getChildren(Object parentElement){
  if (parentElement instanceof IFile) {
    IFile file=(IFile)parentElement;
    if (file.getName().endsWith(PluginConstant.ANA_SUFFIX)) {
      Analysis analysis=(Analysis)AnaResourceFileHelper.getInstance().getFileResource(file).getContents().get(0);
      EList<ModelElement> analysedElements=analysis.getContext().getAnalysedElements();
      AnaElementFolderNode folderNode=new AnaElementFolderNode(analysedElements);
      return new Object[]{folderNode};
    }
    parentElement=PrvResourceFileHelper.getInstance().getFileResource(file);
  }
 else   if (parentElement instanceof IFolderNode) {
    IFolderNode folerNode=(IFolderNode)parentElement;
    folerNode.loadChildren();
    if (folerNode.getChildren() == null) {
      return new Object[0];
    }
    if (folerNode.getChildrenType() == IFolderNode.MODELELEMENT_TYPE) {
      return ComparatorsFactory.sort(folerNode.getChildren(),ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    }
 else {
      return ComparatorsFactory.sort(folerNode.getChildren(),ComparatorsFactory.FILE_RESOURCE_COMPARATOR_ID);
    }
  }
 else   if (SwitchHelpers.CATALOG_SWITCH.doSwitch((EObject)parentElement) != null) {
    if (CatalogHelper.getSchemas(SwitchHelpers.CATALOG_SWITCH.doSwitch((EObject)parentElement)).size() > 0) {
      return ComparatorsFactory.sort(super.getChildren(parentElement),ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    }
 else {
      return FolderNodeHelper.getFolderNodes((EObject)parentElement);
    }
  }
 else {
    return FolderNodeHelper.getFolderNodes((EObject)parentElement);
  }
  return ComparatorsFactory.sort(super.getChildren(parentElement),ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
}

Fixed version (ground truth):
public Object[] getChildren(Object parentElement){
  if (parentElement instanceof IFile) {
    IFile file=(IFile)parentElement;
    if (file.getName().endsWith(PluginConstant.ANA_SUFFIX)) {
      Analysis analysis=(Analysis)AnaResourceFileHelper.getInstance().findAnalysis(file);
      EList<ModelElement> analysedElements=analysis.getContext().getAnalysedElements();
      AnaElementFolderNode folderNode=new AnaElementFolderNode(analysedElements);
      return new Object[]{folderNode};
    }
    parentElement=PrvResourceFileHelper.getInstance().getFileResource(file);
  }
 else   if (parentElement instanceof IFolderNode) {
    IFolderNode folerNode=(IFolderNode)parentElement;
    folerNode.loadChildren();
    if (folerNode.getChildren() == null) {
      return new Object[0];
    }
    if (folerNode.getChildrenType() == IFolderNode.MODELELEMENT_TYPE) {
      return ComparatorsFactory.sort(folerNode.getChildren(),ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    }
 else {
      return ComparatorsFactory.sort(folerNode.getChildren(),ComparatorsFactory.FILE_RESOURCE_COMPARATOR_ID);
    }
  }
 else   if (SwitchHelpers.CATALOG_SWITCH.doSwitch((EObject)parentElement) != null) {
    if (CatalogHelper.getSchemas(SwitchHelpers.CATALOG_SWITCH.doSwitch((EObject)parentElement)).size() > 0) {
      return ComparatorsFactory.sort(super.getChildren(parentElement),ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    }
 else {
      return FolderNodeHelper.getFolderNodes((EObject)parentElement);
    }
  }
 else {
    return FolderNodeHelper.getFolderNodes((EObject)parentElement);
  }
  return ComparatorsFactory.sort(super.getChildren(parentElement),ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
}