I looked at the example you gave. If I see well, the Bloomberg example and the code do not correspond to the same bond (one is maturity 2022 and the other 2020).
The bond figures are conventional figures. In version 1.2 we have only US_STREET and UK_BUMP_DMO_METHOD, in the next version, we have added GERMAN_BOND (same as US_STREET) and FRANCE_COMPOUND_METHOD (difference only when in the last coupon period).
We have implemented method to computed yield, (clean and dirty) price, modified duration, etc. one from the other. It is important to use the right conventions, for the bond indicated in your screen it is: Day Count: “Actual/Actual ICMA”, Coupon 1.5%, maturity: 2022-9-4, coupon frequency: annual.
To compute the yield from the price, no curve is needed. The curves can be used to compute a price starting from the issuer specific discounting curves.
If you start from the clean price on the screen short: 1.0124, you can compute the other number with:
BondSecurityDiscountingMethod METHOD_BOND = BondSecurityDiscountingMethod.getInstance();
double cleanPriceInput = 1.0124;
double modifiedDuration = METHOD_BOND.modifiedDurationFromCleanPrice(bond, cleanPriceInput);
double yield = METHOD_BOND.yieldFromCleanPrice(bond, cleanPriceInput);
double dirtyPrice = METHOD_BOND.dirtyPriceFromCleanPrice(bond, cleanPriceInput);
It is also possible to compute then starting from a different initial number, like the yield. The method “BondSecurityDiscountingMethod” provides most of the combinations.
Using those methods the results (using your code, with the conventions changed to the one of the bond on the screen shot) are:
They are matching the one on the screen shot.
I hope this helps.