Program: 148416
Project: 148416
Buggy source:
protected LineItem[] getResults(boolean showResultInfo){
  Cursor waitCursor=null;
  try {
    Display display=getEditor().getSite().getPage().getWorkbenchWindow().getWorkbench().getDisplay();
    waitCursor=new Cursor(display,SWT.CURSOR_WAIT);
    this.getSite().getShell().setCursor(waitCursor);
    XtentisPort port=Util.getPort(getXObject());
    long from=-1;
    long to=-1;
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    Pattern pattern=Pattern.compile("String_Node_Str");
    if (!"String_Node_Str".equals(fromText.getText())) {
      String dateTimeText=fromText.getText().trim();
      Matcher matcher=pattern.matcher(dateTimeText);
      if (!matcher.matches()) {
        MessageDialog.openWarning(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
        return new LineItem[0];
      }
      try {
        Date d=sdf.parse(fromText.getText());
        from=d.getTime();
      }
 catch (      ParseException pe) {
      }
    }
    if (!"String_Node_Str".equals(toText.getText())) {
      String dateTimeText=toText.getText().trim();
      Matcher matcher=pattern.matcher(dateTimeText);
      if (!matcher.matches()) {
        MessageDialog.openWarning(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
        return new LineItem[0];
      }
      try {
        Date d=sdf.parse(toText.getText());
        to=d.getTime();
      }
 catch (      ParseException pe) {
      }
    }
    String concept=conceptCombo.getText();
    if ("String_Node_Str".equals(concept) | "String_Node_Str".equals(concept))     concept=null;
    if (concept != null) {
      concept=concept.replaceAll("String_Node_Str","String_Node_Str").trim();
    }
    String keys=keyText.getText();
    if ("String_Node_Str".equals(keys) | "String_Node_Str".equals(keys))     keys=null;
    boolean useFTSearch=checkFTSearchButton.getSelection();
    String search=searchText.getText();
    if ("String_Node_Str".equals(search) | "String_Node_Str".equals(search))     search=null;
    int start=pageToolBar.getStart();
    int limit=pageToolBar.getLimit();
    String clusterName=URLEncoder.encode(((WSDataClusterPK)getXObject().getWsKey()).getPk(),"String_Node_Str");
    WSDataClusterPK clusterPk=new WSDataClusterPK(clusterName);
    WSItemPKsByCriteriaResponseResults[] results=port.getItemPKsByFullCriteria(new WSGetItemPKsByFullCriteria(new WSGetItemPKsByCriteria(clusterPk,concept,search,keys,from,to,start,limit),useFTSearch)).getResults();
    if (showResultInfo && (results.length == 1)) {
      MessageDialog.openInformation(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return new LineItem[0];
    }
    if (results.length == 1)     return new LineItem[0];
    int totalSize=0;
    List<LineItem> ress=new ArrayList<LineItem>();
    for (int i=0; i < results.length; i++) {
      if (i == 0) {
        totalSize=Integer.parseInt(Util.parse(results[i].getWsItemPK().getConceptName()).getDocumentElement().getTextContent());
        continue;
      }
      ress.add(new LineItem(results[i].getDate(),results[i].getWsItemPK().getConceptName(),results[i].getWsItemPK().getIds()));
    }
    pageToolBar.setTotalsize(totalSize);
    pageToolBar.refreshUI();
    return (LineItem[])ress.toArray(new LineItem[ress.size()]);
  }
 catch (  Exception e) {
    e.printStackTrace();
    if ((e.getLocalizedMessage() != null) && e.getLocalizedMessage().contains("String_Node_Str"))     MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
 else     MessageDialog.openError(this.getSite().getShell(),"String_Node_Str",e.getLocalizedMessage());
    return null;
  }
 finally {
    try {
      this.getSite().getShell().setCursor(null);
      waitCursor.dispose();
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
protected LineItem[] getResults(boolean showResultInfo){
  Cursor waitCursor=null;
  try {
    Display display=getEditor().getSite().getPage().getWorkbenchWindow().getWorkbench().getDisplay();
    waitCursor=new Cursor(display,SWT.CURSOR_WAIT);
    this.getSite().getShell().setCursor(waitCursor);
    XtentisPort port=Util.getPort(getXObject());
    long from=-1;
    long to=-1;
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    Pattern pattern=Pattern.compile("String_Node_Str");
    if (!"String_Node_Str".equals(fromText.getText())) {
      String dateTimeText=fromText.getText().trim();
      Matcher matcher=pattern.matcher(dateTimeText);
      if (!matcher.matches()) {
        MessageDialog.openWarning(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
        return new LineItem[0];
      }
      try {
        Date d=sdf.parse(fromText.getText());
        from=d.getTime();
      }
 catch (      ParseException pe) {
      }
    }
    if (!"String_Node_Str".equals(toText.getText())) {
      String dateTimeText=toText.getText().trim();
      Matcher matcher=pattern.matcher(dateTimeText);
      if (!matcher.matches()) {
        MessageDialog.openWarning(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
        return new LineItem[0];
      }
      try {
        Date d=sdf.parse(toText.getText());
        to=d.getTime();
      }
 catch (      ParseException pe) {
      }
    }
    String concept=conceptCombo.getText();
    if ("String_Node_Str".equals(concept) | "String_Node_Str".equals(concept))     concept=null;
    if (concept != null) {
      concept=concept.replaceAll("String_Node_Str","String_Node_Str").trim();
    }
    String keys=keyText.getText();
    if ("String_Node_Str".equals(keys) | "String_Node_Str".equals(keys))     keys=null;
    boolean useFTSearch=checkFTSearchButton.getSelection();
    String search=searchText.getText();
    if ("String_Node_Str".equals(search) | "String_Node_Str".equals(search))     search=null;
    int start=pageToolBar.getStart();
    int limit=pageToolBar.getLimit();
    String clusterName=URLEncoder.encode(((WSDataClusterPK)getXObject().getWsKey()).getPk(),"String_Node_Str");
    WSDataClusterPK clusterPk=new WSDataClusterPK(clusterName);
    WSItemPKsByCriteriaResponseResults[] results=port.getItemPKsByFullCriteria(new WSGetItemPKsByFullCriteria(new WSGetItemPKsByCriteria(clusterPk,concept,search,keys,from,to,start,limit),useFTSearch)).getResults();
    if (showResultInfo && (results.length == 1)) {
      MessageDialog.openInformation(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return new LineItem[0];
    }
    if (results.length == 1)     return new LineItem[0];
    int totalSize=0;
    List<LineItem> ress=new ArrayList<LineItem>();
    for (int i=0; i < results.length; i++) {
      if (i == 0) {
        totalSize=Integer.parseInt(Util.parse(results[i].getWsItemPK().getConceptName()).getDocumentElement().getTextContent());
        continue;
      }
      ress.add(new LineItem(results[i].getDate(),results[i].getWsItemPK().getConceptName(),results[i].getWsItemPK().getIds(),results[i].getTaskId()));
    }
    pageToolBar.setTotalsize(totalSize);
    pageToolBar.refreshUI();
    return (LineItem[])ress.toArray(new LineItem[ress.size()]);
  }
 catch (  Exception e) {
    e.printStackTrace();
    if ((e.getLocalizedMessage() != null) && e.getLocalizedMessage().contains("String_Node_Str"))     MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str");
 else     MessageDialog.openError(this.getSite().getShell(),"String_Node_Str",e.getLocalizedMessage());
    return null;
  }
 finally {
    try {
      this.getSite().getShell().setCursor(null);
      waitCursor.dispose();
    }
 catch (    Exception e) {
    }
  }
}