check if word is not banned
if ( banned . get ( s ) == null ) { result . set ( s , result . get ( s ) == null ? 1 : result . get ( s ) + 1 ) ; if ( result . get ( s ) > freq || ( result . get ( s ) == freq && s < ( ans ) ) ) { ans = s ; freq = result . get ( s ) ; } } }