Buggy code:
public class Depend extends MatchingTask { private static class ClassFileInfo { public File absoluteFile ; public String relativeName ; public String className ; } private Path srcPath ; private Path destPath ; private File cache ; private Hashtable affectedClassMap ; private Hashtable classFileInfoMap ; private Hashtable classpathDependencies ; private Hashtable outOfDateClasses ; private boolean closure = false ; private boolean dump = false ; private Path dependClasspath ; private static final String CACHE_FILE_NAME = "dependencies.txt" ; private static final String CLASSNAME_PREPEND = "||:" ; public void setClasspath ( Path classpath ) { } public Path getClasspath ( ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } private Hashtable readCachedDependencies ( ) throws IOException { } private void writeCachedDependencies ( Hashtable dependencyMap ) throws IOException { } private void determineDependencies ( ) throws IOException { affectedClassMap = new Hashtable ( ) ; classFileInfoMap = new Hashtable ( ) ; boolean cacheDirty = false ; <START_BUG> Hashtable dependencyMap = null ; <END_BUG> File depCacheFile = null ; boolean depCacheFileExists = true ; long depCacheFileLastModified = Long . MAX_VALUE ; if ( ( cache ) != null ) { dependencyMap = readCachedDependencies ( ) ; depCacheFile = new File ( cache , Depend . CACHE_FILE_NAME ) ; depCacheFileExists = depCacheFile . exists ( ) ; depCacheFileLastModified = depCacheFile . lastModified ( ) ; } for ( Enumeration e = getClassFiles ( destPath ) . elements ( ) ; e . hasMoreElements ( ) ; ) { Depend . ClassFileInfo info = ( ( Depend . ClassFileInfo ) ( e . nextElement ( ) ) ) ; log ( ( "Adding<seq2seq4repair_space>class<seq2seq4repair_space>info<seq2seq4repair_space>for<seq2seq4repair_space>" + ( info . className ) ) , MSG_DEBUG ) ; classFileInfoMap . put ( info . className , info ) ; Vector dependencyList = null ; if ( ( cache ) != null ) { if ( depCacheFileExists && ( depCacheFileLastModified > ( info . absoluteFile . lastModified ( ) ) ) ) { dependencyList = ( ( Vector ) ( dependencyMap . get ( info . className ) ) ) ; } } if ( dependencyList == null ) { FileInputStream inFileStream = null ; try { inFileStream = new FileInputStream ( info . absoluteFile ) ; ClassFile classFile = new ClassFile ( ) ; classFile . read ( inFileStream ) ; dependencyList = classFile . getClassRefs ( ) ; if ( dependencyList != null ) { cacheDirty = true ; dependencyMap . put ( info . className , dependencyList ) ; } } finally { if ( inFileStream != null ) { inFileStream . close ( ) ; } } } for ( Enumeration depEnum = dependencyList . elements ( ) ; depEnum . hasMoreElements ( ) ; ) { String dependentClass = ( ( String ) ( depEnum . nextElement ( ) ) ) ; Hashtable affectedClasses = ( ( Hashtable ) ( affectedClassMap . get ( dependentClass ) ) ) ; if ( affectedClasses == null ) { affectedClasses = new Hashtable ( ) ; affectedClassMap . put ( dependentClass , affectedClasses ) ; } affectedClasses . put ( info . className , info ) ; } } classpathDependencies = null ; if ( ( dependClasspath ) != null ) { classpathDependencies = new Hashtable ( ) ; AntClassLoader loader = new AntClassLoader ( getProject ( ) , dependClasspath ) ; Hashtable classpathFileCache = new Hashtable ( ) ; Object nullFileMarker = new Object ( ) ; for ( Enumeration e = dependencyMap . keys ( ) ; e . hasMoreElements ( ) ; ) { String className = ( ( String ) ( e . nextElement ( ) ) ) ; Vector dependencyList = ( ( Vector ) ( dependencyMap . get ( className ) ) ) ; Hashtable dependencies = new Hashtable ( ) ; classpathDependencies . put ( className , dependencies ) ; for ( Enumeration e2 = dependencyList . elements ( ) ; e2 . hasMoreElements ( ) ; ) { String dependency = ( ( String ) ( e2 . nextElement ( ) ) ) ; Object classpathFileObject = classpathFileCache . get ( dependency ) ; if ( classpathFileObject == null ) { classpathFileObject = nullFileMarker ; if ( ( ! ( dependency . startsWith ( "java." ) ) ) && ( ! ( dependency . startsWith ( "javax." ) ) ) ) { URL classURL = loader . getResource ( ( ( dependency . replace ( '.' , '//' ) ) + ".class" ) ) ; if ( classURL != null ) { if ( classURL . getProtocol ( ) . equals ( "jar" ) ) { String jarFilePath = classURL . getFile ( ) ; if ( jarFilePath . startsWith ( "file:" ) ) { int classMarker = jarFilePath . indexOf ( '!' ) ; jarFilePath = jarFilePath . substring ( 5 , classMarker ) ; } classpathFileObject = new File ( jarFilePath ) ; } else if ( classURL . getProtocol ( ) . equals ( "file" ) ) { String classFilePath = classURL . getFile ( ) ; classpathFileObject = new File ( classFilePath ) ; } log ( ( ( ( ( ( "Class<seq2seq4repair_space>" + className ) + "<seq2seq4repair_space>depends<seq2seq4repair_space>on<seq2seq4repair_space>" ) + classpathFileObject ) + "<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>" ) + dependency ) , MSG_DEBUG ) ; } } classpathFileCache . put ( dependency , classpathFileObject ) ; } if ( ( classpathFileObject != null ) && ( classpathFileObject != nullFileMarker ) ) { File jarFile = ( ( File ) ( classpathFileObject ) ) ; dependencies . put ( jarFile , jarFile ) ; } } } } if ( ( ( cache ) != null ) && cacheDirty ) { writeCachedDependencies ( dependencyMap ) ; } } private int deleteAllAffectedFiles ( ) { } private int deleteAffectedFiles ( String className ) { } public void execute ( ) throws BuildException { } protected void scanDir ( File srcDir , String [ ] files ) { }

Fix:
Hashtable dependencyMap = new Hashtable ( ) ;