Program: 109522
Project: 109522
Buggy source:
@Override public Object evaluate(@SuppressWarnings("String_Node_Str") List args) throws XPathFunctionException {
  int frameIdx=((Double)args.get(0)).intValue();
  NodeList arg1=(NodeList)args.get(1);
  String nodeText=XmlUtil.nodeListToString(arg1);
  LOG.fine("String_Node_Str" + frameIdx + "String_Node_Str"+ nodeText+ "String_Node_Str");
  for (int i=0; i < arg1.getLength(); i++) {
    Node node=arg1.item(i);
    if (xpathResultMatch != null) {
      if (!node.toString().matches(xpathResultMatch)) {
        continue;
      }
    }
    int lineNumber=(int)node.getUserData(LocationAwareContentHandler.LINE_NUMBER_KEY_NAME);
    int columnNumber=(int)node.getUserData(LocationAwareContentHandler.COLUMN_NUMBER_KEY_NAME);
    GraphService<XmlTypeReferenceModel> fileLocationService=new GraphService<XmlTypeReferenceModel>(graphContext,XmlTypeReferenceModel.class);
    XmlTypeReferenceModel fileLocation=fileLocationService.create();
    String sourceSnippit=XmlUtil.nodeToString(node);
    fileLocation.setSourceSnippit(sourceSnippit);
    fileLocation.setLineNumber(lineNumber);
    fileLocation.setColumnNumber(columnNumber);
    fileLocation.setLength(node.toString().length());
    fileLocation.setFile(xml);
    fileLocation.setXpath(xpathString);
    GraphService<NamespaceMetaModel> metaModelService=new GraphService<NamespaceMetaModel>(graphContext,NamespaceMetaModel.class);
    for (    Map.Entry<String,String> namespace : namespaces.entrySet()) {
      NamespaceMetaModel metaModel=metaModelService.create();
      metaModel.setSchemaLocation(namespace.getKey());
      metaModel.setSchemaLocation(namespace.getValue());
      metaModel.addXmlResource(xml);
      fileLocation.addNamespace(metaModel);
    }
    resultLocations.add(fileLocation);
    evaluationStrategy.modelSubmissionRejected();
    evaluationStrategy.modelMatched();
    for (    Map.Entry<String,String> entry : paramMatchCache.getVariables(frameIdx).entrySet()) {
      Parameter<?> param=store.get(entry.getKey());
      String value=entry.getValue();
      if (!evaluationStrategy.submitValue(param,value)) {
        evaluationStrategy.modelSubmissionRejected();
        return false;
      }
    }
    evaluationStrategy.modelSubmitted(fileLocation);
    evaluationStrategy.modelMatched();
  }
  return true;
}

Fixed version (ground truth):
@Override public Object evaluate(@SuppressWarnings("String_Node_Str") List args) throws XPathFunctionException {
  int frameIdx=((Double)args.get(0)).intValue();
  NodeList arg1=(NodeList)args.get(1);
  String nodeText=XmlUtil.nodeListToString(arg1);
  LOG.fine("String_Node_Str" + frameIdx + "String_Node_Str"+ nodeText+ "String_Node_Str");
  for (int i=0; i < arg1.getLength(); i++) {
    Node node=arg1.item(i);
    if (xpathResultMatch != null) {
      if (!node.toString().matches(xpathResultMatch)) {
        continue;
      }
    }
    int lineNumber=(int)node.getUserData(LocationAwareContentHandler.LINE_NUMBER_KEY_NAME);
    int columnNumber=(int)node.getUserData(LocationAwareContentHandler.COLUMN_NUMBER_KEY_NAME);
    GraphService<XmlTypeReferenceModel> fileLocationService=new GraphService<XmlTypeReferenceModel>(event.getGraphContext(),XmlTypeReferenceModel.class);
    XmlTypeReferenceModel fileLocation=fileLocationService.create();
    String sourceSnippit=XmlUtil.nodeToString(node);
    fileLocation.setSourceSnippit(sourceSnippit);
    fileLocation.setLineNumber(lineNumber);
    fileLocation.setColumnNumber(columnNumber);
    fileLocation.setLength(node.toString().length());
    fileLocation.setFile(xml);
    fileLocation.setXpath(xpathString);
    GraphService<NamespaceMetaModel> metaModelService=new GraphService<NamespaceMetaModel>(event.getGraphContext(),NamespaceMetaModel.class);
    for (    Map.Entry<String,String> namespace : namespaces.entrySet()) {
      NamespaceMetaModel metaModel=metaModelService.create();
      metaModel.setSchemaLocation(namespace.getKey());
      metaModel.setSchemaLocation(namespace.getValue());
      metaModel.addXmlResource(xml);
      fileLocation.addNamespace(metaModel);
    }
    resultLocations.add(fileLocation);
    evaluationStrategy.modelSubmissionRejected();
    evaluationStrategy.modelMatched();
    if (fileNamePattern != null) {
      if (!fileNamePattern.parse(xml.getFileName()).submit(event,context)) {
        evaluationStrategy.modelSubmissionRejected();
        continue;
      }
    }
    for (    Map.Entry<String,String> entry : paramMatchCache.getVariables(frameIdx).entrySet()) {
      Parameter<?> param=store.get(entry.getKey());
      String value=entry.getValue();
      if (!evaluationStrategy.submitValue(param,value)) {
        evaluationStrategy.modelSubmissionRejected();
        return false;
      }
    }
    evaluationStrategy.modelSubmitted(fileLocation);
    evaluationStrategy.modelMatched();
  }
  return true;
}