Buggy code:
public class DomainTestUtils { private static final int DEFAULT_TIMEOUT = 60 ; private DomainTestUtils ( ) { } public static ModelNode getHostAddress ( final String hostName ) { } public static ModelNode getRunningServerAddress ( final String hostName , final String serverName ) { } public static ModelNode getServerConfigAddress ( final String hostName , final String serverName ) { } public static ModelNode createCompositeOperation ( ModelNode ... steps ) { } public static List < ModelNode > executeStepsForResult ( final ModelControllerClient client , final ModelNode ... steps ) throws IOException , MgmtOperationException { } public static ModelNode executeForResult ( final ModelNode op , final ModelControllerClient modelControllerClient ) throws IOException , MgmtOperationException { } public static ModelNode executeForFailure ( final ModelNode op , final ModelControllerClient modelControllerClient ) throws IOException , MgmtOperationException { } public static void waitUntilState ( final ModelControllerClient client , final String hostName , final String serverName , final String state ) throws IOException { } public static void waitUntilState ( final ModelControllerClient client , final ModelNode serverAddress , final String state ) throws IOException { } public static boolean exists ( ModelNode address , ModelControllerClient client ) throws IOException , MgmtOperationException { } public static boolean exists ( PathAddress address , ModelControllerClient client ) throws IOException , MgmtOperationException { final PathElement element = address . getLastElement ( ) ; final PathAddress subAddress = address . subAddress ( 0 , ( ( address . size ( ) ) - 1 ) ) ; final boolean checkType = element . isWildcard ( ) ; final ModelNode e ; final ModelNode operation ; if ( checkType ) { e = new ModelNode ( ) . set ( element . getKey ( ) ) ; operation = DomainTestUtils . createOperation ( READ_CHILDREN_TYPES_OPERATION , subAddress ) ; } else { e = new ModelNode ( ) . set ( element . getValue ( ) ) ; operation = DomainTestUtils . createOperation ( READ_CHILDREN_NAMES_OPERATION , subAddress ) ; operation . get ( CHILD_TYPE ) . set ( element . getKey ( ) ) ; } try { final ModelNode result = DomainTestUtils . executeForResult ( operation , client ) ; return result . asList ( ) . contains ( e ) ; } catch ( MgmtOperationException ex ) { if ( ! checkType ) { final String failureDescription = ex . getResult ( ) . get ( FAILURE_DESCRIPTION ) . asString ( ) ; <START_BUG> if ( ( failureDescription . contains ( "WFLYCTL0202" ) ) && ( failureDescription . contains ( element . getKey ( ) ) ) ) { <END_BUG> return false ; } } throw ex ; } } public static String startServer ( final ModelControllerClient connection , final String host , final String server ) throws IOException , MgmtOperationException { } public static String startServer ( final ModelControllerClient connection , final String host , final String server , final boolean blocking ) throws IOException , MgmtOperationException { } public static void waitUntilState ( final ModelControllerClient client , final ModelNode serverAddress , final String required , final long timeout , final TimeUnit unit ) throws IOException { } public static String getServerState ( final ModelControllerClient client , final ModelNode serverAddress ) throws IOException { } public static boolean checkState ( final ModelControllerClient client , final ModelNode serverAddress , final String state ) throws IOException { } public static ModelNode createOperation ( String op , ModelNode address ) { } public static ModelNode createOperation ( String op , PathAddress address ) { } }

Fix:
if ( ( failureDescription . contains ( "JBAS014793" ) ) && ( failureDescription . contains ( element . getKey ( ) ) ) ) {