Program: 118522
Project: 118522
Buggy source:
private boolean isMappedChild(String tempXpath){
  if (targetAbsolutePath == null) {
    targetAbsolutePath=new HashMap<String,String>();
    targetAbsolutePath.put(absoluteXPathQuery,null);
    Pattern regex=Pattern.compile(RELATIVE_PATH_PATTERN,Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
    for (int n=0; n < schemaTargets.size(); n++) {
      Object obj=schemaTargets.get(n);
      String relativeXPathQuery="String_Node_Str";
      if (obj instanceof SchemaTarget) {
        relativeXPathQuery=((SchemaTarget)obj).getRelativeXPathQuery();
      }
 else       if (obj instanceof ConceptTarget) {
        relativeXPathQuery=((ConceptTarget)obj).getRelativeLoopExpression();
      }
      StringBuffer tempAbsolute=new StringBuffer();
      tempAbsolute.append(absoluteXPathQuery);
      tempAbsolute.append(XmlMapUtil.XPATH_SEPARATOR);
      tempAbsolute.append(relativeXPathQuery);
      if (relativeXPathQuery.startsWith(RELATIVE_PATH)) {
        Matcher regexMatcher=regex.matcher(relativeXPathQuery);
        int relativeLength=0;
        while (regexMatcher.find()) {
          relativeLength++;
        }
        if (relativeLength > 0) {
          String subRelativeQuery=relativeXPathQuery.substring(relativeLength * RELATIVE_PATH.length(),relativeXPathQuery.length());
          String[] absoluteSplit=absoluteXPathQuery.split(XmlMapUtil.XPATH_SEPARATOR);
          if (absoluteSplit.length > relativeLength) {
            tempAbsolute=new StringBuffer();
            for (int i=0; i < absoluteSplit.length - relativeLength; i++) {
              tempAbsolute.append(absoluteSplit[i]);
              tempAbsolute.append(XmlMapUtil.XPATH_SEPARATOR);
            }
            tempAbsolute.append(subRelativeQuery);
          }
        }
      }
      if (metadataTable != null && n < metadataTable.getColumns().size()) {
        MetadataColumn column=metadataTable.getColumns().get(n);
        targetAbsolutePath.put(tempAbsolute.toString(),column.getTalendType());
      }
 else {
        targetAbsolutePath.put(tempAbsolute.toString(),null);
      }
    }
  }
  for (  String absTarget : targetAbsolutePath.keySet()) {
    if (absTarget.startsWith(tempXpath)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isMappedChild(String tempXpath){
  if (targetAbsolutePath == null) {
    targetAbsolutePath=new HashMap<String,String>();
    targetDatePattern=new HashMap<String,String>();
    targetAbsolutePath.put(absoluteXPathQuery,null);
    Pattern regex=Pattern.compile(RELATIVE_PATH_PATTERN,Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
    for (int n=0; n < schemaTargets.size(); n++) {
      Object obj=schemaTargets.get(n);
      String relativeXPathQuery="String_Node_Str";
      if (obj instanceof SchemaTarget) {
        relativeXPathQuery=((SchemaTarget)obj).getRelativeXPathQuery();
      }
 else       if (obj instanceof ConceptTarget) {
        relativeXPathQuery=((ConceptTarget)obj).getRelativeLoopExpression();
      }
      StringBuffer tempAbsolute=new StringBuffer();
      tempAbsolute.append(absoluteXPathQuery);
      tempAbsolute.append(XmlMapUtil.XPATH_SEPARATOR);
      tempAbsolute.append(relativeXPathQuery);
      if (relativeXPathQuery.startsWith(RELATIVE_PATH)) {
        Matcher regexMatcher=regex.matcher(relativeXPathQuery);
        int relativeLength=0;
        while (regexMatcher.find()) {
          relativeLength++;
        }
        if (relativeLength > 0) {
          String subRelativeQuery=relativeXPathQuery.substring(relativeLength * RELATIVE_PATH.length(),relativeXPathQuery.length());
          String[] absoluteSplit=absoluteXPathQuery.split(XmlMapUtil.XPATH_SEPARATOR);
          if (absoluteSplit.length > relativeLength) {
            tempAbsolute=new StringBuffer();
            for (int i=0; i < absoluteSplit.length - relativeLength; i++) {
              tempAbsolute.append(absoluteSplit[i]);
              tempAbsolute.append(XmlMapUtil.XPATH_SEPARATOR);
            }
            tempAbsolute.append(subRelativeQuery);
          }
        }
      }
      if (metadataTable != null && n < metadataTable.getColumns().size()) {
        MetadataColumn column=metadataTable.getColumns().get(n);
        targetAbsolutePath.put(tempAbsolute.toString(),column.getTalendType());
        targetDatePattern.put(tempAbsolute.toString(),column.getPattern());
      }
 else {
        targetAbsolutePath.put(tempAbsolute.toString(),null);
        targetDatePattern.put(tempAbsolute.toString(),null);
      }
    }
  }
  for (  String absTarget : targetAbsolutePath.keySet()) {
    if (absTarget.startsWith(tempXpath)) {
      return true;
    }
  }
  return false;
}