Program: 60568
Project: 60568
Buggy source:
/** 
 * Creates a binding for an injectable type with the given scope. Looks for a scope on the type if none is specified. TODO(jessewilson): Fix raw types! this method makes a binding for   {@code Foo} from a requestfor  {@code Foo<String>}
 * @param type the raw type for {@code key}
 */
<T>BindingImpl<T> createUnitializedBinding(Key<T> key,Class<T> type,Scope scope,Object source,LoadStrategy loadStrategy,Errors errors) throws ErrorsException {
  if (type.isArray() || type.isEnum()) {
    throw errors.missingImplementation(type).toException();
  }
  ImplementedBy implementedBy=type.getAnnotation(ImplementedBy.class);
  if (implementedBy != null) {
    return createImplementedByBinding(type,implementedBy,loadStrategy,errors);
  }
  ProvidedBy providedBy=type.getAnnotation(ProvidedBy.class);
  if (providedBy != null) {
    return createProvidedByBinding(type,providedBy,loadStrategy,errors);
  }
  if (Modifier.isAbstract(type.getModifiers())) {
    throw errors.missingImplementation(key).toException();
  }
  if (Classes.isInnerClass(type)) {
    throw errors.cannotInjectInnerClass(type).toException();
  }
  if (scope == null) {
    Class<? extends Annotation> scopeAnnotation=Scopes.findScopeAnnotation(errors,type);
    if (scopeAnnotation != null) {
      scope=scopes.get(scopeAnnotation);
      if (scope == null) {
        errors.withSource(StackTraceElements.forType(type)).scopeNotFound(scopeAnnotation);
      }
    }
  }
  Key<T> keyForRawType=Key.get(type);
  LateBoundConstructor<T> lateBoundConstructor=new LateBoundConstructor<T>();
  InternalFactory<? extends T> scopedFactory=Scopes.scope(keyForRawType,this,lateBoundConstructor,scope);
  return new ClassBindingImpl<T>(this,keyForRawType,source,scopedFactory,scope,lateBoundConstructor,loadStrategy);
}

Fixed version (ground truth):
/** 
 * Creates a binding for an injectable type with the given scope. Looks for a scope on the type if none is specified. TODO(jessewilson): Fix raw types! this method makes a binding for   {@code Foo} from a requestfor  {@code Foo<String>}
 * @param type the raw type for {@code key}
 */
<T>BindingImpl<T> createUnitializedBinding(Key<T> key,Class<T> type,Scope scope,Object source,LoadStrategy loadStrategy,Errors errors) throws ErrorsException {
  if (type.isArray() || type.isEnum()) {
    throw errors.missingImplementation(type).toException();
  }
  ImplementedBy implementedBy=type.getAnnotation(ImplementedBy.class);
  if (implementedBy != null) {
    Scopes.checkForMisplacedScopeAnnotations(type,source,errors);
    return createImplementedByBinding(type,scope,implementedBy,loadStrategy,errors);
  }
  ProvidedBy providedBy=type.getAnnotation(ProvidedBy.class);
  if (providedBy != null) {
    Scopes.checkForMisplacedScopeAnnotations(type,source,errors);
    return createProvidedByBinding(type,scope,providedBy,loadStrategy,errors);
  }
  if (Modifier.isAbstract(type.getModifiers())) {
    throw errors.missingImplementation(key).toException();
  }
  if (Classes.isInnerClass(type)) {
    throw errors.cannotInjectInnerClass(type).toException();
  }
  if (scope == null) {
    Class<? extends Annotation> scopeAnnotation=Scopes.findScopeAnnotation(errors,type);
    if (scopeAnnotation != null) {
      scope=scopes.get(scopeAnnotation);
      if (scope == null) {
        errors.withSource(StackTraceElements.forType(type)).scopeNotFound(scopeAnnotation);
      }
    }
  }
  Key<T> keyForRawType=Key.get(type);
  LateBoundConstructor<T> lateBoundConstructor=new LateBoundConstructor<T>();
  InternalFactory<? extends T> scopedFactory=Scopes.scope(keyForRawType,this,lateBoundConstructor,scope);
  return new ClassBindingImpl<T>(this,keyForRawType,source,scopedFactory,scope,lateBoundConstructor,loadStrategy);
}