Program: 166560
Project: 166560
Buggy source:
private File _getDriveFolder(final String path) throws CloudsyncException {
  int retryCount=0;
  do {
    try {
      File parentItem=service.files().get("String_Node_Str").execute();
      final String[] folderNames=StringUtils.split(path,SEPARATOR);
      for (      final String name : folderNames) {
        if (cacheParents.containsKey(parentItem.getId() + ':' + name)) {
          parentItem=cacheParents.get(parentItem.getId() + ':' + name);
        }
 else {
          final String q="String_Node_Str" + name + "String_Node_Str"+ parentItem.getId()+ "String_Node_Str";
          final Drive.Files.List request=service.files().list();
          request.setQ(q);
          request.setMaxResults(MAX_RESULTS);
          do {
            FileList files=request.execute();
            final List<File> result=files.getItems();
            File _parentItem;
            if (result.size() == 0) {
              final File folder=new File();
              folder.setTitle(name);
              folder.setMimeType(FOLDER);
              final ParentReference parentReference=new ParentReference();
              parentReference.setId(parentItem.getId());
              folder.setParents(Arrays.asList(parentReference));
              _parentItem=service.files().insert(folder).execute();
              if (_parentItem == null) {
                throw new CloudsyncException("String_Node_Str" + name + "String_Node_Str");
              }
            }
 else             if (result.size() == 1) {
              _parentItem=result.get(0);
            }
 else {
              throw new CloudsyncException("String_Node_Str" + path + "String_Node_Str");
            }
            if (!_parentItem.getMimeType().equals(FOLDER)) {
              throw new CloudsyncException("String_Node_Str" + path + "String_Node_Str");
            }
            _addToCache(_parentItem,parentItem);
            parentItem=_parentItem;
            request.setPageToken(files.getNextPageToken());
          }
 while (request.getPageToken() != null && request.getPageToken().length() > 0);
        }
      }
      return parentItem;
    }
 catch (    final IOException e) {
      retryCount=validateException("String_Node_Str" + path + "String_Node_Str",null,e,retryCount);
    }
  }
 while (true);
}

Fixed version (ground truth):
private File _getDriveFolder(final String path) throws CloudsyncException {
  int retryCount=0;
  do {
    try {
      File parentItem=service.files().get("String_Node_Str").execute();
      final String[] folderNames=StringUtils.split(path,SEPARATOR);
      for (      final String name : folderNames) {
        if (cacheParents.containsKey(parentItem.getId() + ':' + name)) {
          parentItem=cacheParents.get(parentItem.getId() + ':' + name);
        }
 else {
          final String q="String_Node_Str" + name + "String_Node_Str"+ parentItem.getId()+ "String_Node_Str";
          final Drive.Files.List request=service.files().list();
          request.setQ(q);
          request.setMaxResults(MAX_RESULTS);
          do {
            FileList files=request.execute();
            final List<File> result=files.getItems();
            File _parentItem;
            if (result.size() == 0) {
              final File folder=new File();
              folder.setTitle(name);
              folder.setMimeType(FOLDER);
              final ParentReference parentReference=new ParentReference();
              parentReference.setId(parentItem.getId());
              folder.setParents(Arrays.asList(parentReference));
              _parentItem=service.files().insert(folder).execute();
              if (_parentItem == null) {
                throw new CloudsyncException("String_Node_Str" + name + "String_Node_Str");
              }
            }
 else             if (result.size() == 1) {
              _parentItem=result.get(0);
            }
 else {
              throw new CloudsyncException("String_Node_Str" + path + "String_Node_Str");
            }
            if (!_parentItem.getMimeType().equals(FOLDER)) {
              throw new CloudsyncException("String_Node_Str" + path + "String_Node_Str");
            }
            _addToCache(_parentItem,parentItem);
            parentItem=_parentItem;
            request.setPageToken(files.getNextPageToken());
          }
 while (request.getPageToken() != null && request.getPageToken().length() > 0);
        }
      }
      return parentItem;
    }
 catch (    final IOException e) {
      retryCount=validateException("String_Node_Str" + path + "String_Node_Str",null,e,retryCount);
      if (retryCount < 0)       retryCount=0;
    }
  }
 while (true);
}