# US 2017/0255547 A1 · Source code error detection device and method thereof

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

- Number: US 2017/0255547 A1
- Document ID: US20170255547A1
- Status: Published application
- Kind: A1
- Application number: 15/244,263
- Filed: 2016-08-23
- Published: 2017-09-07
- Earliest claimed: 2016-03-02
- Assignees: MStar Semiconductor, Inc.
- Applicants: MStar Semiconductor, Inc.
- Inventors: Huei-Jyun SONG
- Web page: https://patentgrep.com/patent/US20170255547A1

## CPC

- G06F 11/3604: Analysis of software for verifying properties of programs (testing of software G06F11/3668)
- G06F 11/3668: Testing of software
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A source code error detection device and a source code error detection method are disclosed. The device and method are applied to detect source codes of a software product. The software product includes a plurality of function modules. A database stores the source codes of multiple versions of these function modules. Each version of the each module corresponds to a version information. The source code error detection device and the source code error detection method find an erroneous version information in order to immediately identify the source of the erroneous source codes during the development of a software project.

## Claims

### Claim 1

A source code error detection device, a database storing source codes of a plurality of versions of a plurality of function modules, each version of each function module corresponding to version information, the source code error detection device adapted to identify erroneous version information, the source code error detection device comprising:
a storage unit, storing a plurality of program instructions; and
a processing unit, coupled to the storage unit, executing the program instructions to perform steps of:
a) obtaining a compile combination information list, wherein the compile combination information list comprises a plurality of sets of compile combination information corresponding to a plurality of compile combinations, the sets of compile combination information arranged according to a module adding time sequence, each set of compile combination information comprising compile combination version information;
b) selecting a target compile combination from the compile combinations;
c) retrieving the source codes of the function modules corresponding to the target compile combination from the database according to the compile combination version information of the target compile combination;
d) compiling the source codes to generate a compiled result of the target compile combination;
e) determining whether an adjacent compile combination, which is one of a previous compile combination and a next compile combination of the target compile combination, has been compiled according to the compiled result of the target compile combination;
f) when the adjacent compile combination has been compiled, determining whether the compiled result of the target compile combination is opposite to a compiled result of the adjacent compile combination; and
g) when the compiled result of the target compile combination is opposite to the compiled result of the adjacent compile combination, identifying the erroneous version information according to the compile combination information of the target compile combination and the compile combination information of the adjacent compile combination.

### Claim 2 (depends on 1)

The source code error detection device according to claim 1, wherein
step (e) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is failed, determining whether the previous compile combination of the target compile combination has been compiled.

### Claim 3 (depends on 2)

The source code error detection device according to claim 2, wherein the compile combination information further comprises newly-added module version information, and step (f) comprises:
when the previous compile combination of the target compile combination has been compiled, determining whether a compiled result of the previous compile combination is successful; and
step (g) comprises:
when the compiled result of the previous compile combination is successful, utilizing the newly-added module version information in the target compile combination as the erroneous version information.

### Claim 4 (depends on 1)

The source code error detection device according to claim 1, wherein step (e) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is successful, determining whether the next compile combination of the target compile combination has been compiled.

### Claim 5 (depends on 4)

The source code error detection device according to claim 4, wherein the compile combination information further comprises newly-added module version information, and step (f) comprises:
when the next compile combination of the target compile combination has been compiled, determining whether a compiled result of the next compile combination is failed; and
step (g) comprises:
when the compiled result of the next compile combination is failed, utilizing the newly-added module version information in the next compile combination as the erroneous version information.

### Claim 6 (depends on 1)

The source code error detection device according to claim 1, wherein the processing unit further executes the program instructions to perform steps of:
h) when the adjacent compile combination has not been compiled, selecting another target compile combination from the compile combinations by a search method.

### Claim 7 (depends on 6)

The source code error detection device according to claim 6, wherein the search method is a binary search method.

### Claim 8 (depends on 6)

The source code error detection device according to claim 6, wherein step (h) comprises:
according to the compiled result of the target compile combination, selecting one compile combination with earlier module adding time or later module adding time from the compile combinations as the another target compile combination.

### Claim 9 (depends on 8)

The source code error detection device according to claim 8, wherein step (h) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is failed, selecting a compile combination with earlier module adding time from the compile combinations as the another target compile combination.

### Claim 10 (depends on 8)

The source code error detection device according to claim 8, wherein step (h) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is successful, selecting a compile combination with later module adding time from the compile combinations as the another target compile combination.

### Claim 11

A source code error detection method, a database storing source codes of a plurality of versions of a plurality of function modules, each version of each function module corresponding to version information, the source code error detection method for identifying erroneous version information, the source code error detection method comprising:
a) obtaining a compile combination information list, the compile combination information list comprising a plurality of sets of compile combination information corresponding to a plurality of compile combinations, the sets of compile combination information arranged according to a module adding time sequence, each set of compile combination information comprising compile combination version information;
b) selecting a target compile combination from the compile combinations;
c) retrieving the source codes of the function modules corresponding to the target compile combination from the database according to the compile combination version information of the target compile combination;
d) compiling the source codes to generate a compiled result of the target compile combination;
e) determining whether an adjacent compile combination, which is one of a previous compile combination and a next compile combination of the target compile combination, has been compiled according to the compiled result of the target compile combination;
f) when the adjacent compile combination has been compiled, determining whether the compiled result of the target compile combination is opposite to a compiled result of the adjacent compile combination; and
g) when the compiled result of the target compile combination is opposite to the compiled result of the adjacent compile combination, identifying the erroneous version information according to the compile combination information of the target compile combination and the compile combination information of the adjacent compile combination.

### Claim 12 (depends on 11)

The source code error detection method according to claim 11, wherein step (e) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is failed, determining whether the previous compile combination of the target compile combination has been compiled.

### Claim 13 (depends on 12)

The source code error detection method according to claim 12, wherein the compile combination information further comprises newly-added module version information, and step (f) comprises:
when the previous compile combination of the target compile combination has been compiled, determining whether a compiled result of the previous compile combination is successful; and
step (g) comprises:
when the compiled result of the previous compile combination is successful, utilizing the newly-added module version information in the target compile combination as the erroneous version information.

### Claim 14 (depends on 11)

The source code error detection method according to claim 11, wherein step (e) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is successful, determining whether the next compile combination of the target compile combination has been compiled.

### Claim 15 (depends on 14)

The source code error detection method according to claim 14, wherein the compile combination information further comprises newly-added module version information, and step (f) comprises:
when the next compile combination of the target compile combination has been compiled, determining whether a compiled result of the next compile combination is failed; and
step (g) comprises:
when the compiled result of the next compile combination is failed, utilizing the newly-added module version information in the next compile combination as the erroneous version information.

### Claim 16 (depends on 11)

The source code error detection method according to claim 11, further comprising:
h) when the adjacent compile combination has not been compiled, selecting another target compile combination from the compile combinations by a search method.

### Claim 17 (depends on 16)

The source code error detection method according to claim 16, wherein the search method is a binary search method.

### Claim 18 (depends on 16)

The source code error detection method according to claim 16, wherein step (h) comprises:
according to the compiled result of the target compile combination, selecting one compile combination with earlier module adding time or later module adding time from the compile combinations as the another target compile combination.

### Claim 19 (depends on 18)

The source code error detection method according to claim 18, wherein step (h) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is failed, selecting a compile combination with earlier module adding time from the compile combinations as the another target compile combination.

### Claim 20 (depends on 18)

The source code error detection method according to claim 18, wherein step (h) comprises:
determining whether the compiled result of the target compile combination is successful or failed; and
when the compiled result of the target compile combination is successful, selecting a compile combination with later module adding time from the compile combinations as the another target compile combination.
