question: private static String countryCodeForPhoneNumber ( String normalizedPhoneNumber ) { final String phoneWithoutPlusPrefix = normalizedPhoneNumber . replaceFirst ( "^\\+" , "" ) ; final int numberLength = phoneWithoutPlusPrefix . length ( ) ; for ( int i = 1 ; i <= MAX_LENGTH_COUNTRY_CODE && i <= numberLength ; i ++ ) { final String potentialCountryCode = phoneWithoutPlusPrefix . substring ( 0 , i ) ; final Integer countryCodeKey = Integer . valueOf ( potentialCountryCode ) ; if ( CountryCodeToRegionCodeMap . containsKey ( countryCodeKey ) ) { return potentialCountryCode ; } } return DEFAULT_COUNTRY_CODE ; }
target:  Country code extracted using shortest matching prefix like libPhoneNumber. See: https://github.com/googlei18n/libphonenumber/blob/master/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2395