mxr case sensitive search fails to find all relevant matches

RESOLVED FIXED

Status

--
major
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: nelson, Assigned: timeless)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

When doing a case sensitive search, MXR sometimes fails to find all 
(or even any) of the proper matches.  To illustrate:

1) Do this test to see all the occurrences of the string config.mk in the
makefiles in the security tree.

http://mxr.mozilla.org/security/search?string=config.mk&tree=security

2) Now repeat the test with case sensitivity on.

http://mxr.mozilla.org/security/search?string=config.mk&case=on&tree=security

It finds NO MATCHES.  This can seriously deceive a developer!
(Reporter)

Comment 2

10 years ago
Here's another example that does not use "."

http://mxr.mozilla.org/security/search?string=%5ENSSCertificate_&regexp=on&find=nss%2Flib%2Fpki&tree=security

Finds all lines that begin with NSSCertificate_, including those that do
not match by case.  But turning on case matching,

http://mxr.mozilla.org/security/search?string=%5ENSSCertificate_&regexp=on&case=on&find=nss%2Flib%2Fpki&tree=security

finds no matches.  In this case, Problem appears to be the carat.
(Reporter)

Comment 3

10 years ago
The the second example, the one in comment 2, the correct desired search 
results may be found with this search:

http://mxr.mozilla.org/security/search?string=%5ENSSCertificate_&regexp=on&find=nss%2Flib%2Fpki&filter=NSSCertificate_&tree=security

Basically it does a case-insensitive regexp search, then does a case sensitive
filtration of the results, avoiding the carat in the filter.  With the carat
in the filter, it has the same problem.
(Reporter)

Comment 4

10 years ago
Here's an example that does not use regex.

http://mxr.mozilla.org/security/search?string=name.other&find=nss%2F&tree=security

finds 98 lines of code containing "name.other", but turn on case sensitive
and it finds none.

http://mxr.mozilla.org/security/search?string=name.other&case=on&find=nss%2F&tree=security
(Assignee)

Comment 5

10 years ago
thanks. i finally investigated this.

i'm escaping things too many times.
Status: NEW → ASSIGNED
(Assignee)

Comment 6

10 years ago
http://mxr.mozilla.org/security/search?string=Makefile.com&case=on&find=nss%2F

ended up being a nice testcase

http://hg.mozilla.org/webtools/mxr/rev/71ad992159d7
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Updated

10 years ago
Assignee: nobody → timeless
Depends on: 487085
You need to log in before you can comment on or make changes to this bug.