Methods and apparatus for analyzing software interface usage
First Claim
1. A method of programmatically analyzing byte code on an analysis apparatus in order to identify one or more called application programming interfaces (APIs), said analysis apparatus comprising processing logic and a storage device, said method comprising:
- providing, on said storage device, a first file path containing first byte code;
providing a second file path containing second byte code;
parsing, logic, files found on said first file path to create at least one first parsed class file;
placing a name of at least one class defined in said at least one first parsed class file into a dictionary;
parsing files found on said second file path to create at least one parsed second class file;
evaluating each class on said second file path to identify one or more methods associated therewith;
evaluating, via said processing logic, each of said one or more methods to identify at least one method or field invocation associated with any classes in said dictionary;
if said evaluation of each of said one or more methods identifies at least one method or field invocation associated with a class missing from said dictionary, matching said identified at least one method or field invocation associated with a class missing from said dictionary with a similar class present in said dictionary; and
rendering said first byte code interoperable with said second byte code by creating an association between said at least one method or field invocation associated with a class missing from said dictionary and said similar class.
9 Assignments
0 Petitions
Accused Products
Abstract
Methods and apparatus for analyzing the interface usage and requirements within software applications. In one embodiment, the interfaces comprise application programming interfaces (APIs) used with Java-based software, and the apparatus comprises a computer program that analyzes file paths (or classpaths) containing one or more files comprising Java bytecode. The names of the classes are extracted and placed into a class dictionary. The different classes listed in the dictionaries are broken down into their individual methods. Each method is then dissembled and analyzed for method or field invocations on other classes found in the dictionary. Methods called are added to a “used class” report. The used class report preferably contains the name of the class, method and the instruction information.
-
Citations
28 Claims
-
1. A method of programmatically analyzing byte code on an analysis apparatus in order to identify one or more called application programming interfaces (APIs), said analysis apparatus comprising processing logic and a storage device, said method comprising:
-
providing, on said storage device, a first file path containing first byte code; providing a second file path containing second byte code; parsing, logic, files found on said first file path to create at least one first parsed class file; placing a name of at least one class defined in said at least one first parsed class file into a dictionary; parsing files found on said second file path to create at least one parsed second class file; evaluating each class on said second file path to identify one or more methods associated therewith; evaluating, via said processing logic, each of said one or more methods to identify at least one method or field invocation associated with any classes in said dictionary; if said evaluation of each of said one or more methods identifies at least one method or field invocation associated with a class missing from said dictionary, matching said identified at least one method or field invocation associated with a class missing from said dictionary with a similar class present in said dictionary; and rendering said first byte code interoperable with said second byte code by creating an association between said at least one method or field invocation associated with a class missing from said dictionary and said similar class. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method of analyzing class-based computer code using a reference code apparatus corn rising at least one interface and a data processor in operative communication with said at least one interface, said method comprising:
-
receiving a first input containing first code; receiving, at said at least one interface, a second input containing second code; extracting a first set of classes from said first input; extracting, using said data processor, a second set of classes from said second input; analyzing each class in said first set of classes to generate a dictionary; analyzing each class in said second set of classes to generate a set of methods; analyzing each method from said set of methods to identify invocations of classes present in said dictionary; based at least in part on said analysis of each method, generating, using said data processor, a listing of invocations of classes not present in said dictionary; and utilizing said listing of classes to create one or more place holder methods; wherein at least one of said one or more place holder methods comprises a declarative method configured to identify itself and one or more parameters said declarative method accepts. - View Dependent Claims (8, 9, 10, 11, 12, 13)
-
-
14. A non-transitory computer-readable apparatus configured to store a computer program thereon, said computer program configured to analyze class-based computer code, said computer program comprising a plurality of instructions, configured to, when executed:
-
extract a first set of classes from a first input, said first input comprising first code; extract a second set of classes from a second input, said second input comprising second code; analyze each class in said first set of classes to generate a listing; analyze each class in said second set of classes to generate a set of methods; analyze each method from said set of methods to identify invocations of classes present in said listing; based at least in part on said analysis of each method, identify a chain comprising one or more deadlocking methods configured to reference at least one method configured to execute prior to said one or more deadlocking methods in said chain; and generate a report configured to list said chain. - View Dependent Claims (15, 16, 17)
-
-
18. A method of analyzing class-based computer code to identify one or more aspects of application programming interface (API) called within an application utilizing a library for use with a code processing device comprising a computer-readable medium and processing logic, said method comprising:
-
identifying, on said computer-readable medium, first and second sets of code to be processed; generating a first dictionary of all public classes and interfaces in said library; analyzing, via said processing logic, a first set of classes and interfaces from said first set of code to generate a listing; analyzing a second set of classes and interfaces from said second set of code to generate a set of methods; comparing said listing and said set of methods to generate a second dictionary, said second dictionary comprising a plurality of entries indicating a plurality of APIs called by said application; and based at least in part on said comparison, identifying, via said processing logic, one or more of said plurality of APIs configured to rely on a circular reference; wherein said circular reference comprises a call into an individual one of said one or more of said plurality of APIs through a reference from said individual one of said one or more of said plurality of APIs. - View Dependent Claims (19, 20, 21, 22)
-
-
23. A system able to identify application programming interfaces (APIs) called by a first application used in content delivery network, said system comprising:
-
a memory; a first processing entity disposed on a first computer; and a second processing entity disposed on a second computer and in data communication with said first computer, said second processing entity configured to run a computer program thereon, said computer program comprising a plurality of instructions configured to, when executed; receive said first application to be evaluated from said first processing entity; extract a set of classes from code associated with said first application; analyze said set of classes to generate a set of methods; compare said set of methods with a listing derived from one or more second applications present in a current configuration of a consumer premises equipment (CPE); based on said comparison, identify at least one API called by said first application; and when all APIs called by said first application are present in said listing, confirm said first application for distribution. - View Dependent Claims (24, 25, 26, 27, 28)
-
Specification