move some utility methods to the JavaFileAnalyzer