IP Library › Granted Patent US 9,946,785
Granted Patent B2
US 9,946,785 · App. 14/665,089 · Granted Apr 17, 2018

Searching code based on learned programming construct patterns and NLP similarity

Inventors: Corville O. Allen (Morrisville, NC); Andrew R. Freed (Cary, NC); Dana L. Price (Cary, NC)
Assignee: International Business Machines Corporation
G06F17/30654G06F8/36G06F8/433G06F8/71G06F11/3688G06F17/30598G06F17/30684
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,946,785
App. No.
14/665,089
Granted
Apr 17, 2018
Kind
B2
Abstract

An approach is provided to ingest software source code files into a question/answering (QA) system. During ingestion, source code blocks are classified to identify one or more constructs in the blocks as being domain-specific. Relationships between the blocks are then mapped. Software compliance regulations are ingested into the QA system. Using the QA system, a source code file is analyzed for compliance to the software compliance regulations. The analysis identifies code sections within the source code file as being domain-specific and subject to the ingested set of software compliance regulations.

Claims (51)

1. An information handling system comprising:

one or more processors;

one or more data stores accessible by at least one of the processors;

a memory coupled to at least one of the processors; and

a set of computer program instructions stored in the memory and executed by at least one of the processors in order to perform actions of:

building a domain-specific knowledge base of a domain by ingesting a plurality of source code files into the domain-specific knowledge base utilized by a question/answering (QA) system, wherein the ingesting further comprises:

ingesting a set of software compliance regulations corresponding to the domain into the domain-specific knowledge base;

selecting one of the plurality of source code files that includes a plurality of source code sections;

classifying one of the plurality of source code sections as a domain-specific source code section; and

classifying a construct in the domain-specific source code section as a domain-specific construct;

retrieving a new source code file that comprises a plurality of new source code sections, wherein a selected one of the plurality of new source code sections includes a new construct;

generating a natural language question based on the new construct; and

processing, by the QA system, the natural language question using the domain-specific knowledge base, wherein the processing further comprises:

matching the new construct to the domain-specific construct;

determining, in response to the matching, that the selected source code section is subject to the ingested set of software compliance regulations; and

generating an answer, in response the determining, that indicates the new source code section is subject to the set of software compliance regulations.

2. The information handling system of claim 1 wherein the actions further comprise:

identifying one or more domain-specific relationships between the plurality of new code sections of the new source code file; and

using the QA system, analyzing compliance of the new source code file by further determining whether the identified one or more domain-specific relationships are subject to the ingested set of software compliance regulations.

3. The information handling system of claim 1 further comprising:

formulating a different natural language question pertaining to the new source code file being domain specific and subject to the ingested set of software compliance regulations;

submitting the different natural language question to the QA system; and

receiving a response from the QA system that indicates whether the new source code file is subject to the ingested set of software compliance regulations.

4. The information handling system of claim 1 wherein the actions further comprise:

receiving, from the QA system, a confidence value corresponding to the answer; and

in response to the confidence value exceeding a threshold, generating a report that indicates the new source code section is subject to the ingested set of software compliance regulations.

5. The information handling system of claim 4 wherein the actions further comprise:

including the set of software compliance regulations in the report.

6. A computer program product stored in a computer readable storage medium, comprising computer program code that, when executed by an information handling system, causes the information handling system to perform actions comprising:

building a domain-specific knowledge base of a domain by ingesting a plurality of source code files into the domain-specific knowledge base utilized by a question/answering (QA) system, wherein the ingesting further comprises:

ingesting a set of software compliance regulations corresponding to the domain into the domain-specific knowledge base;

selecting one of the plurality of source code files that includes a plurality of source code sections;

classifying one of the plurality of source code sections as a domain-specific source code section; and

classifying a construct in the domain-specific source code section as a domain-specific construct;

retrieving a new source code file that comprises a plurality of new source code sections, wherein a selected one of the plurality of new source code sections includes a new construct;

generating a natural language question based on the new construct; and

processing, by the QA system, the natural language question using the domain-specific knowledge base, wherein the processing further comprises:

matching the new construct to the domain-specific construct;

determining, in response to the matching, that the selected source code section is subject to the ingested set of software compliance regulations; and

generating an answer, in response the determining, that indicates the new source code section is subject to the set of software compliance regulations.

7. The computer program product of claim 6 wherein the actions further comprise:

identifying one or more domain-specific relationships between the plurality of new code sections of the new source code file; and

using the QA system, analyzing compliance of the new source code file by further determining whether the identified one or more domain-specific relationships are subject to the ingested set of software compliance regulations.

8. The computer program product of claim 6 further comprising:

formulating a different natural language question pertaining to the new source code file being domain specific and subject to the ingested set of software compliance regulations;

submitting the different natural language question to the QA system; and

receiving a response from the QA system that indicates whether the new source code file is subject to the ingested set of software compliance regulations.

9. The computer program product of claim 6 wherein the actions further comprise:

receiving, from the QA system, a confidence value corresponding to the answer; and

in response to the confidence value exceeding a threshold, generating a report that indicates the new source code section is subject to the ingested set of software compliance regulations; and

including the set of software compliance regulations in the report.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 23, 2015
From: ALLEN, CORVILLE O.; FREED, ANDREW R.; PRICE, DANA L.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 035227/0878 →
Continuity (1)
Related Publication 20160283360A1 · Sep 29, 2016