Program: 27249
Project: 27249
Buggy source:
/** 
 * Build a property scope for the given symbol. Any properties of the symbol will be added to the property scope. It is important that property scopes are created in order from the leaves up to the root, so this should only be called from #fillPropertyScopes. If you try to create a property scope for a parent before its leaf, then the leaf will get cut and re-added to the parent property scope, and weird things will happen.
 */
private void createPropertyScopeFor(Symbol s){
  if (s.propertyScope != null) {
    return;
  }
  SymbolScope parentPropertyScope=null;
  ObjectType type=getType(s) == null ? null : getType(s).toObjectType();
  if (type == null) {
    return;
  }
  ObjectType proto=type.getParentScope();
  if (proto != null && proto != type && proto.getConstructor() != null) {
    Symbol parentSymbol=getSymbolForInstancesOf(proto.getConstructor());
    if (parentSymbol != null) {
      createPropertyScopeFor(parentSymbol);
      parentPropertyScope=parentSymbol.getPropertyScope();
    }
  }
  ObjectType instanceType=type;
  Iterable<String> propNames=type.getOwnPropertyNames();
  if (instanceType.isFunctionPrototypeType()) {
    if (instanceType.getOwnerFunction().hasInstanceType()) {
      instanceType=instanceType.getOwnerFunction().getInstanceType();
      propNames=Iterables.concat(propNames,instanceType.getOwnPropertyNames());
    }
  }
  s.setPropertyScope(new SymbolScope(null,parentPropertyScope,type,s));
  for (  String propName : propNames) {
    StaticSlot newProp=instanceType.getSlot(propName);
    if (newProp.getDeclaration() == null) {
      continue;
    }
    Symbol oldProp=symbols.get(newProp.getDeclaration().getNode(),s.getName() + "String_Node_Str" + propName);
    if (oldProp != null) {
      removeSymbol(oldProp);
    }
    if (symbols.get(newProp.getDeclaration().getNode(),newProp.getName()) != null) {
      if (logger.isLoggable(Level.FINE)) {
        logger.fine("String_Node_Str" + newProp);
      }
      continue;
    }
    Symbol newSym=copySymbolTo(newProp,s.propertyScope);
    if (oldProp != null) {
      if (newSym.getJSDocInfo() == null) {
        newSym.setJSDocInfo(oldProp.getJSDocInfo());
      }
      newSym.setPropertyScope(oldProp.propertyScope);
      for (      Reference ref : oldProp.references.values()) {
        newSym.defineReferenceAt(ref.getNode());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Build a property scope for the given symbol. Any properties of the symbol will be added to the property scope. <p>It is important that property scopes are created in order from the leaves up to the root, so this should only be called from #fillPropertyScopes. If you try to create a property scope for a parent before its leaf, then the leaf will get cut and re-added to the parent property scope, and weird things will happen.
 */
@SuppressWarnings("String_Node_Str") private void createPropertyScopeFor(Symbol s){
  if (s.propertyScope != null) {
    return;
  }
  SymbolScope parentPropertyScope=null;
  ObjectType type=getType(s) == null ? null : getType(s).toObjectType();
  if (type == null) {
    return;
  }
  ObjectType proto=type.getParentScope();
  if (proto != null && proto != type && proto.getConstructor() != null) {
    Symbol parentSymbol=getSymbolForInstancesOf(proto.getConstructor());
    if (parentSymbol != null) {
      createPropertyScopeFor(parentSymbol);
      parentPropertyScope=parentSymbol.getPropertyScope();
    }
  }
  ObjectType instanceType=type;
  Iterable<String> propNames=type.getOwnPropertyNames();
  if (instanceType.isFunctionPrototypeType()) {
    if (instanceType.getOwnerFunction().hasInstanceType()) {
      instanceType=instanceType.getOwnerFunction().getInstanceType();
      propNames=Iterables.concat(propNames,instanceType.getOwnPropertyNames());
    }
  }
  s.setPropertyScope(new SymbolScope(null,parentPropertyScope,type,s));
  for (  String propName : propNames) {
    StaticSlot newProp=instanceType.getSlot(propName);
    if (newProp.getDeclaration() == null) {
      continue;
    }
    Symbol oldProp=symbols.get(newProp.getDeclaration().getNode(),s.getName() + "String_Node_Str" + propName);
    if (oldProp != null) {
      removeSymbol(oldProp);
    }
    if (symbols.get(newProp.getDeclaration().getNode(),newProp.getName()) != null) {
      if (logger.isLoggable(Level.FINE)) {
        logger.fine("String_Node_Str" + newProp);
      }
      continue;
    }
    Symbol newSym=copySymbolTo(newProp,s.propertyScope);
    if (oldProp != null) {
      if (newSym.getJSDocInfo() == null) {
        newSym.setJSDocInfo(oldProp.getJSDocInfo());
      }
      newSym.setPropertyScope(oldProp.propertyScope);
      for (      Reference ref : oldProp.references.values()) {
        newSym.defineReferenceAt(ref.getNode());
      }
    }
  }
}