Program: 45811
Project: 45811
Buggy source:
public void messageReceived(WonderlandClientSender sender,WonderlandClientID clientID,Message message){
  Logger logger=Logger.getLogger(CellEditConnectionHandler.class.getName());
  CellEditMessage editMessage=(CellEditMessage)message;
  if (editMessage.getEditType() == EditType.CREATE_CELL) {
    CellServerState setup=((CellCreateMessage)editMessage).getCellSetup();
    String className=setup.getServerClassName();
    logger.fine("String_Node_Str" + className);
    CellMO cellMO=CellMOFactory.loadCellMO(className);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + className);
      return;
    }
    CellMO parent=null;
    CellID parentCellID=((CellCreateMessage)editMessage).getParentCellID();
    if (parentCellID != null) {
      parent=CellManagerMO.getCell(parentCellID);
    }
    try {
      cellMO.setServerState(setup);
      if (parent == null) {
        WonderlandContext.getCellManager().insertCellInWorld(cellMO);
      }
 else {
        parent.addChild(cellMO);
      }
    }
 catch (    ClassCastException cce) {
      logger.log(Level.WARNING,"String_Node_Str" + cellMO.getName() + "String_Node_Str"+ cellMO.getClass()+ "String_Node_Str"+ "String_Node_Str",cce);
      return;
    }
catch (    MultipleParentException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + cellMO.getName() + "String_Node_Str"+ cellMO.getClass()+ "String_Node_Str",excp);
    }
  }
 else   if (editMessage.getEditType() == EditType.DELETE_CELL) {
    CellID cellID=((CellDeleteMessage)editMessage).getCellID();
    CellMO cellMO=CellManagerMO.getCell(cellID);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + cellID);
      return;
    }
    CellMO parentMO=cellMO.getParent();
    if (parentMO != null) {
      parentMO.removeChild(cellMO);
    }
 else {
      CellManagerMO.getCellManager().removeCellFromWorld(cellMO);
    }
  }
 else   if (editMessage.getEditType() == EditType.DUPLICATE_CELL) {
    CellID cellID=((CellDuplicateMessage)editMessage).getCellID();
    CellMO cellMO=CellManagerMO.getCell(cellID);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + cellID);
      return;
    }
    CellMO parentCellMO=cellMO.getParent();
    CellServerState state=cellMO.getServerState(null);
    String className=state.getServerClassName();
    CellMO newCellMO=CellMOFactory.loadCellMO(className);
    if (newCellMO == null) {
      logger.warning("String_Node_Str" + className);
      return;
    }
    PositionComponentServerState position=(PositionComponentServerState)state.getComponentServerState(PositionComponentServerState.class);
    if (position == null) {
      logger.warning("String_Node_Str" + "String_Node_Str" + cellID);
      return;
    }
    Vector3f offset=new Vector3f(1,1,1);
    Vector3f origin=position.getTranslation();
    position.setTranslation(offset.add(origin));
    state.addComponentServerState(position);
    state.setName(((CellDuplicateMessage)editMessage).getCellName());
    newCellMO.setServerState(state);
    try {
      if (parentCellMO == null) {
        WonderlandContext.getCellManager().insertCellInWorld(newCellMO);
      }
 else {
        parentCellMO.addChild(newCellMO);
      }
    }
 catch (    MultipleParentException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + newCellMO.getName() + "String_Node_Str"+ newCellMO.getClass()+ "String_Node_Str",excp);
    }
  }
 else   if (editMessage.getEditType() == EditType.REPARENT_CELL) {
    CellID cellID=((CellReparentMessage)editMessage).getCellID();
    CellID newParentID=((CellReparentMessage)editMessage).getParentCellID();
    CellMO child=CellManagerMO.getCell(cellID);
    CellMO oldParent=child.getParent();
    CellMO newParent=CellManagerMO.getCell(newParentID);
    if (oldParent == null) {
      CellManagerMO.getCellManager().removeCellFromWorld(child);
    }
 else {
      oldParent.removeChild(child);
    }
    CellTransform childTransform=((CellReparentMessage)editMessage).getChildCellTransform();
    if (childTransform != null)     child.setLocalTransform(childTransform);
    if (newParent == null) {
      try {
        CellManagerMO.getCellManager().insertCellInWorld(child);
      }
 catch (      MultipleParentException ex) {
        Logger.getLogger(CellEditConnectionHandler.class.getName()).log(Level.SEVERE,null,ex);
      }
    }
 else {
      try {
        newParent.addChild(child);
      }
 catch (      MultipleParentException ex) {
        Logger.getLogger(CellEditConnectionHandler.class.getName()).log(Level.SEVERE,null,ex);
      }
    }
  }
}

Fixed version (ground truth):
public void messageReceived(WonderlandClientSender sender,WonderlandClientID clientID,Message message){
  Logger logger=Logger.getLogger(CellEditConnectionHandler.class.getName());
  CellEditMessage editMessage=(CellEditMessage)message;
  if (editMessage.getEditType() == EditType.CREATE_CELL) {
    CellServerState setup=((CellCreateMessage)editMessage).getCellSetup();
    String className=setup.getServerClassName();
    logger.fine("String_Node_Str" + className);
    CellMO cellMO=CellMOFactory.loadCellMO(className);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + className);
      return;
    }
    CellMO parent=null;
    CellID parentCellID=((CellCreateMessage)editMessage).getParentCellID();
    if (parentCellID != null) {
      parent=CellManagerMO.getCell(parentCellID);
    }
    try {
      cellMO.setServerState(setup);
      if (parent == null) {
        WonderlandContext.getCellManager().insertCellInWorld(cellMO);
      }
 else {
        parent.addChild(cellMO);
      }
    }
 catch (    ClassCastException cce) {
      logger.log(Level.WARNING,"String_Node_Str" + cellMO.getName() + "String_Node_Str"+ cellMO.getClass()+ "String_Node_Str"+ "String_Node_Str",cce);
      return;
    }
catch (    MultipleParentException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + cellMO.getName() + "String_Node_Str"+ cellMO.getClass()+ "String_Node_Str",excp);
    }
  }
 else   if (editMessage.getEditType() == EditType.DELETE_CELL) {
    CellID cellID=((CellDeleteMessage)editMessage).getCellID();
    CellMO cellMO=CellManagerMO.getCell(cellID);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + cellID);
      return;
    }
    CellMO parentMO=cellMO.getParent();
    if (parentMO != null) {
      parentMO.removeChild(cellMO);
    }
 else {
      CellManagerMO.getCellManager().removeCellFromWorld(cellMO);
    }
  }
 else   if (editMessage.getEditType() == EditType.DUPLICATE_CELL) {
    CellID cellID=((CellDuplicateMessage)editMessage).getCellID();
    CellMO cellMO=CellManagerMO.getCell(cellID);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + cellID);
      return;
    }
    CellMO parentCellMO=cellMO.getParent();
    CellServerState state=cellMO.getServerState(null);
    String className=state.getServerClassName();
    CellMO newCellMO=CellMOFactory.loadCellMO(className);
    if (newCellMO == null) {
      logger.warning("String_Node_Str" + className);
      return;
    }
    PositionComponentServerState position=(PositionComponentServerState)state.getComponentServerState(PositionComponentServerState.class);
    if (position == null) {
      logger.warning("String_Node_Str" + "String_Node_Str" + cellID);
      return;
    }
    Vector3f offset=new Vector3f(1,0,1);
    Vector3f origin=position.getTranslation();
    position.setTranslation(offset.add(origin));
    state.addComponentServerState(position);
    state.setName(((CellDuplicateMessage)editMessage).getCellName());
    newCellMO.setServerState(state);
    try {
      if (parentCellMO == null) {
        WonderlandContext.getCellManager().insertCellInWorld(newCellMO);
      }
 else {
        parentCellMO.addChild(newCellMO);
      }
    }
 catch (    MultipleParentException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + newCellMO.getName() + "String_Node_Str"+ newCellMO.getClass()+ "String_Node_Str",excp);
    }
  }
 else   if (editMessage.getEditType() == EditType.REPARENT_CELL) {
    CellID cellID=((CellReparentMessage)editMessage).getCellID();
    CellID newParentID=((CellReparentMessage)editMessage).getParentCellID();
    CellMO child=CellManagerMO.getCell(cellID);
    CellMO oldParent=child.getParent();
    CellMO newParent=CellManagerMO.getCell(newParentID);
    if (oldParent == null) {
      CellManagerMO.getCellManager().removeCellFromWorld(child);
    }
 else {
      oldParent.removeChild(child);
    }
    CellTransform childTransform=((CellReparentMessage)editMessage).getChildCellTransform();
    if (childTransform != null)     child.setLocalTransform(childTransform);
    if (newParent == null) {
      try {
        CellManagerMO.getCellManager().insertCellInWorld(child);
      }
 catch (      MultipleParentException ex) {
        Logger.getLogger(CellEditConnectionHandler.class.getName()).log(Level.SEVERE,null,ex);
      }
    }
 else {
      try {
        newParent.addChild(child);
      }
 catch (      MultipleParentException ex) {
        Logger.getLogger(CellEditConnectionHandler.class.getName()).log(Level.SEVERE,null,ex);
      }
    }
  }
}