Program: 77486
Project: 77486
Buggy source:
private void refreshValues(){
  resultList.clear();
  if (columnChooser.isEnabled()) {
    ResultSetColumnHandle selectedColumn=null;
    try {
      BaseQueryDefinition query=(BaseQueryDefinition)DataUtil.getPreparedQuery(engine,getDataSetHandle()).getReportQueryDefn();
      String queryExpr=null;
      for (Iterator iter=columnList.iterator(); iter.hasNext(); ) {
        ResultSetColumnHandle column=(ResultSetColumnHandle)iter.next();
        if (column.getColumnName().equals(columnChooser.getText())) {
          queryExpr=DEUtil.getResultSetColumnExpression(column.getColumnName());
          selectedColumn=column;
          break;
        }
      }
      if (queryExpr == null) {
        return;
      }
      ScriptExpression expression=new ScriptExpression(queryExpr);
      String columnBindingName="String_Node_Str";
      query.addResultSetExpression(columnBindingName,expression);
      IPreparedQuery preparedQuery=engine.prepare((IQueryDefinition)query);
      IQueryResults results=preparedQuery.execute(null);
      if (results != null) {
        IResultIterator iter=results.getResultIterator();
        if (iter != null) {
          DateFormatter formatter=new DateFormatter(DATE_TIME_PATTERN);
          while (iter.next()) {
            String result=null;
            if (DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME.equals(selectedColumn.getDataType())) {
              result=formatter.format(iter.getDate(columnBindingName));
            }
 else {
              result=iter.getString(columnBindingName);
            }
            if (!StringUtil.isBlank(result) && !resultList.contains(result)) {
              resultList.add(result);
            }
          }
        }
        results.close();
      }
    }
 catch (    Exception e) {
      ExceptionHandler.handle(e);
      valueList.removeAll();
      valueList.deselectAll();
      updateButtons();
    }
    filteValues();
  }
 else {
    valueList.removeAll();
    valueList.deselectAll();
    updateButtons();
  }
}

Fixed version (ground truth):
private void refreshValues(){
  resultList.clear();
  if (columnChooser.isEnabled()) {
    ResultSetColumnHandle selectedColumn=null;
    try {
      BaseQueryDefinition query=(BaseQueryDefinition)DataUtil.getPreparedQuery(engine,getDataSetHandle()).getReportQueryDefn();
      String queryExpr=null;
      for (Iterator iter=columnList.iterator(); iter.hasNext(); ) {
        ResultSetColumnHandle column=(ResultSetColumnHandle)iter.next();
        if (column.getColumnName().equals(columnChooser.getText())) {
          queryExpr=DEUtil.getResultSetColumnExpression(column.getColumnName());
          selectedColumn=column;
          break;
        }
      }
      if (queryExpr == null) {
        return;
      }
      ScriptExpression expression=new ScriptExpression(queryExpr);
      String columnBindingName="String_Node_Str";
      query.addResultSetExpression(columnBindingName,expression);
      IPreparedQuery preparedQuery=engine.prepare((IQueryDefinition)query);
      IQueryResults results=preparedQuery.execute(null);
      if (results != null) {
        IResultIterator iter=results.getResultIterator();
        if (iter != null) {
          DateFormatter formatter=new DateFormatter(DATE_TIME_PATTERN,ULocale.US);
          while (iter.next()) {
            String result=null;
            if (DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME.equals(selectedColumn.getDataType())) {
              result=formatter.format(iter.getDate(columnBindingName));
            }
 else {
              result=iter.getString(columnBindingName);
            }
            if (!StringUtil.isBlank(result) && !resultList.contains(result)) {
              resultList.add(result);
            }
          }
        }
        results.close();
      }
    }
 catch (    Exception e) {
      ExceptionHandler.handle(e);
      valueList.removeAll();
      valueList.deselectAll();
      updateButtons();
    }
    filteValues();
  }
 else {
    valueList.removeAll();
    valueList.deselectAll();
    updateButtons();
  }
}