Buggy code:
@ Override public StartupCommand [ ] initialize ( ) { } @ Override public Type getType ( ) { } @ Override public String getName ( ) { } @ Override public boolean start ( ) { } @ Override public boolean stop ( ) { } @ Override public PingCommand getCurrentStatus ( final long id ) { } @ Override public void disconnected ( ) { } @ Override public IAgentControl getAgentControl ( ) { } @ Override public void setAgentControl ( IAgentControl agentControl ) { } private void openHttpConnection ( ) { } private boolean refreshPaloAltoConnection ( ) { } private boolean login ( String username , String password ) throws ExecutionException { } private Answer execute ( ReadyCommand cmd ) { } private Answer execute ( MaintainCommand cmd ) { } private ExternalNetworkResourceUsageAnswer execute ( ExternalNetworkResourceUsageCommand cmd ) { } private synchronized Answer execute ( IpAssocCommand cmd ) { } private Answer execute ( IpAssocCommand cmd , int numRetries ) { } private void implementGuestNetwork ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . GuestNetworkType type , Long publicVlanTag , String publicIp , long privateVlanTag , String privateGateway , String privateSubnet , long privateCidrNumber ) throws ExecutionException { } private void shutdownGuestNetwork ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . GuestNetworkType type , Long publicVlanTag , String sourceNatIpAddress , long privateVlanTag , String privateGateway , String privateSubnet , long privateCidrSize ) throws ExecutionException { } private synchronized Answer execute ( SetFirewallRulesCommand cmd ) { } private Answer execute ( SetFirewallRulesCommand cmd , int numRetries ) { } private synchronized Answer execute ( SetStaticNatRulesCommand cmd ) { } private Answer execute ( SetStaticNatRulesCommand cmd , int numRetries ) { } private synchronized Answer execute ( SetPortForwardingRulesCommand cmd ) { } private Answer execute ( SetPortForwardingRulesCommand cmd , int numRetries ) { } private String genPrivateInterfaceName ( long vlanTag ) { } public boolean managePrivateInterface ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , long privateVlanTag , String privateGateway ) throws ExecutionException { } private String genPublicInterfaceName ( Long id ) { } public boolean managePublicInterface ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , Long publicVlanTag , String publicIp , long privateVlanTag ) throws ExecutionException { } private String genSrcNatRuleName ( Long privateVlanTag ) { } public boolean manageSrcNatRule ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , PaloAltoResource . GuestNetworkType type , Long publicVlanTag , String publicIp , long privateVlanTag , String privateGateway ) throws ExecutionException { } private String genDstNatRuleName ( String publicIp , long id ) { } public boolean manageDstNatRule ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , PortForwardingRuleTO rule ) throws ExecutionException { } private String genStcNatRuleName ( String publicIp , long id ) { } public boolean manageStcNatRule ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , StaticNatRuleTO rule ) throws ExecutionException { } private String genFirewallRuleName ( long id ) { } private String genFirewallRuleName ( long id , String vlan ) { } public boolean manageFirewallRule ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , FirewallRuleTO rule ) throws ExecutionException { } public void removeOrphanedFirewallRules ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , long vlan ) throws ExecutionException { } private String genNetworkIsolationName ( long privateVlanTag ) { } public boolean manageNetworkIsolation ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , long privateVlanTag , String privateSubnet , String privateGateway ) throws ExecutionException { } public boolean managePingProfile ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim ) throws ExecutionException { } private String genServiceName ( String protocol , String dstPorts , String srcPorts ) { } public boolean manageService ( ArrayList < PaloAltoResource . IPaloAltoCommand > cmdList , PaloAltoResource . PaloAltoPrimative prim , String protocol , String dstPorts , String srcPorts ) throws ExecutionException { } private String getPrivateSubnet ( String vlan ) throws ExecutionException { <START_BUG> String _interfaceName = genPrivateInterfaceName ( Long . valueOf ( vlan ) . longValue ( ) ) ; <END_BUG> Map < String , String > params = new HashMap < String , String > ( ) ; params . put ( "type" , "config" ) ; params . put ( "action" , "get" ) ; params . put ( "xpath" , ( ( ( ( ( ( "//config//devices//entry//network//interface//" + ( _privateInterfaceType ) ) + "//entry[@name='" ) + ( _privateInterface ) ) + "']//layer3//units//entry[@name='" ) + _interfaceName ) + "']//ip//entry" ) ) ; String response = request ( PaloAltoResource . PaloAltoMethod . GET , params ) ; if ( ( validResponse ( response ) ) && ( responseNotEmpty ( response ) ) ) { NodeList response_body ; Document doc = getDocument ( response ) ; XPath xpath = XPathFactory . newInstance ( ) . newXPath ( ) ; try { XPathExpression expr = xpath . compile ( "//response[@status='success']//result//entry" ) ; response_body = ( ( NodeList ) ( expr . evaluate ( doc , XPathConstants . NODESET ) ) ) ; } catch ( XPathExpressionException e ) { throw new ExecutionException ( e . getCause ( ) . getMessage ( ) ) ; } if ( ( response_body . getLength ( ) ) > 0 ) { return response_body . item ( 0 ) . getAttributes ( ) . getNamedItem ( "name" ) . getTextContent ( ) ; } } return null ; } protected String request ( PaloAltoResource . PaloAltoMethod method , Map < String , String > params ) throws ExecutionException { } private String requestWithPolling ( PaloAltoResource . PaloAltoMethod method , Map < String , String > params ) throws ExecutionException { } private synchronized boolean requestWithCommit ( ArrayList < PaloAltoResource . IPaloAltoCommand > commandList ) throws ExecutionException { } public boolean validResponse ( String response ) throws ExecutionException { }

Fix:
String _interfaceName = genPrivateInterfaceName ( Long . parseLong ( vlan ) ) ;