Program: 91137
Project: 91137
Buggy source:
private List<TransactionSummary> getTransactionSummaries(){
  allTransactionSummaries=new ArrayList<>();
  for (  Tx.Json tx : historyTxList) {
    Sha256Hash hash=new Sha256Hash(Hex.decode(tx.txid));
    TransactionExApi extendedInfo=null;
    if (historyTxInfosList != null) {
      for (      TransactionExApi tex : historyTxInfosList) {
        if (tex.txid.compareTo(hash) == 0) {
          extendedInfo=tex;
          Log.d(TAG,"String_Node_Str" + hash);
          break;
        }
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
    }
    if (extendedInfo == null) {
      Log.d(TAG,"String_Node_Str" + hash + "String_Node_Str");
    }
    long outgoingAsset=0;
    long outgoingSatoshi=0;
    for (    Vin.Json vin : tx.vin) {
      if (vin.assets.size() > 0) {
        if (vin.previousOutput.addresses != null && vin.previousOutput.addresses.contains(this.address.toString())) {
          for (          Asset.Json anAsset : vin.assets) {
            if (anAsset.assetId.contentEquals(coluAsset.id)) {
              outgoingAsset=outgoingAsset + anAsset.amount;
            }
          }
        }
      }
 else {
        if (vin.previousOutput.addresses != null && vin.previousOutput.addresses.contains(this.address.toString())) {
          outgoingSatoshi+=vin.value;
        }
      }
    }
    Log.d(TAG,"String_Node_Str" + outgoingAsset);
    Log.d(TAG,"String_Node_Str" + outgoingSatoshi);
    long incomingAsset=0;
    long incomingSatoshi=0;
    List<Address> toAddresses=new ArrayList<>();
    Optional<Address> destinationAddress=null;
    for (    Vout.Json vout : tx.vout) {
      if (vout.scriptPubKey.addresses != null) {
        for (        String address : vout.scriptPubKey.addresses) {
          toAddresses.add(Address.fromString(address));
        }
        if (vout.scriptPubKey.addresses.size() > 0) {
          Address address=Address.fromString(vout.scriptPubKey.addresses.get(0));
          if (!isMine(address)) {
            destinationAddress=Optional.fromNullable(address);
          }
        }
      }
      if (vout.assets.size() > 0) {
        if (vout.scriptPubKey.addresses != null && vout.scriptPubKey.addresses.contains(this.address.toString())) {
          for (          Asset.Json anAsset : vout.assets) {
            if (anAsset.assetId.contentEquals(coluAsset.id)) {
              incomingAsset=incomingAsset + anAsset.amount;
            }
          }
          break;
        }
      }
 else {
        if (vout.scriptPubKey.addresses != null && vout.scriptPubKey.addresses.contains(this.address.toString())) {
          incomingSatoshi+=vout.value;
        }
      }
    }
    BigDecimal valueBigDecimal;
    ExactCurrencyValue value;
    long assetBalance=incomingAsset - outgoingAsset;
    long satoshiBalance=incomingSatoshi - outgoingSatoshi;
    boolean isIncoming;
    if (assetBalance != 0) {
      isIncoming=assetBalance > 0;
      valueBigDecimal=BigDecimal.valueOf(Math.abs(assetBalance),coluAsset.scale);
      value=ExactCurrencyValue.from(valueBigDecimal,coluAsset.name);
    }
 else     if (satoshiBalance != 0) {
      isIncoming=satoshiBalance > 0;
      valueBigDecimal=BigDecimal.valueOf(Math.abs(satoshiBalance),8);
      value=ExactCurrencyValue.from(valueBigDecimal,"String_Node_Str");
    }
 else {
      continue;
    }
    long time=0;
    int height=(int)tx.blockheight;
    boolean isQueuedOutgoing=false;
    if (extendedInfo != null) {
      time=extendedInfo.time;
    }
 else {
      time=new Date().getTime();
    }
    int confirmations=tx.confirmations;
    if (destinationAddress == null) {
      destinationAddress=Optional.absent();
    }
    if (destinationAddress != null && destinationAddress.isPresent()) {
      Log.d(TAG,"String_Node_Str" + hash + "String_Node_Str"+ time+ "String_Node_Str"+ height+ "String_Node_Str"+ confirmations+ "String_Node_Str"+ destinationAddress.get().toString());
    }
 else {
      Log.d(TAG,"String_Node_Str" + hash + "String_Node_Str"+ time+ "String_Node_Str"+ height+ "String_Node_Str"+ confirmations);
    }
    TransactionSummary summary=new TransactionSummary(hash,value,isIncoming,time,height,confirmations,isQueuedOutgoing,null,destinationAddress,toAddresses);
    allTransactionSummaries.add(summary);
  }
  Log.d(TAG,"String_Node_Str" + allTransactionSummaries.size() + "String_Node_Str");
  Collections.sort(allTransactionSummaries,new Comparator<TransactionSummary>(){
    public int compare(    TransactionSummary p1,    TransactionSummary p2){
      return (int)(p2.time - p1.time);
    }
  }
);
  return allTransactionSummaries;
}

Fixed version (ground truth):
private List<TransactionSummary> getTransactionSummaries(){
  allTransactionSummaries=new ArrayList<>();
  for (  Tx.Json tx : historyTxList) {
    Sha256Hash hash=new Sha256Hash(Hex.decode(tx.txid));
    TransactionExApi extendedInfo=null;
    if (historyTxInfosList != null) {
      for (      TransactionExApi tex : historyTxInfosList) {
        if (tex.txid.compareTo(hash) == 0) {
          extendedInfo=tex;
          Log.d(TAG,"String_Node_Str" + hash);
          break;
        }
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
    }
    if (extendedInfo == null) {
      Log.d(TAG,"String_Node_Str" + hash + "String_Node_Str");
    }
    long outgoingAsset=0;
    long outgoingSatoshi=0;
    for (    Vin.Json vin : tx.vin) {
      if (vin.assets.size() > 0) {
        if (vin.previousOutput.addresses != null && vin.previousOutput.addresses.contains(this.address.toString())) {
          for (          Asset.Json anAsset : vin.assets) {
            if (anAsset.assetId.contentEquals(coluAsset.id)) {
              outgoingAsset=outgoingAsset + anAsset.amount;
            }
          }
        }
      }
 else {
        if (vin.previousOutput.addresses != null && vin.previousOutput.addresses.contains(this.address.toString())) {
          outgoingSatoshi+=vin.value;
        }
      }
    }
    Log.d(TAG,"String_Node_Str" + outgoingAsset);
    Log.d(TAG,"String_Node_Str" + outgoingSatoshi);
    long incomingAsset=0;
    long incomingSatoshi=0;
    List<Address> toAddresses=new ArrayList<>();
    Optional<Address> destinationAddress=null;
    for (    Vout.Json vout : tx.vout) {
      if (vout.scriptPubKey.addresses != null) {
        for (        String address : vout.scriptPubKey.addresses) {
          toAddresses.add(Address.fromString(address));
        }
        if (vout.scriptPubKey.addresses.size() > 0) {
          Address address=Address.fromString(vout.scriptPubKey.addresses.get(0));
          if (!isMine(address)) {
            destinationAddress=Optional.fromNullable(address);
          }
        }
      }
      if (vout.assets.size() > 0) {
        if (vout.scriptPubKey.addresses != null && vout.scriptPubKey.addresses.contains(this.address.toString())) {
          for (          Asset.Json anAsset : vout.assets) {
            if (anAsset.assetId.contentEquals(coluAsset.id)) {
              incomingAsset=incomingAsset + anAsset.amount;
            }
          }
          break;
        }
      }
 else {
        if (vout.scriptPubKey.addresses != null && vout.scriptPubKey.addresses.contains(this.address.toString())) {
          incomingSatoshi+=vout.value;
        }
      }
    }
    BigDecimal valueBigDecimal;
    ExactCurrencyValue value;
    long assetBalance=incomingAsset - outgoingAsset;
    long satoshiBalance=incomingSatoshi - outgoingSatoshi;
    boolean isIncoming;
    if (assetBalance != 0) {
      isIncoming=assetBalance > 0;
      valueBigDecimal=BigDecimal.valueOf(Math.abs(assetBalance),coluAsset.scale);
      value=ExactCurrencyValue.from(valueBigDecimal,coluAsset.name);
    }
 else     if (satoshiBalance != 0) {
      isIncoming=satoshiBalance > 0;
      valueBigDecimal=BigDecimal.valueOf(Math.abs(satoshiBalance),8);
      value=ExactCurrencyValue.from(valueBigDecimal,"String_Node_Str");
    }
 else {
      continue;
    }
    long time=0;
    int height=(int)tx.blockheight;
    boolean isQueuedOutgoing=false;
    if (extendedInfo != null) {
      time=extendedInfo.time;
    }
 else {
      time=new Date().getTime();
    }
    int confirmations=tx.confirmations;
    if (destinationAddress == null) {
      destinationAddress=Optional.absent();
    }
    if (destinationAddress != null && destinationAddress.isPresent()) {
      Log.d(TAG,"String_Node_Str" + hash + "String_Node_Str"+ time+ "String_Node_Str"+ height+ "String_Node_Str"+ confirmations+ "String_Node_Str"+ destinationAddress.get().toString());
    }
 else {
      Log.d(TAG,"String_Node_Str" + hash + "String_Node_Str"+ time+ "String_Node_Str"+ height+ "String_Node_Str"+ confirmations);
    }
    TransactionSummary summary=new TransactionSummary(hash,value,isIncoming,time,height,confirmations,isQueuedOutgoing,null,destinationAddress,toAddresses);
    allTransactionSummaries.add(summary);
  }
  Log.d(TAG,"String_Node_Str" + allTransactionSummaries.size() + "String_Node_Str");
  Collections.sort(allTransactionSummaries,new Comparator<TransactionSummary>(){
    public int compare(    TransactionSummary p1,    TransactionSummary p2){
      if (p2 == null) {
        return -1;
      }
 else       if (p1 == null) {
        return 1;
      }
 else {
        return (int)(p2.time - p1.time);
      }
    }
  }
);
  return allTransactionSummaries;
}