Buggy code:
public Template getSelectedTemplate ( ) { } public void setSelectedTemplate ( Template selectedTemplate ) { } public void updateSelectedTemplate ( ValueChangeEvent event ) { } private void updateDatasetFieldInputLevels ( ) { } public void handleChange ( ) { } public void handleChangeButton ( ) { } public boolean isShapefileType ( FileMetadata fm ) { } public boolean hasMapLayerMetadata ( FileMetadata fm ) { } private boolean doesDataFileHaveMapLayerMetadata ( DataFile df ) { } public MapLayerMetadata getMapLayerMetadata ( DataFile df ) { } private void loadMapLayerMetadataLookup ( ) { } public String init ( ) { } public String saveGuestbookResponse ( ) { } public String getApiTokenKey ( ) { } private void resetVersionUI ( ) { } public void edit ( DatasetPage . EditMode editMode ) { } public String releaseDraft ( ) { } public String sendBackToContributor ( ) { } public String submitDataset ( ) { } public String releaseDataset ( ) { } public String deaccessionDataset ( ) { } public String deaccessionVersions ( ) { } private DatasetVersion setDatasetVersionDeaccessionReasonAndURL ( DatasetVersion dvIn ) { } private String releaseDataset ( boolean minor ) { } public String registerDataset ( ) { } public void refresh ( ActionEvent e ) { } public void refresh ( ) { } public String deleteDataset ( ) { } public String deleteDatasetVersion ( ) { } private List < FileMetadata > selectedFiles ; public List < FileMetadata > getSelectedFiles ( ) { } public void setSelectedFiles ( List < FileMetadata > selectedFiles ) { } public String saveLinkedDataset ( ) { } private boolean showAccessPopup = false ; public boolean isShowAccessPopup ( ) { } public void setShowAccessPopup ( boolean showAccessPopup ) { } public void restrictFiles ( boolean restricted ) { } public int getRestrictedFileCount ( ) { } private List < FileMetadata > filesToBeDeleted = new ArrayList ( ) ; public void deleteFiles ( ) { } public String save ( ) { } public String cancel ( ) { } public boolean isDuplicate ( FileMetadata fileMetadata ) { } private HttpClient getClient ( ) { } public void handleDropBoxUpload ( ActionEvent e ) { } public void handleFileUpload ( FileUploadEvent event ) { } public boolean isLocked ( ) { } public DatasetVersionUI getDatasetVersionUI ( ) { } private List < DatasetVersion > versionTabList = new ArrayList ( ) ; public List < DatasetVersion > getVersionTabList ( ) { } public Integer getCompareVersionsCount ( ) { } public void setVersionTabList ( List < DatasetVersion > versionTabList ) { } private List < DatasetVersion > releasedVersionTabList = new ArrayList ( ) ; public List < DatasetVersion > getReleasedVersionTabList ( ) { } public void setReleasedVersionTabList ( List < DatasetVersion > releasedVersionTabList ) { } private List < DatasetVersion > selectedVersions ; public List < DatasetVersion > getSelectedVersions ( ) { } public void setSelectedVersions ( List < DatasetVersion > selectedVersions ) { } private List < DatasetVersion > selectedDeaccessionVersions ; public List < DatasetVersion > getSelectedDeaccessionVersions ( ) { } public void setSelectedDeaccessionVersions ( List < DatasetVersion > selectedDeaccessionVersions ) { } public DatasetVersionDifference getDatasetVersionDifference ( ) { } public void setDatasetVersionDifference ( DatasetVersionDifference datasetVersionDifference ) { } public String startFileDownload ( FileMetadata fileMetadata , String format ) { System . out . print ( "In<seq2seq4repair_space>Download<seq2seq4repair_space>method" ) ; initGuestbookResponse ( fileMetadata ) ; Command cmd ; try { cmd = new edu . harvard . iq . dataverse . engine . command . impl . CreateGuestbookResponseCommand ( session . getUser ( ) , guestbookResponse , dataset ) ; commandEngine . submit ( cmd ) ; } catch ( CommandException ex ) { FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_ERROR , "Guestbook<seq2seq4repair_space>Response<seq2seq4repair_space>Save<seq2seq4repair_space>Failed" , ( "<seq2seq4repair_space>-<seq2seq4repair_space>" + ( ex . toString ( ) ) ) ) ) ; DatasetPage . logger . severe ( ex . getMessage ( ) ) ; } String fileDownloadUrl = "//api//access//datafile//" + ( guestbookResponse . getDataFile ( ) . getId ( ) ) ; if ( ( format != null ) && ( format . equals ( "bundle" ) ) ) { <START_BUG> fileDownloadUrl = "//api//access//datafile//bundle" + ( guestbookResponse . getDataFile ( ) . getId ( ) ) ; <END_BUG> } System . out . print ( ( "fileDownloadUrl:<seq2seq4repair_space>" + fileDownloadUrl ) ) ; try { FacesContext . getCurrentInstance ( ) . getExternalContext ( ) . redirect ( fileDownloadUrl ) ; } catch ( IOException ex ) { DatasetPage . logger . info ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>issue<seq2seq4repair_space>a<seq2seq4repair_space>redirect<seq2seq4repair_space>to<seq2seq4repair_space>file<seq2seq4repair_space>download<seq2seq4repair_space>url." ) ; } return fileDownloadUrl ; } public void initGuestbookResponse ( FileMetadata fileMetadata ) { } private List < SelectItem > setResponseUISelectItems ( CustomQuestion cq ) { } public void compareVersionDifferences ( ) { } public void updateVersionDifferences ( DatasetVersion newVersion , DatasetVersion originalVersion ) { } private List < DatasetVersion > resetVersionTabList ( ) { } private String getContributorsNames ( DatasetVersion version ) { } private List < DatasetVersion > resetReleasedVersionTabList ( ) { } public void downloadDatasetCitationXML ( ) { } public void downloadDatafileCitationXML ( FileMetadata fileMetadata ) { } public void downloadCitationXML ( FileMetadata fileMetadata ) { } private String getFileNameDOI ( ) { } public void downloadDatasetCitationRIS ( ) { } public void downloadDatafileCitationRIS ( FileMetadata fileMetadata ) { } public void downloadCitationRIS ( FileMetadata fileMetadata ) { } public String getDataExploreURL ( ) { } public String getDataExploreURLComplete ( Long fileid ) { } public String getVariableMetadataURL ( Long fileid ) { } public String getTabularDataFileURL ( Long fileid ) { } private FileMetadata fileMetadataSelected = null ; public void setFileMetadataSelected ( FileMetadata fm ) { } public FileMetadata getFileMetadataSelected ( ) { } public void clearFileMetadataSelected ( ) { } private List < String > tabFileTags = null ; public List < String > getTabFileTags ( ) { } public void setTabFileTags ( List < String > tabFileTags ) { } private String [ ] selectedTags = new String [ ] { } ; public String [ ] getSelectedTags ( ) { }

Fix:
fileDownloadUrl = "//api//access//datafile//bundle//" + ( guestbookResponse . getDataFile ( ) . getId ( ) ) ;