IP Library › Granted Patent US 9,020,939
Granted Patent B2
US 9,020,939 · App. 12/495,669 · Granted Apr 28, 2015

Correlating queries issued by applications with their source lines and analyzing applications for problem determination and where used analysis

Inventors: Stephen Andrew Brodsky (San Jose, CA); Zeus Orion Courtois (San Jose, CA); Tom William Jacopi (San Jose, CA); Michael Yiupun Kwong (San Jose, CA); Tony Kai-chi Leung (San Jose, CA); Sonali Surange (San Francisco, CA)
Assignee: International Business Machines Corporation
G06F11/3636G06F8/75G06F11/3612
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 9,020,939
App. No.
12/495,669
Granted
Apr 28, 2015
Kind
B2
Abstract

Provided are techniques for invoking with a processor executing on a computer a source code parser to obtain source information that includes a first location of an Application Programming Interface (API) call and parameters of the API call in source code of a client application, where the parameters the API call do not include query text for a query that is to be used to access a database; examining a stack trace to determine a second location of the API call in the stack trace; and deriving the query of the API call and a third location of the query in the source code by identifying the query in the stack trace at the location of the API call in the stack trace.

Claims (54)

1. A method, comprising:

obtaining, with a processor executing on a computer, information from source code of a client application that includes a location of an Application Programming Interface (API) call that issues a query and parameters of the API call in the source code, wherein query text for the query is not available until the source code is run;

running the source code to obtain a stack trace that includes the location of the API call in the stack trace and the query text for the query issued by the API call;

examining the stack trace to determine a match between the location of the API call in the source code and the location of the API call in the stack trace;

identifying the query text in the stack trace for the API call in the stack trace as the query text associated with the API call at the location in the source code;

storing the query and database objects used by the query in a repository; and

in response to receiving a change request for one of the database objects, returning the query from the repository for use in assessing an impact of the change request.

2. The method of claim 1 , further comprising:

invoking a query parser to parse the query to identify one or more tables and one or more columns used by the query;

storing correlator results for the API call that identify a source file of the client application, the location of the API call in the source code, the parameters of the API call, and the database objects which the query makes use of, wherein one of the parameters is the query text of the query; and

performing analysis using the correlator results.

3. The method of claim 2 , further comprising:

retrieving the correlator results; and

generating user interface views using the correlator results.

4. The method of claim 3 , wherein the user interface views provide at least one of: a view showing the query in a database and the query in the source code, a view showing database schemas and database objects that the query uses, a view showing queries per class, a view showing the queries used by each database object in the database, a view showing how queries are run, a view for exporting data, and a view showing performance information of execution count and execution time for each of the queries.

5. The method of claim 1 , further comprising:

parsing the source code is parsed to obtain the information.

6. A computer program product comprising a computer readable storage medium storing computer readable program code that, when executed on a processor of a computer, causes the computer to:

obtain information from source code of a client application that includes a location of an Application Programming Interface (API) call that issues a query and parameters of the API call in the source code, wherein query text for the query is not available until the source code is run;

run the source code to obtain a stack trace that includes the location of the API call in the stack trace and the query text for the query issued by the API call;

examine the stack trace to determine a match between the location of the API call in the source code and the location of the API call in the stack trace;

identifying the query text in the stack trace of for the API call in the stack trace as the query text associated with the API call at the location in the source code;

storing the query and database objects used by the query in a repository; and

in response to receiving a change request for one of the database objects, returning the query from the repository for use in assessing an impact of the change request.

7. The computer program product of claim 6 , wherein the computer readable program code, when executed on a processor of a computer, causes the computer to:

invoke a query parser to parse the query to identify one or more tables and one or more columns used by the query;

store correlator results for the API call that identify a source file of the client application, the location of the API call in the source code, the parameters of the API call, and the database objects which the query makes use of, wherein one of the parameters is the query text of the query; and

perform analysis using the correlator results.

8. The computer program product of claim 7 , wherein the computer readable program code, when executed on a processor of a computer, causes the computer to:

retrieve the correlator results; and

generate user interface views using the correlator results.

9. The computer program product of claim 8 , wherein the user interface views provide at least one of: a view showing the query in a database and the query in the source code, a view showing database schemas and database objects that the query uses, a view showing queries per class, a view showing the queries used by each database object in the database, a view showing how queries are run, a view for exporting data, and a view showing performance information of execution count and execution time for each of the queries.

10. The computer program product of claim 6 , wherein the computer readable program code, when executed on a processor of a computer, causes the computer to:

parse the source code is parsed to obtain the information.

11. A system, comprising:

a processor;

memory; and

circuitry to perform operations, the operations comprising:

obtaining information from source code of a client application that includes a location of an Application Programming Interface (API) call that issues a query and parameters of the API call in the source code, wherein query for the query text is not available until the source code is run;

running the source code to obtain a stack trace that includes the location of the API call in the stack trace and the query text for the query issued by the API call;

examining the stack trace to determine a match between the location of the API call in the source code and the location of the API call in the stack trace;

identifying the query text in the stack trace for the API call in the stack trace as the query text associated with the API call at the location in the source code;

storing the query and database objects used by the query in a repository; and

in response to receiving a change request for one of the database objects, returning the query from the repository for use in assessing an impact of the change request.

12. The system of claim 11 , wherein the operations further comprise:

invoking a query parser to parse the query to identify one or more tables and one or more columns used by the query;

storing correlator results for the API call that identify a source file of the client application, the location of the API call in the source code, the parameters of the API call, and the database objects which the query makes use of, wherein one of the parameters is the query text of the query; and

performing analysis using the correlator results.

13. The system of claim 12 , wherein the operations further comprise:

retrieving the correlator results; and

generating user interface views using the correlator results.

14. The system of claim 13 , wherein the user interface views provide at least one of: a view showing the query in a database and the query in the source code, a view showing database schemas and database objects that the query uses, a view showing queries per class, a view showing the queries used by each database object in the database, a view showing how queries are run, a view for exporting data, and a view showing performance information of execution count and execution time for each of the queries.

15. The system of claim 12 , wherein the operations further comprise:

parsing the source code is parsed to obtain the information.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 23, 2009
From: BRODSKY, STEPHEN ANDREW; COURTOIS, ZEUS ORION; JACOPI, TOM WILLIAM; KWONG, MICHAEL YIUPUN; LEUNG, TONY KAI-CHI; SURANGE, SONALI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 023275/0497 →
Continuity (1)
Related Publication 20100332473A1 · Dec 30, 2010