Source:
<code>protected String buildPOFipsCountryCode(PaymentWorksVendor pmwVendor, Map<String, List<PaymentWorksIsoFipsCountryItem>> paymentWorksIsoToFipsCountryMap) { String fipsCountryCode = StringUtils.EMPTY; if (paymentWorksFormModeService.shouldUseLegacyFormProcessingMode()) { String paymentWorksVendorCountryCode = findPoCountryToUse(pmwVendor); fipsCountryCode = convertFipsPoCountryOptionToFipsCountryCode(paymentWorksVendorCountryCode); if (StringUtils.isBlank(fipsCountryCode)) { LOG.error("buildPOFipsCountryCode, unable to find LEGACY FIPS country code for " + paymentWorksVendorCountryCode); } } else if (paymentWorksFormModeService.shouldUseForeignFormProcessingMode()) { PaymentWorksPurchaseOrderCountryFipsOption option = PaymentWorksPurchaseOrderCountryFipsOption.findPaymentWorksPurchaseOrderCountryFipsOption(pmwVendor.getPoCountryUsCanadaAustraliaOther()); if (LOG.isDebugEnabled()) { LOG.debug("buildPOFipsCountryCode, new foreign form FIPS country code option: " + option.toString()); } if (StringUtils.isNotBlank(option.fipsCountryCode)) { fipsCountryCode = option.fipsCountryCode; } else { try { fipsCountryCode = convertIsoCountryCodeToFipsCountryCode(pmwVendor.getPoCountry(), paymentWorksIsoToFipsCountryMap); } catch (NullPointerException npe) { <START> LOG.error("buildPOFipsCountryCode, had and error converting '" + pmwVendor.getPoCountry() + "' to a FIPS code.", npe); <END> fipsCountryCode = StringUtils.EMPTY; } } if (StringUtils.isBlank(fipsCountryCode)) { LOG.error("buildPOFipsCountryCode, unable to find new foreign form FIPS country code for country code " + pmwVendor.getPoCountry()); } } return fipsCountryCode; }</code><technical_language>Minor typo in error message, change "...had error..." "...had error..."</technical_language>

Target:
protected String buildPOFipsCountryCode(PaymentWorksVendor pmwVendor, Map<String, List<PaymentWorksIsoFipsCountryItem>> paymentWorksIsoToFipsCountryMap) { String fipsCountryCode = StringUtils.EMPTY; if (paymentWorksFormModeService.shouldUseLegacyFormProcessingMode()) { String paymentWorksVendorCountryCode = findPoCountryToUse(pmwVendor); fipsCountryCode = convertFipsPoCountryOptionToFipsCountryCode(paymentWorksVendorCountryCode); if (StringUtils.isBlank(fipsCountryCode)) { LOG.error("buildPOFipsCountryCode, unable to find LEGACY FIPS country code for " + paymentWorksVendorCountryCode); } } else if (paymentWorksFormModeService.shouldUseForeignFormProcessingMode()) { PaymentWorksPurchaseOrderCountryFipsOption option = PaymentWorksPurchaseOrderCountryFipsOption.findPaymentWorksPurchaseOrderCountryFipsOption(pmwVendor.getPoCountryUsCanadaAustraliaOther()); if (LOG.isDebugEnabled()) { LOG.debug("buildPOFipsCountryCode, new foreign form FIPS country code option: " + option.toString()); } if (StringUtils.isNotBlank(option.fipsCountryCode)) { fipsCountryCode = option.fipsCountryCode; } else { try { fipsCountryCode = convertIsoCountryCodeToFipsCountryCode(pmwVendor.getPoCountry(), paymentWorksIsoToFipsCountryMap); } catch (NullPointerException npe) { LOG.error("buildPOFipsCountryCode, had an error converting '" + pmwVendor.getPoCountry() + "' to a FIPS code.", npe); fipsCountryCode = StringUtils.EMPTY; } } if (StringUtils.isBlank(fipsCountryCode)) { LOG.error("buildPOFipsCountryCode, unable to find new foreign form FIPS country code for country code " + pmwVendor.getPoCountry()); } } return fipsCountryCode; }