Program: 60507
Project: 60507
Buggy source:
/** 
 * Creates a child injector that binds the args, and returns the binding for the method's result.
 */
public Binding<?> getBindingFromNewInjector(final Method method,final Object[] args,final AssistData data){
  checkState(injector != null,"String_Node_Str");
  final Key<?> returnType=data.returnType;
  final Key<?> assistedReturnType=Key.get(returnType.getTypeLiteral(),Assisted.class);
  Module assistedModule=new AbstractModule(){
    @SuppressWarnings("String_Node_Str") protected void configure(){
      Binder binder=binder().withSource(method);
      int p=0;
      if (!data.optimized) {
        for (        Key<?> paramKey : data.paramTypes) {
          binder.bind((Key)paramKey).toProvider(Providers.of(args[p++]));
        }
      }
 else {
        for (        Key<?> paramKey : data.paramTypes) {
          binder.bind((Key)paramKey).toProvider(data.providers.get(p++));
        }
      }
      Constructor<?> constructor=data.constructor;
      if (injector.getExistingBinding(returnType) != null) {
        constructor=null;
      }
      TypeLiteral<?> implementation=collector.getBindings().get(returnType);
      if (implementation != null) {
        if (constructor == null) {
          binder.bind(assistedReturnType).to((TypeLiteral)implementation);
        }
 else {
          binder.bind(assistedReturnType).toConstructor((Constructor)constructor,(TypeLiteral)implementation);
        }
      }
 else {
        if (constructor == null) {
          binder.bind(assistedReturnType).to((Key)returnType);
        }
 else {
          binder.bind(assistedReturnType).toConstructor((Constructor)constructor);
        }
      }
    }
  }
;
  Injector forCreate=injector.createChildInjector(assistedModule);
  Binding binding=forCreate.getBinding(assistedReturnType);
  if (data.optimized) {
    data.cachedBinding=binding;
  }
  return binding;
}

Fixed version (ground truth):
/** 
 * Creates a child injector that binds the args, and returns the binding for the method's result.
 */
public Binding<?> getBindingFromNewInjector(final Method method,final Object[] args,final AssistData data){
  checkState(injector != null,"String_Node_Str");
  final Key<?> returnType=data.returnType;
  final Key<?> assistedReturnType=Key.get(returnType.getTypeLiteral(),Assisted.class);
  Module assistedModule=new AbstractModule(){
    @SuppressWarnings("String_Node_Str") protected void configure(){
      Binder binder=binder().withSource(method);
      int p=0;
      if (!data.optimized) {
        for (        Key<?> paramKey : data.paramTypes) {
          binder.bind((Key)paramKey).toProvider(Providers.of(args[p++]));
        }
      }
 else {
        for (        Key<?> paramKey : data.paramTypes) {
          binder.bind((Key)paramKey).toProvider(data.providers.get(p++));
        }
      }
      Constructor<?> constructor=data.constructor;
      if (injector.getExistingBinding(returnType) != null) {
        constructor=null;
      }
      TypeLiteral<?> implementation=collector.getBindings().get(returnType);
      if (implementation != null) {
        if (constructor == null) {
          binder.bind(assistedReturnType).to((TypeLiteral)implementation);
        }
 else {
          binder.bind(assistedReturnType).toConstructor((Constructor)constructor,(TypeLiteral)implementation);
        }
      }
 else {
        if (constructor == null) {
          binder.bind(assistedReturnType).to((Key)returnType);
        }
 else {
          binder.bind(assistedReturnType).toConstructor((Constructor)constructor,(TypeLiteral)returnType.getTypeLiteral());
        }
      }
    }
  }
;
  Injector forCreate=injector.createChildInjector(assistedModule);
  Binding binding=forCreate.getBinding(assistedReturnType);
  if (data.optimized) {
    data.cachedBinding=binding;
  }
  return binding;
}