Program: 178856
Project: 178856
Buggy source:
/** 
 * {@inheritDoc} 
 */
public V put(K key,V value){
  if (root != null)   System.out.println("String_Node_Str" + root.getClass());
  Node<K,V> currentNode=root;
  while (currentNode instanceof InternalNode) {
    currentNode=currentNode.getChild(key).left();
  }
  V oldVal=null;
  if (currentNode != null) {
    LeafNode<K,V> leaf=(LeafNode<K,V>)currentNode;
    oldVal=leaf.getChild(key).right();
    if (!leaf.addValue(key,value)) {
      LeafNode<K,V> right=leaf.split(key,value).right();
      Node<K,V> newRight=right;
      System.out.println("String_Node_Str" + right);
      InternalNode<K,V> parent=(InternalNode<K,V>)right.parent;
      K addToParent=newRight.lowerBound();
      if (parent != null)       System.out.println("String_Node_Str" + newRight.upperUpper() + "String_Node_Str"+ parent.upperUpper());
      System.out.println("String_Node_Str" + addToParent + "String_Node_Str");
      while (parent != null) {
        if (newRight.upperUpper().compareTo(parent.upperUpper()) > 0) {
          if (parent != root) {
            parent=(InternalNode<K,V>)parent.parent;
            continue;
          }
        }
        if (parent.addChild(addToParent,newRight)) {
          break;
        }
        InternalNode<K,V> parentRight=(InternalNode<K,V>)parent.split(addToParent,newRight).left();
        K addToParentNew=parent.getMiddleKey();
        addToParent=addToParentNew;
        parent=(InternalNode<K,V>)parent.parent;
        newRight=parentRight;
      }
      if (parent == null) {
        Node<K,V> newRoot=new InternalNode<K,V>(root,newRight,addToParent);
        root.parent=newRoot;
        newRight.parent=newRoot;
        root=newRoot;
      }
    }
  }
 else {
    root=new LeafNode<K,V>(key,value);
  }
  return oldVal;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public V put(K key,V value){
  Node<K,V> currentNode=root;
  while (currentNode instanceof InternalNode) {
    currentNode=currentNode.getChild(key).left();
  }
  V oldVal=null;
  if (currentNode != null) {
    LeafNode<K,V> leaf=(LeafNode<K,V>)currentNode;
    oldVal=leaf.getChild(key).right();
    if (!leaf.addValue(key,value)) {
      LeafNode<K,V> right=leaf.split(key,value).right();
      Node<K,V> newRight=right;
      InternalNode<K,V> parent=(InternalNode<K,V>)right.parent;
      K addToParent=newRight.lowerBound();
      if (parent != null)       while (parent != null) {
        if (newRight.upperUpper().compareTo(parent.upperUpper()) > 0) {
          if (parent != root) {
            parent=(InternalNode<K,V>)parent.parent;
            continue;
          }
        }
        if (parent.addChild(addToParent,newRight)) {
          break;
        }
        InternalNode<K,V> parentRight=(InternalNode<K,V>)parent.split(addToParent,newRight).left();
        K addToParentNew=parent.getMiddleKey();
        addToParent=addToParentNew;
        parent=(InternalNode<K,V>)parent.parent;
        newRight=parentRight;
      }
      if (parent == null) {
        Node<K,V> newRoot=new InternalNode<K,V>(root,newRight,addToParent);
        root.parent=newRoot;
        newRight.parent=newRoot;
        root=newRoot;
      }
    }
  }
 else {
    root=new LeafNode<K,V>(key,value);
  }
  return oldVal;
}