Program: 134495
Project: 134495
Buggy source:
/** 
 * @param node
 * @return
 */
private String getIndexedInfo(ASTNode node){
  QName name=null;
  ElementIndexType indexType=null;
  if (node instanceof TypeReference) {
    name=((TypeReference)node).getType();
    indexType=ElementIndexType.TYPE;
  }
 else   if (node instanceof UsesNode) {
    name=((UsesNode)node).getGrouping();
    indexType=ElementIndexType.GROUPING;
  }
 else   if (node instanceof ModuleImport) {
    ModuleImport mImport=(ModuleImport)node;
    name=new QName(mImport.getName(),mImport.getPrefix(),mImport.getName(),mImport.getRevision());
    indexType=ElementIndexType.MODULE;
  }
 else   if (node instanceof SubModuleInclude) {
    SubModuleInclude include=(SubModuleInclude)node;
    name=new QName(null,null,include.getName(),include.getRevision());
    indexType=ElementIndexType.SUBMODULE;
  }
 else   if (node instanceof BaseReference) {
    name=((BaseReference)node).getType();
    indexType=ElementIndexType.IDENTITY;
  }
  if (name != null) {
    ElementIndexInfo[] search=YangModelManager.search(name.getModule(),name.getRevision(),name.getName(),indexType,null,null);
    if (indexType == ElementIndexType.TYPE && search.length == 0) {
      search=YangModelManager.search(name.getModule(),name.getRevision(),name.getName(),ElementIndexType.IDENTITY,null,null);
    }
    if (search.length > 0) {
      ElementIndexInfo info=search[0];
      StringBuffer buffer=new StringBuffer();
      HTMLPrinter.addSmallHeader(buffer,info.getName());
      if (info.getDescription() != null) {
        HTMLPrinter.addParagraph(buffer,formatValue(info.getDescription()));
      }
      buffer.append("String_Node_Str");
      if (info.getType() != ElementIndexType.MODULE && info.getType() != ElementIndexType.SUBMODULE) {
        addValue(buffer,"String_Node_Str",info.getModule());
      }
      addValue(buffer,"String_Node_Str",info.getReference());
      addValue(buffer,"String_Node_Str",info.getStatus());
      addValue(buffer,"String_Node_Str",info.getRevision());
      addValue(buffer,"String_Node_Str",info.getNamespace());
      addValue(buffer,"String_Node_Str",info.getOrganization());
      addValue(buffer,"String_Node_Str",info.getContact());
      buffer.append("String_Node_Str");
      HTMLPrinter.insertPageProlog(buffer,0,getStyleSheet());
      HTMLPrinter.addPageEpilog(buffer);
      return buffer.toString();
    }
  }
  return null;
}

Fixed version (ground truth):
private String getIndexedInfo(ASTNode node){
  QName name=null;
  ElementIndexType indexType=null;
  if (node instanceof TypeReference) {
    name=((TypeReference)node).getType();
    indexType=ElementIndexType.TYPE;
  }
 else   if (node instanceof UsesNode) {
    name=((UsesNode)node).getGrouping();
    indexType=ElementIndexType.GROUPING;
  }
 else   if (node instanceof ModuleImport) {
    ModuleImport mImport=(ModuleImport)node;
    name=new QName(mImport.getName(),mImport.getPrefix(),mImport.getName(),mImport.getRevision());
    indexType=ElementIndexType.MODULE;
  }
 else   if (node instanceof SubModuleInclude) {
    SubModuleInclude include=(SubModuleInclude)node;
    name=new QName(null,null,include.getName(),include.getRevision());
    indexType=ElementIndexType.SUBMODULE;
  }
 else   if (node instanceof BaseReference) {
    name=((BaseReference)node).getType();
    indexType=ElementIndexType.IDENTITY;
  }
  if (name != null) {
    ElementIndexInfo[] search=YangModelManager.search(name.getModule(),name.getRevision(),name.getName(),indexType,null,null);
    if (indexType == ElementIndexType.TYPE && search.length == 0) {
      search=YangModelManager.search(name.getModule(),name.getRevision(),name.getName(),ElementIndexType.IDENTITY,null,null);
    }
    if (search.length > 0) {
      ElementIndexInfo info=search[0];
      StringBuffer buffer=new StringBuffer();
      HTMLPrinter.addSmallHeader(buffer,info.getName());
      if (info.getDescription() != null) {
        HTMLPrinter.addParagraph(buffer,formatValue(info.getDescription()));
      }
      buffer.append("String_Node_Str");
      if (info.getType() != ElementIndexType.MODULE && info.getType() != ElementIndexType.SUBMODULE) {
        addValue(buffer,"String_Node_Str",info.getModule());
      }
      addValue(buffer,"String_Node_Str",info.getReference());
      addValue(buffer,"String_Node_Str",info.getStatus());
      addValue(buffer,"String_Node_Str",info.getRevision());
      addValue(buffer,"String_Node_Str",info.getNamespace());
      addValue(buffer,"String_Node_Str",info.getOrganization());
      addValue(buffer,"String_Node_Str",info.getContact());
      buffer.append("String_Node_Str");
      HTMLPrinter.insertPageProlog(buffer,0,getStyleSheet());
      HTMLPrinter.addPageEpilog(buffer);
      return buffer.toString();
    }
  }
  return null;
}