Program: 69410
Project: 69410
Buggy source:
private boolean getUsersStatisticsInfos(SearchCoachedIdentityParams params,Map<Long,StudentStatEntry> map,List<UserPropertyHandler> userPropertyHandlers){
  NativeQueryBuilder sb=new NativeQueryBuilder(1024,dbInstance);
  Map<String,Object> queryParams=new HashMap<>();
  sb.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
  writeUserProperties("String_Node_Str",sb,userPropertyHandlers);
  sb.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(RepositoryEntry.ACC_OWNERS).append("String_Node_Str");
  appendUsersStatisticsSearchParams(params,queryParams,sb).append("String_Node_Str");
  Query query=dbInstance.getCurrentEntityManager().createNativeQuery(sb.toString());
  for (  Map.Entry<String,Object> entry : queryParams.entrySet()) {
    query.setParameter(entry.getKey(),entry.getValue());
  }
  List<?> rawList=query.getResultList();
  int numOfProperties=userPropertyHandlers.size();
  for (  Object rawObject : rawList) {
    Object[] rawStat=(Object[])rawObject;
    int pos=0;
    Long identityKey=((Number)rawStat[pos++]).longValue();
    String identityName=(String)rawStat[pos++];
    ((Number)rawStat[pos++]).longValue();
    String[] userProperties=new String[numOfProperties];
    for (int i=0; i < numOfProperties; i++) {
      userProperties[i]=(String)rawStat[pos++];
    }
    StudentStatEntry entry=new StudentStatEntry(identityKey,identityName,userProperties);
    entry.setCountRepo(((Number)rawStat[pos++]).intValue());
    entry.setInitialLaunch(((Number)rawStat[pos++]).intValue());
    map.put(identityKey,entry);
  }
  return rawList.size() > 0;
}

Fixed version (ground truth):
private boolean getUsersStatisticsInfos(SearchCoachedIdentityParams params,Map<Long,StudentStatEntry> map,List<UserPropertyHandler> userPropertyHandlers){
  NativeQueryBuilder sb=new NativeQueryBuilder(1024,dbInstance);
  Map<String,Object> queryParams=new HashMap<>();
  sb.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
  writeUserProperties("String_Node_Str",sb,userPropertyHandlers);
  sb.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(RepositoryEntry.ACC_OWNERS).append("String_Node_Str");
  appendUsersStatisticsSearchParams(params,queryParams,sb).append("String_Node_Str");
  if (dbInstance.isOracle()) {
    sb.append("String_Node_Str");
    writeUserPropertiesGroupBy("String_Node_Str",sb,userPropertyHandlers);
  }
  Query query=dbInstance.getCurrentEntityManager().createNativeQuery(sb.toString());
  for (  Map.Entry<String,Object> entry : queryParams.entrySet()) {
    query.setParameter(entry.getKey(),entry.getValue());
  }
  List<?> rawList=query.getResultList();
  int numOfProperties=userPropertyHandlers.size();
  for (  Object rawObject : rawList) {
    Object[] rawStat=(Object[])rawObject;
    int pos=0;
    Long identityKey=((Number)rawStat[pos++]).longValue();
    String identityName=(String)rawStat[pos++];
    ((Number)rawStat[pos++]).longValue();
    String[] userProperties=new String[numOfProperties];
    for (int i=0; i < numOfProperties; i++) {
      userProperties[i]=(String)rawStat[pos++];
    }
    StudentStatEntry entry=new StudentStatEntry(identityKey,identityName,userProperties);
    entry.setCountRepo(((Number)rawStat[pos++]).intValue());
    entry.setInitialLaunch(((Number)rawStat[pos++]).intValue());
    map.put(identityKey,entry);
  }
  return rawList.size() > 0;
}