Bug 15400

Summary: Compiler generates way too many errors
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: erich_gamma
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2002-05-07 07:52:35 EDT
Build 20020502

When compiling StyledText outside its context, the compiler ends up generating 
around 1,400 errors. This is way to many.

For the same scenario, javac aborts after 100 errors.

In our case, we need to be more clever since we want to still issue problem 
methods. However markers should be better issued (avoid redundant problems in 
same reference context etc...)
Comment 1 Philipe Mulet CLA 2002-05-07 09:16:27 EDT
If avoiding reporting similar errors on the same reference context 
(method/type/unit), the error count drops down to 754 for this scenario, almost 
cut by half.
Comment 2 Philipe Mulet CLA 2002-05-07 09:45:42 EDT
Can bring the number down to 738 if issuing same errors for invalid types, 
invalid argument types, field types and exception types.
Comment 3 Philipe Mulet CLA 2002-05-07 17:02:06 EDT
Here is a simpler heuristic to reduce the problem count down to a reasonable 
number (<= 50 per unit).

If there are too many problems, we sort them, and keep the first 50 of them.

Sorting is done using priorities, computed as follows:

- base priority is 1000 - problem line number (if belows 0, then it is 0).
- if problem is error: 			 priority += 10000
- if problem is outside method: 	 priority += 3000
- if problem is inside static method: 	 priority +=1000
- if problem is first inside its context priority += 1000
Comment 4 Philipe Mulet CLA 2002-05-13 12:31:17 EDT
Released heuristic into HEAD.
Fixed