Applying Symbolic Execution to Semantic Code Clone Detection (S)

Kazusa Takemoto, Shingo Takada · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering · 2023

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.

Read the paper · More papers on PaperTik