Buggy code:
public class HashTree implements Serializable , Map { public HashTree ( ) { } public HashTree ( Object key ) { } public void putAll ( Map map ) { } public Set entrySet ( ) { } public boolean containsValue ( Object value ) { } public Object put ( Object key , Object value ) { } public void clear ( ) { } public Collection values ( ) { } public void add ( Object key , HashTree subTree ) { } public void add ( HashTree newTree ) { } public HashTree ( Collection keys ) { } public HashTree ( Object [ ] keys ) { } public boolean containsKey ( Object o ) { } public boolean isEmpty ( ) { } public void set ( Object key , Object value ) { } public void set ( Object key , HashTree t ) { } public void set ( Object key , Object [ ] values ) { } public void set ( Object key , Collection values ) { } public void set ( Object [ ] treePath , Object [ ] values ) { } public void set ( Object [ ] treePath , Collection values ) { } public void set ( Collection treePath , Object [ ] values ) { } public void set ( Collection values ) { } public void set ( Collection treePath , Collection values ) { } public HashTree add ( Object key ) { } public void add ( Object [ ] keys ) { } public void add ( Collection keys ) { } public HashTree add ( Object key , Object value ) { } public void add ( Object key , Object [ ] values ) { } public void add ( Object key , Collection values ) { } public void add ( Object [ ] treePath , Object [ ] values ) { } public void add ( Object [ ] treePath , Collection values ) { } public HashTree add ( Object [ ] treePath , Object value ) { } public void add ( Collection treePath , Object [ ] values ) { } public HashTree add ( Collection treePath , Object value ) { } public void add ( Collection treePath , Collection values ) { } protected HashTree addTreePath ( Collection treePath ) { } public HashTree getTree ( Object key ) { } public Object get ( Object key ) { } public HashTree getTree ( Object [ ] treePath ) { } public Object clone ( ) { } protected void cloneTree ( HashTree newTree ) { } protected HashTree createNewTree ( ) { } protected HashTree createNewTree ( Object key ) { } protected HashTree createNewTree ( Collection values ) { } public HashTree getTree ( Collection treePath ) { } public Collection list ( ) { } public Collection list ( Object key ) { } public Object remove ( Object key ) { } public Collection list ( Object [ ] treePath ) { } public Collection list ( Collection treePath ) { } public void replace ( Object currentKey , Object newKey ) { } public Object [ ] getArray ( ) { } public Object [ ] getArray ( Object key ) { } public Object [ ] getArray ( Object [ ] treePath ) { } public Object [ ] getArray ( Collection treePath ) { HashTree tree = getTreePath ( treePath ) ; <START_BUG> return tree . getArray ( ) ; <END_BUG> } protected HashTree getTreePath ( Collection treePath ) { } public int hashCode ( ) { } public boolean equals ( Object o ) { } public Set keySet ( ) { } public HashTree search ( Object key ) { } void readObject ( ObjectInputStream ois ) throws IOException , ClassNotFoundException { } void writeObject ( ObjectOutputStream oos ) throws IOException { } public int size ( ) { } public void traverse ( HashTreeTraverser visitor ) { } private void traverseInto ( HashTreeTraverser visitor ) { } public String toString ( ) { } protected Map data ; private class TreeSearcher implements HashTreeTraverser { Object target ; HashTree result ; public TreeSearcher ( Object t ) { } public HashTree getResult ( ) { } public void addNode ( Object node , HashTree subTree ) { } public void processPath ( ) { } public void subtractNode ( ) { } } private class ConvertToString implements HashTreeTraverser { StringBuffer string = new StringBuffer ( ( ( getClass ( ) . getName ( ) ) + "{" ) ) ; StringBuffer spaces = new StringBuffer ( ) ; int depth = 0 ; public void addNode ( Object key , HashTree subTree ) { } public void subtractNode ( ) { } public void processPath ( ) { } public String toString ( ) { } private String getSpaces ( ) { } } public static class Test extends TestCase { public Test ( String name ) { } public void testAdd1 ( ) throws Exception { } public void testEqualsAndHashCode ( ) throws Exception { } } }

Fix:
return tree != null ? tree . getArray ( ) : null ;