TY - JOUR
T1 - Applying Symbolic Execution to Semantic Code Clone Detection
AU - Takemoto, Kazusa
AU - Takada, Shingo
N1 - Publisher Copyright:
© 2023 Knowledge Systems Institute Graduate School. All rights reserved.
PY - 2023
Y1 - 2023
N2 - Many approaches have been proposed to detect code clones, which are basically similar code fragments. Most approaches are based on textual similarity. These approaches cannot detect semantic code clones, which are clones that have the same functionality but implemented with different syntax. Two functions can be considered to have the same functionality, when the output is the same given the same input. In order to appropriately generate inputs, we propose applying symbolic execution to semantic code clone detection. These functions are executed to obtain outputs, which are compared to determine if function pairs are clones. Our approach also does not limit output to return values; we also handle arrays and pointers as output, as the execution of the function may cause changes in their values. Furthermore, we classify types to enable cases where the types of inputs and/or outputs are not exactly the same. We evaluate our approach on SemanticCloneBench.
AB - Many approaches have been proposed to detect code clones, which are basically similar code fragments. Most approaches are based on textual similarity. These approaches cannot detect semantic code clones, which are clones that have the same functionality but implemented with different syntax. Two functions can be considered to have the same functionality, when the output is the same given the same input. In order to appropriately generate inputs, we propose applying symbolic execution to semantic code clone detection. These functions are executed to obtain outputs, which are compared to determine if function pairs are clones. Our approach also does not limit output to return values; we also handle arrays and pointers as output, as the execution of the function may cause changes in their values. Furthermore, we classify types to enable cases where the types of inputs and/or outputs are not exactly the same. We evaluate our approach on SemanticCloneBench.
UR - http://www.scopus.com/inward/record.url?scp=85170089122&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85170089122&partnerID=8YFLogxK
U2 - 10.18293/SEKE23-070
DO - 10.18293/SEKE23-070
M3 - Conference article
AN - SCOPUS:85170089122
SN - 2325-9000
VL - 2023-July
SP - 118
EP - 122
JO - Proceedings of the International Conference on Software Engineering and Knowledge Engineering, SEKE
JF - Proceedings of the International Conference on Software Engineering and Knowledge Engineering, SEKE
T2 - 35th International Conference on Software Engineering and Knowledge Engineering, SEKE 2023
Y2 - 1 July 2023 through 10 July 2023
ER -