Program: 40991
Project: 40991
Buggy source:
public boolean handle(TemplatePlanContext templateContext,AbstractOperation operation,AbstractImplementationArtifact ia,Map<AbstractParameter,Variable> param2propertyMapping){
  AbstractNodeTemplate infrastructureNodeTemplate=this.findInfrastructureNode(templateContext.getInfrastructureNodes());
  if (infrastructureNodeTemplate == null) {
    return false;
  }
  Variable runShScriptStringVar=null;
  AbstractArtifactReference scriptRef=this.fetchScriptRefFromIA(ia);
  if (scriptRef == null) {
    return false;
  }
  runShScriptStringVar=this.appendBPELAssignOperationShScript(templateContext,operation,scriptRef,ia);
  Variable ipStringVariable=null;
  for (  String serverIp : org.opentosca.model.tosca.conventions.Utils.getSupportedVirtualMachineIPPropertyNames()) {
    ipStringVariable=templateContext.getPropertyVariable(infrastructureNodeTemplate,serverIp);
    if (ipStringVariable == null) {
      ipStringVariable=templateContext.getPropertyVariable(serverIp,true);
      if (ipStringVariable == null) {
        ipStringVariable=templateContext.getPropertyVariable(serverIp,false);
      }
 else {
        break;
      }
    }
 else {
      break;
    }
  }
  Variable userStringVariable=null;
  for (  String vmUserName : org.opentosca.model.tosca.conventions.Utils.getSupportedVirtualMachineLoginUserNamePropertyNames()) {
    userStringVariable=templateContext.getPropertyVariable(infrastructureNodeTemplate,vmUserName);
    if (userStringVariable == null) {
      userStringVariable=templateContext.getPropertyVariable(vmUserName,true);
      if (userStringVariable == null) {
        userStringVariable=templateContext.getPropertyVariable(vmUserName,false);
      }
 else {
        break;
      }
    }
 else {
      break;
    }
  }
  Variable passwdStringVariable=null;
  for (  String vmUserPassword : org.opentosca.model.tosca.conventions.Utils.getSupportedVirtualMachineLoginPasswordPropertyNames()) {
    passwdStringVariable=templateContext.getPropertyVariable(infrastructureNodeTemplate,vmUserPassword);
    if (passwdStringVariable == null) {
      passwdStringVariable=templateContext.getPropertyVariable(vmUserPassword,true);
      if (passwdStringVariable == null) {
        passwdStringVariable=templateContext.getPropertyVariable(vmUserPassword,false);
      }
 else {
        break;
      }
    }
 else {
      break;
    }
  }
  if (this.isNull(runShScriptStringVar,ipStringVariable,userStringVariable,passwdStringVariable)) {
    return false;
  }
  Map<String,Variable> payloadVariableMapping=new HashMap<String,Variable>();
  for (  AbstractParameter param : param2propertyMapping.keySet()) {
    payloadVariableMapping.put(param.getName(),param2propertyMapping.get(param));
  }
  return this.appendExecuteScript(templateContext,infrastructureNodeTemplate.getId(),runShScriptStringVar,userStringVariable,passwdStringVariable,ipStringVariable,payloadVariableMapping);
}

Fixed version (ground truth):
public boolean handle(TemplatePlanContext templateContext,AbstractOperation operation,AbstractImplementationArtifact ia,Map<AbstractParameter,Variable> param2propertyMapping){
  if (operation.getInputParameters().size() != param2propertyMapping.size()) {
    return false;
  }
  AbstractNodeTemplate infrastructureNodeTemplate=this.findInfrastructureNode(templateContext.getInfrastructureNodes());
  if (infrastructureNodeTemplate == null) {
    return false;
  }
  Variable runShScriptStringVar=null;
  AbstractArtifactReference scriptRef=this.fetchScriptRefFromIA(ia);
  if (scriptRef == null) {
    return false;
  }
  runShScriptStringVar=this.appendBPELAssignOperationShScript(templateContext,operation,scriptRef,ia,param2propertyMapping);
  Variable ipStringVariable=null;
  for (  String serverIp : org.opentosca.model.tosca.conventions.Utils.getSupportedVirtualMachineIPPropertyNames()) {
    ipStringVariable=templateContext.getPropertyVariable(infrastructureNodeTemplate,serverIp);
    if (ipStringVariable == null) {
      ipStringVariable=templateContext.getPropertyVariable(serverIp,true);
      if (ipStringVariable == null) {
        ipStringVariable=templateContext.getPropertyVariable(serverIp,false);
      }
 else {
        break;
      }
    }
 else {
      break;
    }
  }
  Variable userStringVariable=null;
  for (  String vmUserName : org.opentosca.model.tosca.conventions.Utils.getSupportedVirtualMachineLoginUserNamePropertyNames()) {
    userStringVariable=templateContext.getPropertyVariable(infrastructureNodeTemplate,vmUserName);
    if (userStringVariable == null) {
      userStringVariable=templateContext.getPropertyVariable(vmUserName,true);
      if (userStringVariable == null) {
        userStringVariable=templateContext.getPropertyVariable(vmUserName,false);
      }
 else {
        break;
      }
    }
 else {
      break;
    }
  }
  Variable passwdStringVariable=null;
  for (  String vmUserPassword : org.opentosca.model.tosca.conventions.Utils.getSupportedVirtualMachineLoginPasswordPropertyNames()) {
    passwdStringVariable=templateContext.getPropertyVariable(infrastructureNodeTemplate,vmUserPassword);
    if (passwdStringVariable == null) {
      passwdStringVariable=templateContext.getPropertyVariable(vmUserPassword,true);
      if (passwdStringVariable == null) {
        passwdStringVariable=templateContext.getPropertyVariable(vmUserPassword,false);
      }
 else {
        break;
      }
    }
 else {
      break;
    }
  }
  if (this.isNull(runShScriptStringVar,ipStringVariable,userStringVariable,passwdStringVariable)) {
    return false;
  }
  return this.appendExecuteScript(templateContext,infrastructureNodeTemplate.getId(),runShScriptStringVar,userStringVariable,passwdStringVariable,ipStringVariable);
}