The invention discloses a method for determining an affected function of a
system based on a variable code and a related device, and relates to the technical field of computers, and the method comprises the following steps: comparing a new
version code file set with an old
version code file set of a to-be-evaluated
system, determining a variable code file and a variable row in the variable code file from the new
version code file set, obtaining a file
package where the variable code file is located, generating an
abstract syntax tree based on the file
package, extracting first-level routing information and second-level routing information corresponding to the variable row from the
abstract syntax tree, and sending the first-level routing information and the second-level routing information to the new version code file set; and according to the first-level routing information and the second-level routing information, determining a target
function point influenced by the change line in the to-be-evaluated
system. According to the method, the two-stage routing information is extracted based on the
abstract syntax tree, so that the target
function point influenced by the variable row is accurately determined, manual participation is not needed in the whole process, more time and labor are saved, and the labor cost is saved.