#vulnerable 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;
  } 
                            #location 12 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#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 (hasReferences()) {
      for (int i = 0; i < refereceList.size(); i++) {
        Marker ref = (Marker) refereceList.get(i);
        if (ref.contains(name)) {
          return true;
        }
      }
    }
    return false;
  }