Skip to content

Commit

Permalink
Remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 committed Jul 12, 2023
1 parent df893ca commit a97365b
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,25 +459,19 @@ private Map<String, String> processCrossCounts(String entityString) throws com.f
* @return Map<String, String> The obfuscated cross counts
*/
private Map<String, String> obfuscateCrossCounts(Map<String, String> crossCounts, int requestVariance) {
// Obfuscate the counts. This is done by generating a random number between 0 and the variance (=-3 for bdc)
// and adding that to the count. This is done for each count.
Set<String> obfuscatedKeys = new HashSet<>();
if(crossCounts != null) {
crossCounts.keySet().forEach(key -> {
String crossCount = crossCounts.get(key);
// Aggregate count converts the count to "< threshold" if the count is less than the threshold and greater than 0.
Optional<String> aggregatedCount = aggregateCount(crossCount);
aggregatedCount.ifPresent((x) -> obfuscatedKeys.add(key));
crossCounts.put(key, aggregatedCount.orElse(crossCount));
});

// This confuses me. We are generating the parents of the obfuscated keys?
// break down the keys into their parents
Set<String> obfuscatedParents = obfuscatedKeys.stream().flatMap(key -> {
return generateParents(key);
}).collect(Collectors.toSet());

// obfuscate the parents.
crossCounts.keySet().forEach(key -> {
String crossCount = crossCounts.get(key);
if (!obfuscatedKeys.contains(key) && obfuscatedParents.contains(key)) {
Expand Down

0 comments on commit a97365b

Please sign in to comment.