Program: 101140
Project: 101140
Buggy source:
@SuppressWarnings("String_Node_Str") public PageList find(Query q,Comparator sortComparator) throws Exception {
  SessionProvider sessionProvider=SessionProvider.createSystemProvider();
  StringBuilder builder=new StringBuilder("String_Node_Str" + DataMapper.EXO_REGISTRYENTRY_NT);
  String registryNodePath=regService_.getRegistry(sessionProvider).getNode().getPath();
  generateScript(builder,"String_Node_Str",registryNodePath + "String_Node_Str");
  generateScript(builder,DataMapper.EXO_DATA_TYPE,q.getClassType().getSimpleName());
  generateScript(builder,DataMapper.EXO_NAME,q.getName());
  generateScript(builder,DataMapper.EXO_OWNER_TYPE,q.getOwnerType());
  generateScript(builder,DataMapper.EXO_OWNER_ID,q.getOwnerId());
  Session session=regService_.getRegistry(sessionProvider).getNode().getSession();
  QueryManager queryManager=session.getWorkspace().getQueryManager();
  javax.jcr.query.Query query=queryManager.createQuery(builder.toString(),"String_Node_Str");
  QueryResult result=query.execute();
  ArrayList<Object> list=new ArrayList<Object>();
  NodeIterator itr=result.getNodes();
  while (itr.hasNext()) {
    Node node=itr.nextNode();
    String entryPath=node.getPath().substring(registryNodePath.length() + 1);
    RegistryEntry entry=regService_.getEntry(sessionProvider,entryPath);
    list.add(mapper_.fromDocument(entry.getDocument(),q.getClassType()));
  }
  sessionProvider.close();
  if (sortComparator != null)   Collections.sort(list,sortComparator);
  return new ObjectPageList(list,10);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public PageList find(Query q,Comparator sortComparator) throws Exception {
  SessionProvider sessionProvider=SessionProvider.createSystemProvider();
  StringBuilder builder=new StringBuilder("String_Node_Str" + DataMapper.EXO_REGISTRYENTRY_NT);
  String registryNodePath=regService_.getRegistry(sessionProvider).getNode().getPath();
  generateScript(builder,"String_Node_Str",registryNodePath + "String_Node_Str");
  generateScript(builder,DataMapper.EXO_DATA_TYPE,q.getClassType().getSimpleName());
  generateScript(builder,DataMapper.EXO_NAME,q.getName());
  generateScript(builder,DataMapper.EXO_OWNER_TYPE,q.getOwnerType());
  generateScript(builder,DataMapper.EXO_OWNER_ID,q.getOwnerId());
  try {
    Method method=q.getClassType().getMethod("String_Node_Str",null);
    if (method != null)     generateScript(builder,DataMapper.EXO_TITLE,q.getTitle());
  }
 catch (  Exception e) {
  }
  Session session=regService_.getRegistry(sessionProvider).getNode().getSession();
  QueryManager queryManager=session.getWorkspace().getQueryManager();
  javax.jcr.query.Query query=queryManager.createQuery(builder.toString(),"String_Node_Str");
  QueryResult result=query.execute();
  ArrayList<Object> list=new ArrayList<Object>();
  NodeIterator itr=result.getNodes();
  while (itr.hasNext()) {
    Node node=itr.nextNode();
    String entryPath=node.getPath().substring(registryNodePath.length() + 1);
    RegistryEntry entry=regService_.getEntry(sessionProvider,entryPath);
    list.add(mapper_.fromDocument(entry.getDocument(),q.getClassType()));
  }
  sessionProvider.close();
  if (sortComparator != null)   Collections.sort(list,sortComparator);
  return new ObjectPageList(list,10);
}