Program: 91053
Project: 91053
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  String from, to;
  double amount;
switch (intent.getAction()) {
case ChangellyService.INFO_MIN_AMOUNT:
    amount=intent.getDoubleExtra(ChangellyService.AMOUNT,NOT_LOADED);
  if (amount != NOT_LOADED) {
    Log.d(TAG,"String_Node_Str" + amount);
    sharedPreferences.edit().putFloat(BCH_MIN_EXCHANGE_VALUE,(float)amount).apply();
    minAmount=amount;
  }
break;
case ChangellyService.INFO_EXCH_AMOUNT:
from=intent.getStringExtra(ChangellyService.FROM);
to=intent.getStringExtra(ChangellyService.TO);
double fromAmount=intent.getDoubleExtra(ChangellyService.FROM_AMOUNT,0);
amount=intent.getDoubleExtra(ChangellyService.AMOUNT,0);
if (from != null && to != null) {
Log.d(TAG,"String_Node_Str" + amount + "String_Node_Str"+ to);
avoidTextChangeEvent=true;
try {
if (to.equalsIgnoreCase(ChangellyService.BTC) && from.equalsIgnoreCase(ChangellyService.BCH) && fromAmount == Double.parseDouble(fromValue.getText().toString())) {
toValue.setText(decimalFormat.format(amount));
}
 else if (from.equalsIgnoreCase(ChangellyService.BTC) && to.equalsIgnoreCase(ChangellyService.BCH) && fromAmount == Double.parseDouble(toValue.getText().toString())) {
fromValue.setText(decimalFormat.format(amount));
}
isValueForOfferOk(true);
}
 catch (NumberFormatException ignore) {
}
avoidTextChangeEvent=false;
updateUi();
}
break;
case INFO_ERROR:
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
break;
}
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  String from, to;
  double amount;
switch (intent.getAction()) {
case ChangellyService.INFO_MIN_AMOUNT:
    amount=intent.getDoubleExtra(ChangellyService.AMOUNT,NOT_LOADED);
  if (amount != NOT_LOADED) {
    Log.d(TAG,"String_Node_Str" + amount);
    sharedPreferences.edit().putFloat(BCH_MIN_EXCHANGE_VALUE,(float)amount).apply();
    minAmount=amount;
  }
break;
case ChangellyService.INFO_EXCH_AMOUNT:
from=intent.getStringExtra(ChangellyService.FROM);
to=intent.getStringExtra(ChangellyService.TO);
double fromAmount=intent.getDoubleExtra(ChangellyService.FROM_AMOUNT,0);
amount=intent.getDoubleExtra(ChangellyService.AMOUNT,0);
if (from != null && to != null) {
Log.d(TAG,"String_Node_Str" + amount + "String_Node_Str"+ to);
avoidTextChangeEvent=true;
try {
if (to.equalsIgnoreCase(ChangellyService.BTC) && from.equalsIgnoreCase(ChangellyService.BCH) && fromAmount == Double.parseDouble(fromValue.getText().toString())) {
toValue.setText(decimalFormat.format(amount));
exchangeRate.setText("String_Node_Str" + decimalFormat.format(amount / fromAmount) + "String_Node_Str");
exchangeRate.setVisibility(View.VISIBLE);
}
 else if (from.equalsIgnoreCase(ChangellyService.BTC) && to.equalsIgnoreCase(ChangellyService.BCH) && fromAmount == Double.parseDouble(toValue.getText().toString())) {
fromValue.setText(decimalFormat.format(amount));
exchangeRate.setText("String_Node_Str" + decimalFormat.format(fromAmount / amount) + "String_Node_Str");
exchangeRate.setVisibility(View.VISIBLE);
}
isValueForOfferOk(true);
}
 catch (NumberFormatException ignore) {
}
avoidTextChangeEvent=false;
updateUi();
}
break;
case INFO_ERROR:
new AlertDialog.Builder(getActivity()).setMessage(getString(R.string.exchange_rate_unavailable_msg)).setNegativeButton(R.string.button_cancel,null).setPositiveButton(R.string.try_again,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialogInterface,int i){
BigDecimal val=new BigDecimal(fromValue.getText().toString());
requestOfferFunction(val.toPlainString(),ChangellyService.BCH,ChangellyService.BTC);
}
}
).show();
break;
}
}