US 12,008,364 B1
Inconsistency-based bug detection
Hangqi Zhao, Seattle, WA (US); Qiang Zhou, San Jose, CA (US); and Sengamedu Hanumantha Rao Srinivasan, Seattle, WA (US)
Assigned to Amazon Technologies Inc., Seattle, WA (US)
Filed by Amazon Technologies, Inc., Seattle, WA (US)
Filed on Jun. 24, 2021, as Appl. No. 17/357,616.
Int. Cl. G06F 8/75 (2018.01); G06F 8/10 (2018.01); G06F 40/30 (2020.01)
CPC G06F 8/75 (2013.01) [G06F 8/10 (2013.01); G06F 40/30 (2020.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method, comprising:
generating a plurality of code units corresponding to a plurality of portions of source code by at least one of a lexical analyzer and a semantic analyzer;
identifying one or more patterns in source code, wherein patterns of two code units are identified based, at least in part, on correlation between two units of code, and patterns of two or more code units are identified based, at least in part, on a rule derived from a recurring sequence in the source code;
determining that a portion of source code matches a part of a pattern and also contains at least one deviation from the pattern; and
generating a message to indicate the portion of the source code contains an error based on the deviation.