Program: 174800
Project: 174800
Buggy source:
/** 
 * Resolves the given parameters to a repository NodeRef
 * @param store The Store to search within
 * @param uuid The id of the node, or the id of the starting node if a path is also present
 * @param path The path to the required node, if a uuid is given the search starts from that node otherwise the search will start from the root node
 * @param nodeService NodeService to use
 * @param searchService SearchService to use
 * @param namespaceService NamespaceService to use
 * @return A repository NodeRef
 */
public static NodeRef resolveToNodeRef(Store store,String uuid,String path,NodeService nodeService,SearchService searchService,NamespaceService namespaceService){
  if (store == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  NodeRef nodeRef=null;
  NodeRef rootNodeRef=null;
  if (uuid == null) {
    rootNodeRef=nodeService.getRootNode(convertToStoreRef(store));
  }
 else {
    rootNodeRef=new NodeRef(convertToStoreRef(store),uuid);
  }
  if (path != null) {
    List<NodeRef> nodes=searchService.selectNodes(rootNodeRef,path,null,namespaceService,false);
    if (nodes.size() != 1) {
      StringBuilder builder=new StringBuilder("String_Node_Str");
      builder.append(store.getScheme().getValue()).append("String_Node_Str").append(store.getAddress());
      builder.append("String_Node_Str").append(uuid);
      builder.append("String_Node_Str").append(path).append("String_Node_Str");
      builder.append(nodes.size()).append("String_Node_Str");
      throw new IllegalStateException(builder.toString());
    }
    nodeRef=nodes.get(0);
  }
 else {
    nodeRef=rootNodeRef;
  }
  return nodeRef;
}

Fixed version (ground truth):
/** 
 * Resolves the given parameters to a repository NodeRef
 * @param store The Store to search within
 * @param uuid The id of the node, or the id of the starting node if a path is also present
 * @param path The path to the required node, if a uuid is given the search starts from that node otherwise the search will start from the root node
 * @param nodeService NodeService to use
 * @param searchService SearchService to use
 * @param namespaceService NamespaceService to use
 * @return A repository NodeRef
 */
public static NodeRef resolveToNodeRef(Store store,String uuid,String path,NodeService nodeService,SearchService searchService,NamespaceService namespaceService){
  if (store == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  NodeRef nodeRef=null;
  NodeRef rootNodeRef=null;
  if (uuid == null || uuid.length() == 0) {
    rootNodeRef=nodeService.getRootNode(convertToStoreRef(store));
  }
 else {
    rootNodeRef=new NodeRef(convertToStoreRef(store),uuid);
  }
  if (path != null && path.length() != 0) {
    List<NodeRef> nodes=searchService.selectNodes(rootNodeRef,path,null,namespaceService,false);
    if (nodes.size() != 1) {
      StringBuilder builder=new StringBuilder("String_Node_Str");
      builder.append(store.getScheme().getValue()).append("String_Node_Str").append(store.getAddress());
      builder.append("String_Node_Str").append(uuid);
      builder.append("String_Node_Str").append(path).append("String_Node_Str");
      builder.append(nodes.size()).append("String_Node_Str");
      throw new IllegalStateException(builder.toString());
    }
    nodeRef=nodes.get(0);
  }
 else {
    nodeRef=rootNodeRef;
  }
  return nodeRef;
}