# US 2012/0254162 A1 · Facet support, clustering for code query results

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

- Number: US 2012/0254162 A1
- Document ID: US20120254162A1
- Status: Published application
- Kind: A1
- Application number: 13/111,879
- Filed: 2011-05-19
- Published: 2012-10-04
- Earliest claimed: 2011-03-31
- Assignees: Infosys Technologies Limited
- Inventors: Allahbaksh Mohammedali Asadullah; Susan George; Basava Raju Muddu
- Web page: https://patentgrep.com/patent/US20120254162A1

## CPC

- G06F 16/3331: Query processing
- G06F 8/75: Structural analysis for program understanding
- G06F 16/338: Presentation of query results
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques and tools are described for refining source-code query results. For example, source-code query results for a query can be generated, semantic clusters of the source-code query results can be generated, and based on a selection of a semantic cluster option, refined source-code query results can be sent. Also, for example, source-code query results can be received, selections of facet values associated with groups of the source-code query results can be sent, and based on selected facet values, a subset of the source-code query results can be received.

## Claims

### Claim 1

A method implemented at least in part by a computer system, the method comprising:
generating source-code query results for a query;
generating, by the computer system, one or more semantic clusters of the source-code query results; and
sending refined source-code query results based at least on an indication of a selected one or more semantic cluster options.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
sending one or more semantic cluster options corresponding to the one or more semantic clusters.

### Claim 3 (depends on 2)

The method of claim 2, wherein a semantic cluster option of the one or more semantic cluster options comprises an indication of a percentage of the source-code query results that are included in a corresponding semantic cluster of the one or more semantic clusters.

### Claim 4 (depends on 1)

The method of claim 1, wherein generating the one or more semantic clusters comprises clustering based on words contained in code elements of source code.

### Claim 5 (depends on 4)

The method of claim 4, wherein the query is received from a user searching for source code;
wherein the source-code query results are sent to a client for display in a user interface; and
wherein the source-code query results correspond to the code elements of the source code.

### Claim 6 (depends on 1)

The method of claim 1, wherein the one or more semantic clusters comprises a subset of the plurality of source-code query results.

### Claim 7 (depends on 4)

The method of claim 4 further comprising:
generating cluster identifiers for the one or more semantic cluster options based on common words in index documents associated with the at least one semantic cluster.

### Claim 8 (depends on 1)

The method of claim 1 further comprising:
indexing source code, the indexing comprising creating index documents for code elements of the source code.

### Claim 9 (depends on 8)

The method of claim 8, wherein creating the index documents comprises inputting values into fields at least by parsing the source code based on a programming language.

### Claim 10 (depends on 1)

The method of claim 1 further comprising:
ranking the source-code query results; and
wherein generating the one or more semantic clusters comprises using one or more of the plurality of source-code query results chosen based on the rankings of the source-code query results.

### Claim 11 (depends on 1)

The method of claim 1 further comprising:
based on the source-code query results, determining one or more facet values; and
wherein generating refined source-code query results is further based at least on an indication of a selected at least one of the one of more facet values.

### Claim 12

A computing system comprising:
one or more processors; and
memory, the memory storing computer-executable instructions causing the computing system to perform a method, the method comprising:
sending a source-code query to a server;
receiving a query response at a client comprising source-code query results and one or more semantic cluster options;
displaying at the client a concept wheel comprising the one or more semantic cluster options as portions of an area of the concept wheel;
selecting at least one of the one or more semantic cluster options;
sending, to the server, an indication of the selected at least one of the one or more semantic cluster options; and
receiving, at the client, refined source-code query results based at least on the indication of the selected at least one of the one or more semantic cluster options.

### Claim 13

A computing system comprising:
one or more processors; and
memory, the memory storing computer-executable instructions causing the computing system to perform a method, the method comprising:
receiving one or more source-code query results;
sending one or more selections of one or more facet values that are associated with groups of the one or more source-code query results; and
based at least on the one or more selections of the one or more facet values, receiving a subset of the one or more source-code query results.

### Claim 14 (depends on 13)

The system of claim 13 further comprising;
receiving one or more facet options comprising one or more facets, wherein a facet of the one or more facets comprises a category based on a code attribute associated with at least one of the one or more source-code query results.

### Claim 15 (depends on 14)

The system of claim 14, wherein the code attribute associated with the one or more source-code query results is based on syntax of source-code elements associated with the one or more source-code query results.

### Claim 16 (depends on 14)

The system of claim 14, wherein a facet option of the one or more facet options comprises at least one of the one or more facet values, wherein the at least one of the one or more facet values corresponds to a sub-set of the one or more source-code query results.

### Claim 17 (depends on 13)

The system of claim 13, wherein a facet value of the one or more facet values comprises a code element identifier of a code element and an indicator of a number of the one or more source-code query results associated with the code element.

### Claim 18 (depends on 13)

The system of claim 13 further comprising:
indexing source code at least by creating index documents based on code elements of the source code;
wherein creating the index documents comprises inputting values into fields at least by parsing the source code based on a syntax of a programming language.

### Claim 19 (depends on 18)

The system of claim 18, wherein a code element identifier comprises an indication of a source-code element corresponding to values of fields in index documents of the one or more source-code query results.

### Claim 20 (depends on 13)

The system of claim 13 further comprising:
receiving one or more semantic cluster options associated with the one or more source-code query results;
selecting at least one of the one or more semantic cluster options; and
wherein the subset of the one or more source-code query results is further based at least on the selected at least one of the one or more semantic cluster options.

### Claim 21

A method implemented at least in part by a computing system, the method comprising:
receiving a source-code query from a client at a server;
determining, at the server, source-code query results based on the source-code query;
based on the source-code query results, determining one or more facets, the one or more facets based on a code attribute based on syntax of source-code elements associated with the one or more source-code query results;
based on the source-code query results, determining one or more facet values, the one or more facet values associated with a set of the source-code query results associated with at least one facet of the one or more facets;
sending, to the client, a query response comprising source-code query results and one or more facet options comprising the one or more facets and the one or more facet values, the facet values comprising a code element identifier and an indicator of a number of the one or more source-code query results in the set of the source-code query results associated with the code element;
receiving, at the server, an indication of a selected at least one of the one or more facet values; and
sending, to the client, refined source-code query results based on the indication of the selected at least one of the one or more facet values, the refined source-code query results comprising the set of the source-code query results.

### Claim 22

A computer-readable medium storing computer-executable instructions causing a computing system to perform a method, the method comprising:
in response to a query of an index, generating source-code query results associated with a plurality of index documents of the index;
determining one or more facet values based at least on the index documents associated with the source-code query results;
determining one or more semantic clusters that are based at least on a semantic relationship of source-code in one or more of the plurality of index documents associated with the source-code query results; and
determining refined source-code query results at least by determining an intersection of at least one of the one or more semantic clusters and at least one of the one or more facet values.
