code: double getThreshold(String x, String y, double p) {
  		return 2 * Math.max(x.length(), y.length()) * (1 - p);
  	}
docs: Calculate a threshold.
  
  @param x first string.
  @param y second string.
  @param p the threshold coefficient.
  @return 2 maxLength(x, y) (1-p)