Buggy code:
@ RunWith ( Arquillian . class ) public class Hibernate3EmbeddedProviderNullDataSourceTestCase { @ ArquillianResource private ManagementClient managementClient ; private static final String ARCHIVE_NAME = "Hibernate3EmbeddedProviderNullDataSourceTestCase" ; private static final String persistence_xml = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><seq2seq4repair_space>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<persistence<seq2seq4repair_space>xmlns=\"http:////java.sun.com//xml//ns//persistence\"<seq2seq4repair_space>version=\"1.0\">" + "<seq2seq4repair_space><persistence-unit<seq2seq4repair_space>name=\"hibernate3_pc\">" ) + "<seq2seq4repair_space><description>Persistence<seq2seq4repair_space>Unit." ) + "<seq2seq4repair_space><//description>" ) + "<properties><seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.hbm2ddl.auto\"<seq2seq4repair_space>value=\"create-drop\"//>" ) + "<property<seq2seq4repair_space>name=\"hibernate.show_sql\"<seq2seq4repair_space>value=\"true\"//>" ) + "<property<seq2seq4repair_space>name=\"jboss.as.jpa.providerModule\"<seq2seq4repair_space>value=\"hibernate3-bundled\"//>" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.dialect\"<seq2seq4repair_space>value=\"org.hibernate.dialect.H2Dialect\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.driver_class\"<seq2seq4repair_space>value=\"org.h2.Driver\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.url\"<seq2seq4repair_space>value=\"jdbc:h2:mem\"<seq2seq4repair_space>//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.username\"<seq2seq4repair_space>value=\"sa\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.password\"<seq2seq4repair_space>value=\"sa\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.autocommit\"<seq2seq4repair_space>value=\"false\"<seq2seq4repair_space>//>" ) + "<//properties>" ) + "<seq2seq4repair_space><//persistence-unit>" ) + "<//persistence>" ) ; private static final String web_persistence_xml = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><seq2seq4repair_space>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<persistence<seq2seq4repair_space>xmlns=\"http:////java.sun.com//xml//ns//persistence\"<seq2seq4repair_space>version=\"1.0\">" + "<seq2seq4repair_space><persistence-unit<seq2seq4repair_space>name=\"web_hibernate3_pc\">" ) + "<seq2seq4repair_space><description>Persistence<seq2seq4repair_space>Unit." ) + "<seq2seq4repair_space><//description>" ) + "<properties><seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.hbm2ddl.auto\"<seq2seq4repair_space>value=\"create-drop\"//>" ) + "<property<seq2seq4repair_space>name=\"hibernate.show_sql\"<seq2seq4repair_space>value=\"true\"//>" ) + "<property<seq2seq4repair_space>name=\"jboss.as.jpa.providerModule\"<seq2seq4repair_space>value=\"hibernate3-bundled\"//>" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.dialect\"<seq2seq4repair_space>value=\"org.hibernate.dialect.H2Dialect\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.driver_class\"<seq2seq4repair_space>value=\"org.h2.Driver\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.url\"<seq2seq4repair_space>value=\"jdbc:h2:mem\"<seq2seq4repair_space>//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.username\"<seq2seq4repair_space>value=\"sa\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.password\"<seq2seq4repair_space>value=\"sa\"//>\n" ) + "<seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.connection.autocommit\"<seq2seq4repair_space>value=\"false\"<seq2seq4repair_space>//>" ) + "<//properties>" ) + "<seq2seq4repair_space><//persistence-unit>" ) + "<//persistence>" ) ; private static void addHibernate3JarsToEar ( EnterpriseArchive ear ) { } @ Deployment public static Archive < ? > deploy ( ) throws Exception { } @ ArquillianResource private InitialContext iniCtx ; protected < T > T lookup ( String beanName , Class < T > interfaceType ) throws NamingException { } private void dumpJndi ( String s ) { } private void dumpTreeEntry ( NamingEnumeration < NameClassPair > list , String s ) throws NamingException { } @ Test public void testSimpleCreateAndLoadEntities ( ) throws Exception { } private String performCall ( String urlPattern , String param ) throws Exception { <START_BUG> return HttpRequest . get ( ( ( ( ( ( ( ( "http:////" + ( managementClient . getMgmtAddress ( ) ) ) + ":8080//" ) + ( Hibernate3EmbeddedProviderNullDataSourceTestCase . ARCHIVE_NAME ) ) + "//" ) + urlPattern ) + "?input=" ) + param ) , 100 , TimeUnit . SECONDS ) ; <END_BUG> } @ Test public void testServletSubDeploymentRead ( ) throws Exception { } }

Fix:
return HttpRequest . get ( ( ( ( ( ( ( ( managementClient . getWebUri ( ) ) + "//" ) + ( Hibernate3EmbeddedProviderNullDataSourceTestCase . ARCHIVE_NAME ) ) + "//" ) + urlPattern ) + "?input=" ) + param ) , 100 , TimeUnit . SECONDS ) ;