nus-yam/ex-repair huggingface dataset:
Program: 58559
Project: 58559
Buggy source:
@Override protected ImportHistory process(String bind,String data){
  XMLImporter importer=new XMLImporter(bind,data);
  ImporterListener listener=new ImporterListener(getConfiguration().getName());
  importer.addListener(listener);
  importer.run(null);
  return addHistory(listener);
}

Fixed version (ground truth):
@Override protected ImportHistory process(String bind,String data){
  XMLImporter importer=new XMLImporter(bind,data);
  ImporterListener listener=new ImporterListener(getConfiguration().getName());
  importer.addListener(listener);
  importer.run();
  return addHistory(listener);
}
Program: 58560
Project: 58560
Buggy source:
@Override @Transactional public void remove(ChartBuilder chartBuilder){
  MetaView metaView=chartBuilder.getMetaViewGenerated();
  if (metaView != null) {
    metaViewRepo.remove(metaView);
  }
  super.remove(chartBuilder);
}

Fixed version (ground truth):
@Override @Transactional public void remove(ChartBuilder chartBuilder){
  MetaView metaView=chartBuilder.getMetaViewGenerated();
  List<ChartBuilder> chartBuilders=all().filter("String_Node_Str",metaView,chartBuilder.getId()).fetch();
  for (  ChartBuilder builder : chartBuilders) {
    builder.setMetaViewGenerated(null);
  }
  if (metaView != null) {
    metaViewRepo.remove(metaView);
  }
  super.remove(chartBuilder);
}
Program: 58561
Project: 58561
Buggy source:
@Override public void remove(MenuBuilder menuBuilder){
  MetaMenu metaMenu=metaMenuRepo.findByID("String_Node_Str" + menuBuilder.getName());
  if (metaMenu != null) {
    metaMenuRepo.remove(metaMenu);
  }
  ActionBuilder actionBuilder=menuBuilder.getActionBuilder();
  menuBuilder.setActionBuilder(null);
  if (actionBuilder != null) {
    try {
      actionBuilderRepo.remove(actionBuilder);
    }
 catch (    Exception e) {
    }
  }
  super.remove(menuBuilder);
}

Fixed version (ground truth):
@Override public void remove(MenuBuilder menuBuilder){
  MetaMenu metaMenu=metaMenuRepo.findByID("String_Node_Str" + menuBuilder.getName());
  log.debug("String_Node_Str",metaMenu);
  if (metaMenu != null) {
    removeMetaMenu(metaMenu);
  }
  ActionBuilder actionBuilder=menuBuilder.getActionBuilder();
  menuBuilder.setActionBuilder(null);
  if (actionBuilder != null) {
    try {
      actionBuilderRepo.remove(actionBuilder);
    }
 catch (    Exception e) {
    }
  }
  super.remove(menuBuilder);
}
Program: 58562
Project: 58562
Buggy source:
@Override public AppInvoice getAppInvoice(){
  return Beans.get(AppInvoiceRepository.class).find(appInvoiceId);
}

Fixed version (ground truth):
@Override public AppInvoice getAppInvoice(){
  return appInvoiceRepo.all().fetchOne();
}
Program: 58563
Project: 58563
Buggy source:
@Override public AppAccount getAppAccount(){
  return Beans.get(AppAccountRepository.class).find(appAccountId);
}

Fixed version (ground truth):
@Override public AppAccount getAppAccount(){
  return appAccountRepo.all().fetchOne();
}
Program: 58564
Project: 58564
Buggy source:
@Override public AppBudget getAppBudget(){
  return Beans.get(AppBudgetRepository.class).find(appBudgetId);
}

Fixed version (ground truth):
@Override public AppBudget getAppBudget(){
  return appBudgetRepo.all().fetchOne();
}
Program: 58565
Project: 58565
Buggy source:
@Override public BigDecimal getGeneralDuration(BigDecimal duration){
  if (duration == null) {
    return null;
  }
  AppBase appBase=this.getAppBase();
  if (appBase != null) {
    String timePref=appBase.getTimeLoggingPreferenceSelect();
    BigDecimal dailyWorkHrs=appBase.getDailyWorkHours();
    if (timePref.equals("String_Node_Str") && dailyWorkHrs != null && dailyWorkHrs.compareTo(BigDecimal.ZERO) != 0) {
      duration=duration.divide(dailyWorkHrs,2,RoundingMode.HALF_EVEN);
    }
 else     if (timePref.equals("String_Node_Str")) {
      duration=duration.multiply(new BigDecimal(60));
    }
  }
  return duration;
}

Fixed version (ground truth):
@Override public BigDecimal getGeneralDuration(BigDecimal duration){
  if (duration == null) {
    return null;
  }
  AppBase appBase=getAppBase();
  if (appBase != null) {
    String timePref=appBase.getTimeLoggingPreferenceSelect();
    BigDecimal dailyWorkHrs=appBase.getDailyWorkHours();
    if (timePref.equals("String_Node_Str") && dailyWorkHrs != null && dailyWorkHrs.compareTo(BigDecimal.ZERO) != 0) {
      duration=duration.divide(dailyWorkHrs,2,RoundingMode.HALF_EVEN);
    }
 else     if (timePref.equals("String_Node_Str")) {
      duration=duration.multiply(new BigDecimal(60));
    }
  }
  return duration;
}
Program: 58566
Project: 58566
Buggy source:
/** 
 * Obtenir la tva à 0%
 * @return
 */
@Override public List<CurrencyConversionLine> getCurrencyConfigurationLineList(){
  if (getAppBase() != null) {
    return getAppBase().getCurrencyConversionLineList();
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Obtenir la tva à 0%
 * @return
 */
@Override public List<CurrencyConversionLine> getCurrencyConfigurationLineList(){
  AppBase appBase=getAppBase();
  if (appBase != null) {
    return appBase.getCurrencyConversionLineList();
  }
 else {
    return null;
  }
}
Program: 58567
Project: 58567
Buggy source:
/** 
 * Récupérer la date du jour avec l'heure. Retourne la date du jour paramétré dans l'utilisateur si existe, sinon récupère celle de l'administration générale, sinon date du jour. private
 * @return
 */
@Override public ZonedDateTime getTodayDateTime(){
  ZonedDateTime todayDateTime=ZonedDateTime.now();
  String applicationMode=AppSettings.get().get("String_Node_Str","String_Node_Str");
  if ("String_Node_Str".equals(applicationMode)) {
    User user=AuthUtils.getUser();
    if (user != null && user.getToday() != null) {
      todayDateTime=user.getToday();
    }
 else     if (getAppBase() != null && getAppBase().getToday() != null) {
      todayDateTime=getAppBase().getToday();
      if (user != null && user.getToday() != null) {
        return user.getToday();
      }
    }
  }
  return todayDateTime;
}

Fixed version (ground truth):
/** 
 * Récupérer la date du jour avec l'heure. Retourne la date du jour paramétré dans l'utilisateur si existe, sinon récupère celle de l'administration générale, sinon date du jour. private
 * @return
 */
@Override public ZonedDateTime getTodayDateTime(){
  ZonedDateTime todayDateTime=ZonedDateTime.now();
  String applicationMode=AppSettings.get().get("String_Node_Str","String_Node_Str");
  if ("String_Node_Str".equals(applicationMode)) {
    User user=AuthUtils.getUser();
    if (user != null && user.getToday() != null) {
      todayDateTime=user.getToday();
    }
 else {
      AppBase appBase=getAppBase();
      if (appBase != null && appBase.getToday() != null) {
        return appBase.getToday();
      }
    }
  }
  return todayDateTime;
}
Program: 58568
Project: 58568
Buggy source:
@Override public int getNbDecimalDigitForUnitPrice(){
  if (getAppBase() != null) {
    return getAppBase().getNbDecimalDigitForUnitPrice();
  }
  return IAdministration.DEFAULT_NB_DECIMAL_DIGITS;
}

Fixed version (ground truth):
@Override public int getNbDecimalDigitForUnitPrice(){
  AppBase appBase=getAppBase();
  if (appBase != null) {
    return appBase.getNbDecimalDigitForUnitPrice();
  }
  return IAdministration.DEFAULT_NB_DECIMAL_DIGITS;
}
Program: 58569
Project: 58569
Buggy source:
@Override public Unit getUnit(){
  if (getAppBase() != null) {
    return getAppBase().getDefaultProjectUnit();
  }
  return null;
}

Fixed version (ground truth):
@Override public Unit getUnit(){
  AppBase appBase=getAppBase();
  if (appBase != null) {
    return appBase.getDefaultProjectUnit();
  }
  return null;
}
Program: 58570
Project: 58570
Buggy source:
/** 
 * Récupérer l'administration générale
 * @return
 */
@Override public AppBase getAppBase(){
  return appBaseRepo.find(administrationId);
}

Fixed version (ground truth):
/** 
 * Récupérer l'administration générale
 * @return
 */
@Override public AppBase getAppBase(){
  return appBaseRepo.all().fetchOne();
}
Program: 58571
Project: 58571
Buggy source:
@Override public AppBusinessProject getAppBusinessProject(){
  return Beans.get(AppBusinessProjectRepository.class).find(appBusinessProjectId);
}

Fixed version (ground truth):
@Override public AppBusinessProject getAppBusinessProject(){
  return appBusinessProjectRepo.all().fetchOne();
}
Program: 58572
Project: 58572
Buggy source:
@Override public AppTimesheet getAppTimesheet(){
  return Beans.get(AppTimesheetRepository.class).find(appTimesheetId);
}

Fixed version (ground truth):
@Override public AppTimesheet getAppTimesheet(){
  return appTimesheetRepo.all().fetchOne();
}
Program: 58573
Project: 58573
Buggy source:
@Override public AppLeave getAppLeave(){
  return Beans.get(AppLeaveRepository.class).find(appLeaveId);
}

Fixed version (ground truth):
@Override public AppLeave getAppLeave(){
  return appLeaveRepo.all().fetchOne();
}
Program: 58574
Project: 58574
Buggy source:
@Override public AppProduction getAppProduction(){
  return Beans.get(AppProductionRepository.class).find(appProductionId);
}

Fixed version (ground truth):
@Override public AppProduction getAppProduction(){
  return appProductionRepo.all().fetchOne();
}
Program: 58575
Project: 58575
Buggy source:
@Override public AppProject getAppProject(){
  return Beans.get(AppProjectRepository.class).find(appProjectId);
}

Fixed version (ground truth):
@Override public AppProject getAppProject(){
  return appProjectRepo.all().fetchOne();
}
Program: 58576
Project: 58576
Buggy source:
@Override public AppPurchase getAppPurchase(){
  return Beans.get(AppPurchaseRepository.class).find(appPurchaseId);
}

Fixed version (ground truth):
@Override public AppPurchase getAppPurchase(){
  return appPurchaseRepo.all().fetchOne();
}
Program: 58577
Project: 58577
Buggy source:
@Override public AppSale getAppSale(){
  return Beans.get(AppSaleRepository.class).find(appSaleId);
}

Fixed version (ground truth):
@Override public AppSale getAppSale(){
  return appSaleRepo.all().fetchOne();
}
Program: 58578
Project: 58578
Buggy source:
@Override @Transactional(rollbackOn=Exception.class) public void attachMetaFiles(Message message,Set<MetaFile> metaFiles){
  Preconditions.checkNotNull(message.getId());
  if (metaFiles == null || metaFiles.isEmpty()) {
    return;
  }
  log.debug("String_Node_Str",Message.class.getName(),message.getId());
  for (  MetaFile metaFile : metaFiles) {
    try {
      Beans.get(MetaFiles.class).attach(metaFile,metaFile.getFileName(),message);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override @Transactional(rollbackOn=Exception.class) public void attachMetaFiles(Message message,Set<MetaFile> metaFiles){
  Preconditions.checkNotNull(message.getId());
  if (metaFiles == null || metaFiles.isEmpty()) {
    return;
  }
  log.debug("String_Node_Str",Message.class.getName(),message.getId());
  for (  MetaFile metaFile : metaFiles) {
    Beans.get(MetaFiles.class).attach(metaFile,metaFile.getFileName(),message);
  }
}
Program: 58580
Project: 58580
Buggy source:
/** 
 * Obtenir le compte comptable d'un produit.
 * @param product
 * @param company
 * @param isPurchase
 * @return
 */
public Account getProductAccount(AccountManagement accountManagement,boolean isPurchase){
  if (isPurchase) {
    return accountManagement.getPurchaseAccount();
  }
 else {
    return accountManagement.getSaleAccount();
  }
}

Fixed version (ground truth):
/** 
 * Obtenir le compte comptable d'un produit.
 * @param product
 * @param company
 * @param isPurchase
 * @return
 */
@Override public Account getProductAccount(AccountManagement accountManagement,boolean isPurchase){
  if (isPurchase) {
    return accountManagement.getPurchaseAccount();
  }
 else {
    return accountManagement.getSaleAccount();
  }
}
Program: 58581
Project: 58581
Buggy source:
public void determineTaxLine() throws AxelorException {
  if (product != null) {
    Company company=invoice.getCompany();
    Partner partner=invoice.getPartner();
    taxLine=accountManagementServiceImpl.getTaxLine(today,product,company,partner.getFiscalPosition(),InvoiceToolService.isPurchase(invoice));
  }
}

Fixed version (ground truth):
public void determineTaxLine() throws AxelorException {
  if (product != null) {
    Company company=invoice.getCompany();
    Partner partner=invoice.getPartner();
    taxLine=accountManagementService.getTaxLine(today,product,company,partner.getFiscalPosition(),InvoiceToolService.isPurchase(invoice));
  }
}
Program: 58582
Project: 58582
Buggy source:
/** 
 * @return
 * @throws AxelorException
 */
protected InvoiceLine createInvoiceLine() throws AxelorException {
  InvoiceLine invoiceLine=new InvoiceLine();
  invoiceLine.setInvoice(invoice);
  invoiceLine.setProduct(product);
  invoiceLine.setProductName(productName);
  if (product != null) {
    invoiceLine.setProductCode(product.getCode());
  }
  invoiceLine.setDescription(description);
  invoiceLine.setPrice(price);
  invoiceLine.setPriceDiscounted(priceDiscounted);
  invoiceLine.setQty(qty);
  invoiceLine.setUnit(unit);
  if (taxLine == null) {
    this.determineTaxLine();
  }
  invoiceLine.setTaxLine(taxLine);
  if (taxLine != null) {
    invoiceLine.setTaxRate(taxLine.getValue());
    invoiceLine.setTaxCode(taxLine.getTax().getCode());
  }
  if ((exTaxTotal == null || inTaxTotal == null)) {
    this.computeTotal();
  }
  invoiceLine.setExTaxTotal(exTaxTotal);
  invoiceLine.setInTaxTotal(inTaxTotal);
  this.computeCompanyTotal(invoiceLine);
  invoiceLine.setSequence(sequence);
  invoiceLine.setDiscountTypeSelect(discountTypeSelect);
  invoiceLine.setDiscountAmount(discountAmount);
  invoiceLine.setIsTitleLine(isTitleLine);
  return invoiceLine;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws AxelorException
 */
protected InvoiceLine createInvoiceLine() throws AxelorException {
  InvoiceLine invoiceLine=new InvoiceLine();
  invoiceLine.setInvoice(invoice);
  invoiceLine.setProduct(product);
  invoiceLine.setProductName(productName);
  if (product != null) {
    boolean isPurchase=invoiceLineService.isPurchase(invoice);
    invoiceLine.setProductCode(product.getCode());
    AccountManagement accountManagement=accountManagementService.getAccountManagement(product,invoice.getCompany());
    Account account=accountManagementService.getProductAccount(accountManagement,isPurchase);
    invoiceLine.setAccount(account);
  }
  invoiceLine.setDescription(description);
  invoiceLine.setPrice(price);
  invoiceLine.setPriceDiscounted(priceDiscounted);
  invoiceLine.setQty(qty);
  invoiceLine.setUnit(unit);
  if (taxLine == null) {
    this.determineTaxLine();
  }
  invoiceLine.setTaxLine(taxLine);
  if (taxLine != null) {
    invoiceLine.setTaxRate(taxLine.getValue());
    invoiceLine.setTaxCode(taxLine.getTax().getCode());
  }
  if ((exTaxTotal == null || inTaxTotal == null)) {
    this.computeTotal();
  }
  invoiceLine.setExTaxTotal(exTaxTotal);
  invoiceLine.setInTaxTotal(inTaxTotal);
  this.computeCompanyTotal(invoiceLine);
  invoiceLine.setSequence(sequence);
  invoiceLine.setDiscountTypeSelect(discountTypeSelect);
  invoiceLine.setDiscountAmount(discountAmount);
  invoiceLine.setIsTitleLine(isTitleLine);
  return invoiceLine;
}
Program: 58583
Project: 58583
Buggy source:
@Inject public MoveLineService(AccountManagementServiceAccountImpl accountManagementService,TaxAccountService taxAccountService,FiscalPositionServiceAccountImpl fiscalPositionService,AppAccountService appAccountService,AnalyticMoveLineService analyticMoveLineService,CurrencyService currencyService,CompanyConfigService companyConfigService){
  this.accountManagementService=accountManagementService;
  this.taxAccountService=taxAccountService;
  this.fiscalPositionService=fiscalPositionService;
  this.analyticMoveLineService=analyticMoveLineService;
  this.appAccountService=appAccountService;
  this.currencyService=currencyService;
  this.companyConfigService=companyConfigService;
  today=appAccountService.getTodayDate();
}

Fixed version (ground truth):
@Inject public MoveLineService(AccountManagementAccountService accountManagementService,TaxAccountService taxAccountService,FiscalPositionServiceAccountImpl fiscalPositionService,AppAccountService appAccountService,AnalyticMoveLineService analyticMoveLineService,CurrencyService currencyService,CompanyConfigService companyConfigService){
  this.accountManagementService=accountManagementService;
  this.taxAccountService=taxAccountService;
  this.fiscalPositionService=fiscalPositionService;
  this.analyticMoveLineService=analyticMoveLineService;
  this.appAccountService=appAccountService;
  this.currencyService=currencyService;
  this.companyConfigService=companyConfigService;
  today=appAccountService.getTodayDate();
}
Program: 58584
Project: 58584
Buggy source:
@Inject public InvoiceLineController(InvoiceLineService invoiceLineService,AccountManagementServiceAccountImpl accountManagementService){
  this.invoiceLineService=invoiceLineService;
  this.accountManagementService=accountManagementService;
}

Fixed version (ground truth):
@Inject public InvoiceLineController(InvoiceLineService invoiceLineService,AccountManagementAccountService accountManagementService){
  this.invoiceLineService=invoiceLineService;
  this.accountManagementService=accountManagementService;
}
Program: 58585
Project: 58585
Buggy source:
private void importDataInit(App app){
  log.debug("String_Node_Str");
  String modules=app.getModules();
  String type=app.getTypeSelect();
  String lang=AppSettings.get().get("String_Node_Str");
  log.debug("String_Node_Str",type,lang);
  if (lang == null) {
    return;
  }
  for (  String module : modules.split("String_Node_Str")) {
    File tmp=extract(module,DIR_INIT);
    if (tmp == null) {
      continue;
    }
    try {
      File config=FileUtils.getFile(tmp,DIR_INIT,DIR_INIT_INPUT,type + "String_Node_Str");
      log.debug("String_Node_Str",config.getAbsolutePath());
      if (config != null && config.exists()) {
        File data=FileUtils.getFile(config.getParentFile(),lang);
        importData(config,data);
      }
    }
  finally {
      clean(tmp);
    }
  }
  app=appRepo.find(app.getId());
  app.setInitDataLoaded(true);
  saveApp(app);
}

Fixed version (ground truth):
private void importDataInit(App app){
  String modules=app.getModules();
  String type=app.getTypeSelect();
  String lang=getLanguage(app);
  log.debug("String_Node_Str",type,lang);
  if (lang == null) {
    return;
  }
  for (  String module : modules.split("String_Node_Str")) {
    File tmp=extract(module,DIR_INIT);
    if (tmp == null) {
      continue;
    }
    try {
      File config=FileUtils.getFile(tmp,DIR_INIT,DIR_INIT_INPUT,type + "String_Node_Str");
      log.debug("String_Node_Str",config.getAbsolutePath());
      if (config != null && config.exists()) {
        File data=FileUtils.getFile(config.getParentFile(),lang);
        importData(config,data);
      }
    }
  finally {
      clean(tmp);
    }
  }
  app=appRepo.find(app.getId());
  app.setInitDataLoaded(true);
  saveApp(app);
}
Program: 58586
Project: 58586
Buggy source:
@Override public String importDataDemo(App app){
  app=appRepo.find(app.getId());
  importParentData(app);
  String modules=app.getModules();
  String type=app.getTypeSelect();
  String lang=AppSettings.get().get("String_Node_Str");
  log.debug("String_Node_Str",type,lang);
  if (lang == null) {
    return I18n.get("String_Node_Str");
  }
  for (  String module : modules.split("String_Node_Str")) {
    log.debug("String_Node_Str",module);
    File tmp=extract(module,DIR_DEMO);
    if (tmp == null) {
      log.debug("String_Node_Str");
      continue;
    }
    try {
      File config=FileUtils.getFile(tmp,DIR_DEMO,type + "String_Node_Str");
      if (config != null && config.exists()) {
        File data=FileUtils.getFile(config.getParentFile(),lang);
        importData(config,data);
      }
 else {
        log.debug("String_Node_Str");
      }
    }
  finally {
      clean(tmp);
    }
  }
  app=appRepo.find(app.getId());
  app.setDemoDataLoaded(true);
  saveApp(app);
  return I18n.get("String_Node_Str");
}

Fixed version (ground truth):
@Override public String importDataDemo(App app){
  app=appRepo.find(app.getId());
  importParentData(app);
  String modules=app.getModules();
  String type=app.getTypeSelect();
  String lang=getLanguage(app);
  log.debug("String_Node_Str",type,lang);
  if (lang == null) {
    return I18n.get("String_Node_Str");
  }
  for (  String module : modules.split("String_Node_Str")) {
    log.debug("String_Node_Str",module);
    File tmp=extract(module,DIR_DEMO);
    if (tmp == null) {
      log.debug("String_Node_Str");
      continue;
    }
    try {
      File config=FileUtils.getFile(tmp,DIR_DEMO,type + "String_Node_Str");
      if (config != null && config.exists()) {
        File data=FileUtils.getFile(config.getParentFile(),lang);
        importData(config,data);
      }
 else {
        log.debug("String_Node_Str");
      }
    }
  finally {
      clean(tmp);
    }
  }
  app=appRepo.find(app.getId());
  app.setDemoDataLoaded(true);
  saveApp(app);
  return I18n.get("String_Node_Str");
}
Program: 58587
Project: 58587
Buggy source:
public void bulkInstall(ActionRequest request,ActionResponse response){
  Context context=request.getContext();
  Set<Map<String,Object>> apps=new HashSet<Map<String,Object>>();
  apps.addAll((Collection<Map<String,Object>>)context.get("String_Node_Str"));
  Boolean importDemo=(Boolean)context.get("String_Node_Str");
  List<App> appList=new ArrayList<App>();
  for (  Map<String,Object> appData : apps) {
    App app=appRepo.find(Long.parseLong(appData.get("String_Node_Str").toString()));
    appList.add(app);
  }
  appList=appService.sortApps(appList);
  for (  App app : appList) {
    app=appRepo.find(app.getId());
    app=appService.installApp(app,importDemo);
  }
  response.setFlash(I18n.get("String_Node_Str"));
  response.setSignal("String_Node_Str",true);
}

Fixed version (ground truth):
public void bulkInstall(ActionRequest request,ActionResponse response){
  Context context=request.getContext();
  Set<Map<String,Object>> apps=new HashSet<Map<String,Object>>();
  apps.addAll((Collection<Map<String,Object>>)context.get("String_Node_Str"));
  Boolean importDemo=(Boolean)context.get("String_Node_Str");
  String language=(String)context.get("String_Node_Str");
  List<App> appList=new ArrayList<App>();
  for (  Map<String,Object> appData : apps) {
    App app=appRepo.find(Long.parseLong(appData.get("String_Node_Str").toString()));
    app=appService.updateLanguage(app,language);
    appList.add(app);
  }
  appList=appService.sortApps(appList);
  for (  App app : appList) {
    app=appRepo.find(app.getId());
    app=appService.installApp(app,importDemo);
  }
  response.setFlash(I18n.get("String_Node_Str"));
  response.setSignal("String_Node_Str",true);
}
Program: 58588
Project: 58588
Buggy source:
/** 
 * Update planned dates.
 * @param manufOrder
 * @param plannedStartDateT
 */
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void updatePlannedDates(ManufOrder manufOrder,LocalDateTime plannedStartDateT){
  manufOrder.setPlannedStartDateT(plannedStartDateT);
  if (manufOrder.getOperationOrderList() != null) {
    for (    OperationOrder operationOrder : manufOrder.getOperationOrderList()) {
      operationOrder.setPlannedStartDateT(null);
      operationOrder.setPlannedEndDateT(null);
      operationOrder.setPlannedDuration(null);
    }
    for (    OperationOrder operationOrder : manufOrder.getOperationOrderList()) {
      operationOrder.setPlannedStartDateT(operationOrderWorkflowService.getLastOperationOrder(operationOrder));
      operationOrder.setPlannedEndDateT(operationOrderWorkflowService.computePlannedEndDateT(operationOrder));
      operationOrder.setPlannedDuration(operationOrderWorkflowService.getDuration(Duration.between(operationOrder.getPlannedStartDateT(),operationOrder.getPlannedEndDateT())));
    }
  }
  manufOrder.setPlannedEndDateT(computePlannedEndDateT(manufOrder));
}

Fixed version (ground truth):
/** 
 * Update planned dates.
 * @param manufOrder
 * @param plannedStartDateT
 */
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void updatePlannedDates(ManufOrder manufOrder,LocalDateTime plannedStartDateT) throws AxelorException {
  manufOrder.setPlannedStartDateT(plannedStartDateT);
  if (manufOrder.getOperationOrderList() != null) {
    List<OperationOrder> operationOrderList=getSortedOperationOrderList(manufOrder);
    operationOrderWorkflowService.resetPlannedDates(operationOrderList);
    for (    OperationOrder operationOrder : operationOrderList) {
      operationOrderWorkflowService.replan(operationOrder);
    }
  }
  manufOrder.setPlannedEndDateT(computePlannedEndDateT(manufOrder));
}
Program: 58589
Project: 58589
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public ManufOrder plan(ManufOrder manufOrder) throws AxelorException {
  if (manufOrder.getOperationOrderList() != null) {
    for (    OperationOrder operationOrder : manufOrder.getOperationOrderList()) {
      operationOrderWorkflowService.plan(operationOrder);
    }
  }
  manufOrder.setPlannedEndDateT(this.computePlannedEndDateT(manufOrder));
  if (!manufOrder.getIsConsProOnOperation()) {
    manufOrderStockMoveService.createToConsumeStockMove(manufOrder);
  }
  manufOrderStockMoveService.createToProduceStockMove(manufOrder);
  manufOrder.setStatusSelect(IManufOrder.STATUS_PLANNED);
  manufOrder.setManufOrderSeq(Beans.get(ManufOrderService.class).getManufOrderSeq());
  return manufOrderRepo.save(manufOrder);
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public ManufOrder plan(ManufOrder manufOrder) throws AxelorException {
  if (manufOrder.getOperationOrderList() != null) {
    for (    OperationOrder operationOrder : getSortedOperationOrderList(manufOrder)) {
      operationOrderWorkflowService.plan(operationOrder);
    }
  }
  manufOrder.setPlannedEndDateT(this.computePlannedEndDateT(manufOrder));
  if (!manufOrder.getIsConsProOnOperation()) {
    manufOrderStockMoveService.createToConsumeStockMove(manufOrder);
  }
  manufOrderStockMoveService.createToProduceStockMove(manufOrder);
  manufOrder.setStatusSelect(IManufOrder.STATUS_PLANNED);
  manufOrder.setManufOrderSeq(Beans.get(ManufOrderService.class).getManufOrderSeq());
  return manufOrderRepo.save(manufOrder);
}
Program: 58590
Project: 58590
Buggy source:
@Transactional public OperationOrder replan(OperationOrder operationOrder) throws AxelorException {
  operationOrder.setPlannedStartDateT(this.getLastOperationOrder(operationOrder));
  operationOrder.setPlannedEndDateT(this.computePlannedEndDateT(operationOrder));
  operationOrder.setPlannedDuration(this.getDuration(Duration.between(operationOrder.getPlannedStartDateT(),operationOrder.getPlannedEndDateT())));
  return operationOrderRepo.save(operationOrder);
}

Fixed version (ground truth):
/** 
 * Replan an operation order. For successive calls, must reset planned dates first, then call by order of operation order priority.
 * @param operationOrder
 * @return
 * @throws AxelorException
 */
@Transactional public OperationOrder replan(OperationOrder operationOrder) throws AxelorException {
  operationOrder.setPlannedStartDateT(this.getLastOperationOrder(operationOrder));
  operationOrder.setPlannedEndDateT(this.computePlannedEndDateT(operationOrder));
  operationOrder.setPlannedDuration(this.getDuration(Duration.between(operationOrder.getPlannedStartDateT(),operationOrder.getPlannedEndDateT())));
  return operationOrderRepo.save(operationOrder);
}
Program: 58591
Project: 58591
Buggy source:
@Transactional public OperationOrder plan(OperationOrder operationOrder) throws AxelorException {
  operationOrder.setPlannedStartDateT(this.getLastOperationOrder(operationOrder));
  operationOrder.setPlannedEndDateT(this.computePlannedEndDateT(operationOrder));
  operationOrder.setPlannedDuration(this.getDuration(Duration.between(operationOrder.getPlannedStartDateT(),operationOrder.getPlannedEndDateT())));
  operationOrderStockMoveService.createToConsumeStockMove(operationOrder);
  operationOrder.setStatusSelect(IOperationOrder.STATUS_PLANNED);
  return operationOrderRepo.save(operationOrder);
}

Fixed version (ground truth):
/** 
 * Plan an operation order. For successive calls, must be called by order of operation order priority.
 * @param operationOrder
 * @return
 * @throws AxelorException
 */
@Transactional public OperationOrder plan(OperationOrder operationOrder) throws AxelorException {
  operationOrder.setPlannedStartDateT(this.getLastOperationOrder(operationOrder));
  operationOrder.setPlannedEndDateT(this.computePlannedEndDateT(operationOrder));
  operationOrder.setPlannedDuration(this.getDuration(Duration.between(operationOrder.getPlannedStartDateT(),operationOrder.getPlannedEndDateT())));
  operationOrderStockMoveService.createToConsumeStockMove(operationOrder);
  operationOrder.setStatusSelect(IOperationOrder.STATUS_PLANNED);
  return operationOrderRepo.save(operationOrder);
}
Program: 58592
Project: 58592
Buggy source:
public void updatePlannedDates(ActionRequest request,ActionResponse response){
  ManufOrder manufOrder=request.getContext().asType(ManufOrder.class);
  if (manufOrder.getStatusSelect() == ManufOrderRepository.STATUS_PLANNED) {
    manufOrderWorkflowService.updatePlannedDates(manufOrderRepo.find(manufOrder.getId()),manufOrder.getPlannedStartDateT());
    response.setReload(true);
  }
}

Fixed version (ground truth):
public void updatePlannedDates(ActionRequest request,ActionResponse response) throws AxelorException {
  ManufOrder manufOrderView=request.getContext().asType(ManufOrder.class);
  if (manufOrderView.getStatusSelect() == ManufOrderRepository.STATUS_PLANNED) {
    ManufOrder manufOrder=manufOrderRepo.find(manufOrderView.getId());
    if (manufOrderView.getPlannedStartDateT() != null) {
      if (!manufOrderView.getPlannedStartDateT().isEqual(manufOrder.getPlannedStartDateT())) {
        manufOrderWorkflowService.updatePlannedDates(manufOrder,manufOrderView.getPlannedStartDateT());
        response.setReload(true);
      }
    }
 else {
      response.setValue("String_Node_Str",manufOrder.getPlannedStartDateT());
    }
  }
}
Program: 58593
Project: 58593
Buggy source:
public ICalendarEvent createEvent(LocalDateTime fromDateTime,LocalDateTime toDateTime,User user,String description,int type,String subject){
  ICalendarEvent event=new ICalendarEvent();
  event.setSubject(subject);
  event.setStartDateTime(fromDateTime);
  event.setEndDateTime(toDateTime);
  event.setTypeSelect(type);
  event.setUser(user);
  if (!Strings.isNullOrEmpty(description)) {
    event.setDescription(description);
  }
  return event;
}

Fixed version (ground truth):
public ICalendarEvent createEvent(LocalDateTime fromDateTime,LocalDateTime toDateTime,User user,String description,int type,String subject){
  ICalendarEvent event=new ICalendarEvent();
  event.setSubject(subject);
  event.setStartDateTime(fromDateTime);
  event.setEndDateTime(toDateTime);
  event.setTypeSelect(type);
  event.setUser(user);
  event.setCalendar(user.getiCalendar());
  if (!Strings.isNullOrEmpty(description)) {
    event.setDescription(description);
  }
  return event;
}
Program: 58594
Project: 58594
Buggy source:
@Override @Transactional(rollbackOn={AxelorException.class,Exception.class}) public void finalizeSaleOrder(SaleOrder saleOrder) throws Exception {
  saleOrder.setStatusSelect(ISaleOrder.STATUS_FINALIZE);
  saleOrderRepo.save(saleOrder);
  if (appSaleService.getAppSale().getManageSaleOrderVersion()) {
    this.saveSaleOrderPDFAsAttachment(saleOrder);
  }
  if (saleOrder.getVersionNumber() == 1) {
    saleOrder.setSaleOrderSeq(this.getSequence(saleOrder.getCompany()));
  }
}

Fixed version (ground truth):
@Override public void finalizeSaleOrder(SaleOrder saleOrder) throws Exception {
  _finalizeSaleOrder(saleOrder);
}
Program: 58595
Project: 58595
Buggy source:
@Override @Transactional(rollbackOn={AxelorException.class,Exception.class}) public void finalizeSaleOrder(SaleOrder saleOrder) throws Exception {
  saleOrder.setStatusSelect(ISaleOrder.STATUS_FINALIZE);
  saleOrderRepo.save(saleOrder);
  if (generalService.getGeneral().getManageSaleOrderVersion()) {
    this.saveSaleOrderPDFAsAttachment(saleOrder);
  }
  if (saleOrder.getVersionNumber() == 1) {
    saleOrder.setSaleOrderSeq(this.getSequence(saleOrder.getCompany()));
  }
}

Fixed version (ground truth):
@Override public void finalizeSaleOrder(SaleOrder saleOrder) throws Exception {
  _finalizeSaleOrder(saleOrder);
}
Program: 58596
Project: 58596
Buggy source:
public void finalizeSaleOrder(ActionRequest request,ActionResponse response) throws Exception {
  SaleOrder saleOrder=request.getContext().asType(SaleOrder.class);
  saleOrder=saleOrderRepo.find(saleOrder.getId());
  saleOrderService.finalizeSaleOrder(saleOrder);
  response.setReload(true);
}

Fixed version (ground truth):
public void finalizeSaleOrder(ActionRequest request,ActionResponse response) throws Exception {
  SaleOrder saleOrder=request.getContext().asType(SaleOrder.class);
  saleOrder=saleOrderRepo.find(saleOrder.getId());
  try {
    saleOrderService.finalizeSaleOrder(saleOrder);
  }
 catch (  AxelorException e) {
    response.setFlash(e.getMessage());
  }
  response.setReload(true);
}
Program: 58597
Project: 58597
Buggy source:
@Override public void finalizeSaleOrder(SaleOrder saleOrder) throws Exception {
  updateCustomerCreditLines(saleOrder);
  super.finalizeSaleOrder(saleOrder);
}

Fixed version (ground truth):
@Override public void finalizeSaleOrder(SaleOrder saleOrder) throws Exception {
  updateCustomerCreditLines(saleOrder);
  _finalizeSaleOrder(saleOrder);
}
Program: 58599
Project: 58599
Buggy source:
@Override public void build() throws AxelorException {
  SignaturePubKeyInfoType signaturePubKeyInfo;
  X509DataType x509Data;
  RSAKeyValueType rsaKeyValue;
  PubKeyValueType pubKeyValue;
  SignaturePubKeyOrderDataType signaturePubKeyOrderData;
  EbicsCertificate certificate=session.getUser().getA005Certificate();
  x509Data=EbicsXmlFactory.createX509DataType(session.getUser().getDn(),certificate.getCertificate());
  rsaKeyValue=EbicsXmlFactory.createRSAKeyValueType(new BigInteger(certificate.getPublicKeyExponent()).toByteArray(),new BigInteger(certificate.getPublicKeyModulus()).toByteArray());
  pubKeyValue=EbicsXmlFactory.createPubKeyValueType(rsaKeyValue,Calendar.getInstance());
  signaturePubKeyInfo=EbicsXmlFactory.createSignaturePubKeyInfoType(x509Data,pubKeyValue,"String_Node_Str");
  signaturePubKeyOrderData=EbicsXmlFactory.createSignaturePubKeyOrderData(signaturePubKeyInfo,session.getUser().getEbicsPartner().getPartnerId(),session.getUser().getUserId());
  document=EbicsXmlFactory.createSignaturePubKeyOrderDataDocument(signaturePubKeyOrderData);
}

Fixed version (ground truth):
@Override public void build() throws AxelorException {
  SignaturePubKeyInfoType signaturePubKeyInfo;
  X509DataType x509Data;
  RSAKeyValueType rsaKeyValue;
  PubKeyValueType pubKeyValue;
  SignaturePubKeyOrderDataType signaturePubKeyOrderData;
  EbicsCertificate certificate=session.getUser().getA005Certificate();
  System.out.println("String_Node_Str" + new String(certificate.getCertificate()));
  System.out.println("String_Node_Str" + certificate.getCertificate().length);
  EbicsCertificate ebicsEertificate=session.getUser().getA005Certificate();
  x509Data=EbicsXmlFactory.createX509DataType(ebicsEertificate.getSubject(),ebicsEertificate.getCertificate());
  rsaKeyValue=EbicsXmlFactory.createRSAKeyValueType(new BigInteger(ebicsEertificate.getPublicKeyExponent(),16).toByteArray(),new BigInteger(ebicsEertificate.getPublicKeyModulus(),16).toByteArray());
  pubKeyValue=EbicsXmlFactory.createPubKeyValueType(rsaKeyValue,Calendar.getInstance());
  signaturePubKeyInfo=EbicsXmlFactory.createSignaturePubKeyInfoType(x509Data,pubKeyValue,"String_Node_Str");
  signaturePubKeyOrderData=EbicsXmlFactory.createSignaturePubKeyOrderData(signaturePubKeyInfo,session.getUser().getEbicsPartner().getPartnerId(),session.getUser().getUserId());
  document=EbicsXmlFactory.createSignaturePubKeyOrderDataDocument(signaturePubKeyOrderData);
}
Program: 58600
Project: 58600
Buggy source:
@Override public byte[] toByteArray(){
  addNamespaceDecl("String_Node_Str","String_Node_Str");
  setSaveSuggestedPrefixes("String_Node_Str","String_Node_Str");
  return super.toByteArray();
}

Fixed version (ground truth):
@Override public byte[] toByteArray(){
  addNamespaceDecl("String_Node_Str","String_Node_Str");
  setSaveSuggestedPrefixes("String_Node_Str",XMLConstants.DEFAULT_NS_PREFIX);
  return super.toByteArray();
}
Program: 58601
Project: 58601
Buggy source:
@Override public byte[] toByteArray(){
  setSaveSuggestedPrefixes("String_Node_Str","String_Node_Str");
  return super.toByteArray();
}

Fixed version (ground truth):
@Override public byte[] toByteArray(){
  setSaveSuggestedPrefixes("String_Node_Str",XMLConstants.DEFAULT_NS_PREFIX);
  return super.toByteArray();
}
Program: 58603
Project: 58603
Buggy source:
@Override public void buildTransfer() throws AxelorException {
  EbicsRequest request;
  Header header;
  Body body;
  MutableHeaderType mutable;
  SegmentNumber segmentNumber;
  StaticHeaderType xstatic;
  OrderData orderData;
  DataTransferRequestType dataTransfer;
  segmentNumber=EbicsXmlFactory.createSegmentNumber(this.segmentNumber,lastSegment);
  mutable=EbicsXmlFactory.createMutableHeaderType("String_Node_Str",segmentNumber);
  xstatic=EbicsXmlFactory.createStaticHeaderType(session.getBankID(),transactionId);
  header=EbicsXmlFactory.createEbicsRequestHeader(true,mutable,xstatic);
  orderData=EbicsXmlFactory.createEbicsRequestOrderData(IOUtils.getFactoryContent(content));
  dataTransfer=EbicsXmlFactory.createDataTransferRequestType(orderData);
  body=EbicsXmlFactory.createEbicsRequestBody(dataTransfer);
  request=EbicsXmlFactory.createEbicsRequest(1,"String_Node_Str",header,body);
  document=EbicsXmlFactory.createEbicsRequestDocument(request);
}

Fixed version (ground truth):
@Override public void buildTransfer() throws AxelorException {
  EbicsRequest request;
  Header header;
  Body body;
  MutableHeaderType mutable;
  SegmentNumber segmentNumber;
  StaticHeaderType xstatic;
  OrderData orderData;
  DataTransferRequestType dataTransfer;
  segmentNumber=EbicsXmlFactory.createSegmentNumber(this.segmentNumber,lastSegment);
  mutable=EbicsXmlFactory.createMutableHeaderType("String_Node_Str",segmentNumber);
  xstatic=EbicsXmlFactory.createStaticHeaderType(session.getBankID(),transactionId);
  header=EbicsXmlFactory.createEbicsRequestHeader(true,mutable,xstatic);
  orderData=EbicsXmlFactory.createEbicsRequestOrderData(IOUtils.getFactoryContent(content));
  dataTransfer=EbicsXmlFactory.createDataTransferRequestType(orderData);
  body=EbicsXmlFactory.createEbicsRequestBody(dataTransfer);
  request=EbicsXmlFactory.createEbicsRequest(1,"String_Node_Str",header,body);
  document=EbicsXmlFactory.createEbicsRequestDocument(request);
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  try {
    this.save(bout);
  }
 catch (  JDOMException e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str");
  System.out.println(bout.toString());
}
Program: 58604
Project: 58604
Buggy source:
@Override @Transactional(rollbackOn=Exception.class) public void attachMetaFiles(Message message,Set<MetaFile> metaFiles){
  Preconditions.checkNotNull(message.getId());
  if (metaFiles == null || metaFiles.isEmpty()) {
    return;
  }
  log.debug("String_Node_Str",Message.class.getName(),message.getId());
  for (  MetaFile metaFile : metaFiles) {
    final DMSFile dmsFile=new DMSFile();
    final DMSFileRepository repository=Beans.get(DMSFileRepository.class);
    dmsFile.setFileName(metaFile.getFileName());
    dmsFile.setMetaFile(metaFile);
    dmsFile.setRelatedId(message.getId());
    dmsFile.setRelatedModel(EntityHelper.getEntityClass(message).getName());
    repository.save(dmsFile);
  }
}

Fixed version (ground truth):
@Override @Transactional(rollbackOn=Exception.class) public void attachMetaFiles(Message message,Set<MetaFile> metaFiles){
  Preconditions.checkNotNull(message.getId());
  if (metaFiles == null || metaFiles.isEmpty()) {
    return;
  }
  log.debug("String_Node_Str",Message.class.getName(),message.getId());
  for (  MetaFile metaFile : metaFiles) {
    Beans.get(MetaFiles.class).attach(metaFile,metaFile.getFileName(),message);
  }
}
Program: 58606
Project: 58606
Buggy source:
public Set<MetaFile> getMetaFiles(Template template) throws AxelorException, IOException {
  List<DMSFile> metaAttachments=Query.of(DMSFile.class).filter("String_Node_Str",template.getId(),EntityHelper.getEntityClass(template).getName()).fetch();
  Set<MetaFile> metaFiles=Sets.newHashSet();
  for (  DMSFile metaAttachment : metaAttachments) {
    if (!metaAttachment.getIsDirectory())     metaFiles.add(metaAttachment.getMetaFile());
  }
  log.debug("String_Node_Str",metaFiles);
  return metaFiles;
}

Fixed version (ground truth):
@Override public Set<MetaFile> getMetaFiles(Template template) throws AxelorException, IOException {
  List<DMSFile> metaAttachments=Query.of(DMSFile.class).filter("String_Node_Str",template.getId(),EntityHelper.getEntityClass(template).getName()).fetch();
  Set<MetaFile> metaFiles=Sets.newHashSet();
  for (  DMSFile metaAttachment : metaAttachments) {
    if (!metaAttachment.getIsDirectory())     metaFiles.add(metaAttachment.getMetaFile());
  }
  log.debug("String_Node_Str",metaFiles);
  return metaFiles;
}
Program: 58608
Project: 58608
Buggy source:
public Message generateAndSendMessage(Model model,Template template) throws MessagingException, IOException, AxelorException, ClassNotFoundException, InstantiationException, IllegalAccessException {
  Message message=this.generateMessage(model,template);
  messageService.sendMessage(message);
  return message;
}

Fixed version (ground truth):
@Override public Message generateAndSendMessage(Model model,Template template) throws MessagingException, IOException, AxelorException, ClassNotFoundException, InstantiationException, IllegalAccessException {
  Message message=this.generateMessage(model,template);
  messageService.sendMessage(message);
  return message;
}
Program: 58609
Project: 58609
Buggy source:
@SuppressWarnings("String_Node_Str") public TemplateMaker initMaker(long objectId,String model,String tag) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
  this.maker=new TemplateMaker(Locale.FRENCH,TEMPLATE_DELIMITER,TEMPLATE_DELIMITER);
  Class<? extends Model> myClass=(Class<? extends Model>)Class.forName(model);
  maker.setContext(JPA.find(myClass,objectId),tag);
  return maker;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public TemplateMaker initMaker(long objectId,String model,String tag) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
  this.maker=new TemplateMaker(Locale.FRENCH,TEMPLATE_DELIMITER,TEMPLATE_DELIMITER);
  Class<? extends Model> myClass=(Class<? extends Model>)Class.forName(model);
  maker.setContext(JPA.find(myClass,objectId),tag);
  return maker;
}
Program: 58610
Project: 58610
Buggy source:
@Override @Transactional(rollbackOn={AxelorException.class,Exception.class}) public Message createMessage(String model,int id,String subject,String content,EmailAddress fromEmailAddress,List<EmailAddress> replyToEmailAddressList,List<EmailAddress> toEmailAddressList,List<EmailAddress> ccEmailAddressList,List<EmailAddress> bccEmailAddressList,Set<MetaFile> metaFiles,String addressBlock,int mediaTypeSelect){
  Message message=super.createMessage(model,id,subject,content,fromEmailAddress,replyToEmailAddressList,toEmailAddressList,ccEmailAddressList,bccEmailAddressList,metaFiles,addressBlock,mediaTypeSelect);
  message.setCompany(userService.getUserActiveCompany());
  return messageRepo.save(message);
}

Fixed version (ground truth):
@Override @Transactional(rollbackOn={AxelorException.class,Exception.class}) public Message createMessage(String model,int id,String subject,String content,EmailAddress fromEmailAddress,List<EmailAddress> replyToEmailAddressList,List<EmailAddress> toEmailAddressList,List<EmailAddress> ccEmailAddressList,List<EmailAddress> bccEmailAddressList,Set<MetaFile> metaFiles,String addressBlock,int mediaTypeSelect) throws IOException {
  Message message=super.createMessage(model,id,subject,content,fromEmailAddress,replyToEmailAddressList,toEmailAddressList,ccEmailAddressList,bccEmailAddressList,metaFiles,addressBlock,mediaTypeSelect);
  message.setCompany(userService.getUserActiveCompany());
  return messageRepo.save(message);
}
Program: 58611
Project: 58611
Buggy source:
public void sendFULRequest(ActionRequest request,ActionResponse response){
  EbicsUser ebicsUser=ebicsUserRepo.find(request.getContext().asType(EbicsUser.class).getId());
  try {
    MetaFile testDataMetaFile=ebicsUser.getTestDataFile();
    MetaFile testSignatureMetaFile=ebicsUser.getTestDataFile();
    BankOrderFileFormat bankOrderFileFormat=ebicsUser.getTestBankOrderFileFormat();
    if (ebicsUser.getEbicsPartner().getTestMode() && testDataMetaFile != null && bankOrderFileFormat != null) {
      File testSignatureFile=null;
      if (ebicsUser.getEbicsTypeSelect() == EbicsUserRepository.EBICS_TYPE_TS && testSignatureMetaFile != null) {
        testSignatureFile=MetaFiles.getPath(testSignatureMetaFile).toFile();
      }
      ebicsService.sendFULRequest(ebicsUser,null,MetaFiles.getPath(testDataMetaFile).toFile(),bankOrderFileFormat.getOrderFileFormatSelect(),testSignatureFile);
    }
 else {
      response.setFlash(I18n.get(IExceptionMessage.EBICS_TEST_MODE_NOT_ENABLED));
    }
  }
 catch (  AxelorException e) {
    response.setFlash(stripClass(e.getLocalizedMessage()));
  }
  response.setReload(true);
}

Fixed version (ground truth):
public void sendFULRequest(ActionRequest request,ActionResponse response){
  EbicsUser ebicsUser=ebicsUserRepo.find(request.getContext().asType(EbicsUser.class).getId());
  try {
    MetaFile testDataMetaFile=ebicsUser.getTestDataFile();
    MetaFile testSignatureMetaFile=ebicsUser.getTestSignatureFile();
    BankOrderFileFormat bankOrderFileFormat=ebicsUser.getTestBankOrderFileFormat();
    if (testDataMetaFile != null && bankOrderFileFormat != null) {
      File testSignatureFile=null;
      if (ebicsUser.getEbicsTypeSelect() == EbicsUserRepository.EBICS_TYPE_TS && testSignatureMetaFile != null) {
        testSignatureFile=MetaFiles.getPath(testSignatureMetaFile).toFile();
      }
      ebicsService.sendFULRequest(ebicsUser,null,MetaFiles.getPath(testDataMetaFile).toFile(),bankOrderFileFormat.getOrderFileFormatSelect(),testSignatureFile);
    }
 else {
      response.setFlash(I18n.get(IExceptionMessage.EBICS_TEST_MODE_NOT_ENABLED));
    }
  }
 catch (  AxelorException e) {
    response.setFlash(stripClass(e.getLocalizedMessage()));
  }
  response.setReload(true);
}