Program: 27998
Project: 27998
Buggy source:
/** 
 * Infer the role of the function (whether it's a constructor or interface) and what it inherits from in JSDocInfo.
 */
FunctionTypeBuilder inferInheritance(@Nullable JSDocInfo info){
  if (info != null) {
    isConstructor=info.isConstructor();
    makesStructs=info.makesStructs();
    makesDicts=info.makesDicts();
    isInterface=info.isInterface();
    if (makesStructs && !isConstructor) {
      reportWarning(CONSTRUCTOR_REQUIRED,"String_Node_Str",fnName);
    }
 else     if (makesDicts && !isConstructor) {
      reportWarning(CONSTRUCTOR_REQUIRED,"String_Node_Str",fnName);
    }
    if (info.hasBaseType()) {
      if (isConstructor) {
        JSType maybeBaseType=info.getBaseType().evaluate(scope,typeRegistry);
        if (maybeBaseType != null && maybeBaseType.setValidator(new ExtendedTypeValidator())) {
          baseType=(ObjectType)maybeBaseType;
        }
      }
 else {
        reportWarning(EXTENDS_WITHOUT_TYPEDEF,fnName);
      }
    }
    if (isConstructor || isInterface) {
      implementedInterfaces=Lists.newArrayList();
      for (      JSTypeExpression t : info.getImplementedInterfaces()) {
        JSType maybeInterType=t.evaluate(scope,typeRegistry);
        if (maybeInterType != null && maybeInterType.setValidator(new ImplementedTypeValidator())) {
          implementedInterfaces.add((ObjectType)maybeInterType);
        }
      }
    }
 else     if (info.getImplementedInterfaceCount() > 0) {
      reportWarning(CONSTRUCTOR_REQUIRED,"String_Node_Str",fnName);
    }
    if (isInterface) {
      extendedInterfaces=Lists.newArrayList();
      for (      JSTypeExpression t : info.getExtendedInterfaces()) {
        JSType maybeInterfaceType=t.evaluate(scope,typeRegistry);
        if (maybeInterfaceType != null && maybeInterfaceType.setValidator(new ExtendedTypeValidator())) {
          extendedInterfaces.add((ObjectType)maybeInterfaceType);
        }
      }
    }
  }
  return this;
}

Fixed version (ground truth):
/** 
 * Infer the role of the function (whether it's a constructor or interface) and what it inherits from in JSDocInfo.
 */
FunctionTypeBuilder inferInheritance(@Nullable JSDocInfo info){
  if (info != null) {
    isConstructor=info.isConstructor();
    makesStructs=info.makesStructs();
    makesDicts=info.makesDicts();
    isInterface=info.isInterface();
    if (makesStructs && !isConstructor) {
      reportWarning(CONSTRUCTOR_REQUIRED,"String_Node_Str",fnName);
    }
 else     if (makesDicts && !isConstructor) {
      reportWarning(CONSTRUCTOR_REQUIRED,"String_Node_Str",fnName);
    }
    if (info.hasBaseType()) {
      if (isConstructor) {
        JSType maybeBaseType=info.getBaseType().evaluate(scope,typeRegistry);
        if (maybeBaseType != null && maybeBaseType.setValidator(new ExtendedTypeValidator())) {
          baseType=(ObjectType)maybeBaseType;
        }
      }
 else {
        reportWarning(EXTENDS_WITHOUT_TYPEDEF,fnName);
      }
    }
    if (info.getImplementedInterfaceCount() > 0) {
      if (isConstructor) {
        implementedInterfaces=Lists.newArrayList();
        for (        JSTypeExpression t : info.getImplementedInterfaces()) {
          JSType maybeInterType=t.evaluate(scope,typeRegistry);
          if (maybeInterType != null && maybeInterType.setValidator(new ImplementedTypeValidator())) {
            implementedInterfaces.add((ObjectType)maybeInterType);
          }
        }
      }
 else       if (isInterface) {
        reportWarning(TypeCheck.CONFLICTING_IMPLEMENTED_TYPE,fnName);
      }
 else {
        reportWarning(CONSTRUCTOR_REQUIRED,"String_Node_Str",fnName);
      }
    }
    if (isInterface) {
      extendedInterfaces=Lists.newArrayList();
      for (      JSTypeExpression t : info.getExtendedInterfaces()) {
        JSType maybeInterfaceType=t.evaluate(scope,typeRegistry);
        if (maybeInterfaceType != null && maybeInterfaceType.setValidator(new ExtendedTypeValidator())) {
          extendedInterfaces.add((ObjectType)maybeInterfaceType);
        }
      }
    }
  }
  return this;
}