#vulnerable code 
                             @Override
	public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
		if (roundEnv.processingOver()) {
            return false;
        }

		for (Element element : roundEnv.getElementsAnnotatedWith(Extension.class)) {
            // check if @Extension is put on class and not on method or constructor
            if (!(element instanceof TypeElement)) {
				continue;
			}

            // check if class extends/implements an extension point
            if (!isExtension(element.asType())) {
                continue;
            }

            TypeElement extensionElement = (TypeElement) element;
//            Extension annotation = element.getAnnotation(Extension.class);
            List<TypeElement> extensionPointElements = findExtensionPoints(extensionElement);
            if (extensionPointElements.isEmpty()) {
                // TODO throw error ?
                continue;
            }

            String extension = getBinaryName(extensionElement);
            for (TypeElement extensionPointElement : extensionPointElements) {
                String extensionPoint = getBinaryName(extensionPointElement);
                Set<String> extensionPoints = extensions.get(extensionPoint);
                if (extensionPoints == null) {
                    extensionPoints = new TreeSet<>();
                    extensions.put(extensionPoint, extensionPoints);
                }
                extensionPoints.add(extension);
            }
        }

		/*
		if (!roundEnv.processingOver()) {
			return false;
		}
		*/

        // read old extensions
        oldExtensions = storage.read();
        for (Map.Entry<String, Set<String>> entry : oldExtensions.entrySet()) {
            String extensionPoint = entry.getKey();
            if (extensions.containsKey(extensionPoint)) {
                extensions.get(extensionPoint).addAll(entry.getValue());
            } else {
                extensions.put(extensionPoint, entry.getValue());
            }
        }

        // write extensions
        storage.write(extensions);

		return false;
//		return true; // no further processing of this annotation type
	} 
                            #location 56 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                @Override
	public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
		if (roundEnv.processingOver()) {
            return false;
        }

		for (Element element : roundEnv.getElementsAnnotatedWith(Extension.class)) {
            // check if @Extension is put on class and not on method or constructor
            if (!(element instanceof TypeElement)) {
				continue;
			}

            // check if class extends/implements an extension point
            if (!isExtension(element.asType())) {
                continue;
            }

            TypeElement extensionElement = (TypeElement) element;
//            Extension annotation = element.getAnnotation(Extension.class);
            List<TypeElement> extensionPointElements = findExtensionPoints(extensionElement);
            if (extensionPointElements.isEmpty()) {
                // TODO throw error ?
                continue;
            }

            String extension = getBinaryName(extensionElement);
            for (TypeElement extensionPointElement : extensionPointElements) {
                String extensionPoint = getBinaryName(extensionPointElement);
                Set<String> extensionPoints = extensions.get(extensionPoint);
                if (extensionPoints == null) {
                    extensionPoints = new TreeSet<>();
                    extensions.put(extensionPoint, extensionPoints);
                }
                extensionPoints.add(extension);
            }
        }

		/*
		if (!roundEnv.processingOver()) {
			return false;
		}
		*/

        // read old extensions
        oldExtensions = storage.read();
        for (Map.Entry<String, Set<String>> entry : oldExtensions.entrySet()) {
            String extensionPoint = entry.getKey();
            if (extensions.containsKey(extensionPoint)) {
                extensions.get(extensionPoint).addAll(entry.getValue());
            } else {
                extensions.put(extensionPoint, entry.getValue());
            }
        }

        // write extensions
        storage.write(extensions);

		return false;
//		return true; // no further processing of this annotation type
	}