Program: 68276
Project: 68276
Buggy source:
/** 
 * @param name
 * @param expression
 * @param type
 */
private void populateDataSet(String name,String expression,int type){
  int selectionIndex=-1;
  for (int i=0; i < dataSetList.size(); i++) {
    DataSetHandle dataHandle=(DataSetHandle)dataSetList.get(i);
    if (dataHandle.getQualifiedName().equals(name)) {
      selectionIndex=i;
      break;
    }
  }
  if (type == LEFT_DATASET) {
    if (selectionIndex >= 0) {
      leftDataSetChooser.setSelection(new StructuredSelection(dataSetList.get(selectionIndex)));
      if (leftColumnList.getInput() != null && leftColumnList.getInput() instanceof DataSetViewData[]) {
        DataSetViewData[] dataSetItems=(DataSetViewData[])leftColumnList.getInput();
        String rowExpr;
        for (int i=0; i < dataSetItems.length; i++) {
          rowExpr=ExpressionUtil.createJSDataSetRowExpression(dataSetItems[i].getName());
          if (rowExpr.equals(expression)) {
            selectionIndex=i;
            break;
          }
        }
        leftColumnList.setSelection(new StructuredSelection(dataSetItems[selectionIndex]));
      }
    }
 else {
      setPageMessage(Messages.getString("String_Node_Str"),IMessageProvider.ERROR);
    }
  }
  if (type == RIGHT_DATASET) {
    if (selectionIndex >= 0) {
      rightDataSetChooser.setSelection(new StructuredSelection(dataSetList.get(selectionIndex)));
      if (rightColumnList.getInput() != null && rightColumnList.getInput() instanceof DataSetViewData[]) {
        DataSetViewData[] dataSetItems=(DataSetViewData[])rightColumnList.getInput();
        String rowExpr;
        for (int i=0; i < dataSetItems.length; i++) {
          rowExpr=ExpressionUtil.createJSDataSetRowExpression(dataSetItems[i].getName());
          if (rowExpr.equals(expression)) {
            selectionIndex=i;
            break;
          }
        }
        rightColumnList.setSelection(new StructuredSelection(dataSetItems[selectionIndex]));
      }
    }
 else {
      setPageMessage(Messages.getString("String_Node_Str"),IMessageProvider.ERROR);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param name
 * @param expression
 * @param type
 */
private void populateDataSet(String name,String expression,int type){
  int selectionIndex=-1;
  for (int i=0; i < dataSetList.size(); i++) {
    DataSetHandle dataHandle=(DataSetHandle)dataSetList.get(i);
    if (dataHandle.getQualifiedName().equals(name)) {
      selectionIndex=i;
      break;
    }
  }
  if (type == LEFT_DATASET) {
    if (selectionIndex >= 0) {
      leftDataSetChooser.setSelection(new StructuredSelection(dataSetList.get(selectionIndex)));
      if (leftColumnList.getInput() != null && leftColumnList.getInput() instanceof DataSetViewData[]) {
        DataSetViewData[] dataSetItems=(DataSetViewData[])leftColumnList.getInput();
        if (dataSetItems.length > 0) {
          String rowExpr;
          for (int i=0; i < dataSetItems.length; i++) {
            rowExpr=ExpressionUtil.createJSDataSetRowExpression(dataSetItems[i].getName());
            if (rowExpr.equals(expression)) {
              selectionIndex=i;
              break;
            }
          }
          leftColumnList.setSelection(new StructuredSelection(dataSetItems[selectionIndex]));
        }
      }
    }
 else {
      setPageMessage(Messages.getString("String_Node_Str"),IMessageProvider.ERROR);
    }
  }
  if (type == RIGHT_DATASET) {
    if (selectionIndex >= 0) {
      rightDataSetChooser.setSelection(new StructuredSelection(dataSetList.get(selectionIndex)));
      if (rightColumnList.getInput() != null && rightColumnList.getInput() instanceof DataSetViewData[]) {
        DataSetViewData[] dataSetItems=(DataSetViewData[])rightColumnList.getInput();
        if (dataSetItems.length > 0) {
          String rowExpr;
          for (int i=0; i < dataSetItems.length; i++) {
            rowExpr=ExpressionUtil.createJSDataSetRowExpression(dataSetItems[i].getName());
            if (rowExpr.equals(expression)) {
              selectionIndex=i;
              break;
            }
          }
          rightColumnList.setSelection(new StructuredSelection(dataSetItems[selectionIndex]));
        }
      }
    }
 else {
      setPageMessage(Messages.getString("String_Node_Str"),IMessageProvider.ERROR);
    }
  }
}