Program: 143693
Project: 143693
Buggy source:
public WebTabPanel(IApplication application,final RuntimeTabPanel scriptable,String name,int orient,boolean oneTab){
  super(name);
  this.application=application;
  this.orient=orient;
  final boolean useAJAX=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str"));
  setOutputMarkupPlaceholderTag(true);
  if (orient != TabPanel.SPLIT_HORIZONTAL && orient != TabPanel.SPLIT_VERTICAL)   add(new Label("String_Node_Str",new Model<String>("String_Node_Str")));
  IModel<Integer> tabsModel=new AbstractReadOnlyModel<Integer>(){
    private static final long serialVersionUID=1L;
    @Override public Integer getObject(){
      return Integer.valueOf(allTabs.size());
    }
  }
;
  if (orient != TabPanel.HIDE && orient != TabPanel.SPLIT_HORIZONTAL && orient != TabPanel.SPLIT_VERTICAL && !(orient == TabPanel.DEFAULT && oneTab)) {
    add(new Loop("String_Node_Str",tabsModel){
      private static final long serialVersionUID=1L;
      @Override protected void populateItem(      LoopItem item){
        final WebTabHolder holder=allTabs.get(item.getIteration());
        MarkupContainer link=null;
        link=new ServoySubmitLink("String_Node_Str",useAJAX){
          private static final long serialVersionUID=1L;
          /** 
 * @see wicket.ajax.markup.html.AjaxFallbackLink#onClick(wicket.ajax.AjaxRequestTarget)
 */
          @Override public void onClick(          AjaxRequestTarget target){
            Page page=findPage();
            if (page != null) {
              setActiveTabPanel(holder.getPanel());
              if (target != null) {
                if (currentForm != null)                 addFormForFullAnchorRendering(currentForm.getWebForm(),(MainPage)page);
                relinkAtTabPanel(WebTabPanel.this);
                WebEventExecutor.generateResponse(target,page);
              }
            }
          }
          private void addFormForFullAnchorRendering(          WebForm form,          final MainPage mainPage){
            mainPage.addFormForFullAnchorRendering(form);
            form.visitChildren(WebTabPanel.class,new IVisitor<WebTabPanel>(){
              public Object component(              WebTabPanel tabPanel){
                if (tabPanel.currentForm != null)                 addFormForFullAnchorRendering(tabPanel.currentForm.getWebForm(),mainPage);
                return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
              }
            }
);
          }
          private void relinkAtForm(          WebForm form){
            form.visitChildren(WebTabPanel.class,new IVisitor<WebTabPanel>(){
              public Object component(              WebTabPanel wtp){
                relinkAtTabPanel(wtp);
                return IVisitor.CONTINUE_TRAVERSAL;
              }
            }
);
          }
          private void relinkAtTabPanel(          WebTabPanel wtp){
            wtp.relinkFormIfNeeded();
            wtp.visitChildren(WebForm.class,new IVisitor<WebForm>(){
              public Object component(              WebForm form){
                relinkAtForm(form);
                return IVisitor.CONTINUE_TRAVERSAL;
              }
            }
);
          }
          @Override protected void disableLink(          final ComponentTag tag){
            if (tag.getName().equalsIgnoreCase("String_Node_Str") || tag.getName().equalsIgnoreCase("String_Node_Str") || tag.getName().equalsIgnoreCase("String_Node_Str")) {
              tag.remove("String_Node_Str");
              tag.remove("String_Node_Str");
            }
          }
        }
;
        TabIndexHelper.setUpTabIndexAttributeModifier(link,tabSequenceIndex);
        if (item.getIteration() == 0)         link.add(new AttributeModifier("String_Node_Str",true,new Model<Boolean>(Boolean.TRUE)));
        link.setEnabled(holder.isEnabled() && WebTabPanel.this.isEnabled());
        ServoyTabIcon tabIcon=new ServoyTabIcon("String_Node_Str",holder,scriptable);
        link.add(tabIcon);
        Label label=new Label("String_Node_Str",new Model<String>(holder.getText()));
        label.setEscapeModelStrings(false);
        link.add(label);
        item.add(link);
        IModel<String> selectedOrDisabledClass=new AbstractReadOnlyModel<String>(){
          private static final long serialVersionUID=1L;
          @Override public String getObject(){
            if (!holder.isEnabled() || !WebTabPanel.this.isEnabled()) {
              if (currentForm == holder.getPanel()) {
                return "String_Node_Str";
              }
              return "String_Node_Str";
            }
 else {
              if (currentForm == holder.getPanel()) {
                return "String_Node_Str";
              }
              return "String_Node_Str";
            }
          }
        }
;
        item.add(new AttributeModifier("String_Node_Str",true,selectedOrDisabledClass));
        label.add(new StyleAppendingModifier(new Model<String>(){
          private static final long serialVersionUID=1L;
          @Override public String getObject(){
            String style="String_Node_Str";
            if (foreground != null) {
              style+="String_Node_Str" + PersistHelper.createColorString(foreground);
            }
            if (holder.getIcon() != null) {
              style+="String_Node_Str";
            }
            return style;
          }
        }
));
      }
    }
);
    add(new StyleAppendingModifier(new Model<String>(){
      private static final long serialVersionUID=1L;
      @Override public String getObject(){
        return "String_Node_Str";
      }
    }
));
    add(new AbstractServoyDefaultAjaxBehavior(){
      @Override protected void respond(      AjaxRequestTarget target){
      }
      @Override public void renderHead(      IHeaderResponse response){
        super.renderHead(response);
        boolean dontRearrangeHere=false;
        if (!(getRequestCycle().getRequestTarget() instanceof AjaxRequestTarget) && Utils.getAsBoolean(((MainPage)getPage()).getController().getApplication().getRuntimeProperties().get("String_Node_Str"))) {
          Component parentForm=getParent();
          while ((parentForm != null) && !(parentForm instanceof WebForm))           parentForm=parentForm.getParent();
          if (parentForm != null) {
            int anch=((WebForm)parentForm).getAnchors(WebTabPanel.this.getMarkupId());
            if (anch != 0 && anch != IAnchorConstants.DEFAULT)             dontRearrangeHere=true;
          }
        }
        if (!dontRearrangeHere) {
          String jsCall="String_Node_Str" + WebTabPanel.this.getMarkupId() + "String_Node_Str";
          ClientProperties clp=((WebClientInfo)Session.get().getClientInfo()).getProperties();
          if (clp.isBrowserKonqueror() || clp.isBrowserSafari())           response.renderOnLoadJavascript(jsCall);
 else           response.renderOnDomReadyJavascript(jsCall);
        }
      }
    }
);
  }
  add(StyleAttributeModifierModel.INSTANCE);
  add(TooltipAttributeModifier.INSTANCE);
  this.scriptable=scriptable;
  ((ChangesRecorder)scriptable.getChangesRecorder()).setDefaultBorderAndPadding(null,TemplateGenerator.DEFAULT_LABEL_PADDING);
}

Fixed version (ground truth):
public WebTabPanel(IApplication application,final RuntimeTabPanel scriptable,String name,int orient,boolean oneTab){
  super(name);
  this.application=application;
  this.orient=orient;
  final boolean useAJAX=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str"));
  setOutputMarkupPlaceholderTag(true);
  if (orient != TabPanel.SPLIT_HORIZONTAL && orient != TabPanel.SPLIT_VERTICAL)   add(new Label("String_Node_Str",new Model<String>("String_Node_Str")));
  IModel<Integer> tabsModel=new AbstractReadOnlyModel<Integer>(){
    private static final long serialVersionUID=1L;
    @Override public Integer getObject(){
      return Integer.valueOf(allTabs.size());
    }
  }
;
  if (orient != TabPanel.HIDE && orient != TabPanel.SPLIT_HORIZONTAL && orient != TabPanel.SPLIT_VERTICAL && !(orient == TabPanel.DEFAULT && oneTab)) {
    add(new Loop("String_Node_Str",tabsModel){
      private static final long serialVersionUID=1L;
      @Override protected void populateItem(      LoopItem item){
        final WebTabHolder holder=allTabs.get(item.getIteration());
        MarkupContainer link=null;
        link=new ServoySubmitLink("String_Node_Str",useAJAX){
          private static final long serialVersionUID=1L;
          /** 
 * @see wicket.ajax.markup.html.AjaxFallbackLink#onClick(wicket.ajax.AjaxRequestTarget)
 */
          @Override public void onClick(          AjaxRequestTarget target){
            Page page=findPage();
            if (page != null) {
              setActiveTabPanel(holder.getPanel());
              if (target != null) {
                if (currentForm != null)                 addFormForFullAnchorRendering(currentForm.getWebForm(),(MainPage)page);
                relinkAtTabPanel(WebTabPanel.this);
                WebEventExecutor.generateResponse(target,page);
              }
            }
          }
          private void addFormForFullAnchorRendering(          WebForm form,          final MainPage mainPage){
            mainPage.addFormForFullAnchorRendering(form);
            form.visitChildren(WebTabPanel.class,new IVisitor<WebTabPanel>(){
              public Object component(              WebTabPanel tabPanel){
                if (tabPanel.currentForm != null)                 addFormForFullAnchorRendering(tabPanel.currentForm.getWebForm(),mainPage);
                return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
              }
            }
);
          }
          private void relinkAtForm(          WebForm form){
            form.visitChildren(WebTabPanel.class,new IVisitor<WebTabPanel>(){
              public Object component(              WebTabPanel wtp){
                relinkAtTabPanel(wtp);
                return IVisitor.CONTINUE_TRAVERSAL;
              }
            }
);
          }
          private void relinkAtTabPanel(          WebTabPanel wtp){
            wtp.relinkFormIfNeeded();
            wtp.visitChildren(WebForm.class,new IVisitor<WebForm>(){
              public Object component(              WebForm form){
                relinkAtForm(form);
                return IVisitor.CONTINUE_TRAVERSAL;
              }
            }
);
          }
          @Override protected void disableLink(          final ComponentTag tag){
            if (tag.getName().equalsIgnoreCase("String_Node_Str") || tag.getName().equalsIgnoreCase("String_Node_Str") || tag.getName().equalsIgnoreCase("String_Node_Str")) {
              tag.remove("String_Node_Str");
              tag.remove("String_Node_Str");
            }
          }
        }
;
        TabIndexHelper.setUpTabIndexAttributeModifier(link,tabSequenceIndex);
        if (item.getIteration() == 0)         link.add(new AttributeModifier("String_Node_Str",true,new Model<Boolean>(Boolean.TRUE)));
        link.setEnabled(holder.isEnabled() && WebTabPanel.this.isEnabled());
        ServoyTabIcon tabIcon=new ServoyTabIcon("String_Node_Str",holder,scriptable);
        link.add(tabIcon);
        Label label=new Label("String_Node_Str",new Model<String>(holder.getText()));
        label.setEscapeModelStrings(false);
        link.add(label);
        item.add(link);
        IModel<String> selectedOrDisabledClass=new AbstractReadOnlyModel<String>(){
          private static final long serialVersionUID=1L;
          @Override public String getObject(){
            if (!holder.isEnabled() || !WebTabPanel.this.isEnabled()) {
              if (currentForm == holder.getPanel()) {
                return "String_Node_Str";
              }
              return "String_Node_Str";
            }
 else {
              if (currentForm == holder.getPanel()) {
                return "String_Node_Str";
              }
              return "String_Node_Str";
            }
          }
        }
;
        item.add(new AttributeModifier("String_Node_Str",true,selectedOrDisabledClass));
        label.add(new StyleAppendingModifier(new Model<String>(){
          private static final long serialVersionUID=1L;
          @Override public String getObject(){
            String style="String_Node_Str";
            if (foreground != null) {
              style+="String_Node_Str" + PersistHelper.createColorString(foreground);
            }
            if (holder.getIcon() != null) {
              style+="String_Node_Str";
            }
            return style;
          }
        }
));
      }
    }
);
    add(new StyleAppendingModifier(new Model<String>(){
      private static final long serialVersionUID=1L;
      @Override public String getObject(){
        return "String_Node_Str";
      }
    }
));
    add(new AbstractServoyDefaultAjaxBehavior(){
      @Override protected void respond(      AjaxRequestTarget target){
      }
      @Override public void renderHead(      IHeaderResponse response){
        super.renderHead(response);
        boolean dontRearrangeHere=false;
        if (!(getRequestCycle().getRequestTarget() instanceof AjaxRequestTarget) && Utils.getAsBoolean(((MainPage)getPage()).getController().getApplication().getRuntimeProperties().get("String_Node_Str"))) {
          Component parentForm=getParent();
          while ((parentForm != null) && !(parentForm instanceof WebForm))           parentForm=parentForm.getParent();
          if (parentForm != null) {
            int anch=((WebForm)parentForm).getAnchors(WebTabPanel.this.getMarkupId());
            if (anch != 0 && anch != IAnchorConstants.DEFAULT)             dontRearrangeHere=true;
          }
        }
        if (!dontRearrangeHere) {
          String jsCall="String_Node_Str" + WebTabPanel.this.getMarkupId() + "String_Node_Str";
          ClientProperties clp=((WebClientInfo)Session.get().getClientInfo()).getProperties();
          if (clp.isBrowserKonqueror() || clp.isBrowserSafari())           response.renderOnLoadJavascript(jsCall);
 else           response.renderOnDomReadyJavascript(jsCall);
        }
      }
      @Override public boolean isEnabled(      Component component){
        return WebClientSession.get().useAjax();
      }
    }
);
  }
  add(StyleAttributeModifierModel.INSTANCE);
  add(TooltipAttributeModifier.INSTANCE);
  this.scriptable=scriptable;
  ((ChangesRecorder)scriptable.getChangesRecorder()).setDefaultBorderAndPadding(null,TemplateGenerator.DEFAULT_LABEL_PADDING);
}