nus-yam/ex-repair huggingface dataset:
Program: 50903
Project: 50903
Buggy source:
protected boolean acceptsConnection(Connection connection){
  try {
    return super.acceptsConnection(connection) && !isGreenplum(connection.getMetaData());
  }
 catch (  SQLException e) {
    throw Util.newError(e,"String_Node_Str");
  }
}

Fixed version (ground truth):
protected boolean acceptsConnection(Connection connection){
  try {
    return super.acceptsConnection(connection) && !isGreenplum(connection.getMetaData()) && !isNetezza(connection.getMetaData());
  }
 catch (  SQLException e) {
    throw Util.newError(e,"String_Node_Str");
  }
}
Program: 50904
Project: 50904
Buggy source:
public void flushSchemaCache(){
  RolapSchema.Pool.instance().clear();
}

Fixed version (ground truth):
public void flushSchemaCache(){
  RolapSchema.Pool.instance().clear();
  connection.getSchema().finalCleanUp();
}
Program: 50906
Project: 50906
Buggy source:
/** 
 * Returns an API with which to explicitly manage the contents of the cache.
 * @param connection Server whose cache to control
 * @param pw Print writer, for tracing
 * @return CacheControl API
 */
public CacheControl getCacheControl(RolapConnection connection,final PrintWriter pw){
  return new CacheControlImpl(connection){
    protected void flushNonUnion(    final CellRegion region){
      final SegmentCacheManager.FlushResult result=cacheMgr.execute(new SegmentCacheManager.FlushCommand(Locus.peek(),cacheMgr,region,this));
      final List<Future<Boolean>> futures=new ArrayList<Future<Boolean>>();
      for (      Callable<Boolean> task : result.tasks) {
        futures.add(cacheMgr.cacheExecutor.submit(task));
      }
      for (      Future<Boolean> future : futures) {
        Util.discard(Util.safeGet(future,"String_Node_Str"));
      }
    }
    public void flush(    final CellRegion region){
      if (pw != null) {
        pw.println("String_Node_Str");
        printCacheState(pw,region);
        pw.println();
      }
      super.flush(region);
      if (pw != null) {
        pw.println("String_Node_Str");
        printCacheState(pw,region);
        pw.println();
      }
    }
    public void trace(    final String message){
      if (pw != null) {
        pw.println(message);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Returns an API with which to explicitly manage the contents of the cache.
 * @param connection Server whose cache to control
 * @param pw Print writer, for tracing
 * @return CacheControl API
 */
public CacheControl getCacheControl(RolapConnection connection,final PrintWriter pw){
  return new CacheControlImpl(connection){
    protected void flushNonUnion(    final CellRegion region){
      final SegmentCacheManager.FlushResult result=cacheMgr.execute(new SegmentCacheManager.FlushCommand(Locus.peek(),cacheMgr,region,this));
      final List<Future<Boolean>> futures=new ArrayList<Future<Boolean>>();
      for (      Callable<Boolean> task : result.tasks) {
        futures.add(cacheMgr.cacheExecutor.submit(task));
      }
      for (      Future<Boolean> future : futures) {
        Util.discard(Util.safeGet(future,"String_Node_Str"));
      }
    }
    public void flush(    final CellRegion region){
      if (pw != null) {
        pw.println("String_Node_Str");
        printCacheState(pw,region);
        pw.println();
      }
      super.flush(region);
      if (pw != null) {
        pw.println("String_Node_Str");
        printCacheState(pw,region);
        pw.println();
      }
    }
    public void trace(    final String message){
      if (pw != null) {
        pw.println(message);
      }
    }
    public boolean isTraceEnabled(){
      return pw != null;
    }
  }
;
}
Program: 50908
Project: 50908
Buggy source:
/** 
 * Adds a header to the index. <p>If   {@code loading} is true, there must follow a call to{@link #loadSucceeded} or {@link #loadFailed}.</p>
 * @param header Segment header
 * @param loading Whether segment is pending a load from SQL
 * @param converter Segment converter
 */
void add(SegmentHeader header,boolean loading,SegmentBuilder.SegmentConverter converter);

Fixed version (ground truth):
/** 
 * Adds a header to the index. <p>If   {@code loading} is true, there must follow a call to{@link #loadSucceeded} or {@link #loadFailed}.</p>
 * @param header Segment header
 * @param loading Whether segment is pending a load from SQL
 * @param converter Segment converter
 * @return True or false, if a new element was inserted into the index.
 */
boolean add(SegmentHeader header,boolean loading,SegmentBuilder.SegmentConverter converter);
Program: 50909
Project: 50909
Buggy source:
public void add(SegmentHeader header,boolean loading,SegmentBuilder.SegmentConverter converter){
  checkThread();
  final HeaderInfo headerInfo=headerMap.get(header);
  if (headerInfo != null) {
    if (loading && headerInfo.slot == null) {
      headerInfo.slot=new SlotFuture<SegmentBody>();
    }
    return;
  }
  headerMap.put(header,new HeaderInfo(loading ? new SlotFuture<SegmentBody>() : null));
  final List bitkeyKey=makeBitkeyKey(header);
  List<SegmentHeader> headerList=bitkeyMap.get(bitkeyKey);
  if (headerList == null) {
    headerList=new ArrayList<SegmentHeader>();
    bitkeyMap.put(bitkeyKey,headerList);
  }
  headerList.add(header);
  final List factKey=makeFactKey(header);
  FactInfo factInfo=factMap.get(factKey);
  if (factInfo == null) {
    factInfo=new FactInfo();
    factMap.put(factKey,factInfo);
  }
  factInfo.headerList.add(header);
  factInfo.bitkeyPoset.add(header.getConstrainedColumnsBitKey());
  if (converter != null) {
    factInfo.converter=converter;
  }
  final List fuzzyFactKey=makeFuzzyFactKey(header);
  FuzzyFactInfo fuzzyFactInfo=fuzzyFactMap.get(fuzzyFactKey);
  if (fuzzyFactInfo == null) {
    fuzzyFactInfo=new FuzzyFactInfo();
    fuzzyFactMap.put(fuzzyFactKey,fuzzyFactInfo);
  }
  fuzzyFactInfo.headerList.add(header);
}

Fixed version (ground truth):
public boolean add(SegmentHeader header,boolean loading,SegmentBuilder.SegmentConverter converter){
  checkThread();
  final HeaderInfo headerInfo=headerMap.get(header);
  if (headerInfo != null) {
    if (loading && headerInfo.slot == null) {
      headerInfo.slot=new SlotFuture<SegmentBody>();
      return true;
    }
    return false;
  }
  headerMap.put(header,new HeaderInfo(loading ? new SlotFuture<SegmentBody>() : null));
  final List bitkeyKey=makeBitkeyKey(header);
  List<SegmentHeader> headerList=bitkeyMap.get(bitkeyKey);
  if (headerList == null) {
    headerList=new ArrayList<SegmentHeader>();
    bitkeyMap.put(bitkeyKey,headerList);
  }
  headerList.add(header);
  final List factKey=makeFactKey(header);
  FactInfo factInfo=factMap.get(factKey);
  if (factInfo == null) {
    factInfo=new FactInfo();
    factMap.put(factKey,factInfo);
  }
  factInfo.headerList.add(header);
  factInfo.bitkeyPoset.add(header.getConstrainedColumnsBitKey());
  if (converter != null) {
    factInfo.converter=converter;
  }
  final List fuzzyFactKey=makeFuzzyFactKey(header);
  FuzzyFactInfo fuzzyFactInfo=fuzzyFactMap.get(fuzzyFactKey);
  if (fuzzyFactInfo == null) {
    fuzzyFactInfo=new FuzzyFactInfo();
    fuzzyFactMap.put(fuzzyFactKey,fuzzyFactInfo);
  }
  fuzzyFactInfo.headerList.add(header);
  return true;
}
Program: 50910
Project: 50910
Buggy source:
public boolean isDone(){
  stateLock.readLock().lock();
  try {
    return done;
  }
  finally {
    stateLock.readLock().unlock();
  }
}

Fixed version (ground truth):
public boolean isDone(){
  stateLock.readLock().lock();
  try {
    return done || cancelled || throwable != null;
  }
  finally {
    stateLock.readLock().unlock();
  }
}
Program: 50911
Project: 50911
Buggy source:
protected GroupingSet getGroupingSet(Execution execution,String[] tableNames,String[] fieldNames,String[][] fieldValues,String cubeName,String measure){
  final RolapCube cube=getCube(cubeName);
  final BatchLoader fbcr=new BatchLoader(Locus.peek(),execution.getMondrianStatement().getMondrianConnection().getServer().getAggregationManager().cacheMgr,cube.getStar().getSqlQueryDialect(),cube);
  BatchLoader.Batch batch=createBatch(fbcr,tableNames,fieldNames,fieldValues,cubeName,measure);
  GroupingSetsCollector collector=new GroupingSetsCollector(true);
  final List<Future<Map<Segment,SegmentWithData>>> segmentFutures=new ArrayList<Future<Map<Segment,SegmentWithData>>>();
  batch.loadAggregation(collector,segmentFutures);
  return collector.getGroupingSets().get(0);
}

Fixed version (ground truth):
protected GroupingSet getGroupingSet(final String[] tableNames,final String[] fieldNames,final String[][] fieldValues,final String cubeName,final String measure){
  return Locus.execute(((RolapConnection)getConnection()),"String_Node_Str",new Locus.Action<GroupingSet>(){
    public GroupingSet execute(){
      final RolapCube cube=getCube(cubeName);
      final BatchLoader fbcr=new BatchLoader(Locus.peek(),((RolapConnection)getConnection()).getServer().getAggregationManager().cacheMgr,cube.getStar().getSqlQueryDialect(),cube);
      BatchLoader.Batch batch=createBatch(fbcr,tableNames,fieldNames,fieldValues,cubeName,measure);
      GroupingSetsCollector collector=new GroupingSetsCollector(true);
      final List<Future<Map<Segment,SegmentWithData>>> segmentFutures=new ArrayList<Future<Map<Segment,SegmentWithData>>>();
      batch.loadAggregation(collector,segmentFutures);
      return collector.getGroupingSets().get(0);
    }
  }
);
}
Program: 50913
Project: 50913
Buggy source:
public void remove(){
  iterator.remove();
}

Fixed version (ground truth):
public R remove(int index){
  Pair<L,R> pair=list.remove(index);
  return pair == null ? null : pair.right;
}
Program: 50915
Project: 50915
Buggy source:
/** 
 * Computes an expression for each element of a list, and aggregates the result according to the evaluation context's current aggregation strategy.
 * @param calc Compiled expression to evaluate a scalar
 * @param evaluator Evaluation context
 * @param tupleList List of members or tuples
 * @return Aggregated result
 */
public static Object aggregate(Calc calc,Evaluator evaluator,TupleList tupleList){
  Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.AGGREGATION_TYPE.name,null);
  if (aggregator == null) {
    throw newEvalException(null,"String_Node_Str");
  }
  Aggregator rollup=aggregator.getRollup();
  if (rollup == null) {
    throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
  }
  if (aggregator != RolapAggregator.DistinctCount) {
    final int savepoint=evaluator.savepoint();
    evaluator.setNonEmpty(false);
    final Object o=rollup.aggregate(evaluator,tupleList,calc);
    evaluator.restore(savepoint);
    return o;
  }
  if (tupleList.size() == 0) {
    return DoubleNull;
  }
  if (evaluator instanceof RolapEvaluator && ((RolapEvaluator)evaluator).getDialect().supportsUnlimitedValueList()) {
  }
 else {
    tupleList=optimizeTupleList(evaluator,tupleList);
  }
  Evaluator evaluator2=evaluator.pushAggregation(tupleList);
  evaluator2.setNonEmpty(false);
  return evaluator2.evaluateCurrent();
}

Fixed version (ground truth):
/** 
 * Computes an expression for each element of a list, and aggregates the result according to the evaluation context's current aggregation strategy.
 * @param calc Compiled expression to evaluate a scalar
 * @param evaluator Evaluation context
 * @param tupleList List of members or tuples
 * @return Aggregated result
 */
public static Object aggregate(Calc calc,Evaluator evaluator,TupleList tupleList){
  Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.AGGREGATION_TYPE.name,null);
  if (aggregator == null) {
    throw newEvalException(null,"String_Node_Str");
  }
  Aggregator rollup=aggregator.getRollup();
  if (rollup == null) {
    throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
  }
  if (aggregator != RolapAggregator.DistinctCount) {
    final int savepoint=evaluator.savepoint();
    evaluator.setNonEmpty(false);
    final Object o=rollup.aggregate(evaluator,tupleList,calc);
    evaluator.restore(savepoint);
    return o;
  }
  if (tupleList.size() == 0) {
    return DoubleNull;
  }
  if (evaluator instanceof RolapEvaluator && ((RolapEvaluator)evaluator).getDialect().supportsUnlimitedValueList()) {
  }
 else {
    tupleList=optimizeTupleList(evaluator,tupleList,true);
  }
  Evaluator evaluator2=evaluator.pushAggregation(tupleList);
  evaluator2.setNonEmpty(false);
  return evaluator2.evaluateCurrent();
}
Program: 50916
Project: 50916
Buggy source:
public static TupleList optimizeTupleList(Evaluator evaluator,TupleList tupleList){
  if (!canOptimize(evaluator,tupleList)) {
    return tupleList;
  }
  if (false) {
    tupleList=removeOverlappingTupleEntries(tupleList);
  }
  tupleList=optimizeChildren(tupleList,evaluator.getSchemaReader(),evaluator.getMeasureCube());
  checkIfAggregationSizeIsTooLarge(tupleList);
  return tupleList;
}

Fixed version (ground truth):
public static TupleList optimizeTupleList(Evaluator evaluator,TupleList tupleList,boolean checkSize){
  if (!canOptimize(evaluator,tupleList)) {
    return tupleList;
  }
  if (false) {
    tupleList=removeOverlappingTupleEntries(tupleList);
  }
  tupleList=optimizeChildren(tupleList,evaluator.getSchemaReader(),evaluator.getMeasureCube());
  if (checkSize) {
    checkIfAggregationSizeIsTooLarge(tupleList);
  }
  return tupleList;
}
Program: 50918
Project: 50918
Buggy source:
public void testAggregationOverLargeListGeneratesError(){
  int origMaxConstraint=props.MaxConstraints.get();
  props.MaxConstraints.set(7);
  String result;
  final Dialect dialect=getTestContext().getDialect();
  if (dialect.getDatabaseProduct() == Dialect.DatabaseProduct.LUCIDDB) {
    result="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
 else {
    result="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
  assertQueryReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",result);
  props.MaxConstraints.set(origMaxConstraint);
}

Fixed version (ground truth):
public void testAggregationOverLargeListGeneratesError(){
  propSaver.set(props.MaxConstraints,7);
  final boolean isLuciddb=getTestContext().getDialect().getDatabaseProduct() == Dialect.DatabaseProduct.LUCIDDB;
  assertQueryReturns(makeQuery("String_Node_Str"),isLuciddb ? "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" : "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  assertQueryReturns(makeQuery("String_Node_Str"),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  assertQueryReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 50920
Project: 50920
Buggy source:
/** 
 * Given a usage of type level, create a Level column.
 * @param usage
 */
private void loadLevel(final JdbcSchema.Table.Column.Usage usage){
  String name=usage.getSymbolicName();
  MondrianDef.Expression expression=new MondrianDef.Column(getName(),usage.levelColumnName);
  int bitPosition=usage.rColumn.getBitPosition();
  Level level=new Level(name,expression,bitPosition,usage.rColumn,usage.collapsed);
  addLevel(level);
  if (!usage.collapsed) {
    RolapLevel parentLevel=(RolapLevel)usage.level.getParentLevel();
    while (!parentLevel.isAll()) {
      final BitKey bk=AggStar.this.star.getBitKey(new String[]{parentLevel.getKeyExp().getTableAlias()},new String[]{((MondrianDef.Column)parentLevel.getKeyExp()).getColumnName()});
      final int bitPos=bk.nextSetBit(0);
      if (bitPos == -1) {
        throw new MondrianException("String_Node_Str");
      }
      DimTable columnTable=convertTable(AggStar.this.star.getColumn(bitPosition).getTable(),null);
      while (columnTable.getChildTables().size() > 0) {
        columnTable=columnTable.getChildTables().get(0);
      }
      final DimTable finalColumnTable=columnTable;
      levelColumnsToJoin.put(bitPos,new Column(((MondrianDef.Column)parentLevel.getKeyExp()).getColumnName(),parentLevel.getKeyExp(),AggStar.this.star.getColumn(bitPos).getDatatype(),bitPos){
        public Table getTable(){
          return finalColumnTable;
        }
      }
);
      parentLevel=(RolapLevel)parentLevel.getParentLevel();
    }
  }
}

Fixed version (ground truth):
/** 
 * Given a usage of type level, create a Level column.
 * @param usage
 */
private void loadLevel(final JdbcSchema.Table.Column.Usage usage){
  String name=usage.getSymbolicName();
  MondrianDef.Expression expression=new MondrianDef.Column(getName(),usage.levelColumnName);
  int bitPosition=usage.rColumn.getBitPosition();
  Level level=new Level(name,expression,bitPosition,usage.rColumn,usage.collapsed);
  addLevel(level);
  if (!usage.collapsed) {
    RolapLevel parentLevel=(RolapLevel)usage.level.getParentLevel();
    while (!parentLevel.isAll()) {
      final BitKey bk=AggStar.this.star.getBitKey(new String[]{parentLevel.getKeyExp().getTableAlias()},new String[]{((MondrianDef.Column)parentLevel.getKeyExp()).getColumnName()});
      final int bitPos=bk.nextSetBit(0);
      if (bitPos == -1) {
        throw new MondrianException("String_Node_Str");
      }
      DimTable columnTable=convertTable(AggStar.this.star.getColumn(bitPosition).getTable(),usage.levelColumnName);
      while (columnTable.getChildTables().size() > 0) {
        columnTable=columnTable.getChildTables().get(0);
      }
      final DimTable finalColumnTable=columnTable;
      levelColumnsToJoin.put(bitPos,new Column(((MondrianDef.Column)parentLevel.getKeyExp()).getColumnName(),parentLevel.getKeyExp(),AggStar.this.star.getColumn(bitPos).getDatatype(),bitPos){
        public Table getTable(){
          return finalColumnTable;
        }
      }
);
      parentLevel=(RolapLevel)parentLevel.getParentLevel();
    }
  }
}
Program: 50921
Project: 50921
Buggy source:
public void testD2() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  getCubeTestContext().assertQueryReturns(mdx,RESULTS);
}

Fixed version (ground truth):
public void testD2() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  getTestContext().assertQueryReturns(mdx,RESULTS);
}
Program: 50922
Project: 50922
Buggy source:
public void testD1() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Result result=getCubeTestContext().executeQuery(mdx);
  String resultString=TestContext.toString(result);
  assertEquals(resultString,RESULTS);
}

Fixed version (ground truth):
public void testD1() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Result result=getTestContext().executeQuery(mdx);
  String resultString=TestContext.toString(result);
  assertEquals(resultString,RESULTS);
}
Program: 50923
Project: 50923
Buggy source:
public void testAll() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  getCubeTestContext().assertQueryReturns(mdx,RESULTS_ALL);
}

Fixed version (ground truth):
public void testAll() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  getTestContext().assertQueryReturns(mdx,RESULTS_ALL);
}
Program: 50924
Project: 50924
Buggy source:
/** 
 * This ought to give the same result as the above testD2() method. In this case, the FT2Extra cube has a default measure with no data (null) for all members. This default measure is used in the evaluation even though there is an implicit use of the measure [Measures].[Value].
 * @throws Exception
 */
public void _testNullDefaultMeasure() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Result result=getCubeTestContext().executeQuery(mdx);
  String resultString=TestContext.toString(result);
  assertTrue(resultString.equals(RESULTS));
}

Fixed version (ground truth):
/** 
 * This ought to give the same result as the above testD2() method. In this case, the FT2Extra cube has a default measure with no data (null) for all members. This default measure is used in the evaluation even though there is an implicit use of the measure [Measures].[Value].
 * @throws Exception
 */
public void _testNullDefaultMeasure() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Result result=getTestContext().executeQuery(mdx);
  String resultString=TestContext.toString(result);
  assertTrue(resultString.equals(RESULTS));
}
Program: 50925
Project: 50925
Buggy source:
public void testTotalAmount() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getCubeTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,false);
  Result result1=getCubeTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
}

Fixed version (ground truth):
public void testTotalAmount() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,false);
  Result result1=getTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
}
Program: 50926
Project: 50926
Buggy source:
public void testStoreCount() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getCubeTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,true);
  Result result1=getCubeTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
}

Fixed version (ground truth):
public void testStoreCount() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,true);
  Result result1=getTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
}
Program: 50927
Project: 50927
Buggy source:
public void testSalesCount() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getCubeTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,true);
  Result result1=getCubeTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
}

Fixed version (ground truth):
public void testSalesCount() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,true);
  Result result1=getTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
}
Program: 50928
Project: 50928
Buggy source:
public void testBug1541077() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getCubeTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getFormattedValue();
  propSaver.set(props.UseAggregates,true);
  Result result1=getCubeTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getFormattedValue();
  assertTrue(v.equals(v1));
}

Fixed version (ground truth):
public void testBug1541077() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  String mdx="String_Node_Str";
  Result result=getTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getFormattedValue();
  propSaver.set(props.UseAggregates,true);
  Result result1=getTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getFormattedValue();
  assertTrue(v.equals(v1));
}
Program: 50929
Project: 50929
Buggy source:
public void testCrossJoin() throws Exception {
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  propSaver.set(MondrianProperties.instance().CrossJoinOptimizerSize,Integer.MAX_VALUE);
  Result result1=getCubeTestContext().executeQuery(mdx);
  String resultString1=TestContext.toString(result1);
  propSaver.set(MondrianProperties.instance().CrossJoinOptimizerSize,Integer.MAX_VALUE);
  Result result2=getCubeTestContext().executeQuery(mdx);
  String resultString2=TestContext.toString(result2);
  assertEquals(resultString1,resultString2);
}

Fixed version (ground truth):
public void testCrossJoin() throws Exception {
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  propSaver.set(MondrianProperties.instance().CrossJoinOptimizerSize,Integer.MAX_VALUE);
  Result result1=getTestContext().executeQuery(mdx);
  String resultString1=TestContext.toString(result1);
  propSaver.set(MondrianProperties.instance().CrossJoinOptimizerSize,Integer.MAX_VALUE);
  Result result2=getTestContext().executeQuery(mdx);
  String resultString2=TestContext.toString(result2);
  assertEquals(resultString1,resultString2);
}
Program: 50930
Project: 50930
Buggy source:
public void testImplicitMember() throws Exception {
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Result result1=getCubeTestContext().executeQuery(mdx);
  String resultString1=TestContext.toString(result1);
  Result result2=getCubeTestContext().executeQuery(mdx);
  String resultString2=TestContext.toString(result2);
  assertEquals(resultString1,resultString2);
}

Fixed version (ground truth):
public void testImplicitMember() throws Exception {
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Result result1=getTestContext().executeQuery(mdx);
  String resultString1=TestContext.toString(result1);
  Result result2=getTestContext().executeQuery(mdx);
  String resultString2=TestContext.toString(result2);
  assertEquals(resultString1,resultString2);
}
Program: 50931
Project: 50931
Buggy source:
public void testTupleSelection() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  getCubeTestContext().assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testTupleSelection() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  getTestContext().assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 50932
Project: 50932
Buggy source:
public void testTotal() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  propSaver.set(props.ReadAggregates,false);
  String mdx="String_Node_Str";
  Result result=getCubeTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  String mdx2="String_Node_Str" + "String_Node_Str";
  Result aresult=getCubeTestContext().executeQuery(mdx2);
  Object av=aresult.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,true);
  propSaver.set(props.ReadAggregates,false);
  Result result1=getCubeTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
  Result aresult2=getCubeTestContext().executeQuery(mdx2);
  Object av1=aresult2.getCell(new int[]{0}).getValue();
  assertTrue(av.equals(av1));
}

Fixed version (ground truth):
public void testTotal() throws Exception {
  if (!isApplicable()) {
    return;
  }
  MondrianProperties props=MondrianProperties.instance();
  propSaver.set(props.UseAggregates,false);
  propSaver.set(props.ReadAggregates,false);
  String mdx="String_Node_Str";
  Result result=getTestContext().executeQuery(mdx);
  Object v=result.getCell(new int[]{0}).getValue();
  String mdx2="String_Node_Str" + "String_Node_Str";
  Result aresult=getTestContext().executeQuery(mdx2);
  Object av=aresult.getCell(new int[]{0}).getValue();
  propSaver.set(props.UseAggregates,true);
  propSaver.set(props.ReadAggregates,false);
  Result result1=getTestContext().executeQuery(mdx);
  Object v1=result1.getCell(new int[]{0}).getValue();
  assertTrue(v.equals(v1));
  Result aresult2=getTestContext().executeQuery(mdx2);
  Object av1=aresult2.getCell(new int[]{0}).getValue();
  assertTrue(av.equals(av1));
}
Program: 50933
Project: 50933
Buggy source:
public void testChildSelection() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str";
  getCubeTestContext().assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testChildSelection() throws Exception {
  if (!isApplicable()) {
    return;
  }
  String mdx="String_Node_Str" + "String_Node_Str";
  getTestContext().assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 50934
Project: 50934
Buggy source:
public void testComplexJoin() throws Exception {
  if (!isApplicable()) {
    return;
  }
  final String mdx="String_Node_Str";
  final TestContext context=getCubeTestContext();
  context.assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  final String mdx2="String_Node_Str";
  context.assertQueryReturns(mdx2,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testComplexJoin() throws Exception {
  if (!isApplicable()) {
    return;
  }
  final String mdx="String_Node_Str";
  final TestContext context=getTestContext();
  context.assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  final String mdx2="String_Node_Str";
  context.assertQueryReturns(mdx2,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 50935
Project: 50935
Buggy source:
public void testSingleJoin() throws Exception {
  if (!isApplicable()) {
    return;
  }
  final String mdx="String_Node_Str";
  final TestContext context=getCubeTestContext();
  context.assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testSingleJoin() throws Exception {
  if (!isApplicable()) {
    return;
  }
  final String mdx="String_Node_Str";
  final TestContext context=getTestContext();
  context.assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 50936
Project: 50936
Buggy source:
public void testComplexJoinDefaultRecognizer() throws Exception {
  if (!isApplicable()) {
    return;
  }
  final TestContext context=getCubeTestContext();
  final String mdx="String_Node_Str";
  context.assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  final String mdx2="String_Node_Str";
  context.assertQueryReturns(mdx2,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testComplexJoinDefaultRecognizer() throws Exception {
  if (!isApplicable()) {
    return;
  }
  final TestContext context=getTestContext();
  final String mdx="String_Node_Str";
  context.assertQueryReturns(mdx,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  final String mdx2="String_Node_Str";
  context.assertQueryReturns(mdx2,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 50937
Project: 50937
Buggy source:
public CellProperty(Object name){
  this.name=name.toString();
}

Fixed version (ground truth):
public CellProperty(List<Id.Segment> segments){
  this.name=Util.implode(segments);
}
Program: 50938
Project: 50938
Buggy source:
/** 
 * Finds a hierarchy whose name (or unique name, if <code>unique</code> is true) equals <code>s</code>.
 */
Hierarchy lookupHierarchy(Id.Segment s,boolean unique);

Fixed version (ground truth):
/** 
 * Finds a hierarchy whose name (or unique name, if <code>unique</code> is true) equals <code>s</code>.
 */
Hierarchy lookupHierarchy(Id.NameSegment s,boolean unique);
Program: 50939
Project: 50939
Buggy source:
/** 
 * Adds  restricted hierarchy or limited member based on bMember
 */
public void addGrantCubeSlicer(String sHierarchy,String sMember,boolean bMember){
  if (bMember) {
    boolean fail=false;
    List<Id.Segment> sMembers=Util.parseIdentifier(sMember);
    SchemaReader schemaReader=mdxCube.getSchemaReader(null);
    Member member=schemaReader.getMemberByUniqueName(sMembers,fail);
    if (member == null) {
      throw MondrianResource.instance().MdxCubeSlicerMemberError.ex(sMember,sHierarchy,mdxCube.getUniqueName());
    }
    if (getLimitedMemberForHierarchy(member.getHierarchy()) == null) {
      memberList.add(member);
    }
  }
 else {
    boolean fail=false;
    Hierarchy hierarchy=mdxCube.lookupHierarchy(new Id.Segment(sHierarchy,Id.Quoting.UNQUOTED),fail);
    if (hierarchy == null) {
      throw MondrianResource.instance().MdxCubeSlicerHierarchyError.ex(sHierarchy,mdxCube.getUniqueName());
    }
    hierarchyList.add(hierarchy);
  }
}

Fixed version (ground truth):
/** 
 * Adds  restricted hierarchy or limited member based on bMember
 */
public void addGrantCubeSlicer(String sHierarchy,String sMember,boolean bMember){
  if (bMember) {
    boolean fail=false;
    List<Id.Segment> sMembers=Util.parseIdentifier(sMember);
    SchemaReader schemaReader=mdxCube.getSchemaReader(null);
    Member member=schemaReader.getMemberByUniqueName(sMembers,fail);
    if (member == null) {
      throw MondrianResource.instance().MdxCubeSlicerMemberError.ex(sMember,sHierarchy,mdxCube.getUniqueName());
    }
    if (getLimitedMemberForHierarchy(member.getHierarchy()) == null) {
      memberList.add(member);
    }
  }
 else {
    boolean fail=false;
    Hierarchy hierarchy=mdxCube.lookupHierarchy(new Id.NameSegment(sHierarchy),fail);
    if (hierarchy == null) {
      throw MondrianResource.instance().MdxCubeSlicerHierarchyError.ex(sHierarchy,mdxCube.getUniqueName());
    }
    hierarchyList.add(hierarchy);
  }
}
Program: 50940
Project: 50940
Buggy source:
public Hierarchy lookupHierarchy(Id.Segment s,boolean unique){
  for (  Dimension dimension : dimensions) {
    Hierarchy[] hierarchies=dimension.getHierarchies();
    for (    Hierarchy hierarchy : hierarchies) {
      String name=unique ? hierarchy.getUniqueName() : hierarchy.getName();
      if (name.equals(s.name)) {
        return hierarchy;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public Hierarchy lookupHierarchy(Id.NameSegment s,boolean unique){
  for (  Dimension dimension : dimensions) {
    Hierarchy[] hierarchies=dimension.getHierarchies();
    for (    Hierarchy hierarchy : hierarchies) {
      String name=unique ? hierarchy.getUniqueName() : hierarchy.getName();
      if (name.equals(s.getName())) {
        return hierarchy;
      }
    }
  }
  return null;
}
Program: 50941
Project: 50941
Buggy source:
/** 
 * Looks up a dimension in this cube based on a component of its name.
 * @param s Name segment
 * @return Dimension, or null if not found
 */
public Dimension lookupDimension(Id.Segment s){
  for (  Dimension dimension : dimensions) {
    if (Util.equalName(dimension.getName(),s.name)) {
      return dimension;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Looks up a dimension in this cube based on a component of its name.
 * @param s Name segment
 * @return Dimension, or null if not found
 */
public Dimension lookupDimension(Id.Segment s){
  if (!(s instanceof Id.NameSegment)) {
    return null;
  }
  final Id.NameSegment nameSegment=(Id.NameSegment)s;
  for (  Dimension dimension : dimensions) {
    if (Util.equalName(dimension.getName(),nameSegment.name)) {
      return dimension;
    }
  }
  return null;
}
Program: 50942
Project: 50942
Buggy source:
public OlapElement lookupChild(SchemaReader schemaReader,Id.Segment s,MatchType matchType){
  Dimension mdxDimension=lookupDimension(s);
  if (mdxDimension != null) {
    return mdxDimension;
  }
  final List<Dimension> dimensions=schemaReader.getCubeDimensions(this);
  if (MondrianProperties.instance().SsasCompatibleNaming.get() && s.name.contains("String_Node_Str")) {
    for (    Dimension dimension : dimensions) {
      if (!s.name.startsWith(dimension.getName())) {
        continue;
      }
      for (      Hierarchy hierarchy : schemaReader.getDimensionHierarchies(dimension)) {
        if (Util.equalName(s.name,dimension.getName() + "String_Node_Str" + hierarchy.getName())) {
          return hierarchy;
        }
      }
    }
  }
  for (  Dimension dimension : dimensions) {
    OlapElement mdxElement=dimension.lookupChild(schemaReader,s,matchType);
    if (mdxElement != null) {
      if (mdxElement instanceof Member && MondrianProperties.instance().NeedDimensionPrefix.get()) {
        continue;
      }
      return mdxElement;
    }
  }
  return null;
}

Fixed version (ground truth):
public OlapElement lookupChild(SchemaReader schemaReader,Id.Segment s,MatchType matchType){
  Dimension mdxDimension=lookupDimension(s);
  if (mdxDimension != null) {
    return mdxDimension;
  }
  final List<Dimension> dimensions=schemaReader.getCubeDimensions(this);
  if (MondrianProperties.instance().SsasCompatibleNaming.get() && s instanceof Id.NameSegment && ((Id.NameSegment)s).name.contains("String_Node_Str")) {
    for (    Dimension dimension : dimensions) {
      if (!((Id.NameSegment)s).name.startsWith(dimension.getName())) {
        continue;
      }
      for (      Hierarchy hierarchy : schemaReader.getDimensionHierarchies(dimension)) {
        if (Util.equalName(((Id.NameSegment)s).name,dimension.getName() + "String_Node_Str" + hierarchy.getName())) {
          return hierarchy;
        }
      }
    }
  }
  for (  Dimension dimension : dimensions) {
    OlapElement mdxElement=dimension.lookupChild(schemaReader,s,matchType);
    if (mdxElement != null) {
      if (mdxElement instanceof Member && MondrianProperties.instance().NeedDimensionPrefix.get()) {
        continue;
      }
      return mdxElement;
    }
  }
  return null;
}
Program: 50943
Project: 50943
Buggy source:
private Hierarchy lookupHierarchy(Id.Segment s){
  for (  Hierarchy hierarchy : hierarchies) {
    if (Util.equalName(hierarchy.getName(),s.name)) {
      return hierarchy;
    }
  }
  return null;
}

Fixed version (ground truth):
private Hierarchy lookupHierarchy(Id.NameSegment s){
  for (  Hierarchy hierarchy : hierarchies) {
    if (Util.equalName(hierarchy.getName(),s.getName())) {
      return hierarchy;
    }
  }
  return null;
}
Program: 50944
Project: 50944
Buggy source:
public OlapElement lookupChild(SchemaReader schemaReader,Id.Segment s,MatchType matchType){
  OlapElement oe=lookupHierarchy(s);
  if (!MondrianProperties.instance().SsasCompatibleNaming.get()) {
    if (oe == null || oe.getName().equalsIgnoreCase(getName())) {
      OlapElement oeLevel=getHierarchy().lookupChild(schemaReader,s,matchType);
      if (oeLevel != null) {
        return oeLevel;
      }
    }
    return oe;
  }
 else {
    if (oe != null) {
      return oe;
    }
    final List<Hierarchy> hierarchyList=schemaReader.getDimensionHierarchies(this);
    for (    Hierarchy hierarchy : hierarchyList) {
      oe=hierarchy.lookupChild(schemaReader,s,matchType);
      if (oe != null) {
        return oe;
      }
    }
    return null;
  }
}

Fixed version (ground truth):
public OlapElement lookupChild(SchemaReader schemaReader,Id.Segment s,MatchType matchType){
  OlapElement oe=null;
  if (s instanceof Id.NameSegment) {
    oe=lookupHierarchy((Id.NameSegment)s);
  }
  if (!MondrianProperties.instance().SsasCompatibleNaming.get()) {
    if (oe == null || oe.getName().equalsIgnoreCase(getName())) {
      OlapElement oeLevel=getHierarchy().lookupChild(schemaReader,s,matchType);
      if (oeLevel != null) {
        return oeLevel;
      }
    }
    return oe;
  }
 else {
    if (oe != null) {
      return oe;
    }
    final List<Hierarchy> hierarchyList=schemaReader.getDimensionHierarchies(this);
    for (    Hierarchy hierarchy : hierarchyList) {
      oe=hierarchy.lookupChild(schemaReader,s,matchType);
      if (oe != null) {
        return oe;
      }
    }
    return null;
  }
}
Program: 50945
Project: 50945
Buggy source:
/** 
 * Changes the last part of the name to <code>newName</code>. For example, <code>[Abc].[Def].[Ghi]</code> becomes <code>[Abc].[Def].[Xyz]</code>; and the member or set is renamed from <code>Ghi</code> to <code>Xyz</code>.
 */
void rename(String newName){
  String oldName=getElement().getName();
  final List<Id.Segment> segments=this.id.getSegments();
  Util.assertTrue(segments.get(segments.size() - 1).name.equalsIgnoreCase(oldName));
  segments.set(segments.size() - 1,new Id.Segment(newName,Id.Quoting.QUOTED));
  if (isMember) {
    mdxMember.setName(newName);
  }
 else {
    mdxSet.setName(newName);
  }
}

Fixed version (ground truth):
/** 
 * Changes the last part of the name to <code>newName</code>. For example, <code>[Abc].[Def].[Ghi]</code> becomes <code>[Abc].[Def].[Xyz]</code>; and the member or set is renamed from <code>Ghi</code> to <code>Xyz</code>.
 */
void rename(String newName){
}
Program: 50946
Project: 50946
Buggy source:
public OlapElement lookupChild(SchemaReader schemaReader,Id.Segment s,MatchType matchType){
  OlapElement oe=Util.lookupHierarchyLevel(this,s.name);
  if (oe == null) {
    oe=Util.lookupHierarchyRootMember(schemaReader,this,s,matchType);
  }
  if (getLogger().isDebugEnabled()) {
    StringBuilder buf=new StringBuilder(64);
    buf.append("String_Node_Str");
    buf.append("String_Node_Str");
    buf.append(getName());
    buf.append("String_Node_Str");
    buf.append(s);
    if (oe == null) {
      buf.append("String_Node_Str");
    }
 else {
      buf.append("String_Node_Str").append(oe.getName());
    }
    getLogger().debug(buf.toString());
  }
  return oe;
}

Fixed version (ground truth):
public OlapElement lookupChild(SchemaReader schemaReader,Id.Segment s,MatchType matchType){
  OlapElement oe;
  if (s instanceof Id.NameSegment) {
    Id.NameSegment nameSegment=(Id.NameSegment)s;
    oe=Util.lookupHierarchyLevel(this,nameSegment.getName());
    if (oe == null) {
      oe=Util.lookupHierarchyRootMember(schemaReader,this,nameSegment,matchType);
    }
  }
 else {
    final Id.KeySegment keySegment=(Id.KeySegment)s;
    oe=levels[levels.length - 1].lookupChild(schemaReader,keySegment,matchType);
  }
  if (getLogger().isDebugEnabled()) {
    StringBuilder buf=new StringBuilder(64);
    buf.append("String_Node_Str");
    buf.append("String_Node_Str");
    buf.append(getName());
    buf.append("String_Node_Str");
    buf.append(s);
    if (oe == null) {
      buf.append("String_Node_Str");
    }
 else {
      buf.append("String_Node_Str").append(oe.getName());
    }
    getLogger().debug(buf.toString());
  }
  return oe;
}
Program: 50947
Project: 50947
Buggy source:
/** 
 * Returns an object with which to explicitly control the contents of the cache.
 * @param pw Writer to which to write logging information; may be null
 */
CacheControl getCacheControl(@Null PrintWriter pw);

Fixed version (ground truth):
/** 
 * Returns an object with which to explicitly control the contents of the cache.
 * @param pw Writer to which to write logging information; may be null
 */
CacheControl getCacheControl(PrintWriter pw);
Program: 50949
Project: 50949
Buggy source:
public TupleList evaluateList(Evaluator evaluator){
  return new UnaryTupleList(FunUtil.getNonEmptyMemberChildren(evaluator,((RolapEvaluator)evaluator).getExpanding()));
}

Fixed version (ground truth):
public TupleList evaluateList(Evaluator evaluator){
  return new UnaryTupleList(getLowestMembersForAccess(evaluator,hierarchyAccess,null));
}