Program: 17545
Project: 17545
Buggy source:
public Object[] getElements(Object parent){
  try {
    CFDocument doc=document.getCFDocument();
    if (doc == null) {
      return EMPTY_ARRAY;
    }
    DocItem rootItem=doc.getDocumentRoot();
    nodes=rootItem.selectNodes("String_Node_Str");
    if (sortItems) {
      CFCMethodsComparator comparator=new CFCMethodsComparator();
      Collections.sort(nodes,comparator);
    }
    Iterator i=nodes.iterator();
    CFCMethodViewItem[] methods=new CFCMethodViewItem[nodes.size()];
    int index=0;
    while (i.hasNext()) {
      try {
        TagItem thisTag=(TagItem)i.next();
        CFCMethodViewItem item=new CFCMethodViewItem(thisTag);
        boolean addItem=true;
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showRemote) {
          addItem=false;
        }
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showPublic) {
          addItem=false;
        }
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showPackage) {
          addItem=false;
        }
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showPrivate) {
          addItem=false;
        }
        if (addItem) {
          methods[index]=item;
          index++;
        }
      }
 catch (      Exception e) {
        System.err.println(e.getMessage());
      }
    }
    CFCMethodViewItem[] finalMethods=new CFCMethodViewItem[index];
    for (int x=0; x < finalMethods.length; x++) {
      finalMethods[x]=methods[x];
    }
    return finalMethods;
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
    return EMPTY_ARRAY;
  }
}

Fixed version (ground truth):
public Object[] getElements(Object parent){
  try {
    CFDocument doc=document.getCFDocument();
    if (doc == null) {
      return EMPTY_ARRAY;
    }
    DocItem rootItem=doc.getDocumentRoot();
    nodes=rootItem.selectNodes("String_Node_Str");
    if (sortItems) {
      CFCMethodsComparator comparator=new CFCMethodsComparator();
      Collections.sort(nodes,comparator);
    }
    Iterator i=nodes.iterator();
    CFCMethodViewItem[] methods=new CFCMethodViewItem[nodes.size()];
    int index=0;
    while (i.hasNext()) {
      try {
        TagItem thisTag=(TagItem)i.next();
        CFCMethodViewItem item=new CFCMethodViewItem(thisTag);
        boolean addItem=true;
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showRemote) {
          addItem=false;
        }
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showPublic) {
          addItem=false;
        }
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showPackage) {
          addItem=false;
        }
        if (item.getAccess().toLowerCase().equals("String_Node_Str") && !this.showPrivate) {
          addItem=false;
        }
        if (addItem) {
          methods[index]=item;
          index++;
        }
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    CFCMethodViewItem[] finalMethods=new CFCMethodViewItem[index];
    for (int x=0; x < finalMethods.length; x++) {
      finalMethods[x]=methods[x];
    }
    return finalMethods;
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
    return EMPTY_ARRAY;
  }
}