×

Identifying differences between source codes of different versions of a software when each source code is organized using incorporated files

  • US 9,043,757 B2
  • Filed: 12/13/2012
  • Issued: 05/26/2015
  • Est. Priority Date: 12/13/2012
  • Status: Active Grant
First Claim
Patent Images

1. A method of identifying differences between source codes when each source code is organized using incorporated files, said method comprising:

  • receiving identifiers of a first source code and a second source code, said first source code being organized as a first plurality of code files and said second source code being organized as a second plurality of code files,wherein said first source code contains a first conditional incorporate statement having a first condition, said first conditional incorporate statement indicating that a first code file of said first plurality of code files is to be incorporated when said first condition is true and a second code file of said first plurality of code files is to be incorporated when said first condition is false,wherein said second source code contains a second conditional incorporate statement also having said first condition, said second conditional incorporate statement indicating that a third code file of said second plurality of code files is to be incorporated when said first condition is true and a fourth code file of said second plurality of code files is to be incorporated when said first condition is false;

    constructing a first listing of instructions for said first source code and a second listing of instructions for said second source code, wherein said constructing said first listing comprises including, for each incorporate statement in said first plurality of code files, the instructions stored in a corresponding one of said first plurality of code files as specified by the corresponding incorporate statement,wherein said constructing, in response to said first conditional incorporate statement, includes the instructions stored in both of said first code file and said second code file respectively as a first code portion and a second code portion in said first listing of instructions without evaluation of said first condition,wherein said constructing said second listing comprises including, for each incorporate statement in said second plurality of code files, the instructions stored in a corresponding one of said second plurality of code files as specified by the corresponding incorporate statement,wherein said constructing, in response to said second conditional incorporate statement, includes the instructions stored in both of said third code file and said fourth code file respectively as a third code portion and a fourth code portion in said second listing of instructions without evaluation of said first condition; and

    finding the differences between said first source code and said second source code by comparing said first listing of instructions and said second listing of instructions,wherein said comparing compares the instructions in said first code portion with instructions in said third code portion in view of both of said first code portion and said third code portion being present in said first listing and said second listing corresponding to said first condition being true, and compares the instructions in said second code portion with instructions in said fourth code portion in view of both of said second code portion and said fourth code portion being present in said first listing and said second listing corresponding to said first condition being false.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×