question: private static int [ ] WindowsRegQueryInfoKey1 ( int hKey ) { int [ ] result = WindowsRegQueryInfoKey ( hKey ) ; if ( result [ ERROR_CODE ] == ERROR_SUCCESS ) { return result ; } else { long sleepTime = INIT_SLEEP_TIME ; for ( int i = 0 ; i < MAX_ATTEMPTS ; i ++ ) { try { Thread . sleep ( sleepTime ) ; } catch ( InterruptedException e ) { return result ; } sleepTime *= 2 ; result = WindowsRegQueryInfoKey ( hKey ) ; if ( result [ ERROR_CODE ] == ERROR_SUCCESS ) { return result ; } } } return result ; }
target:  Retries RegQueryInfoKey() MAX_ATTEMPTS times before giving up.