Program: 58710
Project: 58710
Buggy source:
/** 
 * Create ViewPanel from AbstractWidget, with given parent level.
 * @param iterator AbstractWidget iterator
 * @param parentLevel String of parent level
 * @param levelCounter Level counter for current panel.
 * @param isPanelTab Boolean to check if its PanelTab.
 */
private void setPanel(Iterator<AbstractWidget> iterator,String parentLevel,Integer levelCounter,Boolean isPanelTab){
  if (!iterator.hasNext()) {
    return;
  }
  AbstractWidget widget=iterator.next();
  String currentLevel=levelCounter.toString();
  if (parentLevel != null) {
    currentLevel=parentLevel + "String_Node_Str" + currentLevel;
  }
  if (widget instanceof Panel) {
    Panel panel=(Panel)widget;
    ViewPanel viewPanel=new ViewPanel();
    viewPanel.setName(panel.getName());
    viewPanel.setIsPanelTab(isPanelTab);
    String title=panel.getTitle();
    if (title != null) {
      viewPanel.setTitle(title);
      log.debug("String_Node_Str",title);
    }
    viewPanel.setPanelLevel(currentLevel);
    log.debug("String_Node_Str",panel);
    if (panel.getSidebar() != null && panel.getSidebar()) {
      viewBuilder.addViewSidePanelListItem(viewPanel);
    }
 else {
      viewBuilder.addViewPanelListItem(viewPanel);
    }
    levelCounter+=1;
  }
 else   if (widget instanceof PanelTabs) {
    PanelTabs panelTabs=(PanelTabs)widget;
    ViewPanel viewPanel=new ViewPanel();
    viewPanel.setIsNotebook(true);
    viewPanel.setPanelLevel(currentLevel);
    viewBuilder.addViewPanelListItem(viewPanel);
    setPanel(panelTabs.getItems().iterator(),currentLevel,0,true);
    isPanelTab=false;
    levelCounter+=1;
  }
 else   if (widget instanceof PanelInclude) {
    PanelInclude panelInclude=(PanelInclude)widget;
    FormView formView=(FormView)panelInclude.getView();
    if (formView != null) {
      List<AbstractWidget> formItems=formView.getItems();
      if (formItems != null) {
        setPanel(formItems.iterator(),parentLevel,levelCounter,false);
      }
    }
  }
  setPanel(iterator,parentLevel,levelCounter,isPanelTab);
}

Fixed version (ground truth):
/** 
 * Create ViewPanel from AbstractWidget, with given parent level.
 * @param iterator AbstractWidget iterator
 * @param parentLevel String of parent level
 * @param levelCounter Level counter for current panel.
 * @param isPanelTab Boolean to check if its PanelTab.
 */
private void setPanel(Iterator<AbstractWidget> iterator,String parentLevel,Integer levelCounter,Boolean isPanelTab){
  if (!iterator.hasNext()) {
    return;
  }
  AbstractWidget widget=iterator.next();
  String currentLevel=levelCounter.toString();
  if (parentLevel != null) {
    currentLevel=parentLevel + "String_Node_Str" + currentLevel;
  }
  if (widget instanceof Panel) {
    Panel panel=(Panel)widget;
    ViewPanel viewPanel=new ViewPanel();
    viewPanel.setName(panel.getName());
    viewPanel.setIsPanelTab(isPanelTab);
    String title=panel.getTitle();
    if (title != null) {
      viewPanel.setTitle(title);
      log.debug("String_Node_Str",title);
    }
    viewPanel.setPanelLevel(currentLevel);
    log.debug("String_Node_Str",panel);
    if (panel.getSidebar() != null && panel.getSidebar()) {
      viewBuilder.addViewSidePanelListItem(viewPanel);
    }
 else {
      viewBuilder.addViewPanelListItem(viewPanel);
    }
    levelCounter+=1;
  }
 else   if (widget instanceof PanelTabs) {
    PanelTabs panelTabs=(PanelTabs)widget;
    ViewPanel viewPanel=new ViewPanel();
    viewPanel.setIsNotebook(true);
    viewPanel.setPanelLevel(currentLevel);
    viewBuilder.addViewPanelListItem(viewPanel);
    setPanel(panelTabs.getItems().iterator(),currentLevel,0,true);
    isPanelTab=false;
    levelCounter+=1;
  }
 else   if (widget instanceof PanelInclude) {
    PanelInclude panelInclude=(PanelInclude)widget;
    FormView formView=(FormView)panelInclude.getView();
    if (formView != null) {
      List<AbstractWidget> formItems=formView.getItems();
      if (formItems != null) {
        setPanel(formItems.iterator(),parentLevel,levelCounter,false);
      }
    }
  }
 else   if (widget instanceof PanelRelated) {
    levelCounter+=1;
  }
  setPanel(iterator,parentLevel,levelCounter,isPanelTab);
}