Program: 67112
Project: 67112
Buggy source:
private void populateFilterHelpers() throws DataException {
  List filters=defn.getFilters();
  List results=new ArrayList();
  Set<DimLevel> dimLevelInCubeQuery=this.getDimLevelsDefinedInCubeQuery();
  for (int i=0; i < filters.size(); i++) {
    IFilterDefinition filter=(IFilterDefinition)filters.get(i);
switch (this.getFilterType(filter,dimLevelInCubeQuery)) {
case CubeQueryExecutor.DIMENSION_FILTER:
{
        SimpleLevelFilter simpleLevelfilter=createSimpleLevelFilter(filter,defn.getBindings());
        if (simpleLevelfilter == null) {
          this.dimensionFilterEvalHelpers.add(BaseDimensionFilterEvalHelper.createFilterHelper(this.outResults,this.scope,defn,filter,this.session.getEngineContext().getScriptContext()));
        }
 else {
          boolean existLevelFilter=false;
          for (int j=0; j < this.dimensionSimpleFilter.size(); j++) {
            if (dimensionSimpleFilter.get(j).getDimensionName().equals(simpleLevelfilter.getDimensionName()) && dimensionSimpleFilter.get(j).getLevelName().equals(simpleLevelfilter.getLevelName())) {
              this.dimensionFilterEvalHelpers.add(BaseDimensionFilterEvalHelper.createFilterHelper(this.outResults,this.scope,defn,filter,this.session.getEngineContext().getScriptContext()));
              existLevelFilter=true;
              break;
            }
          }
          if (!existLevelFilter)           this.dimensionSimpleFilter.add(simpleLevelfilter);
        }
        break;
      }
case CubeQueryExecutor.AGGR_MEASURE_FILTER:
{
      this.aggrMeasureFilterEvalHelpers.add(new AggrMeasureFilterEvalHelper(this.outResults,scope,defn,filter,session.getEngineContext().getScriptContext()));
      break;
    }
case CubeQueryExecutor.FACTTABLE_FILTER:
default :
{
    this.advancedFacttableBasedFilterEvalHelper.add(new JSFacttableFilterEvalHelper(scope,this.session.getEngineContext().getScriptContext(),filter,this.outResults,this.defn));
  }
}
}
}

Fixed version (ground truth):
private void populateFilterHelpers() throws DataException {
  List filters=defn.getFilters();
  List results=new ArrayList();
  Set<String> dimLevelInCubeQuery=this.getDimensionDefinedInCubeQuery();
  for (int i=0; i < filters.size(); i++) {
    IFilterDefinition filter=(IFilterDefinition)filters.get(i);
switch (this.getFilterType(filter,dimLevelInCubeQuery)) {
case CubeQueryExecutor.DIMENSION_FILTER:
{
        SimpleLevelFilter simpleLevelfilter=createSimpleLevelFilter(filter,defn.getBindings());
        if (simpleLevelfilter == null) {
          this.dimensionFilterEvalHelpers.add(BaseDimensionFilterEvalHelper.createFilterHelper(this.outResults,this.scope,defn,filter,this.session.getEngineContext().getScriptContext()));
        }
 else {
          boolean existLevelFilter=false;
          for (int j=0; j < this.dimensionSimpleFilter.size(); j++) {
            if (dimensionSimpleFilter.get(j).getDimensionName().equals(simpleLevelfilter.getDimensionName()) && dimensionSimpleFilter.get(j).getLevelName().equals(simpleLevelfilter.getLevelName())) {
              this.dimensionFilterEvalHelpers.add(BaseDimensionFilterEvalHelper.createFilterHelper(this.outResults,this.scope,defn,filter,this.session.getEngineContext().getScriptContext()));
              existLevelFilter=true;
              break;
            }
          }
          if (!existLevelFilter)           this.dimensionSimpleFilter.add(simpleLevelfilter);
        }
        break;
      }
case CubeQueryExecutor.AGGR_MEASURE_FILTER:
{
      this.aggrMeasureFilterEvalHelpers.add(new AggrMeasureFilterEvalHelper(this.outResults,scope,defn,filter,session.getEngineContext().getScriptContext()));
      break;
    }
case CubeQueryExecutor.FACTTABLE_FILTER:
default :
{
    this.advancedFacttableBasedFilterEvalHelper.add(new JSFacttableFilterEvalHelper(scope,this.session.getEngineContext().getScriptContext(),filter,this.outResults,this.defn));
  }
}
}
}