Program: 28277
Project: 28277
Buggy source:
/** 
 * <p> This handler is used for the navigation nodes that request content from an external URL.  This handler pulls the "real url" from from the component specified by the <code>compId</code> parameter (this necessarily depends on the presence of the navigation container in the view for the component look up to work).  Once the component has been found, the url is retrieved from the attribute map, and its contents retrieved.  If <code>processPage</code> is true, the URL contents are interpretted and the resulting component(s) are added to the component tree (This feature is not currently supported)..  Otherwise, the contents are returned in the output parameter <code>pluginPage</code> to be output as-is on the page.</p>
 * @param handlerCtx    The <code>HandlerContext</code>.
 */
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void retrievePluginPageContents(HandlerContext handlerCtx){
  String id=(String)handlerCtx.getInputValue("String_Node_Str");
  UIComponent comp=handlerCtx.getFacesContext().getViewRoot().findComponent(id);
  String urlContents="String_Node_Str";
  if (comp != null) {
    String url=(String)comp.getAttributes().get(NavigationNodeFactory.REAL_URL);
    try {
      URL contentUrl=FileUtil.searchForFile(url,null);
      if (contentUrl == null) {
        throw new IOException("String_Node_Str" + url);
      }
      urlContents=new String(FileUtil.readFromURL(contentUrl));
    }
 catch (    IOException ex) {
      Logger.getLogger(PluginHandlers.class.getName()).log(Level.SEVERE,"String_Node_Str" + url,ex);
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",urlContents);
}

Fixed version (ground truth):
/** 
 * <p> This handler is used for the navigation nodes that request content from an external URL.  This handler pulls the "real url" from from the component specified by the <code>compId</code> parameter (this necessarily depends on the presence of the navigation container in the view for the component look up to work).  Once the component has been found, the url is retrieved from the attribute map, and its contents retrieved.  If <code>processPage</code> is true, the URL contents are interpretted and the resulting component(s) are added to the component tree (This feature is not currently supported)..  Otherwise, the contents are returned in the output parameter <code>pluginPage</code> to be output as-is on the page.</p>
 * @param handlerCtx    The <code>HandlerContext</code>.
 */
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void retrievePluginPageContents(HandlerContext handlerCtx){
  String id=(String)handlerCtx.getInputValue("String_Node_Str");
  UIComponent comp=handlerCtx.getFacesContext().getViewRoot().findComponent(id);
  String urlContents="String_Node_Str";
  if (comp != null) {
    String url=(String)comp.getAttributes().get(NavigationNodeFactory.REAL_URL);
    try {
      URL contentUrl=FileUtil.searchForFile(url,null);
      if (contentUrl == null) {
        throw new IOException("String_Node_Str" + url);
      }
      urlContents=new String(FileUtil.readFromURL(contentUrl));
    }
 catch (    IOException ex) {
      GuiUtil.getLogger().log(Level.SEVERE,"String_Node_Str" + url,ex);
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",urlContents);
}