question: returns the index of the first waiting writer . concode_field_sep int WRITER concode_elem_sep Thread t concode_elem_sep ArrayList waiters concode_elem_sep int nAcquires concode_elem_sep int state concode_elem_sep int READER concode_field_sep void unlock concode_elem_sep void lockWrite concode_elem_sep int getIndex concode_elem_sep void lockRead
target: int function ( ) { final Iterator loc0 = this . waiters . iterator ( ) ; int loc1 = 0 ; while ( loc0 . hasNext ( ) ) { final ReaderWriterNode loc2 = ( ReaderWriterNode ) loc0 . next ( ) ; if ( loc2 . state == ReaderWriterNode . WRITER ) { return loc1 ; } loc1 += 1 ; } return Integer . MAX_VALUE ; }