# US 2016/0259641 A1 · Tagging a program code portion

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

- Number: US 2016/0259641 A1
- Document ID: US20160259641A1
- Status: Published application
- Kind: A1
- Application number: 15/033,148
- Filed: 2013-12-16
- Published: 2016-09-08
- Earliest claimed: 2013-12-16
- Assignees: Hewlett Packard Enterprise Development LP
- Applicants: Hewlett Packard Enterprise Development LP
- Inventors: Guy Wiener; Omer Barkol
- Web page: https://patentgrep.com/patent/US20160259641A1

## CPC

- G06F 8/73: Program documentation
- G06F 8/36: Software reuse
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data structure is based on examples that include respective program code portions associated with corresponding tags that indicate content of the respective program code portions. A tagger determines at least one tag to associate with a first program code portion based on the data structure. An updated version of the data structure is received, The tagger, which remains unmodified, determines at least one tag to associate with a second program code portion based on the updated version of the data structure.

## Claims

### Claim 1

A method comprising:
receiving, by a system including a processor, a data structure created based on examples that include respective program code portions associated with corresponding tags that indicate content of the respective program code portions;
determining, by a tagger in the system, at least one tag to associate with a first program code portion based on the data structure;
receiving, by the system, an updated version of the data structure; and
determining, by the tagger that remains unmodified after receiving the updated version of the data structure, at least one tag to associate with a second program code portion based on the updated version of the data structure.

### Claim 2 (depends on 1)

The method of claim 1, wherein the tagger is to use the updated version of the data structure to tag the second program code portion for a different programming language, a different programming technology, or an additional tag, without modification of the tagger.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
parsing the first program code portion;
extracting text elements from the first program code portion according to the parsing,
wherein determining the at least one tag to associate with the first program code portion uses the extracted text elements.

### Claim 4 (depends on 3)

The method of claim 3, wherein the parsing comprises removing non-text elements of the first program code portion.

### Claim 5 (depends on 3)

The method of claim 3, wherein the parsing comprises rewriting one or multiple of the text elements into a set of tokens, wherein determining the at least one tag compares the set of tokens to respective elements of the program code portions in the examples.

### Claim 6 (depends on 3)

The method of claim 3, wherein the parsing is performed without assuming any specific programming language of the first program code portion.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining the at least one tag to associate with the first program code portion comprises:
computing scores for a plurality of tags based on comparing elements from the first source code portion to elements of the examples of data structure; and
selecting the at least one tag to associate with the first program code portion based on the computed scores.

### Claim 8 (depends on 7)

The method of claim 7, wherein comparing the elements comprises:
determining similarity of the elements of the received source code portion to the elements of the examples of the data structure.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
generating the updated data structure for at least one of a new programming language, a new programming technology, and a new tag.

### Claim 10

A system comprising:
a storage medium to store an index that correlates examples including program code portions with corresponding tags that indicate content of respective program code portions, the index useable to identify tags for program code portions that are to be tagged;
at least one processor; and
a tagger executable on the at least one processor to:
receive an updated version of the index that relates to a different collection of examples including program code portions with corresponding tags that indicate content of respective program code portions;
compare, without modifying the tagger, content of a first program code portion with content of examples including program code portions in the updated version of the index;
identify, for the first program code portion, at least one tag from the updated version of the index based on the comparing.

### Claim 11 (depends on 10)

The computer system of claim 10, wherein the tags are selected from among information identifying a programming language, information identifying a programming technology, information identifying a topic, and information identifying a skill.

### Claim 12 (depends on 10)

The computer system of claim 10, wherein the updated version of the index includes further examples including program code portions for at least one of a new programming language, a new programming technology, and a new tag, the further examples not previously included in the index stored in the storage medium.

### Claim 13 (depends on 10)

The computer system of claim 10, wherein index includes entries that each includes a set of tokens parsed from an example including a program code portion, and information relating to one or more tags associated with the set of tokens.

### Claim 14 (depends on 10)

The computer system of claim 10, wherein the tagger is executable to parse the first program code portion without assuming any specific programming language for the first program code portion.

### Claim 15

An article comprising at least non-transitory one machine-readable storage medium storing instructions that upon execution cause a computer system to:
receive a first version of a data structure created based on examples that include respective program code portions associated with corresponding tags that indicate content of the respective program code portions;
determine, by a tagger, at least one tag to associate with a first program code portion based on the data structure;
receive an updated version of the data structure that contains a further example for a new programming language, anew programming technology, or a new tag not represented by the first version of the data structure; and
determine, by the tagger that remains unmodified after receiving the updated version of the data structure, at least one tag to associate with a second program code portion based on the updated version of the data structure.
