nus-yam/ex-repair huggingface dataset:
Program: 51383
Project: 51383
Buggy source:
public void testMembers(){
  assertAxisReturns("String_Node_Str",fold("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
  assertAxisReturns("String_Node_Str","String_Node_Str");
  assertAxisReturns("String_Node_Str",fold("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"));
  assertAxisReturns("String_Node_Str",fold("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",fold("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"));
}

Fixed version (ground truth):
public void testMembers(){
  assertAxisReturns("String_Node_Str",fold("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
  assertAxisReturns("String_Node_Str","String_Node_Str");
  assertAxisReturns("String_Node_Str",fold("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"));
  assertAxisReturns("String_Node_Str",fold("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",fold("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("String_Node_Str" + "String_Node_Str",fold("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: 51384
Project: 51384
Buggy source:
public void getMemberChildren(RolapMember parentMember,List<RolapMember> children,MemberChildrenConstraint constraint){
  if (!parentMember.isAll() && parentMember.isCalculated()) {
    return;
  }
  getMemberChildren2(parentMember,children,constraint);
}

Fixed version (ground truth):
public void getMemberChildren(RolapMember parentMember,List<RolapMember> children,MemberChildrenConstraint constraint){
  if (!parentMember.isAll() && parentMember.isCalculated() && !parentMember.getLevel().isParentChild()) {
    return;
  }
  getMemberChildren2(parentMember,children,constraint);
}
Program: 51386
Project: 51386
Buggy source:
/** 
 * Creates a child evaluator.
 */
private RolapDependencyTestingEvaluator(RolapEvaluatorRoot root,RolapDependencyTestingEvaluator evaluator,CellReader cellReader,Member[] cloneCurrentMembers){
  super(root,evaluator,cellReader,cloneCurrentMembers);
}

Fixed version (ground truth):
/** 
 * Creates a child evaluator.
 */
private RolapDependencyTestingEvaluator(RolapEvaluatorRoot root,RolapDependencyTestingEvaluator evaluator){
  super(root,evaluator);
}
Program: 51387
Project: 51387
Buggy source:
public RolapEvaluator _push(){
  Member[] cloneCurrentMembers=getMembers().clone();
  return new RolapDependencyTestingEvaluator(root,this,cellReader,cloneCurrentMembers);
}

Fixed version (ground truth):
public RolapEvaluator _push(){
  return new RolapDependencyTestingEvaluator(root,this);
}
Program: 51388
Project: 51388
Buggy source:
/** 
 * Creates an evaluator with no parent.
 * @param root Shared context between this evaluator and its children
 */
public RolapEvaluator(RolapEvaluatorRoot root){
  this(root,null,null,null);
  SchemaReader scr=this.root.connection.getSchemaReader();
  Dimension[] dimensions=this.root.cube.getDimensions();
  for (  final Dimension dimension : dimensions) {
    final int ordinal=dimension.getOrdinal(this.root.cube);
    final Hierarchy hier=dimension.getHierarchy();
    Member member=scr.getHierarchyDefaultMember(hier);
    if (member == null) {
      throw MondrianResource.instance().InvalidHierarchyCondition.ex(hier.getUniqueName());
    }
    HierarchyUsage[] hierarchyUsages=this.root.cube.getUsages(hier);
    if (hierarchyUsages.length != 0) {
      ((RolapMember)member).makeUniqueName(hierarchyUsages[0]);
    }
    currentMembers[ordinal]=member;
    if (member.isCalculated()) {
      addCalcMember(member);
    }
  }
  root.init(this);
}

Fixed version (ground truth):
/** 
 * Creates an evaluator with no parent.
 * @param root Shared context between this evaluator and its children
 */
public RolapEvaluator(RolapEvaluatorRoot root){
  this(root,null);
  SchemaReader scr=this.root.connection.getSchemaReader();
  Dimension[] dimensions=this.root.cube.getDimensions();
  for (  final Dimension dimension : dimensions) {
    final int ordinal=dimension.getOrdinal(this.root.cube);
    final Hierarchy hier=dimension.getHierarchy();
    Member member=scr.getHierarchyDefaultMember(hier);
    if (member == null) {
      throw MondrianResource.instance().InvalidHierarchyCondition.ex(hier.getUniqueName());
    }
    HierarchyUsage[] hierarchyUsages=this.root.cube.getUsages(hier);
    if (hierarchyUsages.length != 0) {
      ((RolapMember)member).makeUniqueName(hierarchyUsages[0]);
    }
    currentMembers[ordinal]=member;
    if (member.isCalculated()) {
      addCalcMember(member);
    }
  }
  root.init(this);
}
Program: 51389
Project: 51389
Buggy source:
/** 
 * Creates a clone of the current validator.
 */
protected RolapEvaluator _push(){
  getQuery().checkCancelOrTimeout();
  Member[] cloneCurrentMembers=currentMembers.clone();
  RolapEvaluator newEvaluator=new RolapEvaluator(root,this,cellReader,cloneCurrentMembers);
  newEvaluator.setEvalAxes(evalAxes);
  return newEvaluator;
}

Fixed version (ground truth):
/** 
 * Creates a clone of the current validator.
 */
protected RolapEvaluator _push(){
  getQuery().checkCancelOrTimeout();
  RolapEvaluator newEvaluator=new RolapEvaluator(root,this);
  return newEvaluator;
}
Program: 51391
Project: 51391
Buggy source:
/** 
 * Creates a SqlContextConstraint.
 * @param evaluator Evaluator
 * @param strict defines the behaviour if the evaluator contextcontains calculated members. If true, an exception is thrown, otherwise calculated members are silently ignored. The methods  {@link mondrian.rolap.sql.MemberChildrenConstraint#addMemberConstraint(mondrian.rolap.sql.SqlQuery,java.util.Map,mondrian.rolap.aggmatcher.AggStar,RolapMember)} and{@link mondrian.rolap.sql.MemberChildrenConstraint#addMemberConstraint(mondrian.rolap.sql.SqlQuery,java.util.Map,mondrian.rolap.aggmatcher.AggStar,java.util.List)} willnever accept a calculated member as parent.
 */
SqlContextConstraint(RolapEvaluator evaluator,boolean strict){
  this.evaluator=evaluator;
  this.strict=strict;
  cacheKey=new ArrayList<Object>();
  cacheKey.add(getClass());
  cacheKey.add(strict);
  cacheKey.addAll(Arrays.asList(evaluator.getMembers()));
}

Fixed version (ground truth):
/** 
 * Creates a SqlContextConstraint.
 * @param evaluator Evaluator
 * @param strict defines the behaviour if the evaluator contextcontains calculated members. If true, an exception is thrown, otherwise calculated members are silently ignored. The methods  {@link mondrian.rolap.sql.MemberChildrenConstraint#addMemberConstraint(mondrian.rolap.sql.SqlQuery,java.util.Map,java.util.Map,mondrian.rolap.aggmatcher.AggStar,RolapMember)} and{@link mondrian.rolap.sql.MemberChildrenConstraint#addMemberConstraint(mondrian.rolap.sql.SqlQuery,java.util.Map,java.util.Map,mondrian.rolap.aggmatcher.AggStar,java.util.List)} willnever accept a calculated member as parent.
 */
SqlContextConstraint(RolapEvaluator evaluator,boolean strict){
  this.evaluator=evaluator;
  this.strict=strict;
  cacheKey=new ArrayList<Object>();
  cacheKey.add(getClass());
  cacheKey.add(strict);
  cacheKey.addAll(Arrays.asList(evaluator.getMembers()));
}
Program: 51392
Project: 51392
Buggy source:
public void addMemberConstraint(SqlQuery sqlQuery,Map<RolapLevel,RolapStar.Column> levelToColumnMap,Map<String,RolapStar.Table> relationNamesToStarTableMap,AggStar aggStar,List<RolapMember> parents){
  SqlConstraintUtils.addContextConstraint(sqlQuery,aggStar,evaluator,strict);
  SqlConstraintUtils.addMemberConstraint(sqlQuery,levelToColumnMap,relationNamesToStarTableMap,aggStar,parents,true,false);
}

Fixed version (ground truth):
/** 
 * Adds <code>parents</code> to the current context and restricts the SQL resultset to that new context.
 */
public void addMemberConstraint(SqlQuery sqlQuery,Map<RolapLevel,RolapStar.Column> levelToColumnMap,Map<String,RolapStar.Table> relationNamesToStarTableMap,AggStar aggStar,List<RolapMember> parents){
  SqlConstraintUtils.addContextConstraint(sqlQuery,aggStar,evaluator,strict);
  SqlConstraintUtils.addMemberConstraint(sqlQuery,levelToColumnMap,relationNamesToStarTableMap,aggStar,parents,true,false);
}
Program: 51393
Project: 51393
Buggy source:
/** 
 * Modifies a <code>Member.Children</code> query so that (all or some) children of <em>all</em> parent members contained in <code>parents</code> will be returned in the result set.
 * @param sqlQuery the query to modify
 * @param levelToColumnMap where to find each level's key
 * @param aggStar Aggregate table, or null if query is against fact table
 * @param parents list of parent members that restrict the returned children.
 */
public void addMemberConstraint(SqlQuery sqlQuery,Map<RolapLevel,RolapStar.Column> levelToColumnMap,Map<String,RolapStar.Table> relationNamesToStarTableMap,AggStar aggStar,List<RolapMember> parents);

Fixed version (ground truth):
/** 
 * Modifies a <code>Member.Children</code> query so that (all or some) children of <em>all</em> parent members contained in <code>parents</code> will be returned in the result set.
 * @param sqlQuery the query to modify
 * @param levelToColumnMap where to find each level's key
 * @param relationNamesToStarTableMap table alias map
 * @param aggStar Aggregate table, or null if query is against fact table
 * @param parents list of parent members that restrict the returned children.
 */
public void addMemberConstraint(SqlQuery sqlQuery,Map<RolapLevel,RolapStar.Column> levelToColumnMap,Map<String,RolapStar.Table> relationNamesToStarTableMap,AggStar aggStar,List<RolapMember> parents);
Program: 51394
Project: 51394
Buggy source:
private void process(final Member member){
  if (member.isMeasure()) {
    if (member.isCalculated()) {
      Exp exp=member.getExpression();
      ResolvedFunCallFinder finder=new ResolvedFunCallFinder(crossJoinCall);
      exp.accept(finder);
      if (!finder.found) {
        exp.accept(this);
        queryMeasureSet.add(member);
      }
    }
 else {
      queryMeasureSet.add(member);
    }
  }
}

Fixed version (ground truth):
private void process(final Member member){
  if (member.isMeasure()) {
    if (member.isCalculated()) {
      Exp exp=member.getExpression();
      ResolvedFunCallFinder finder=new ResolvedFunCallFinder(crossJoinCall);
      exp.accept(finder);
      if (!finder.found) {
        exp.accept(this);
      }
    }
 else {
      queryMeasureSet.add(member);
    }
  }
}
Program: 51395
Project: 51395
Buggy source:
public AbstractBooleanCalc(Exp exp,Calc[] calcs){
}

Fixed version (ground truth):
public AbstractBooleanCalc(Exp exp,Calc[] calcs){
  super(exp);
  this.calcs=calcs;
}
Program: 51396
Project: 51396
Buggy source:
public BooleanCalc compileBoolean(Exp exp){
  return (BooleanCalc)compileScalar(exp,false);
}

Fixed version (ground truth):
/** 
 * compiles a boolean calc, support for converting  integers and doubles.
 * @param exp the expression to generate a calc for
 */
public BooleanCalc compileBoolean(Exp exp){
  final Calc calc=compileScalar(exp,false);
  if (calc instanceof BooleanCalc) {
    return (BooleanCalc)calc;
  }
 else   if (calc instanceof DoubleCalc) {
    final DoubleCalc doubleCalc=(DoubleCalc)calc;
    return new AbstractBooleanCalc(exp,new Calc[]{doubleCalc}){
      public boolean evaluateBoolean(      Evaluator evaluator){
        return doubleCalc.evaluateDouble(evaluator) != 0;
      }
    }
;
  }
 else   if (calc instanceof IntegerCalc) {
    final IntegerCalc doubleCalc=(IntegerCalc)calc;
    return new AbstractBooleanCalc(exp,new Calc[]{doubleCalc}){
      public boolean evaluateBoolean(      Evaluator evaluator){
        return doubleCalc.evaluateInteger(evaluator) != 0;
      }
    }
;
  }
 else {
    return (BooleanCalc)calc;
  }
}
Program: 51398
Project: 51398
Buggy source:
protected synchronized void materialize(){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + iter.getClass().getName());
  }
  RolapAxis.MemberArrayIterable.this.materialize();
  positionList=new MemberArrayIterable.PositionList();
}

Fixed version (ground truth):
protected synchronized void materialize(){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + ((iter != null) ? iter.getClass().getName() : null));
  }
  RolapAxis.MemberArrayIterable.this.materialize();
  positionList=new MemberArrayIterable.PositionList();
}
Program: 51399
Project: 51399
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      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");
      }
      final List list=evaluateCurrentList(listCalc,evaluator);
      return rollup.aggregate(evaluator.push(),list,calc);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new GenericCalc(call){
    public Object evaluate(    Evaluator evaluator){
      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");
      }
      final List list=evaluateCurrentList(listCalc,evaluator);
      return rollup.aggregate(evaluator.push(),list,calc);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51400
Project: 51400
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return avg(evaluator.push(),memberList,calc);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return (Double)avg(evaluator.push(),memberList,calc);
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51403
Project: 51403
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc1=compiler.compileScalar(call.getArg(1),true);
  final Calc calc2=call.getArgCount() > 2 ? compiler.compileScalar(call.getArg(2),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=listCalc.evaluateList(evaluator);
      return covariance(evaluator.push(),memberList,calc1,calc2,biased);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc1,calc2};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc1=compiler.compileScalar(call.getArg(1),true);
  final Calc calc2=call.getArgCount() > 2 ? compiler.compileScalar(call.getArg(2),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc1,calc2}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=listCalc.evaluateList(evaluator);
      return (Double)covariance(evaluator.push(),memberList,calc1,calc2,biased);
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51404
Project: 51404
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return median(evaluator.push(),memberList,calc);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return (Double)median(evaluator.push(),memberList,calc);
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51405
Project: 51405
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return max ? max(evaluator.push(),memberList,calc) : min(evaluator.push(),memberList,calc);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return (Double)(max ? max(evaluator.push(),memberList,calc) : min(evaluator.push(),memberList,calc));
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51406
Project: 51406
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return stdev(evaluator.push(),memberList,calc,false);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return (Double)stdev(evaluator.push(),memberList,calc,false);
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51407
Project: 51407
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return stdev(evaluator.push(),memberList,calc,true);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return (Double)stdev(evaluator.push(),memberList,calc,true);
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51408
Project: 51408
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return var(evaluator.push(),memberList,calc,false);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return (Double)var(evaluator.push(),memberList,calc,false);
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51409
Project: 51409
Buggy source:
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractCalc(call){
    public Object evaluate(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return var(evaluator.push(),memberList,calc,true);
    }
    public Calc[] getCalcs(){
      return new Calc[]{listCalc,calc};
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(ResolvedFunCall call,ExpCompiler compiler){
  final ListCalc listCalc=compiler.compileList(call.getArg(0));
  final Calc calc=call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1),true) : new ValueCalc(call);
  return new AbstractDoubleCalc(call,new Calc[]{listCalc,calc}){
    public double evaluateDouble(    Evaluator evaluator){
      List memberList=evaluateCurrentList(listCalc,evaluator);
      return (Double)var(evaluator.push(),memberList,calc,true);
    }
    public boolean dependsOn(    Dimension dimension){
      return anyDependsButFirst(getCalcs(),dimension);
    }
  }
;
}
Program: 51410
Project: 51410
Buggy source:
/** 
 * The constructor for the <code>ExpCompiler.Factory</code>.  This passes the <code>ExpCompiler</code> class to the  <code>ObjectFactory</code> base class.
 */
private Factory(){
  super(ExpCompiler.class);
}

Fixed version (ground truth):
/** 
 * The constructor for the <code>ExpCompiler.Factory</code>. This passes the <code>ExpCompiler</code> class to the <code>ObjectFactory</code> base class.
 */
private Factory(){
  super(ExpCompiler.class);
}
Program: 51411
Project: 51411
Buggy source:
/** 
 * Compiles an expression which yields a <code>double</code> result.
 */
DoubleCalc compileDouble(Exp exp);

Fixed version (ground truth):
/** 
 * Compiles an expression which yields a <code>double</code> result.
 * @param exp Expression
 * @return Calculator which yields a double
 */
DoubleCalc compileDouble(Exp exp);
Program: 51412
Project: 51412
Buggy source:
/** 
 * Compiles an expression which yields a <code>boolean</code> result.
 */
BooleanCalc compileBoolean(Exp exp);

Fixed version (ground truth):
/** 
 * Compiles an expression which yields a <code>boolean</code> result.
 * @param exp Expression
 * @return Calculator which yields a boolean
 */
BooleanCalc compileBoolean(Exp exp);
Program: 51413
Project: 51413
Buggy source:
Validator getValidator();

Fixed version (ground truth):
/** 
 * Returns the validator which was used to validate this expression.
 * @return validator
 */
Validator getValidator();
Program: 51414
Project: 51414
Buggy source:
Context(){
  this.threadLocalClassName=ExpCompiler.Factory.getThreadLocalClassName();
  if (this.threadLocalClassName != null) {
    ExpCompiler.Factory.clearThreadLocalClassName();
  }
  this.systemPropertyClassName=System.getProperty(ExpCompiler.class.getName());
  if (this.systemPropertyClassName != null) {
    System.getProperties().remove(ExpCompiler.class.getName());
  }
}

Fixed version (ground truth):
/** 
 * Creates a Context.
 */
Context(){
  this.threadLocalClassName=ExpCompiler.Factory.getThreadLocalClassName();
  if (this.threadLocalClassName != null) {
    ExpCompiler.Factory.clearThreadLocalClassName();
  }
  this.systemPropertyClassName=System.getProperty(ExpCompiler.class.getName());
  if (this.systemPropertyClassName != null) {
    System.getProperties().remove(ExpCompiler.class.getName());
  }
}
Program: 51415
Project: 51415
Buggy source:
/** 
 * Compiles an expression to yield a scalar result. <p>If the expression yields a member or tuple, the calculator will automatically apply that member or tuple to the current dimensional context and return the value of the current measure.
 * @param exp Expression
 * @param convert
 * @return Calculation which returns the scalar value of the expression
 */
Calc compileScalar(Exp exp,boolean convert);

Fixed version (ground truth):
/** 
 * Compiles an expression to yield a scalar result. <p>If the expression yields a member or tuple, the calculator will automatically apply that member or tuple to the current dimensional context and return the value of the current measure.
 * @param exp Expression
 * @param specific Whether to try to use the specific compile method forscalar types. For example, if <code>specific</code> is true and <code>exp</code> is a string expression, calls {@link #compileString(mondrian.olap.Exp)}
 * @return Calculation which returns the scalar value of the expression
 */
Calc compileScalar(Exp exp,boolean specific);
Program: 51416
Project: 51416
Buggy source:
private void restore(){
  if (this.threadLocalClassName != null) {
    ExpCompiler.Factory.setThreadLocalClassName(this.threadLocalClassName);
  }
  if (this.systemPropertyClassName != null) {
    System.setProperty(ExpCompiler.class.getName(),this.systemPropertyClassName);
  }
}

Fixed version (ground truth):
/** 
 * Restores the previous context.
 */
private void restore(){
  if (this.threadLocalClassName != null) {
    ExpCompiler.Factory.setThreadLocalClassName(this.threadLocalClassName);
  }
  if (this.systemPropertyClassName != null) {
    System.setProperty(ExpCompiler.class.getName(),this.systemPropertyClassName);
  }
}
Program: 51417
Project: 51417
Buggy source:
/** 
 * @param evaluator the <code>Evaluator</code> to use with the compiler
 * @param validator the <code>Validator</code> to use with the compiler
 * @param resultStyles the initial <code>ResultStyle</code> array for the compiler
 * @return the new <code>ExpCompiler</code> compiler
 * @throws CreationException if the compiler can not be created
 */
public static ExpCompiler getExpCompiler(final Evaluator evaluator,final Validator validator,final ResultStyle[] resultStyles) throws CreationException {
  return factory.getObject(CLASS_ARRAY,new Object[]{evaluator,validator,resultStyles});
}

Fixed version (ground truth):
/** 
 * @param evaluator the <code>Evaluator</code> to use with the compiler
 * @param validator the <code>Validator</code> to use with the compiler
 * @param resultStyles the initial <code>ResultStyle</code> arrayfor the compiler
 * @return the new <code>ExpCompiler</code> compiler
 * @throws CreationException if the compiler can not be created
 */
public static ExpCompiler getExpCompiler(final Evaluator evaluator,final Validator validator,final ResultStyle[] resultStyles) throws CreationException {
  return factory.getObject(CLASS_ARRAY,new Object[]{evaluator,validator,resultStyles});
}
Program: 51418
Project: 51418
Buggy source:
/** 
 * The <code>ExpCompiler.Factory</code>'s implementation of the <code>ObjectFactory</code>'s abstract method which returns the default <code>ExpCompiler</code> instance.
 * @param parameterTypes array of classes: Evaluator, Validator andResultStyle
 * @param parameterValues  the Evaluator, Validator and ResultStyle values
 * @return <code>ExpCompiler</code> instance
 * @throws CreationException if the <code>ExpCompiler</code> can not becreated.
 */
protected ExpCompiler getDefault(final Class[] parameterTypes,final Object[] parameterValues) throws CreationException {
  Evaluator evaluator=(Evaluator)parameterValues[0];
  Validator validator=(Validator)parameterValues[1];
  ResultStyle[] resultStyles=(ResultStyle[])parameterValues[2];
  return new mondrian.calc.impl.BetterExpCompiler(evaluator,validator,resultStyles);
}

Fixed version (ground truth):
/** 
 * The <code>ExpCompiler.Factory</code>'s implementation of the <code>ObjectFactory</code>'s abstract method which returns the default <code>ExpCompiler</code> instance.
 * @param parameterTypes array of classes: Evaluator, Validator andResultStyle
 * @param parameterValues  the Evaluator, Validator and ResultStylevalues
 * @return <code>ExpCompiler</code> instance
 * @throws CreationException if the <code>ExpCompiler</code> can not becreated.
 */
protected ExpCompiler getDefault(final Class[] parameterTypes,final Object[] parameterValues) throws CreationException {
  Evaluator evaluator=(Evaluator)parameterValues[0];
  Validator validator=(Validator)parameterValues[1];
  ResultStyle[] resultStyles=(ResultStyle[])parameterValues[2];
  return new mondrian.calc.impl.BetterExpCompiler(evaluator,validator,resultStyles);
}
Program: 51419
Project: 51419
Buggy source:
/** 
 * Compiles an expression which yields a tuple result.
 */
TupleCalc compileTuple(Exp exp);

Fixed version (ground truth):
/** 
 * Compiles an expression which yields a tuple result.
 * @param exp Expression
 * @return Calculator which yields a tuple
 */
TupleCalc compileTuple(Exp exp);
Program: 51420
Project: 51420
Buggy source:
/** 
 * Get the underlying Factory object.  <p> This is for testing only.
 * @return the <code>ExpCompiler.Factory</code> object
 */
public static Factory getFactory(){
  return factory;
}

Fixed version (ground truth):
/** 
 * Get the underlying Factory object. <p> This is for testing only.
 * @return the <code>ExpCompiler.Factory</code> object
 */
public static Factory getFactory(){
  return factory;
}
Program: 51421
Project: 51421
Buggy source:
/** 
 * Compiles an expression which yields an immutable   {@ link * java.lang.Iterable} * result.
 */
IterCalc compileIter(Exp exp);

Fixed version (ground truth):
/** 
 * Compiles an expression which yields an immutable   {@link Iterable} result.
 * @param exp Expression
 * @return Calculator which yields an Iterable
 */
IterCalc compileIter(Exp exp);
Program: 51422
Project: 51422
Buggy source:
/** 
 * Get the current override contect.  <p> This is for testing only.
 * @return the override context object.
 */
public Object removeContext(){
  return new Context();
}

Fixed version (ground truth):
/** 
 * Get the current override contect. <p> This is for testing only.
 * @return the override context object.
 */
public Object removeContext(){
  return new Context();
}
Program: 51423
Project: 51423
Buggy source:
/** 
 * Get the class name set in the <code>ThreadLocal</code> or null.
 * @return class name or null. 
 */
protected String getClassName(){
  return getThreadLocalClassName();
}

Fixed version (ground truth):
/** 
 * Get the class name set in the <code>ThreadLocal</code> or null.
 * @return class name or null.
 */
protected String getClassName(){
  return getThreadLocalClassName();
}
Program: 51424
Project: 51424
Buggy source:
/** 
 * Return the <code>ExpCompiler.Factory</code property name. 
 * @return <code>ExpCompiler.Factory</code> property name
 */
protected StringProperty getStringProperty(){
  return MondrianProperties.instance().ExpCompilerClass;
}

Fixed version (ground truth):
/** 
 * Return the <code>ExpCompiler.Factory</code property name.
 * @return <code>ExpCompiler.Factory</code> property name
 */
protected StringProperty getStringProperty(){
  return MondrianProperties.instance().ExpCompilerClass;
}
Program: 51426
Project: 51426
Buggy source:
public Calc compileCall(final ResolvedFunCall call,ExpCompiler compiler){
  final MemberCalc memberCalc0=compiler.compileMember(call.getArg(0));
  final MemberCalc memberCalc1=compiler.compileMember(call.getArg(1));
  return new AbstractListCalc(call,new Calc[]{memberCalc0,memberCalc1}){
    public List evaluateList(    Evaluator evaluator){
      final Member member0=memberCalc0.evaluateMember(evaluator);
      final Member member1=memberCalc1.evaluateMember(evaluator);
      if (member0.isNull() || member1.isNull()) {
        return Collections.EMPTY_LIST;
      }
      if (member0.getLevel() != member1.getLevel()) {
        throw evaluator.newEvalException(call.getFunDef(),"String_Node_Str");
      }
      return FunUtil.memberRange(evaluator,member0,member1);
    }
  }
;
}

Fixed version (ground truth):
public Calc compileCall(final ResolvedFunCall call,ExpCompiler compiler){
  final MemberCalc[] memberCalcs=compiler.compileMembers(call.getArg(0),call.getArg(1));
  return new AbstractListCalc(call,new Calc[]{memberCalcs[0],memberCalcs[1]}){
    public List evaluateList(    Evaluator evaluator){
      final Member member0=memberCalcs[0].evaluateMember(evaluator);
      final Member member1=memberCalcs[1].evaluateMember(evaluator);
      if (member0.isNull() || member1.isNull()) {
        return Collections.EMPTY_LIST;
      }
      if (member0.getLevel() != member1.getLevel()) {
        throw evaluator.newEvalException(call.getFunDef(),"String_Node_Str");
      }
      return FunUtil.memberRange(evaluator,member0,member1);
    }
  }
;
}
Program: 51427
Project: 51427
Buggy source:
public List evaluateList(Evaluator evaluator){
  final Member member0=memberCalc0.evaluateMember(evaluator);
  final Member member1=memberCalc1.evaluateMember(evaluator);
  if (member0.isNull() || member1.isNull()) {
    return Collections.EMPTY_LIST;
  }
  if (member0.getLevel() != member1.getLevel()) {
    throw evaluator.newEvalException(call.getFunDef(),"String_Node_Str");
  }
  return FunUtil.memberRange(evaluator,member0,member1);
}

Fixed version (ground truth):
public List evaluateList(Evaluator evaluator){
  final Member member0=memberCalcs[0].evaluateMember(evaluator);
  final Member member1=memberCalcs[1].evaluateMember(evaluator);
  if (member0.isNull() || member1.isNull()) {
    return Collections.EMPTY_LIST;
  }
  if (member0.getLevel() != member1.getLevel()) {
    throw evaluator.newEvalException(call.getFunDef(),"String_Node_Str");
  }
  return FunUtil.memberRange(evaluator,member0,member1);
}
Program: 51428
Project: 51428
Buggy source:
/** 
 * Returns the solve order. (Not valid if this formula defines a set.)
 * @pre isMember()
 * @post return != null
 */
public int getSolveOrder(){
  Exp exp=getMemberProperty(Property.SOLVE_ORDER.name);
  if (exp != null) {
    final Type type=exp.getType();
    if (type instanceof NumericType) {
      return ((Literal)exp).getIntValue();
    }
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * Returns the solve order. (Not valid if this formula defines a set.)
 * @pre isMember()
 * @return Solve order, or null if SOLVE_ORDER property is not specifiedor is not a number or is not constant
 */
public Number getSolveOrder(){
  return getIntegerMemberProperty(Property.SOLVE_ORDER.name);
}
Program: 51429
Project: 51429
Buggy source:
public int getSolveOrder(){
  return formula.getSolveOrder();
}

Fixed version (ground truth):
public int getSolveOrder(){
  final Number solveOrder=formula.getSolveOrder();
  return solveOrder == null ? 0 : solveOrder.intValue();
}
Program: 51431
Project: 51431
Buggy source:
/** 
 * Checks that a given MDX query results in a particular SQL statement being generated.
 * @param mdxQuery MDX query
 * @param patterns Set of patterns, one for each dialect.
 */
private void assertQuerySql(String mdxQuery,SqlPattern[] patterns){
  final TestContext testContext=getTestContext();
  final Connection connection=testContext.getConnection();
  final Query query=connection.parseQuery(mdxQuery);
  final Cube cube=query.getCube();
  RolapStar star=((RolapCube)cube).getStar();
  SqlQuery.Dialect dialect=star.getSqlQueryDialect();
  int d=SqlPattern.getDialect(dialect);
  SqlPattern sqlPattern=SqlPattern.getPattern(d,patterns);
  if (sqlPattern == null) {
    return;
  }
  String sql=sqlPattern.getSql();
  String trigger=sqlPattern.getTriggerSql();
  RolapHierarchy hierarchy=(RolapHierarchy)getConnection().getSchema().lookupCube("String_Node_Str",true).lookupHierarchy("String_Node_Str",false);
  SmartMemberReader memberReader=(SmartMemberReader)hierarchy.getMemberReader();
  memberReader.mapLevelToMembers.cache.clear();
  memberReader.mapMemberToChildren.cache.clear();
  RolapUtil.threadHooks.set(new TriggerHook(trigger));
  Bomb bomb;
  try {
    star.clearCachedAggregations(true);
    CachePool.instance().flush();
    final Result result=connection.execute(query);
    Util.discard(result);
    bomb=null;
  }
 catch (  Bomb e) {
    bomb=e;
  }
 finally {
    RolapUtil.threadHooks.set(null);
  }
  if (bomb == null) {
    fail("String_Node_Str" + sql + "String_Node_Str");
  }
  assertEquals(replaceQuotes(sql),replaceQuotes(bomb.sql));
}

Fixed version (ground truth):
/** 
 * Checks that a given MDX query results in a particular SQL statement being generated.
 * @param mdxQuery MDX query
 * @param patterns Set of patterns, one for each dialect.
 */
private void assertQuerySql(String mdxQuery,SqlPattern[] patterns){
  assertQuerySqlOrNot(mdxQuery,patterns,false);
}
Program: 51432
Project: 51432
Buggy source:
public List evaluateList(Evaluator evaluator){
  List<Object> result=new ArrayList<Object>();
  if (tuple) {
    final List<Member[]> list1=listCalc1.evaluateList(evaluator);
    final Evaluator evaluator2=evaluator.push();
    if (all) {
      for (      Member[] members : list1) {
        evaluator2.setContext(members);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        result.addAll(result2);
      }
    }
 else {
      final Set<Object> emitted=new HashSet<Object>();
      for (      Member[] members : list1) {
        evaluator2.setContext(members);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        for (        Object row : result2) {
          if (emitted.add(row)) {
            result.add(row);
          }
        }
      }
    }
  }
 else {
    final List<Member> list1=listCalc1.evaluateList(evaluator);
    final Evaluator evaluator2=evaluator.push();
    if (all) {
      for (      Member member : list1) {
        evaluator2.setContext(member);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        result.addAll(result2);
      }
    }
 else {
      Set<Object> emitted=new HashSet<Object>();
      for (      Member member : list1) {
        evaluator2.setContext(member);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        for (        Object row : result2) {
          if (emitted.add(row)) {
            result.add(row);
          }
        }
      }
    }
  }
  return result;
}

Fixed version (ground truth):
public List evaluateList(Evaluator evaluator){
  List<Object> result=new ArrayList<Object>();
  if (tuple) {
    final List<Member[]> list1=listCalc1.evaluateList(evaluator);
    final Evaluator evaluator2=evaluator.push();
    if (all) {
      for (      Member[] members : list1) {
        evaluator2.setContext(members);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        result.addAll(result2);
      }
    }
 else {
      final Set<Object> emitted=new HashSet<Object>();
      for (      Member[] members : list1) {
        evaluator2.setContext(members);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        addDistinct(result,result2,emitted);
      }
    }
  }
 else {
    final List<Member> list1=listCalc1.evaluateList(evaluator);
    final Evaluator evaluator2=evaluator.push();
    if (all) {
      for (      Member member : list1) {
        evaluator2.setContext(member);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        result.addAll(result2);
      }
    }
 else {
      Set<Object> emitted=new HashSet<Object>();
      for (      Member member : list1) {
        evaluator2.setContext(member);
        final List<Object> result2=listCalc2.evaluateList(evaluator2);
        addDistinct(result,result2,emitted);
      }
    }
  }
  return result;
}
Program: 51433
Project: 51433
Buggy source:
public void testPooledConnectionWithProperties() throws SQLException {
  final String connectString=MondrianProperties.instance().TestConnectString.get();
  Util.PropertyList properties=Util.parseConnectString(connectString);
  final String jdbc=properties.get("String_Node_Str");
  if (jdbc != null && !jdbc.startsWith("String_Node_Str")) {
    return;
  }
  properties.put("String_Node_Str","String_Node_Str");
  DataSource dataSource=RolapConnection.createDataSource(properties);
  Connection connection=null;
  try {
    connection=dataSource.getConnection();
    connection.close();
    fail("String_Node_Str");
  }
 catch (  SQLException e) {
    if (e.getClass().getName().equals("String_Node_Str")) {
    }
 else     if (e.getClass() == SQLException.class && e.getCause() == null && e.getMessage() != null && e.getMessage().equals("String_Node_Str")) {
    }
 else {
      fail("String_Node_Str" + e);
    }
  }
 finally {
    RolapConnectionPool.instance().clearPool();
  }
}

Fixed version (ground truth):
public void testPooledConnectionWithProperties() throws SQLException {
  final String connectString=TestContext.getConnectString();
  Util.PropertyList properties=Util.parseConnectString(connectString);
  final String jdbc=properties.get("String_Node_Str");
  if (jdbc != null && !jdbc.startsWith("String_Node_Str")) {
    return;
  }
  properties.put("String_Node_Str","String_Node_Str");
  DataSource dataSource=RolapConnection.createDataSource(properties);
  Connection connection;
  try {
    connection=dataSource.getConnection();
    connection.close();
    fail("String_Node_Str");
  }
 catch (  SQLException e) {
    if (e.getClass().getName().equals("String_Node_Str")) {
    }
 else     if (e.getClass() == SQLException.class && e.getCause() == null && e.getMessage() != null && e.getMessage().equals("String_Node_Str")) {
    }
 else {
      fail("String_Node_Str" + e);
    }
  }
catch (  IllegalArgumentException e) {
    if (!System.getProperties().getProperty("String_Node_Str").startsWith("String_Node_Str")) {
      fail("String_Node_Str");
    }
  }
 finally {
    RolapConnectionPool.instance().clearPool();
  }
}
Program: 51434
Project: 51434
Buggy source:
public void testNonPooledConnectionWithProperties(){
  final String connectString=MondrianProperties.instance().TestConnectString.get();
  Util.PropertyList properties=Util.parseConnectString(connectString);
  final String jdbc=properties.get("String_Node_Str");
  if (jdbc != null && !jdbc.startsWith("String_Node_Str")) {
    return;
  }
  properties.put("String_Node_Str","String_Node_Str");
  properties.put(RolapConnectionProperties.PoolNeeded,"String_Node_Str");
  DataSource dataSource=RolapConnection.createDataSource(properties);
  Connection connection=null;
  try {
    connection=dataSource.getConnection();
    connection.close();
    fail("String_Node_Str");
  }
 catch (  SQLException se) {
  }
}

Fixed version (ground truth):
public void testNonPooledConnectionWithProperties(){
  final String connectString=TestContext.getConnectString();
  Util.PropertyList properties=Util.parseConnectString(connectString);
  final String jdbc=properties.get("String_Node_Str");
  if (jdbc != null && !jdbc.startsWith("String_Node_Str")) {
    return;
  }
  properties.put("String_Node_Str","String_Node_Str");
  properties.put(RolapConnectionProperties.PoolNeeded,"String_Node_Str");
  DataSource dataSource=RolapConnection.createDataSource(properties);
  Connection connection;
  try {
    connection=dataSource.getConnection();
    connection.close();
    fail("String_Node_Str");
  }
 catch (  SQLException se) {
  }
catch (  IllegalArgumentException e) {
    if (!System.getProperties().getProperty("String_Node_Str").startsWith("String_Node_Str")) {
      fail("String_Node_Str");
    }
  }
}