Buggy code:
public class CloudNetworkStepDefinitions { @ When ( "^I<seq2seq4repair_space>add<seq2seq4repair_space>the<seq2seq4repair_space>network<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>and<seq2seq4repair_space>CIDR<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>and<seq2seq4repair_space>IP<seq2seq4repair_space>version<seq2seq4repair_space>(\\d+)<seq2seq4repair_space>and<seq2seq4repair_space>gateway<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>cloud<seq2seq4repair_space>\"([^\"]*)\"$" ) public void I_add_the_network_with_name_and_CIDR_and_IP_version_and_gateway_to_the_cloud ( String name , String cidr , int ipVersion , String gateWay , String cloudName ) throws Throwable { } @ And ( "^The<seq2seq4repair_space>cloud<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>(\\d+)<seq2seq4repair_space>networks<seq2seq4repair_space>as<seq2seq4repair_space>resources:$" ) public void The_cloud_with_name_should_have_networks_as_resources ( String cloudName , int numberOfNetworks , DataTable expectedNetworksTable ) throws Throwable { } public static void assertNetworks ( int numberOfNetworks , Set < NetworkTemplate > networks , DataTable expectedNetworksTable ) { } @ When ( "^I<seq2seq4repair_space>remove<seq2seq4repair_space>the<seq2seq4repair_space>network<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>cloud<seq2seq4repair_space>\"([^\"]*)\"$" ) public void I_remove_the_network_with_name_from_the_cloud ( String networkName , String cloudName ) throws Throwable { } @ Then ( "^The<seq2seq4repair_space>cloud<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>any<seq2seq4repair_space>network<seq2seq4repair_space>as<seq2seq4repair_space>resources$" ) public void The_cloud_with_name_should_not_have_any_network_as_resources ( String cloudName ) throws Throwable { } @ When ( "^I<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>network<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>cloud<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>PaaS<seq2seq4repair_space>resource<seq2seq4repair_space>\"([^\"]*)\"$" ) public void I_match_the_network_with_name_of_the_cloud_to_the_PaaS_resource ( String networkName , String cloudName , String paaSResourceId ) throws Throwable { String cloudId = Context . getInstance ( ) . getCloudId ( cloudName ) ; <START_BUG> Context . getInstance ( ) . registerRestResponse ( Context . getRestClientInstance ( ) . postUrlEncoded ( ( ( ( ( "//rest//clouds//" + cloudId ) + "//networks//" ) + networkName ) + "//resource" ) , Lists . < NameValuePair > newArrayList ( new BasicNameValuePair ( "resourceId" , paaSResourceId ) ) ) ) ; <END_BUG> } @ And ( "^The<seq2seq4repair_space>cloud<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>network<seq2seq4repair_space>mapping<seq2seq4repair_space>configuration<seq2seq4repair_space>as<seq2seq4repair_space>below:$" ) public void The_cloud_should_have_network_mapping_configuration_as_below ( String cloudName , DataTable expectedMappings ) throws Throwable { } @ When ( "^I<seq2seq4repair_space>delete<seq2seq4repair_space>the<seq2seq4repair_space>mapping<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>network<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>cloud<seq2seq4repair_space>\"([^\"]*)\"$" ) public void I_delete_the_mapping_for_the_network_of_the_cloud ( String networkName , String cloudName ) throws Throwable { } @ Then ( "^The<seq2seq4repair_space>cloud<seq2seq4repair_space>\"([^\"]*)\"<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>empty<seq2seq4repair_space>network<seq2seq4repair_space>mapping<seq2seq4repair_space>configuration$" ) public void The_cloud_should_have_empty_network_mapping_configuration ( String cloudName ) throws Throwable { } }

Fix:
Context . getInstance ( ) . registerRestResponse ( Context . getRestClientInstance ( ) . postUrlEncoded ( ( ( ( ( "//rest//clouds//" + cloudId ) + "//networks//" ) + networkName ) + "//resource" ) , Lists . < NameValuePair > newArrayList ( new BasicNameValuePair ( "pasSResourceId" , paaSResourceId ) ) ) ) ;