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 void add ( Object key ) { } public void add ( Object [ ] keys ) { } public void add ( Collection keys ) { } public void 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 void add ( Collection treePath , Object [ ] values ) { } public void 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 ) { } 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 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 { Logger log = LoggingManager . getLoggerForClass ( ) ; Collection treePath = Arrays . asList ( new String [ ] { "1" , "2" , "3" , "4" } ) ; HashTree tree = new HashTree ( ) ; log . debug ( ( "treePath<seq2seq4repair_space>=<seq2seq4repair_space>" + treePath ) ) ; <START_BUG> tree . add ( treePath , new String ( "value" ) ) ; <END_BUG> log . debug ( ( "Now<seq2seq4repair_space>treePath<seq2seq4repair_space>=<seq2seq4repair_space>" + treePath ) ) ; log . debug ( tree . toString ( ) ) ; assertEquals ( 1 , tree . list ( treePath ) . size ( ) ) ; assertEquals ( "value" , tree . getArray ( treePath ) [ 0 ] ) ; } } }

Fix:
tree . add ( treePath , "value" ) ;