Detection of mistake patterns