Buggy code:
public static String build ( SketchData data , String buildPath , File tempBuildFolder , Compiler . ProgressListener progListener , boolean verbose ) throws PreferencesMapException , RunnerException { } public static Uploader getUploaderByPreferences ( boolean noUploadPort ) { } public static boolean upload ( SketchData data , Uploader uploader , String buildPath , String suggestedClassName , boolean usingProgrammer , boolean noUploadPort , List < String > warningsAccumulator ) throws Exception { } public Compiler ( SketchData _sketch , String _buildPath , String _primaryClassName ) throws RunnerException { } protected boolean buildPreferencesChanged ( File buildPrefsFile , String newBuildPrefs ) { } protected String buildPrefsString ( ) { } protected void setProgressListener ( Compiler . ProgressListener _progressListener ) { } protected void cleanup ( boolean force , File tempBuildFolder ) { } protected void size ( PreferencesMap prefs ) throws RunnerException { } public boolean compile ( boolean _verbose ) throws PreferencesMapException , RunnerException { } private PreferencesMap createBuildPreferences ( String _buildPath , String _primaryClassName ) throws RunnerException { } private List < File > compileFiles ( File outputPath , File sourcePath , boolean recurse , List < File > includeFolders ) throws PreferencesMapException , RunnerException { } protected static String unescapeDepFile ( String line ) { } private boolean isAlreadyCompiled ( File src , File obj , File dep , Map < String , String > prefs ) { } private void execAsynchronously ( String [ ] command ) throws RunnerException { } public void message ( String s ) { int i ; if ( ! ( verbose ) ) { String buildPath = prefs . get ( "build.path" ) ; while ( ( i = s . indexOf ( ( buildPath + ( File . separator ) ) ) ) != ( - 1 ) ) { s = ( s . substring ( 0 , i ) ) + ( s . substring ( ( i + ( ( buildPath + ( File . separator ) ) . length ( ) ) ) ) ) ; } } String errorFormat = "([\\w\\d_]+.\\w+):(\\d+):\\s*error:\\s*(.*)\\s*" ; String [ ] pieces = PApplet . match ( s , errorFormat ) ; if ( pieces != null ) { String error = pieces [ 3 ] ; String msg = "" ; if ( pieces [ 3 ] . trim ( ) . equals ( "SPI.h:<seq2seq4repair_space>No<seq2seq4repair_space>such<seq2seq4repair_space>file<seq2seq4repair_space>or<seq2seq4repair_space>directory" ) ) { error = I18n . _ ( "Please<seq2seq4repair_space>import<seq2seq4repair_space>the<seq2seq4repair_space>SPI<seq2seq4repair_space>library<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>Sketch<seq2seq4repair_space>><seq2seq4repair_space>Import<seq2seq4repair_space>Library<seq2seq4repair_space>menu." ) ; msg = I18n . _ ( ( "\nAs<seq2seq4repair_space>of<seq2seq4repair_space>Arduino<seq2seq4repair_space>0019,<seq2seq4repair_space>the<seq2seq4repair_space>Ethernet<seq2seq4repair_space>library<seq2seq4repair_space>depends<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>SPI<seq2seq4repair_space>library." + "\nYou<seq2seq4repair_space>appear<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>using<seq2seq4repair_space>it<seq2seq4repair_space>or<seq2seq4repair_space>another<seq2seq4repair_space>library<seq2seq4repair_space>that<seq2seq4repair_space>depends<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>SPI<seq2seq4repair_space>library.\n\n" ) ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "'BYTE'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { error = I18n . _ ( "The<seq2seq4repair_space>'BYTE'<seq2seq4repair_space>keyword<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>longer<seq2seq4repair_space>supported." ) ; msg = I18n . _ ( ( "\nAs<seq2seq4repair_space>of<seq2seq4repair_space>Arduino<seq2seq4repair_space>1.0,<seq2seq4repair_space>the<seq2seq4repair_space>\'BYTE\'<seq2seq4repair_space>keyword<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>longer<seq2seq4repair_space>supported." + "\nPlease<seq2seq4repair_space>use<seq2seq4repair_space>Serial.write()<seq2seq4repair_space>instead.\n\n" ) ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "no<seq2seq4repair_space>matching<seq2seq4repair_space>function<seq2seq4repair_space>for<seq2seq4repair_space>call<seq2seq4repair_space>to<seq2seq4repair_space>'Server::Server(int)'" ) ) { error = I18n . _ ( "The<seq2seq4repair_space>Server<seq2seq4repair_space>class<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>EthernetServer." ) ; msg = I18n . _ ( ( "\nAs<seq2seq4repair_space>of<seq2seq4repair_space>Arduino<seq2seq4repair_space>1.0,<seq2seq4repair_space>the<seq2seq4repair_space>Server<seq2seq4repair_space>class<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>Ethernet<seq2seq4repair_space>library<seq2seq4repair_space>" + "has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>to<seq2seq4repair_space>EthernetServer.\n\n" ) ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "no<seq2seq4repair_space>matching<seq2seq4repair_space>function<seq2seq4repair_space>for<seq2seq4repair_space>call<seq2seq4repair_space>to<seq2seq4repair_space>'Client::Client(byte<seq2seq4repair_space>[4],<seq2seq4repair_space>int)'" ) ) { error = I18n . _ ( "The<seq2seq4repair_space>Client<seq2seq4repair_space>class<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>EthernetClient." ) ; msg = I18n . _ ( ( "\nAs<seq2seq4repair_space>of<seq2seq4repair_space>Arduino<seq2seq4repair_space>1.0,<seq2seq4repair_space>the<seq2seq4repair_space>Client<seq2seq4repair_space>class<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>Ethernet<seq2seq4repair_space>library<seq2seq4repair_space>" + "has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>to<seq2seq4repair_space>EthernetClient.\n\n" ) ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "'Udp'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { error = I18n . _ ( "The<seq2seq4repair_space>Udp<seq2seq4repair_space>class<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>EthernetUdp." ) ; msg = I18n . _ ( ( "\nAs<seq2seq4repair_space>of<seq2seq4repair_space>Arduino<seq2seq4repair_space>1.0,<seq2seq4repair_space>the<seq2seq4repair_space>Udp<seq2seq4repair_space>class<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>Ethernet<seq2seq4repair_space>library<seq2seq4repair_space>" + "has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>to<seq2seq4repair_space>EthernetUdp.\n\n" ) ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "'class<seq2seq4repair_space>TwoWire'<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>member<seq2seq4repair_space>named<seq2seq4repair_space>'send'" ) ) { error = I18n . _ ( "Wire.send()<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>Wire.write()." ) ; msg = I18n . _ ( ( "\nAs<seq2seq4repair_space>of<seq2seq4repair_space>Arduino<seq2seq4repair_space>1.0,<seq2seq4repair_space>the<seq2seq4repair_space>Wire.send()<seq2seq4repair_space>function<seq2seq4repair_space>was<seq2seq4repair_space>renamed<seq2seq4repair_space>" + "to<seq2seq4repair_space>Wire.write()<seq2seq4repair_space>for<seq2seq4repair_space>consistency<seq2seq4repair_space>with<seq2seq4repair_space>other<seq2seq4repair_space>libraries.\n\n" ) ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "'class<seq2seq4repair_space>TwoWire'<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>member<seq2seq4repair_space>named<seq2seq4repair_space>'receive'" ) ) { error = I18n . _ ( "Wire.receive()<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>renamed<seq2seq4repair_space>Wire.read()." ) ; msg = I18n . _ ( ( "\nAs<seq2seq4repair_space>of<seq2seq4repair_space>Arduino<seq2seq4repair_space>1.0,<seq2seq4repair_space>the<seq2seq4repair_space>Wire.receive()<seq2seq4repair_space>function<seq2seq4repair_space>was<seq2seq4repair_space>renamed<seq2seq4repair_space>" + "to<seq2seq4repair_space>Wire.read()<seq2seq4repair_space>for<seq2seq4repair_space>consistency<seq2seq4repair_space>with<seq2seq4repair_space>other<seq2seq4repair_space>libraries.\n\n" ) ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "'Mouse'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { error = I18n . _ ( "'Mouse'<seq2seq4repair_space>only<seq2seq4repair_space>supported<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>Arduino<seq2seq4repair_space>Leonardo" ) ; } if ( pieces [ 3 ] . trim ( ) . equals ( "'Keyboard'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { error = I18n . _ ( "'Keyboard'<seq2seq4repair_space>only<seq2seq4repair_space>supported<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>Arduino<seq2seq4repair_space>Leonardo" ) ; } if ( BaseNoGui . isTeensyduino ( ) ) { if ( verbose ) { String buildPath = prefs . get ( "build.path" ) ; while ( ( i = s . indexOf ( ( buildPath + ( File . separator ) ) ) ) != ( - 1 ) ) { s = ( s . substring ( 0 , i ) ) + ( s . substring ( ( i + ( ( buildPath + ( File . separator ) ) . length ( ) ) ) ) ) ; } } <START_BUG> pieces = PApplet . match ( s , "^(\\w+\\.\\w+):(\\d+):\\d+:\\s*error:\\s*(.+)\\s*" ) ; <END_BUG> String m = pieces [ 3 ] . trim ( ) ; String err = null ; if ( m . equals ( "'Keyboard'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>USB<seq2seq4repair_space>Keyboard,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'Keyboard'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; } if ( m . equals ( "'Mouse'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>USB<seq2seq4repair_space>Mouse,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'Mouse'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; } if ( m . equals ( "'Joystick'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>USB<seq2seq4repair_space>Joystick,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'Joystick'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; } if ( m . equals ( "'Disk'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>USB<seq2seq4repair_space>Disk,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'Disk'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; } if ( m . equals ( "'usbMIDI'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>USB<seq2seq4repair_space>MIDI<seq2seq4repair_space>device,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'usbMIDI'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; } if ( m . equals ( "'RawHID'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>USB<seq2seq4repair_space>RawHID<seq2seq4repair_space>device,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'RawHID'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; } if ( m . equals ( "'FlightSimCommand'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>Flight<seq2seq4repair_space>Simulator<seq2seq4repair_space>device,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'FlightSimCommand'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; } if ( m . equals ( "'FlightSimInteger'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>declared<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>scope" ) ) { msg = "<seq2seq4repair_space>To<seq2seq4repair_space>make<seq2seq4repair_space>a<seq2seq4repair_space>Flight<seq2seq4repair_space>Simulator<seq2seq4repair_space>device,<seq2seq4repair_space>use<seq2seq4repair_space>the<seq2seq4repair_space>Tools<seq2seq4repair_space>><seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>menu\n" ; err = "<seq2seq4repair_space>'FlightSimInteger'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>compatible<seq2seq4repair_space>USB<seq2seq4repair_space>Type<seq2seq4repair_space>setting" ; }

Fix:
pieces = PApplet . match ( s , "(\\w+\\.\\w+):(\\d+):\\d+:\\s*error:\\s*(.+)\\s*" ) ;