×

Identifying code that exhibits ideal logging behavior

  • US 9,292,281 B2
  • Filed: 08/13/2014
  • Issued: 03/22/2016
  • Est. Priority Date: 06/27/2014
  • Status: Active Grant
First Claim
Patent Images

1. A method for identifying methods which exhibit ideal logging behavior in source code, said method comprising:

  • under control of one or more computer systems configured with executable instructions,processing the source code of a computer program to identify a plurality of methods that contain one or more log printing statements;

    processing a commit history of the source code to identify a frequency of modifications performed on the one or more log printing statements for each of the plurality of methods;

    storing each of the plurality of methods into a static call graph in memory of the one or more computing systems, wherein each node of the static call graph represents a method and each edge between nodes in the static call graph represents a function call;

    assigning, to each node of the static call graph a numerical weight to indicate a log rank of the method resented by the node, the numerical weight computed based at least in part on the frequency of modifications performed on the one or more log printing statements; and

    ranking the nodes of the static call graph according to the numerical weight indicating the log rank; and

    displaying the method represented by the node having the highest numerical weight on a display device, wherein processing the commit history further comprises restricting the frequency of modifications used to compute the numerical weight to only changes that include verbosity level changes, and addition and deletion of log printing statements.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×