Buggy code:
protected final int _sleep = 10000 ; protected final int DEFAULT_DOMR_SSHPORT = 3922 ; protected final int MAX_CMD_MBEAN = 100 ; protected String _url ; protected String _dcId ; protected String _pod ; protected String _cluster ; protected String _username ; protected String _password ; protected String _guid ; protected String _vCenterAddress ; protected String _privateNetworkVSwitchName ; protected VmwareTrafficLabel _guestTrafficInfo = new VmwareTrafficLabel ( TrafficType . Guest ) ; protected VmwareTrafficLabel _publicTrafficInfo = new VmwareTrafficLabel ( TrafficType . Public ) ; protected Map < String , String > _vsmCredentials = null ; protected int _portsPerDvPortGroup ; protected boolean _fullCloneFlag = false ; protected boolean _instanceNameFlag = false ; protected boolean _recycleHungWorker = false ; protected DiskControllerType _rootDiskController = DiskControllerType . ide ; protected ManagedObjectReference _morHyperHost ; protected static ThreadLocal < VmwareContext > s_serviceContext = new ThreadLocal < VmwareContext > ( ) ; protected String _hostName ; protected HashMap < String , State > _vms = new HashMap < String , State > ( 71 ) ; protected List < PropertyMapDynamicBean > _cmdMBeans = new ArrayList < PropertyMapDynamicBean > ( ) ; protected Gson _gson ; protected volatile long _cmdSequence = 1 ; protected StorageSubsystemCommandHandler storageHandler ; protected static HashMap < VirtualMachinePowerState , State > s_statesTable ; public Gson getGson ( ) { } public VmwareResource ( ) { } @ Override public Answer executeRequest ( Command cmd ) { } private Answer execute ( ResizeVolumeCommand cmd ) { } private void deleteWorkerVm ( VirtualMachineMO vmMo , String vmdkDataStorePath ) { } protected Answer execute ( CheckNetworkCommand cmd ) { } protected Answer execute ( NetworkUsageCommand cmd ) { } private SetStaticRouteAnswer execute ( SetStaticRouteCommand cmd ) { } protected NetworkUsageAnswer VPCNetworkUsage ( NetworkUsageCommand cmd ) { } protected Answer execute ( SetPortForwardingRulesCommand cmd ) { } protected SetFirewallRulesAnswer execute ( SetFirewallRulesCommand cmd ) { } protected SetStaticNatRulesAnswer SetVPCStaticNatRules ( SetStaticNatRulesCommand cmd ) { } protected Answer execute ( SetStaticNatRulesCommand cmd ) { } protected Answer VPCLoadBalancerConfig ( final LoadBalancerConfigCommand cmd ) { } protected Answer execute ( final LoadBalancerConfigCommand cmd ) { } private int allocRouterEthDeviceIndex ( String domrName , String routerIp ) throws Exception { } private int findRouterEthDeviceIndex ( String domrName , String routerIp , String mac ) throws Exception { } private VirtualDevice findVirtualNicDevice ( VirtualMachineMO vmMo , String mac ) throws Exception { } private SetupGuestNetworkAnswer execute ( SetupGuestNetworkCommand cmd ) { } protected IpAssocAnswer execute ( IpAssocVpcCommand cmd ) { } protected SetSourceNatAnswer execute ( SetSourceNatCommand cmd ) { } private SetNetworkACLAnswer execute ( SetNetworkACLCommand cmd ) { } protected SetPortForwardingRulesAnswer execute ( SetPortForwardingRulesVpcCommand cmd ) { } protected Answer execute ( Site2SiteVpnCfgCommand cmd ) { } private PlugNicAnswer execute ( PlugNicCommand cmd ) { } private UnPlugNicAnswer execute ( UnPlugNicCommand cmd ) { } protected void assignVPCPublicIpAddress ( String domrName , String routerIp , IpAddressTO ip ) throws Exception { } protected void assignPublicIpAddress ( VirtualMachineMO vmMo , final String vmName , final String privateIpAddress , final String publicIpAddress , final boolean add , final boolean firstIP , final boolean sourceNat , final String vlanId , final String vlanGateway , final String vlanNetmask , final String vifMacAddress ) throws Exception { } private void plugPublicNic ( VirtualMachineMO vmMo , final String vlanId , final String vifMacAddress ) throws Exception { } private int allocPublicNicIndex ( VirtualMachineMO vmMo ) throws Exception { } protected Answer execute ( IpAssocCommand cmd ) { } protected Answer execute ( IpListCommand cmd ) { if ( VmwareResource . s_logger . isInfoEnabled ( ) ) { VmwareResource . s_logger . info ( ( "Executing<seq2seq4repair_space>resource<seq2seq4repair_space>IpListCommand:<seq2seq4repair_space>" + ( _gson . toJson ( cmd ) ) ) ) ; } VmwareContext context = getServiceContext ( ) ; try { VmwareHypervisorHost hyperHost = getHyperHost ( context ) ; <START_BUG> String [ ] vifMacAddresses = cmd . getVifMacAddresses ( ) ; <END_BUG> String routerName = cmd . getAccessDetail ( ROUTER_NAME ) ; String controlIp = VmwareResource . getRouterSshControlIp ( cmd ) ; VirtualMachineMO vmMo = hyperHost . findVmOnHyperHost ( routerName ) ; if ( vmMo == null ) { if ( hyperHost instanceof HostMO ) { ClusterMO clusterMo = new ClusterMO ( hyperHost . getContext ( ) , ( ( HostMO ) ( hyperHost ) ) . getParentMor ( ) ) ; vmMo = clusterMo . findVmOnHyperHost ( routerName ) ; } } if ( vmMo == null ) { String msg = ( "Router<seq2seq4repair_space>" + routerName ) + "<seq2seq4repair_space>no<seq2seq4repair_space>longer<seq2seq4repair_space>exists<seq2seq4repair_space>to<seq2seq4repair_space>execute<seq2seq4repair_space>IPList<seq2seq4repair_space>command" ; VmwareResource . s_logger . error ( msg ) ; throw new Exception ( msg ) ; } VmwareManager mgr = getServiceContext ( ) . getStockObject ( CONTEXT_STOCK_NAME ) ; List < String > interfaces = listInterfacesOnRouter ( controlIp , mgr , vifMacAddresses ) ; Set < String > ips = listIpsOnRouter ( controlIp , mgr , interfaces ) ; String [ ] foundIps = ips . toArray ( new String [ ips . size ( ) ] ) ; IpListAnswer ans = new IpListAnswer ( cmd , foundIps ) ; return ans ; } catch ( Throwable e ) { VmwareResource . s_logger . error ( ( ( "Unexpected<seq2seq4repair_space>exception:<seq2seq4repair_space>" + ( e . toString ( ) ) ) + "<seq2seq4repair_space>will<seq2seq4repair_space>shortcut<seq2seq4repair_space>rest<seq2seq4repair_space>of<seq2seq4repair_space>IPList<seq2seq4repair_space>commands" ) , e ) ; return new Answer ( cmd , false , e . toString ( ) ) ; } } protected List < String > listInterfacesOnRouter ( String controlIp , VmwareManager mgr , String [ ] vifMacAddresses ) { } protected Set < String > listIpsOnRouter ( String controlIp , VmwareManager mgr , List < String > interfaces ) { } protected Answer execute ( SavePasswordCommand cmd ) { } protected Answer execute ( DhcpEntryCommand cmd ) { } protected Answer execute ( final CreateIpAliasCommand cmd ) { } protected Answer execute ( final DeleteIpAliasCommand cmd ) { } protected Answer execute ( final DnsMasqConfigCommand cmd ) { } protected CheckS2SVpnConnectionsAnswer execute ( CheckS2SVpnConnectionsCommand cmd ) { } protected Answer execute ( CheckRouterCommand cmd ) { } protected Answer execute ( GetDomRVersionCmd cmd ) { }

Fix:
String [ ] vifMacAddresses = cmd . getVlanIds ( ) ;