Program: 34979
Project: 34979
Buggy source:
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value="String_Node_Str",notes="String_Node_Str") @ApiResponses(value={@ApiResponse(code=200,message="String_Node_Str",response=String.class)}) public RpcClientResult getDepositFee(@BeanParam() GetDepositFeeForm form) throws NulsException {
  AssertUtil.canNotEmpty(form);
  AssertUtil.canNotEmpty(form.getAddress(),"String_Node_Str");
  AssertUtil.canNotEmpty(form.getAgentHash(),"String_Node_Str");
  AssertUtil.canNotEmpty(form.getDeposit(),"String_Node_Str");
  DepositTransaction tx=new DepositTransaction();
  Deposit deposit=new Deposit();
  deposit.setAddress(AddressTool.getAddress(form.getAddress()));
  deposit.setAgentHash(NulsDigestData.fromDigestHex(form.getAgentHash()));
  deposit.setDeposit(Na.valueOf(form.getDeposit()));
  tx.setTxData(deposit);
  CoinData coinData=new CoinData();
  List<Coin> toList=new ArrayList<>();
  toList.add(new Coin(deposit.getAddress(),deposit.getDeposit(),-1));
  coinData.setTo(toList);
  tx.setCoinData(coinData);
  CoinDataResult result=accountLedgerService.getCoinData(deposit.getAddress(),deposit.getDeposit(),tx.size() + P2PKHScriptSig.DEFAULT_SERIALIZE_LENGTH,TransactionFeeCalculator.OTHER_PRECE_PRE_1024_BYTES);
  tx.getCoinData().setFrom(result.getCoinList());
  if (null != result.getChange()) {
    tx.getCoinData().getTo().add(result.getChange());
  }
  Na fee=TransactionFeeCalculator.getMaxFee(tx.size() + P2PKHScriptSig.DEFAULT_SERIALIZE_LENGTH);
  Map<String,Object> valueMap=new HashMap<>();
  valueMap.put("String_Node_Str",fee.getValue());
  return Result.getSuccess().setData(valueMap).toRpcClientResult();
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value="String_Node_Str",notes="String_Node_Str") @ApiResponses(value={@ApiResponse(code=200,message="String_Node_Str",response=String.class)}) public RpcClientResult getDepositFee(@BeanParam() GetDepositFeeForm form) throws NulsException {
  AssertUtil.canNotEmpty(form);
  AssertUtil.canNotEmpty(form.getAddress(),"String_Node_Str");
  AssertUtil.canNotEmpty(form.getAgentHash(),"String_Node_Str");
  AssertUtil.canNotEmpty(form.getDeposit(),"String_Node_Str");
  DepositTransaction tx=new DepositTransaction();
  Deposit deposit=new Deposit();
  deposit.setAddress(AddressTool.getAddress(form.getAddress()));
  deposit.setAgentHash(NulsDigestData.fromDigestHex(form.getAgentHash()));
  deposit.setDeposit(Na.valueOf(form.getDeposit()));
  tx.setTxData(deposit);
  CoinData coinData=new CoinData();
  List<Coin> toList=new ArrayList<>();
  toList.add(new Coin(deposit.getAddress(),deposit.getDeposit(),-1));
  coinData.setTo(toList);
  tx.setCoinData(coinData);
  CoinDataResult result=accountLedgerService.getCoinData(deposit.getAddress(),deposit.getDeposit(),tx.size() + P2PKHScriptSig.DEFAULT_SERIALIZE_LENGTH,TransactionFeeCalculator.OTHER_PRECE_PRE_1024_BYTES);
  tx.getCoinData().setFrom(result.getCoinList());
  if (null != result.getChange()) {
    tx.getCoinData().getTo().add(result.getChange());
  }
  Na fee=TransactionFeeCalculator.getMaxFee(tx.size() + P2PKHScriptSig.DEFAULT_SERIALIZE_LENGTH);
  return Result.getSuccess().setData(fee).toRpcClientResult();
}