Program: 15807
Project: 15807
Buggy source:
private static NodeInfo parseShadowElement(PageDefinition pgdef,NodeInfo parent,Element el,AnnotationHelper annHelper) throws Exception {
  String ifc=null, unless=null, name=el.getLocalName();
  AnnotationHelper attrAnnHelper=null;
  final LanguageDefinition lookup=LanguageDefinition.lookup("String_Node_Str");
  ComponentDefinition shadowDefinition=lookup.hasShadowDefinition(name) ? lookup.getShadowDefinition(name) : pgdef.getComponentDefinitionMap().get(name);
  final ShadowInfo compInfo=new ShadowInfo(parent,shadowDefinition,name,ConditionImpl.getInstance(ifc,unless));
  for (  final Attribute attr : el.getAttributeItems()) {
    final Namespace attrns=attr.getNamespace();
    final String attURI=attrns != null ? attrns.getURI() : "String_Node_Str";
    final String attnm=attr.getLocalName();
    final String attval=attr.getValue();
    if ("String_Node_Str".equals(attnm)) {
      ifc=attval;
    }
 else     if ("String_Node_Str".equals(attnm)) {
      unless=attval;
    }
 else     if (LanguageDefinition.ANNOTATION_NAMESPACE.equals(attURI) || "String_Node_Str".equals(attURI)) {
      if (attrAnnHelper == null)       attrAnnHelper=new AnnotationHelper();
      applyAttrAnnot(attrAnnHelper,compInfo,attnm,attval.trim(),false,location(attr));
    }
 else {
      final String attPref=attrns != null ? attrns.getPrefix() : null;
      String attvaltrim;
      if (!"String_Node_Str".equals(attPref) && !("String_Node_Str".equals(attnm) && "String_Node_Str".equals(attPref)) && !"String_Node_Str".equals(attURI)) {
        if ((attURI.length() == 0 || LanguageDefinition.ZK_NAMESPACE.endsWith(attURI)) && AnnotationHelper.isAnnotation(attvaltrim=attval.trim())) {
          if (attrAnnHelper == null)           attrAnnHelper=new AnnotationHelper();
          applyAttrAnnot(attrAnnHelper,compInfo,attnm,attvaltrim,true,location(attr));
          Set<String> binderAnnotations=WebApps.getCurrent().getConfiguration().getBinderAnnotations();
          for (          String annot : binderAnnotations) {
            if (attvaltrim.contains(annot)) {
              compInfo.enableBindingAnnotation();
              break;
            }
          }
        }
 else {
          compInfo.addProperty(attnm,attval,null);
          if (attrAnnHelper != null)           attrAnnHelper.applyAnnotations(compInfo,attnm,true);
        }
      }
    }
  }
  compInfo.setCondition(ConditionImpl.getInstance(ifc,unless));
  annHelper.applyAnnotations(compInfo,null,true);
  Node root=el.getFirstChild();
  while (root != null && !(root instanceof Element)) {
    if (root instanceof Text) {
      if (!isEmpty(((Text)root).getText().trim()))       break;
    }
    root=root.getNextSibling();
  }
  if (root != null) {
    String rn=root.getLocalName();
    if (!"String_Node_Str".equals(rn)) {
      Node item=root;
      while (item != null) {
        if ("String_Node_Str".equals(item.getLocalName()))         throw new UiException(message(rn + "String_Node_Str",(Item)root));
        item=item.getNextSibling();
      }
      return new TemplateInfo(compInfo,"String_Node_Str",null,null,null);
    }
  }
  return compInfo;
}

Fixed version (ground truth):
private static NodeInfo parseShadowElement(PageDefinition pgdef,NodeInfo parent,Element el,AnnotationHelper annHelper) throws Exception {
  String ifc=null, unless=null, name=el.getLocalName();
  AnnotationHelper attrAnnHelper=null;
  final LanguageDefinition lookup=LanguageDefinition.lookup("String_Node_Str");
  ComponentDefinition shadowDefinition=lookup.hasShadowDefinition(name) ? lookup.getShadowDefinition(name) : pgdef.getComponentDefinitionMap().get(name);
  final ShadowInfo compInfo=new ShadowInfo(parent,shadowDefinition,name,ConditionImpl.getInstance(ifc,unless));
  boolean _annotationed=false;
  boolean _shouldIgnoreAnnotNamespace=annHelper.shouldIgnoreAnnotNamespace();
  for (  final Attribute attr : el.getAttributeItems()) {
    final Namespace attrns=attr.getNamespace();
    final String attURI=attrns != null ? attrns.getURI() : "String_Node_Str";
    final String attnm=attr.getLocalName();
    final String attval=attr.getValue();
    if ("String_Node_Str".equals(attnm)) {
      ifc=attval;
    }
 else     if ("String_Node_Str".equals(attnm)) {
      unless=attval;
    }
 else     if (!_shouldIgnoreAnnotNamespace && (LanguageDefinition.ANNOTATION_NAMESPACE.equals(attURI) || "String_Node_Str".equals(attURI))) {
      _annotationed=true;
      if (attrAnnHelper == null)       attrAnnHelper=new AnnotationHelper();
      applyAttrAnnot(attrAnnHelper,compInfo,attnm,attval.trim(),false,location(attr));
    }
 else {
      final String attPref=attrns != null ? attrns.getPrefix() : null;
      String attvaltrim;
      if (!"String_Node_Str".equals(attPref) && !("String_Node_Str".equals(attnm) && "String_Node_Str".equals(attPref)) && !"String_Node_Str".equals(attURI)) {
        if ((attURI.length() == 0 || LanguageDefinition.ZK_NAMESPACE.endsWith(attURI)) && AnnotationHelper.isAnnotation(attvaltrim=attval.trim())) {
          if (attrAnnHelper == null)           attrAnnHelper=new AnnotationHelper();
          applyAttrAnnot(attrAnnHelper,compInfo,attnm,attvaltrim,true,location(attr));
          Set<String> binderAnnotations=WebApps.getCurrent().getConfiguration().getBinderAnnotations();
          for (          String annot : binderAnnotations) {
            if (attvaltrim.contains(annot)) {
              compInfo.enableBindingAnnotation();
              _annotationed=true;
              break;
            }
          }
        }
 else {
          compInfo.addProperty(attnm,attval,null);
          if (attrAnnHelper != null)           attrAnnHelper.applyAnnotations(compInfo,attnm,true);
        }
      }
    }
  }
  compInfo.setCondition(ConditionImpl.getInstance(ifc,unless));
  annHelper.applyAnnotations(compInfo,null,true);
  Node root=el.getFirstChild();
  while (root != null && !(root instanceof Element)) {
    if (root instanceof Text) {
      if (!isEmpty(((Text)root).getText().trim()))       break;
    }
    root=root.getNextSibling();
  }
  if (root != null) {
    String rn=root.getLocalName();
    if (!"String_Node_Str".equals(rn)) {
      Node item=root;
      while (item != null) {
        if ("String_Node_Str".equals(item.getLocalName()))         throw new UiException(message(rn + "String_Node_Str",(Item)root));
        item=item.getNextSibling();
      }
      TemplateInfo templateInfo=new TemplateInfo(compInfo,"String_Node_Str",null,null,null);
      if (!_shouldIgnoreAnnotNamespace && _annotationed) {
        annHelper.setIgnoreAnnotNamespace(true);
        templateInfo.setAnnotationNamespacedRoot(true);
      }
      return templateInfo;
    }
  }
  if (!_shouldIgnoreAnnotNamespace && _annotationed) {
    annHelper.setIgnoreAnnotNamespace(true);
    compInfo.setAnnotationNamespacedRoot(true);
  }
  return compInfo;
}