Program: 58818
Project: 58818
Buggy source:
@SuppressWarnings("String_Node_Str") @Transactional(rollbackOn={AxelorException.class,Exception.class}) public List<Long> generateMove(MoveTemplate moveTemplate,List<HashMap<String,Object>> dataList){
  try {
    List<Long> moveList=new ArrayList<Long>();
    BigDecimal hundred=new BigDecimal(100);
    for (    HashMap<String,Object> data : dataList) {
      LocalDate moveDate=new LocalDate(data.get("String_Node_Str").toString());
      Partner debitPartner=null;
      Partner creditPartner=null;
      BigDecimal moveBalance=new BigDecimal(data.get("String_Node_Str").toString());
      Partner partner=null;
      if (data.get("String_Node_Str") != null) {
        debitPartner=partnerRepo.find(Long.parseLong(((HashMap<String,Object>)data.get("String_Node_Str")).get("String_Node_Str").toString()));
        partner=debitPartner;
      }
      if (data.get("String_Node_Str") != null) {
        creditPartner=partnerRepo.find(Long.parseLong(((HashMap<String,Object>)data.get("String_Node_Str")).get("String_Node_Str").toString()));
        partner=creditPartner;
      }
      Move move=moveService.getMoveCreateService().createMove(moveTemplate.getJournal(),moveTemplate.getJournal().getCompany(),null,partner,moveDate,null);
      for (      MoveTemplateLine line : moveTemplate.getMoveTemplateLineList()) {
        partner=null;
        if (line.getDebitCreditSelect().equals("String_Node_Str")) {
          if (line.getHasPartnerToDebit())           partner=debitPartner;
          MoveLine moveLine=moveLineService.createMoveLine(move,partner,line.getAccount(),moveBalance.multiply(line.getPercentage()).divide(hundred),true,moveDate,moveDate,0,line.getName());
          move.getMoveLineList().add(moveLine);
        }
 else {
          if (line.getHasPartnerToDebit())           partner=creditPartner;
          MoveLine moveLine=moveLineService.createMoveLine(move,partner,line.getAccount(),moveBalance.multiply(line.getPercentage()).divide(hundred),false,moveDate,moveDate,0,line.getName());
          move.getMoveLineList().add(moveLine);
        }
      }
      moveRepo.save(move);
      moveList.add(move.getId());
    }
    return moveList;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Transactional(rollbackOn={AxelorException.class,Exception.class}) public List<Long> generateMove(MoveTemplate moveTemplate,List<HashMap<String,Object>> dataList){
  try {
    List<Long> moveList=new ArrayList<Long>();
    BigDecimal hundred=new BigDecimal(100);
    for (    HashMap<String,Object> data : dataList) {
      LocalDate moveDate=new LocalDate(data.get("String_Node_Str").toString());
      Partner debitPartner=null;
      Partner creditPartner=null;
      BigDecimal moveBalance=new BigDecimal(data.get("String_Node_Str").toString());
      Partner partner=null;
      if (data.get("String_Node_Str") != null) {
        debitPartner=partnerRepo.find(Long.parseLong(((HashMap<String,Object>)data.get("String_Node_Str")).get("String_Node_Str").toString()));
        partner=debitPartner;
      }
      if (data.get("String_Node_Str") != null) {
        creditPartner=partnerRepo.find(Long.parseLong(((HashMap<String,Object>)data.get("String_Node_Str")).get("String_Node_Str").toString()));
        partner=creditPartner;
      }
      Move move=moveService.getMoveCreateService().createMove(moveTemplate.getJournal(),moveTemplate.getJournal().getCompany(),null,partner,moveDate,null);
      for (      MoveTemplateLine line : moveTemplate.getMoveTemplateLineList()) {
        partner=null;
        if (line.getDebitCreditSelect().equals("String_Node_Str")) {
          if (line.getHasPartnerToDebit())           partner=debitPartner;
          MoveLine moveLine=moveLineService.createMoveLine(move,partner,line.getAccount(),moveBalance.multiply(line.getPercentage()).divide(hundred),true,moveDate,moveDate,0,line.getName());
          move.getMoveLineList().add(moveLine);
        }
 else {
          if (line.getHasPartnerToCredit())           partner=creditPartner;
          MoveLine moveLine=moveLineService.createMoveLine(move,partner,line.getAccount(),moveBalance.multiply(line.getPercentage()).divide(hundred),false,moveDate,moveDate,0,line.getName());
          move.getMoveLineList().add(moveLine);
        }
      }
      moveRepo.save(move);
      moveList.add(move.getId());
    }
    return moveList;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}