String (final ResourceBundleImpl resourceBundle) { final Int2LongOpenHashMap charCounts = new Int2LongOpenHashMap(); for (PropertiesFile propertiesFile : resourceBundle.getPropertiesFiles()) { if (propertiesFile == null) continue; List<IProperty> properties = propertiesFile.getProperties(); for (IProperty property : properties) { String key = property.getUnescapedKey(); if (key == null) continue; for (int i =0; i<key.length(); i++) { char c = key.charAt(i); if (!Character.isLetterOrDigit(c)) { charCounts.put(c, charCounts.get(c) + 1); } } } } final char[] mostProbableChar = new char[]{'.'}; charCounts.keySet().forEach(new IntConsumer() { long count = -1; @Override public void accept(int ch) { long charCount = charCounts.get(ch); if (charCount > count) { count = charCount; mostProbableChar[0] = (char)ch; } } }); if (mostProbableChar[0] == 0) { mostProbableChar[0] = '.'; } return Character.toString(mostProbableChar[0]); }