Program: 58735
Project: 58735
Buggy source:
/** 
 * @param request
 * @param response
 */
public void printExportMoveLine(ActionRequest request,ActionResponse response){
  MoveLineReport moveLineReport=request.getContext().asType(MoveLineReport.class);
  moveLineReport=moveLineReportRepo.find(moveLineReport.getId());
  try {
    if (moveLineReport.getExportTypeSelect() == null || moveLineReport.getExportTypeSelect().isEmpty() || moveLineReport.getTypeSelect() == 0) {
      response.setFlash(I18n.get(IExceptionMessage.MOVE_LINE_REPORT_4));
      response.setReload(true);
      return;
    }
    logger.debug("String_Node_Str",moveLineReport.getTypeSelect());
    moveLineReportService.setStatus(moveLineReport);
    if (moveLineReport.getTypeSelect() >= 6 && moveLineReport.getTypeSelect() <= 9) {
      MoveLineExportService moveLineExportService=Beans.get(MoveLineExportService.class);
switch (moveLineReport.getTypeSelect()) {
case 6:
        moveLineExportService.exportMoveLineTypeSelect6(moveLineReport,false);
      break;
case 7:
    moveLineExportService.exportMoveLineTypeSelect7(moveLineReport,false);
  break;
case 8:
moveLineExportService.exportMoveLineTypeSelect8(moveLineReport,false);
break;
case 9:
moveLineExportService.exportMoveLineTypeSelect9(moveLineReport,false);
break;
default :
break;
}
}
 else {
if (moveLineReport.getId() != null) {
moveLineReportService.setPublicationDateTime(moveLineReport);
String name=I18n.get("String_Node_Str") + "String_Node_Str" + moveLineReport.getRef();
String fileLink=ReportFactory.createReport(String.format(IReport.MOVE_LINE_REPORT_TYPE,moveLineReport.getTypeSelect()),name + "String_Node_Str").addParam("String_Node_Str",moveLineReport.getId()).addFormat(moveLineReport.getExportTypeSelect()).addModel(moveLineReport).generate().getFileLink();
logger.debug("String_Node_Str" + name);
response.setView(ActionView.define(name).add("String_Node_Str",fileLink).map());
}
}
}
 catch (Exception e) {
TraceBackService.trace(response,e);
}
}

Fixed version (ground truth):
/** 
 * @param request
 * @param response
 */
public void printExportMoveLine(ActionRequest request,ActionResponse response){
  MoveLineReport moveLineReport=request.getContext().asType(MoveLineReport.class);
  moveLineReport=moveLineReportRepo.find(moveLineReport.getId());
  try {
    if (moveLineReport.getExportTypeSelect() == null || moveLineReport.getExportTypeSelect().isEmpty() || moveLineReport.getTypeSelect() == 0) {
      response.setFlash(I18n.get(IExceptionMessage.MOVE_LINE_REPORT_4));
      response.setReload(true);
      return;
    }
    logger.debug("String_Node_Str",moveLineReport.getTypeSelect());
    if (moveLineReport.getTypeSelect() >= 6 && moveLineReport.getTypeSelect() <= 9) {
      MoveLineExportService moveLineExportService=Beans.get(MoveLineExportService.class);
switch (moveLineReport.getTypeSelect()) {
case 6:
        moveLineExportService.exportMoveLineTypeSelect6(moveLineReport,false);
      break;
case 7:
    moveLineExportService.exportMoveLineTypeSelect7(moveLineReport,false);
  break;
case 8:
moveLineExportService.exportMoveLineTypeSelect8(moveLineReport,false);
break;
case 9:
moveLineExportService.exportMoveLineTypeSelect9(moveLineReport,false);
break;
default :
break;
}
}
 else {
if (moveLineReport.getId() != null) {
moveLineReportService.setPublicationDateTime(moveLineReport);
String name=I18n.get("String_Node_Str") + "String_Node_Str" + moveLineReport.getRef();
String fileLink=ReportFactory.createReport(String.format(IReport.MOVE_LINE_REPORT_TYPE,moveLineReport.getTypeSelect()),name + "String_Node_Str").addParam("String_Node_Str",moveLineReport.getId()).addFormat(moveLineReport.getExportTypeSelect()).addModel(moveLineReport).generate().getFileLink();
logger.debug("String_Node_Str" + name);
response.setView(ActionView.define(name).add("String_Node_Str",fileLink).map());
}
}
moveLineReportService.setStatus(moveLineReport);
}
 catch (Exception e) {
TraceBackService.trace(response,e);
}
}