Buggy code:
public class HashCodeBuilderTest extends TestCase { public HashCodeBuilderTest ( String name ) { } public static void main ( String [ ] args ) { } public static Test suite ( ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testConstructorEx1 ( ) { } public void testConstructorEx2 ( ) { } static class TestObject { private int a ; public TestObject ( int a ) { } public boolean equals ( Object o ) { } public void setA ( int a ) { } public int getA ( ) { } } static class TestSubObject extends HashCodeBuilderTest . TestObject { private int b ; private transient int t ; public TestSubObject ( ) { } public TestSubObject ( int a , int b , int t ) { } public boolean equals ( Object o ) { } } public void testReflectionHashCode ( ) { } public void testReflectionHierarchyHashCode ( ) { } public void testReflectionHierarchyHashCodeEx1 ( ) { } public void testReflectionHierarchyHashCodeEx2 ( ) { } public void testReflectionHashCodeEx1 ( ) { } public void testReflectionHashCodeEx2 ( ) { } public void testReflectionHashCodeEx3 ( ) { } public void testSuper ( ) { } public void testObject ( ) { } public void testLong ( ) { } public void testInt ( ) { } public void testShort ( ) { } public void testChar ( ) { } public void testByte ( ) { } public void testDouble ( ) { } public void testFloat ( ) { } public void testBoolean ( ) { } public void testObjectArray ( ) { } public void testObjectArrayAsObject ( ) { } public void testLongArray ( ) { } public void testLongArrayAsObject ( ) { } public void testIntArray ( ) { } public void testIntArrayAsObject ( ) { } public void testShortArray ( ) { } public void testShortArrayAsObject ( ) { } public void testCharArray ( ) { } public void testCharArrayAsObject ( ) { } public void testByteArray ( ) { } public void testByteArrayAsObject ( ) { } public void testDoubleArray ( ) { } public void testDoubleArrayAsObject ( ) { } public void testFloatArray ( ) { } public void testFloatArrayAsObject ( ) { } public void testBooleanArray ( ) { } public void testBooleanArrayAsObject ( ) { } public void testBooleanMultiArray ( ) { } public void testReflectionHashCodeExcludeFields ( ) throws Exception { HashCodeBuilderTest . TestObjectWithMultipleFields x = new HashCodeBuilderTest . TestObjectWithMultipleFields ( 1 , 2 , 3 ) ; assertEquals ( ( ( ( ( ( ( 17 * 37 ) + 1 ) * 37 ) + 2 ) * 37 ) + 3 ) , HashCodeBuilder . reflectionHashCode ( x ) ) ; <START_BUG> assertEquals ( ( ( ( ( ( ( 17 * 37 ) + 1 ) * 37 ) + 2 ) * 37 ) + 3 ) , HashCodeBuilder . reflectionHashCode ( x , null ) ) ; <END_BUG> assertEquals ( ( ( ( ( ( ( 17 * 37 ) + 1 ) * 37 ) + 2 ) * 37 ) + 3 ) , HashCodeBuilder . reflectionHashCode ( x , new String [ ] { } ) ) ; assertEquals ( ( ( ( ( ( ( 17 * 37 ) + 1 ) * 37 ) + 2 ) * 37 ) + 3 ) , HashCodeBuilder . reflectionHashCode ( x , new String [ ] { "xxx" } ) ) ; assertEquals ( ( ( ( ( 17 * 37 ) + 1 ) * 37 ) + 3 ) , HashCodeBuilder . reflectionHashCode ( x , new String [ ] { "two" } ) ) ; assertEquals ( ( ( ( ( 17 * 37 ) + 1 ) * 37 ) + 2 ) , HashCodeBuilder . reflectionHashCode ( x , new String [ ] { "three" } ) ) ; assertEquals ( ( ( 17 * 37 ) + 1 ) , HashCodeBuilder . reflectionHashCode ( x , new String [ ] { "two" , "three" } ) ) ; assertEquals ( 17 , HashCodeBuilder . reflectionHashCode ( x , new String [ ] { "one" , "two" , "three" } ) ) ; assertEquals ( 17 , HashCodeBuilder . reflectionHashCode ( x , new String [ ] { "one" , "two" , "three" , "xxx" } ) ) ; } static class TestObjectWithMultipleFields { private int one = 0 ; private int two = 0 ; private int three = 0 ; public TestObjectWithMultipleFields ( int one , int two , int three ) { } } }

Fix:
assertEquals ( ( ( ( ( ( ( 17 * 37 ) + 1 ) * 37 ) + 2 ) * 37 ) + 3 ) , HashCodeBuilder . reflectionHashCode ( x , ( ( String [ ] ) ( null ) ) ) ) ;