Program: 59521
Project: 59521
Buggy source:
public WidgetStock(StockQuote quote,PortfolioStock portfolioStock){
  price=quote.getPrice();
  displayName=quote.getName();
  if (portfolioStock != null && !portfolioStock.getCustomName().equals("String_Node_Str")) {
    displayName=portfolioStock.getCustomName();
  }
  dailyChange=quote.getChange();
  dailyPercent=quote.getPercent();
  volume=NumberTools.getNormalisedVolume(quote.getVolume());
  Double elapsedYears=null;
  Double priceValue=NumberTools.parseDouble(quote.getPrice());
  Double dailyChangeValue=NumberTools.parseDouble(quote.getChange());
  Double buyPriceValue=null;
  Double quantityValue=null;
  Double limitHighValue=null;
  Double limitLowValue=null;
  if (portfolioStock != null) {
    buyPriceValue=NumberTools.parseDouble(portfolioStock.getPrice());
    quantityValue=NumberTools.parseDouble(portfolioStock.getQuantity());
    limitHighValue=NumberTools.parseDouble(portfolioStock.getHighLimit());
    limitLowValue=NumberTools.parseDouble(portfolioStock.getLowLimit());
  }
  Double priceChangeValue=null;
  try {
    priceChangeValue=priceValue - buyPriceValue;
  }
 catch (  Exception ignored) {
  }
  try {
    Date date=new SimpleDateFormat("String_Node_Str").parse(portfolioStock.getDate());
    double elapsed=(new Date().getTime() - date.getTime()) / 1000;
    elapsedYears=elapsed / 31536000;
  }
 catch (  Exception ignored) {
  }
  if (priceChangeValue != null) {
    totalChange=NumberTools.getTrimmedDouble(priceChangeValue,5);
  }
  if (priceChangeValue != null) {
    totalPercent=String.format("String_Node_Str",100 * (priceChangeValue / buyPriceValue)) + "String_Node_Str";
  }
  if (priceChangeValue != null && elapsedYears != null) {
    totalChangeAer=NumberTools.getTrimmedDouble(priceChangeValue / elapsedYears,5);
  }
  if (priceChangeValue != null && elapsedYears != null) {
    totalPercentAer=String.format("String_Node_Str",(100 * (priceChangeValue / buyPriceValue)) / elapsedYears) + "String_Node_Str";
  }
  if (priceValue != null && quantityValue != null) {
    plHolding=String.format("String_Node_Str",priceValue * quantityValue);
  }
  if (dailyChangeValue != null && quantityValue != null) {
    plDailyChange=String.format("String_Node_Str",dailyChangeValue * quantityValue);
  }
  if (priceChangeValue != null && quantityValue != null) {
    plTotalChange=String.format("String_Node_Str",priceChangeValue * quantityValue);
  }
  if (priceChangeValue != null && quantityValue != null && elapsedYears != null) {
    plTotalChangeAer=String.format("String_Node_Str",(priceChangeValue * quantityValue) / elapsedYears);
  }
  if (priceValue != null && limitHighValue != null) {
    limitHighTriggered=priceValue > limitHighValue;
  }
  if (priceValue != null && limitLowValue != null) {
    limitLowTriggered=priceValue < limitLowValue;
  }
}

Fixed version (ground truth):
public WidgetStock(StockQuote quote,PortfolioStock portfolioStock){
  price=quote.getPrice();
  displayName=quote.getName();
  if (portfolioStock != null && !portfolioStock.getCustomName().equals("String_Node_Str")) {
    displayName=portfolioStock.getCustomName();
  }
  dailyChange=quote.getChange();
  dailyPercent=quote.getPercent();
  volume=NumberTools.getNormalisedVolume(quote.getVolume());
  Double elapsedYears=null;
  Double priceValue=NumberTools.parseDouble(quote.getPrice());
  Double dailyChangeValue=NumberTools.parseDouble(quote.getChange());
  Double buyPriceValue=null;
  Double quantityValue=null;
  Double limitHighValue=null;
  Double limitLowValue=null;
  if (portfolioStock != null) {
    buyPriceValue=NumberTools.parseDouble(portfolioStock.getPrice());
    quantityValue=NumberTools.parseDouble(portfolioStock.getQuantity());
    limitHighValue=NumberTools.parseDouble(portfolioStock.getHighLimit());
    limitLowValue=NumberTools.parseDouble(portfolioStock.getLowLimit());
  }
  Double priceChangeValue=null;
  try {
    priceChangeValue=priceValue - buyPriceValue;
  }
 catch (  Exception ignored) {
  }
  try {
    Date date=new SimpleDateFormat("String_Node_Str").parse(portfolioStock.getDate());
    double elapsed=(new Date().getTime() - date.getTime()) / 1000;
    elapsedYears=elapsed / 31536000;
  }
 catch (  Exception ignored) {
  }
  if (priceChangeValue != null) {
    totalChange=NumberTools.getTrimmedDouble(priceChangeValue,5);
  }
  if (priceChangeValue != null) {
    totalPercent=String.format("String_Node_Str",100 * (priceChangeValue / buyPriceValue)) + "String_Node_Str";
  }
  if (priceChangeValue != null && elapsedYears != null) {
    totalChangeAer=NumberTools.getTrimmedDouble(priceChangeValue / elapsedYears,5);
  }
  if (priceChangeValue != null && elapsedYears != null) {
    totalPercentAer=String.format("String_Node_Str",(100 * (priceChangeValue / buyPriceValue)) / elapsedYears) + "String_Node_Str";
  }
  if (quantityValue != null) {
    plHolding=String.format("String_Node_Str",priceValue * quantityValue);
  }
  if (dailyChangeValue != null && quantityValue != null) {
    plDailyChange=String.format("String_Node_Str",dailyChangeValue * quantityValue);
  }
  if (priceChangeValue != null && quantityValue != null) {
    plTotalChange=String.format("String_Node_Str",priceChangeValue * quantityValue);
  }
  if (priceChangeValue != null && quantityValue != null && elapsedYears != null) {
    plTotalChangeAer=String.format("String_Node_Str",(priceChangeValue * quantityValue) / elapsedYears);
  }
  if (limitHighValue != null) {
    limitHighTriggered=priceValue > limitHighValue;
  }
  if (limitLowValue != null) {
    limitLowTriggered=priceValue < limitLowValue;
  }
}