#fixed code
                               @Override
   public String toString() {
      StringBuilder buffer = new StringBuilder();
      buffer.append("Manager\n");
      buffer.append("Enabled deployment types: " + getEnabledDeploymentTypes() + "\n");
      buffer.append("Registered contexts: " + contextMap.keySet() + "\n");
      buffer.append("Registered beans: " + getBeans().size() + "\n");
      buffer.append("Registered decorators: " + decorators.size() + "\n");
      buffer.append("Registered interceptors: " + interceptors.size() + "\n");
      return buffer.toString();
   }
#vulnerable code 
                               @Override
   public String toString()
   {
      StringBuilder buffer = new StringBuilder();
      buffer.append(Strings.collectionToString("Enabled deployment types: ", getEnabledDeploymentTypes()));
      buffer.append(eventManager.toString() + "\n");
      buffer.append(MetaDataCache.instance().toString() + "\n");
      buffer.append(resolver.toString() + "\n");
      buffer.append(contextMap.toString() + "\n");
      buffer.append(proxyPool.toString() + "\n");
      buffer.append(Strings.collectionToString("Registered beans: ", getBeans()));
      buffer.append(Strings.collectionToString("Registered decorators: ", decorators));
      buffer.append(Strings.collectionToString("Registered interceptors: ", interceptors));
      return buffer.toString();
   } 
                            #location 8 
                            #vulnerability type THREAD_SAFETY_VIOLATION