replicates current analysis functionality in Java