CodeGrade has plagiarism detection built in which is developed especially to analyse code. Plagiarism checks are done between the submission of the assignment, optionally against previous assignments or uploaded codebases. It is thus recommended to do a plagiarism check after the deadline of the assignment, when all students have handed in.