Buggy code:
private "//applications" ; private static final String ENDPOINT_LIST_NETWORK_PARTITIONS = ( RestCommandLineService . API_CONTEXT ) + "//networkPartitions" ; private static final String ENDPOINT_LIST_CARTRIDGES_BY_FILTER = ( RestCommandLineService . API_CONTEXT ) + "//cartridges//filter//{filter}" ; private static final String ENDPOINT_LIST_TENANTS_BY_PARTIAL_DOMAIN = ( RestCommandLineService . API_CONTEXT ) + "//tenants//search//{tenantDomain}" ; private static final String ENDPOINT_DOMAIN_MAPPINGS = ( RestCommandLineService . API_CONTEXT ) + "//applications//{applicationId}//domainMappings" ; private static final String ENDPOINT_GET_APPLICATION = ( RestCommandLineService . API_CONTEXT ) + "//applications//{appId}" ; private static final String ENDPOINT_GET_AUTOSCALING_POLICY = ( RestCommandLineService . API_CONTEXT ) + "//autoscalingPolicies//{id}" ; private static final String ENDPOINT_GET_DEPLOYMENT_POLICY = ( RestCommandLineService . API_CONTEXT ) + "//deploymentPolicies//{deploymentPolicyId}" ; private static final String ENDPOINT_GET_CARTRIDGE = ( RestCommandLineService . API_CONTEXT ) + "//cartridges//{cartridgeType}" ; private static final String ENDPOINT_GET_CARTRIDGE_OF_TENANT = ( RestCommandLineService . API_CONTEXT ) + "//subscriptions//{id}//cartridges" ; private static final String ENDPOINT_GET_KUBERNETES_GROUP = ( RestCommandLineService . API_CONTEXT ) + "//kubernetesCluster//{kubernetesClusterId}" ; private static final String ENDPOINT_GET_KUBERNETES_MASTER = ( RestCommandLineService . API_CONTEXT ) + "//kubernetesClusters//{kubernetesClusterId}//master" ; private static final String ENDPOINT_GET_KUBERNETES_HOST_CLUSTER = ( RestCommandLineService . API_CONTEXT ) + "//kubernetesClusters//{kubernetesClusterId}" ; private static final String ENDPOINT_GET_NETWORK_PARTITION = ( RestCommandLineService . API_CONTEXT ) + "//networkPartitions//{networkPartitionId}" ; private static final String ENDPOINT_GET_APPLICATION_RUNTIME = ( RestCommandLineService . API_CONTEXT ) + "//applications//{applicationId}//runtime" ; private static final String ENDPOINT_UPDATE_KUBERNETES_MASTER = ( RestCommandLineService . API_CONTEXT ) + "//kubernetesClusters//{kubernetesClusterId}//master" ; private static final String ENDPOINT_UPDATE_KUBERNETES_HOST = ( RestCommandLineService . API_CONTEXT ) + "//kubernetesClusters//{kubernetesClusterId}//minion//{minionId}" ; private static final String ENDPOINT_SYNCHRONIZE_ARTIFACTS = ( RestCommandLineService . API_CONTEXT ) + "//repo//synchronize//{subscriptionAlias}" ; private static final String ENDPOINT_ACTIVATE_TENANT = ( RestCommandLineService . API_CONTEXT ) + "//tenants//activate//{tenantDomain}" ; private static final String ENDPOINT_DEACTIVATE_TENANT = ( RestCommandLineService . API_CONTEXT ) + "//tenants//deactivate//{tenantDomain}" ; private static final String ENDPOINT_APPLICATION_SIGNUP = ( RestCommandLineService . API_CONTEXT ) + "//applications//{applicationId}//signup" ; private static final String ENDPOINT_UPDATE_DEPLOYMENT_POLICY = ( RestCommandLineService . API_CONTEXT ) + "//deploymentPolicies" ; private static final String ENDPOINT_UPDATE_AUTOSCALING_POLICY = ( RestCommandLineService . API_CONTEXT ) + "//autoscalingPolicies" ; private static final String ENDPOINT_UPDATE_USER = ( RestCommandLineService . API_CONTEXT ) + "//users" ; private static final String ENDPOINT_UPDATE_TENANT = ( RestCommandLineService . API_CONTEXT ) + "//tenants" ; private static class SingletonHolder { private static final RestCommandLineService INSTANCE = new RestCommandLineService ( ) ; } public static RestCommandLineService getInstance ( ) { } public Gson getGson ( ) { } public boolean login ( String serverURL , String username , String password , boolean validateLogin ) throws Exception { } private void initializeRestClient ( String serverURL , String username , String password ) throws AxisFault { } public void listCartridges ( ) throws CommandException { } public void listCartridgesByFilter ( String filter ) throws CommandException { } public void listCartridgeGroups ( ) throws CommandException { } public void describeCartridge ( final String cartridgeType ) throws CommandException { } private ClusterBean getClusterObjectFromString ( String resultString ) { } public void addTenant ( String admin , String firstName , String lastName , String password , String domain , String email ) throws CommandException { } public void describeTenant ( final String domainName ) throws CommandException { } public void listTenantsByPartialDomain ( String partialDomain ) throws CommandException { } public void updateTenant ( int id , String admin , String firstName , String lastName , String password , String domain , String email ) throws CommandException { } public void addUser ( String userName , String credential , String role , String firstName , String lastName , String email , String profileName ) throws CommandException { } public void updateUser ( String userName , String credential , String role , String firstName , String lastName , String email , String profileName ) throws CommandException { } public void deleteTenant ( String tenantDomain ) throws CommandException { } public void deleteUser ( String userName ) throws CommandException { } public void deactivateTenant ( String tenantDomain ) throws CommandException { } public void activateTenant ( String tenantDomain ) throws CommandException { } public void listTenants ( ) throws CommandException { } public void listAllUsers ( ) throws CommandException { } public void addCartridge ( String cartridgeDefinition ) throws CommandException { } public void updateCartridge ( String cartridgeDefinition ) throws CommandException { } public void undeployCartrigdeDefinition ( String id ) throws CommandException { } public void addAutoscalingPolicy ( String autoScalingPolicy ) throws CommandException { } public void updateAutoscalingPolicy ( String autoScalingPolicy ) throws CommandException { } public void listApplications ( ) throws CommandException { } public void listAutoscalingPolicies ( ) throws CommandException { } public void describeDeploymentPolicy ( String deploymentPolicyId ) throws CommandException { } public void describeAutoScalingPolicy ( String id ) throws CommandException { } public void addKubernetesCluster ( String entityBody ) { } public void listKubernetesClusters ( ) { } public void undeployKubernetesCluster ( String clusterId ) { } public void addKubernetesHost ( String entityBody , String clusterId ) throws CommandException { } public void listKubernetesHosts ( String clusterId ) { } private String emptyStringIfNullOrEmpty ( String value ) { } public void getKubernetesMaster ( final String clusterId ) throws CommandException { } public void describeKubernetesCluster ( final String clusterId ) throws CommandException { } public void addDomainMappings ( String applicationId , String resourceFileContent ) { } public void listDomainMappings ( String applicationId ) { } public void removeDomainMappings ( String applicationId ) { } public void undeployKubernetesHost ( String clusterId , String hostId ) { } public void updateKubernetesMaster ( String entityBody , String clusterId ) { } public void updateKubernetesHost ( String entityBody , String clusterId , String hostId ) { } public void synchronizeArtifacts ( String cartridgeAlias ) throws CommandException { } public void addCartridgeGroup ( String entityBody ) { } public void undeployServiceGroup ( String groupDefinitionName ) throws CommandException { } public void describeServiceGroup ( String groupDefinitionName ) { } public void addApplication ( String entityBody ) { } public void deployApplication ( String applicationId , String entityBody ) { } public void undeployApplication ( String applicationId ) throws CommandException { } public void deleteApplication ( String applicationId ) { } public void deleteAutoSclaingPolicy ( String policyId ) { } public void describeApplication ( String applicationID ) { } public void describeApplicationRuntime ( String applicationID ) { } public void addApplicationSignup ( String entityBody , String applicationId ) { } public void describeApplicationSignup ( String applicationId ) { } public void deleteApplicationSignup ( String applicationId ) { } private void handleException ( String key , Exception e , Object ... args ) throws CommandException { } private void printError ( String message , Throwable e ) { } public void addNetworkPartition ( String networkPartitionDefinition ) throws CommandException { } public void removeNetworkPartition ( String id ) { <START_BUG> restClient . deleteEntity ( RestCommandLineService . ENDPOINT_REMOVE_NETWORK_PARTITION . replace ( "{networkPartitionId}" , id ) , id , "network-partition" ) ; <END_BUG>

Fix:
restClient . deleteEntity ( RestCommandLineService . ENDPOINT_REMOVE_NETWORK_PARTITION . replace ( "{id}" , id ) , id , "network-partition" ) ;