long function ( String arg0 , int arg1 ) { long loc0 = 0 ; for ( int loc1 = 0 ; loc1 < arg1 ; loc1 ++ ) { loc0 = ( R * loc0 + arg0 . charAt ( loc1 ) ) % Q ; } return loc0 ; }
calculate hash from k 0...m-1 . concode_field_sep long Q concode_elem_sep int R concode_elem_sep long patternHash concode_elem_sep int patternLength concode_elem_sep String pattern concode_elem_sep long RM concode_field_sep int search concode_elem_sep long randomPrime concode_elem_sep void main concode_elem_sep boolean check