The usual style we use is to put a helper method like this immediately after the method that uses it - in this case just after `sourceDocumentContains(String document)`. There are several advantages to readability by doing so.