Program: 115695
Project: 115695
Buggy source:
/** 
 * Converts Cartridge to CartridgeDefinitionBean
 * @param cartridgeInfo cartridge Info
 * @return CartridgeBean
 */
public static CartridgeBean convertCartridgeToCartridgeDefinitionBean(Cartridge cartridgeInfo){
  CartridgeBean cartridge=new CartridgeBean();
  cartridge.setType(cartridgeInfo.getType());
  cartridge.setProvider(cartridgeInfo.getProvider());
  cartridge.setCategory(cartridgeInfo.getCategory());
  cartridge.setHost(cartridgeInfo.getHostName());
  cartridge.setDisplayName(cartridgeInfo.getDisplayName());
  cartridge.setDescription(cartridgeInfo.getDescription());
  cartridge.setVersion(cartridgeInfo.getVersion());
  cartridge.setMultiTenant(cartridgeInfo.getMultiTenant());
  cartridge.setDescription(cartridgeInfo.getDescription());
  cartridge.setLoadBalancingIPType(cartridgeInfo.getLoadBalancingIPType());
  cartridge.setMetadataKeys(cartridgeInfo.getMetadataKeys());
  cartridge.setTenantPartitions(cartridgeInfo.getTenantPartitions());
  cartridge.setPersistence(convertPersistenceToPersistenceBean(cartridgeInfo.getPersistence()));
  cartridge.setDeployment(convertDeploymentToDeploymentBean(cartridgeInfo.getDeploymentDirs(),cartridgeInfo.getBaseDir()));
  cartridge.setIaasProvider(convertIaaSProviderToIaaSProviderBean(cartridgeInfo.getIaasConfigs()));
  cartridge.setPortMapping(convertPortMappingsToStubPortMappingBeans(cartridgeInfo.getPortMappings()));
  cartridge.setProperty(convertCCStubPropertiesToPropertyBeans(cartridgeInfo.getProperties()));
  return cartridge;
}

Fixed version (ground truth):
/** 
 * Converts Cartridge to CartridgeDefinitionBean
 * @param cartridgeInfo cartridge Info
 * @return CartridgeBean
 */
public static CartridgeBean convertCartridgeToCartridgeDefinitionBean(Cartridge cartridgeInfo){
  CartridgeBean cartridge=new CartridgeBean();
  cartridge.setType(cartridgeInfo.getType());
  cartridge.setProvider(cartridgeInfo.getProvider());
  cartridge.setCategory(cartridgeInfo.getCategory());
  cartridge.setHost(cartridgeInfo.getHostName());
  cartridge.setDisplayName(cartridgeInfo.getDisplayName());
  cartridge.setDescription(cartridgeInfo.getDescription());
  cartridge.setVersion(cartridgeInfo.getVersion());
  cartridge.setMultiTenant(cartridgeInfo.getMultiTenant());
  cartridge.setDescription(cartridgeInfo.getDescription());
  cartridge.setLoadBalancingIPType(cartridgeInfo.getLoadBalancingIPType());
  if (cartridgeInfo.getMetadataKeys() != null && cartridgeInfo.getMetadataKeys()[0] != null) {
    cartridge.setMetadataKeys(cartridgeInfo.getMetadataKeys());
  }
  cartridge.setTenantPartitions(cartridgeInfo.getTenantPartitions());
  cartridge.setPersistence(convertPersistenceToPersistenceBean(cartridgeInfo.getPersistence()));
  cartridge.setDeployment(convertDeploymentToDeploymentBean(cartridgeInfo.getDeploymentDirs(),cartridgeInfo.getBaseDir()));
  cartridge.setIaasProvider(convertIaaSProviderToIaaSProviderBean(cartridgeInfo.getIaasConfigs()));
  cartridge.setPortMapping(convertPortMappingsToStubPortMappingBeans(cartridgeInfo.getPortMappings()));
  cartridge.setProperty(convertCCStubPropertiesToPropertyBeans(cartridgeInfo.getProperties()));
  return cartridge;
}