Bug 323213

Summary: [search] Wrongs results while searching for a type in default package
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: CoreAssignee: Satyam Kandula <satyam.kandula>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: frederic_fusier, markus.kell.r
Version: 3.6   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Dani Megert CLA 2010-08-20 02:44:12 EDT
Broken since R3.4.

1. start with a new workspace
2. paste the following snippet into the Package Explorer:
public class s {}
3. create package 'a'
3. in the Package Explorer use mouse to move s.java into 'a'
==> error dialog (see attached screen shot), no exception

Putting the found references into the Search view reveals strange matches.

Filed against JDT Core since this is probably a search engine issue.
Comment 1 Dani Megert CLA 2010-08-20 03:07:22 EDT
Created attachment 177065 [details]
Screenshot
Comment 2 Frederic Fusier CLA 2010-08-20 05:08:32 EDT
Not so funny for me as it seems I introduced it... :-S

Satyam, please investigate, thanks
Comment 3 Satyam Kandula CLA 2011-01-27 01:33:52 EST
Need to use Sun JDK 1.6 to reproduce this problem.
Bug in CharOperation.match() causes wrong match when the start and the end characters match the pattern. 
The patch attached in bug 324189 comment 32 fixes the problem.

*** This bug has been marked as a duplicate of bug 324189 ***
Comment 4 Dani Megert CLA 2011-01-27 03:03:12 EST
Verified in I20110126-1800.