[Demonstration 1]

[Buggy Method]
@Override
public JMenu buildFileMenu() {
    final String appTitle = PyToolbar.getTitle(PyToolbar.EXPORT, false);
    final JMenuItem exportApplication = Toolkit.newJMenuItem(appTitle, 'E');
    exportApplication.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(final ActionEvent e) {
            handleExportApplication();
        }
    });
    return buildFileMenu(new JMenuItem[] { exportApplication });
}

[Buggy Hunk]
final String appTitle = PyToolbar.getTitle(PyToolbar.EXPORT, false);

[Patch]
final String appTitle = Language.text("toolbar.export_application");

[Demonstration 2]

[Buggy Method]
public Language getLanguage() {
    HttpSession session = (((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest()).getSession();
    Language language = (Language) session.getAttribute("IABAKO_LANG");
    if (language == null) {
        language = getLanguageFromCookie();
    }
    return language;
}

[Buggy Hunk]
Language language = (Language) session.getAttribute("IABAKO_LANG");

[Patch]
Language language = sessionUser != null && sessionUser.getUser() != null ? sessionUser.getUser().getEnterprise().getLanguage() : (Language) session.getAttribute("IABAKO_LANG");

[Demonstration 3]

[Buggy Method]
@RequestMapping("downloadFiles.do")
public void downloadFiles(HttpServletRequest request, HttpServletResponse response, @AuthenticationPrincipal EavlUser user, @RequestParam("jobId") Integer jobId, @RequestParam("name") String[] fileNames) throws Exception {
    EAVLJob job = jobService.getUserJobById(request, user, jobId);
    if (job == null) {
        log.warn(String.format("downloadFile - User %1$s attempting to access job %2$s was rejected. (Job might not exist)", user, jobId));
        response.sendError(HttpStatus.SC_FORBIDDEN);
        return;
    }
    //Create a filename that is semi-unique to the job (and slightly human readable)
    String downloadFileName = "";
    if (fileNames.length == 1) {
        downloadFileName = fileNames[0];
    } else {
        String jobName = job.getName() == null ? "" : job.getName();
        Date submitDate = job.getSubmitDate();
        if (submitDate == null) {
            downloadFileName = String.format("files_%1$s.zip", jobName);
        } else {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
            downloadFileName = String.format("files_%1$s_%2$s.zip", jobName, sdf.format(job.getSubmitDate()));
        }
        downloadFileName = downloadFileName.replaceAll("[^0-9a-zA-Z_.]", "_");
    }
    //Start writing our data to a zip archive (which is being streamed to user)
    try {
        response.setContentType("application/zip");
        response.setHeader("Content-Disposition", String.format("attachment; filename=\"%1$s\"", downloadFileName));
        boolean readOneOrMoreFiles = false;
        ZipOutputStream zout = new ZipOutputStream(response.getOutputStream());
        for (String fileName : fileNames) {
            InputStream is = null;
            try {
                is = fss.readFile(job, fileName);
                zout.putNextEntry(new ZipEntry(fileName));
                IOUtils.copy(is, zout);
                zout.closeEntry();
                readOneOrMoreFiles = true;
            } finally {
                IOUtils.closeQuietly(is);
            }
        }
        if (readOneOrMoreFiles) {
            zout.finish();
            zout.flush();
            zout.close();
        } else {
            zout.close();
        }
    } catch (IOException e) {
        log.warn("Could not create ZIP file", e);
    } catch (Exception e) {
        log.warn("Error getting cloudObject data", e);
    }
}

[Buggy Hunk]
downloadFileName = fileNames[0];

[Patch]
downloadFileName = fileNames[0] + ".zip";