Program: 143552
Project: 143552
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean closeSolution(boolean force,Object[] args){
  if (getSolution() == null || closing)   return true;
  try {
    RequestCycle rc=RequestCycle.get();
    closing=true;
    MainPage mp=MainPage.getRequestMainPage();
    if (mp == null) {
      mp=getMainPage();
    }
    List<String> triggerReqScripts=getTriggerReqOnOtherPagesJS(rc,mp);
    MainPage.ShowUrlInfo showUrlInfo=mp.getShowUrlInfo();
    boolean shownInDialog=mp.isShowingInDialog() || mp.isClosingAsDivPopup();
    boolean retval=super.closeSolution(force,args);
    if (retval) {
      if (rc != null && rc.getRequestTarget() instanceof AjaxRequestTarget) {
        ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript("String_Node_Str");
        if (triggerReqScripts != null) {
          for (          String js : triggerReqScripts) {
            ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(js);
          }
        }
      }
      getRuntimeWindowManager().closeFormInWindow(null,true);
      Collection<Style> userStyles=getFlattenedSolution().flushUserStyles();
      if (userStyles != null) {
        for (        Style style : userStyles) {
          ComponentFactory.flushStyle(this,style);
        }
      }
      getRuntimeProperties().put(IServiceProvider.RT_VALUELIST_CACHE,null);
      getRuntimeProperties().put(IServiceProvider.RT_OVERRIDESTYLE_CACHE,null);
      if (rc != null) {
        boolean showDefault=true;
        boolean urlShown=false;
        if (showUrlInfo != null) {
          showDefault=!"String_Node_Str".equals(showUrlInfo.getTarget()) && !"String_Node_Str".equals(showUrlInfo.getTarget());
          String url="String_Node_Str";
          if (showUrlInfo.getUrl() != null) {
            url=showUrlInfo.getUrl();
          }
          if (rc.getRequestTarget() instanceof AjaxRequestTarget) {
            showUrlInfo.setOnRootFrame(true);
            showUrlInfo.setUseIFrame(false);
            String show=MainPage.getShowUrlScript(showUrlInfo);
            if (show != null) {
              urlShown=true;
              ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(show);
              mp.getShowUrlScript();
            }
          }
 else {
            rc.setRequestTarget(new RedirectRequestTarget(url));
          }
        }
        if (showDefault) {
          if (Session.exists() && RequestCycle.get() != null) {
            if (getPreferedSolutionNameToLoadOnInit() == null) {
              if ((urlShown || shownInDialog) && rc.getRequestTarget() instanceof AjaxRequestTarget) {
                MainPage page=mp;
                while ((page.isShowingInDialog() || page.isClosingAsDivPopup()) && page.getCallingContainer() != null) {
                  page=page.getCallingContainer();
                }
                CharSequence urlFor=page.urlFor(SelectSolution.class,null);
                ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(MainPage.getShowUrlScript(new ShowUrlInfo(urlFor.toString(),"String_Node_Str",null,0,true,false)));
              }
 else {
                mp.setResponsePage(SelectSolution.class);
              }
            }
 else {
              if (!Utils.getAsBoolean(Settings.getInstance().getProperty("String_Node_Str","String_Node_Str"))) {
                WebClientSession.get().keepCredentials(getPreferedSolutionNameToLoadOnInit());
              }
              Map<String,Object> map=new HashMap<String,Object>();
              map.put("String_Node_Str",getPreferedSolutionNameToLoadOnInit());
              map.put("String_Node_Str",getPreferedSolutionMethodNameToCall());
              if (getPreferedSolutionMethodArguments() != null && getPreferedSolutionMethodArguments().length > 0) {
                map.put("String_Node_Str",getPreferedSolutionMethodArguments()[0]);
              }
              if ((urlShown || shownInDialog) && rc.getRequestTarget() instanceof AjaxRequestTarget) {
                CharSequence urlFor=mp.urlFor(SolutionLoader.class,new PageParameters(map));
                ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(MainPage.getShowUrlScript(new ShowUrlInfo(urlFor.toString(),"String_Node_Str",null,0,true,false)));
              }
 else {
                rc.setResponsePage(SolutionLoader.class,new PageParameters(map),null);
              }
            }
          }
        }
      }
    }
    return retval;
  }
  finally {
    closing=false;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean closeSolution(boolean force,Object[] args){
  if (getSolution() == null || closing)   return true;
  try {
    RequestCycle rc=RequestCycle.get();
    closing=true;
    MainPage mp=MainPage.getRequestMainPage();
    if (mp == null) {
      mp=getMainPage();
    }
    List<String> triggerReqScripts=getTriggerReqOnOtherPagesJS(rc,mp);
    MainPage.ShowUrlInfo showUrlInfo=mp.getShowUrlInfo();
    boolean shownInDialog=mp.isShowingInDialog() || mp.isClosingAsDivPopup();
    boolean retval=super.closeSolution(force,args);
    if (retval) {
      if (rc != null)       putClientProperty(WEBCONSTANTS.WEBCLIENT_TEMPLATES_DIR,null);
 else {
        invokeLater(new Runnable(){
          @Override public void run(){
            putClientProperty(WEBCONSTANTS.WEBCLIENT_TEMPLATES_DIR,null);
          }
        }
);
      }
      if (rc != null && rc.getRequestTarget() instanceof AjaxRequestTarget) {
        ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript("String_Node_Str");
        if (triggerReqScripts != null) {
          for (          String js : triggerReqScripts) {
            ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(js);
          }
        }
      }
      getRuntimeWindowManager().closeFormInWindow(null,true);
      Collection<Style> userStyles=getFlattenedSolution().flushUserStyles();
      if (userStyles != null) {
        for (        Style style : userStyles) {
          ComponentFactory.flushStyle(this,style);
        }
      }
      getRuntimeProperties().put(IServiceProvider.RT_VALUELIST_CACHE,null);
      getRuntimeProperties().put(IServiceProvider.RT_OVERRIDESTYLE_CACHE,null);
      if (rc != null) {
        boolean showDefault=true;
        boolean urlShown=false;
        if (showUrlInfo != null) {
          showDefault=!"String_Node_Str".equals(showUrlInfo.getTarget()) && !"String_Node_Str".equals(showUrlInfo.getTarget());
          String url="String_Node_Str";
          if (showUrlInfo.getUrl() != null) {
            url=showUrlInfo.getUrl();
          }
          if (rc.getRequestTarget() instanceof AjaxRequestTarget) {
            showUrlInfo.setOnRootFrame(true);
            showUrlInfo.setUseIFrame(false);
            String show=MainPage.getShowUrlScript(showUrlInfo);
            if (show != null) {
              urlShown=true;
              ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(show);
              mp.getShowUrlScript();
            }
          }
 else {
            rc.setRequestTarget(new RedirectRequestTarget(url));
          }
        }
        if (showDefault) {
          if (Session.exists() && RequestCycle.get() != null) {
            if (getPreferedSolutionNameToLoadOnInit() == null) {
              if ((urlShown || shownInDialog) && rc.getRequestTarget() instanceof AjaxRequestTarget) {
                MainPage page=mp;
                while ((page.isShowingInDialog() || page.isClosingAsDivPopup()) && page.getCallingContainer() != null) {
                  page=page.getCallingContainer();
                }
                CharSequence urlFor=page.urlFor(SelectSolution.class,null);
                ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(MainPage.getShowUrlScript(new ShowUrlInfo(urlFor.toString(),"String_Node_Str",null,0,true,false)));
              }
 else {
                mp.setResponsePage(SelectSolution.class);
              }
            }
 else {
              if (!Utils.getAsBoolean(Settings.getInstance().getProperty("String_Node_Str","String_Node_Str"))) {
                WebClientSession.get().keepCredentials(getPreferedSolutionNameToLoadOnInit());
              }
              Map<String,Object> map=new HashMap<String,Object>();
              map.put("String_Node_Str",getPreferedSolutionNameToLoadOnInit());
              map.put("String_Node_Str",getPreferedSolutionMethodNameToCall());
              if (getPreferedSolutionMethodArguments() != null && getPreferedSolutionMethodArguments().length > 0) {
                map.put("String_Node_Str",getPreferedSolutionMethodArguments()[0]);
              }
              if ((urlShown || shownInDialog) && rc.getRequestTarget() instanceof AjaxRequestTarget) {
                CharSequence urlFor=mp.urlFor(SolutionLoader.class,new PageParameters(map));
                ((AjaxRequestTarget)rc.getRequestTarget()).appendJavascript(MainPage.getShowUrlScript(new ShowUrlInfo(urlFor.toString(),"String_Node_Str",null,0,true,false)));
              }
 else {
                rc.setResponsePage(SolutionLoader.class,new PageParameters(map),null);
              }
            }
          }
        }
      }
    }
    return retval;
  }
  finally {
    closing=false;
  }
}