private boolean areSameLocations(final DataRange highlight1, final DataRange highlight2) {
        if (highlight1 == null && highlight2 == null) {
            return true;
        } else if (highlight1 != null && highlight2 == null) {
            return false;
        } else if (highlight1 == null) {
            return false;
        } else {
            return Objects.equals(highlight1.getLocationFrom(), highlight2.getLocationFrom())
                    && Objects.equals(highlight1.getLocationTo(), highlight2.getLocationTo());
        }
    }
Compare the {@link DataRange}s using on the from/to {@link Location};
stroom-core-client/src/main/java/stroom/data/client/presenter/SourcePresenter.java