Program: 40990
Project: 40990
Buggy source:
private Variable appendBPELAssignOperationShScript(TemplatePlanContext templateContext,AbstractOperation operation,AbstractArtifactReference reference,AbstractImplementationArtifact ia){
  Map<String,Variable> inputMappings=new HashMap<String,Variable>();
  String runShScriptString="String_Node_Str" + templateContext.getCSARFileName() + "String_Node_Str"+ templateContext.getCSARFileName()+ "String_Node_Str"+ reference.getReference()+ "String_Node_Str"+ this.createDANamePathMapEnvVar(templateContext,ia);
  String runShScriptStringVarName="String_Node_Str" + templateContext.getIdForNames();
  String xpathQueryPrefix="String_Node_Str";
  String xpathQuerySuffix="String_Node_Str";
  for (  AbstractParameter parameter : operation.getInputParameters()) {
    Variable var=templateContext.getPropertyVariable(parameter.getName());
    if (var == null) {
      var=templateContext.getPropertyVariable(parameter.getName(),true);
      if (var == null) {
        var=templateContext.getPropertyVariable(parameter.getName(),false);
      }
    }
    inputMappings.put(parameter.getName(),var);
    runShScriptString+=parameter.getName() + "String_Node_Str" + parameter.getName()+ "String_Node_Str";
    xpathQueryPrefix+="String_Node_Str";
    xpathQuerySuffix+="String_Node_Str" + parameter.getName() + "String_Node_Str";
    if (var == null) {
      xpathQuerySuffix+="String_Node_Str" + templateContext.getPlanRequestMessageName() + "String_Node_Str"+ parameter.getName()+ "String_Node_Str";
    }
 else {
      xpathQuerySuffix+="String_Node_Str" + var.getName() + "String_Node_Str";
    }
  }
  runShScriptString+="String_Node_Str" + templateContext.getCSARFileName() + "String_Node_Str"+ reference.getReference();
  String logFilePath="String_Node_Str" + templateContext.getCSARFileName() + "String_Node_Str"+ templateContext.getTemplateBuildPlanName()+ "String_Node_Str";
  runShScriptString+="String_Node_Str" + logFilePath;
  runShScriptString+="String_Node_Str" + logFilePath;
  Variable runShScriptStringVar=templateContext.createGlobalStringVariable(runShScriptStringVarName,runShScriptString);
  try {
    String xpathQuery=xpathQueryPrefix + "String_Node_Str" + runShScriptStringVar.getName()+ xpathQuerySuffix;
    Node assignNode=this.loadAssignXpathQueryToStringVarFragmentAsNode("String_Node_Str",xpathQuery,runShScriptStringVar.getName());
    assignNode=templateContext.importNode(assignNode);
    templateContext.getProvisioningPhaseElement().appendChild(assignNode);
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
  }
catch (  SAXException e) {
    LOG.error("String_Node_Str",e);
  }
  return runShScriptStringVar;
}

Fixed version (ground truth):
private Variable appendBPELAssignOperationShScript(TemplatePlanContext templateContext,AbstractOperation operation,AbstractArtifactReference reference,AbstractImplementationArtifact ia,Map<AbstractParameter,Variable> inputMappings){
  String runShScriptString="String_Node_Str" + templateContext.getCSARFileName() + "String_Node_Str"+ templateContext.getCSARFileName()+ "String_Node_Str"+ reference.getReference()+ "String_Node_Str"+ this.createDANamePathMapEnvVar(templateContext,ia);
  String runShScriptStringVarName="String_Node_Str" + templateContext.getIdForNames();
  String xpathQueryPrefix="String_Node_Str";
  String xpathQuerySuffix="String_Node_Str";
  for (  AbstractParameter parameter : operation.getInputParameters()) {
    Variable var=inputMappings.get(parameter);
    runShScriptString+=parameter.getName() + "String_Node_Str" + parameter.getName()+ "String_Node_Str";
    xpathQueryPrefix+="String_Node_Str";
    xpathQuerySuffix+="String_Node_Str" + parameter.getName() + "String_Node_Str";
    if (var == null) {
      xpathQuerySuffix+="String_Node_Str" + templateContext.getPlanRequestMessageName() + "String_Node_Str"+ parameter.getName()+ "String_Node_Str";
    }
 else {
      xpathQuerySuffix+="String_Node_Str" + var.getName() + "String_Node_Str";
    }
  }
  runShScriptString+="String_Node_Str" + templateContext.getCSARFileName() + "String_Node_Str"+ reference.getReference();
  String logFilePath="String_Node_Str" + templateContext.getCSARFileName() + "String_Node_Str"+ templateContext.getTemplateBuildPlanName()+ "String_Node_Str";
  runShScriptString+="String_Node_Str" + logFilePath;
  runShScriptString+="String_Node_Str" + logFilePath;
  Variable runShScriptStringVar=templateContext.createGlobalStringVariable(runShScriptStringVarName,runShScriptString);
  try {
    String xpathQuery=xpathQueryPrefix + "String_Node_Str" + runShScriptStringVar.getName()+ xpathQuerySuffix;
    Node assignNode=this.loadAssignXpathQueryToStringVarFragmentAsNode("String_Node_Str",xpathQuery,runShScriptStringVar.getName());
    assignNode=templateContext.importNode(assignNode);
    templateContext.getProvisioningPhaseElement().appendChild(assignNode);
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
  }
catch (  SAXException e) {
    LOG.error("String_Node_Str",e);
  }
  return runShScriptStringVar;
}