Methods, systems, and apparatus, including computer program products are provided for indexing tags in source code. Implementations provide an enhanced retrieval of source code, in which a score for each of a plurality of files is derived based on a quantity of references to each file in source code
Methods, systems, and apparatus, including computer program products are provided for indexing tags in source code. Implementations provide an enhanced retrieval of source code, in which a score for each of a plurality of files is derived based on a quantity of references to each file in source code of the remaining plurality of files. A query is received identifying a source code tag. Matching files of the plurality of files that satisfy the query are identified, a ranking of the matching files is generated based on the derived scores, and the ranking is provided.
대표청구항▼
1. A machine-readable storage device having instructions stored thereon that, when executed by a computer, cause the computer to perform operations comprising: deriving a score for each of a plurality of files based on a quantity of references to each file in source code of other files of the plural
1. A machine-readable storage device having instructions stored thereon that, when executed by a computer, cause the computer to perform operations comprising: deriving a score for each of a plurality of files based on a quantity of references to each file in source code of other files of the plurality of files;receiving a query and data specifying a context, wherein the context is one of a file being edited, a name of a current directory, or a Programming language;identifying files of the plurality of files that satisfy the query, wherein the operation of identifying the files that satisfy the query comprises using an index of information associated with each of the plurality of files, wherein the information associated with a file includes a file name and a derived score;ranking the identified files in decreasing order of the derived score of each of the files, wherein files that do not match the context are ranked lower in the order than other identified files; andproviding the ranked files in response to the query. 2. The machine-readable storage device of claim 1, wherein a reference to a file is one of an import statement or an include statement in the source code of the other files. 3. The machine-readable storage device of claim 1, wherein the index is updated in response to one or more changes associated with one or more of the plurality of files. 4. The machine-readable storage device of claim 3, wherein the index is updated by removing information associated with one of the plurality of files in response to receiving an indication that the file has been deleted. 5. The machine-readable storage device of claim 1, wherein the index is re-created at regular time intervals. 6. The machine-readable storage device of claim 1, wherein the information associated with a file further includes information for tags associated with the file. 7. The machine-readable storage device of claim 6, wherein the associated tag information comprises one or more of a tag name, a tag definition, a description of the file, and one or more code lines associated with the tag. 8. The machine-readable storage device of claim 6, where the associated tag information further comprises a tag popularity score based on the number of times the tag name is used within the source code of the other files. 9. A system, comprising: a machine-readable storage device having instructions stored thereon; anda data processing apparatus operable to execute the instructions to perform operations comprising: deriving a score for each of a plurality of files based on a quantity of references to each file in source code of other files of the plurality of files;receiving a query and data specifying a context, wherein the context is one of a file being edited, a name of a current directory, or a Programming language;identifying files of the plurality of files that satisfy the query, wherein the operation of identifying the files that satisfy the query comprises using an index of information associated with each of the plurality of files, wherein the information associated with a file includes a file name and a derived score;ranking the identified files in decreasing order of the derived score of each of the files, wherein files that do not match the context are ranked lower in the order than other identified files; andproviding the ranked files in response to the query. 10. The system of claim 9, wherein a reference to a file is one of an import statement or an include statement in the source code of the other files. 11. The system of claim 9, wherein the index is updated in response to one or more changes associated with one or more of the plurality of files. 12. The system of claim 9, wherein the index is updated by removing information associated with one of the plurality of files in response to receiving an indication that the file has been deleted. 13. The system of claim 9, wherein the index is re-created at regular time intervals. 14. The system of claim 9, wherein the information associated with a file further includes information for tags associated with the file. 15. The system of claim 14, wherein the associated tag information comprises one or more of a tag name, a tag definition, a description of the file, and one or more code lines associated with the tag. 16. The system of claim 15, where the associated tag information further comprises a tag popularity score based on the number of times the tag name is used within the source code of the other files. 17. A computer-implemented method comprising: deriving a score for each of a plurality of files based on a quantity of references to each file in source code of other files of the plurality of files;receiving a query and data specifying a context, wherein the context is one of a file being edited, a name of a current directory, or a Programming language;identifying, by operation of a processing device, files of the plurality of files that satisfy the query, wherein the operation of identifying the files that satisfy the query comprises using an index of information associated with each of the plurality of files, wherein the information associated with a file includes a file name and a derived score;ranking the identified files in decreasing order of the derived score of each of the files, wherein files that do not match the context are ranked lower in the order than other identified files; andproviding the ranked files in response to the query. 18. The method of claim 17, wherein a reference to a file is one of an import statement or an include statement in the source code of the other files. 19. The method of claim 17, wherein the index is updated in response to one or more changes associated with one or more of the plurality of files. 20. The method of claim 17, wherein the index is updated by removing information associated with one of the plurality of files in response to receiving an indication that the file has been deleted. 21. The method of claim 17, wherein the index is re-created at regular time intervals. 22. The method of claim 17, wherein the information associated with a file further includes information for tags associated with the file. 23. The method of claim 22, wherein the associated tag information comprises one or more of a tag name, a tag definition, a description of the file, and one or more code lines associated with the tag. 24. The method of claim 23, where the associated tag information further comprises a tag popularity score based on the number of times the tag name is used within the source code of the other files.
연구과제 타임라인
LOADING...
LOADING...
LOADING...
LOADING...
LOADING...
이 특허에 인용된 특허 (1)
Na, Piaw; Sung, Phil, Preferential ranking of code search results.
Balasubramanian, Swaminathan; Hamilton, II, Rick A.; O'Connell, Brian M.; Walker, Keith R., Program code library consolidation in an integrated development environment.
Balasubramanian, Swaminathan; Hamilton, II, Rick A.; O'Connell, Brian M.; Walker, Keith R., Program code library searching and selection in a networked computing environment.
Balasubramanian, Swaminathan; Hamilton, II, Rick A.; O'Connell, Brian M.; Walker, Keith R., Program code library searching and selection in a networked computing environment.
Balasubramanian, Swaminathan; Hamilton, II, Rick A.; O'Connell, Brian M.; Walker, Keith R., Program code library searching and selection in a networked computing environment.
Balasubramanian, Swaminathan; Hamilton, II, Rick A.; O'Connell, Brian M.; Walker, Keith R., Program code library searching and selection in a networked computing environment.
Balasubramanian, Swaminathan; Hamilton, II, Rick A.; O'Connell, Brian M.; Walker, Keith R., Replacing annotated program code in a networked computing environment.
Balasubramanian, Swaminathan; Hamilton, II, Rick A.; O'Connell, Brian M.; Walker, Keith R., Replacing annotated program code in a networked computing environment.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.