output: #fixed code
                               private void deleteFolder(String folderId) throws SQLException {
  		Folder f = selectFolderById(folderId);
  		List<Node> nodes = selectNodesByFolderId(folderId);
  		int size = nodes.size();
  		if(f==null) {
  			return;
  		}
  		// 删除该文件夹内的所有文件
  		for (int i = 0; i < size && gono; i++) {
  			deleteFile(nodes.get(i).getFileId());
  		}
  		List<Folder> folders = getFoldersByParentId(folderId);
  		size = folders.size();
  		// 迭代删除该文件夹内的所有文件夹
  		for (int i = 0; i < size && gono; i++) {
  			deleteFolder(folders.get(i).getFolderId());
  		}
  		per = 50;
  		message = "正在删除文件夹：" + f.getFolderName();
  		// 删除自己的数据
  		if (deleteFolderById(folderId) > 0) {
  			per = 100;
  			return;
  		}
  		throw new SQLException();
  	}
input: #vulnerable code 
                               private void deleteFolder(String folderId) throws SQLException {
  		Folder f = selectFolderById(folderId);
  		List<Node> nodes = selectNodesByFolderId(folderId);
  		int size = nodes.size();
  		// 删除该文件夹内的所有文件
  		for (int i = 0; i < size && gono; i++) {
  			deleteFile(nodes.get(i).getFileId());
  		}
  		List<Folder> folders = getFoldersByParentId(folderId);
  		size = folders.size();
  		// 迭代删除该文件夹内的所有文件夹
  		for (int i = 0; i < size && gono; i++) {
  			deleteFolder(folders.get(i).getFolderId());
  		}
  		per = 50;
  		message = "正在删除文件夹：" + f.getFolderName();
  		// 删除自己的数据
  		if (deleteFolderById(folderId) > 0) {
  			per = 100;
  			return;
  		}
  		throw new SQLException();
  	} 
                              #location 16 
                              #vulnerability type NULL_DEREFERENCE