Research Article

A Novel Vulnerable Code Clone Detector Based on Context Enhancement and Patch Validation

Table 2

Examples of vulnerable line-level code fingerprints.

TypePreprocessed vulnerable codeVulnerable line-level code fingerprint

Vulnerable code segmentsFPARAM+=8;
FUNCCALL((FPARAM, "\n\t"));
FPARAM=(const struct FPARAM)LVAR;
FPARAM=FPARAM;
LVAR=FPARAM->FPARAM;
FUNCCALL(FPARAM,LVAR,FUNCCALL(&FPARAM));
FPARAM=FPARAM;
62e857215c2c8b10a1ebe99046b1b463
04a27a8b584e00db088f18a16ddc1ac6
c3250b774d4bd8bbeea848ae8e091777
4830812a7240fa89419da5ef1e440566
01689c59d66b453ae92f59560a0a430f
d1f3dbd2ab6d7e6199391bb86d1d343a
57e012af713ea16d25ed7bd54a216887
Vulnerability patch codeFUNCCALL(&FPARAM);
FUNCCALL(&FPARAM->FPARAM);
+90b650dba71b052ca2a85608a2447c1c
-e58a03ee48a74c4d50af5bee1ba18d08
Vulnerability context codeif(FPARAM>=1&&FUNCCALL(FPARAM))8fddbc554a5ad97e8805a956a8ab5968