added function to search method with class name and line numbers