#fixed code
                              public boolean contains(String name) {
    if(name == null) {
      throw new IllegalArgumentException("Other cannot be null");
    }
    
    if (this.name.equals(name)) {
      return true;
    }
    
    if (hasChildren()) {
      for(int i = 0; i < children.size(); i++) {
        Marker child = (Marker) children.get(i);
        if(child.contains(name)) {
          return true;
        }
      }     
    }
    
    return false;
  }
#vulnerable code 
                              public boolean contains(String name) {
    if(name == null) {
      return false;
    }
    if(factory.exists(name)) {
      Marker other = factory.getMarker(name);
      return contains(other);     
    } else {
      return false;
    }
  } 
                            #location 7 
                            #vulnerability type THREAD_SAFETY_VIOLATION