Buggy code:
public class ModifiedSelector extends BaseExtendSelector implements BuildListener , ResourceSelector { private static final String CACHE_PREFIX = "cache." ; private static final String ALGORITHM_PREFIX = "algorithm." ; private static final String COMPARATOR_PREFIX = "comparator." ; private ModifiedSelector . CacheName cacheName = null ; private String cacheClass ; private ModifiedSelector . AlgorithmName algoName = null ; private String algorithmClass ; private ModifiedSelector . ComparatorName compName = null ; private String comparatorClass ; private boolean update = true ; private boolean selectDirectories = true ; private boolean selectResourcesWithoutInputStream = true ; private boolean delayUpdate = true ; private Comparator comparator = null ; private Algorithm algorithm = null ; private Cache cache = null ; private int modified = 0 ; private boolean isConfigured = false ; private Vector configParameter = new Vector ( ) ; private Vector specialParameter = new Vector ( ) ; private ClassLoader myClassLoader = null ; private Path classpath = null ; public ModifiedSelector ( ) { } public void verifySettings ( ) { } public void configure ( ) { } protected Object loadClass ( String classname , String msg , Class type ) { } public boolean isSelected ( Resource resource ) { if ( resource . isFilesystemOnly ( ) ) { FileResource fileResource = ( ( FileResource ) ( resource ) ) ; File file = fileResource . getFile ( ) ; String filename = fileResource . getName ( ) ; File basedir = fileResource . getBaseDir ( ) ; return isSelected ( basedir , filename , file ) ; } else { try { FileUtils fu = FileUtils . getFileUtils ( ) ; <START_BUG> File tmpFile = fu . createTempFileName ( "modified-" , ".tmp" , null , true ) ; <END_BUG> Resource tmpResource = new FileResource ( tmpFile ) ; ResourceUtils . copyResource ( resource , tmpResource ) ; boolean isSelected = isSelected ( tmpFile . getParentFile ( ) , tmpFile . getName ( ) , resource . toLongString ( ) ) ; tmpFile . delete ( ) ; return isSelected ; } catch ( UnsupportedOperationException uoe ) { log ( ( ( ( ( ( "The<seq2seq4repair_space>resource<seq2seq4repair_space>'" + ( resource . getName ( ) ) ) + "'<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>provide<seq2seq4repair_space>an<seq2seq4repair_space>InputStream,<seq2seq4repair_space>so<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>checked.<seq2seq4repair_space>" ) + "Akkording<seq2seq4repair_space>to<seq2seq4repair_space>'selres'<seq2seq4repair_space>attribute<seq2seq4repair_space>value<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( selectResourcesWithoutInputStream ? "" : "<seq2seq4repair_space>not" ) ) + "selected." ) , MSG_INFO ) ; return selectResourcesWithoutInputStream ; } catch ( Exception e ) { throw new BuildException ( e ) ; } } } public boolean isSelected ( File basedir , String filename , File file ) { } private boolean isSelected ( File basedir , String filename , String cacheKey ) { } protected void saveCache ( ) { } public void setAlgorithmClass ( String classname ) { } public void setComparatorClass ( String classname ) { } public void setCacheClass ( String classname ) { } public void setUpdate ( boolean update ) { } public void setSeldirs ( boolean seldirs ) { } public void setSelres ( boolean newValue ) { } public int getModified ( ) { } public void setModified ( int modified ) { } public boolean getDelayUpdate ( ) { } public void setDelayUpdate ( boolean delayUpdate ) { } public void addClasspath ( Path path ) { } public ClassLoader getClassLoader ( ) { } public void setClassLoader ( ClassLoader loader ) { } public void addParam ( String key , Object value ) { } public void addParam ( Parameter parameter ) { } public void setParameters ( Parameter [ ] parameters ) { } public void useParameter ( Parameter parameter ) { } protected void tryToSetAParameter ( Object obj , String name , String value ) { } public String toString ( ) { } public void buildFinished ( BuildEvent event ) { } public void targetFinished ( BuildEvent event ) { } public void taskFinished ( BuildEvent event ) { } public void buildStarted ( BuildEvent event ) { } public void targetStarted ( BuildEvent event ) { } public void taskStarted ( BuildEvent event ) { } public void messageLogged ( BuildEvent event ) { } public Cache getCache ( ) { } public void setCache ( ModifiedSelector . CacheName name ) { } public static class CacheName extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public Algorithm getAlgorithm ( ) { } public void setAlgorithm ( ModifiedSelector . AlgorithmName name ) { } public static class AlgorithmName extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public Comparator getComparator ( ) { } public void setComparator ( ModifiedSelector . ComparatorName name ) { } public static class ComparatorName extends EnumeratedAttribute { public String [ ] getValues ( ) { } } }

Fix:
File tmpFile = fu . createTempFile ( "modified-" , ".tmp" , null , true , false ) ;