Automatic code refactor with abstract syntax tree and generative ai
AssigneeIntuit Inc.
InventorLong H. LE
Life of this patent
Estimating the term…
Loading patent…
AssigneeIntuit Inc.
InventorLong H. LE
Estimating the term…
Certain aspects provide a computer-implemented method for automatically refactoring source code according to a target condition. The method includes identifying a current condition and a source code snippet from the source code of a software application. A context file and a tokenized file are generated based on the source code. A context file segment that corresponds to the source code snippet is identified from the context file. A refactoring prompt configured to cause a language model (LM) to refactor source code according to a target condition is generated and provided, along with the context file segment to the LM as input. A refactored source code snippet comprising at least one logic statement in the source code snippet that is modified according to the target condition using the context file segment and the refactoring prompt is received from the LM. A final refactored source code is then generated.
A computer-implemented method for automatically refactoring source code according to a target condition, comprising:
A processing system, comprising:
Dependencies are inferred from the claim text.