Program: 59028
Project: 59028
Buggy source:
private void initializeContainedViews(final GL gl){
  for (  int iContainedViewID : iAlContainedViewIDs) {
    AGLEventListener tmpGLEventListener=generalManager.getViewGLCanvasManager().getGLEventListener(iContainedViewID);
    if (tmpGLEventListener == this || tmpGLEventListener instanceof GLPathway) {
      continue;
    }
    int iViewID=(tmpGLEventListener).getID();
    if (underInteractionLayer.containsElement(-1)) {
      underInteractionLayer.addElement(iViewID);
      underInteractionLayer.setElementVisibilityById(true,iViewID);
      tmpGLEventListener.initRemote(gl,iUniqueID,underInteractionLayer,pickingTriggerMouseAdapter,this);
      tmpGLEventListener.broadcastElements(ESelectionType.NORMAL);
      tmpGLEventListener.setDetailLevel(EDetailLevel.MEDIUM);
      generalManager.getGUIBridge().setActiveGLSubView(this,tmpGLEventListener);
    }
 else     if (stackLayer.containsElement(-1)) {
      stackLayer.addElement(iViewID);
      stackLayer.setElementVisibilityById(true,iViewID);
      tmpGLEventListener.initRemote(gl,iUniqueID,stackLayer,pickingTriggerMouseAdapter,this);
      tmpGLEventListener.broadcastElements(ESelectionType.NORMAL);
      tmpGLEventListener.setDetailLevel(EDetailLevel.LOW);
    }
 else     if (poolLayer.containsElement(-1)) {
      poolLayer.addElement(iViewID);
      poolLayer.setElementVisibilityById(true,iViewID);
      tmpGLEventListener.initRemote(gl,iUniqueID,poolLayer,pickingTriggerMouseAdapter,this);
      tmpGLEventListener.setDetailLevel(EDetailLevel.VERY_LOW);
    }
    pickingManager.getPickingID(iUniqueID,EPickingType.VIEW_SELECTION,iViewID);
    ArrayList<Integer> arMediatorIDs=new ArrayList<Integer>();
    arMediatorIDs.add(iViewID);
    generalManager.getEventPublisher().addSendersAndReceiversToMediator(generalManager.getEventPublisher().getItem(iMediatorID),arMediatorIDs,arMediatorIDs,MediatorType.SELECTION_MEDIATOR,MediatorUpdateType.MEDIATOR_DEFAULT);
  }
}

Fixed version (ground truth):
private void initializeContainedViews(final GL gl){
  if (iAlContainedViewIDs == null)   return;
  for (  int iContainedViewID : iAlContainedViewIDs) {
    AGLEventListener tmpGLEventListener=generalManager.getViewGLCanvasManager().getGLEventListener(iContainedViewID);
    if (tmpGLEventListener == this || tmpGLEventListener instanceof GLPathway) {
      continue;
    }
    int iViewID=(tmpGLEventListener).getID();
    if (underInteractionLayer.containsElement(-1)) {
      underInteractionLayer.addElement(iViewID);
      underInteractionLayer.setElementVisibilityById(true,iViewID);
      tmpGLEventListener.initRemote(gl,iUniqueID,underInteractionLayer,pickingTriggerMouseAdapter,this);
      tmpGLEventListener.broadcastElements(ESelectionType.NORMAL);
      tmpGLEventListener.setDetailLevel(EDetailLevel.MEDIUM);
      generalManager.getGUIBridge().setActiveGLSubView(this,tmpGLEventListener);
    }
 else     if (stackLayer.containsElement(-1)) {
      stackLayer.addElement(iViewID);
      stackLayer.setElementVisibilityById(true,iViewID);
      tmpGLEventListener.initRemote(gl,iUniqueID,stackLayer,pickingTriggerMouseAdapter,this);
      tmpGLEventListener.broadcastElements(ESelectionType.NORMAL);
      tmpGLEventListener.setDetailLevel(EDetailLevel.LOW);
    }
 else     if (poolLayer.containsElement(-1)) {
      poolLayer.addElement(iViewID);
      poolLayer.setElementVisibilityById(true,iViewID);
      tmpGLEventListener.initRemote(gl,iUniqueID,poolLayer,pickingTriggerMouseAdapter,this);
      tmpGLEventListener.setDetailLevel(EDetailLevel.VERY_LOW);
    }
    pickingManager.getPickingID(iUniqueID,EPickingType.VIEW_SELECTION,iViewID);
    ArrayList<Integer> arMediatorIDs=new ArrayList<Integer>();
    arMediatorIDs.add(iViewID);
    generalManager.getEventPublisher().addSendersAndReceiversToMediator(generalManager.getEventPublisher().getItem(iMediatorID),arMediatorIDs,arMediatorIDs,MediatorType.SELECTION_MEDIATOR,MediatorUpdateType.MEDIATOR_DEFAULT);
  }
}