Program: 45991
Project: 45991
Buggy source:
/** 
 * Creates a cell in the world given the CellServerState of the cell. If the given CellServerState is null, this method simply does not create a Cell. This method attempts to position the Cell "optimally" so that the avatar can see it, based upon "hints" about the Cell bounds given to it in the CellServerState.
 * @param state The cell server state for the new cell
 * @throw CellCreationException Upon error creating the cell
 */
public static void createCell(CellServerState state) throws CellCreationException {
  if (state == null) {
    logger.fine("String_Node_Str");
    return;
  }
  ViewManager vm=ViewManager.getViewManager();
  ViewCell viewCell=vm.getPrimaryViewCell();
  CellTransform viewTransform=viewCell.getWorldTransform();
  ServerSessionManager manager=viewCell.getCellCache().getSession().getSessionManager();
  CellTransform transform=null;
  BoundingVolumeHint hint=state.getBoundingVolumeHint();
  logger.info("String_Node_Str" + hint.getBoundsHint() + "String_Node_Str"+ hint.isDoSystemPlacement());
  if (hint != null && hint.isDoSystemPlacement() == true) {
    BoundingVolume boundsHint=hint.getBoundsHint();
    transform=CellPlacementUtils.getCellTransform(manager,boundsHint,viewTransform);
  }
 else   if (hint == null) {
    BoundingVolume boundsHint=new BoundingSphere(DEFAULT_RADIUS,Vector3f.ZERO);
    transform=CellPlacementUtils.getCellTransform(manager,boundsHint,viewTransform);
  }
 else   if (hint != null && hint.isDoSystemPlacement() == false) {
    transform=new CellTransform();
  }
  CellID parentID=null;
  Cell parent=CellCreationParentRegistry.getCellCreationParent();
  if (parent != null) {
    parentID=parent.getCellID();
    logger.info("String_Node_Str" + parentID.toString());
  }
  if (parentID != null) {
    CellTransform worldTransform=new CellTransform(null,null);
    CellTransform parentTransform=parent.getWorldTransform();
    logger.info("String_Node_Str" + parentTransform.getTranslation(null).toString() + "String_Node_Str"+ parentTransform.getRotation(null).toString());
    transform=CellPlacementUtils.transform(transform,worldTransform,parentTransform);
  }
  logger.info("String_Node_Str" + transform.getTranslation(null).toString());
  PositionComponentServerState position=new PositionComponentServerState();
  position.setTranslation(transform.getTranslation(null));
  position.setRotation(transform.getRotation(null));
  position.setScaling(transform.getScaling(null));
  state.addComponentServerState(position);
  state.addComponentServerState(new ViewComponentServerState(viewTransform));
  WonderlandSession session=manager.getPrimarySession();
  CellEditChannelConnection connection=(CellEditChannelConnection)session.getConnection(CellEditConnectionType.CLIENT_TYPE);
  CellCreateMessage msg=new CellCreateMessage(parentID,state);
  connection.send(msg);
}

Fixed version (ground truth):
/** 
 * Creates a cell in the world given the CellServerState of the cell. If the given CellServerState is null, this method simply does not create a Cell. This method attempts to position the Cell "optimally" so that the avatar can see it, based upon "hints" about the Cell bounds given to it in the CellServerState.
 * @param state The cell server state for the new cell
 * @throw CellCreationException Upon error creating the cell
 */
public static void createCell(CellServerState state) throws CellCreationException {
  if (state == null) {
    logger.fine("String_Node_Str");
    return;
  }
  ViewManager vm=ViewManager.getViewManager();
  ViewCell viewCell=vm.getPrimaryViewCell();
  CellTransform viewTransform=viewCell.getWorldTransform();
  ServerSessionManager manager=viewCell.getCellCache().getSession().getSessionManager();
  CellTransform transform=null;
  BoundingVolumeHint hint=state.getBoundingVolumeHint();
  logger.info("String_Node_Str" + hint.getBoundsHint() + "String_Node_Str"+ hint.isDoSystemPlacement());
  if (hint != null && hint.isDoSystemPlacement() == true) {
    BoundingVolume boundsHint=hint.getBoundsHint();
    transform=CellPlacementUtils.getCellTransform(manager,boundsHint,viewTransform);
  }
 else   if (hint == null) {
    BoundingVolume boundsHint=new BoundingSphere(DEFAULT_RADIUS,Vector3f.ZERO);
    transform=CellPlacementUtils.getCellTransform(manager,boundsHint,viewTransform);
  }
 else   if (hint != null && hint.isDoSystemPlacement() == false) {
    transform=new CellTransform();
  }
  CellID parentID=null;
  Cell parent=CellCreationParentRegistry.getCellCreationParent();
  if (parent != null) {
    parentID=parent.getCellID();
    logger.info("String_Node_Str" + parentID.toString());
  }
  if (parentID != null) {
    CellTransform worldTransform=new CellTransform(null,null);
    CellTransform parentTransform=parent.getWorldTransform();
    logger.info("String_Node_Str" + parentTransform.getTranslation(null).toString() + "String_Node_Str"+ parentTransform.getRotation(null).toString());
    transform=CellPlacementUtils.transform(transform,worldTransform,parentTransform);
  }
  logger.info("String_Node_Str" + transform.getTranslation(null).toString());
  PositionComponentServerState position=(PositionComponentServerState)state.getComponentServerState(PositionComponentServerState.class);
  if (position == null) {
    position=new PositionComponentServerState();
    state.addComponentServerState(position);
  }
  position.setTranslation(transform.getTranslation(null));
  position.setRotation(transform.getRotation(null));
  position.setScaling(transform.getScaling(null));
  state.addComponentServerState(new ViewComponentServerState(viewTransform));
  WonderlandSession session=manager.getPrimarySession();
  CellEditChannelConnection connection=(CellEditChannelConnection)session.getConnection(CellEditConnectionType.CLIENT_TYPE);
  CellCreateMessage msg=new CellCreateMessage(parentID,state);
  connection.send(msg);
}