Program: 72198
Project: 72198
Buggy source:
/** 
 * @return
 */
private QueryDefinition newGenIVReportQuery(){
  QueryDefinition qd=newReportQuery();
  if (GEN_add_filter == true) {
    String columnBindingNameFilter="String_Node_Str";
    IBaseExpression columnBindingExprFilter=new ScriptExpression("String_Node_Str");
    ScriptExpression filterExpr=new ScriptExpression("String_Node_Str");
    GEN_filterDefn=new FilterDefinition(filterExpr);
    qd.addResultSetExpression(columnBindingNameFilter,columnBindingExprFilter);
    qd.addFilter(GEN_filterDefn);
  }
  String columnBindingNameSort="String_Node_Str";
  IBaseExpression columnBindingExprSort=new ScriptExpression("String_Node_Str");
  SortDefinition sortDefn=new SortDefinition();
  sortDefn.setColumn(columnBindingNameSort);
  qd.addResultSetExpression(columnBindingNameSort,columnBindingExprSort);
  qd.addSort(sortDefn);
  if (GEN_add_group == true) {
    String columnBindingNameGroup="String_Node_Str";
    IBaseExpression columnBindingExprGroup=new ScriptExpression("String_Node_Str");
    GroupDefinition gd=new GroupDefinition();
    gd.setKeyColumn("String_Node_Str");
    qd.addResultSetExpression(columnBindingNameGroup,columnBindingExprGroup);
    qd.addGroup(gd);
  }
  return qd;
}

Fixed version (ground truth):
/** 
 * @return
 */
private QueryDefinition newGenIVReportQuery(){
  QueryDefinition qd=newReportQuery();
  if (GEN_add_filter == true) {
    String columnBindingNameFilter="String_Node_Str";
    IBaseExpression columnBindingExprFilter=new ScriptExpression("String_Node_Str");
    ScriptExpression filterExpr=new ScriptExpression("String_Node_Str");
    GEN_filterDefn=new FilterDefinition(filterExpr);
    qd.addResultSetExpression(columnBindingNameFilter,columnBindingExprFilter);
    qd.addFilter(GEN_filterDefn);
  }
  if (GEN_make_empty == true) {
    String columnBindingNameFilter="String_Node_Str";
    IBaseExpression columnBindingExprFilter=new ScriptExpression("String_Node_Str");
    ScriptExpression filterExpr=new ScriptExpression("String_Node_Str");
    qd.addResultSetExpression(columnBindingNameFilter,columnBindingExprFilter);
    qd.addFilter(new FilterDefinition(filterExpr));
  }
  String columnBindingNameSort="String_Node_Str";
  IBaseExpression columnBindingExprSort=new ScriptExpression("String_Node_Str");
  SortDefinition sortDefn=new SortDefinition();
  sortDefn.setColumn(columnBindingNameSort);
  qd.addResultSetExpression(columnBindingNameSort,columnBindingExprSort);
  qd.addSort(sortDefn);
  if (GEN_add_group == true) {
    String columnBindingNameGroup="String_Node_Str";
    IBaseExpression columnBindingExprGroup=new ScriptExpression("String_Node_Str");
    GroupDefinition gd=new GroupDefinition();
    gd.setKeyColumn("String_Node_Str");
    qd.addResultSetExpression(columnBindingNameGroup,columnBindingExprGroup);
    qd.addGroup(gd);
  }
  if (GEN_add_secondGroup == true) {
    String columnBindingNameGroup="String_Node_Str";
    IBaseExpression columnBindingExprGroup=new ScriptExpression("String_Node_Str");
    GroupDefinition gd=new GroupDefinition();
    gd.setKeyColumn("String_Node_Str");
    qd.addResultSetExpression(columnBindingNameGroup,columnBindingExprGroup);
    qd.addGroup(gd);
  }
  qd.setUsesDetails(this.GEN_useDetail);
  return qd;
}