Program: 16635
Project: 16635
Buggy source:
public Object resolveVariable(String name) throws ELException {
  if ("String_Node_Str".equals(name))   return _self;
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getAttributes(Component.PAGE_SCOPE);
    if (_self instanceof Page)     return ((Page)_self).getAttributes();
    final Page page=((ExecutionCtrl)_exec).getCurrentPage();
    return page != null ? page.getAttributes() : Collections.EMPTY_MAP;
  }
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getPage();
    if (_self instanceof Page)     return (Page)_self;
    return ((ExecutionCtrl)_exec).getCurrentPage();
  }
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getSpaceOwner();
    if (_self instanceof Page)     return (Page)_self;
    return null;
  }
  if ("String_Node_Str".equals(name))   return _exec.getDesktop().getAttributes();
  if ("String_Node_Str".equals(name))   return _exec.getDesktop();
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getAttributes(Component.SPACE_SCOPE);
    if (_self instanceof Page)     return ((Page)_self).getAttributes();
    return Collections.EMPTY_MAP;
  }
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getAttributes(Component.COMPONENT_SCOPE);
    return Collections.EMPTY_MAP;
  }
  if ("String_Node_Str".equals(name))   return _exec.getAttributes();
  if ("String_Node_Str".equals(name))   return _exec.getArg();
  if (!Names.isReserved(name)) {
    Page page=null;
    if (_self instanceof Component) {
      final Component comp=(Component)_self;
      final Object o=comp.getZScriptVariable(name);
      if (o != null)       return o;
    }
 else     if (_self instanceof Page) {
      page=(Page)_self;
    }
 else {
      page=((ExecutionCtrl)_exec).getCurrentPage();
    }
    if (page != null) {
      final Object o=page.getZScriptVariable(name);
      if (o != null)       return o;
    }
  }
  return _parent != null ? _parent.resolveVariable(name) : null;
}

Fixed version (ground truth):
public Object resolveVariable(String name) throws ELException {
  if ("String_Node_Str".equals(name))   return _self;
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getAttributes(Component.PAGE_SCOPE);
    if (_self instanceof Page)     return ((Page)_self).getAttributes();
    final Page page=((ExecutionCtrl)_exec).getCurrentPage();
    return page != null ? page.getAttributes() : Collections.EMPTY_MAP;
  }
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getPage();
    if (_self instanceof Page)     return (Page)_self;
    return ((ExecutionCtrl)_exec).getCurrentPage();
  }
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getSpaceOwner();
    if (_self instanceof Page)     return (Page)_self;
    return null;
  }
  if ("String_Node_Str".equals(name))   return _exec.getDesktop().getAttributes();
  if ("String_Node_Str".equals(name))   return _exec.getDesktop();
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getAttributes(Component.SPACE_SCOPE);
    if (_self instanceof Page)     return ((Page)_self).getAttributes();
    return Collections.EMPTY_MAP;
  }
  if ("String_Node_Str".equals(name)) {
    if (_self instanceof Component)     return ((Component)_self).getAttributes(Component.COMPONENT_SCOPE);
    return Collections.EMPTY_MAP;
  }
  if ("String_Node_Str".equals(name))   return _exec.getAttributes();
  if ("String_Node_Str".equals(name))   return _exec.getArg();
  if (!Names.isReserved(name)) {
    if (_self instanceof Component) {
      final Component comp=(Component)_self;
      final Page page=comp.getPage();
      if (page != null) {
        final Object o=page.getZScriptVariable(name);
        if (o != null)         return o;
      }
      final Object o=comp.getVariable(name,false);
      if (o != null)       return o;
    }
 else {
      Page page;
      if (_self instanceof Page) {
        page=(Page)_self;
      }
 else {
        page=((ExecutionCtrl)_exec).getCurrentPage();
      }
      if (page != null) {
        Object o=page.getZScriptVariable(name);
        if (o != null)         return o;
        o=page.getVariable(name);
        if (o != null)         return o;
      }
    }
  }
  return _parent != null ? _parent.resolveVariable(name) : null;
}