Program: 91087
Project: 91087
Buggy source:
@Subscribe public void syncStopped(SyncStopped event){
  TextView tvRecv=(TextView)findViewById(R.id.tvReceived);
  TextView tvRecvWarning=(TextView)findViewById(R.id.tvReceivedWarningAmount);
  final WalletAccount selectedAccount=_mbwManager.getSelectedAccount();
  final List<TransactionSummary> transactionsSince=selectedAccount.getTransactionsSince(_receivingSince);
  final ArrayList<TransactionSummary> interesting=new ArrayList<TransactionSummary>();
  CurrencyValue sum=ExactBitcoinValue.ZERO;
  for (  TransactionSummary item : transactionsSince) {
    if (item.toAddresses.contains(_address)) {
      interesting.add(item);
      sum=item.value;
    }
  }
  if (interesting.size() > 0) {
    String formattedValue=accountDisplayStrategy.getFormattedValue(sum);
    tvRecv.setText(getString(R.string.incoming_payment,formattedValue));
    if (!CurrencyValue.isNullOrZero(_amount)) {
      tvRecvWarning.setVisibility(sum.equals(_amount) ? View.GONE : View.VISIBLE);
    }
 else {
      tvRecvWarning.setVisibility(View.GONE);
    }
    tvRecv.setVisibility(View.VISIBLE);
    if (!sum.equals(_lastAddressBalance)) {
      Uri soundUri=RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
      NotificationCompat.Builder mBuilder=new NotificationCompat.Builder(getApplicationContext()).setSmallIcon(R.drawable.ic_launcher).setSound(soundUri,AudioManager.STREAM_NOTIFICATION);
      notificationManager.notify(0,mBuilder.build());
      _lastAddressBalance=sum;
    }
  }
 else {
    tvRecv.setVisibility(View.GONE);
  }
}

Fixed version (ground truth):
@Subscribe public void syncStopped(SyncStopped event){
  TextView tvRecv=(TextView)findViewById(R.id.tvReceived);
  TextView tvRecvWarning=(TextView)findViewById(R.id.tvReceivedWarningAmount);
  final WalletAccount selectedAccount=_mbwManager.getSelectedAccount();
  final List<TransactionSummary> transactionsSince=selectedAccount.getTransactionsSince(_receivingSince);
  final ArrayList<TransactionSummary> interesting=new ArrayList<TransactionSummary>();
  CurrencyValue sum=ExactBitcoinValue.ZERO;
  for (  TransactionSummary item : transactionsSince) {
    if (item.toAddresses.contains(_address)) {
      interesting.add(item);
      sum=item.value;
    }
  }
  if (interesting.size() > 0) {
    String formattedValue=accountDisplayStrategy.getFormattedValue(sum);
    tvRecv.setText(getString(R.string.incoming_payment,formattedValue));
    if (!CurrencyValue.isNullOrZero(_amount)) {
      tvRecvWarning.setVisibility(sum.equals(_amount) ? View.GONE : View.VISIBLE);
    }
 else {
      tvRecvWarning.setVisibility(View.GONE);
    }
    tvRecv.setVisibility(View.VISIBLE);
    if (!sum.equals(_lastAddressBalance)) {
      Uri soundUri=RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
      NotificationManager notificationManager=(NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE);
      NotificationCompat.Builder mBuilder=new NotificationCompat.Builder(getApplicationContext()).setSmallIcon(R.drawable.ic_launcher).setSound(soundUri,AudioManager.STREAM_NOTIFICATION);
      notificationManager.notify(0,mBuilder.build());
      _lastAddressBalance=sum;
    }
  }
 else {
    tvRecv.setVisibility(View.GONE);
  }
}