Download Dealing with Multiple Compiler Error Messages and more Study notes Java Programming in PDF only on Docsity!
Fix the First, Ignore the Rest: Dealing with
Multiple Compiler Error Messages
BRETT A BECKER*, CORMAC MURRAY UNIVERSITY COLLEGE DUBLIN
TIANYI TAO, CHANGHENG SONG FUDAN UNIVERSITY
ROBERT MCCARTNEY ‘ UNIVERSITY OF CONNECTICUT
KATE SANDERS ‘ RHODE ISLAND COLLEGE
*BR E T T DOT BECKE R AT UCD DOT I E
Background
- Compiler error messages pose substantial problems for novices
(both technical and affective)
- In order to help students learning to program, many computing
education researchers have analyzed the compiler error messages
generated by them
Motivation
public class PrintNums { public static void main (String[] args) { for(int x = 0: x < 10; x++) System.out.println(x); } }
- One syntax error: regular colon instead of semicolon
Motivation
represents actual error
- The rest are spurious – they
are resolved when the
original error is resolved
SIGCSE 2018, BALTIMORE MARYLAND 5
PrintNums.java:3: error: ';' expected for(int x = 0: x < 10; x++) ˆ PrintNums.java:3: error: ';' expected for(int x = 0: x < 10; x++) ˆ PrintNums.java:3: error: illegal start of type for(int x = 0: x < 10; x++) ˆ PrintNums.java:3: error: illegal start of expression for(int x = 0: x < 10; x++) ˆ PrintNums.java:3: error: ')' expected for(int x = 0: x < 10; x++) ˆ PrintNums.java:3: error: illegal start of expression for(int x = 0: x < 10; x++) ˆ 6 errors
2/23/
A Compiler Error Message Taxonomy
- All messages after first (it is possible there is only a first)
A Compiler Error Message Taxonomy
- All messages after first (it is possible there is only a first)
- Not due to genuine errors in code
A Compiler Error Message Taxonomy
- All messages after first (it is possible there is only a first)
- Not due to genuine errors in code
- Will eventually be a first error - Due to genuine error(s) in code
A Compiler Error Message Taxonomy
- All messages after first (it is possible there is only a first)
- Not due to genuine errors in code
- Will eventually be a first error
SIGCSE 2018, BALTIMORE MARYLAND 11
- Due to genuine error(s) in code
- Would have been first at some point, but something happened to prevent this
2/23/
Student Perspectives
- Frustration & confusion
- 85% of students reported compiler error messages to be frustrating
- 92% reported compiler error messages to be a barrier to progress
- 64% reported subsequent compiler error messages to be confusing
Student Perspectives
- Misconceptions
- 67% believe the first error message may not represent a true error
- 21% believe that subsequent error messages always represent true
errors
- 11% believe that these never represent true errors
- When confronted with subsequent error messages:
- 43% try to fix one error (only 22% focus on the first only)
- 34% try to fix more than one error simultaneously
Research Questions
1. Out of all compiler error messages, what proportion are first
messages?
When first error messages are considered separately:
2. How does the most-frequent list of messages change?
3. How do the frequencies of specific error messages change?
Methodology
SIGCSE 2018, BALTIMORE MARYLAND 17
• 21 million BlueJ (Java) error messages from the Blackbox
dataset
- Six months (US users only)
• Analyzed and compared:
- All first error messages
- All subsequent error messages
- All error messages
2/23/
RQ
When first error messages are considered separately, how
does the most-frequent list of messages change?
SIGCSE 2018, BALTIMORE MARYLAND 19
- Top 10 (top 67%) error messages only presented here – we looked at top 23 (top 85%)
- R (^) F is rank (amongst all first messages), RS is rank amongst all subsequent, R (^) A is rank amongst all
- Shifts of up to 19 ranks observed (this message has a rank in one list that is 19 positions from its rank in another list)
2/23/
RQ
When first error messages are considered separately, how
do the frequencies of specific error messages change?
SIGCSE 2018, BALTIMORE MARYLAND 20
- Top 23 error messages making up 85% of all
- Some error messages are 7 times more likely to be first than subsequent
- Some are ~3 times more likely to be subsequent than first
2/23/