Source:
<code>private Supplier<DruidLongPredicate> makeLongPredicateSupplier() { class BoundLongPredicateSupplier implements Supplier<DruidLongPredicate> { private final Object initLock = new Object(); private boolean matchesNothing; private DruidLongPredicate predicate; @Override public DruidLongPredicate get() { initPredicate(); return predicate; } private void initPredicate() { if (predicate != null) { return; } synchronized (initLock) { if (predicate != null) { return; } final boolean hasLowerLongBound; final boolean hasUpperLongBound; final long lowerLongBound; final long upperLongBound; matchesNothing = false; if (hasLowerBound()) { final Long lowerLong = GuavaUtils.tryParseLong(lower); if (lowerLong == null) { hasLowerLongBound = false; lowerLongBound = 0L; } else { hasLowerLongBound = true; lowerLongBound = lowerLong; } } else { hasLowerLongBound = false; lowerLongBound = 0L; } if (hasUpperBound()) { Long upperLong = GuavaUtils.tryParseLong(upper); if (upperLong == null) { matchesNothing = true; hasUpperLongBound = false; upperLongBound = 0L; } else { hasUpperLongBound = true; upperLongBound = upperLong; } } else { hasUpperLongBound = false; upperLongBound = 0L; } if (matchesNothing) { predicate = DruidLongPredicate.FALSE_PREDICATE; <START> } else { <END> predicate = new DruidLongPredicate() { @Override public boolean applyLong(long input) { int lowerComparing = 1; int upperComparing = 1; if (hasLowerLongBound) { lowerComparing = Long.compare(input, lowerLongBound); } if (hasUpperLongBound) { upperComparing = Long.compare(upperLongBound, input); } return boundsCheck(lowerStrict, upperStrict, lowerComparing, upperComparing); } }; } } } } return new BoundLongPredicateSupplier(); }</code><technical_language>Suggested pull hasLower/UpperBound lower/upperStrict logic predicate creation (create Predicates for combinations), applyLong() of Predicate cheaper clearer</technical_language>

Target:
private Supplier<DruidLongPredicate> makeLongPredicateSupplier() { class BoundLongPredicateSupplier implements Supplier<DruidLongPredicate> { private final Object initLock = new Object(); private DruidLongPredicate predicate; @Override public DruidLongPredicate get() { initPredicate(); return predicate; } private void initPredicate() { if (predicate != null) { return; } synchronized (initLock) { if (predicate != null) { return; } final boolean hasLowerLongBound; final boolean hasUpperLongBound; final long lowerLongBound; final long upperLongBound; boolean matchesNothing = false; if (hasLowerBound()) { final Long lowerLong = GuavaUtils.tryParseLong(lower); if (lowerLong == null) { hasLowerLongBound = false; lowerLongBound = 0L; } else { hasLowerLongBound = true; lowerLongBound = lowerLong; } } else { hasLowerLongBound = false; lowerLongBound = 0L; } if (hasUpperBound()) { Long upperLong = GuavaUtils.tryParseLong(upper); if (upperLong == null) { matchesNothing = true; hasUpperLongBound = false; upperLongBound = 0L; } else { hasUpperLongBound = true; upperLongBound = upperLong; } } else { hasUpperLongBound = false; upperLongBound = 0L; } if (matchesNothing) { predicate = DruidLongPredicate.ALWAYS_FALSE; } else { predicate = makeLongPredicateFromBounds( hasLowerLongBound, hasUpperLongBound, lowerStrict, upperStrict, lowerLongBound, upperLongBound ); } } } } return new BoundLongPredicateSupplier(); }