Buggy code:
public class KubernetesIaas extends Iaas { private static final Log log = LogFactory . getLog ( KubernetesIaas . class ) ; private static final long DEFAULT_POD_ACTIVATION_TIMEOUT = 300000 ; private static final String PAYLOAD_PARAMETER_SEPARATOR = "," ; private static final String PAYLOAD_PARAMETER_NAME_VALUE_SEPARATOR = "=" ; private static final String PAYLOAD_PARAMETER_PREFIX = "payload_parameter." ; private PartitionValidator partitionValidator ; private List < NameValuePair > payload ; private Long podActivationTimeout ; public KubernetesIaas ( IaasProvider iaasProvider ) { } @ Override public void initialize ( ) { } @ Override public void setDynamicPayload ( byte [ ] payloadByteArray ) { } @ Override public MemberContext startInstance ( MemberContext memberContext ) throws CartridgeNotFoundException { } @ Override public PartitionValidator getPartitionValidator ( ) { } @ Override public void terminateInstance ( MemberContext memberContext ) throws InvalidCartridgeTypeException , InvalidMemberException , MemberTerminationFailedException { } public MemberContext startContainer ( MemberContext memberContext ) throws CartridgeNotFoundException { } private MemberContext createNewMemberContext ( MemberContext memberContext , Pod pod , KubernetesCluster kubernetesCluster ) { } private String findKubernetesHostPublicIPAddress ( KubernetesCluster kubernetesCluster , String podHostIP ) { } private Pod waitForPodToBeActivated ( MemberContext memberContext , KubernetesApiClient kubernetesApi ) throws InterruptedException , KubernetesClientException { } private void createPod ( ClusterContext clusterContext , MemberContext memberContext , KubernetesApiClient kubernetesApi ) throws KubernetesClientException { String applicationId = memberContext . getApplicationId ( ) ; String cartridgeType = memberContext . getCartridgeType ( ) ; String memberId = memberContext . getMemberId ( ) ; if ( KubernetesIaas . log . isInfoEnabled ( ) ) { KubernetesIaas . log . info ( String . format ( "Creating<seq2seq4repair_space>kubernetes<seq2seq4repair_space>pod:<seq2seq4repair_space>[application]<seq2seq4repair_space>%s<seq2seq4repair_space>[cartridge]<seq2seq4repair_space>%s<seq2seq4repair_space>[member]<seq2seq4repair_space>%s" , applicationId , cartridgeType , memberId ) ) ; } Partition partition = memberContext . getPartition ( ) ; if ( partition == null ) { String message = String . format ( ( "Partition<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>member<seq2seq4repair_space>context:<seq2seq4repair_space>[application]<seq2seq4repair_space>%s<seq2seq4repair_space>[cartridge]<seq2seq4repair_space>%s<seq2seq4repair_space>" + "[member]<seq2seq4repair_space>%s<seq2seq4repair_space>" ) , applicationId , cartridgeType , memberId ) ; KubernetesIaas . log . error ( message ) ; throw new RuntimeException ( message ) ; } Cartridge cartridge = CloudControllerContext . getInstance ( ) . getCartridge ( cartridgeType ) ; if ( cartridge == null ) { String message = "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>cartridge:<seq2seq4repair_space>[cartridge]<seq2seq4repair_space>" + cartridgeType ; KubernetesIaas . log . error ( message ) ; throw new RuntimeException ( message ) ; } IaasProvider iaasProvider = cartridge . getIaasProviderOfPartition ( partition . getId ( ) ) ; if ( iaasProvider == null ) { String message = "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>iaas<seq2seq4repair_space>provider:<seq2seq4repair_space>[partition]<seq2seq4repair_space>" + ( partition . getId ( ) ) ; KubernetesIaas . log . error ( message ) ; throw new RuntimeException ( message ) ; } <START_BUG> memberContext . setDynamicPayload ( payload ) ; <END_BUG> String podId = KubernetesIaasUtil . fixSpecialCharacters ( memberId ) ; String podName = podId ; String dockerImage = iaasProvider . getImage ( ) ; EnvironmentVariable [ ] environmentVariables = KubernetesIaasUtil . prepareEnvironmentVariables ( clusterContext , memberContext ) ; kubernetesApi . createPod ( podId , podName , dockerImage , KubernetesIaasUtil . convertPortMappings ( cartridge . getPortMappings ( ) ) , environmentVariables ) ; memberContext . setKubernetesPodId ( podId ) ; memberContext . setKubernetesPodName ( podName ) ; CloudControllerContext . getInstance ( ) . persist ( ) ; if ( KubernetesIaas . log . isInfoEnabled ( ) ) { KubernetesIaas . log . info ( String . format ( ( "Kubernetes<seq2seq4repair_space>pod<seq2seq4repair_space>created<seq2seq4repair_space>successfully:<seq2seq4repair_space>[application]<seq2seq4repair_space>%s<seq2seq4repair_space>[cartridge]<seq2seq4repair_space>%s<seq2seq4repair_space>[member]<seq2seq4repair_space>%s<seq2seq4repair_space>" + "[pod]<seq2seq4repair_space>%s" ) , applicationId , cartridgeType , memberId , memberContext . getKubernetesPodId ( ) ) ) ; } } private void createKubernetesServices ( KubernetesApiClient kubernetesApi , ClusterContext clusterContext , KubernetesClusterContext kubernetesClusterContext ) throws KubernetesClientException { } private boolean kubernetesServiceExist ( List < KubernetesService > kubernetesServices , int port ) { } private void updateKubernetesServicePorts ( KubernetesClusterContext kubernetesClusterContext , String clusterId , Cartridge cartridge ) { } public MemberContext [ ] terminateContainers ( String clusterId ) throws InvalidClusterException { } public MemberContext terminateContainer ( String memberId ) throws MemberTerminationFailedException { } private KubernetesClusterContext getKubernetesClusterContext ( String kubernetesClusterId , String kubernetesMasterIp , String kubernetesMasterPort , int upperPort , int lowerPort ) { } private String readProperty ( String property , Properties properties , String object ) { } private void handleNullObject ( Object obj , String errorMsg ) { } @ Override public void releaseAddress ( String ip ) { } @ Override public boolean isValidRegion ( String region ) throws InvalidRegionException { } @ Override public boolean isValidZone ( String region , String zone ) throws InvalidRegionException , InvalidZoneException { } @ Override public boolean isValidHost ( String zone , String host ) throws InvalidHostException { } @ Override public String createVolume ( int sizeGB , String snapshotId ) { } @ Override public String attachVolume ( String instanceId , String volumeId , String deviceName ) { } @ Override public void detachVolume ( String instanceId , String volumeId ) { } @ Override public void deleteVolume ( String volumeId ) { } @ Override public String getIaasDevice ( String device ) { } @ Override public void allocateIpAddresses ( String clusterId , MemberContext memberContext , Partition partition ) { } }

Fix:
memberContext . setDynamicPayload ( payload . toArray ( new NameValuePair [ payload . size ( ) ] ) ) ;