private void setBit(final int mask, final boolean bit) {
        if (getBit(mask) != bit) {
            bitfield ^= mask;
        }
    }
The cost of that path (a modified distance)
main/src/main/java/cgeo/geocaching/brouter/core/OsmPath.java