Program: 50835
Project: 50835
Buggy source:
@Override public Dialog onCreateDialog(final Bundle savedInstanceState){
  final SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(activity);
  exchangeCurrency=prefs.getString(Constants.PREFS_KEY_EXCHANGE_CURRENCY,Constants.DEFAULT_EXCHANGE_CURRENCY);
  final AlertDialog.Builder dialog=new AlertDialog.Builder(activity);
  dialog.setInverseBackgroundForced(true);
  dialog.setTitle(R.string.amount_calculator_dialog_title);
  final View view=inflater.inflate(R.layout.amount_calculator_dialog,null);
  btcAmountView=(CurrencyAmountView)view.findViewById(R.id.amount_calculator_row_btc);
  btcAmountView.setListener(new CurrencyAmountView.Listener(){
    public void changed(){
      if (btcAmountView.getAmount() != null) {
        exchangeDirection=true;
        updateAppearance();
      }
 else {
        localAmountView.setHint(null);
      }
    }
    public void done(){
      AmountCalculatorFragment.this.done();
    }
    public void focusChanged(    final boolean hasFocus){
    }
  }
);
  localAmountView=(CurrencyAmountView)view.findViewById(R.id.amount_calculator_row_local);
  localAmountView.setCurrencyCode(exchangeCurrency);
  localAmountView.setListener(new CurrencyAmountView.Listener(){
    public void changed(){
      if (localAmountView.getAmount() != null) {
        exchangeDirection=false;
        updateAppearance();
      }
 else {
        btcAmountView.setHint(null);
      }
    }
    public void done(){
      AmountCalculatorFragment.this.done();
    }
    public void focusChanged(    final boolean hasFocus){
    }
  }
);
  exchangeRateView=(TextView)view.findViewById(R.id.amount_calculator_rate);
  dialog.setView(view);
  dialog.setPositiveButton(R.string.amount_calculator_dialog_button_use,new DialogInterface.OnClickListener(){
    public void onClick(    final DialogInterface dialog,    final int whichButton){
      done();
    }
  }
);
  dialog.setNegativeButton(R.string.button_cancel,new DialogInterface.OnClickListener(){
    public void onClick(    final DialogInterface dialog,    final int whichButton){
      dismiss();
    }
  }
);
  updateAppearance();
  getLoaderManager().initLoader(0,null,this);
  return dialog.create();
}

Fixed version (ground truth):
@Override public Dialog onCreateDialog(final Bundle savedInstanceState){
  final SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(activity);
  exchangeCurrency=prefs.getString(Constants.PREFS_KEY_EXCHANGE_CURRENCY,Constants.DEFAULT_EXCHANGE_CURRENCY);
  final AlertDialog.Builder dialog=new AlertDialog.Builder(activity);
  dialog.setInverseBackgroundForced(true);
  dialog.setTitle(R.string.amount_calculator_dialog_title);
  final View view=inflater.inflate(R.layout.amount_calculator_dialog,null);
  btcAmountView=(CurrencyAmountView)view.findViewById(R.id.amount_calculator_row_btc);
  btcAmountView.setListener(new CurrencyAmountView.Listener(){
    public void changed(){
      if (btcAmountView.getAmount() != null) {
        exchangeDirection=true;
        updateAppearance();
      }
 else {
        localAmountView.setHint(null);
      }
    }
    public void done(){
      AmountCalculatorFragment.this.done();
    }
    public void focusChanged(    final boolean hasFocus){
    }
  }
);
  localAmountView=(CurrencyAmountView)view.findViewById(R.id.amount_calculator_row_local);
  localAmountView.setCurrencyCode(exchangeCurrency);
  localAmountView.setPrecision(Constants.LOCAL_PRECISION);
  localAmountView.setListener(new CurrencyAmountView.Listener(){
    public void changed(){
      if (localAmountView.getAmount() != null) {
        exchangeDirection=false;
        updateAppearance();
      }
 else {
        btcAmountView.setHint(null);
      }
    }
    public void done(){
      AmountCalculatorFragment.this.done();
    }
    public void focusChanged(    final boolean hasFocus){
    }
  }
);
  exchangeRateView=(TextView)view.findViewById(R.id.amount_calculator_rate);
  dialog.setView(view);
  dialog.setPositiveButton(R.string.amount_calculator_dialog_button_use,new DialogInterface.OnClickListener(){
    public void onClick(    final DialogInterface dialog,    final int whichButton){
      done();
    }
  }
);
  dialog.setNegativeButton(R.string.button_cancel,new DialogInterface.OnClickListener(){
    public void onClick(    final DialogInterface dialog,    final int whichButton){
      dismiss();
    }
  }
);
  updateAppearance();
  getLoaderManager().initLoader(0,null,this);
  return dialog.create();
}