Merge "Revert "Revert "ART: Extracts an utility function of the duplicated code"""