Program: 74429
Project: 74429
Buggy source:
public void testAggrFilter1() throws Exception {
  ICubeQueryDefinition cqd=new CubeQueryDefinition(cubeName);
  IEdgeDefinition columnEdge=cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);
  IEdgeDefinition rowEdge=cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);
  IDimensionDefinition dim1=columnEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier1=dim1.createHierarchy("String_Node_Str");
  ILevelDefinition level11=hier1.createLevel("String_Node_Str");
  ILevelDefinition level12=hier1.createLevel("String_Node_Str");
  ILevelDefinition level13=hier1.createLevel("String_Node_Str");
  IDimensionDefinition dim2=rowEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier2=dim2.createHierarchy("String_Node_Str");
  ILevelDefinition level21=hier2.createLevel("String_Node_Str");
  createSortTestBindings(cqd);
  CubeFilterDefinition filter1=new CubeFilterDefinition(new ScriptExpression("String_Node_Str"));
  filter1.setAxisQualifierLevels(null);
  filter1.setAxisQualifierValues(null);
  filter1.setTargetLevel(level21);
  CubeFilterDefinition filter2=new CubeFilterDefinition(new ScriptExpression("String_Node_Str"));
  filter2.setAxisQualifierLevels(new ILevelDefinition[]{level21});
  filter2.setAxisQualifierValues(new Object[]{"String_Node_Str"});
  filter2.setTargetLevel(level11);
  CubeFilterDefinition filter3=new CubeFilterDefinition(new ConditionalExpression("String_Node_Str",IConditionalExpression.OP_TOP_PERCENT,"String_Node_Str"));
  filter3.setAxisQualifierLevels(new ILevelDefinition[]{level21});
  filter3.setAxisQualifierValues(new Object[]{"String_Node_Str"});
  filter3.setTargetLevel(level11);
  cqd.addFilter(filter1);
  cqd.addFilter(filter2);
  cqd.addFilter(filter3);
  DataEngine engine=DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION,null,null,null));
  this.createCube(engine);
  IPreparedCubeQuery pcq=engine.prepare(cqd,null);
  ICubeQueryResults queryResults=pcq.execute(null);
  CubeCursor cursor=queryResults.getCubeCursor();
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  printCube(cursor,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void testAggrFilter1() throws Exception {
  ICubeQueryDefinition cqd=new CubeQueryDefinition(cubeName);
  IEdgeDefinition columnEdge=cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);
  IEdgeDefinition rowEdge=cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);
  IDimensionDefinition dim1=columnEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier1=dim1.createHierarchy("String_Node_Str");
  ILevelDefinition level11=hier1.createLevel("String_Node_Str");
  hier1.createLevel("String_Node_Str");
  hier1.createLevel("String_Node_Str");
  IDimensionDefinition dim2=rowEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier2=dim2.createHierarchy("String_Node_Str");
  ILevelDefinition level21=hier2.createLevel("String_Node_Str");
  createSortTestBindings(cqd);
  CubeFilterDefinition filter1=new CubeFilterDefinition(new ScriptExpression("String_Node_Str"));
  filter1.setAxisQualifierLevels(null);
  filter1.setAxisQualifierValues(null);
  filter1.setTargetLevel(level21);
  CubeFilterDefinition filter2=new CubeFilterDefinition(new ScriptExpression("String_Node_Str"));
  filter2.setAxisQualifierLevels(new ILevelDefinition[]{level21});
  filter2.setAxisQualifierValues(new Object[]{"String_Node_Str"});
  filter2.setTargetLevel(level11);
  CubeFilterDefinition filter3=new CubeFilterDefinition(new ConditionalExpression("String_Node_Str",IConditionalExpression.OP_TOP_PERCENT,"String_Node_Str"));
  filter3.setAxisQualifierLevels(new ILevelDefinition[]{level21});
  filter3.setAxisQualifierValues(new Object[]{"String_Node_Str"});
  filter3.setTargetLevel(level11);
  cqd.addFilter(filter1);
  cqd.addFilter(filter2);
  cqd.addFilter(filter3);
  DataEngine engine=DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION,null,null,null));
  this.createCube(engine);
  IPreparedCubeQuery pcq=engine.prepare(cqd,null);
  ICubeQueryResults queryResults=pcq.execute(null);
  CubeCursor cursor=queryResults.getCubeCursor();
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  printCube(cursor,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},"String_Node_Str","String_Node_Str");
}