Buggy code:
public class DfpField implements Field < Dfp > { public enum RoundingMode { ROUND_DOWN , ROUND_UP , ROUND_HALF_UP , ROUND_HALF_DOWN , ROUND_HALF_EVEN , ROUND_HALF_ODD , ROUND_CEIL , ROUND_FLOOR ; } public static final int FLAG_INVALID = 1 ; public static final int FLAG_DIV_ZERO = 2 ; public static final int FLAG_OVERFLOW = 4 ; public static final int FLAG_UNDERFLOW = 8 ; public static final int FLAG_INEXACT = 16 ; private static String sqr2String ; private static String sqr2ReciprocalString ; private static String sqr3String ; private static String sqr3ReciprocalString ; private static String piString ; private static String eString ; private static String ln2String ; private static String ln5String ; private static String ln10String ; private final int radixDigits ; private final Dfp zero ; private final Dfp one ; private final Dfp two ; private final Dfp sqr2 ; private final Dfp [ ] sqr2Split ; private final Dfp sqr2Reciprocal ; private final Dfp sqr3 ; private final Dfp sqr3Reciprocal ; private final Dfp pi ; private final Dfp [ ] piSplit ; private final Dfp e ; private final Dfp [ ] eSplit ; private final Dfp ln2 ; private final Dfp [ ] ln2Split ; private final Dfp ln5 ; private final Dfp [ ] ln5Split ; private final Dfp ln10 ; private DfpField . RoundingMode rMode ; private int ieeeFlags ; public DfpField ( final int decimalDigits ) { } private DfpField ( final int decimalDigits , final boolean computeConstants ) { } public int getRadixDigits ( ) { } public void setRoundingMode ( final DfpField . RoundingMode mode ) { } public DfpField . RoundingMode getRoundingMode ( ) { } public int getIEEEFlags ( ) { } public void clearIEEEFlags ( ) { } public void setIEEEFlags ( final int flags ) { } public void setIEEEFlagsBits ( final int bits ) { } public Dfp newDfp ( ) { } public Dfp newDfp ( final byte x ) { } public Dfp newDfp ( final int x ) { } public Dfp newDfp ( final long x ) { } public Dfp newDfp ( final double x ) { } public Dfp newDfp ( Dfp d ) { } public Dfp newDfp ( final String s ) { } public Dfp newDfp ( final byte sign , final byte nans ) { } public Dfp getZero ( ) { } public Dfp getOne ( ) { } public Class < ? extends FieldElement < Dfp > > getRuntimeClass ( ) { } public Dfp getTwo ( ) { } public Dfp getSqr2 ( ) { } public Dfp [ ] getSqr2Split ( ) { } public Dfp getSqr2Reciprocal ( ) { } public Dfp getSqr3 ( ) { } public Dfp getSqr3Reciprocal ( ) { } public Dfp getPi ( ) { } public Dfp [ ] getPiSplit ( ) { } public Dfp getE ( ) { } public Dfp [ ] getESplit ( ) { } public Dfp getLn2 ( ) { } public Dfp [ ] getLn2Split ( ) { } public Dfp getLn5 ( ) { } public Dfp [ ] getLn5Split ( ) { } public Dfp getLn10 ( ) { } private Dfp [ ] split ( final String a ) { } private static void computeStringConstants ( final int highPrecisionDecimalDigits ) { } private static Dfp computePi ( final Dfp one , final Dfp two , final Dfp three ) { } public static Dfp computeExp ( final Dfp a , final Dfp one ) { } public static Dfp computeLn ( final Dfp a , final Dfp one , final Dfp two ) { int den = 1 ; Dfp x = a . add ( new Dfp ( a . getField ( ) , ( - 1 ) ) ) . divide ( a . add ( one ) ) ; Dfp y = new Dfp ( x ) ; Dfp num = new Dfp ( x ) ; Dfp py = new Dfp ( y ) ; for ( int i = 0 ; i < 10000 ; i ++ ) { num = num . multiply ( x ) ; num = num . multiply ( x ) ; <START_BUG> den = den + 2 ; <END_BUG> Dfp t = num . divide ( den ) ; y = y . add ( t ) ; if ( y . equals ( py ) ) { break ; } py = new Dfp ( y ) ; } return y . multiply ( two ) ; } }

Fix:
den += 2 ;