#fixed code
                                void writeProperties(java.util.Properties p) {
        p.setProperty("version", "1.0");

        p.setProperty("busName", bus.getName());
        ProjectManager manager = ProjectManager.getGlobalProjectManager();
        p.setProperty("projectName", manager.getOpenedProject().getName());
    }
#vulnerable code 
                                Object readProperties(java.util.Properties p) {
        if (instance == null) {
            instance = this;
        }
        instance.readPropertiesImpl(p);
        return instance;
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION