Program: 51119
Project: 51119
Buggy source:
public List evaluateList(Evaluator evaluator){
  final Evaluator evaluator2=evaluator.push();
  if (tupleIn) {
    final Iterable<Member[]> iterable1=tupleIterCalc1.evaluateTupleIterable(evaluator);
    if (tupleOut) {
      List<Member[]> result=new ArrayList<Member[]>();
      if (all) {
        for (        Member[] members : iterable1) {
          evaluator2.setContext(members);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          result.addAll(result2);
        }
      }
 else {
        final Set<List<Member>> emitted=new HashSet<List<Member>>();
        for (        Member[] members : iterable1) {
          evaluator2.setContext(members);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          addDistinctTuples(result,result2,emitted);
        }
      }
      return result;
    }
 else {
      List<Member> result=new ArrayList<Member>();
      final Set<Member> emitted=all ? null : new HashSet<Member>();
      for (      Member[] members : iterable1) {
        evaluator2.setContext(members);
        final List<Member> result2=memberListCalc2.evaluateMemberList(evaluator2);
        if (emitted != null) {
          addDistinctMembers(result,result2,emitted);
        }
 else {
          result.addAll(result2);
        }
      }
      return result;
    }
  }
 else {
    final Iterable<Member> iterable1=memberIterCalc1.evaluateMemberIterable(evaluator);
    if (tupleOut) {
      List<Member[]> result=new ArrayList<Member[]>();
      if (all) {
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          result.addAll(result2);
        }
      }
 else {
        final Set<List<Member>> emitted=new HashSet<List<Member>>();
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          addDistinctTuples(result,result2,emitted);
        }
      }
      return result;
    }
 else {
      List<Member> result=new ArrayList<Member>();
      if (all) {
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member> result2=memberListCalc2.evaluateMemberList(evaluator2);
          result.addAll(result2);
        }
      }
 else {
        final Set<Member> emitted=new HashSet<Member>();
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member> result2=memberListCalc2.evaluateMemberList(evaluator2);
          addDistinctMembers(result,result2,emitted);
        }
      }
      return result;
    }
  }
}

Fixed version (ground truth):
public List evaluateList(Evaluator evaluator){
  evaluator=evaluator.push(false);
  final Evaluator evaluator2=evaluator.push();
  if (tupleIn) {
    final Iterable<Member[]> iterable1=tupleIterCalc1.evaluateTupleIterable(evaluator);
    if (tupleOut) {
      List<Member[]> result=new ArrayList<Member[]>();
      if (all) {
        for (        Member[] members : iterable1) {
          evaluator2.setContext(members);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          result.addAll(result2);
        }
      }
 else {
        final Set<List<Member>> emitted=new HashSet<List<Member>>();
        for (        Member[] members : iterable1) {
          evaluator2.setContext(members);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          addDistinctTuples(result,result2,emitted);
        }
      }
      return result;
    }
 else {
      List<Member> result=new ArrayList<Member>();
      final Set<Member> emitted=all ? null : new HashSet<Member>();
      for (      Member[] members : iterable1) {
        evaluator2.setContext(members);
        final List<Member> result2=memberListCalc2.evaluateMemberList(evaluator2);
        if (emitted != null) {
          addDistinctMembers(result,result2,emitted);
        }
 else {
          result.addAll(result2);
        }
      }
      return result;
    }
  }
 else {
    final Iterable<Member> iterable1=memberIterCalc1.evaluateMemberIterable(evaluator);
    if (tupleOut) {
      List<Member[]> result=new ArrayList<Member[]>();
      if (all) {
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          result.addAll(result2);
        }
      }
 else {
        final Set<List<Member>> emitted=new HashSet<List<Member>>();
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member[]> result2=tupleListCalc2.evaluateTupleList(evaluator2);
          addDistinctTuples(result,result2,emitted);
        }
      }
      return result;
    }
 else {
      List<Member> result=new ArrayList<Member>();
      if (all) {
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member> result2=memberListCalc2.evaluateMemberList(evaluator2);
          result.addAll(result2);
        }
      }
 else {
        final Set<Member> emitted=new HashSet<Member>();
        for (        Member member : iterable1) {
          evaluator2.setContext(member);
          final List<Member> result2=memberListCalc2.evaluateMemberList(evaluator2);
          addDistinctMembers(result,result2,emitted);
        }
      }
      return result;
    }
  }
}