in sarif/src/main/java/com/jetbrains/qodana/sarif/baseline/ResultKey.java [105:126]
public int hashCode() {
int hash = 1;
hash = ((hash * 31) + ((result.getRuleId() == null) ? 0 : result.getRuleId().hashCode()));
hash = ((hash * 31) + ((result.getMessage() == null) ? 0 : hashMessage(result.getMessage())));
hash = ((hash * 31) + ((result.getLevel() == null) ? 0 : result.getLevel().hashCode()));
if (result.getLocations() == null) return hash;
for (Location location : result.getLocations()) {
PhysicalLocation physicalLocation = location.getPhysicalLocation();
if (physicalLocation != null) {
hash = ((hash * 31) + hashPhysicalLocation(physicalLocation));
} else {
Set<LogicalLocation> logicalLocations = location.getLogicalLocations();
if (logicalLocations != null) {
for (LogicalLocation logicalLocation : logicalLocations) {
hash = ((hash * 31) + hashLogicalLocation(logicalLocation));
}
}
}
}
return hash;
}