Buggy code:
} catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } while ( lines . hasMoreElements ( ) ) { int endComment ; try { line = ( ( FixCRLF . OneLiner . BufferLine ) ( lines . nextElement ( ) ) ) ; } catch ( NoSuchElementException e ) { throw new TaskException ( "Error" , e ) ; } String lineString = line . getLineString ( ) ; int linelen = line . length ( ) ; if ( ( tabs ) == ( FixCRLF . ASIS ) ) { try { outWriter . write ( lineString ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } else { int ptr ; while ( ( ptr = line . getNext ( ) ) < linelen ) { switch ( lines . getState ( ) ) { case FixCRLF . NOTJAVA : notInConstant ( line , line . length ( ) , outWriter ) ; break ; case FixCRLF . IN_MULTI_COMMENT : if ( ( endComment = lineString . indexOf ( "*//" , line . getNext ( ) ) ) >= 0 ) { endComment += 2 ; lines . setState ( FixCRLF . LOOKING ) ; } else { endComment = linelen ; } notInConstant ( line , endComment , outWriter ) ; break ; case FixCRLF . IN_SINGLE_COMMENT : notInConstant ( line , line . length ( ) , outWriter ) ; lines . setState ( FixCRLF . LOOKING ) ; break ; case FixCRLF . IN_CHAR_CONST : case FixCRLF . IN_STR_CONST : int begin = line . getNext ( ) ; char terminator = ( ( lines . getState ( ) ) == ( FixCRLF . IN_STR_CONST ) ) ? '\"' : '\'' ; endOfCharConst ( line , terminator ) ; while ( ( line . getNext ( ) ) < ( line . getLookahead ( ) ) ) { if ( ( line . getNextCharInc ( ) ) == '\t' ) { line . setColumn ( ( ( ( line . getColumn ( ) ) + ( tablength ) ) - ( ( line . getColumn ( ) ) % ( tablength ) ) ) ) ; } else { line . incColumn ( ) ; } } try { outWriter . write ( line . substring ( begin , line . getNext ( ) ) ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } lines . setState ( FixCRLF . LOOKING ) ; break ; case FixCRLF . LOOKING : nextStateChange ( line ) ; notInConstant ( line , line . getLookahead ( ) , outWriter ) ; break ; } } } try { outWriter . write ( eolstr ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } try { if ( ( ctrlz ) == ( FixCRLF . ASIS ) ) { outWriter . write ( lines . getEofStr ( ) ) ; } else if ( ( ctrlz ) == ( FixCRLF . ADD ) ) { outWriter . write ( FixCRLF . CTRLZ ) ; } } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } finally { try { outWriter . close ( ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } File destFile = new File ( destD , file ) ; try { lines . close ( ) ; lines = null ; } catch ( IOException e ) { throw new TaskException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>close<seq2seq4repair_space>source<seq2seq4repair_space>file<seq2seq4repair_space>" + srcFile ) ) ; } if ( destFile . exists ( ) ) { log ( "destFile<seq2seq4repair_space>exists" , MSG_DEBUG ) ; <START_BUG> if ( ! ( FileUtils . newFileUtils ( ) . contentEquals ( destFile , tmpFile ) ) ) { <END_BUG> log ( ( destFile + "<seq2seq4repair_space>is<seq2seq4repair_space>being<seq2seq4repair_space>written" ) , MSG_DEBUG ) ; if ( ! ( destFile . delete ( ) ) ) { throw new TaskException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>" + destFile ) ) ; } if ( ! ( tmpFile . renameTo ( destFile ) ) ) { throw new TaskException ( ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>transform<seq2seq4repair_space>" + srcFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + destFile ) + ".<seq2seq4repair_space>Couldn't<seq2seq4repair_space>rename<seq2seq4repair_space>temporary<seq2seq4repair_space>file:<seq2seq4repair_space>" ) + tmpFile ) ) ; } } else { log ( ( destFile + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>written,<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>contents<seq2seq4repair_space>are<seq2seq4repair_space>identical" ) , MSG_DEBUG ) ; if ( ! ( tmpFile . delete ( ) ) ) { throw new TaskException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>" + tmpFile ) ) ; } } } else { log ( "destFile<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" , MSG_DEBUG ) ; if ( ! ( tmpFile . renameTo ( destFile ) ) ) { throw new TaskException ( ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>transform<seq2seq4repair_space>" + srcFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + destFile ) + ".<seq2seq4repair_space>Couldn't<seq2seq4repair_space>rename<seq2seq4repair_space>temporary<seq2seq4repair_space>file:<seq2seq4repair_space>" ) + tmpFile ) ) ; } } tmpFile = null ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } finally { try { if ( lines != null ) { lines . close ( ) ; } } catch ( IOException io ) { log ( ( "Error<seq2seq4repair_space>closing<seq2seq4repair_space>" + srcFile ) , MSG_ERR ) ; } if ( tmpFile != null ) { tmpFile . delete ( ) ; } } } public static class AddAsisRemove extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public static class CrLf extends EnumeratedAttribute { public String [ ] getValues ( ) { } } class OneLiner implements Enumeration { private int state = ( javafiles ) ? FixCRLF . LOOKING : FixCRLF . NOTJAVA ; private StringBuffer eolStr = new StringBuffer ( FixCRLF . LINEBUFLEN ) ; private StringBuffer eofStr = new StringBuffer ( ) ; private StringBuffer line = new StringBuffer ( ) ;

Fix:
if ( ! ( FileUtils . contentEquals ( destFile , tmpFile ) ) ) {