Program: 29969
Project: 29969
Buggy source:
/** 
 * <p> This method returns the "options" that should be supplied to the factory that creates the <code>TreeNode</code> for the given tree node model object.</p> <p> Some useful options for the standard <code>TreeNode</code> component include:<p> <ul><li>text</li> <li>url</li> <li>imageURL</li> <li>target</li> <li>action<li> <li>actionListener</li> <li>expanded</li></ul> <p> See Tree / TreeNode component documentation for more details.</p>
 */
public Map<String,Object> getFactoryOptions(Object nodeObject){
  if (nodeObject == null) {
    return null;
  }
  LayoutComponent desc=getLayoutComponent();
  Map<String,Object> props=new HashMap<String,Object>();
  if ((nodeObject instanceof Integer) && nodeObject == TOP_ID) {
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
  }
 else {
    if (nodeObject instanceof Map) {
      String key=(String)desc.getOption("String_Node_Str");
      if (key == null) {
        key="String_Node_Str";
      }
      setProperty(props,"String_Node_Str",((Map)nodeObject).get(key));
    }
 else {
      setProperty(props,"String_Node_Str",nodeObject);
    }
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    String tt=(String)desc.getOption("String_Node_Str");
    if (!GuiUtil.isEmpty(tt)) {
      setProperty(props,"String_Node_Str",tt);
    }
    setProperty(props,"String_Node_Str",GuiUtil.encode((String)props.get("String_Node_Str"),null,null));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
  }
  return props;
}

Fixed version (ground truth):
/** 
 * <p> This method returns the "options" that should be supplied to the factory that creates the <code>TreeNode</code> for the given tree node model object.</p> <p> Some useful options for the standard <code>TreeNode</code> component include:<p> <ul><li>text</li> <li>url</li> <li>imageURL</li> <li>target</li> <li>action<li> <li>actionListener</li> <li>expanded</li></ul> <p> See Tree / TreeNode component documentation for more details.</p>
 */
public Map<String,Object> getFactoryOptions(Object nodeObject){
  if (nodeObject == null) {
    return null;
  }
  LayoutComponent desc=getLayoutComponent();
  Map<String,Object> props=new HashMap<String,Object>();
  if ((nodeObject instanceof Integer) && nodeObject.equals(TOP_ID)) {
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
  }
 else {
    if (nodeObject instanceof Map) {
      String key=(String)desc.getOption("String_Node_Str");
      if (key == null) {
        key="String_Node_Str";
      }
      setProperty(props,"String_Node_Str",((Map)nodeObject).get(key));
    }
 else {
      setProperty(props,"String_Node_Str",nodeObject);
    }
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
    String tt=(String)desc.getOption("String_Node_Str");
    if (!GuiUtil.isEmpty(tt)) {
      setProperty(props,"String_Node_Str",tt);
    }
    setProperty(props,"String_Node_Str",GuiUtil.encode((String)props.get("String_Node_Str"),null,null));
    setProperty(props,"String_Node_Str",desc.getOption("String_Node_Str"));
  }
  return props;
}