Buggy code:
class MAuditStreamHandler implements ExecuteStreamHandler { protected OutputStream xmlOut = null ; protected Hashtable auditedFiles = new Hashtable ( ) ; protected BufferedReader br ; protected RegexpMatcher matcher ; protected MAudit task ; MAuditStreamHandler ( MAudit task , OutputStream xmlOut ) { } protected static DocumentBuilder getDocumentBuilder ( ) { } public void setProcessErrorStream ( InputStream is ) { } public void setProcessInputStream ( OutputStream os ) { } public void setProcessOutputStream ( InputStream is ) throws IOException { } public void start ( ) throws IOException { } public void stop ( ) { Document doc = MAuditStreamHandler . getDocumentBuilder ( ) . newDocument ( ) ; Element rootElement = doc . createElement ( "classes" ) ; Enumeration keys = auditedFiles . keys ( ) ; Hashtable filemapping = task . getFileMapping ( ) ; rootElement . setAttribute ( "audited" , String . valueOf ( filemapping . size ( ) ) ) ; rootElement . setAttribute ( "reported" , String . valueOf ( auditedFiles . size ( ) ) ) ; int errors = 0 ; while ( keys . hasMoreElements ( ) ) { String filepath = ( ( String ) ( keys . nextElement ( ) ) ) ; Vector v = ( ( Vector ) ( auditedFiles . get ( filepath ) ) ) ; String fullclassname = ( ( String ) ( filemapping . get ( filepath ) ) ) ; if ( fullclassname == null ) { <START_BUG> task . getProject ( ) . log ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>class<seq2seq4repair_space>mapping<seq2seq4repair_space>for<seq2seq4repair_space>" + filepath ) , MSG_WARN ) ; <END_BUG> continue ; } int pos = fullclassname . lastIndexOf ( '.' ) ; String pkg = ( pos == ( - 1 ) ) ? "" : fullclassname . substring ( 0 , pos ) ; String clazzname = ( pos == ( - 1 ) ) ? fullclassname : fullclassname . substring ( ( pos + 1 ) ) ; Element clazz = doc . createElement ( "class" ) ; clazz . setAttribute ( "package" , pkg ) ; clazz . setAttribute ( "name" , clazzname ) ; clazz . setAttribute ( "violations" , String . valueOf ( v . size ( ) ) ) ; errors += v . size ( ) ; for ( int i = 0 ; i < ( v . size ( ) ) ; i ++ ) { MAudit . Violation violation = ( ( MAudit . Violation ) ( v . elementAt ( i ) ) ) ; Element error = doc . createElement ( "violation" ) ; error . setAttribute ( "line" , String . valueOf ( violation . line ) ) ; error . setAttribute ( "message" , violation . error ) ; clazz . appendChild ( error ) ; } rootElement . appendChild ( clazz ) ; } rootElement . setAttribute ( "violations" , String . valueOf ( errors ) ) ; if ( ( xmlOut ) != null ) { Writer wri = null ; try { wri = new OutputStreamWriter ( xmlOut , "UTF-8" ) ; wri . write ( "<?xml<seq2seq4repair_space>version=\"1.0\"?>\n" ) ; new DOMElementWriter ( ) . write ( rootElement , wri , 0 , "<seq2seq4repair_space>" ) ; wri . flush ( ) ; } catch ( IOException exc ) { task . log ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>write<seq2seq4repair_space>log<seq2seq4repair_space>file" , MSG_ERR ) ; } finally { if ( ( ( xmlOut ) != ( System . out ) ) && ( ( xmlOut ) != ( System . err ) ) ) { if ( wri != null ) { try { wri . close ( ) ; } catch ( IOException e ) { } } } } } } protected void addViolationEntry ( String file , MAudit . Violation entry ) { } protected void parseOutput ( BufferedReader br ) throws IOException { } protected void processLine ( String line ) { } }

Fix:
task . log ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>class<seq2seq4repair_space>mapping<seq2seq4repair_space>for<seq2seq4repair_space>" + filepath ) , MSG_WARN ) ;