Program: 75362
Project: 75362
Buggy source:
/** 
 * Create an entity controller associated with the specified graph controller.
 * @param controller The associated graph controller.
 * @param access The access level.
 */
public ActorController(GraphController controller,Access access){
  super(controller,access);
  _access=access;
  if (access == FULL) {
    _portDialogFactory=new PortDialogFactory();
    _menuFactory.addMenuItemFactory(_portDialogFactory);
  }
  if (_configuration != null) {
    _menuFactory.addMenuItemFactory(new MenuActionFactory(_lookInsideAction));
    if (access == FULL) {
      _editIconAction.setConfiguration(_configuration);
      _menuFactory.addMenuItemFactory(new MenuActionFactory(_editIconAction));
      _removeIconAction.setConfiguration(_configuration);
      _menuFactory.addMenuItemFactory(new MenuActionFactory(_removeIconAction));
    }
  }
  _menuFactory.addMenuItemFactory(new MenuActionFactory(new SaveInLibraryAction()));
  _listenToActorAction=new ListenToActorAction((BasicGraphController)getController());
  _menuFactory.addMenuItemFactory(new MenuActionFactory(_listenToActorAction));
  _listenToActorAction.setConfiguration(_configuration);
  if (access == FULL) {
    _breakpointDialogFactory=new BreakpointDialogFactory((BasicGraphController)getController());
    _menuFactory.addMenuItemFactory(_breakpointDialogFactory);
  }
  Filter portFilter=new Filter(){
    public boolean accept(    Object candidate){
      GraphModel model=getController().getGraphModel();
      if (candidate instanceof Locatable && model.getSemanticObject(candidate) instanceof Entity) {
        return true;
      }
 else {
        return false;
      }
    }
  }
;
  GlobalLayout layout=new EntityLayout();
  controller.addGraphViewListener(new IncrementalLayoutListener(new IncrLayoutAdapter(layout){
    public void nodeDrawn(    Object node){
      layout(node);
    }
  }
,portFilter));
}

Fixed version (ground truth):
/** 
 * Create an entity controller associated with the specified graph controller.
 * @param controller The associated graph controller.
 * @param access The access level.
 */
public ActorController(GraphController controller,Access access){
  super(controller,access);
  _access=access;
  if (access == FULL) {
    _portDialogFactory=new PortDialogFactory();
    _menuFactory.addMenuItemFactory(_portDialogFactory);
  }
  if (_configuration != null) {
    _menuFactory.addMenuItemFactory(new MenuActionFactory(_lookInsideAction));
    if (access == FULL) {
      _editIconAction.setConfiguration(_configuration);
      _menuFactory.addMenuItemFactory(new MenuActionFactory(_editIconAction));
      _removeIconAction.setConfiguration(_configuration);
      _menuFactory.addMenuItemFactory(new MenuActionFactory(_removeIconAction));
    }
  }
  _menuFactory.addMenuItemFactory(new MenuActionFactory(new SaveInLibraryAction()));
  _listenToActorAction=new ListenToActorAction((BasicGraphController)getController());
  _menuFactory.addMenuItemFactory(new MenuActionFactory(_listenToActorAction));
  _listenToActorAction.setConfiguration(_configuration);
  if (access == FULL) {
    _breakpointDialogFactory=new BreakpointDialogFactory((BasicGraphController)getController());
    _menuFactory.addMenuItemFactory(_breakpointDialogFactory);
  }
}