# US 2021/0286706 A1 · Graph-based method for inductive bug localization

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0286706 A1
- Document ID: US20210286706A1
- Status: Published application
- Kind: A1
- Application number: 17/191,964
- Filed: 2021-03-04
- Published: 2021-09-16
- Earliest claimed: 2020-03-11
- Assignees: NEC Laboratories America, Inc.
- Applicants: NEC Laboratories America, Inc.
- Inventors: Bo Zong; Haifeng Chen; Xuchao Zhang
- Web page: https://patentgrep.com/patent/US20210286706A1

## CPC

- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F 11/366: {using diagnostics (G06F11/0703 takes precedence)}
- G06F 11/323: {Visualisation of programs or trace data}
- G06F 40/30: Semantic analysis
- G06N 3/10: Interfaces, programming languages or software development kits, e.g. for simulating neural networks
- G06F 11/3604: Analysis of software for verifying properties of programs (testing of software G06F11/3668)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A computer-implemented method executed by at least one processor for software bug localization is presented. The method includes constructing a bug localization graph to capture relationships between bug tickets and relevant source code files from historical change-sets and an underlying source code repository, leveraging natural processing language tools to evaluate semantic similarity between a new bug ticket and a historical ticket, in response to the evaluated semantic similarity, for the new bug ticket, adding links between the new bug ticket a set of similar historical tickets, incorporating the new bug ticket in the bug localization graph, and developing a mathematical graph expression to determine a closeness relationship between the relevant source code files and the new bug ticket.

## Claims

### Claim 1

A computer-implemented method executed by at least one processor for software bug localization, the method comprising:
constructing a bug localization graph to capture relationships between bug tickets and relevant source code files from historical change-sets and an underlying source code repository;
leveraging natural processing language tools to evaluate semantic similarity between a new bug ticket and a historical ticket;
in response to the evaluated semantic similarity, for the new bug ticket, adding links between the new bug ticket a set of similar historical tickets;
incorporating the new bug ticket in the bug localization graph; and
developing a mathematical graph expression to determine a closeness relationship between the relevant source code files and the new bug ticket.

### Claim 2 (depends on 1)

The method of claim 1, wherein constructing the bug localization graph includes extracting reference relations and change-set relations.

### Claim 3 (depends on 1)

The method of claim 1, wherein the bug localization graph includes a plurality of nodes and a plurality of edges connecting the nodes, each node representing either a relevant source code file or a bug ticket, and wherein two nodes are connected if they have reference relations.

### Claim 4 (depends on 1)

The method of claim 1, wherein the mathematical graph expression generates a closeness score for each new bug ticket node.

### Claim 5 (depends on 4)

The method of claim 4, wherein the closeness score is updated by:
c
(
k
+
1
)
⁡
[
i
]
=
λ
⁢
∑
v
j
∈
N
i
⁢
1
d
j
⁢
c
(
k
)
⁡
[
j
]
where Ni is a set of one-hop neighbors of vi in the bug localization graph, dj is a node degree of neighbor vj, k is an iteration number, and λ is a pre-defined numerical value between 0 and 1.

### Claim 6 (depends on 4)

The method of claim 4, wherein the closeness score for the new ticket bug is updated by:
c
(
k
+
1
)
⁡
[
0
]
=
c
(
k
+
1
)
⁡
[
0
]
+
(
1
-
λ
)
⁢
∑
j
≠
0
⁢
c
(
k
)
⁡
[
j
]
where k is an iteration number and A is a pre-defined numerical value between 0 and 1.

### Claim 7 (depends on 4)

The method of claim 4, wherein updates for the closeness score are performed iteratively.

### Claim 8

A system for software bug localization, the system comprising:
a memory; and
a processor in communication with the memory, wherein the processor runs program code to:
construct a bug localization graph to capture relationships between bug tickets and relevant source code files from historical change-sets and an underlying source code repository;
leverage natural processing language tools to evaluate semantic similarity between a new bug ticket and a historical ticket;
in response to the evaluated semantic similarity, for the new bug ticket, add links between the new bug ticket a set of similar historical tickets;
incorporate the new bug ticket in the bug localization graph; and
develop a mathematical graph expression to determine a closeness relationship between the relevant source code files and the new bug ticket.

### Claim 9 (depends on 8)

The system of claim 8, wherein constructing the bug localization graph includes extracting reference relations and change-set relations.

### Claim 10 (depends on 8)

The system of claim 8, wherein the bug localization graph includes a plurality of nodes and a plurality of edges connecting the nodes, each node representing either a relevant source code file or a bug ticket, and wherein two nodes are connected if they have reference relations.

### Claim 11 (depends on 8)

The system of claim 8, wherein the mathematical graph expression generates a closeness score for each new bug ticket node.

### Claim 12 (depends on 11)

The system of claim 11, wherein the closeness score is updated by:
c
(
k
+
1
)
⁡
[
i
]
=
λ
⁢
∑
v
j
∈
N
i
⁢
1
d
j
⁢
c
(
k
)
⁡
[
j
]
where Ni is a set of one-hop neighbors of vi in the bug localization graph, dj is a node degree of neighbor vj, k is an iteration number, and λ is a pre-defined numerical value between 0 and 1.

### Claim 13 (depends on 11)

The system of claim 11, wherein the closeness score for the new ticket bug is updated by:
c
(
k
+
1
)
⁡
[
0
]
=
c
(
k
+
1
)
⁡
[
0
]
+
(
1
-
λ
)
⁢
∑
j
≠
0
⁢
c
(
k
)
⁡
[
j
]
where k is an iteration number and λ is a pre-defined numerical value between 0 and 1.

### Claim 14 (depends on 11)

The system of claim 11, wherein updates for the closeness score are performed iteratively.

### Claim 15

A non-transitory computer-readable storage medium comprising a computer-readable program for software bug localization, wherein the computer-readable program when executed on a computer causes the computer to perform the steps of:
constructing a bug localization graph to capture relationships between bug tickets and relevant source code files from historical change-sets and an underlying source code repository;
leveraging natural processing language tools to evaluate semantic similarity between a new bug ticket and a historical ticket;
in response to the evaluated semantic similarity, for the new bug ticket, adding links between the new bug ticket a set of similar historical tickets;
incorporating the new bug ticket in the bug localization graph; and
developing a mathematical graph expression to determine a closeness relationship between the relevant source code files and the new bug ticket.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein constructing the bug localization graph includes extracting reference relations and change-set relations.

### Claim 17 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the bug localization graph includes a plurality of nodes and a plurality of edges connecting the nodes, each node representing either a relevant source code file or a bug ticket, and wherein two nodes are connected if they have reference relations.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the mathematical graph expression generates a closeness score for each new bug ticket node.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the closeness score is updated by:
c
(
k
+
1
)
⁡
[
i
]
=
λ
⁢
∑
v
j
∈
N
i
⁢
1
d
j
⁢
c
(
k
)
⁡
[
j
]
where Ni is a set of one-hop neighbors of vi in the bug localization graph, dj is a node degree of neighbor vj, k is an iteration number, and λ is a pre-defined numerical value between 0 and 1.

### Claim 20 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the closeness score for the new ticket bug is updated by:
c
(
k
+
1
)
⁡
[
0
]
=
c
(
k
+
1
)
⁡
[
0
]
+
(
1
-
λ
)
⁢
∑
j
≠
0
⁢
c
(
k
)
⁡
[
j
]
where k is an iteration number and A is a pre-defined numerical value between 0 and 1.
