Program: 74636
Project: 74636
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) {
          while (iter.next()) {
            String result=null;
            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 {
      IQueryDefinition query=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";
      Binding binding=new Binding(columnBindingName);
      binding.setExpression(expression);
      if (expression != null)       binding.setDataType(expression.getDataType());
      query.addBinding(binding);
      DataSessionContext context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,getDataSetHandle().getModuleHandle());
      DataRequestSession session=DataRequestSession.newSession(context);
      IQueryResults results=DataSetProvider.getCurrentInstance().execute(getDataSetHandle(),query,true,true,true,session);
      if (results != null) {
        IResultIterator iter=results.getResultIterator();
        if (iter != null) {
          while (iter.next()) {
            String result=null;
            result=iter.getString(columnBindingName);
            if (!StringUtil.isBlank(result) && !resultList.contains(result)) {
              resultList.add(result);
            }
          }
        }
        results.close();
        session.shutdown();
      }
    }
 catch (    Exception e) {
      ExceptionHandler.handle(e);
      valueList.removeAll();
      valueList.deselectAll();
      updateButtons();
    }
    filteValues();
  }
 else {
    valueList.removeAll();
    valueList.deselectAll();
    updateButtons();
  }
}