Program: 27708
Project: 27708
Buggy source:
private EnvTypePair analyzeObjLitFwd(Node objLit,TypeEnv inEnv,JSType requiredType,JSType specializedType){
  if (NodeUtil.isEnumDecl(objLit.getParent().getParent())) {
    return analyzeEnumObjLitFwd(objLit,inEnv,requiredType);
  }
  JSDocInfo jsdoc=objLit.getJSDocInfo();
  boolean isStruct=jsdoc != null && jsdoc.makesStructs();
  boolean isDict=jsdoc != null && jsdoc.makesDicts();
  TypeEnv env=inEnv;
  JSType result=pickReqObjType(objLit);
  for (  Node prop : objLit.children()) {
    if (isStruct && prop.isQuotedString()) {
      warnings.add(JSError.make(prop,TypeCheck.ILLEGAL_OBJLIT_KEY,"String_Node_Str"));
    }
 else     if (isDict && !prop.isQuotedString()) {
      warnings.add(JSError.make(prop,TypeCheck.ILLEGAL_OBJLIT_KEY,"String_Node_Str"));
    }
    String pname=NodeUtil.getObjectLitKeyName(prop);
    if (prop.isGetterDef() || prop.isSetterDef()) {
      EnvTypePair pair=analyzeExprFwd(prop.getFirstChild(),env);
      FunctionType funType=pair.type.getFunType();
      Preconditions.checkNotNull(funType);
      String specialPropName;
      JSType propType;
      if (prop.isGetterDef()) {
        specialPropName=GETTER_PREFIX + pname;
        propType=funType.getReturnType();
      }
 else {
        specialPropName=SETTER_PREFIX + pname;
        propType=pair.type;
      }
      result=result.withProperty(new QualifiedName(specialPropName),propType);
      env=pair.env;
    }
 else {
      QualifiedName qname=new QualifiedName(pname);
      JSType jsdocType=symbolTable.getPropDeclaredType(prop);
      JSType reqPtype, specPtype;
      if (jsdocType != null) {
        reqPtype=specPtype=jsdocType;
      }
 else       if (requiredType.mayHaveProp(qname)) {
        reqPtype=specPtype=requiredType.getProp(qname);
        if (specializedType.mayHaveProp(qname)) {
          specPtype=specializedType.getProp(qname);
        }
      }
 else {
        reqPtype=specPtype=JSType.UNKNOWN;
      }
      EnvTypePair pair=analyzeExprFwd(prop.getFirstChild(),env,reqPtype,specPtype);
      if (jsdocType != null) {
        result=result.withDeclaredProperty(qname,jsdocType,false);
        if (!pair.type.isSubtypeOf(jsdocType)) {
          warnings.add(JSError.make(prop,INVALID_OBJLIT_PROPERTY_TYPE,jsdocType.toString(),pair.type.toString()));
          pair.type=jsdocType;
        }
      }
      result=result.withProperty(qname,pair.type);
      env=pair.env;
    }
  }
  return new EnvTypePair(env,result);
}

Fixed version (ground truth):
private EnvTypePair analyzeObjLitFwd(Node objLit,TypeEnv inEnv,JSType requiredType,JSType specializedType){
  if (NodeUtil.isEnumDecl(objLit.getParent())) {
    return analyzeEnumObjLitFwd(objLit,inEnv,requiredType);
  }
  JSDocInfo jsdoc=objLit.getJSDocInfo();
  boolean isStruct=jsdoc != null && jsdoc.makesStructs();
  boolean isDict=jsdoc != null && jsdoc.makesDicts();
  TypeEnv env=inEnv;
  JSType result=pickReqObjType(objLit);
  for (  Node prop : objLit.children()) {
    if (isStruct && prop.isQuotedString()) {
      warnings.add(JSError.make(prop,TypeCheck.ILLEGAL_OBJLIT_KEY,"String_Node_Str"));
    }
 else     if (isDict && !prop.isQuotedString()) {
      warnings.add(JSError.make(prop,TypeCheck.ILLEGAL_OBJLIT_KEY,"String_Node_Str"));
    }
    String pname=NodeUtil.getObjectLitKeyName(prop);
    if (prop.isGetterDef() || prop.isSetterDef()) {
      EnvTypePair pair=analyzeExprFwd(prop.getFirstChild(),env);
      FunctionType funType=pair.type.getFunType();
      Preconditions.checkNotNull(funType);
      String specialPropName;
      JSType propType;
      if (prop.isGetterDef()) {
        specialPropName=GETTER_PREFIX + pname;
        propType=funType.getReturnType();
      }
 else {
        specialPropName=SETTER_PREFIX + pname;
        propType=pair.type;
      }
      result=result.withProperty(new QualifiedName(specialPropName),propType);
      env=pair.env;
    }
 else {
      QualifiedName qname=new QualifiedName(pname);
      JSType jsdocType=symbolTable.getPropDeclaredType(prop);
      JSType reqPtype, specPtype;
      if (jsdocType != null) {
        reqPtype=specPtype=jsdocType;
      }
 else       if (requiredType.mayHaveProp(qname)) {
        reqPtype=specPtype=requiredType.getProp(qname);
        if (specializedType.mayHaveProp(qname)) {
          specPtype=specializedType.getProp(qname);
        }
      }
 else {
        reqPtype=specPtype=JSType.UNKNOWN;
      }
      EnvTypePair pair=analyzeExprFwd(prop.getFirstChild(),env,reqPtype,specPtype);
      if (jsdocType != null) {
        result=result.withDeclaredProperty(qname,jsdocType,false);
        if (!pair.type.isSubtypeOf(jsdocType)) {
          warnings.add(JSError.make(prop,INVALID_OBJLIT_PROPERTY_TYPE,jsdocType.toString(),pair.type.toString()));
          pair.type=jsdocType;
        }
      }
      result=result.withProperty(qname,pair.type);
      env=pair.env;
    }
  }
  return new EnvTypePair(env,result);
}