# Review of Code Similarity and Plagiarism Detection Research Studies
## 4 Research and Tools Related to Plagiarism Detection
### Definition of Plagiarism
Considering the types of code clones described in Section 2, we can estimate whattypes of original and copied codes will appear when such obfuscation is applied, and what techniques should be used to detect them. Table 4 is an extract of obfuscation methods reported in various plagiarism-related studies and organized by [PERSON] et al. [6] into a table, presented with the corresponding code clone types. The \"**\" mark on a code clone type indicates that only some of the codes changed by the proposed obfuscation method are applicable or that an additional appropriate preprocessing/transformation process is required for detection. There are a total of 15 obfuscation methods outlined in Table 4. If a detection technique appropriate for type III code clones is used, similar codes can be expected to be detected, even in cases wherein 13 of the obfuscation methods, i.e., excluding two cases, are applied. Therefore, from a technical perspective, even if a certain level of obfuscation is applied, it is not very difficult to identify suspicious codes using code similarity detection techniques. Cases that are difficult to find using general code similarity detection techniques include \"replace function calls with code\" and \"combine copied code with original code\". \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Research** & **Obfuscation Method** & **Details** & **Clone Type** \\ \hline \multirow{6}{*}{[PERSON] and [PERSON] [65]} & Code format change & Changing the code style, such as spaces & Type I \\ \cline{2-4}  & Annotation change & Changing annotation within code & Type I \\ \cline{2-4}  & \multirow{2}{*}{Merge lines of code} & Merging of multiple unit and type codes into one & Type I \({}^{\star}\) \\ \cline{2-4}  & Change to equivalent & Changing the control type, such as changing for to while & Type III \({}^{\star}\), IV \\ \hline \multirow{2}{*}{[PERSON] [66]} & \multirow{2}{*}{Translation of parts of the program} & Translating variable names or comments from one language to another & Type I \({}^{\star}\), Type II \\ \hline \multirow{6}{*}{[PERSON] et al. [67]} & Change program output & Changing only the lines of code that indicate something & Type III \({}^{\star}\), IV \({}^{\star}\) \\ \cline{2-4}  & Identifier change & Changing identifiers such as variable names and function names to others & Type II \\ \cline{2-4}  & Change order of independent lines & Changing the order of the lines without affecting the logic & Type III \({}^{\star}\), Reordering \\ \cline{2-4}  & Disconnect the code & Splitting a unit of code, e.g., a line, function, class, etc., into multiple pieces. & Type I \({}^{\star}\), II \({}^{\star}\), III \({}^{\star}\) \\ \hline \multirow{2}{*}{[PERSON] et al. [20]} & \multirow{2}{*}{Change of constant value} & Changing constant values that do not affect logic & Type II \({}^{\star}\) \\ \hline \multirow{6}{*}{[PERSON] et al. [68]} & Add unnecessary lines & Adding a line that has no meaning to the execution & Type III \\ \cline{2-4}  & Code simplification & Eliminating unnecessary or non-critical lines & Type III \\ \hline \multirow{6}{*}{Whale [69]} & \multirow{2}{*}{Replace function calls with code} & Inserting code corresponding to the body of a function instead of calling it & Type IV \\ \cline{2-4}  & \multirow{2}{*}{Operators, accessors, and data type changes} & Changing operators to equivalent or acceptable forms, modifiers, data types, e.g., int to long & Type II \({}^{\star}\), III \({}^{\star}\) \\ \cline{2-4}  & \multirow{2}{*}{Combine copied code with own} & Changing the syntax structure and logic by combining the copied code with own code & N/A \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Obfuscation methods and corresponding code clone types. In the case of replacing function calls with code, directly inserting the contents of a function into the code, instead of calling the function, may not be detected in code similarity detection, because the scale of code change with respect to the original can be very large, depending on the size of the function.