private String getMostFrequentFillValue(HashMap<String, Integer> fillValuesHash) {

		if (fillValuesHash.isEmpty()) {
			throw new AssertException("Must have filler bytes!");
		}

		// Determine val with highest count		
		Set<Entry<String, Integer>> entries = fillValuesHash.entrySet();
		Entry<String, Integer> max = entries.iterator().next(); // start with a non-null
		for (Entry<String, Integer> entry : entries) {
			int current = entry.getValue();
			if (current > max.getValue()) {
				max = entry;
			}
		}

		return max.getKey();
	}
This function tries to determine the fill value used by the current program.
The byte value occurring most is the winner.

@return filler value
@throws Exception
Ghidra/Features/Base/src/main/java/ghidra/app/analyzers/CondenseFillerBytesAnalyzer.java