question: public boolean truncateTooLongNumber ( PhoneNumber number ) { if ( isValidNumber ( number ) ) { return true ; } PhoneNumber numberCopy = new PhoneNumber ( ) ; numberCopy . mergeFrom ( number ) ; long nationalNumber = number . getNationalNumber ( ) ; do { nationalNumber /= 10 ; numberCopy . setNationalNumber ( nationalNumber ) ; if ( isPossibleNumberWithReason ( numberCopy ) == ValidationResult . TOO_SHORT || nationalNumber == 0 ) { return false ; } } while ( ! isValidNumber ( numberCopy ) ) ; number . setNationalNumber ( nationalNumber ) ; return true ; }
target:  Attempts to extract a valid number from a phone number that is too long to be valid, and resets the PhoneNumber object passed in to that valid version. If no valid number could be extracted, the PhoneNumber object passed in will not be modified.