IP Library Granted Patent US 8,910,127
Granted Patent B2
US 8,910,127 · App. 13/623,593 · Granted Dec 9, 2014

Estimating indirect interface implementation before load time based on directly implemented methods

Inventors: Shiri Semo Judelman (Kfar-Saba, IL); Asaf Dafner (Gedera, IL); Eyal Koren (Dafna, IL)
Assignee: Identify Software Ltd. (IL)
G06F9/00G06F8/61
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,910,127
App. No.
13/623,593
Granted
Dec 9, 2014
Kind
B2
Abstract

According to an example implementation, a computer-readable storage medium, computer-implemented method and a system are provided to receive a first class, the first class indirectly implementing a first interface, wherein the first class extends a second class that directly implements the first interface, identify one or more directly implemented methods within the first class, determine a method signature for one or more of the directly implemented methods, estimate that the first class indirectly implements the first interface based on the method signatures for the one or more directly implemented methods, and instrument the first class based on the estimating that the first class indirectly implements the first interface.

Claims (76)

1. A non-transitory computer-readable storage medium comprising computer-readable instructions stored thereon that, when executed, are configured to cause a processor to at least:

receive a first class, the first class indirectly implementing a first interface, wherein the first class extends a second class that directly implements the first interface;

identify one or more directly implemented methods within the first class;

determine a method signature for one or more of the directly implemented methods, each method signature including a method name and one or more method parameters for a method;

estimate that the first class indirectly implements the first interface based on the method signatures for the one or more directly implemented methods; including:

compare the method signature for each of the one or more directly implemented methods to the method signatures of the interface methods; and

identify one or more of the directly implemented methods having a method signature that matches one of the interface method signatures; and

instrument the first class based on the estimating that the first class indirectly implements the first interface.

2. The computer-readable storage medium of claim 1 wherein the instructions configured to cause the processor to estimate comprise instructions, when executed, are further configured to cause the processor to at least:

assign a weight to each of the plurality of interface method signatures of the first interface based on a number of occurrences of the associated interface method signature within a group of classes and interfaces;

determine a class score for the first class with respect to the first interface as a sum of the weights of each of the interface method signatures that match one of the method signatures of the directly implemented methods;

compare the class score to a threshold; and

determine that the class score is greater than the threshold.

3. The computer-readable storage medium of claim 1 wherein the method signature includes a method name and a number and type of the method's parameters.

4. The computer-readable storage medium of claim 2 wherein the instructions configured to cause the processor to assign a weight comprise instructions, when executed, are configured to cause the processor to:

determine a number of occurrences of the interface method signature within a group that includes at least one class or interface other than the first class, wherein one or more of the classes implements one or more interfaces; and

assign a weight to the interface method signature, wherein the weight assigned to the interface method signature is inversely related to the number of occurrences of the interface method signature within the group.

5. The computer-readable storage medium of claim 1 wherein the first class includes byte-code, wherein the instructions configured to cause the processor to instrument the first class comprise instructions, when executed, are configured to cause the processor to inject additional byte-code into the first class in order to record or monitor an execution of the first class.

6. A computer implemented method performed by a processor comprising:

receiving a first class, the first class indirectly implementing a first interface, wherein the first class extends a second class that directly implements the first interface;

identifying one or more directly implemented methods within the first class,

determining a method signature for one or more of the directly implemented methods, each method signature including a method name and one or more method parameters for a method;

estimating that the first class indirectly implements the first interface based on the method signatures for the one or more directly implemented methods, including:

comparing the method signature for each of the one or more directly implemented methods to the method signatures of the interface methods; and

identifying one or more of the directly implemented methods having a method signature that matches one of the interface method signatures;

instrumenting the first class based on the estimating that the first class indirectly implements the first interface.

7. The computer implemented method of claim 6 wherein the estimating further comprises:

assigning a weight to each of the plurality of interface method signatures of the first interface based on a number of occurrences of the associated interface method signature within a group of classes and interfaces;

determining a class score for the first class with respect to the first interface as a sum of the weights of each of the interface method signatures that match one of the method signatures of the directly implemented methods;

comparing the class score to a threshold; and

determining that the class score is greater than the threshold.

8. The computer implemented method of claim 7 wherein the instrumenting comprises instrumenting the first class based on the class score being greater than the threshold, the instrumenting comprises injecting into byte-code of the first class additional byte code specific to the first interface to view or monitor the performance of one or more of the directly implemented methods of the first class.

9. The computer implemented method of claim 6 and further comprising

determining a method signature, based on at least a method title, for each interface method of a group of methods; and

assigning a weight to each of the plurality of interface method signatures based on a frequency of occurrence of the interface method signature within a group of methods.

10. A computer implemented method performed by a processor, the computer implemented method comprising:

determining a method signature for each of a plurality of interface methods;

assigning a weight to each of the plurality of interface method signatures based on a number of occurrences of the associated interface method signature within a group of classes and interfaces;

receiving a first class, the first class indirectly implementing a first interface, wherein the first class extends a second class that directly implements the first interface;

identifying one or more methods that are directly implemented within the first class;

determining a method signature for each of the one or more directly implemented methods within the first class, each method signature including on a method name and one or more method parameters for a method;

comparing the method signature for each of the one or more directly implemented methods to the method signatures of the interface methods;

identifying one or more of the directly implemented methods having a method signature that matches one of the interface method signatures;

determining a class score for the first class with respect to the first interface as a sum of the weights of each of the interface method signatures that match one of the method signatures of the directly implemented methods;

instrumenting the first class if the class score for the first class is greater than a threshold.

11. The computer implemented method of claim 10 wherein the method signature includes a method name and a number and type of the method's parameters.

12. The computer implemented method of claim 10 wherein the method signature includes a method name and a number, type and order of the method's parameters.

13. The computer implemented method of claim 10 wherein the assigning a weight to an interface method signature comprises:

determining a number of occurrences of the interface method signature within a group that includes at least one class or interface other than the first class, wherein one or more of the classes implements one or more interfaces; and

assigning a weight to the interface method signature, wherein the weight assigned to the interface method signature is inversely related to the number of occurrences of the interface method signature within the group.

14. The computer implemented method of claim 10 wherein the first class includes byte-code, wherein the instrumenting the first class comprises injecting additional byte-code into the first class in order to record or monitor the execution of the first class.

15. The computer implemented method of claim 10 wherein the comparing the method signature for the one or more directly implemented methods to method signatures of the interface methods comprises comparing a method name and a number and type of parameters of the one or more directly implemented methods to a method name and a number and type of parameters of one or more of the interface methods.

16. The computer implemented method of claim 10 wherein the following is performed if the class score for the first class is greater than the threshold:

recording information indicating that the first class implements the first interface;

receiving the first class a second or subsequent time; and

determining that the first class implements the first interface based on the recorded information; and

directly instrumenting the first class, by injecting byte-code into the first class that are specific to the first class, without performing the comparing or calculating a score a second time for the first class.

17. The computer implemented method of claim 10 and further comprising

using Java Reflection, after the first class and the second class have been loaded, to inspect the second class to verify that the first class indirectly implements the first interface.

18. The computer implemented method of claim 10 and further comprising:

using Java Reflection, after the first class and the second class have been loaded, to determine that, although the score for the first class is greater than the threshold, the first class does not indirectly implement the first interface;

using Java Reflection to determine which of the interface method signatures that match one of the methods of the directly implemented methods were not indirectly implemented by the first class; and

decrement a weight assigned to one or more of the method signatures of interface methods that were not indirectly implemented by the first class.

19. A computer system including instructions recorded on a non-transitory computer-readable storage medium and readable by at least one processor, the system comprising:

receiving logic configured to receive a first class, the first class indirectly implementing a first interface, wherein the first class extends a second class that directly implements the first interface;

identifying logic configured to identify one or more directly implemented methods within the first class;

method signature determining logic configured to determine a method signature for one or more of the directly implemented methods, each method signature including a method name and one or more method parameters for a method;

estimating logic configured to estimate that the first class indirectly implements the first interface based on the method signatures for the one or more directly implemented methods, the estimating logic configured to:

compare the method signature for each of the one or more directly implemented methods to the method signatures of the interface methods; and

identify one or more of the directly implemented methods having a method signature that matches one of the interface method signatures; and

instrumenting logic configured to instrument the first class based on the estimating that the first class indirectly implements the first interface.

20. The computer system of claim 19 wherein the estimating logic further comprises:

assigning logic configured to assign a weight to each of the plurality of interface method signatures of the first interface based on a number of occurrences of the associated interface method signature within a group of classes and interfaces;

class score determining logic configured to determine a class score for the first class with respect to the first interface as a sum of the weights of each of the interface method signatures that match one of the method signatures of the directly implemented methods;

score comparing logic configured to compare the class score to a threshold; and

the score comparing logic further configured to determine that the class score is greater than the threshold.

Assignments (8)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 17, 2026
From: BMC SOFTWARE ISRAEL LTD
To: BMC HELIX ISRAEL LTD.
Reel/Frame 075403/0859 →
MERGER Recorded Nov 9, 2018
From: IDENTIFY SOFTWARE LTD.
To: BMC SOFTWARE ISRAEL LTD.
Reel/Frame 047465/0871 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2018
From: IDENTIFY SOFTWARE LTD.
To: BMC SOFTWARE ISRAEL LTD.
Reel/Frame 047465/0855 →
RELEASE OF PATENTS Recorded Oct 5, 2018
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.; BMC ACQUISITION L.L.C.
Reel/Frame 047198/0468 →
RELEASE OF SECURITY INTEREST Recorded Aug 25, 2017
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.; IDENTIFY SOFTWARE LTD. (IL)
Reel/Frame 043678/0589 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 14, 2014
From: JUDELMAN, SHIRI S.; DAFNER, ASAF; KOREN, EYAL
To: IDENTIFY SOFTWARE LTD. (IL)
Reel/Frame 031962/0597 →
SECURITY AGREEMENT Recorded Dec 17, 2013
From: IDENTIFY SOFTWARE, LTD
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 031833/0950 →
SECURITY AGREEMENT Recorded Sep 11, 2013
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 031204/0225 →
Continuity (1)
Related Publication 20140082596A1 · Mar 20, 2014