Program: 18633
Project: 18633
Buggy source:
/** 
 * Visits an object literal field definition <code>key : value</code>. If the <code>lvalue</code> is a prototype modification, we change the schema of the object type it is referring to.
 * @param t the traversal
 * @param key the assign node
 */
private void visitObjLitKey(NodeTraversal t,Node key,Node objlit){
  if (objlit.isFromExterns()) {
    ensureTyped(t,key);
    return;
  }
  Node rvalue=key.getFirstChild();
  JSType rightType=NodeUtil.getObjectLitKeyTypeFromValueType(key,getJSType(rvalue));
  if (rightType == null) {
    rightType=getNativeType(UNKNOWN_TYPE);
  }
  Node owner=objlit;
  JSType keyType=getJSType(key);
  JSType allowedValueType=keyType;
  if (allowedValueType.isEnumElementType()) {
    allowedValueType=allowedValueType.toMaybeEnumElementType().getPrimitiveType();
  }
  boolean valid=validator.expectCanAssignToPropertyOf(t,key,rightType,allowedValueType,owner,NodeUtil.getObjectLitKeyName(key));
  if (valid) {
    ensureTyped(t,key,rightType);
  }
 else {
    ensureTyped(t,key);
  }
  JSType objlitType=getJSType(objlit);
  ObjectType type=ObjectType.cast(objlitType.restrictByNotNullOrUndefined());
  if (type != null) {
    String property=NodeUtil.getObjectLitKeyName(key);
    if (type.hasProperty(property) && !type.isPropertyTypeInferred(property) && !propertyIsImplicitCast(type,property)) {
      validator.expectCanAssignToPropertyOf(t,key,keyType,type.getPropertyType(property),owner,property);
    }
    return;
  }
}

Fixed version (ground truth):
/** 
 * Visits an object literal field definition <code>key : value</code>. If the <code>lvalue</code> is a prototype modification, we change the schema of the object type it is referring to.
 * @param t the traversal
 * @param key the assign node
 */
private void visitObjLitKey(NodeTraversal t,Node key,Node objlit,JSType litType){
  if (objlit.isFromExterns()) {
    ensureTyped(t,key);
    return;
  }
  if (litType.isStruct() && key.isQuotedString()) {
    report(t,key,ILLEGAL_OBJLIT_KEY,"String_Node_Str");
  }
 else   if (litType.isDict() && !key.isQuotedString()) {
    report(t,key,ILLEGAL_OBJLIT_KEY,"String_Node_Str");
  }
  Node rvalue=key.getFirstChild();
  JSType rightType=NodeUtil.getObjectLitKeyTypeFromValueType(key,getJSType(rvalue));
  if (rightType == null) {
    rightType=getNativeType(UNKNOWN_TYPE);
  }
  Node owner=objlit;
  JSType keyType=getJSType(key);
  JSType allowedValueType=keyType;
  if (allowedValueType.isEnumElementType()) {
    allowedValueType=allowedValueType.toMaybeEnumElementType().getPrimitiveType();
  }
  boolean valid=validator.expectCanAssignToPropertyOf(t,key,rightType,allowedValueType,owner,NodeUtil.getObjectLitKeyName(key));
  if (valid) {
    ensureTyped(t,key,rightType);
  }
 else {
    ensureTyped(t,key);
  }
  JSType objlitType=getJSType(objlit);
  ObjectType type=ObjectType.cast(objlitType.restrictByNotNullOrUndefined());
  if (type != null) {
    String property=NodeUtil.getObjectLitKeyName(key);
    if (type.hasProperty(property) && !type.isPropertyTypeInferred(property) && !propertyIsImplicitCast(type,property)) {
      validator.expectCanAssignToPropertyOf(t,key,keyType,type.getPropertyType(property),owner,property);
    }
    return;
  }
}