Program: 45584
Project: 45584
Buggy source:
/** 
 * Recurisvely loads cells from a given child directory (dir) in the WFS given by root. If this child has any children directories, then add to the children parameter.
 * @param root The root directory of the WFS being loaded
 * @param dir The current directory of children to load
 * @param children A list of child directories remaining to be loaded
 */
private void loadCells(String root,CellList dir,LinkedList<CellList> children){
  Cell childs[]=dir.getChildren();
  if (childs == null) {
    logger.warning("String_Node_Str" + root);
    return;
  }
  for (  Cell child : childs) {
    logger.info("String_Node_Str" + child.name);
    String relativePath=dir.getRelativePath();
    if (relativePath == null) {
      logger.warning("String_Node_Str" + child.name);
      continue;
    }
    ManagedReference<CellMO> parentRef=this.getParentCellReference(relativePath);
    CellServerState setup=CellImporterUtils.getWFSCell(root,relativePath,child.name);
    if (setup == null) {
      logger.info("String_Node_Str" + relativePath + "String_Node_Str"+ child.name);
      continue;
    }
    logger.info(setup.toString());
    String cellPath=relativePath + "String_Node_Str" + child.name;
    if (relativePath.compareTo("String_Node_Str") == 0) {
      cellPath=child.name;
    }
    String className=setup.getServerClassName();
    CellMO cellMO=CellMOFactory.loadCellMO(className);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + className);
      continue;
    }
    try {
      cellMO.setServerState(setup);
    }
 catch (    ClassCastException cce) {
      logger.log(Level.WARNING,"String_Node_Str" + cellMO.getName() + "String_Node_Str"+ cellMO.getClass(),cce);
      continue;
    }
    try {
      if (parentRef == null) {
        WonderlandContext.getCellManager().insertCellInWorld(cellMO);
      }
 else {
        logger.info("String_Node_Str" + cellMO.getCellID().toString() + "String_Node_Str"+ parentRef.get().getCellID().toString()+ "String_Node_Str");
        parentRef.get().addChild(cellMO);
        logger.info("String_Node_Str" + cellMO.getParent().getCellID().toString());
        Collection<ManagedReference<CellMO>> refs=cellMO.getParent().getAllChildrenRefs();
        Iterator<ManagedReference<CellMO>> it=refs.iterator();
        while (it.hasNext() == true) {
          logger.info("String_Node_Str" + it.next().get().getCellID().toString());
        }
        logger.info("String_Node_Str" + cellMO.isLive());
      }
    }
 catch (    MultipleParentException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + "String_Node_Str" + cellMO.getName());
      continue;
    }
    ManagedReference<CellMO> cellRef=AppContext.getDataManager().createReference(cellMO);
    this.cellMOMap.put(cellPath,cellRef);
    logger.info("String_Node_Str" + cellPath + "String_Node_Str"+ cellMO.getCellID().toString()+ "String_Node_Str"+ child.lastModified);
    logger.info(setup.toString());
    CellList newChildren=CellImporterUtils.getWFSChildren(root,cellPath);
    if (newChildren != null) {
      children.addLast(newChildren);
    }
  }
}

Fixed version (ground truth):
/** 
 * Recurisvely loads cells from a given child directory (dir) in the WFS given by root. If this child has any children directories, then add to the children parameter.
 * @param root The root directory of the WFS being loaded
 * @param dir The current directory of children to load
 * @param children A list of child directories remaining to be loaded
 */
private void loadCells(String root,CellList dir,LinkedList<CellList> children){
  Cell childs[]=dir.getChildren();
  if (childs == null) {
    logger.fine("String_Node_Str" + dir.getRelativePath());
    return;
  }
  for (  Cell child : childs) {
    logger.info("String_Node_Str" + child.name);
    String relativePath=dir.getRelativePath();
    if (relativePath == null) {
      logger.warning("String_Node_Str" + child.name);
      continue;
    }
    ManagedReference<CellMO> parentRef=this.getParentCellReference(relativePath);
    CellServerState setup=CellImporterUtils.getWFSCell(root,relativePath,child.name);
    if (setup == null) {
      logger.info("String_Node_Str" + relativePath + "String_Node_Str"+ child.name);
      continue;
    }
    logger.info(setup.toString());
    String cellPath=relativePath + "String_Node_Str" + child.name;
    if (relativePath.compareTo("String_Node_Str") == 0) {
      cellPath=child.name;
    }
    String className=setup.getServerClassName();
    CellMO cellMO=CellMOFactory.loadCellMO(className);
    if (cellMO == null) {
      logger.warning("String_Node_Str" + className);
      continue;
    }
    try {
      cellMO.setServerState(setup);
    }
 catch (    ClassCastException cce) {
      logger.log(Level.WARNING,"String_Node_Str" + cellMO.getName() + "String_Node_Str"+ cellMO.getClass(),cce);
      continue;
    }
    try {
      if (parentRef == null) {
        WonderlandContext.getCellManager().insertCellInWorld(cellMO);
      }
 else {
        logger.info("String_Node_Str" + cellMO.getCellID().toString() + "String_Node_Str"+ parentRef.get().getCellID().toString()+ "String_Node_Str");
        parentRef.get().addChild(cellMO);
        logger.info("String_Node_Str" + cellMO.getParent().getCellID().toString());
        Collection<ManagedReference<CellMO>> refs=cellMO.getParent().getAllChildrenRefs();
        Iterator<ManagedReference<CellMO>> it=refs.iterator();
        while (it.hasNext() == true) {
          logger.info("String_Node_Str" + it.next().get().getCellID().toString());
        }
        logger.info("String_Node_Str" + cellMO.isLive());
      }
    }
 catch (    MultipleParentException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + "String_Node_Str" + cellMO.getName());
      continue;
    }
    ManagedReference<CellMO> cellRef=AppContext.getDataManager().createReference(cellMO);
    this.cellMOMap.put(cellPath,cellRef);
    logger.info("String_Node_Str" + cellPath + "String_Node_Str"+ cellMO.getCellID().toString()+ "String_Node_Str"+ child.lastModified);
    logger.info(setup.toString());
    CellList newChildren=CellImporterUtils.getWFSChildren(root,cellPath);
    if (newChildren != null) {
      logger.fine("String_Node_Str" + cellPath + "String_Node_Str"+ "String_Node_Str"+ newChildren.getChildren());
      children.addLast(newChildren);
    }
  }
}