Program: 111892
Project: 111892
Buggy source:
private CallImplementor createImplementor(final NotNullImplementor implementor,final NullPolicy nullPolicy,final boolean harmonize){
switch (nullPolicy) {
case ANY:
case STRICT:
    return new CallImplementor(){
      public Expression implement(      RexToLixTranslator translator,      RexCall call,      NullAs nullAs){
        return implementNullSemantics0(translator,call,nullAs,nullPolicy,harmonize,implementor);
      }
    }
;
case AND:
  return new CallImplementor(){
    public Expression implement(    RexToLixTranslator translator,    RexCall call,    NullAs nullAs){
      final RexCall call2=call2(false,translator,call);
      final List<Expression> expressions=translator.translateList(call2.getOperandList(),nullAs);
      return JavaRules.EnumUtil.foldAnd(expressions);
    }
  }
;
case OR:
return new CallImplementor(){
  public Expression implement(  RexToLixTranslator translator,  RexCall call,  NullAs nullAs){
    final RexCall call2=call2(harmonize,translator,call);
    final Expression t0=translator.translate(call2.getOperandList().get(0));
    final Expression t1=translator.translate(call2.getOperandList().get(1));
    if (!nullable(call2,0) && !nullable(call2,1)) {
      return Expressions.orElse(t0,t1);
    }
    return optimize(Expressions.condition(Expressions.equal(t0,NULL_EXPR),Expressions.condition(Expressions.orElse(Expressions.equal(t1,NULL_EXPR),Expressions.not(t1)),NULL_EXPR,BOXED_TRUE_EXPR),Expressions.condition(Expressions.not(t0),t1,BOXED_TRUE_EXPR)));
  }
}
;
case NONE:
return new CallImplementor(){
public Expression implement(RexToLixTranslator translator,RexCall call,NullAs nullAs){
  final RexCall call2=call2(false,translator,call);
  return implementCall(translator,call2,implementor,nullAs);
}
}
;
default :
throw new AssertionError(nullPolicy);
}
}

Fixed version (ground truth):
private CallImplementor createImplementor(final NotNullImplementor implementor,final NullPolicy nullPolicy,final boolean harmonize){
switch (nullPolicy) {
case ANY:
case STRICT:
    return new CallImplementor(){
      public Expression implement(      RexToLixTranslator translator,      RexCall call,      NullAs nullAs){
        return implementNullSemantics0(translator,call,nullAs,nullPolicy,harmonize,implementor);
      }
    }
;
case AND:
  return new CallImplementor(){
    public Expression implement(    RexToLixTranslator translator,    RexCall call,    NullAs nullAs){
      final RexCall call2=call2(false,translator,call);
      final List<Expression> expressions=translator.translateList(call2.getOperandList(),nullAs);
      return Expressions.foldAnd(expressions);
    }
  }
;
case OR:
return new CallImplementor(){
  public Expression implement(  RexToLixTranslator translator,  RexCall call,  NullAs nullAs){
    final RexCall call2=call2(harmonize,translator,call);
    final Expression t0=translator.translate(call2.getOperandList().get(0));
    final Expression t1=translator.translate(call2.getOperandList().get(1));
    if (!nullable(call2,0) && !nullable(call2,1)) {
      return Expressions.orElse(t0,t1);
    }
    return optimize(Expressions.condition(Expressions.equal(t0,NULL_EXPR),Expressions.condition(Expressions.orElse(Expressions.equal(t1,NULL_EXPR),Expressions.not(t1)),NULL_EXPR,BOXED_TRUE_EXPR),Expressions.condition(Expressions.not(t0),t1,BOXED_TRUE_EXPR)));
  }
}
;
case NONE:
return new CallImplementor(){
public Expression implement(RexToLixTranslator translator,RexCall call,NullAs nullAs){
  final RexCall call2=call2(false,translator,call);
  return implementCall(translator,call2,implementor,nullAs);
}
}
;
default :
throw new AssertionError(nullPolicy);
}
}