question: SideEffectAnnotation methodSideEffectAnnotation ( Element element , boolean issueErrorIfMoreThanOnePresent ) { if ( element != null ) { List < SideEffectAnnotation > sideEffectAnnotationPresent = new ArrayList < > ( ) ; for ( SideEffectAnnotation sea : SideEffectAnnotation . values ( ) ) { if ( getDeclAnnotationNoAliases ( element , sea . getAnnotationClass ( ) ) != null ) { sideEffectAnnotationPresent . add ( sea ) ; } } int count = sideEffectAnnotationPresent . size ( ) ; if ( count == 0 ) { return defaults . applyUncheckedCodeDefaults ( element ) ? SideEffectAnnotation . MAYRELEASELOCKS : SideEffectAnnotation . RELEASESNOLOCKS ; } if ( count > 1 && issueErrorIfMoreThanOnePresent ) { } SideEffectAnnotation weakest = sideEffectAnnotationPresent . get ( 0 ) ; for ( SideEffectAnnotation sea : sideEffectAnnotationPresent ) { if ( sea . isWeakerThan ( weakest ) ) { weakest = sea ; } } return weakest ; } return SideEffectAnnotation . weakest ( ) ; }
target:  Indicates which side effect annotation is present on the given method. If more than one annotation is present, this method issues an error (if issueErrorIfMoreThanOnePresent is true) and returns the annotation providing the weakest guarantee. Only call with issueErrorIfMoreThanOnePresent == true when visiting a method definition. This prevents multiple errors being issued for the same method (as would occur if issueErrorIfMoreThanOnePresent were set to true when visiting method invocations). If no annotation is present, return RELEASESNOLOCKS as the default, and MAYRELEASELOCKS as the default for unchecked code.