Bug 174720 - [Navigator] a possible bug in "org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/StringMatcher.java"
Summary: [Navigator] a possible bug in "org.eclipse.ui.ide/src/org/eclipse/ui/views/na...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-19 21:22 EST by Lingxiao Jiang CLA
Modified: 2019-09-06 16:14 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lingxiao Jiang CLA 2007-02-19 21:22:59 EST
Build ID: source from HEAD (checked out on 01/08/07)

Steps To Reproduce:
If take a look at line 232 in file org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/StringMatcher.java, the "for" loop has a check "tCurPos <= bound" which may be inappropriate when "segCount" is greater than 1: because "bound = end - fBound" (line 209) and "fBound" is the sum of all segments of string patterns, "bound" may be too small and cause the "for" loop to terminate too early.

Suggested fix: remove "tCurPos <= bound" from the loop condition, or add "fSegments[i].length" to "bound" at the end of each iteration. (The latter is better w.r.t. performance.)

More information:
The problem was noticed when we examined similar code in the following files:
org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/StringMatcher.java LINE:232
org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/StringMatcher.java LINE:255
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StringMatcher.java LINE:235
Comment 1 Eclipse Webmaster CLA 2019-09-06 16:14:45 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.