Program: 58940
Project: 58940
Buggy source:
public void convert(ActionRequest request,ActionResponse response){
  Context context=request.getContext();
  Currency fromCurrency=(Currency)context.get("String_Node_Str");
  Currency toCurrency=(Currency)context.get("String_Node_Str");
  CurrencyConversionLine prevLine=null;
  if (fromCurrency.getId() != null && toCurrency.getId() != null) {
    if (context.get("String_Node_Str") != null)     prevLine=cclRepo.all().filter("String_Node_Str",fromCurrency.getId(),toCurrency.getId(),context.get("String_Node_Str")).order("String_Node_Str").fetchOne();
 else     prevLine=cclRepo.all().filter("String_Node_Str",fromCurrency.getId(),toCurrency.getId()).order("String_Node_Str").fetchOne();
    LOG.debug("String_Node_Str",prevLine);
    fromCurrency=currencyRepo.find(fromCurrency.getId());
    toCurrency=currencyRepo.find(toCurrency.getId());
    BigDecimal rate=ccs.convert(fromCurrency,toCurrency);
    if (rate.compareTo(new BigDecimal(-1)) == 0)     response.setFlash(I18n.get(IExceptionMessage.CURRENCY_6));
 else {
      response.setValue("String_Node_Str","String_Node_Str");
      if (context.get("String_Node_Str").equals("String_Node_Str"))       response.setValue("String_Node_Str",rate);
 else       response.setValue("String_Node_Str",rate);
      response.setValue("String_Node_Str",gs.getTodayDate());
      if (prevLine != null)       response.setValue("String_Node_Str",ccs.getVariations(rate,prevLine.getExchangeRate()));
    }
  }
}

Fixed version (ground truth):
public void convert(ActionRequest request,ActionResponse response){
  Context context=request.getContext();
  Currency fromCurrency=null;
  Currency toCurrency=null;
  if (context.get("String_Node_Str") instanceof Currency) {
    fromCurrency=(Currency)context.get("String_Node_Str");
    toCurrency=(Currency)context.get("String_Node_Str");
  }
 else {
    Map startCurrency=(Map)context.get("String_Node_Str");
    Map endCurrency=(Map)context.get("String_Node_Str");
    fromCurrency=currencyRepo.find(Long.parseLong(startCurrency.get("String_Node_Str").toString()));
    toCurrency=currencyRepo.find(Long.parseLong(endCurrency.get("String_Node_Str").toString()));
  }
  CurrencyConversionLine prevLine=null;
  if (fromCurrency != null && toCurrency != null) {
    if (context.get("String_Node_Str") != null)     prevLine=cclRepo.all().filter("String_Node_Str",fromCurrency.getId(),toCurrency.getId(),context.get("String_Node_Str")).order("String_Node_Str").fetchOne();
 else     prevLine=cclRepo.all().filter("String_Node_Str",fromCurrency.getId(),toCurrency.getId()).order("String_Node_Str").fetchOne();
    LOG.debug("String_Node_Str",prevLine);
    fromCurrency=currencyRepo.find(fromCurrency.getId());
    toCurrency=currencyRepo.find(toCurrency.getId());
    BigDecimal rate=ccs.convert(fromCurrency,toCurrency);
    if (rate.compareTo(new BigDecimal(-1)) == 0)     response.setFlash(I18n.get(IExceptionMessage.CURRENCY_6));
 else {
      response.setValue("String_Node_Str","String_Node_Str");
      if (context.get("String_Node_Str").equals("String_Node_Str"))       response.setValue("String_Node_Str",rate);
 else       response.setValue("String_Node_Str",rate);
      response.setValue("String_Node_Str",gs.getTodayDate());
      if (prevLine != null)       response.setValue("String_Node_Str",ccs.getVariations(rate,prevLine.getExchangeRate()));
    }
  }
}