# US 2012/0204157 A1 · Quicker Translation of a Computer Program Source Code

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

- Number: US 2012/0204157 A1
- Document ID: US20120204157A1
- Status: Published application
- Kind: A1
- Application number: 13/023,642
- Filed: 2011-02-09
- Published: 2012-08-09
- Earliest claimed: 2011-02-09
- Assignees: Particle Code, Inc.
- Inventors: Guy Ben-Artzi; Yotam Shacham; Yehuda Levi
- Web page: https://patentgrep.com/patent/US20120204157A1

## CPC

- G06F 8/51: Source to source
- G06F 8/751: {Code clone detection}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of methods and systems for managing translation of a source code Of a computer application, at a processing device, are described. A pre-translation analysis of the source code may be performed to determine a plurality of look-alike code snippets. Thereafter, a report may be generated for indicating at least one parameter associated with the plurality of look-alike code snippets. Subsequently, at least one of the plurality of look-alike code snippets may be modified with at least one pre-stored code snippet, based on the at least one parameter.

## Claims

### Claim 1

A method for managing translation of a computer program source code, at a processing device, the method comprising:
analyzing the source code to determine a plurality of look-alike code snippets;
generating a report to indicate at least one parameter associated with the plurality of look-alike code snippets; and
modifying at least one of the plurality of look-alike code snippets with at least one: pre-stored code snippet based on the at least one parameter.

### Claim 2 (depends on 1)

The method of claim 1, wherein each of the plurality of look-alike code snippets provides identical output.

### Claim 3 (depends on 1)

The method of claim 1, further comprising storing the plurality of look-alike code snippets in a database.

### Claim 4 (depends on 1)

The method of claim 1, wherein the at least one parameter is one of a location of each of the plurality of look-alike code snippets, a description of plurality of look-alike code snippets, or a number of instances of plurality of look-alike code snippets.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
determining whether the at least one pre-stored code snippet, associated with the at least one of the plurality of look-alike code snippets, is stored in the database; and
determining a number of instances of the plurality of look-alike code snippets.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
modifying at least one of the plurality of look-alike code snippets with the at least one pre-stored code snippet, when the at least one pre-stored code snippet is available in the database and the number of instances of the plurality of look-alike code snippets exceeds a first threshold.

### Claim 7 (depends on 5)

The method of claim 5, further comprising:
prompting a user for a manual input, when the at least one pre-stored code snippet is unavailable in the database or the number of instances of the plurality of look-alike code snippets does not exceed a first threshold.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
tracking the manual input;
re-sourcing the manual inputs as one or more code snippets in the database; and
associating the one or more code snippets with the at least one of the plurality of look-alike code snippets.

### Claim 9 (depends on 8)

The method of claim 8, further comprising storing in a database one or more snippets, provided by the user, corresponding to the at least one of the plurality of look-alike code snippets.

### Claim 10 (depends on 1)

The method of claim 1, further comprising downloading executable instructions that, if executed by the device, cause the device to perform said analyzing, said generating, and said modifying.

### Claim 11 (depends on 1)

The method of claim 1, further comprising providing for downloading executable instructions that, if executed by a processor, cause the processor to perform said analyzing, said generating, and-said modifying.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
generating a super-set code snippet for each of the plurality of look-alike code snippets;
associating the super-set code snippet with the at least one of the plurality of look-alike code snippets; and
storing the super-set code snippet in a database.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
ranking the at least one pre-stored code snippet that is associated with the at least one of the plurality of look-alike code snippets; and
selecting the at least one pre-stored code snippet based on the at least one parameter and the rank of the at least one pre-stored code snippet.

### Claim 14

A computer-readable medium having stored thereon instructions that, if executed by a processor, cause the processor to execute a method for managing translation of a computer program source code, the method comprising:
analyzing the source code to determine a plurality of look-alike code snippets;
generating a report to indicate at least one parameter associated with the look-alike code snippets; and
modifying at least one of the plurality of look-alike code snippets with at least one pre-stored code snippet, based on the parameter.

### Claim 15 (depends on 14)

The computer-readable medium of claim 14, wherein each of the plurality of look-alike code snippets provides identical output.

### Claim 16 (depends on 14)

The computer-readable medium of claim 14, further comprising instructions for storing the plurality of look-alike code snippets in, a database.

### Claim 17 (depends on 14)

The computer-readable medium of claim 14, wherein the at least one parameter is one of a location of each of the plurality of look-alike code snippets, a description of plurality of look-alike code snippets, or a number of instances of plurality of look-alike code snippets.

### Claim 18 (depends on 14)

The computer-readable medium of claim 14, further comprising instructions for:
determining whether the at least one pre-stored code snippet, associated with the at least one of the plurality of look-alike code snippets, is stored in the database; and
determining a number of instances of the plurality of look-alike code snippets.

### Claim 19 (depends on 18)

The computer-readable medium of claim 18, further comprising instructions for:
modifying at least one of the plurality of look-alike code snippets with the at least one pre-stored code snippet, when the at least one pre-stored code snippet is available in the database and the number of instances of the plurality of look-alike code snippets exceeds a first threshold.

### Claim 20 (depends on 18)

The computer-readable medium of claim 18, further comprising instructions for:
prompting a user for one or more inputs, when the at least one pre-stored code snippet is unavailable in the database or the number of instances of the plurality of look-alike code snippets does not exceed a first threshold.

### Claim 21 (depends on 20)

The computer-readable medium of claim 20, further comprising instructions for:
tracking the inputs;
re-sourcing the the manual input as one or more code snippets in the database; and
associating the one or more code snippets with the at least one of the plurality of look-alike code snippets.

### Claim 22 (depends on 21)

The computer-readable medium of claim 21, further comprising instructions for storing in a database one or more snippets, provided by the user, corresponding to the at least one of the plurality of look-alike code snippets.

### Claim 23 (depends on 14)

The computer-readable medium of claim 14, further comprising instructions for:
generating a super-set code snippet for each of the plurality of look-alike code snippets;
associating the super-set code snippet with the at least one of the plurality of look-alike code snippets; and
storing the super-set code snippet in a database.

### Claim 24 (depends on 14)

The computer-readable medium of claim 14, further comprising instructions for:
ranking the at least one pre-stored code snippet that is associated with the at least one of the plurality of look-alike code snippets, and
selecting the at least one pre-stored code snippet based on the at least one parameter and the rank of the at least one pre-stored code snippet.

### Claim 25

A system for managing translation of a computer program source code, the system comprising:
means for analyzing the source code to determine a plurality of look-alike code snippets;
means for generating a report to indicate at least one parameter associated with the look-alike code snippets; and
means for modifying at least one of the plurality of look-alike code snippets with at least one pre-stored code snippet, based on the parameter.

### Claim 26 (depends on 25)

The system of claim 25, wherein each of the plurality of look-alike code snippets provides identical output.

### Claim 27 (depends on 25)

The system of claim 25, further comprising means for storing the plurality of look-alike code snippets in a database.

### Claim 28 (depends on 25)

The system of claim 25, wherein the at least one parameter is one of a location of each of the plurality of look-alike code snippets, a description of plurality of look-alike code snippets, or a number of instances of plurality of look-alike code snippets.

### Claim 29 (depends on 25)

The system of claim 25, further comprising:
means for determining whether the at least one pre-stored code snippet, associated with the at least one of the plurality of look-alike code snippets, is stored in the database; and
means for determining a number of instances of the plurality of look-alike code snippets.

### Claim 30 (depends on 29)

The system of claim 29, further comprising:
means for modifying at least one of the plurality of look-alike code snippets with the at least one pre-stored code snippet, when the at least one pre-stored code snippet is available in the database and the number of instances of the plurality of look-alike code snippets exceeds a first threshold.

### Claim 31 (depends on 29)

The system of claim 29, further comprising:
means for prompting a user for one or more inputs, when the at least one pre stored code snippet is unavailable in the database or the number of instances of the plurality of look-alike code snippets does not exceed a first threshold.

### Claim 32 (depends on 31)

The system of claim 31, further comprising:
means for tracking the inputs;
means for re-sourcing the inputs as one or more code snippets in the database; and
means for associating the one or more code snippets with the at least one of the plurality of look-alike code snippets.

### Claim 33 (depends on 32)

The system of claim 32, further comprising means for storing, in a database, one or more snippets, provided by the user, corresponding to the at least one of the plurality of look-alike code snippets.

### Claim 34 (depends on 25)

The system of claim 25, further comprising:
means for generating a super-set code snippet for each of the plurality of look-alike code snippets;
means for associating the super-set code snippet with the at least one of the plurality of look-alike code snippets; and
means for storing the super-set code snippet in a database.

### Claim 35 (depends on 25)

The system of claim 25, further comprising:
means for ranking the at least one pre-stored code snippet that is associated with the at least one of the plurality of look-alike code snippets; and
means for selecting the at least one pre-stored code snippet based on the at least one parameter and the rank of the at least one pre-stored code snippet.

### Claim 36

An apparatus for managing translation of a computer program source code, the apparatus comprising:
a memory for storing at least one pre-stored code snippet; and
a processor communicatively coupled to the memory, wherein the processor is configured to:
analyze the source code to determine a plurality of look-alike code snippets;
generate a report to indicate at least one parameter associated with the look-alike code snippets; and
modify at least one of the plurality of look-alike code snippets with the at least one pre-stored code snippet, based on the parameter.

### Claim 37 (depends on 36)

The apparatus of claim 36, wherein each of the plurality of look-alike code snippets provides identical output.

### Claim 38 (depends on 36)

The apparatus of claim 36, wherein the processor is further configured to store the plurality of look-alike code snippets in a database.

### Claim 39 (depends on 36)

The apparatus of claim 36, wherein the at least one parameter is one of a location of each of the plurality of look-alike code snippets, a description of plurality of look-alike code snippets, a number of instances of plurality of look-alike code snippets, or the at least one pre-stored code snippet for replacing the at least one of the plurality of look-alike code snippets.

### Claim 40 (depends on 36)

The apparatus of claim 36, wherein the processor is further configured to:
determine whether the at least one pre-stored code snippet, associated with the at least one of the plurality of look-alike code snippets, is stored in the database; and
determine a number of instances of the plurality of look-alike code snippets.

### Claim 41 (depends on 40)

The apparatus of claim 40, wherein the processor is further configured to:
modify at least one of the plurality of look-alike code snippets with the at least one pre-stored code snippet, when the at least one pre-stored code snippet is available in the database and the number of instances of the plurality of look-alike code snippets exceeds a first threshold.

### Claim 42 (depends on 40)

The apparatus of claim 40, wherein the processor is further configured to:
prompt a user for one or more inputs, when the at least one pre-stored code snippet is unavailable in the database or the number of instances of the plurality of look-alike code snippets does not exceed a first threshold.

### Claim 43 (depends on 42)

The apparatus of claim 42, wherein the processor is further configured to:
track the inputs;
re-source the inputs as one or more code snippets in the database; and
associate the one or more code snippets with the at least one of the plurality of look-alike code snippets.

### Claim 44 (depends on 43)

The apparatus of claim 43, wherein the processor is further configured to store, in a database, one or more snippets, provided by the user, corresponding to the at least one of the plurality of look-alike code snippets.

### Claim 45 (depends on 36)

The apparatus of claim 36, wherein the processor is further configured to:
generate a super-set code snippet for each of the plurality of look-alike code snippets;
associate the super-set code snippet with the at least one of the plurality of look-alike code snippets; and
store the super-set code snippet in a database.

### Claim 46 (depends on 36)

The apparatus of claim 36, wherein the processor is further configured to
rank the at least one pre-stored code snippet that is associated with the at least one of the plurality of look-alike code snippets and
select the at least one pre-stored code snippet based on the at least one parameter and the rank of the at least one pre-stored code snippet.
