Bug 427260: extract utility methods relating to sources