Patent attributes
Systems and methods for indexing and accessing code snippets in repositories. A program graph index is maintained for code snippets within a repository with documents that have at least one code snippet. The program graph index includes a program graph indicating a relationship between program elements within each source code snippet within the documents. A user provided code snippet is received and a target program graph indicating a relationship between program elements within the user provided code snippet is determined and compared to each respective program graph. Based on the comparison, an identified set of documents within the repository of documents is determined that have code snippets with respective program graphs that are also at least a sub-tree of the target program graph. At least one document in the identified set of documents is presented to a user.