Program: 39946
Project: 39946
Buggy source:
/** 
 * 功能描述：申报表批量导出excel
 * @param materialId 教材id
 * @param textBookids 书籍id集合
 * @param realname 条件查询的账号或者姓名
 * @param position 条件查询 职务
 * @param title 条件查询 职称
 * @param orgName 条件查询 工作单位
 * @param unitName 条件查询 申报单位
 * @param positionType 条件查询 申报职位 ;null全部 1主编 2副主编 3编委
 * @param onlineProgress 1待审核 3已经审核
 * @param offlineProgress 0 未 2 收到
 * @param request
 * @param response
 */
@ResponseBody @LogDetail(businessType=BUSSINESS_TYPE,logRemark="String_Node_Str") @RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public void declarationExcel(Long materialId,String textBookids,String realname,String position,String title,String orgName,String unitName,Integer positionType,Integer onlineProgress,Integer offlineProgress,HttpServletRequest request,HttpServletResponse response){
  Workbook workbook=null;
  try {
    workbook=excelHelper.fromDeclarationEtcBOList(materialService.getMaterialById(materialId),declarationService.declarationEtcBO(materialId,textBookids,realname,position,title,orgName,unitName,positionType,onlineProgress,offlineProgress),"String_Node_Str");
  }
 catch (  CheckedServiceException|IllegalArgumentException|IllegalAccessException e) {
    logger.warn("String_Node_Str");
  }
  response.setCharacterEncoding("String_Node_Str");
  response.setContentType("String_Node_Str");
  try {
    StringBuilder sb=new StringBuilder("String_Node_Str");
    String materialName=new String(materialService.getMaterialNameById(materialId).getBytes("String_Node_Str"),"String_Node_Str");
    sb.append(materialName);
    sb.append("String_Node_Str");
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    sb.append(sdf.format(new Date()));
    sb.append("String_Node_Str");
    String userAgent=request.getHeader("String_Node_Str");
    if (userAgent.toLowerCase().contains("String_Node_Str")) {
      response.setHeader("String_Node_Str",URLDecoder.decode(sb.toString(),"String_Node_Str"));
    }
 else {
      response.setHeader("String_Node_Str",sb.toString().replace("String_Node_Str","String_Node_Str"));
    }
  }
 catch (  UnsupportedEncodingException e) {
    logger.warn("String_Node_Str");
  }
  try (OutputStream out=response.getOutputStream()){
    workbook.write(out);
    out.flush();
    out.close();
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e.getMessage());
    throw new CheckedServiceException(CheckedExceptionBusiness.FILE,CheckedExceptionResult.FILE_DOWNLOAD_FAILED,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * 功能描述：申报表批量导出excel
 * @param materialId 教材id
 * @param textBookids 书籍id集合
 * @param realname 条件查询的账号或者姓名
 * @param position 条件查询 职务
 * @param title 条件查询 职称
 * @param orgName 条件查询 工作单位
 * @param unitName 条件查询 申报单位
 * @param positionType 条件查询 申报职位 ;null全部 1主编 2副主编 3编委
 * @param onlineProgress 1待审核 3已经审核
 * @param offlineProgress 0 未 2 收到
 * @param request
 * @param response
 */
@ResponseBody @LogDetail(businessType=BUSSINESS_TYPE,logRemark="String_Node_Str") @RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public void declarationExcel(Long materialId,String textBookids,String realname,String position,String title,String orgName,String unitName,Integer positionType,Integer onlineProgress,Integer offlineProgress,HttpServletRequest request,HttpServletResponse response){
  Workbook workbook=null;
  try {
    workbook=excelHelper.fromDeclarationEtcBOList(materialService.getMaterialById(materialId),declarationService.declarationEtcBO(materialId,textBookids,realname,position,title,orgName,unitName,positionType,onlineProgress,offlineProgress),"String_Node_Str");
  }
 catch (  CheckedServiceException|IllegalArgumentException|IllegalAccessException e) {
    logger.warn("String_Node_Str");
  }
  response.setCharacterEncoding("String_Node_Str");
  response.setContentType("String_Node_Str");
  try {
    StringBuilder sb=new StringBuilder("String_Node_Str");
    String materialName;
    String userAgent=request.getHeader("String_Node_Str");
    if (userAgent.toLowerCase().contains("String_Node_Str")) {
      materialName=URLEncoder.encode(materialService.getMaterialNameById(materialId),"String_Node_Str");
    }
 else {
      materialName=new String(materialService.getMaterialNameById(materialId).getBytes("String_Node_Str"),"String_Node_Str");
    }
    sb.append(materialName);
    sb.append("String_Node_Str");
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    sb.append(sdf.format(new Date()));
    sb.append("String_Node_Str");
    response.setHeader("String_Node_Str",sb.toString().replace("String_Node_Str","String_Node_Str"));
  }
 catch (  UnsupportedEncodingException e) {
    logger.warn("String_Node_Str");
  }
  try (OutputStream out=response.getOutputStream()){
    workbook.write(out);
    out.flush();
    out.close();
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e.getMessage());
    throw new CheckedServiceException(CheckedExceptionBusiness.FILE,CheckedExceptionResult.FILE_DOWNLOAD_FAILED,"String_Node_Str");
  }
}