Questions tagged [code-search]
23 questions
169
votes
4 answers
Replacement for Google Code Search?
Google Code Search has been incredibly valuable to me as a developer - I use it a couple times a week to see how other developers have used (usually poorly documented) APIs. It's also convenient to see the internals of some of those APIs, or to…

Nicholas Armstrong
- 5,814
- 2
- 28
- 18
8
votes
2 answers
Code fragment repository search on github.com
How can I search for code fragments on github.com? When I search for MSG_PREPARE in the repository ErikZalm/Marlin github shows up nothing.
I'm using the repository code search syntax described on https://github.com/search with…

powtac
- 40,542
- 28
- 115
- 170
5
votes
1 answer
Is there a way to make TFS code search recognize the "@" symbol?
I am searching for all occurrences of an out of date email domain in my codebase on TFS. Specifically, I am searching for "@testexample.com". However, the search seems to completely ignore the "@" symbol.
If I search "@testexample.com", I get all…

ChasetopherB
- 466
- 9
- 23
2
votes
0 answers
fast code searching in a large number of git repositories
We have about 20000 git repositories and the number is increasing. Sometimes we want to find out which repositories have contained a keyword on any of its branches/tags. git grep works for one or several repositories, but it takes too much time in…

ElpieKay
- 27,194
- 6
- 32
- 53
2
votes
2 answers
Find all patterns used in preg_* functions in PHP code
I have around 4k PHP files. There are more than 6k preg_* functions used in the code.
I need to find all patterns used in the code and extract them. My aim is to group such patterns and replace them with a named constant.
I want to make a list like…

Shaunak Sontakke
- 980
- 1
- 7
- 17
2
votes
2 answers
TFS CodeSearch - Search multiple Git Branches
We have a GIT Repository on our TFS 2017 OnPremise Installation (Version 15.117.26714.0) with CodeSearch installed.
As per default, CodeSearch is only indexing and searching in the default Branch of the GIT Repository (as it is stated in this How…

phifi
- 2,783
- 1
- 21
- 39
1
vote
1 answer
Difference between source code hosted on Android Code Search and on Git repos on android.googlesource.com?
I'm trying to understand the difference between the two resources:
Android Code Search - https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:;bpv=0
and
Git repositories on android - https://android.googlesource.com/
To add to…

user1678312
- 1,309
- 3
- 10
- 11
1
vote
0 answers
TFS search code under path and combine scopes
I am trying to search TFS 2018 using code search feature for some text (.NET version in this case) in all config files for a given project or path but it only works without path: or proj: scope returning results from entire repository.
For example…

Dean Kuga
- 11,878
- 8
- 54
- 108
1
vote
2 answers
Retention policy to TFS Code Search Server (Elastic Search)
We have TFS 2017.3 with separate Code Search server.
We have huge TFS DB (about 1.6TB), in the code search server we have 700GB dis space.
After few weeks the disk space running out and the code search not work in the tfs.
After we increase the…

Shayki Abramczyk
- 36,824
- 16
- 89
- 114
1
vote
1 answer
How long is the delay before I can use TFS code search on my latest changes?
When I was trying to search through some the most latest checked in changes, I couldn't find them in the result set. The code search gives 22 founds only. While, I get a full set 38 founds using Notepad++ 'Find in Files'.
Then, I specifically…

Darkato
- 482
- 3
- 8
1
vote
1 answer
Searching a code segment from a file
I am trying to achieve searching for bug fixes available on certain code repository. All I have is individual fix's code . I need to come up with an executable which can parse the entire file and can establish whether the fix is available or not…

pavan
- 77
- 1
- 9
0
votes
0 answers
PyGithub search_code query
I am using PyGithub, GitHub.search_code(query) for searching swagger/openapi files with apache/mit license:
(path:/swagger.yml OR path:/openapi.json) AND (apache OR mit license). It gives me 3.7k results in Github advanced search.
data_query =…
0
votes
0 answers
Vector based information retrieval on code resulting in high correlation values for all candidates
I am writing an algorithm that scans over a code base and uses the "text-embedding-ada-002" model from open ai, to turn each code line into a vector. Then I also use the same model to embed a natural language query e.g. "Where is the search…

hman
- 49
- 7
0
votes
1 answer
How can I list all occurrences of a search term in one specific file in VS Code?
In VS Code I can find all occurrences of a search term in all project files via the main Search ("Find in Files" -- Ctrl+Shift+F).
This is a nice list of occurrences grouped by filename. However when I have many files in my project, but I am…

halloleo
- 9,216
- 13
- 64
- 122
0
votes
0 answers
Search code GitHub API : combining qualifiers not working
I'm using the GitHub Code Search API with qualifiers.
For example, this query searches for repositories that contain a Dockerfile in them (and works fine, if you have an API Token
GET…

jlengrand
- 12,152
- 14
- 57
- 87