Program: 51203
Project: 51203
Buggy source:
private IterCalc createCalc(Exp arg,ExpCompiler compiler,List<ResultStyle> resultStyles){
  final Type type=arg.getType();
  if (type instanceof SetType) {
    final Calc calc=compiler.compileAs(arg,null,resultStyles);
    final Type elementType=((SetType)type).getElementType();
    if (elementType instanceof MemberType) {
switch (calc.getResultStyle()) {
case ITERABLE:
        return new AbstractIterCalc(arg,new Calc[]{calc}){
          private final IterCalc iterCalc=(IterCalc)calc;
          public Iterable evaluateIterable(          Evaluator evaluator){
            return iterCalc.evaluateIterable(evaluator);
          }
          protected String getName(){
            return "String_Node_Str";
          }
        }
;
case LIST:
case MUTABLE_LIST:
      return new AbstractIterCalc(arg,new Calc[]{calc}){
        private final ListCalc listCalc=(ListCalc)calc;
        public Iterable evaluateIterable(        Evaluator evaluator){
          List result=new ArrayList();
          List<Member> list=listCalc.evaluateList(evaluator);
          for (          Member member : list) {
            if (member == null || member.isNull()) {
              continue;
            }
            result.add(member);
          }
          return result;
        }
        protected String getName(){
          return "String_Node_Str";
        }
      }
;
  }
  throw ResultStyleException.generateBadType(ResultStyle.ITERABLE_LIST_MUTABLELIST,calc.getResultStyle());
}
 else {
switch (calc.getResultStyle()) {
case ITERABLE:
    return new AbstractIterCalc(arg,new Calc[]{calc}){
      private final IterCalc iterCalc=(IterCalc)calc;
      public Iterable evaluateIterable(      Evaluator evaluator){
        return iterCalc.evaluateIterable(evaluator);
      }
      protected String getName(){
        return "String_Node_Str";
      }
    }
;
case LIST:
case MUTABLE_LIST:
  return new AbstractIterCalc(arg,new Calc[]{calc}){
    private final ListCalc listCalc=(ListCalc)calc;
    public Iterable evaluateIterable(    Evaluator evaluator){
      List result=new ArrayList();
      List<Member[]> list=listCalc.evaluateList(evaluator);
      list:       for (      Member[] members : list) {
        for (        Member member : members) {
          if (member == null || member.isNull()) {
            continue list;
          }
        }
        result.add(members);
      }
      return result;
    }
    protected String getName(){
      return "String_Node_Str";
    }
  }
;
}
throw ResultStyleException.generateBadType(ResultStyle.ITERABLE_LIST_MUTABLELIST,calc.getResultStyle());
}
}
 else if (TypeUtil.couldBeMember(type)) {
final MemberCalc memberCalc=compiler.compileMember(arg);
return new AbstractIterCalc(arg,new Calc[]{memberCalc}){
public Iterable evaluateIterable(Evaluator evaluator){
final Member member=memberCalc.evaluateMember(evaluator);
return new Iterable<Member>(){
  public Iterator<Member> iterator(){
    return new Iterator<Member>(){
      private Member m=member;
      public boolean hasNext(){
        return (m != null);
      }
      public Member next(){
        try {
          return m;
        }
  finally {
          m=null;
        }
      }
      public void remove(){
        throw new UnsupportedOperationException("String_Node_Str");
      }
    }
;
  }
}
;
}
protected String getName(){
return "String_Node_Str";
}
}
;
}
 else {
final TupleCalc tupleCalc=compiler.compileTuple(arg);
return new AbstractIterCalc(arg,new Calc[]{tupleCalc}){
public Iterable evaluateIterable(Evaluator evaluator){
final Member[] members=tupleCalc.evaluateTuple(evaluator);
return new Iterable<Member[]>(){
  public Iterator<Member[]> iterator(){
    return new Iterator<Member[]>(){
      private Member[] m=members;
      public boolean hasNext(){
        return (m != null);
      }
      public Member[] next(){
        try {
          return m;
        }
  finally {
          m=null;
        }
      }
      public void remove(){
        throw new UnsupportedOperationException("String_Node_Str");
      }
    }
;
  }
}
;
}
protected String getName(){
return "String_Node_Str";
}
}
;
}
}

Fixed version (ground truth):
private IterCalc createCalc(Exp arg,ExpCompiler compiler,List<ResultStyle> resultStyles){
  final Type type=arg.getType();
  if (type instanceof SetType) {
    final Calc calc=compiler.compileAs(arg,null,resultStyles);
    final Type elementType=((SetType)type).getElementType();
    if (elementType instanceof MemberType) {
switch (calc.getResultStyle()) {
case ITERABLE:
        return new AbstractIterCalc(arg,new Calc[]{calc}){
          private final IterCalc iterCalc=(IterCalc)calc;
          public Iterable evaluateIterable(          Evaluator evaluator){
            return iterCalc.evaluateIterable(evaluator);
          }
          protected String getName(){
            return "String_Node_Str";
          }
        }
;
case LIST:
case MUTABLE_LIST:
      return new AbstractIterCalc(arg,new Calc[]{calc}){
        private final ListCalc listCalc=(ListCalc)calc;
        public Iterable evaluateIterable(        Evaluator evaluator){
          List result=new ArrayList();
          List<Member> list=listCalc.evaluateList(evaluator);
          for (          Member member : list) {
            if (member == null || member.isNull()) {
              continue;
            }
            result.add(member);
          }
          return result;
        }
        protected String getName(){
          return "String_Node_Str";
        }
      }
;
  }
  throw ResultStyleException.generateBadType(ResultStyle.ITERABLE_LIST_MUTABLELIST,calc.getResultStyle());
}
 else {
switch (calc.getResultStyle()) {
case ITERABLE:
    return new AbstractIterCalc(arg,new Calc[]{calc}){
      private final IterCalc iterCalc=(IterCalc)calc;
      public Iterable evaluateIterable(      Evaluator evaluator){
        return iterCalc.evaluateIterable(evaluator);
      }
      protected String getName(){
        return "String_Node_Str";
      }
    }
;
case LIST:
case MUTABLE_LIST:
  return new AbstractIterCalc(arg,new Calc[]{calc}){
    private final ListCalc listCalc=(ListCalc)calc;
    public Iterable evaluateIterable(    Evaluator evaluator){
      List result=new ArrayList();
      List<Member[]> list=listCalc.evaluateList(evaluator);
      list:       for (      Member[] members : list) {
        for (        Member member : members) {
          if (member == null || member.isNull()) {
            continue list;
          }
        }
        result.add(members);
      }
      return result;
    }
    protected String getName(){
      return "String_Node_Str";
    }
  }
;
}
throw ResultStyleException.generateBadType(ResultStyle.ITERABLE_LIST_MUTABLELIST,calc.getResultStyle());
}
}
 else if (TypeUtil.couldBeMember(type)) {
final MemberCalc memberCalc=compiler.compileMember(arg);
final ResolvedFunCall call=wrapAsSet(arg);
return new AbstractIterCalc(call,new Calc[]{memberCalc}){
public Iterable evaluateIterable(Evaluator evaluator){
final Member member=memberCalc.evaluateMember(evaluator);
return new Iterable<Member>(){
  public Iterator<Member> iterator(){
    return new Iterator<Member>(){
      private Member m=member;
      public boolean hasNext(){
        return (m != null);
      }
      public Member next(){
        try {
          return m;
        }
  finally {
          m=null;
        }
      }
      public void remove(){
        throw new UnsupportedOperationException("String_Node_Str");
      }
    }
;
  }
}
;
}
protected String getName(){
return "String_Node_Str";
}
}
;
}
 else {
final TupleCalc tupleCalc=compiler.compileTuple(arg);
final ResolvedFunCall call=wrapAsSet(arg);
return new AbstractIterCalc(call,new Calc[]{tupleCalc}){
public Iterable evaluateIterable(Evaluator evaluator){
final Member[] members=tupleCalc.evaluateTuple(evaluator);
return new Iterable<Member[]>(){
  public Iterator<Member[]> iterator(){
    return new Iterator<Member[]>(){
      private Member[] m=members;
      public boolean hasNext(){
        return (m != null);
      }
      public Member[] next(){
        try {
          return m;
        }
  finally {
          m=null;
        }
      }
      public void remove(){
        throw new UnsupportedOperationException("String_Node_Str");
      }
    }
;
  }
}
;
}
protected String getName(){
return "String_Node_Str";
}
}
;
}
}