Buggy code:
@ Controller @ RequestMapping ( DataExplorerController . URI ) @ SessionAttributes ( { DataExplorerController . ATTR_GALAXY_URL , DataExplorerController . ATTR_GALAXY_API_KEY } ) public class DataExplorerController extends MolgenisPluginController { private static final Logger LOG = LoggerFactory . getLogger ( DataExplorerController . class ) ; public static final String ID = "dataexplorer" ; public static final String URI = ( MolgenisPluginController . PLUGIN_URI_PREFIX ) + ( DataExplorerController . ID ) ; public static final String KEY_MOD_AGGREGATES = "plugin.dataexplorer.mod.aggregates" ; public static final String KEY_MOD_ANNOTATORS = "plugin.dataexplorer.mod.annotators" ; public static final String KEY_MOD_CHARTS = "plugin.dataexplorer.mod.charts" ; public static final String KEY_MOD_DATA = "plugin.dataexplorer.mod.data" ; public static final String KEY_MOD_DISEASEMATCHER = "plugin.dataexplorer.mod.diseasematcher" ; public static final String KEY_GALAXY_ENABLED = "plugin.dataexplorer.galaxy.enabled" ; public static final String KEY_GALAXY_URL = "plugin.dataexplorer.galaxy.url" ; public static final String KEY_SHOW_WIZARD_ONINIT = "plugin.dataexplorer.wizard.oninit" ; public static final String KEY_HEADER_ABBREVIATE = "plugin.dataexplorer.header.abbreviate" ; public static final String KEY_HIDE_SEARCH_BOX = "plugin.dataexplorer.hide.searchbox" ; public static final String KEY_HIDE_ITEM_SELECTION = "plugin.dataexplorer.hide.itemselection" ; public static final String KEY_MOD_AGGREGATES_DISTINCT_HIDE = ( DataExplorerController . KEY_MOD_AGGREGATES ) + ".distinct.hide" ; public static final String KEY_MOD_AGGREGATES_DISTINCT_OVERRIDE = ( DataExplorerController . KEY_MOD_AGGREGATES ) + ".distinct.override" ; public static final String KEY_MOD_ENTITIESREPORT = "plugin.dataexplorer.mod.entitiesreport" ; private static final boolean DEFAULT_VAL_MOD_AGGREGATES = true ; private static final boolean DEFAULT_VAL_MOD_ANNOTATORS = false ; private static final boolean DEFAULT_VAL_MOD_CHARTS = true ; private static final boolean DEFAULT_VAL_MOD_DATA = true ; private static final boolean DEFAULT_VAL_MOD_DISEASEMATCHER = false ; private static final boolean DEFAULT_VAL_GALAXY_ENABLED = false ; public static final boolean DEFAULT_VAL_SHOW_WIZARD_ONINIT = false ; public static final boolean DEFAULT_VAL_AGGREGATES_DISTINCT_HIDE = false ; public static final String DEFAULT_VAL_HEADER_ABBREVIATE = "180" ; public static final String DEFAULT_AGGREGATES_NORESULTS_MESSAGE = "No<seq2seq4repair_space>results<seq2seq4repair_space>found" ; static final String ATTR_GALAXY_URL = "galaxyUrl" ; static final String ATTR_GALAXY_API_KEY = "galaxyApiKey" ; public static final String INITLOCATION = "genomebrowser.init.initLocation" ; public static final String COORDSYSTEM = "genomebrowser.init.coordSystem" ; public static final String CHAINS = "genomebrowser.init.chains" ; public static final String SOURCES = "genomebrowser.init.sources" ; public static final String BROWSERLINKS = "genomebrowser.init.browserLinks" ; public static final String AGGREGATES_NORESULTS_MESSAGE = "plugin.dataexplorer.mod.aggregates.noresults" ; public static final String HIGHLIGHTREGION = "genomebrowser.init.highlightRegion" ; public static final String KEY_DATAEXPLORER_EDITABLE = "plugin.dataexplorer.editable" ; public static final String KEY_DATAEXPLORER_ROW_CLICKABLE = "plugin.dataexplorer.rowClickable" ; private static final boolean DEFAULT_VAL_DATAEXPLORER_EDITABLE = false ; private static final boolean DEFAULT_VAL_DATAEXPLORER_ROW_CLICKABLE = false ; private static final boolean DEFAULT_VAL_KEY_HIGLIGHTREGION = false ; @ Autowired private DataService dataService ; @ Autowired private MolgenisPermissionService molgenisPermissionService ; @ Autowired private MolgenisSettings molgenisSettings ; @ Autowired private GenomeConfig genomeConfig ; @ Autowired private FreeMarkerConfigurer freemarkerConfigurer ; public DataExplorerController ( ) { } @ RequestMapping ( method = RequestMethod . GET ) public String init ( @ RequestParam ( value = "entity" , required = false ) String selectedEntityName , @ RequestParam ( value = "searchTerm" , required = false ) String searchTerm , Model model ) throws Exception { } @ RequestMapping ( value = "//module//{moduleId}" , method = GET ) public String getModule ( @ PathVariable ( "moduleId" ) String moduleId , @ RequestParam ( "entity" ) String entityName , Model model ) { } @ RequestMapping ( value = "//modules" , method = GET ) @ ResponseBody public ModulesConfigResponse getModules ( @ RequestParam ( "entity" ) String entityName ) { } private Map < String , String > getGenomeBrowserEntities ( ) { } private boolean isGenomeBrowserEntity ( EntityMetaData entityMetaData ) { } @ RequestMapping ( value = "//download" , method = POST ) public void download ( @ RequestParam ( "dataRequest" ) String dataRequestStr , HttpServletResponse response ) throws IOException { dataRequestStr = URLDecoder . decode ( dataRequestStr , "UTF-8" ) ; DataExplorerController . LOG . info ( ( ( "Download<seq2seq4repair_space>request:<seq2seq4repair_space>[" + dataRequestStr ) + "]" ) ) ; DataRequest dataRequest = new GsonHttpMessageConverter ( ) . getGson ( ) . fromJson ( dataRequestStr , DataRequest . class ) ; String entityName = dataRequest . getEntityName ( ) ; <START_BUG> String fileName = ( ( entityName + '_' ) + ( new SimpleDateFormat ( "yyyy-mm-dd<seq2seq4repair_space>hh:mm:ss" ) . format ( new Date ( ) ) ) ) + ".csv" ; <END_BUG> response . setContentType ( "text//csv" ) ; response . addHeader ( "Content-Disposition" , ( "attachment;<seq2seq4repair_space>filename=" + fileName ) ) ; writeDataRequestCsv ( dataRequest , response . getOutputStream ( ) , ',' ) ; } @ RequestMapping ( value = "//galaxy//export" , method = POST ) @ ResponseStatus ( HttpStatus . OK ) public void exportToGalaxy ( @ Valid @ RequestBody GalaxyDataExportRequest galaxyDataExportRequest , Model model ) throws IOException { } private void writeDataRequestCsv ( DataRequest request , OutputStream outputStream , char separator ) throws IOException { } private void writeDataRequestCsv ( DataRequest dataRequest , OutputStream outputStream , char separator , boolean noQuotes ) throws IOException { } @ RequestMapping ( value = "//aggregate" , method = RequestMethod . POST , produces = "application//json" , consumes = "application//json" ) @ ResponseBody public AggregateResult aggregate ( @ Valid @ RequestBody AggregateRequest request ) { } private String getDistinctAttributeName ( AggregateRequest request ) { } @ RequestMapping ( value = "//details" , method = RequestMethod . POST ) public String viewEntityDetails ( @ RequestParam ( "entityName" ) String entityName , @ RequestParam ( "entityId" ) String entityId , Model model ) throws Exception { } private String getViewName ( String entityName ) { } private boolean viewExists ( String viewName ) { } @ RequestMapping ( value = "//settings" , method = RequestMethod . GET ) @ ResponseBody public Map < String , String > getSettings ( @ RequestParam ( required = false ) String keyStartsWith ) { } @ ExceptionHandler ( GalaxyDataExportException . class ) @ ResponseBody @ ResponseStatus ( HttpStatus . BAD_REQUEST ) public ErrorMessageResponse handleGalaxyDataExportException ( GalaxyDataExportException e ) { } @ ExceptionHandler ( RuntimeException . class ) @ ResponseBody @ ResponseStatus ( HttpStatus . INTERNAL_SERVER_ERROR ) public ErrorMessageResponse handleRuntimeException ( RuntimeException e ) { } private boolean isTableEditable ( ) { } private boolean isRowClickable ( ) { } private String parseEntitiesReportRuntimeProperty ( String entityName ) { } }

Fix:
String fileName = ( ( entityName + '_' ) + ( new SimpleDateFormat ( "yyyy-MM-dd<seq2seq4repair_space>hh:mm:ss" ) . format ( new Date ( ) ) ) ) + ".csv" ;