Back to results
US 9,003,366 B2Granted
Detecting plagiarism in computer source code
AssigneeSoftware Analysis and Forensic Engineering Corporation
InventorRobert Marc Zeidman
Life of this patent
Estimating the term…
Abstract
Plagiarism is detected by comparing statements within source code of a first program to comments within source code of a second program.
Claims15
A computer-implemented method comprising:
- creating, by a computer system, a first array of lines of functional program code from a first program source code file, the first program source code file including the lines of functional program code of a first program and lines of non-functional comments of the first program;
- creating, by the computer system, a second array of lines of non-functional comments from a second program source code file, the second program source code file including lines of functional program code of a second program and lines of non-functional comments of the second program, wherein the second array of non-functional comments is created using a predefined list of special characters to determine the beginning and end of comments in the second program source code file;
- calculating, by the computer system, a code-to-comment similarity number based on performing a comparison of the lines of functional program code from the first array with the lines of non-functional comments from the second array to find instances of similarity, wherein calculating the code-to-comment similarity number comprises finding a number of matching functional program code statements in the first array and non-functional comments in the second array indicating that the non-functional comments of the second program source code file contain functional program code of the first program source code file;
- and
- presenting to a user an indication of disguised copying of the first program source code file wherein said indication of disguised copying is defined by the similarity number.
2 more elements
A non-transitory computer-readable storage medium storing executable instructions to cause a computer system to perform a method comprising:
- creating a first array of lines of functional program code from a first program source code file, the first program source code file including the lines of functional program code of a first program and lines of non-functional comments of the first program;
- creating a second array of lines of non-functional comments from a second program source code file, the second program source code file including lines of functional program code of a second program and lines of non-functional comments of the second program, wherein the second array of non-functional comments is created using a predefined list of special characters to determine the beginning and end of comments in the second program source code file;
- calculating a code-to-comment similarity number based on performing a comparison of the lines of functional program code from the first array with the lines of non-functional comments from the second array to find instances of similarity, wherein calculating the code-to-comment similarity number comprises finding a number of matching functional program code statements in the first array and non-functional comments in the second array indicating that the non-functional comments of the second program source code file contain functional program code of the first program source code file;
- and
- presenting to a user an indication of disguised copying of the first program source code file wherein said indication of disguised copying is defined by the similarity number.
2 more elements
A computer-implemented apparatus comprising:
- a computer;
- and
- a source code matching program on the computer, wherein execution of the source code matching program causes the computer to perform a method comprising:
- creating a first array of lines of functional program code from a first program source code file, the first program source code file including the lines of functional program code of a first program and lines of non-functional comments of the first program;
- creating a second array of lines of non-functional comments from a second program source code file, the second program source code file including lines of functional program code of a second program and lines of non-functional comments of the second program, and wherein the second array of non-functional comments is created using a predefined list of special characters to determine the beginning and end of comments in the second program source code file;
- calculating a code-to-comment similarity number based on performing a comparison of the lines of functional program code from the first array with the lines of non-functional comments from the second array to find instances of similarity, wherein calculating the code-to-comment similarity number comprises finding a number of matching functional program code statements in the first array and non-functional comments in the second array indicating that the non-functional comments of the second program source code file contain functional program code of the first program source code file;
- and
- presenting to a user an indication of disguised copying of the first program source code file wherein said indication of disguised copying is defined by the similarity number.
5 more elements
Dependencies are inferred from the claim text.