Program: 185074
Project: 185074
Buggy source:
private void processDescendantBindings(Object sdt,String xpathBase,int index){
  SdtPr sdtPr=getSdtPr(sdt);
  sdtPr.setId();
  CTDataBinding binding=(CTDataBinding)XmlUtils.unwrap(sdtPr.getDataBinding());
  String thisXPath=null;
  String conditionId=null;
  String repeatId=null;
  String bindingId=null;
  org.opendope.xpaths.Xpaths.Xpath xpathObj=null;
  Tag tag=sdtPr.getTag();
  if (tag == null)   return;
  HashMap<String,String> map=QueryString.parseQueryString(tag.getVal(),true);
  if (binding == null) {
    conditionId=map.get(BINDING_ROLE_CONDITIONAL);
    repeatId=map.get(BINDING_ROLE_REPEAT);
    if (conditionId != null) {
      processDescendantCondition(sdt,xpathBase,index,tag);
      return;
    }
 else     if (repeatId != null) {
      xpathObj=XPathsPart.getXPathById(xPaths,repeatId);
      thisXPath=xpathObj.getDataBinding().getXpath();
    }
 else     if (map.containsKey(BINDING_CONTENTTYPE)) {
      xpathObj=XPathsPart.getXPathById(xPaths,map.get(BINDING_ROLE_XPATH));
      thisXPath=xpathObj.getDataBinding().getXpath();
    }
 else {
      log.warn("String_Node_Str");
      return;
    }
  }
 else {
    thisXPath=binding.getXpath();
    bindingId=map.get(BINDING_ROLE_XPATH);
    xpathObj=XPathsPart.getXPathById(xPaths,bindingId);
    if (!thisXPath.equals(xpathObj.getDataBinding().getXpath())) {
      log.error("String_Node_Str" + bindingId + "String_Node_Str"+ thisXPath+ "String_Node_Str"+ xpathObj.getDataBinding().getXpath());
    }
  }
  final String newPath=enhanceXPath(xpathBase,index + 1,thisXPath);
  if (log.isDebugEnabled() && !thisXPath.equals(newPath)) {
    log.debug("String_Node_Str" + thisXPath + "String_Node_Str"+ newPath);
  }
  if (binding == null) {
    if (repeatId != null) {
      org.opendope.xpaths.Xpaths.Xpath newXPathObj=createNewXPathObject(newPath,xpathObj,index);
      map.put(BINDING_ROLE_REPEAT,newXPathObj.getId());
      tag.setVal(QueryString.create(map));
    }
 else     if (map.containsKey(BINDING_CONTENTTYPE)) {
      org.opendope.xpaths.Xpaths.Xpath newXPathObj=createNewXPathObject(newPath,xpathObj,index);
      map.put(BINDING_ROLE_XPATH,newXPathObj.getId());
      tag.setVal(QueryString.create(map));
    }
  }
 else {
    binding.setXpath(newPath);
    org.opendope.xpaths.Xpaths.Xpath newXPathObj=createNewXPathObject(newPath,xpathObj,index);
    map.put(BINDING_ROLE_XPATH,newXPathObj.getId());
    tag.setVal(QueryString.create(map));
  }
}

Fixed version (ground truth):
private void processDescendantBindings(Object sdt,String xpathBase,int index){
  SdtPr sdtPr=getSdtPr(sdt);
  sdtPr.setId();
  CTDataBinding binding=(CTDataBinding)XmlUtils.unwrap(sdtPr.getDataBinding());
  String thisXPath=null;
  String conditionId=null;
  String repeatId=null;
  String bindingId=null;
  org.opendope.xpaths.Xpaths.Xpath xpathObj=null;
  Tag tag=sdtPr.getTag();
  if (tag == null)   return;
  HashMap<String,String> map=QueryString.parseQueryString(tag.getVal(),true);
  if (binding == null) {
    conditionId=map.get(BINDING_ROLE_CONDITIONAL);
    repeatId=map.get(BINDING_ROLE_REPEAT);
    if (conditionId != null) {
      processDescendantCondition(sdt,xpathBase,index,tag);
      return;
    }
 else     if (repeatId != null) {
      xpathObj=XPathsPart.getXPathById(xPaths,repeatId);
      thisXPath=xpathObj.getDataBinding().getXpath();
    }
 else     if (map.containsKey(BINDING_CONTENTTYPE) || map.containsKey(BINDING_HANDLER) || map.containsKey(BINDING_PROGID)) {
      xpathObj=XPathsPart.getXPathById(xPaths,map.get(BINDING_ROLE_XPATH));
      thisXPath=xpathObj.getDataBinding().getXpath();
    }
 else {
      log.warn("String_Node_Str");
      return;
    }
  }
 else {
    thisXPath=binding.getXpath();
    bindingId=map.get(BINDING_ROLE_XPATH);
    xpathObj=XPathsPart.getXPathById(xPaths,bindingId);
    if (!thisXPath.equals(xpathObj.getDataBinding().getXpath())) {
      log.error("String_Node_Str" + bindingId + "String_Node_Str"+ thisXPath+ "String_Node_Str"+ xpathObj.getDataBinding().getXpath());
    }
  }
  final String newPath=enhanceXPath(xpathBase,index + 1,thisXPath);
  if (log.isDebugEnabled() && !thisXPath.equals(newPath)) {
    log.debug("String_Node_Str" + thisXPath + "String_Node_Str"+ newPath);
  }
  if (binding == null) {
    if (repeatId != null) {
      org.opendope.xpaths.Xpaths.Xpath newXPathObj=createNewXPathObject(newPath,xpathObj,index);
      map.put(BINDING_ROLE_REPEAT,newXPathObj.getId());
      tag.setVal(QueryString.create(map));
    }
 else     if (map.containsKey(BINDING_CONTENTTYPE) || map.containsKey(BINDING_HANDLER) || map.containsKey(BINDING_PROGID)) {
      org.opendope.xpaths.Xpaths.Xpath newXPathObj=createNewXPathObject(newPath,xpathObj,index);
      map.put(BINDING_ROLE_XPATH,newXPathObj.getId());
      tag.setVal(QueryString.create(map));
    }
  }
 else {
    binding.setXpath(newPath);
    org.opendope.xpaths.Xpaths.Xpath newXPathObj=createNewXPathObject(newPath,xpathObj,index);
    map.put(BINDING_ROLE_XPATH,newXPathObj.getId());
    tag.setVal(QueryString.create(map));
  }
}