Java implementation of motif detection algorithm w.r.t time series data