Program: 184302
Project: 184302
Buggy source:
/** 
 * Splay the tree with root c to build a new tree that has the same keys but has a node that is "nearest" to k at the root. Here "nearest" means the new root node's key is equal to k if k is in the tree, otherwise there must be no other key in the tree in between k and the root node's key. (In the latter case there may be two "nearest" nodes - one less than k and one greater than k). Splaying is done by returning a new tree rather than modifying the input tree. The returned tree should generally share some of the existing cells from the input tree, and should create new cells for the remainder. The exact scheme for splaying that must be implemented is described in the project specification.
 * @param c The cell at root of the tree to splay.
 * @param k The key for which a "nearest" key from the tree is moved to theroot.
 * @return The root cell of the new tree.
 */
public Cell splay(Cell c,String k){
  if (c == null) {
    throw new NullPointerException("String_Node_Str");
  }
  int compareToCKey=k.compareTo(c.key());
  if (compareToCKey < 0 && c.lt != null) {
    int compareToLtKey=k.compareTo(c.lt.key());
    if (compareToLtKey < 0 && c.lt.lt != null) {
      Cell ll=splay(c.lt.lt,k);
      Cell newRR=cell(c.key(),c.lt.rt,c.rt);
      return cell(ll.key(),ll.lt,cell(c.lt.key(),ll.rt,newRR));
    }
 else     if (compareToLtKey > 0 && c.lt.rt != null) {
      Cell lr=splay(c.lt.rt,k);
      Cell newRRP=cell(c.lt.key(),c.lt.lt,c.lt.rt.lt);
      Cell newRRG=cell(c.key(),c.lt.rt.rt,c.rt);
      return cell(lr.key(),newRRP,newRRG);
    }
 else {
      return cell(c.lt.key(),c.lt.lt,cell(c.key(),c.lt.rt,c.rt));
    }
  }
 else   if (compareToCKey > 0 && c.rt != null) {
    int compareToRtKey=k.compareTo(c.rt.key());
    if (compareToRtKey > 0 && c.rt.rt != null) {
      Cell rr=splay(c.rt.rt,k);
      Cell newRR=cell(c.key(),c.lt,c.rt.lt);
      return cell(rr.key(),cell(c.rt.key(),newRR,rr.lt),rr.rt);
    }
 else     if (compareToRtKey > 0 && c.rt.lt != null) {
      Cell rl=splay(c.rt.lt,k);
      Cell newRRP=cell(c.rt.key(),c.rt.lt.rt,c.rt.rt);
      Cell newRRG=cell(c.key(),c.lt,c.rt.lt.lt);
      return cell(rl.key(),newRRG,newRRP);
    }
 else {
      return cell(c.rt.key(),cell(c.key(),c.lt,c.rt.lt),c.rt.rt);
    }
  }
 else {
    return c;
  }
}

Fixed version (ground truth):
/** 
 * Splay the tree with root c to build a new tree that has the same keys but has a node that is "nearest" to k at the root. Here "nearest" means the new root node's key is equal to k if k is in the tree, otherwise there must be no other key in the tree in between k and the root node's key. (In the latter case there may be two "nearest" nodes - one less than k and one greater than k). Splaying is done by returning a new tree rather than modifying the input tree. The returned tree should generally share some of the existing cells from the input tree, and should create new cells for the remainder. The exact scheme for splaying that must be implemented is described in the project specification.
 * @param c The cell at root of the tree to splay.
 * @param k The key for which a "nearest" key from the tree is moved to theroot.
 * @return The root cell of the new tree.
 */
public Cell splay(Cell c,String k){
  if (c == null) {
    throw new NullPointerException("String_Node_Str");
  }
  int compareToCKey=k.compareTo(c.key());
  if (compareToCKey < 0 && c.lt != null) {
    int compareToLtKey=k.compareTo(c.lt.key());
    if (compareToLtKey < 0 && c.lt.lt != null) {
      Cell ll=splay(c.lt.lt,k);
      Cell newRR=cell(c.key(),c.lt.rt,c.rt);
      return cell(ll.key(),ll.lt,cell(c.lt.key(),ll.rt,newRR));
    }
 else     if (compareToLtKey > 0 && c.lt.rt != null) {
      Cell lr=splay(c.lt.rt,k);
      Cell newRRP=cell(c.lt.key(),c.lt.lt,lr.lt);
      Cell newRRG=cell(c.key(),lr.rt,c.rt);
      return cell(lr.key(),newRRP,newRRG);
    }
 else {
      return cell(c.lt.key(),c.lt.lt,cell(c.key(),c.lt.rt,c.rt));
    }
  }
 else   if (compareToCKey > 0 && c.rt != null) {
    int compareToRtKey=k.compareTo(c.rt.key());
    if (compareToRtKey > 0 && c.rt.rt != null) {
      Cell rr=splay(c.rt.rt,k);
      Cell newRR=cell(c.key(),c.lt,c.rt.lt);
      return cell(rr.key(),cell(c.rt.key(),newRR,rr.lt),rr.rt);
    }
 else     if (compareToRtKey < 0 && c.rt.lt != null) {
      Cell rl=splay(c.rt.lt,k);
      Cell newRRP=cell(c.rt.key(),rl.rt,c.rt.rt);
      Cell newRRG=cell(c.key(),c.lt,rl.lt);
      return cell(rl.key(),newRRG,newRRP);
    }
 else {
      return cell(c.rt.key(),cell(c.key(),c.lt,c.rt.lt),c.rt.rt);
    }
  }
 else {
    return c;
  }
}