Program: 29057
Project: 29057
Buggy source:
void createJMSResource(JmsHost defaultJmsHost,ActionReport subReport,String tmpJMSResource){
  String port=null;
  String host=null;
  Server targetServer=domain.getServerNamed(target);
  if (targetServer != null && !targetServer.isDas()) {
    port=JmsRaUtil.getJMSPropertyValue(targetServer);
    host=domain.getNodeNamed(targetServer.getNodeRef()).getNodeHost();
  }
 else {
    Cluster cluster=domain.getClusterNamed(target);
    if (cluster != null && cluster.getInstances().size() != 0) {
      targetServer=cluster.getInstances().get(0);
      port=JmsRaUtil.getJMSPropertyValue(targetServer);
      host=domain.getNodeNamed(targetServer.getNodeRef()).getNodeHost();
    }
  }
  String userName=defaultJmsHost.getAdminUserName();
  String password=defaultJmsHost.getAdminPassword();
  if (host == null)   host=defaultJmsHost.getHost();
  if (port == null)   port=defaultJmsHost.getPort();
  ParameterMap aoAttrList=new ParameterMap();
  Properties properties=new Properties();
  properties.put("String_Node_Str",userName);
  if (isPasswordAlias(password)) {
    properties.put("String_Node_Str","String_Node_Str" + password + "String_Node_Str");
  }
 else   properties.put("String_Node_Str",password);
  properties.put("String_Node_Str","String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str");
  String propString="String_Node_Str";
  for (  java.util.Map.Entry<Object,Object> prop : properties.entrySet()) {
    propString+=prop.getKey() + "String_Node_Str" + prop.getValue()+ "String_Node_Str";
  }
  propString=propString.substring(0,propString.length());
  aoAttrList.set("String_Node_Str",propString);
  aoAttrList.set("String_Node_Str","String_Node_Str");
  aoAttrList.set("String_Node_Str",tmpJMSResource);
  commandRunner.getCommandInvocation("String_Node_Str",subReport).parameters(aoAttrList).execute();
}

Fixed version (ground truth):
void createJMSResource(JmsHost defaultJmsHost,ActionReport subReport,String tmpJMSResource){
  String port=null;
  String host=null;
  Server targetServer=domain.getServerNamed(target);
  if (targetServer != null && !targetServer.isDas()) {
    port=JmsRaUtil.getJMSPropertyValue(targetServer);
    host=domain.getNodeNamed(targetServer.getNodeRef()).getNodeHost();
  }
 else {
    Cluster cluster=domain.getClusterNamed(target);
    if (cluster != null && cluster.getInstances().size() != 0) {
      targetServer=cluster.getInstances().get(0);
      port=JmsRaUtil.getJMSPropertyValue(targetServer);
      host=domain.getNodeNamed(targetServer.getNodeRef()).getNodeHost();
    }
  }
  String userName=defaultJmsHost.getAdminUserName();
  String password=defaultJmsHost.getAdminPassword();
  if (host == null)   host=defaultJmsHost.getHost();
  if (port == null)   port=defaultJmsHost.getPort();
  ParameterMap aoAttrList=new ParameterMap();
  Properties properties=new Properties();
  properties.put("String_Node_Str",userName);
  if (isPasswordAlias(password)) {
    properties.put("String_Node_Str","String_Node_Str" + password + "String_Node_Str");
  }
 else   properties.put("String_Node_Str",password);
  properties.put("String_Node_Str","String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str");
  StringBuilder builder=new StringBuilder();
  for (  java.util.Map.Entry<Object,Object> prop : properties.entrySet()) {
    builder.append(prop.getKey()).append("String_Node_Str").append(prop.getValue()).append("String_Node_Str");
  }
  String propString=builder.toString();
  int lastColonIndex=propString.lastIndexOf("String_Node_Str");
  if (lastColonIndex >= 0) {
    propString=propString.substring(0,lastColonIndex);
  }
  aoAttrList.set("String_Node_Str",propString);
  aoAttrList.set("String_Node_Str","String_Node_Str");
  aoAttrList.set("String_Node_Str",tmpJMSResource);
  commandRunner.getCommandInvocation("String_Node_Str",subReport).parameters(aoAttrList).execute();
}