Program: 51204
Project: 51204
Buggy source:
NativeEvaluator createEvaluator(RolapEvaluator evaluator,FunDef fun,Exp[] args){
  if (!isEnabled()) {
    return null;
  }
  RolapCube cube=(RolapCube)evaluator.getCube();
  CrossJoinArg[] cargs=checkCrossJoin(evaluator,fun,args);
  if (cargs == null) {
    alertCrossJoinNonNative(evaluator,fun,"String_Node_Str");
    return null;
  }
  int countNonNativeInputArg=0;
  for (  CrossJoinArg arg : cargs) {
    if (arg instanceof MemberListCrossJoinArg) {
      MemberListCrossJoinArg cjArg=(MemberListCrossJoinArg)arg;
      if (cjArg.hasAllMember() || cjArg.hasCalcMembers()) {
        countNonNativeInputArg++;
      }
    }
  }
  if (countNonNativeInputArg == 2) {
    alertCrossJoinNonNative(evaluator,fun,"String_Node_Str");
    return null;
  }
  if (isPreferInterpreter(cargs,true)) {
    return null;
  }
  RolapLevel[] levels=new RolapLevel[cargs.length];
  for (int i=0; i < cargs.length; i++) {
    levels[i]=cargs[i].getLevel();
  }
  if ((cube.isVirtual() && !evaluator.getQuery().nativeCrossJoinVirtualCube())) {
    alertCrossJoinNonNative(evaluator,fun,"String_Node_Str");
    return null;
  }
  if (!NonEmptyCrossJoinConstraint.isValidContext(evaluator,false,levels)) {
    return null;
  }
  if (!evaluator.isNonEmpty())   return null;
  LOGGER.debug("String_Node_Str");
  evaluator=evaluator.push();
  Member[] evalMembers=(Member[])evaluator.getMembers().clone();
  for (  RolapLevel level : levels) {
    RolapHierarchy hierarchy=level.getHierarchy();
    for (int i=0; i < evalMembers.length; ++i) {
      Dimension evalMemberDimension=evalMembers[i].getHierarchy().getDimension();
      if (evalMemberDimension == hierarchy.getDimension()) {
        evalMembers[i]=hierarchy.getAllMember();
      }
    }
  }
  evaluator.setContext(evalMembers);
  TupleConstraint constraint=new NonEmptyCrossJoinConstraint(cargs,evaluator);
  SchemaReader schemaReader=evaluator.getSchemaReader();
  return new SetEvaluator(cargs,schemaReader,constraint);
}

Fixed version (ground truth):
NativeEvaluator createEvaluator(RolapEvaluator evaluator,FunDef fun,Exp[] args){
  if (!isEnabled()) {
    return null;
  }
  RolapCube cube=evaluator.getCube();
  CrossJoinArg[] cargs=checkCrossJoin(evaluator,fun,args);
  if (cargs == null) {
    alertCrossJoinNonNative(evaluator,fun,"String_Node_Str");
    return null;
  }
  int countNonNativeInputArg=0;
  for (  CrossJoinArg arg : cargs) {
    if (arg instanceof MemberListCrossJoinArg) {
      MemberListCrossJoinArg cjArg=(MemberListCrossJoinArg)arg;
      if (cjArg.hasAllMember() || cjArg.hasCalcMembers()) {
        ++countNonNativeInputArg;
      }
    }
  }
  if (countNonNativeInputArg == cargs.length) {
    alertCrossJoinNonNative(evaluator,fun,"String_Node_Str");
    return null;
  }
  if (isPreferInterpreter(cargs,true)) {
    return null;
  }
  RolapLevel[] levels=new RolapLevel[cargs.length];
  for (int i=0; i < cargs.length; i++) {
    levels[i]=cargs[i].getLevel();
  }
  if ((cube.isVirtual() && !evaluator.getQuery().nativeCrossJoinVirtualCube())) {
    alertCrossJoinNonNative(evaluator,fun,"String_Node_Str");
    return null;
  }
  if (!NonEmptyCrossJoinConstraint.isValidContext(evaluator,false,levels)) {
    return null;
  }
  if (!evaluator.isNonEmpty()) {
    return null;
  }
  LOGGER.debug("String_Node_Str");
  evaluator=evaluator.push();
  Member[] evalMembers=evaluator.getMembers().clone();
  for (  RolapLevel level : levels) {
    RolapHierarchy hierarchy=level.getHierarchy();
    for (int i=0; i < evalMembers.length; ++i) {
      Dimension evalMemberDimension=evalMembers[i].getHierarchy().getDimension();
      if (evalMemberDimension == hierarchy.getDimension()) {
        evalMembers[i]=hierarchy.getAllMember();
      }
    }
  }
  evaluator.setContext(evalMembers);
  TupleConstraint constraint=new NonEmptyCrossJoinConstraint(cargs,evaluator);
  SchemaReader schemaReader=evaluator.getSchemaReader();
  return new SetEvaluator(cargs,schemaReader,constraint);
}