fragment code fragment java implementation of the bm pattern matching algorithm the algorithm is expressed by two static methodsmethod bmmatch performs the matching and calls the auxiliary method build lastfunction to compute the last functionexpressed by an array indexed by the ascii code of the character method bmmatch indicates the absence of match by returning the conventional value