Buggy code:
public class Redirector { private static final int STREAMPUMPER_WAIT_INTERVAL = 1000 ; private static final String DEFAULT_ENCODING = System . getProperty ( "file.encoding" ) ; private class PropertyOutputStream extends ByteArrayOutputStream { private String property ; private boolean closed = false ; PropertyOutputStream ( String property ) { } public void close ( ) throws IOException { } } private File [ ] input ; private File [ ] out ; private File [ ] error ; private boolean logError = false ; private Redirector . PropertyOutputStream baos = null ; private Redirector . PropertyOutputStream errorBaos = null ; private String outputProperty ; private String errorProperty ; private String inputString ; private boolean appendOut = false ; private boolean appendErr = false ; private boolean alwaysLogOut = false ; private boolean alwaysLogErr = false ; private boolean createEmptyFilesOut = true ; private boolean createEmptyFilesErr = true ; private ProjectComponent managingTask ; private OutputStream outputStream = null ; private OutputStream errorStream = null ; private InputStream inputStream = null ; private PrintStream outPrintStream = null ; private PrintStream errorPrintStream = null ; private Vector outputFilterChains ; private Vector errorFilterChains ; private Vector inputFilterChains ; private String outputEncoding = Redirector . DEFAULT_ENCODING ; private String errorEncoding = Redirector . DEFAULT_ENCODING ; private String inputEncoding = Redirector . DEFAULT_ENCODING ; private boolean appendProperties = true ; private final ThreadGroup threadGroup = new ThreadGroup ( "redirector" ) ; private boolean logInputString = true ; private Object inMutex = new Object ( ) ; private Object outMutex = new Object ( ) ; private Object errMutex = new Object ( ) ; public Redirector ( Task managingTask ) { } public Redirector ( ProjectComponent managingTask ) { } public void setInput ( File input ) { } public void setInput ( File [ ] input ) { } public void setInputString ( String inputString ) { } public void setLogInputString ( boolean logInputString ) { } void setInputStream ( InputStream inputStream ) { } public void setOutput ( File out ) { } public void setOutput ( File [ ] out ) { } public void setOutputEncoding ( String outputEncoding ) { } public void setErrorEncoding ( String errorEncoding ) { } public void setInputEncoding ( String inputEncoding ) { } public void setLogError ( boolean logError ) { } public void setAppendProperties ( boolean appendProperties ) { } public void setError ( File error ) { } public void setError ( File [ ] error ) { } public void setOutputProperty ( String outputProperty ) { } public void setAppend ( boolean append ) { } public void setAlwaysLog ( boolean alwaysLog ) { } public void setCreateEmptyFiles ( boolean createEmptyFiles ) { } public void setErrorProperty ( String errorProperty ) { } public void setInputFilterChains ( Vector inputFilterChains ) { } public void setOutputFilterChains ( Vector outputFilterChains ) { } public void setErrorFilterChains ( Vector errorFilterChains ) { } private void setPropertyFromBAOS ( ByteArrayOutputStream baos , String propertyName ) throws IOException { } public void createStreams ( ) { } private void outStreams ( ) { } private void errorStreams ( ) { if ( ( ( error ) != null ) && ( ( error . length ) > 0 ) ) { String logHead = new StringBuffer ( "Error<seq2seq4repair_space>" ) . append ( ( appendErr ? "appended" : "redirected" ) ) . append ( "<seq2seq4repair_space>to<seq2seq4repair_space>" ) . toString ( ) ; errorStream = foldFiles ( error , logHead , MSG_VERBOSE , appendErr , createEmptyFilesErr ) ; } else <START_BUG> if ( ! ( ( logError ) || ( ( outputStream ) == null ) ) ) { <END_BUG> long funnelTimeout = 0L ; OutputStreamFunneler funneler = new OutputStreamFunneler ( outputStream , funnelTimeout ) ; try { outputStream = new org . apache . tools . ant . util . LineOrientedOutputStreamRedirector ( funneler . getFunnelInstance ( ) ) ; errorStream = new org . apache . tools . ant . util . LineOrientedOutputStreamRedirector ( funneler . getFunnelInstance ( ) ) ; } catch ( IOException eyeOhEx ) { throw new BuildException ( "error<seq2seq4repair_space>splitting<seq2seq4repair_space>output//error<seq2seq4repair_space>streams" , eyeOhEx ) ; } } if ( ( errorProperty ) != null ) { if ( ( errorBaos ) == null ) { errorBaos = new Redirector . PropertyOutputStream ( errorProperty ) ; managingTask . log ( ( "Error<seq2seq4repair_space>redirected<seq2seq4repair_space>to<seq2seq4repair_space>property:<seq2seq4repair_space>" + ( errorProperty ) ) , MSG_VERBOSE ) ; } OutputStream keepAliveError = new KeepAliveOutputStream ( errorBaos ) ; errorStream = ( ( ( error ) == null ) || ( ( error . length ) == 0 ) ) ? keepAliveError : new TeeOutputStream ( errorStream , keepAliveError ) ; } else { errorBaos = null ; } } public ExecuteStreamHandler createHandler ( ) throws BuildException { } protected void handleOutput ( String output ) { } protected int handleInput ( byte [ ] buffer , int offset , int length ) throws IOException { } protected void handleFlush ( String output ) { } protected void handleErrorOutput ( String output ) { } protected void handleErrorFlush ( String output ) { } public OutputStream getOutputStream ( ) { } public OutputStream getErrorStream ( ) { } public InputStream getInputStream ( ) { } public void complete ( ) throws IOException { } public void setProperties ( ) { } private OutputStream foldFiles ( File [ ] file , String logHead , int loglevel , boolean append , boolean createEmptyFiles ) { } }

Fix:
if ( ( ! ( ( logError ) || ( ( outputStream ) == null ) ) ) && ( ( errorProperty ) == null ) ) {