The ChengBetaSampler chooses between two algorithms on each call to the sample() method. Each algorithm has several constants that are computed on each call. The choice and these constants will always be the same.
Extract the two algorithms into private classes that can precompute the constants. The main sample method can delegate to the appropriately chosen private class implementation.