update ApproximatePatternCount.java class