A computer-implemented method comprising: receiving, by one or more processors, first code and second code, where the second code is an updated version of the first code; and generating, by the one or more processors, third code that is semantically equivalent, at least in part, to the second code, the generating comprising: identifying, by the one or more processors, a first portion of the second code that is syntactically and structurally equivalent to a first portion of the first code, and a second portion of the second code that is syntactically or structurally different from a second portion of the first code; identifying, by the one or more processors, within the second portion of the second code, a first sub-portion that is semantically different from a first sub-portion of the second portion of the first code, the first sub-portions of the first and second code being syntactically or structurally different; identifying, by the one or more processors, within the second portion of the second code, a second sub-portion that is semantically equivalent to a second sub-portion of the second portion of the first code, the second sub-portions of the first and second code being syntactically or structurally different; generating the third code, by the one or more processors, that includes the second sub-portion of the first code in the third code; analyzing A. the second sub-portions of the second portion of the first and second code and/or B. the first portions of the first and second code to derive information about syntactic changes and/or structural changes between the second sub-portions, and generating the third code, by the one or more processors, that includes one or more portions of the first sub-portion of the second code in the third code at one or more locations within the third code based on the information derived. receiving, by one or more processors, first code and second code, where the second code is an updated version of the first code; and generating, by the one or more processors, third code that is semantically equivalent, at least in part, to the second code, the generating comprising: identifying, by the one or more processors, a first portion of the second code that is syntactically and structurally equivalent to a first portion of the first code, and a second portion of the second code that is syntactically or structurally different from a second portion of the first code; identifying, by the one or more processors, within the second portion of the second code, a first sub-portion that is semantically different from a first sub-portion of the second portion of the first code, the first sub-portions of the first and second code being syntactically or structurally different; identifying, by the one or more processors, within the second portion of the second code, a second sub-portion that is semantically equivalent to a second sub-portion of the second portion of the first code, the second sub-portions of the first and second code being syntactically or structurally different; generating the third code, by the one or more processors, that includes the second sub-portion of the first code in the third code; analyzing A. the second sub-portions of the second portion of the first and second code and/or B. the first portions of the first and second code to derive information about syntactic changes and/or structural changes between the second sub-portions, and generating the third code, by the one or more processors, that includes one or more portions of the first sub-portion of the second code in the third code at one or more locations within the third code based on the information derived. identifying, by the one or more processors, a first portion of the second code that is syntactically and structurally equivalent to a first portion of the first code, and a second portion of the second code that is syntactically or structurally different from a second portion of the first code; identifying, by the one or more processors, within the second portion of the second code, a first sub-portion that is semantically different from a first sub-portion of the second portion of the first code, the first sub-portions of the first and second code being syntactically or structurally different; identifying, by the one or more processors, within the second portion of the second code, a second sub-portion that is semantically equivalent to a second sub-portion of the second portion of the first code, the second sub-portions of the first and second code being syntactically or structurally different; generating the third code, by the one or more processors, that includes the second sub-portion of the first code in the third code; analyzing A. the second sub-portions of the second portion of the first and second code and/or B. the first portions of the first and second code to derive information about syntactic changes and/or structural changes between the second sub-portions, and A. the second sub-portions of the second portion of the first and second code and/or B. the first portions of the first and second code to derive information about syntactic changes and/or structural changes between the second sub-portions, and generating the third code, by the one or more processors, that includes one or more portions of the first sub-portion of the second code in the third code at one or more locations within the third code based on the information derived.