private static int findIndexMatchingThreshold(ArrayList<FunctionPair> pairs, double threshold) {
		int min = 0;
		int max = pairs.size() - 1;
		while (min < max) {
			int mid = (min + max + 1) / 2;			// Guarantee if min != max,  then mid != min
			FunctionPair pair = pairs.get(mid);
			if (pair.getConfResult() < threshold) {
				max = mid - 1;
			}
			else {
				min = mid;
			}
		}
		return min;
	}
Find the last index in the (sorted) list where the confidence is >= threshold
@param pairs is the sorted list
@param threshold to find
@return the index
Ghidra/Features/VersionTrackingBSim/src/main/java/ghidra/feature/vt/api/BSimProgramCorrelatorMatching.java