Buggy code:
public class PlatformMBeanResourceUnitTestCase { private static ServiceContainer container ; private static ModelController controller ; private static ModelControllerClient client ; @ BeforeClass public static void setupController ( ) throws InterruptedException { } @ AfterClass public static void shutdownServiceContainer ( ) { } @ Test public void testRootResource ( ) throws IOException { } @ Test public void testBufferPoolMXBean ( ) throws IOException { } @ Test public void testClassLoadingMXBean ( ) throws IOException { } @ Test public void testCompilationMXBean ( ) throws IOException { } @ Test public void testGarbageCollectorMXBean ( ) throws IOException { } @ Test public void testMemoryMXBean ( ) throws IOException { } @ Test public void testMemoryManagerMXBean ( ) throws IOException { } @ Test public void testMemoryPoolMXBean ( ) throws IOException { } @ Test public void testOperatingSystemMXBean ( ) throws IOException { } @ Ignore ( "[AS7-2185]" ) @ Test public void testPlatformLoggingMXBean ( ) throws IOException { } @ Test public void testRuntimeMXBean ( ) throws IOException { } @ Test public void testThreadingMXBean ( ) throws IOException { PlatformMBeanResourceUnitTestCase . DescribedResource describedResource = basicResourceTest ( "threading" , null ) ; ThreadMXBean mbean = ManagementFactory . getThreadMXBean ( ) ; boolean syncSupported = describedResource . resource . get ( SYNCHRONIZER_USAGE_SUPPORTED ) . asBoolean ( ) ; Assert . assertEquals ( mbean . isSynchronizerUsageSupported ( ) , syncSupported ) ; boolean monitorSupported = describedResource . resource . get ( OBJECT_MONITOR_USAGE_SUPPORTED ) . asBoolean ( ) ; Assert . assertEquals ( mbean . isObjectMonitorUsageSupported ( ) , monitorSupported ) ; boolean threadContentionSupported = describedResource . resource . get ( THREAD_CONTENTION_MONITORING_SUPPORTED ) . asBoolean ( ) ; Assert . assertEquals ( mbean . isThreadContentionMonitoringSupported ( ) , threadContentionSupported ) ; boolean threadContentionEnabled = describedResource . resource . get ( THREAD_CONTENTION_MONITORING_ENABLED ) . asBoolean ( ) ; Assert . assertEquals ( mbean . isThreadContentionMonitoringEnabled ( ) , threadContentionEnabled ) ; boolean threadCPUSupported = describedResource . resource . get ( THREAD_CPU_TIME_SUPPORTED ) . asBoolean ( ) ; Assert . assertEquals ( mbean . isThreadCpuTimeSupported ( ) , threadCPUSupported ) ; boolean currentThreadPUSupported = describedResource . resource . get ( CURRENT_THREAD_CPU_TIME_SUPPORTED ) . asBoolean ( ) ; Assert . assertEquals ( mbean . isCurrentThreadCpuTimeSupported ( ) , currentThreadPUSupported ) ; <START_BUG> boolean threadCPUEnabled = describedResource . resource . get ( THREAD_CPU_TIME_ENABLED ) . asBoolean ( ) ; <END_BUG> if ( threadCPUSupported || currentThreadPUSupported ) { threadCPUEnabled = describedResource . resource . get ( THREAD_CPU_TIME_ENABLED ) . asBoolean ( ) ; Assert . assertEquals ( mbean . isThreadCpuTimeSupported ( ) , threadCPUEnabled ) ; } ModelNode op = PlatformMBeanResourceUnitTestCase . getOperation ( "reset-peak-thread-count" , "threading" , null ) ; Assert . assertFalse ( executeOp ( op , false ) . isDefined ( ) ) ; op = PlatformMBeanResourceUnitTestCase . getOperation ( "find-deadlocked-threads" , "threading" , null ) ; ModelNode result = executeOp ( op , ( ! syncSupported ) ) ; if ( syncSupported && ( result . isDefined ( ) ) ) { Assert . assertEquals ( LIST , result . getType ( ) ) ; } op = PlatformMBeanResourceUnitTestCase . getOperation ( "find-monitor-deadlocked-threads" , "threading" , null ) ; result = executeOp ( op , ( ! monitorSupported ) ) ; if ( monitorSupported && ( result . isDefined ( ) ) ) { Assert . assertEquals ( LIST , result . getType ( ) ) ; } op = PlatformMBeanResourceUnitTestCase . getOperation ( "dump-all-threads" , "threading" , null ) ; op . get ( "locked-monitors" ) . set ( false ) ; op . get ( "locked-synchronizers" ) . set ( false ) ; result = executeOp ( op , false ) ; Assert . assertEquals ( LIST , result . getType ( ) ) ; long mainThreadId = findMainThread ( result ) ; op = PlatformMBeanResourceUnitTestCase . getOperation ( "dump-all-threads" , "threading" , null ) ; op . get ( "locked-monitors" ) . set ( true ) ; op . get ( "locked-synchronizers" ) . set ( false ) ; result = executeOp ( op , ( ! monitorSupported ) ) ; if ( monitorSupported ) { Assert . assertEquals ( LIST , result . getType ( ) ) ; } op = PlatformMBeanResourceUnitTestCase . getOperation ( "dump-all-threads" , "threading" , null ) ; op . get ( "locked-monitors" ) . set ( false ) ; op . get ( "locked-synchronizers" ) . set ( true ) ; result = executeOp ( op , ( ! syncSupported ) ) ; if ( syncSupported ) { Assert . assertEquals ( LIST , result . getType ( ) ) ; } op = PlatformMBeanResourceUnitTestCase . getOperation ( "dump-all-threads" , "threading" , null ) ; op . get ( "locked-monitors" ) . set ( true ) ; op . get ( "locked-synchronizers" ) . set ( true ) ; boolean canDump = syncSupported && monitorSupported ; result = executeOp ( op , ( ! canDump ) ) ; if ( canDump ) { Assert . assertEquals ( LIST , result . getType ( ) ) ; } op = PlatformMBeanResourceUnitTestCase . getOperation ( "get-thread-info" , "threading" , null ) ; op . get ( "id" ) . set ( mainThreadId ) ; result = executeOp ( op , false ) ; Assert . assertTrue ( result . isDefined ( ) ) ; Assert . assertEquals ( "main" , result . get ( "thread-name" ) . asString ( ) ) ; Assert . assertEquals ( mainThreadId , result . get ( "thread-id" ) . asLong ( ) ) ; List < ModelNode > list = result . get ( "stack-trace" ) . asList ( ) ; Assert . assertEquals ( 0 , list . size ( ) ) ; op = PlatformMBeanResourceUnitTestCase . getOperation ( "get-thread-info" , "threading" , null ) ; op . get ( "id" ) . set ( mainThreadId ) ; op . get ( "max-depth" ) . set ( 2 ) ; result = executeOp ( op , false ) ;

Fix:
boolean threadCPUEnabled = false ;