Program: 171978
Project: 171978
Buggy source:
private void loadTx(){
  if (!isTxDetail) {
    txt_date_title.setVisibility(View.GONE);
    txt_date.setVisibility(View.GONE);
    container_confirmations.setVisibility(View.GONE);
    txt_confirmations.setVisibility(View.GONE);
  }
 else {
    SimpleDateFormat simpleDateFormat=new SimpleDateFormat();
    txt_date.setText(simpleDateFormat.format(transactionWrapper.getTransaction().getUpdateTime()));
  }
  txt_transaction_id.setText(transactionWrapper.getTransaction().getHashAsString());
  txt_amount.setText(transactionWrapper.getAmount().toFriendlyString());
  Coin fee=null;
  if (transactionWrapper.isStake()) {
    fee=Coin.ZERO;
  }
 else   if (transactionWrapper.getTransaction().getFee() != null) {
    fee=transactionWrapper.getTransaction().getFee();
  }
 else {
    try {
      Coin inputsSum=Coin.ZERO;
      for (      TransactionInput input : transactionWrapper.getTransaction().getInputs()) {
        TransactionOutPoint unspent=input.getOutpoint();
        inputsSum=inputsSum.plus(pivxModule.getUnspentValue(unspent.getHash(),(int)unspent.getIndex()));
      }
      fee=inputsSum.subtract(transactionWrapper.getTransaction().getOutputSum());
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  if (fee != null)   txt_fee.setText(fee.toFriendlyString());
 else   txt_fee.setText(R.string.no_data_available);
  if (transactionWrapper.getTransaction().getMemo() != null && transactionWrapper.getTransaction().getMemo().length() > 0) {
    txt_memo.setText(transactionWrapper.getTransaction().getMemo());
  }
 else {
    txt_memo.setText(R.string.tx_detail_no_memo);
  }
  txt_confirmations.setText(String.valueOf(transactionWrapper.getTransaction().getConfidence().getDepthInBlocks()));
  txt_tx_weight.setText(transactionWrapper.getTransaction().unsafeBitcoinSerialize().length + "String_Node_Str");
  txt_inputs.setText(getString(R.string.tx_detail_inputs,transactionWrapper.getTransaction().getInputs().size()));
  List<OutputUtil> list=new ArrayList<>();
  for (  TransactionOutput transactionOutput : transactionWrapper.getTransaction().getOutputs()) {
    String label;
    if (transactionWrapper.getOutputLabels() != null && transactionWrapper.getOutputLabels().containsKey(transactionOutput.getIndex())) {
      AddressLabel addressLabel=transactionWrapper.getOutputLabels().get(transactionOutput.getIndex());
      if (addressLabel != null) {
        if (addressLabel.getName() != null) {
          label=addressLabel.getName();
        }
 else         label=transactionOutput.getScriptPubKey().getToAddress(pivxModule.getConf().getNetworkParams(),true).toBase58();
      }
 else {
        label=transactionOutput.getScriptPubKey().getToAddress(pivxModule.getConf().getNetworkParams(),true).toBase58();
      }
    }
 else {
      Script script=transactionOutput.getScriptPubKey();
      if (script.isPayToScriptHash() || script.isSentToRawPubKey() || script.isSentToAddress()) {
        label=script.getToAddress(pivxModule.getConf().getNetworkParams(),true).toBase58();
      }
 else {
        label=script.toString();
      }
    }
    list.add(new OutputUtil(transactionOutput.getIndex(),label,transactionOutput.getValue()));
  }
  setupOutputs(list);
}

Fixed version (ground truth):
private void loadTx(){
  if (!isTxDetail) {
    txt_date_title.setVisibility(View.GONE);
    txt_date.setVisibility(View.GONE);
    container_confirmations.setVisibility(View.GONE);
    txt_confirmations.setVisibility(View.GONE);
  }
 else {
    SimpleDateFormat simpleDateFormat=new SimpleDateFormat("String_Node_Str");
    txt_date.setText(simpleDateFormat.format(transactionWrapper.getTransaction().getUpdateTime()));
  }
  txt_transaction_id.setText(transactionWrapper.getTransaction().getHashAsString());
  txt_amount.setText(transactionWrapper.getAmount().toFriendlyString());
  Coin fee=null;
  if (transactionWrapper.isStake()) {
    fee=Coin.ZERO;
  }
 else   if (transactionWrapper.getTransaction().getFee() != null) {
    fee=transactionWrapper.getTransaction().getFee();
  }
 else {
    try {
      Coin inputsSum=Coin.ZERO;
      for (      TransactionInput input : transactionWrapper.getTransaction().getInputs()) {
        TransactionOutPoint unspent=input.getOutpoint();
        inputsSum=inputsSum.plus(pivxModule.getUnspentValue(unspent.getHash(),(int)unspent.getIndex()));
      }
      fee=inputsSum.subtract(transactionWrapper.getTransaction().getOutputSum());
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  if (fee != null)   txt_fee.setText(fee.toFriendlyString());
 else   txt_fee.setText(R.string.no_data_available);
  if (transactionWrapper.getTransaction().getMemo() != null && transactionWrapper.getTransaction().getMemo().length() > 0) {
    txt_memo.setText(transactionWrapper.getTransaction().getMemo());
  }
 else {
    txt_memo.setText(R.string.tx_detail_no_memo);
  }
  txt_confirmations.setText(String.valueOf(transactionWrapper.getTransaction().getConfidence().getDepthInBlocks()));
  txt_tx_weight.setText(transactionWrapper.getTransaction().unsafeBitcoinSerialize().length + "String_Node_Str");
  txt_inputs.setText(getString(R.string.tx_detail_inputs,transactionWrapper.getTransaction().getInputs().size()));
  List<OutputUtil> list=new ArrayList<>();
  for (  TransactionOutput transactionOutput : transactionWrapper.getTransaction().getOutputs()) {
    String label;
    if (transactionWrapper.getOutputLabels() != null && transactionWrapper.getOutputLabels().containsKey(transactionOutput.getIndex())) {
      AddressLabel addressLabel=transactionWrapper.getOutputLabels().get(transactionOutput.getIndex());
      if (addressLabel != null) {
        if (addressLabel.getName() != null) {
          label=addressLabel.getName();
        }
 else         label=transactionOutput.getScriptPubKey().getToAddress(pivxModule.getConf().getNetworkParams(),true).toBase58();
      }
 else {
        label=transactionOutput.getScriptPubKey().getToAddress(pivxModule.getConf().getNetworkParams(),true).toBase58();
      }
    }
 else {
      Script script=transactionOutput.getScriptPubKey();
      if (script.isPayToScriptHash() || script.isSentToRawPubKey() || script.isSentToAddress()) {
        label=script.getToAddress(pivxModule.getConf().getNetworkParams(),true).toBase58();
      }
 else {
        label=script.toString();
      }
    }
    list.add(new OutputUtil(transactionOutput.getIndex(),label,transactionOutput.getValue()));
  }
  setupOutputs(list);
}