Buggy code:
public class JMXProtocolPackager implements DeploymentPackager { private static final Logger log = Logger . getLogger ( JMXProtocolPackager . class ) ; private ServiceArchiveHolder archiveHolder ; JMXProtocolPackager ( ServiceArchiveHolder archiveHolder ) { } @ Override public Archive < ? > generateDeployment ( TestDeployment testDeployment , Collection < ProtocolArchiveProcessor > protocolProcessors ) { } private JavaArchive generateArquillianServiceArchive ( Collection < Archive < ? > > auxArchives ) { final JavaArchive archive = ShrinkWrap . create ( JavaArchive . class , "arquillian-service" ) ; JMXProtocolPackager . log . debugf ( "Generating:<seq2seq4repair_space>%s" , archive . getName ( ) ) ; archive . addPackage ( ArquillianService . class . getPackage ( ) ) ; archive . addPackage ( JMXProtocol . class . getPackage ( ) ) ; final Set < String > loadableExtensions = new HashSet < String > ( ) ; final String loadableExtentionsPath = "META-INF//services//" + ( LoadableExtension . class . getName ( ) ) ; for ( Archive < ? > aux : auxArchives ) { Node node = aux . get ( loadableExtentionsPath ) ; if ( node != null ) { BufferedReader br = new BufferedReader ( new InputStreamReader ( node . getAsset ( ) . openStream ( ) ) ) ; try { String line = br . readLine ( ) ; while ( line != null ) { loadableExtensions . add ( line ) ; line = br . readLine ( ) ; } } catch ( IOException ex ) { } } JMXProtocolPackager . log . debugf ( "Merging<seq2seq4repair_space>archive:<seq2seq4repair_space>%s" , aux ) ; archive . merge ( aux ) ; } loadableExtensions . add ( JMXProtocolEndpointExtension . class . getName ( ) ) ; archive . setManifest ( new Asset ( ) { public InputStream openStream ( ) { ManifestBuilder builder = ManifestBuilder . newInstance ( ) ; StringBuffer dependencies = new StringBuffer ( ) ; dependencies . append ( "org.jboss.as.jmx," ) ; dependencies . append ( "org.jboss.as.server," ) ; dependencies . append ( "org.jboss.as.osgi," ) ; dependencies . append ( "org.jboss.jandex," ) ; dependencies . append ( "org.jboss.logging," ) ; dependencies . append ( "org.jboss.modules," ) ; dependencies . append ( "org.jboss.msc," ) ; dependencies . append ( "org.jboss.osgi.framework," ) ; dependencies . append ( "org.osgi.core" ) ; builder . addManifestHeader ( "Dependencies" , dependencies . toString ( ) ) ; return builder . openStream ( ) ; } } ) ; String serviceActivatorPath = "META-INF//services//" + ( ServiceActivator . class . getName ( ) ) ; archive . addAsResource ( ( "arquillian-service//" + serviceActivatorPath ) , serviceActivatorPath ) ; StringBuffer props = new StringBuffer ( ( ( ( ( Constants . BUNDLE_SYMBOLICNAME ) + ":<seq2seq4repair_space>" ) + ( archive . getName ( ) ) ) + "\n" ) ) ; props . append ( ( ( Constants . EXPORT_PACKAGE ) + ":<seq2seq4repair_space>" ) ) ; props . append ( "org.jboss.arquillian.container.test.api,org.jboss.arquillian.junit,org.jboss.arquillian.osgi,org.jboss.arquillian.test.api," ) ; props . append ( "org.jboss.osgi.testing," ) ; props . append ( "org.jboss.shrinkwrap.api,org.jboss.shrinkwrap.api.asset,org.jboss.shrinkwrap.api.spec," ) ; props . append ( "org.junit,org.junit.runner,javax.inject,org.osgi.framework" ) ; archive . add ( new StringAsset ( props . toString ( ) ) , XSERVICE_PROPERTIES_NAME ) ; archive . delete ( ArchivePaths . create ( loadableExtentionsPath ) ) ; archive . addAsResource ( new Asset ( ) { @ Override public InputStream openStream ( ) { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; PrintWriter pw = new PrintWriter ( new OutputStreamWriter ( baos ) ) ; for ( String line : loadableExtensions ) { pw . println ( line ) ; } pw . close ( ) ; return new ByteArrayInputStream ( baos . toByteArray ( ) ) ; } } , loadableExtentionsPath ) ; JMXProtocolPackager . log . debugf ( "Loadable<seq2seq4repair_space>extensions:<seq2seq4repair_space>%s" , loadableExtensions ) ; <START_BUG> JMXProtocolPackager . log . debugf ( "Archive<seq2seq4repair_space>content:<seq2seq4repair_space>%s\n%s" , archive , archive . toString ( true ) ) ; <END_BUG> return archive ; } }

Fix:
JMXProtocolPackager . log . tracef ( "Archive<seq2seq4repair_space>content:<seq2seq4repair_space>%s\n%s" , archive , archive . toString ( true ) ) ;