How to search for Source Code

Searching repositories for code snippets can be done via the Jump to ID search or via the Advanced Search.

Just select Source Code from the Jump to ID drop-down list, type the search keyword and press enter to search the repositories of the project in context. You can also select Advanced Search from the Jump to ID drop-down list and do an advanced search for the required code.

  1. Click Advanced Search from the Jump to ID drop-down list.
  2. Type the search keyword.
  3. Select Source Code from the list of components.
  4. Set the scope of search: Select All Languages (default) or one of the programming languages such as C, C++, C# and so on from the All Languages drop-down list.
  5. Select either All Projects or a selected few projects (select one or more projects) from the IN PROJECTS list.
  6. Click Search.
    The search results are displayed in Files and Commits tabs.
  7. In case you want to search for code in a specific repository, select Project Home > Source Code, select a repository you want to search, click Browse Repository, and select the Search tab. You can search all files in a repository or narrow your scope to specific file types such as C, C++, C# and so on.
  8. Type your search keyword, select a file extension (optional) and click Search. The search results are displayed in Files and Commits tabs.