Program: 178908
Project: 178908
Buggy source:
@Override public Object[] getChildren(Object object){
  if (object instanceof XWikiEclipsePageSummary) {
    final XWikiEclipsePageSummary pageSummary=(XWikiEclipsePageSummary)object;
    try {
      DataManager dataManager=pageSummary.getDataManager();
      List<XWikiEclipseObjectSummary> objects=dataManager.getObjects(pageSummary);
      List<XWikiEclipseAttachment> attachments=dataManager.getAttachments(pageSummary);
      XWikiEclipseClassSummary pageClass=dataManager.getPageClass(pageSummary);
      List<XWikiEclipseTag> tags=dataManager.getTags(pageSummary);
      List<XWikiEclipseComment> comments=dataManager.getComments(pageSummary);
      List<ModelObject> result=new ArrayList<ModelObject>();
      result.add(pageClass);
      List<ModelObject> list=null;
      if (attachments != null && attachments.size() > 0) {
        XWikiEclipseObjectCollection a=new XWikiEclipseObjectCollection(dataManager);
        a.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseAttachment attach : attachments) {
          list.add(attach);
        }
        a.setObjects(list);
        result.add(a);
      }
      if (tags != null && tags.size() > 0) {
        XWikiEclipseObjectCollection t=new XWikiEclipseObjectCollection(dataManager);
        t.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseTag tag : tags) {
          list.add(tag);
        }
        t.setObjects(list);
        result.add(t);
      }
      if (comments != null && comments.size() > 0) {
        XWikiEclipseObjectCollection t=new XWikiEclipseObjectCollection(dataManager);
        t.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseComment comment : comments) {
          list.add(comment);
        }
        t.setObjects(list);
        result.add(t);
      }
      if (objects != null && objects.size() > 0) {
        XWikiEclipseObjectCollection t=new XWikiEclipseObjectCollection(dataManager);
        t.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseObjectSummary objectSummary : objects) {
          if (objectSummary.getClassName().equals("String_Node_Str")) {
            list.add(objectSummary);
          }
        }
        t.setObjects(list);
        result.add(t);
      }
      return result.toArray();
    }
 catch (    XWikiEclipseStorageException e) {
      UIUtils.showMessageDialog(Display.getDefault().getActiveShell(),SWT.ICON_ERROR,"String_Node_Str","String_Node_Str");
      pageSummary.getDataManager().disconnect();
      CoreLog.logError("String_Node_Str",e);
      return NO_CHILDREN;
    }
  }
  return super.getChildren(object);
}

Fixed version (ground truth):
@Override public Object[] getChildren(Object object){
  if (object instanceof XWikiEclipsePageSummary) {
    final XWikiEclipsePageSummary pageSummary=(XWikiEclipsePageSummary)object;
    try {
      DataManager dataManager=pageSummary.getDataManager();
      List<XWikiEclipseObjectSummary> objects=dataManager.getObjects(pageSummary);
      List<XWikiEclipseAttachment> attachments=dataManager.getAttachments(pageSummary);
      XWikiEclipseClassSummary pageClass=dataManager.getPageClass(pageSummary);
      List<XWikiEclipseTag> tags=dataManager.getTags(pageSummary);
      List<XWikiEclipseComment> comments=dataManager.getComments(pageSummary);
      List<ModelObject> result=new ArrayList<ModelObject>();
      result.add(pageClass);
      List<ModelObject> list=null;
      if (attachments != null && attachments.size() > 0) {
        XWikiEclipseObjectCollection a=new XWikiEclipseObjectCollection(dataManager);
        a.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseAttachment attach : attachments) {
          list.add(attach);
        }
        a.setObjects(list);
        result.add(a);
      }
      if (tags != null && tags.size() > 0) {
        XWikiEclipseObjectCollection t=new XWikiEclipseObjectCollection(dataManager);
        t.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseTag tag : tags) {
          list.add(tag);
        }
        t.setObjects(list);
        result.add(t);
      }
      if (comments != null && comments.size() > 0) {
        XWikiEclipseObjectCollection t=new XWikiEclipseObjectCollection(dataManager);
        t.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseComment comment : comments) {
          list.add(comment);
        }
        t.setObjects(list);
        result.add(t);
      }
      if (objects != null && objects.size() > 0) {
        XWikiEclipseObjectCollection t=new XWikiEclipseObjectCollection(dataManager);
        t.setClassName("String_Node_Str");
        list=new ArrayList<ModelObject>();
        for (        XWikiEclipseObjectSummary objectSummary : objects) {
          if (objectSummary.getClassName().equals("String_Node_Str")) {
            list.add(objectSummary);
          }
        }
        if (list.size() > 0) {
          t.setObjects(list);
          result.add(t);
        }
      }
      return result.toArray();
    }
 catch (    XWikiEclipseStorageException e) {
      UIUtils.showMessageDialog(Display.getDefault().getActiveShell(),SWT.ICON_ERROR,"String_Node_Str","String_Node_Str");
      pageSummary.getDataManager().disconnect();
      CoreLog.logError("String_Node_Str",e);
      return NO_CHILDREN;
    }
  }
  return super.getChildren(object);
}