In order to detect a large number of source program samples which are homologous files (files with plagiarism), a new graph-based cluster detection algorithm is proposed,the algorithm is divided into two phases, in the first phase, proposed algorithm based on the keyword program to calculate pairwise similarity in the detected sample program files,in the second stage,by means of graph clustering algorithm, the results of the first phase is dectected, homologous files (files with plagiarism) will form a cluster. The simulation results shows that the algorithm improved detection rate compare with the traditional homologous files detection algorithm and can determine which files are homologous.