Program: 59538
Project: 59538
Buggy source:
void showPortfolioItemEdit(AdapterView<?> a,int position){
  final Dialog portfolioItemEdit=new Dialog(this);
  portfolioItemEdit.setContentView(R.layout.portfolio_item);
  @SuppressWarnings("String_Node_Str") HashMap<String,String> stockMap=(HashMap<String,String>)a.getItemAtPosition(position);
  mStockSymbol=stockMap.get("String_Node_Str");
  StockQuote data=this.portfolioRepository.mStockData.get(mStockSymbol);
  String currentPrice="String_Node_Str";
  if (data != null)   currentPrice=data.getPrice();
  String price=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String date=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String quantity=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String limitHigh=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String limitLow=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String customDisplay=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  if (price.equals("String_Node_Str")) {
    price=currentPrice;
    date=new SimpleDateFormat("String_Node_Str").format(new Date());
  }
  EditText priceEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_price);
  priceEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  priceEditText.setText(price);
  EditText dateEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_date);
  dateEditText.setInputType(InputType.TYPE_CLASS_DATETIME + InputType.TYPE_DATETIME_VARIATION_DATE);
  if (!date.equals("String_Node_Str") && !price.equals("String_Node_Str"))   dateEditText.setText(date);
  EditText quantityEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_quantity);
  quantityEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_SIGNED + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  if (!quantity.equals("String_Node_Str") && !price.equals("String_Node_Str"))   quantityEditText.setText(quantity);
  EditText limitHighEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_high);
  limitHighEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  if (!limitHigh.equals("String_Node_Str") && !price.equals("String_Node_Str"))   limitHighEditText.setText(limitHigh);
  EditText limitLowEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_low);
  limitLowEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  if (!limitLow.equals("String_Node_Str") && !price.equals("String_Node_Str"))   limitLowEditText.setText(limitLow);
  EditText customDisplayText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_symbol);
  customDisplayText.setInputType(InputType.TYPE_CLASS_TEXT + InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
  if (!customDisplay.equals("String_Node_Str") && !customDisplay.equals("String_Node_Str"))   customDisplayText.setText(customDisplay);
  Button okButton=(Button)portfolioItemEdit.findViewById(R.id.portfolio_item_save);
  okButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      EditText priceEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_price);
      String price=priceEditText.getText().toString();
      EditText dateEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_date);
      String date=dateEditText.getText().toString();
      EditText quantityEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_quantity);
      String quantity=quantityEditText.getText().toString();
      EditText limitHighEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_high);
      String limitHigh=limitHighEditText.getText().toString();
      EditText limitLowEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_low);
      String limitLow=limitLowEditText.getText().toString();
      EditText customDisplayText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_symbol);
      String customDisplay=customDisplayText.getText().toString();
      if (price.equals("String_Node_Str")) {
        date="String_Node_Str";
        quantity="String_Node_Str";
        limitHigh="String_Node_Str";
        limitLow="String_Node_Str";
      }
 else {
        try {
          price=Double.toString(Double.parseDouble(price));
          if (!date.equals("String_Node_Str")) {
            SimpleDateFormat formatter=new SimpleDateFormat("String_Node_Str");
            date=formatter.format(formatter.parse(date.replaceAll("String_Node_Str","String_Node_Str"))).toUpperCase();
          }
          if (!quantity.equals("String_Node_Str")) {
            quantity=Double.toString(Double.parseDouble(quantity));
          }
          if (!limitHigh.equals("String_Node_Str")) {
            limitHigh=Double.toString(Double.parseDouble(limitHigh));
          }
          if (!limitLow.equals("String_Node_Str")) {
            limitLow=Double.toString(Double.parseDouble(limitLow));
          }
        }
 catch (        Exception e) {
          portfolioItemEdit.dismiss();
          return;
        }
      }
      if (price.indexOf("String_Node_Str") == price.length() - 2) {
        price=price + "String_Node_Str";
      }
      portfolioRepository.updateStock(price,date,quantity,limitHigh,limitLow,customDisplay);
      refreshView();
      portfolioItemEdit.dismiss();
    }
  }
);
  Button cancelButton=(Button)portfolioItemEdit.findViewById(R.id.portfolio_item_cancel);
  cancelButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      portfolioItemEdit.dismiss();
    }
  }
);
  portfolioItemEdit.setTitle(mStockSymbol + "String_Node_Str");
  portfolioItemEdit.show();
}

Fixed version (ground truth):
void showPortfolioItemEdit(AdapterView<?> a,int position){
  final Dialog portfolioItemEdit=new Dialog(this);
  portfolioItemEdit.setContentView(R.layout.portfolio_item);
  @SuppressWarnings("String_Node_Str") HashMap<String,String> stockMap=(HashMap<String,String>)a.getItemAtPosition(position);
  mStockSymbol=stockMap.get("String_Node_Str");
  StockQuote data=this.portfolioRepository.mStockData.get(mStockSymbol);
  String currentPrice="String_Node_Str";
  if (data != null)   currentPrice=data.getPrice();
  String price=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String date=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String quantity=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String limitHigh=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String limitLow=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  String customDisplay=stockMap.get("String_Node_Str") != null ? stockMap.get("String_Node_Str") : "String_Node_Str";
  if (price.equals("String_Node_Str")) {
    price=currentPrice;
    date=new SimpleDateFormat("String_Node_Str").format(new Date());
  }
  EditText priceEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_price);
  priceEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  priceEditText.setText(price);
  EditText dateEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_date);
  dateEditText.setInputType(InputType.TYPE_CLASS_DATETIME + InputType.TYPE_DATETIME_VARIATION_DATE);
  if (!date.equals("String_Node_Str") && !price.equals("String_Node_Str"))   dateEditText.setText(date);
  EditText quantityEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_quantity);
  quantityEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_SIGNED + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  if (!quantity.equals("String_Node_Str") && !price.equals("String_Node_Str"))   quantityEditText.setText(quantity);
  EditText limitHighEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_high);
  limitHighEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  if (!limitHigh.equals("String_Node_Str") && !price.equals("String_Node_Str"))   limitHighEditText.setText(limitHigh);
  EditText limitLowEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_low);
  limitLowEditText.setInputType(InputType.TYPE_CLASS_NUMBER + InputType.TYPE_NUMBER_FLAG_DECIMAL);
  if (!limitLow.equals("String_Node_Str") && !price.equals("String_Node_Str"))   limitLowEditText.setText(limitLow);
  EditText customDisplayText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_symbol);
  customDisplayText.setInputType(InputType.TYPE_CLASS_TEXT + InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
  if (!customDisplay.equals("String_Node_Str") && !customDisplay.equals("String_Node_Str"))   customDisplayText.setText(customDisplay);
  Button okButton=(Button)portfolioItemEdit.findViewById(R.id.portfolio_item_save);
  okButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      EditText priceEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_price);
      String price=priceEditText.getText().toString();
      EditText dateEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_date);
      String date=dateEditText.getText().toString();
      EditText quantityEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_quantity);
      String quantity=quantityEditText.getText().toString();
      EditText limitHighEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_high);
      String limitHigh=limitHighEditText.getText().toString();
      EditText limitLowEditText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_limit_low);
      String limitLow=limitLowEditText.getText().toString();
      EditText customDisplayText=(EditText)portfolioItemEdit.findViewById(R.id.portfolio_item_symbol);
      String customDisplay=customDisplayText.getText().toString();
      if (price.equals("String_Node_Str")) {
        date="String_Node_Str";
        quantity="String_Node_Str";
        limitHigh="String_Node_Str";
        limitLow="String_Node_Str";
      }
 else {
        try {
          price=Double.toString(Double.parseDouble(price));
          if (!date.equals("String_Node_Str")) {
            SimpleDateFormat formatter=new SimpleDateFormat("String_Node_Str");
            date=formatter.format(formatter.parse(date.replaceAll("String_Node_Str","String_Node_Str"))).toUpperCase();
          }
          if (!quantity.equals("String_Node_Str")) {
            quantity=Double.toString(Double.parseDouble(quantity));
          }
          if (!limitHigh.equals("String_Node_Str")) {
            limitHigh=Double.toString(Double.parseDouble(limitHigh));
          }
          if (!limitLow.equals("String_Node_Str")) {
            limitLow=Double.toString(Double.parseDouble(limitLow));
          }
        }
 catch (        Exception e) {
          portfolioItemEdit.dismiss();
          return;
        }
      }
      if (price.indexOf("String_Node_Str") == price.length() - 2) {
        price=price + "String_Node_Str";
      }
      portfolioRepository.updateStock(mStockSymbol,price,date,quantity,limitHigh,limitLow,customDisplay);
      refreshView();
      portfolioItemEdit.dismiss();
    }
  }
);
  Button cancelButton=(Button)portfolioItemEdit.findViewById(R.id.portfolio_item_cancel);
  cancelButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      portfolioItemEdit.dismiss();
    }
  }
);
  portfolioItemEdit.setTitle(mStockSymbol + "String_Node_Str");
  portfolioItemEdit.show();
}