Buggy code:
public class ComplexTest { private double inf = Double . POSITIVE_INFINITY ; private double neginf = Double . NEGATIVE_INFINITY ; private double nan = Double . NaN ; private double pi = FastMath . PI ; private Complex oneInf = new Complex ( 1 , inf ) ; private Complex oneNegInf = new Complex ( 1 , neginf ) ; private Complex infOne = new Complex ( inf , 1 ) ; private Complex infZero = new Complex ( inf , 0 ) ; private Complex infNaN = new Complex ( inf , nan ) ; private Complex infNegInf = new Complex ( inf , neginf ) ; private Complex infInf = new Complex ( inf , inf ) ; private Complex negInfInf = new Complex ( neginf , inf ) ; private Complex negInfZero = new Complex ( neginf , 0 ) ; private Complex negInfOne = new Complex ( neginf , 1 ) ; private Complex negInfNaN = new Complex ( neginf , nan ) ; private Complex negInfNegInf = new Complex ( neginf , neginf ) ; private Complex oneNaN = new Complex ( 1 , nan ) ; private Complex zeroInf = new Complex ( 0 , inf ) ; private Complex zeroNaN = new Complex ( 0 , nan ) ; private Complex nanInf = new Complex ( nan , inf ) ; private Complex nanNegInf = new Complex ( nan , neginf ) ; private Complex nanZero = new Complex ( nan , 0 ) ; @ Test public void testConstructor ( ) { } @ Test public void testConstructorNaN ( ) { } @ Test public void testAbs ( ) { } @ Test public void testAbsNaN ( ) { } @ Test public void testAbsInfinite ( ) { } @ Test public void testAdd ( ) { } @ Test public void testAddNaN ( ) { Complex x = new Complex ( 3.0 , 4.0 ) ; Complex z = x . add ( NaN ) ; Assert . assertTrue ( z . isNaN ( ) ) ; z = new Complex ( 1 , nan ) ; Complex w = x . add ( z ) ; <START_BUG> Assert . assertEquals ( w . getReal ( ) , 4.0 , 0 ) ; <END_BUG> Assert . assertTrue ( Double . isNaN ( w . getImaginary ( ) ) ) ; } @ Test public void testAddInfinite ( ) { } @ Test public void testConjugate ( ) { } @ Test public void testConjugateNaN ( ) { } @ Test public void testConjugateInfiinite ( ) { } @ Test public void testDivide ( ) { } @ Test public void testDivideReal ( ) { } @ Test public void testDivideImaginary ( ) { } @ Test public void testDivideInfinite ( ) { } @ Test public void testDivideZero ( ) { } @ Test public void testDivideNaN ( ) { } @ Test public void testDivideNaNInf ( ) { } @ Test public void testMultiply ( ) { } @ Test public void testMultiplyNaN ( ) { } @ Test public void testMultiplyNaNInf ( ) { } @ Test public void testScalarMultiply ( ) { } @ Test public void testScalarMultiplyNaN ( ) { } @ Test public void testScalarMultiplyInf ( ) { } @ Test public void testNegate ( ) { } @ Test public void testNegateNaN ( ) { } @ Test public void testSubtract ( ) { } @ Test public void testSubtractNaN ( ) { } @ Test public void testEqualsNull ( ) { } @ Test public void testEqualsClass ( ) { } @ Test public void testEqualsSame ( ) { } @ Test public void testEqualsTrue ( ) { } @ Test public void testEqualsRealDifference ( ) { } @ Test public void testEqualsImaginaryDifference ( ) { } @ Test public void testEqualsNaN ( ) { } @ Test public void testHashCode ( ) { } @ Test public void testAcos ( ) { } @ Test public void testAcosInf ( ) { } @ Test public void testAcosNaN ( ) { } @ Test public void testAsin ( ) { } @ Test public void testAsinNaN ( ) { } @ Test public void testAsinInf ( ) { } @ Test public void testAtan ( ) { } @ Test public void testAtanInf ( ) { } @ Test public void testAtanNaN ( ) { } @ Test public void testCos ( ) { } @ Test public void testCosNaN ( ) { } @ Test public void testCosInf ( ) { } @ Test public void testCosh ( ) { } @ Test public void testCoshNaN ( ) { } @ Test public void testCoshInf ( ) { } @ Test public void testExp ( ) { } @ Test public void testExpNaN ( ) { } @ Test public void testExpInf ( ) { } @ Test public void testLog ( ) { } @ Test public void testLogNaN ( ) { } @ Test public void testLogInf ( ) { } @ Test public void testLogZero ( ) { } @ Test public void testPow ( ) { } @ Test public void testPowNaNBase ( ) { } @ Test public void testPowNaNExponent ( ) { } @ Test public void testPowInf ( ) { } @ Test public void testPowZero ( ) { } @ Test ( expected = NullArgumentException . class ) public void testpowNull ( ) { } @ Test public void testSin ( ) { } @ Test public void testSinInf ( ) { } @ Test public void testSinNaN ( ) { } @ Test public void testSinh ( ) { } @ Test public void testSinhNaN ( ) { } @ Test public void testSinhInf ( ) { } @ Test public void testSqrtRealPositive ( ) { } @ Test public void testSqrtRealZero ( ) { }

Fix:
Assert . assertTrue ( Double . isNaN ( w . getReal ( ) ) ) ;