Program: 143516
Project: 143516
Buggy source:
/** 
 * @see wicket.protocol.http.WebApplication#init()
 */
@Override protected void init(){
  if (ApplicationServerSingleton.get() == null)   return;
  getResourceSettings().setResourceWatcher(new ServoyModificationWatcher(Duration.seconds(5)));
  getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl(true);
  getResourceSettings().setDefaultCacheDuration((int)Duration.days(365).seconds());
  getMarkupSettings().setCompressWhitespace(true);
  getMarkupSettings().setMarkupCache(new ServoyMarkupCache(this));
  getResourceSettings().setResourceStreamLocator(new ServoyResourceStreamLocator(this));
  getResourceSettings().setThrowExceptionOnMissingResource(false);
  getApplicationSettings().setPageExpiredErrorPage(ServoyExpiredPage.class);
  getApplicationSettings().setClassResolver(new ServoyClassResolver());
  getSessionSettings().setMaxPageMaps(15);
  getSecuritySettings().setCryptFactory(new CachingKeyInSessionSunJceCryptFactory());
  Settings settings=Settings.getInstance();
  getDebugSettings().setOutputComponentPath(Utils.getAsBoolean(settings.getProperty("String_Node_Str","String_Node_Str")));
  if (Utils.getAsBoolean(settings.getProperty("String_Node_Str","String_Node_Str"))) {
    mount(new HybridUrlCodingStrategy("String_Node_Str",SolutionLoader.class));
    mount(new HybridUrlCodingStrategy("String_Node_Str",MainPage.class));
    mount(new HybridUrlCodingStrategy("String_Node_Str",SolutionLoader.class){
      /** 
 * @see wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy#matches(wicket.IRequestTarget)
 */
      @Override public boolean matches(      IRequestTarget requestTarget){
        return false;
      }
    }
);
  }
 else {
    mountBookmarkablePage("String_Node_Str",SolutionLoader.class);
    mount(new BookmarkablePageRequestTargetUrlCodingStrategy("String_Node_Str",SolutionLoader.class,null){
      /** 
 * @see wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy#matches(wicket.IRequestTarget)
 */
      @Override public boolean matches(      IRequestTarget requestTarget){
        return false;
      }
    }
);
  }
  long maxSize=Utils.getAsLong(settings.getProperty("String_Node_Str","String_Node_Str"),false);
  if (maxSize > 0) {
    getApplicationSettings().setDefaultMaximumUploadSize(Bytes.kilobytes(maxSize));
  }
  getSharedResources().putClassAlias(IApplication.class,"String_Node_Str");
  getSharedResources().putClassAlias(PageContributor.class,"String_Node_Str");
  getSharedResources().putClassAlias(MaskBehavior.class,"String_Node_Str");
  getSharedResources().putClassAlias(Application.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.wicketstuff.calendar.markup.html.form.DatePicker.class,"String_Node_Str");
  getSharedResources().putClassAlias(YUILoader.class,"String_Node_Str");
  getSharedResources().putClassAlias(JQueryLoader.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.apache.wicket.markup.html.WicketEventReference.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.apache.wicket.ajax.WicketAjaxReference.class,"String_Node_Str");
  getSharedResources().putClassAlias(MainPage.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.class,"String_Node_Str");
  PackageResource.bind(this,IApplication.class,"String_Node_Str");
  PackageResource.bind(this,IApplication.class,"String_Node_Str");
  mountSharedResource("String_Node_Str","String_Node_Str");
  sharedMediaResource=new SharedMediaResource();
  getSharedResources().add("String_Node_Str",sharedMediaResource);
  getSharedResources().add("String_Node_Str",new ServeResources());
  getSharedResources().add("String_Node_Str",new FormCssResource(this));
  if (settings.getProperty("String_Node_Str",null) != null) {
    getApplicationSettings().setInternalErrorPage(ServoyErrorPage.class);
  }
  if (settings.getProperty("String_Node_Str",null) != null) {
    getApplicationSettings().setPageExpiredErrorPage(ServoyPageExpiredPage.class);
  }
  addPreComponentOnBeforeRenderListener(new IComponentOnBeforeRenderListener(){
    public void onBeforeRender(    Component component){
      if (component instanceof IServoyAwareBean) {
        IModel model=component.getInnermostModel();
        WebForm webForm=component.findParent(WebForm.class);
        if (model instanceof RecordItemModel && webForm != null) {
          IRecord record=(IRecord)((RecordItemModel)model).getObject();
          FormScope fs=webForm.getController().getFormScope();
          if (record != null && fs != null) {
            ((IServoyAwareBean)component).setSelectedRecord(new ServoyBeanState(record,fs));
          }
        }
      }
 else {
        if (!component.isEnabled())         return;
        Component targetComponent=null;
        boolean hasFocus=false, hasBlur=false;
        if (component instanceof IFieldComponent && ((IFieldComponent)component).getEventExecutor() != null) {
          targetComponent=component;
          if (component instanceof WebBaseSelectBox) {
            Component[] cs=((WebBaseSelectBox)component).getFocusChildren();
            if (cs != null && cs.length == 1)             targetComponent=cs[0];
          }
          if (((IFieldComponent)component).getEventExecutor().hasEnterCmds() || component.findParent(WebCellBasedView.class) != null || (((IFieldComponent)component).getScriptObject() instanceof ISupportOnRenderCallback && ((ISupportOnRenderCallback)((IFieldComponent)component).getScriptObject()).getRenderEventExecutor().hasRenderCallback())) {
            hasFocus=true;
          }
          hasBlur=true;
        }
 else         if (component instanceof WebBaseLabel) {
          targetComponent=component;
          hasFocus=true;
        }
        if (targetComponent != null) {
          MainPage mainPage=targetComponent.findParent(MainPage.class);
          if (mainPage.isUsingAjax()) {
            AbstractAjaxBehavior eventCallback=mainPage.getPageContributor().getEventCallback();
            if (eventCallback != null) {
              String callback=eventCallback.getCallbackUrl().toString();
              if (component instanceof WebDataRadioChoice || component instanceof WebDataCheckBoxChoice) {
                callback+="String_Node_Str";
              }
              for (              IBehavior behavior : targetComponent.getBehaviors()) {
                if (behavior instanceof EventCallbackModifier) {
                  targetComponent.remove(behavior);
                }
              }
              if (hasFocus) {
                StringBuilder js=new StringBuilder();
                js.append("String_Node_Str").append(callback).append("String_Node_Str");
                targetComponent.add(new EventCallbackModifier("String_Node_Str",true,new Model<String>(js.toString())));
                targetComponent.add(new EventCallbackModifier("String_Node_Str",true,new Model<String>("String_Node_Str")));
              }
              if (hasBlur) {
                StringBuilder js=new StringBuilder();
                js.append("String_Node_Str").append(callback).append("String_Node_Str");
                targetComponent.add(new EventCallbackModifier("String_Node_Str",true,new Model<String>(js.toString())));
              }
            }
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @see wicket.protocol.http.WebApplication#init()
 */
@Override protected void init(){
  if (ApplicationServerSingleton.get() == null)   return;
  getResourceSettings().setResourceWatcher(new ServoyModificationWatcher(Duration.seconds(5)));
  getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl(true);
  getResourceSettings().setDefaultCacheDuration((int)Duration.days(365).seconds());
  getMarkupSettings().setCompressWhitespace(true);
  getMarkupSettings().setMarkupCache(new ServoyMarkupCache(this));
  getResourceSettings().setResourceStreamLocator(new ServoyResourceStreamLocator(this));
  getResourceSettings().setThrowExceptionOnMissingResource(false);
  getApplicationSettings().setPageExpiredErrorPage(ServoyExpiredPage.class);
  getApplicationSettings().setClassResolver(new ServoyClassResolver());
  getSessionSettings().setMaxPageMaps(15);
  getSecuritySettings().setCryptFactory(new CachingKeyInSessionSunJceCryptFactory());
  Settings settings=Settings.getInstance();
  getDebugSettings().setOutputComponentPath(Utils.getAsBoolean(settings.getProperty("String_Node_Str","String_Node_Str")));
  if (Utils.getAsBoolean(settings.getProperty("String_Node_Str","String_Node_Str"))) {
    mount(new HybridUrlCodingStrategy("String_Node_Str",SolutionLoader.class));
    mount(new HybridUrlCodingStrategy("String_Node_Str",MainPage.class));
    mount(new HybridUrlCodingStrategy("String_Node_Str",SolutionLoader.class){
      /** 
 * @see wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy#matches(wicket.IRequestTarget)
 */
      @Override public boolean matches(      IRequestTarget requestTarget){
        return false;
      }
    }
);
  }
 else {
    mountBookmarkablePage("String_Node_Str",SolutionLoader.class);
    mount(new BookmarkablePageRequestTargetUrlCodingStrategy("String_Node_Str",SolutionLoader.class,null){
      /** 
 * @see wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy#matches(wicket.IRequestTarget)
 */
      @Override public boolean matches(      IRequestTarget requestTarget){
        return false;
      }
    }
);
  }
  long maxSize=Utils.getAsLong(settings.getProperty("String_Node_Str","String_Node_Str"),false);
  if (maxSize > 0) {
    getApplicationSettings().setDefaultMaximumUploadSize(Bytes.kilobytes(maxSize));
  }
  getSharedResources().putClassAlias(IApplication.class,"String_Node_Str");
  getSharedResources().putClassAlias(PageContributor.class,"String_Node_Str");
  getSharedResources().putClassAlias(MaskBehavior.class,"String_Node_Str");
  getSharedResources().putClassAlias(Application.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.wicketstuff.calendar.markup.html.form.DatePicker.class,"String_Node_Str");
  getSharedResources().putClassAlias(YUILoader.class,"String_Node_Str");
  getSharedResources().putClassAlias(JQueryLoader.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.apache.wicket.markup.html.WicketEventReference.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.apache.wicket.ajax.WicketAjaxReference.class,"String_Node_Str");
  getSharedResources().putClassAlias(MainPage.class,"String_Node_Str");
  getSharedResources().putClassAlias(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.class,"String_Node_Str");
  PackageResource.bind(this,IApplication.class,"String_Node_Str");
  PackageResource.bind(this,IApplication.class,"String_Node_Str");
  mountSharedResource("String_Node_Str","String_Node_Str");
  sharedMediaResource=new SharedMediaResource();
  getSharedResources().add("String_Node_Str",sharedMediaResource);
  getSharedResources().add("String_Node_Str",new ServeResources());
  getSharedResources().add("String_Node_Str",new FormCssResource(this));
  if (settings.getProperty("String_Node_Str",null) != null) {
    getApplicationSettings().setInternalErrorPage(ServoyErrorPage.class);
  }
  if (settings.getProperty("String_Node_Str",null) != null) {
    getApplicationSettings().setPageExpiredErrorPage(ServoyPageExpiredPage.class);
  }
  addPreComponentOnBeforeRenderListener(new IComponentOnBeforeRenderListener(){
    public void onBeforeRender(    Component component){
      if (component instanceof IServoyAwareBean) {
        IModel model=component.getInnermostModel();
        WebForm webForm=component.findParent(WebForm.class);
        if (model instanceof RecordItemModel && webForm != null) {
          IRecord record=(IRecord)((RecordItemModel)model).getObject();
          FormScope fs=webForm.getController().getFormScope();
          if (record != null && fs != null) {
            ((IServoyAwareBean)component).setSelectedRecord(new ServoyBeanState(record,fs));
          }
        }
      }
 else {
        if (!component.isEnabled())         return;
        Component targetComponent=null;
        boolean hasFocus=false, hasBlur=false;
        if (component instanceof IFieldComponent && ((IFieldComponent)component).getEventExecutor() != null) {
          targetComponent=component;
          if (component instanceof WebBaseSelectBox) {
            Component[] cs=((WebBaseSelectBox)component).getFocusChildren();
            if (cs != null && cs.length == 1)             targetComponent=cs[0];
          }
          if (((IFieldComponent)component).getEventExecutor().hasEnterCmds() || component.findParent(WebCellBasedView.class) != null || (((IFieldComponent)component).getScriptObject() instanceof ISupportOnRenderCallback && ((ISupportOnRenderCallback)((IFieldComponent)component).getScriptObject()).getRenderEventExecutor().hasRenderCallback())) {
            hasFocus=true;
          }
          hasBlur=true;
        }
 else         if (component instanceof WebBaseLabel) {
          targetComponent=component;
          hasFocus=true;
        }
        if (targetComponent != null) {
          MainPage mainPage=targetComponent.findParent(MainPage.class);
          if (mainPage.isUsingAjax()) {
            AbstractAjaxBehavior eventCallback=mainPage.getPageContributor().getEventCallback();
            if (eventCallback != null) {
              String callback=eventCallback.getCallbackUrl().toString();
              if (component instanceof WebDataRadioChoice || component instanceof WebDataCheckBoxChoice || component instanceof WebDataLookupField|| component instanceof WebDataComboBox|| component instanceof WebDataListBox) {
                callback+="String_Node_Str";
              }
              for (              IBehavior behavior : targetComponent.getBehaviors()) {
                if (behavior instanceof EventCallbackModifier) {
                  targetComponent.remove(behavior);
                }
              }
              if (hasFocus) {
                StringBuilder js=new StringBuilder();
                js.append("String_Node_Str").append(callback).append("String_Node_Str");
                targetComponent.add(new EventCallbackModifier("String_Node_Str",true,new Model<String>(js.toString())));
                targetComponent.add(new EventCallbackModifier("String_Node_Str",true,new Model<String>("String_Node_Str")));
              }
              if (hasBlur) {
                StringBuilder js=new StringBuilder();
                js.append("String_Node_Str").append(callback).append("String_Node_Str");
                targetComponent.add(new EventCallbackModifier("String_Node_Str",true,new Model<String>(js.toString())));
              }
            }
          }
        }
      }
    }
  }
);
}