Program: 199254
Project: 199254
Buggy source:
private RankingFuture validatePeople(NotificationRecord record){
  float affinity=NONE;
  Bundle extras=record.getNotification().extras;
  if (extras == null) {
    return null;
  }
  final String[] people=getExtraPeople(extras);
  if (people == null || people.length == 0) {
    return null;
  }
  if (INFO)   Slog.i(TAG,"String_Node_Str" + record.sbn.getKey());
  final LinkedList<String> pendingLookups=new LinkedList<String>();
  for (int personIdx=0; personIdx < people.length && personIdx < MAX_PEOPLE; personIdx++) {
    final String handle=people[personIdx];
    if (TextUtils.isEmpty(handle))     continue;
synchronized (mPeopleCache) {
      LookupResult lookupResult=mPeopleCache.get(handle);
      if (lookupResult == null || lookupResult.isExpired()) {
        pendingLookups.add(handle);
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + lookupResult.mId);
      }
      if (lookupResult != null) {
        affinity=Math.max(affinity,lookupResult.getAffinity());
      }
    }
  }
  record.setContactAffinity(affinity);
  if (pendingLookups.isEmpty()) {
    if (INFO)     Slog.i(TAG,"String_Node_Str" + affinity);
    return null;
  }
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + record.sbn.getKey());
  return new RankingFuture(record){
    @Override public void work(){
      if (INFO)       Slog.i(TAG,"String_Node_Str" + mRecord.sbn.getKey());
      float affinity=NONE;
      for (      final String handle : pendingLookups) {
        LookupResult lookupResult=null;
        final Uri uri=Uri.parse(handle);
        if ("String_Node_Str".equals(uri.getScheme())) {
          if (DEBUG)           Slog.d(TAG,"String_Node_Str" + handle);
          lookupResult=resolvePhoneContact(uri.getSchemeSpecificPart());
        }
 else         if ("String_Node_Str".equals(uri.getScheme())) {
          if (DEBUG)           Slog.d(TAG,"String_Node_Str" + handle);
          lookupResult=resolveEmailContact(uri.getSchemeSpecificPart());
        }
 else         if (handle.startsWith(Contacts.CONTENT_LOOKUP_URI.toString())) {
          if (DEBUG)           Slog.d(TAG,"String_Node_Str" + handle);
          lookupResult=searchContacts(uri);
        }
 else {
          lookupResult=new LookupResult();
          Slog.w(TAG,"String_Node_Str" + handle);
        }
        if (lookupResult != null) {
synchronized (mPeopleCache) {
            mPeopleCache.put(handle,lookupResult);
          }
          affinity=Math.max(affinity,lookupResult.getAffinity());
        }
      }
      float affinityBound=mRecord.getContactAffinity();
      affinity=Math.max(affinity,affinityBound);
      mRecord.setContactAffinity(affinity);
      if (INFO)       Slog.i(TAG,"String_Node_Str" + affinity);
    }
  }
;
}

Fixed version (ground truth):
private RankingReconsideration validatePeople(final NotificationRecord record){
  float affinity=NONE;
  Bundle extras=record.getNotification().extras;
  if (extras == null) {
    return null;
  }
  final String[] people=getExtraPeople(extras);
  if (people == null || people.length == 0) {
    return null;
  }
  if (INFO)   Slog.i(TAG,"String_Node_Str" + record.sbn.getKey());
  final LinkedList<String> pendingLookups=new LinkedList<String>();
  for (int personIdx=0; personIdx < people.length && personIdx < MAX_PEOPLE; personIdx++) {
    final String handle=people[personIdx];
    if (TextUtils.isEmpty(handle))     continue;
synchronized (mPeopleCache) {
      LookupResult lookupResult=mPeopleCache.get(handle);
      if (lookupResult == null || lookupResult.isExpired()) {
        pendingLookups.add(handle);
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + lookupResult.mId);
      }
      if (lookupResult != null) {
        affinity=Math.max(affinity,lookupResult.getAffinity());
      }
    }
  }
  record.setContactAffinity(affinity);
  if (pendingLookups.isEmpty()) {
    if (INFO)     Slog.i(TAG,"String_Node_Str" + affinity);
    return null;
  }
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + record.sbn.getKey());
  return new RankingReconsideration(record.getKey()){
    float mContactAffinity=NONE;
    @Override public void work(){
      if (INFO)       Slog.i(TAG,"String_Node_Str" + record.getKey());
      for (      final String handle : pendingLookups) {
        LookupResult lookupResult=null;
        final Uri uri=Uri.parse(handle);
        if ("String_Node_Str".equals(uri.getScheme())) {
          if (DEBUG)           Slog.d(TAG,"String_Node_Str" + handle);
          lookupResult=resolvePhoneContact(uri.getSchemeSpecificPart());
        }
 else         if ("String_Node_Str".equals(uri.getScheme())) {
          if (DEBUG)           Slog.d(TAG,"String_Node_Str" + handle);
          lookupResult=resolveEmailContact(uri.getSchemeSpecificPart());
        }
 else         if (handle.startsWith(Contacts.CONTENT_LOOKUP_URI.toString())) {
          if (DEBUG)           Slog.d(TAG,"String_Node_Str" + handle);
          lookupResult=searchContacts(uri);
        }
 else {
          lookupResult=new LookupResult();
          Slog.w(TAG,"String_Node_Str" + handle);
        }
        if (lookupResult != null) {
synchronized (mPeopleCache) {
            mPeopleCache.put(handle,lookupResult);
          }
          mContactAffinity=Math.max(mContactAffinity,lookupResult.getAffinity());
        }
      }
    }
    @Override public void applyChangesLocked(    NotificationRecord operand){
      float affinityBound=operand.getContactAffinity();
      operand.setContactAffinity(Math.max(mContactAffinity,affinityBound));
      if (INFO)       Slog.i(TAG,"String_Node_Str" + operand.getContactAffinity());
    }
  }
;
}