nus-yam/ex-repair huggingface dataset:
Program: 91031
Project: 91031
Buggy source:
private Notice determineNotice(){
  WalletAccount account=_mbwManager.getSelectedAccount();
  MetadataStorage meta=_mbwManager.getMetadataStorage();
  Optional<Integer> resetPinRemainingBlocksCount=_mbwManager.getResetPinRemainingBlocksCount();
  if (resetPinRemainingBlocksCount.isPresent() && resetPinRemainingBlocksCount.get() == 0) {
    return Notice.RESET_PIN_AVAILABLE;
  }
  if (resetPinRemainingBlocksCount.isPresent()) {
    return Notice.RESET_PIN_IN_PROGRESS;
  }
  if (meta.getMasterSeedBackupState() != MetadataStorage.BackupState.VERIFIED) {
    if (account instanceof Bip44Account) {
      return Notice.BACKUP_MISSING;
    }
  }
  if ((account instanceof ColuAccount || account instanceof SingleAddressAccount) && account.canSpend()) {
    MetadataStorage.BackupState state=meta.getOtherAccountBackupState(account.getId());
    if (state == MetadataStorage.BackupState.NOT_VERIFIED) {
      return Notice.SINGLEKEY_VERIFY_MISSING;
    }
 else     if (state != MetadataStorage.BackupState.VERIFIED && state != MetadataStorage.BackupState.IGNORED) {
      return Notice.SINGLEKEY_BACKUP_MISSING;
    }
  }
  if (RecordRowBuilder.showLegacyAccountWarning(account,_mbwManager)) {
    return Notice.MOVE_LEGACY_FUNDS;
  }
  return Notice.NONE;
}

Fixed version (ground truth):
private Notice determineNotice(){
  WalletAccount account=_mbwManager.getSelectedAccount();
  MetadataStorage meta=_mbwManager.getMetadataStorage();
  Optional<Integer> resetPinRemainingBlocksCount=_mbwManager.getResetPinRemainingBlocksCount();
  if (resetPinRemainingBlocksCount.isPresent() && resetPinRemainingBlocksCount.get() == 0) {
    return Notice.RESET_PIN_AVAILABLE;
  }
  if (resetPinRemainingBlocksCount.isPresent()) {
    return Notice.RESET_PIN_IN_PROGRESS;
  }
  if (meta.getMasterSeedBackupState() != MetadataStorage.BackupState.VERIFIED) {
    if (account instanceof Bip44Account) {
      return Notice.BACKUP_MISSING;
    }
  }
  if ((account instanceof ColuAccount || account instanceof SingleAddressAccount) && account.canSpend()) {
    MetadataStorage.BackupState state=meta.getOtherAccountBackupState(account.getId());
    if (state == MetadataStorage.BackupState.NOT_VERIFIED) {
      return Notice.SINGLEKEY_VERIFY_MISSING;
    }
 else     if (state != MetadataStorage.BackupState.VERIFIED && state != MetadataStorage.BackupState.IGNORED) {
      return Notice.SINGLEKEY_BACKUP_MISSING;
    }
  }
  return Notice.NONE;
}
Program: 91035
Project: 91035
Buggy source:
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=UUID.nameUUIDFromBytes(("String_Node_Str" + walletAccount.getId().toString()).getBytes());
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}

Fixed version (ground truth):
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=getBitcoinCashAccountId(walletAccount);
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}
Program: 91038
Project: 91038
Buggy source:
@OnClick(R.id.buttonContinue) void createAndSignTransaction(){
  mbwManager.runPinProtectedFunction(getActivity(),new Runnable(){
    @Override public void run(){
      buttonContinue.setEnabled(false);
      long fromValue=ExactBitcoinCashValue.from(BigDecimal.valueOf(offer.amountFrom)).getLongValue();
      lastOperationId=UUID.randomUUID().toString();
switch (fromAccount.getType()) {
case BCHBIP44:
{
          Bip44BCHAccount bip44BCHAccount=(Bip44BCHAccount)fromAccount;
          Intent serviceIntent=IntentContract.SendFunds.createIntent(lastOperationId,bip44BCHAccount.getAccountIndex(),offer.payinAddress,fromValue,TransactionFee.NORMAL,1.0f);
          WalletApplication.sendToSpv(serviceIntent,WalletAccount.Type.BCHBIP44);
          break;
        }
case BCHSINGLEADDRESS:
{
        SingleAddressBCHAccount bip44BCHAccount=(SingleAddressBCHAccount)fromAccount;
        Intent service=IntentContract.SendFundsSingleAddress.createIntent(lastOperationId,bip44BCHAccount.getId().toString(),offer.payinAddress,fromValue,TransactionFee.NORMAL,1.0f);
        WalletApplication.sendToSpv(service,WalletAccount.Type.BCHSINGLEADDRESS);
        break;
      }
  }
}
}
);
}

Fixed version (ground truth):
@OnClick(R.id.buttonContinue) void createAndSignTransaction(){
  mbwManager.runPinProtectedFunction(getActivity(),new Runnable(){
    @Override public void run(){
      buttonContinue.setEnabled(false);
      long fromValue=ExactBitcoinCashValue.from(BigDecimal.valueOf(offer.amountFrom)).getLongValue();
      lastOperationId=UUID.randomUUID().toString();
switch (fromAccount.getType()) {
case BCHBIP44:
{
          Bip44BCHAccount bip44BCHAccount=(Bip44BCHAccount)fromAccount;
          Intent serviceIntent=IntentContract.SendFunds.createIntent(lastOperationId,bip44BCHAccount.getAccountIndex(),offer.payinAddress,fromValue,TransactionFee.NORMAL,1.0f);
          WalletApplication.sendToSpv(serviceIntent,WalletAccount.Type.BCHBIP44);
          break;
        }
case BCHSINGLEADDRESS:
{
        SingleAddressBCHAccount bip44BCHAccount=(SingleAddressBCHAccount)fromAccount;
        Intent service=IntentContract.SendFundsSingleAddress.createIntent(lastOperationId,bip44BCHAccount.getId().toString(),offer.payinAddress,fromValue,TransactionFee.NORMAL,1.0f);
        WalletApplication.sendToSpv(service,WalletAccount.Type.BCHSINGLEADDRESS);
        break;
      }
  }
  progressDialog=new ProgressDialog(getActivity());
  progressDialog.setIndeterminate(true);
  progressDialog.setMessage(getString(R.string.sending));
  progressDialog.show();
}
}
);
}
Program: 91039
Project: 91039
Buggy source:
private void createOffer(){
  BigDecimal txFee=UtilsKt.estimateFeeFromTransferrableAmount(fromAccount,mbwManager,BitcoinCash.valueOf(amount).getLongValue());
  Intent changellyServiceIntent=new Intent(getActivity(),ChangellyService.class).setAction(ChangellyService.ACTION_CREATE_TRANSACTION).putExtra(ChangellyService.FROM,ChangellyService.BCH).putExtra(ChangellyService.TO,ChangellyService.BTC).putExtra(ChangellyService.AMOUNT,amount - txFee.doubleValue()).putExtra(ChangellyService.DESTADDRESS,toAccount.getReceivingAddress().get().toString());
  getActivity().startService(changellyServiceIntent);
  progressDialog=new ProgressDialog(getActivity());
  progressDialog.setIndeterminate(true);
  progressDialog.setMessage("String_Node_Str");
  progressDialog.show();
}

Fixed version (ground truth):
private void createOffer(){
  BigDecimal txFee=UtilsKt.estimateFeeFromTransferrableAmount(fromAccount,mbwManager,BitcoinCash.valueOf(amount).getLongValue());
  Intent changellyServiceIntent=new Intent(getActivity(),ChangellyService.class).setAction(ChangellyService.ACTION_CREATE_TRANSACTION).putExtra(ChangellyService.FROM,ChangellyService.BCH).putExtra(ChangellyService.TO,ChangellyService.BTC).putExtra(ChangellyService.AMOUNT,amount - txFee.doubleValue()).putExtra(ChangellyService.DESTADDRESS,toAccount.getReceivingAddress().get().toString());
  getActivity().startService(changellyServiceIntent);
  progressDialog=new ProgressDialog(getActivity());
  progressDialog.setIndeterminate(true);
  progressDialog.setMessage(getString(R.string.waiting_offer));
  progressDialog.show();
}
Program: 91040
Project: 91040
Buggy source:
private void updateUi(){
  try {
    exchangeFiatRate.setText(Utils.formatFiatWithUnit(mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())))));
  }
 catch (  NumberFormatException ignore) {
  }
  exchangeFiatRate.setVisibility(View.VISIBLE);
  exchangeRate.setText("String_Node_Str" + CurrencyValue.fromValue(ExactBitcoinCashValue.ONE,"String_Node_Str",mbwManager.getExchangeRateManager()));
  exchangeRate.setVisibility(View.VISIBLE);
}

Fixed version (ground truth):
private void updateUi(){
  try {
    CurrencyValue currencyValue=mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())));
    if (currencyValue != null && currencyValue.getValue() != null) {
      exchangeFiatRate.setText(Utils.formatFiatWithUnit(currencyValue));
      exchangeFiatRate.setVisibility(View.VISIBLE);
    }
 else {
      exchangeFiatRate.setVisibility(View.GONE);
    }
  }
 catch (  NumberFormatException ignore) {
  }
}
Program: 91042
Project: 91042
Buggy source:
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=UUID.nameUUIDFromBytes(("String_Node_Str" + walletAccount.getId().toString()).getBytes());
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}

Fixed version (ground truth):
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=getBitcoinCashAccountId(walletAccount);
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}
Program: 91044
Project: 91044
Buggy source:
private void updateUi(){
  try {
    exchangeFiatRate.setText(Utils.formatFiatWithUnit(mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())))));
  }
 catch (  NumberFormatException ignore) {
  }
  exchangeFiatRate.setVisibility(View.VISIBLE);
  exchangeRate.setText("String_Node_Str" + CurrencyValue.fromValue(ExactBitcoinCashValue.ONE,"String_Node_Str",mbwManager.getExchangeRateManager()));
  exchangeRate.setVisibility(View.VISIBLE);
}

Fixed version (ground truth):
private void updateUi(){
  try {
    CurrencyValue currencyValue=mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())));
    if (currencyValue != null && currencyValue.getValue() != null) {
      exchangeFiatRate.setText(Utils.formatFiatWithUnit(currencyValue));
      exchangeFiatRate.setVisibility(View.VISIBLE);
    }
 else {
      exchangeFiatRate.setVisibility(View.GONE);
    }
  }
 catch (  NumberFormatException ignore) {
  }
}
Program: 91046
Project: 91046
Buggy source:
boolean isValueForOfferOk(boolean checkMin){
  tvError.setVisibility(View.GONE);
  String txtAmount=fromValue.getText().toString();
  if (txtAmount.isEmpty()) {
    buttonContinue.setEnabled(false);
    return false;
  }
  Double dblAmount;
  try {
    dblAmount=Double.parseDouble(txtAmount);
  }
 catch (  NumberFormatException e) {
    toast("String_Node_Str");
    buttonContinue.setEnabled(false);
    return false;
  }
  WalletAccount fromAccount=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem()).account;
  if (checkMin && minAmount == NOT_LOADED) {
    buttonContinue.setEnabled(false);
    toast("String_Node_Str");
    return false;
  }
 else   if (checkMin && dblAmount.compareTo(minAmount) < 0) {
    buttonContinue.setEnabled(false);
    tvError.setText(getString(R.string.exchange_minimum_amount,decimalFormat.format(minAmount),"String_Node_Str"));
    tvError.setVisibility(View.VISIBLE);
    scrollTo(tvError.getTop());
    return false;
  }
 else   if (fromAccount.getCurrencyBasedBalance().confirmed.getValue().compareTo(BigDecimal.valueOf(dblAmount)) < 0) {
    buttonContinue.setEnabled(false);
    tvError.setText(R.string.balance_error);
    tvError.setVisibility(View.VISIBLE);
    return false;
  }
  buttonContinue.setEnabled(true);
  return true;
}

Fixed version (ground truth):
boolean isValueForOfferOk(boolean checkMin){
  tvError.setVisibility(View.GONE);
  String txtAmount=fromValue.getText().toString();
  if (txtAmount.isEmpty()) {
    buttonContinue.setEnabled(false);
    return false;
  }
  Double dblAmount;
  try {
    dblAmount=Double.parseDouble(txtAmount);
  }
 catch (  NumberFormatException e) {
    toast("String_Node_Str");
    buttonContinue.setEnabled(false);
    return false;
  }
  WalletAccount fromAccount=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem()).account;
  if (checkMin && minAmount == NOT_LOADED) {
    buttonContinue.setEnabled(false);
    toast("String_Node_Str");
    return false;
  }
 else   if (checkMin && dblAmount.compareTo(minAmount) < 0) {
    buttonContinue.setEnabled(false);
    if (dblAmount != 0) {
      tvError.setText(getString(R.string.exchange_minimum_amount,decimalFormat.format(minAmount),"String_Node_Str"));
      tvError.setVisibility(View.VISIBLE);
    }
    scrollTo(tvError.getTop());
    return false;
  }
 else   if (fromAccount.getCurrencyBasedBalance().confirmed.getValue().compareTo(BigDecimal.valueOf(dblAmount)) < 0) {
    buttonContinue.setEnabled(false);
    tvError.setText(R.string.balance_error);
    tvError.setVisibility(View.VISIBLE);
    return false;
  }
  buttonContinue.setEnabled(true);
  return true;
}
Program: 91047
Project: 91047
Buggy source:
@OnClick(R.id.toValueLayout) void toValueClick(){
  valueKeyboard.setInputTextView(toValue);
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setEntry(toValue.getText().toString());
  toLayout.setAlpha(Constants.ACTIVE_ALPHA);
  fromLayout.setAlpha(Constants.INACTIVE_ALPHA);
  valueKeyboard.setSpendableValue(BigDecimal.ZERO);
  valueKeyboard.setMaxValue(MAX_BITCOIN_VALUE);
  scrollView.post(new Runnable(){
    @Override public void run(){
      scrollView.smoothScrollTo(0,toLayout.getBottom());
    }
  }
);
}

Fixed version (ground truth):
@OnClick(R.id.toValueLayout) void toValueClick(){
  valueKeyboard.setInputTextView(toValue);
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setEntry(toValue.getText().toString());
  toLayout.setAlpha(Constants.ACTIVE_ALPHA);
  fromLayout.setAlpha(Constants.INACTIVE_ALPHA);
  valueKeyboard.setSpendableValue(BigDecimal.ZERO);
  valueKeyboard.setMaxValue(MAX_BITCOIN_VALUE);
  scrollTo(toLayout.getBottom());
}
Program: 91048
Project: 91048
Buggy source:
boolean isValueForOfferOk(boolean checkMin){
  tvError.setVisibility(View.GONE);
  String txtAmount=fromValue.getText().toString();
  if (txtAmount.isEmpty()) {
    buttonContinue.setEnabled(false);
    return false;
  }
  Double dblAmount;
  try {
    dblAmount=Double.parseDouble(txtAmount);
  }
 catch (  NumberFormatException e) {
    toast("String_Node_Str");
    buttonContinue.setEnabled(false);
    return false;
  }
  WalletAccount fromAccount=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem()).account;
  if (checkMin && minAmount == NOT_LOADED) {
    buttonContinue.setEnabled(false);
    toast("String_Node_Str");
    return false;
  }
 else   if (checkMin && dblAmount.compareTo(minAmount) < 0) {
    buttonContinue.setEnabled(false);
    tvError.setText(getString(R.string.exchange_minimum_amount,decimalFormat.format(minAmount),"String_Node_Str"));
    tvError.setVisibility(View.VISIBLE);
    return false;
  }
 else   if (fromAccount.getCurrencyBasedBalance().confirmed.getValue().compareTo(BigDecimal.valueOf(dblAmount)) < 0) {
    buttonContinue.setEnabled(false);
    tvError.setText(R.string.balance_error);
    tvError.setVisibility(View.VISIBLE);
    return false;
  }
  buttonContinue.setEnabled(true);
  return true;
}

Fixed version (ground truth):
boolean isValueForOfferOk(boolean checkMin){
  tvError.setVisibility(View.GONE);
  String txtAmount=fromValue.getText().toString();
  if (txtAmount.isEmpty()) {
    buttonContinue.setEnabled(false);
    return false;
  }
  Double dblAmount;
  try {
    dblAmount=Double.parseDouble(txtAmount);
  }
 catch (  NumberFormatException e) {
    toast("String_Node_Str");
    buttonContinue.setEnabled(false);
    return false;
  }
  WalletAccount fromAccount=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem()).account;
  if (checkMin && minAmount == NOT_LOADED) {
    buttonContinue.setEnabled(false);
    toast("String_Node_Str");
    return false;
  }
 else   if (checkMin && dblAmount.compareTo(minAmount) < 0) {
    buttonContinue.setEnabled(false);
    tvError.setText(getString(R.string.exchange_minimum_amount,decimalFormat.format(minAmount),"String_Node_Str"));
    tvError.setVisibility(View.VISIBLE);
    scrollTo(tvError.getTop());
    return false;
  }
 else   if (fromAccount.getCurrencyBasedBalance().confirmed.getValue().compareTo(BigDecimal.valueOf(dblAmount)) < 0) {
    buttonContinue.setEnabled(false);
    tvError.setText(R.string.balance_error);
    tvError.setVisibility(View.VISIBLE);
    return false;
  }
  buttonContinue.setEnabled(true);
  return true;
}
Program: 91049
Project: 91049
Buggy source:
@OnClick(R.id.buttonContinue) void continueClick(){
  String txtAmount=fromValue.getText().toString();
  Double dblAmount;
  try {
    dblAmount=Double.parseDouble(txtAmount);
  }
 catch (  NumberFormatException e) {
    toast("String_Node_Str");
    buttonContinue.setEnabled(false);
    return;
  }
  Fragment fragment=new ConfirmExchangeFragment();
  Bundle bundle=new Bundle();
  bundle.putDouble(Constants.FROM_AMOUNT,dblAmount);
  WalletAccount toAccount=toAccountAdapter.getItem(toRecyclerView.getSelectedItem()).account;
  bundle.putSerializable(Constants.DESTADDRESS,toAccount.getId());
  WalletAccount fromAccount=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem()).account;
  bundle.putSerializable(Constants.FROM_ADDRESS,fromAccount.getId());
  fragment.setArguments(bundle);
  getFragmentManager().beginTransaction().replace(R.id.fragment_container,fragment,"String_Node_Str").addToBackStack("String_Node_Str").commitAllowingStateLoss();
}

Fixed version (ground truth):
@OnClick(R.id.buttonContinue) void continueClick(){
  String txtAmount=fromValue.getText().toString();
  Double dblAmount;
  try {
    dblAmount=Double.parseDouble(txtAmount);
  }
 catch (  NumberFormatException e) {
    toast("String_Node_Str");
    buttonContinue.setEnabled(false);
    return;
  }
  Fragment fragment=new ConfirmExchangeFragment();
  Bundle bundle=new Bundle();
  bundle.putDouble(Constants.FROM_AMOUNT,dblAmount);
  WalletAccount toAccount=toAccountAdapter.getItem(toRecyclerView.getSelectedItem()).account;
  bundle.putSerializable(Constants.DESTADDRESS,toAccount.getId());
  WalletAccount fromAccount=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem()).account;
  bundle.putSerializable(Constants.FROM_ADDRESS,fromAccount.getId());
  fragment.setArguments(bundle);
  getFragmentManager().beginTransaction().add(R.id.fragment_container,fragment,"String_Node_Str").addToBackStack("String_Node_Str").commitAllowingStateLoss();
}
Program: 91050
Project: 91050
Buggy source:
@Override public void run(){
  scrollView.smoothScrollTo(0,fromLayout.getTop());
}

Fixed version (ground truth):
@Override public void run(){
  scrollView.smoothScrollTo(0,to);
}
Program: 91051
Project: 91051
Buggy source:
@OnClick(R.id.fromValueLayout) void fromValueClick(){
  valueKeyboard.setInputTextView(fromValue);
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setEntry(fromValue.getText().toString());
  fromLayout.setAlpha(Constants.ACTIVE_ALPHA);
  toLayout.setAlpha(Constants.INACTIVE_ALPHA);
  AccountAdapter.Item item=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem());
  valueKeyboard.setSpendableValue(getMaxSpend(item.account));
  valueKeyboard.setMaxValue(MAX_BITCOIN_VALUE);
  scrollView.post(new Runnable(){
    @Override public void run(){
      scrollView.smoothScrollTo(0,fromLayout.getTop());
    }
  }
);
}

Fixed version (ground truth):
@OnClick(R.id.fromValueLayout) void fromValueClick(){
  valueKeyboard.setInputTextView(fromValue);
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setEntry(fromValue.getText().toString());
  fromLayout.setAlpha(Constants.ACTIVE_ALPHA);
  toLayout.setAlpha(Constants.INACTIVE_ALPHA);
  AccountAdapter.Item item=fromAccountAdapter.getItem(fromRecyclerView.getSelectedItem());
  valueKeyboard.setSpendableValue(getMaxSpend(item.account));
  valueKeyboard.setMaxValue(MAX_BITCOIN_VALUE);
  scrollTo(fromLayout.getTop());
}
Program: 91052
Project: 91052
Buggy source:
private void updateUi(){
  try {
    exchangeFiatRate.setText(Utils.formatFiatWithUnit(mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())))));
  }
 catch (  NumberFormatException ignore) {
  }
  exchangeFiatRate.setVisibility(View.VISIBLE);
  exchangeRate.setText("String_Node_Str" + CurrencyValue.fromValue(ExactBitcoinCashValue.ONE,"String_Node_Str",mbwManager.getExchangeRateManager()));
  exchangeRate.setVisibility(View.VISIBLE);
}

Fixed version (ground truth):
private void updateUi(){
  try {
    CurrencyValue currencyValue=mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())));
    if (currencyValue != null && currencyValue.getValue() != null) {
      exchangeFiatRate.setText(Utils.formatFiatWithUnit(currencyValue));
      exchangeFiatRate.setVisibility(View.VISIBLE);
    }
 else {
      exchangeFiatRate.setVisibility(View.GONE);
    }
  }
 catch (  NumberFormatException ignore) {
  }
}
Program: 91054
Project: 91054
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  super.onCreate(savedInstanceState);
  setContentView(R.layout.add_account_activity);
  ButterKnife.bind(this);
  _mbwManager=MbwManager.getInstance(this);
  _toaster=new Toaster(this);
  findViewById(R.id.btAdvanced).setOnClickListener(advancedClickListener);
  findViewById(R.id.btHdCreate).setOnClickListener(createHdAccount);
  final View coinapultUSD=findViewById(R.id.btCoinapultCreate);
  coinapultUSD.setOnClickListener(createCoinapultAccount);
  if (_mbwManager.getMetadataStorage().getMasterSeedBackupState() == MetadataStorage.BackupState.VERIFIED) {
    findViewById(R.id.tvWarningNoBackup).setVisibility(View.GONE);
  }
 else {
    findViewById(R.id.tvInfoBackup).setVisibility(View.GONE);
  }
  final View coluCreate=findViewById(R.id.btColuCreate);
  coluCreate.setOnClickListener(createColuAccount);
  _progress=new ProgressDialog(this);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  super.onCreate(savedInstanceState);
  setContentView(R.layout.add_account_activity);
  ButterKnife.bind(this);
  _mbwManager=MbwManager.getInstance(this);
  _toaster=new Toaster(this);
  findViewById(R.id.btAdvanced).setOnClickListener(advancedClickListener);
  findViewById(R.id.btHdCreate).setOnClickListener(createHdAccount);
  final View coinapultUSD=findViewById(R.id.btCoinapultCreate);
  coinapultUSD.setOnClickListener(createCoinapultAccount);
  if (_mbwManager.getMetadataStorage().getMasterSeedBackupState() == MetadataStorage.BackupState.VERIFIED) {
    findViewById(R.id.tvWarningNoBackup).setVisibility(View.GONE);
  }
 else {
    findViewById(R.id.tvInfoBackup).setVisibility(View.GONE);
  }
  final View coluCreate=findViewById(R.id.btColuCreate);
  coluCreate.setOnClickListener(createColuAccount);
  _progress=new ProgressDialog(this);
  hdBchCreate.setVisibility(BCHHelper.isModulePaired(getApplicationContext()) ? View.VISIBLE : View.GONE);
}
Program: 91056
Project: 91056
Buggy source:
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=UUID.nameUUIDFromBytes(("String_Node_Str" + walletAccount.getId().toString()).getBytes());
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}

Fixed version (ground truth):
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=getBitcoinCashAccountId(walletAccount);
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}
Program: 91058
Project: 91058
Buggy source:
private void updateUi(){
  try {
    exchangeFiatRate.setText(Utils.formatFiatWithUnit(mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())))));
  }
 catch (  NumberFormatException ignore) {
  }
  exchangeFiatRate.setVisibility(View.VISIBLE);
  exchangeRate.setText("String_Node_Str" + CurrencyValue.fromValue(ExactBitcoinCashValue.ONE,"String_Node_Str",mbwManager.getExchangeRateManager()));
  exchangeRate.setVisibility(View.VISIBLE);
}

Fixed version (ground truth):
private void updateUi(){
  try {
    CurrencyValue currencyValue=mbwManager.getCurrencySwitcher().getAsFiatValue(ExactBitcoinValue.from(new BigDecimal(toValue.getText().toString())));
    if (currencyValue != null && currencyValue.getValue() != null) {
      exchangeFiatRate.setText(Utils.formatFiatWithUnit(currencyValue));
      exchangeFiatRate.setVisibility(View.VISIBLE);
    }
 else {
      exchangeFiatRate.setVisibility(View.GONE);
    }
  }
 catch (  NumberFormatException ignore) {
  }
}
Program: 91060
Project: 91060
Buggy source:
private String getPaymentUri(){
  String prefix=accountDisplayStrategy.getLabel() + "String_Node_Str";
  final StringBuilder uri=new StringBuilder(prefix);
  uri.append(getBitcoinAddress());
  if (!CurrencyValue.isNullOrZero(_amount)) {
    if (accountDisplayType == AccountDisplayType.COLU_ACCOUNT) {
      uri.append("String_Node_Str").append(_amount.getValue().toPlainString());
    }
 else {
      uri.append("String_Node_Str").append(CoinUtil.valueString(getDefaultCurrencyAmount().getValue(),_mbwManager.getBitcoinDenomination(),false));
    }
  }
  return uri.toString();
}

Fixed version (ground truth):
private String getPaymentUri(){
  String prefix=accountDisplayStrategy.getLabel() + "String_Node_Str";
  final StringBuilder uri=new StringBuilder(prefix);
  uri.append(getBitcoinAddress());
  if (!CurrencyValue.isNullOrZero(_amount)) {
    if (accountDisplayType == AccountDisplayType.COLU_ACCOUNT) {
      uri.append("String_Node_Str").append(_amount.getValue().toPlainString());
    }
 else {
      uri.append("String_Node_Str").append(CoinUtil.valueString(getDefaultCurrencyAmount().getValue(),CoinUtil.Denomination.BTC,false));
    }
  }
  return uri.toString();
}
Program: 91062
Project: 91062
Buggy source:
@Override public void done(){
  currencySelector.setVisibility(View.VISIBLE);
  accountSelector.setVisibility(View.VISIBLE);
  titleView.setVisibility(View.VISIBLE);
  subtitleView.setVisibility(View.VISIBLE);
  fromLayout.setAlpha(Constants.INACTIVE_ALPHA);
  toLayout.setAlpha(Constants.INACTIVE_ALPHA);
}

Fixed version (ground truth):
@Override public void done(){
  titleView.setVisibility(View.VISIBLE);
  subtitleView.setVisibility(View.VISIBLE);
  fromLayout.setAlpha(Constants.INACTIVE_ALPHA);
  toLayout.setAlpha(Constants.INACTIVE_ALPHA);
}
Program: 91063
Project: 91063
Buggy source:
@OnClick(R.id.toLayout) void clickToValue(){
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setInputTextView(toValue);
  valueKeyboard.setEntry(toValue.getText().toString());
  currencySelector.setVisibility(View.GONE);
  accountSelector.setVisibility(View.GONE);
  titleView.setVisibility(View.GONE);
  subtitleView.setVisibility(View.GONE);
  fromLayout.setAlpha(Constants.INACTIVE_ALPHA);
  toLayout.setAlpha(Constants.ACTIVE_ALPHA);
}

Fixed version (ground truth):
@OnClick(R.id.toLayout) void clickToValue(){
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setInputTextView(toValue);
  valueKeyboard.setEntry(toValue.getText().toString());
  fromLayout.setAlpha(Constants.INACTIVE_ALPHA);
  toLayout.setAlpha(Constants.ACTIVE_ALPHA);
  llChangellyMain.post(new Runnable(){
    @Override public void run(){
      llChangellyMain.smoothScrollTo(0,toLayout.getTop());
    }
  }
);
}
Program: 91064
Project: 91064
Buggy source:
@OnClick(R.id.fromLayout) void clickFromValue(){
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setInputTextView(fromValue);
  valueKeyboard.setEntry(fromValue.getText().toString());
  currencySelector.setVisibility(View.GONE);
  accountSelector.setVisibility(View.GONE);
  titleView.setVisibility(View.GONE);
  subtitleView.setVisibility(View.GONE);
  fromLayout.setAlpha(Constants.ACTIVE_ALPHA);
  toLayout.setAlpha(Constants.INACTIVE_ALPHA);
}

Fixed version (ground truth):
@OnClick(R.id.fromLayout) void clickFromValue(){
  valueKeyboard.setVisibility(View.VISIBLE);
  valueKeyboard.setInputTextView(fromValue);
  valueKeyboard.setEntry(fromValue.getText().toString());
  fromLayout.setAlpha(Constants.ACTIVE_ALPHA);
  toLayout.setAlpha(Constants.INACTIVE_ALPHA);
  llChangellyMain.post(new Runnable(){
    @Override public void run(){
      llChangellyMain.smoothScrollTo(0,fromLayout.getTop());
    }
  }
);
}
Program: 91065
Project: 91065
Buggy source:
protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.changelly_offer_activity);
  ButterKnife.bind(this);
  receiver=new Receiver();
  for (  String action : new String[]{ChangellyService.INFO_TRANSACTION,ChangellyService.INFO_ERROR}) {
    IntentFilter intentFilter=new IntentFilter(action);
    LocalBroadcastManager.getInstance(this).registerReceiver(receiver,intentFilter);
  }
  createOffer();
}

Fixed version (ground truth):
protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setTheme(ExchangeActivity.theme);
  setContentView(R.layout.changelly_offer_activity);
  setTitle(getString(R.string.exchange_altcoins_to_btc));
  ButterKnife.bind(this);
  receiver=new Receiver();
  for (  String action : new String[]{ChangellyService.INFO_TRANSACTION,ChangellyService.INFO_ERROR}) {
    IntentFilter intentFilter=new IntentFilter(action);
    LocalBroadcastManager.getInstance(this).registerReceiver(receiver,intentFilter);
  }
  createOffer();
}
Program: 91066
Project: 91066
Buggy source:
private void updateUI(){
  tvFromAmount.setText(getString(R.string.value_currency,offer.currencyFrom,offer.amountFrom));
  tvSendToAddress.setText(offer.payinAddress);
}

Fixed version (ground truth):
private void updateUI(){
  tvFromAmount.setText(getString(R.string.value_currency,offer.currencyFrom,Constants.decimalFormat.format(offer.amountFrom)));
  tvSendToAddress.setText(offer.payinAddress);
}
Program: 91067
Project: 91067
Buggy source:
private void updateUI(){
  if (isAdded()) {
    fromAmount.setText(getString(R.string.value_currency,offer.currencyFrom,offer.amountFrom));
    toAmount.setText(getString(R.string.value_currency,offer.currencyTo,offer.amountTo));
  }
}

Fixed version (ground truth):
private void updateUI(){
  if (isAdded()) {
    fromAmount.setText(getString(R.string.value_currency,offer.currencyFrom,Constants.decimalFormat.format(offer.amountFrom)));
    toAmount.setText(getString(R.string.value_currency,offer.currencyTo,Constants.decimalFormat.format(offer.amountTo)));
  }
}
Program: 91070
Project: 91070
Buggy source:
@Override public void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setRetainInstance(true);
  UUID toAddress=(UUID)getArguments().getSerializable(Constants.DESTADDRESS);
  UUID fromAddress=(UUID)getArguments().getSerializable(Constants.FROM_ADDRESS);
  amount=getArguments().getDouble(Constants.FROM_AMOUNT);
  mbwManager=MbwManager.getInstance(getActivity());
  mbwManager.getEventBus().register(this);
  fromAccount=mbwManager.getWalletManager(false).getAccount(fromAddress);
  toAccount=mbwManager.getWalletManager(false).getAccount(toAddress);
  receiver=new Receiver();
  for (  String action : new String[]{ChangellyService.INFO_TRANSACTION,ChangellyService.INFO_ERROR}) {
    IntentFilter intentFilter=new IntentFilter(action);
    LocalBroadcastManager.getInstance(getActivity()).registerReceiver(receiver,intentFilter);
  }
  createOffer();
}

Fixed version (ground truth):
@Override public void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setRetainInstance(true);
  UUID toAddress=(UUID)getArguments().getSerializable(Constants.DESTADDRESS);
  UUID fromAddress=(UUID)getArguments().getSerializable(Constants.FROM_ADDRESS);
  amount=getArguments().getDouble(Constants.FROM_AMOUNT);
  mbwManager=MbwManager.getInstance(getActivity());
  mbwManager.getEventBus().register(this);
  fromAccount=mbwManager.getWalletManager(false).getAccount(fromAddress);
  toAccount=mbwManager.getWalletManager(false).getAccount(toAddress);
  receiver=new Receiver();
  for (  String action : new String[]{ChangellyService.INFO_TRANSACTION,ChangellyService.INFO_ERROR}) {
    IntentFilter intentFilter=new IntentFilter(action);
    LocalBroadcastManager.getInstance(getActivity()).registerReceiver(receiver,intentFilter);
  }
  offerCaller=new Handler();
}
Program: 91071
Project: 91071
Buggy source:
@Override public void run(){
  buttonContinue.setEnabled(false);
  long fromValue=ExactBitcoinCashValue.from(BigDecimal.valueOf(offer.amountFrom)).getLongValue();
  lastOperationId=UUID.randomUUID().toString();
  WalletAccount account=mbwManager.getSelectedAccount();
switch (account.getType()) {
case BCHBIP44:
{
      Bip44BCHAccount bip44BCHAccount=(Bip44BCHAccount)account;
      Intent serviceIntent=IntentContract.SendFunds.createIntent(lastOperationId,bip44BCHAccount.getAccountIndex(),offer.payinAddress,fromValue,TransactionFee.NORMAL,1.0f);
      WalletApplication.sendToSpv(serviceIntent,WalletAccount.Type.BCHBIP44);
      break;
    }
case BCHSINGLEADDRESS:
{
    SingleAddressBCHAccount bip44BCHAccount=(SingleAddressBCHAccount)account;
    Intent service=IntentContract.SendFundsSingleAddress.createIntent(lastOperationId,bip44BCHAccount.getId().toString(),offer.payinAddress,fromValue,TransactionFee.NORMAL,1.0f);
    WalletApplication.sendToSpv(service,WalletAccount.Type.BCHSINGLEADDRESS);
    break;
  }
}
}

Fixed version (ground truth):
@Override public void run(){
  createOffer();
  offerCaller.postDelayed(this,TimeUnit.MINUTES.toMillis(1));
}
Program: 91072
Project: 91072
Buggy source:
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  for (  WalletAccount walletAccount : walletManager.getActiveAccounts()) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=UUID.nameUUIDFromBytes(("String_Node_Str" + walletAccount.getId().toString()).getBytes());
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}

Fixed version (ground truth):
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=UUID.nameUUIDFromBytes(("String_Node_Str" + walletAccount.getId().toString()).getBytes());
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}
Program: 91073
Project: 91073
Buggy source:
public static boolean showLegacyAccountWarning(WalletAccount account,MbwManager mbwManager){
  if (account.isArchived()) {
    return false;
  }
  Balance balance=account.getBalance();
  return account instanceof SingleAddressAccount && balance.getReceivingBalance() + balance.getSpendableBalance() > 0 && account.canSpend() && !mbwManager.getMetadataStorage().getIgnoreLegacyWarning(account.getId());
}

Fixed version (ground truth):
public static boolean showLegacyAccountWarning(WalletAccount account,MbwManager mbwManager){
  if (account.isArchived()) {
    return false;
  }
  Balance balance=account.getBalance();
  return account.getType() == WalletAccount.Type.BTCSINGLEADDRESS && balance.getReceivingBalance() + balance.getSpendableBalance() > 0 && account.canSpend() && !mbwManager.getMetadataStorage().getIgnoreLegacyWarning(account.getId());
}
Program: 91075
Project: 91075
Buggy source:
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
  RecyclerView.ViewHolder result=null;
  if (viewType == GROUP_TITLE_TYPE || viewType == GROUP_ARCHIVED_TITLE_TYPE) {
    View view=layoutInflater.inflate(R.layout.accounts_title_view,parent,false);
    GroupTitleViewHolder res=new GroupTitleViewHolder(view);
    res.tvBalance.setEventBus(mbwManager.getEventBus());
    res.tvBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    result=res;
  }
 else   if (viewType == ACCOUNT_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row,parent,false);
    result=new AccountViewHolder(view);
  }
 else   if (viewType == TOTAL_BALANCE_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row_total,parent,false);
    TotalViewHolder res=new TotalViewHolder(view);
    res.tcdBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    res.tcdBalance.setEventBus(mbwManager.getEventBus());
    result=res;
  }
  return result;
}

Fixed version (ground truth):
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
  RecyclerView.ViewHolder result=null;
  if (viewType == GROUP_TITLE_TYPE) {
    View view=layoutInflater.inflate(R.layout.accounts_title_view,parent,false);
    GroupTitleViewHolder res=new GroupTitleViewHolder(view);
    res.tvBalance.setEventBus(mbwManager.getEventBus());
    res.tvBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    result=res;
  }
 else   if (viewType == GROUP_ARCHIVED_TITLE_TYPE) {
    View view=layoutInflater.inflate(R.layout.accounts_archived_title_view,parent,false);
    result=new ArchivedGroupTitleViewHolder(view);
  }
 else   if (viewType == ACCOUNT_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row,parent,false);
    result=new AccountViewHolder(view);
  }
 else   if (viewType == TOTAL_BALANCE_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row_total,parent,false);
    TotalViewHolder res=new TotalViewHolder(view);
    res.tcdBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    res.tcdBalance.setEventBus(mbwManager.getEventBus());
    result=res;
  }
  return result;
}
Program: 91077
Project: 91077
Buggy source:
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  for (  WalletAccount walletAccount : walletManager.getActiveAccounts()) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=UUID.nameUUIDFromBytes(("String_Node_Str" + walletAccount.getId().toString()).getBytes());
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}

Fixed version (ground truth):
public void importLabelsToBch(WalletManager walletManager){
  if (getSpvBchFetcher() == null)   return;
  List<WalletAccount> accounts=new ArrayList<>();
  accounts.addAll(walletManager.getActiveAccounts());
  accounts.addAll(walletManager.getArchivedAccounts());
  for (  WalletAccount walletAccount : accounts) {
    if (walletAccount.getType() == WalletAccount.Type.BTCSINGLEADDRESS || walletAccount.getType() == WalletAccount.Type.BTCBIP44) {
      UUID bchId=UUID.nameUUIDFromBytes(("String_Node_Str" + walletAccount.getId().toString()).getBytes());
      String bchLabel=getMetadataStorage().getLabelByAccount(bchId);
      if (bchLabel == null || bchLabel.isEmpty()) {
        getMetadataStorage().storeAccountLabel(bchId,getMetadataStorage().getLabelByAccount(walletAccount.getId()));
      }
    }
  }
}
Program: 91078
Project: 91078
Buggy source:
public static boolean showLegacyAccountWarning(WalletAccount account,MbwManager mbwManager){
  if (account.isArchived()) {
    return false;
  }
  Balance balance=account.getBalance();
  return account instanceof SingleAddressAccount && balance.getReceivingBalance() + balance.getSpendableBalance() > 0 && account.canSpend() && !mbwManager.getMetadataStorage().getIgnoreLegacyWarning(account.getId());
}

Fixed version (ground truth):
public static boolean showLegacyAccountWarning(WalletAccount account,MbwManager mbwManager){
  if (account.isArchived()) {
    return false;
  }
  Balance balance=account.getBalance();
  return account.getType() == WalletAccount.Type.BTCSINGLEADDRESS && balance.getReceivingBalance() + balance.getSpendableBalance() > 0 && account.canSpend() && !mbwManager.getMetadataStorage().getIgnoreLegacyWarning(account.getId());
}
Program: 91080
Project: 91080
Buggy source:
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
  RecyclerView.ViewHolder result=null;
  if (viewType == GROUP_TITLE_TYPE || viewType == GROUP_ARCHIVED_TITLE_TYPE) {
    View view=layoutInflater.inflate(R.layout.accounts_title_view,parent,false);
    GroupTitleViewHolder res=new GroupTitleViewHolder(view);
    res.tvBalance.setEventBus(mbwManager.getEventBus());
    res.tvBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    result=res;
  }
 else   if (viewType == ACCOUNT_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row,parent,false);
    result=new AccountViewHolder(view);
  }
 else   if (viewType == TOTAL_BALANCE_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row_total,parent,false);
    TotalViewHolder res=new TotalViewHolder(view);
    res.tcdBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    res.tcdBalance.setEventBus(mbwManager.getEventBus());
    result=res;
  }
  return result;
}

Fixed version (ground truth):
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
  RecyclerView.ViewHolder result=null;
  if (viewType == GROUP_TITLE_TYPE) {
    View view=layoutInflater.inflate(R.layout.accounts_title_view,parent,false);
    GroupTitleViewHolder res=new GroupTitleViewHolder(view);
    res.tvBalance.setEventBus(mbwManager.getEventBus());
    res.tvBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    result=res;
  }
 else   if (viewType == GROUP_ARCHIVED_TITLE_TYPE) {
    View view=layoutInflater.inflate(R.layout.accounts_archived_title_view,parent,false);
    result=new ArchivedGroupTitleViewHolder(view);
  }
 else   if (viewType == ACCOUNT_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row,parent,false);
    result=new AccountViewHolder(view);
  }
 else   if (viewType == TOTAL_BALANCE_TYPE) {
    View view=layoutInflater.inflate(R.layout.record_row_total,parent,false);
    TotalViewHolder res=new TotalViewHolder(view);
    res.tcdBalance.setCurrencySwitcher(mbwManager.getCurrencySwitcher());
    res.tcdBalance.setEventBus(mbwManager.getEventBus());
    result=res;
  }
  return result;
}
Program: 91082
Project: 91082
Buggy source:
public void setDefaultCurrency(String currencyLabel){
  Set<String> currencies=new HashSet<>(getCurrencyList());
  if (!defaultCurrency.equals(currencyLabel)) {
    currencies.remove(defaultCurrency);
    currencies.add(currencyLabel);
  }
  setCurrencyList(currencies);
  defaultCurrency=currencyLabel;
}

Fixed version (ground truth):
public void setDefaultCurrency(String currencyLabel){
  Set<String> currencies=new HashSet<>(getCurrencyList());
  if (!defaultCurrency.equals(currencyLabel)) {
    currencies.remove(defaultCurrency);
    currencies.add(currencyLabel);
  }
  defaultCurrency=currencyLabel;
}
Program: 91083
Project: 91083
Buggy source:
public void setCurrencyList(final Set<String> fiatCurrencies){
  ArrayList<String> currencies=Lists.newArrayList(fiatCurrencies);
  Collections.sort(currencies);
  if (!currencies.contains(currentFiatCurrency)) {
    if (currencies.isEmpty()) {
      setCurrency("String_Node_Str");
    }
 else {
      setCurrency(currencies.get(0));
    }
  }
  this.fiatCurrencies=new ArrayList<String>(currencies);
}

Fixed version (ground truth):
public void setCurrencyList(final Set<String> fiatCurrencies){
  ArrayList<String> currencies=Lists.newArrayList(fiatCurrencies);
  Collections.sort(currencies);
  if (!currencies.contains(currentFiatCurrency)) {
    if (currencies.isEmpty()) {
      setCurrency("String_Node_Str");
    }
 else {
      setCurrency(currencies.get(0));
    }
  }
  this.fiatCurrencies=new ArrayList<>(currencies);
}
Program: 91086
Project: 91086
Buggy source:
public TotalViewHolder(View itemView){
  super(itemView);
  tcdBalance=(ToggleableCurrencyButton)itemView.findViewById(R.id.tcdBalance);
}

Fixed version (ground truth):
public TotalViewHolder(View itemView){
  super(itemView);
  tcdBalance=itemView.findViewById(R.id.tcdBalance);
}