Program: 41587
Project: 41587
Buggy source:
/** 
 * Initializes Property variables for the given TemplateBuildPlan which handles a NodeTemplate
 * @param map a PropertyMap to save the result/mappings to
 * @param templatePlan a TemplateBuildPlan which handles a NodeTemplate
 */
private void initPropsAsVarsInNode(PropertyMap map,TemplateBuildPlan templatePlan){
  AbstractNodeTemplate nodeTemplate=templatePlan.getNodeTemplate();
  if (nodeTemplate.getProperties() != null) {
    Element propertyElement=nodeTemplate.getProperties().getDOMElement();
    for (int i=0; i < propertyElement.getChildNodes().getLength(); i++) {
      if (propertyElement.getChildNodes().item(i).getNodeType() == Node.TEXT_NODE) {
        continue;
      }
      String propName=propertyElement.getChildNodes().item(i).getLocalName();
      String propVarName=nodeTemplate.getId() + "String_Node_Str" + propertyElement.getChildNodes().item(i).getLocalName();
      map.addPropertyMapping(nodeTemplate.getId(),propName,"String_Node_Str" + propVarName);
      String value="String_Node_Str";
      for (int j=0; j < propertyElement.getChildNodes().item(i).getChildNodes().getLength(); j++) {
        if (propertyElement.getChildNodes().item(i).getChildNodes().item(j).getNodeType() == Node.TEXT_NODE) {
          value+=propertyElement.getChildNodes().item(i).getChildNodes().item(j).getNodeValue();
        }
      }
      PropertyVariableInitializer.LOG.debug("String_Node_Str" + propVarName);
      PropertyVariableInitializer.LOG.debug("String_Node_Str" + value);
      this.planHandler.addPropertyVariable(propVarName,templatePlan.getBuildPlan());
      if (!value.trim().isEmpty() && !value.trim().equals("String_Node_Str")) {
        this.planHandler.initializePropertyVariable(propVarName,value,templatePlan.getBuildPlan());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Initializes Property variables for the given TemplateBuildPlan which handles a NodeTemplate
 * @param map a PropertyMap to save the result/mappings to
 * @param templatePlan a TemplateBuildPlan which handles a NodeTemplate
 */
private void initPropsAsVarsInNode(PropertyMap map,TemplateBuildPlan templatePlan){
  AbstractNodeTemplate nodeTemplate=templatePlan.getNodeTemplate();
  if (nodeTemplate.getProperties() != null) {
    Element propertyElement=nodeTemplate.getProperties().getDOMElement();
    for (int i=0; i < propertyElement.getChildNodes().getLength(); i++) {
      if (propertyElement.getChildNodes().item(i).getNodeType() == Node.TEXT_NODE) {
        continue;
      }
      String propName=propertyElement.getChildNodes().item(i).getLocalName();
      String propVarName=nodeTemplate.getId() + "String_Node_Str" + propertyElement.getChildNodes().item(i).getLocalName();
      map.addPropertyMapping(nodeTemplate.getId(),propName,"String_Node_Str" + propVarName);
      String value="String_Node_Str";
      for (int j=0; j < propertyElement.getChildNodes().item(i).getChildNodes().getLength(); j++) {
        if (propertyElement.getChildNodes().item(i).getChildNodes().item(j).getNodeType() == Node.TEXT_NODE) {
          value+=propertyElement.getChildNodes().item(i).getChildNodes().item(j).getNodeValue();
        }
      }
      PropertyVariableInitializer.LOG.debug("String_Node_Str" + propVarName);
      PropertyVariableInitializer.LOG.debug("String_Node_Str" + value);
      this.planHandler.addPropertyVariable(propVarName,templatePlan.getBuildPlan());
      this.planHandler.initializePropertyVariable(propVarName,value,templatePlan.getBuildPlan());
    }
  }
}