Buggy code:
public class FileUtils { private static Random rand = new Random ( System . currentTimeMillis ( ) ) ; private static Object lockReflection = new Object ( ) ; private static Method setLastModified = null ; private boolean onNetWare = Os . isFamily ( "netware" ) ; private static boolean [ ] isSpecial = new boolean [ 256 ] ; private static char [ ] escapedChar1 = new char [ 256 ] ; private static char [ ] escapedChar2 = new char [ 256 ] ; public static FileUtils newFileUtils ( ) { } protected FileUtils ( ) { } public URL getFileURL ( File file ) throws MalformedURLException { } public void copyFile ( String sourceFile , String destFile ) throws IOException { } public void copyFile ( String sourceFile , String destFile , FilterSetCollection filters ) throws IOException { } public void copyFile ( String sourceFile , String destFile , FilterSetCollection filters , boolean overwrite ) throws IOException { } public void copyFile ( String sourceFile , String destFile , FilterSetCollection filters , boolean overwrite , boolean preserveLastModified ) throws IOException { } public void copyFile ( String sourceFile , String destFile , FilterSetCollection filters , boolean overwrite , boolean preserveLastModified , String encoding ) throws IOException { } public void copyFile ( String sourceFile , String destFile , FilterSetCollection filters , Vector filterChains , boolean overwrite , boolean preserveLastModified , String encoding , Project project ) throws IOException { } public void copyFile ( String sourceFile , String destFile , FilterSetCollection filters , Vector filterChains , boolean overwrite , boolean preserveLastModified , String inputEncoding , String outputEncoding , Project project ) throws IOException { } public void copyFile ( File sourceFile , File destFile ) throws IOException { } public void copyFile ( File sourceFile , File destFile , FilterSetCollection filters ) throws IOException { } public void copyFile ( File sourceFile , File destFile , FilterSetCollection filters , boolean overwrite ) throws IOException { } public void copyFile ( File sourceFile , File destFile , FilterSetCollection filters , boolean overwrite , boolean preserveLastModified ) throws IOException { } public void copyFile ( File sourceFile , File destFile , FilterSetCollection filters , boolean overwrite , boolean preserveLastModified , String encoding ) throws IOException { } public void copyFile ( File sourceFile , File destFile , FilterSetCollection filters , Vector filterChains , boolean overwrite , boolean preserveLastModified , String encoding , Project project ) throws IOException { } public void copyFile ( File sourceFile , File destFile , FilterSetCollection filters , Vector filterChains , boolean overwrite , boolean preserveLastModified , String inputEncoding , String outputEncoding , Project project ) throws IOException { } protected final Method getSetLastModified ( ) { } public void setFileLastModified ( File file , long time ) throws BuildException { } public File resolveFile ( File file , String filename ) { } public File normalize ( String path ) { } public File createTempFile ( String prefix , String suffix , File parentDir ) { } public boolean contentEquals ( File f1 , File f2 ) throws IOException { } public File getParentFile ( File f ) { } public static final String readFully ( Reader rdr ) throws IOException { } public static final String readFully ( Reader rdr , int bufferSize ) throws IOException { } public boolean createNewFile ( File f ) throws IOException { } public boolean isSymbolicLink ( File parent , String name ) throws IOException { } public String removeLeadingPath ( File leading , File path ) { String l = normalize ( leading . getAbsolutePath ( ) ) . getAbsolutePath ( ) ; String p = normalize ( path . getAbsolutePath ( ) ) . getAbsolutePath ( ) ; if ( l . equals ( p ) ) { return "" ; } <START_BUG> if ( ! ( l . endsWith ( "//" ) ) ) { <END_BUG> l += File . separator ; } if ( p . startsWith ( l ) ) { return p . substring ( l . length ( ) ) ; } else { return p ; } } public String toURI ( String path ) { } public String fromURI ( String uri ) { } public boolean fileNameEquals ( File f1 , File f2 ) { } public void rename ( File from , File to ) throws IOException { } }

Fix:
if ( ! ( l . endsWith ( File . separator ) ) ) {