Method updateDeploymentRepository.

@param value
@param element
@param counter
@param xmlTag
512075
protected void updateDeploymentRepository(DeploymentRepository value, String xmlTag, Counter counter,
            Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "uniqueVersion",
                  (value.isUniqueVersion() == true) ? null : String.valueOf(value.isUniqueVersion()), "true");
         findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
         findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
         findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
         findAndReplaceSimpleElement(innerCount, root, "layout", value.getLayout(), "default");
      }
   }
14321
protected void updateIssueManagement(IssueManagement value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "system", value.getSystem(), null);
         findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
      }
   }
371805
public void updateByXml(final InputStream source) throws IOException, ServletException {
        checkPermission(CONFIGURE);
        Node result = (Node)Jenkins.XSTREAM2.fromXML(source);
        Jenkins.getInstance().getNodesObject().replaceNode(this.getNode(), result);
    }
279810
@Override
    public void writeXML(XMLOutput xmlOutput) throws IOException {
        xmlOutput.openTag(ELEMENT_NAME, new XMLAttributeList().addAttribute("class", className));
        for (Iterator<String> i = featureIterator(); i.hasNext();) {
            String feature = i.next();
            xmlOutput.openCloseTag(FEATURE_ELEMENT_NAME, new XMLAttributeList().addAttribute("value", feature));
        }
        xmlOutput.closeTag(ELEMENT_NAME);
    }
252206
public Observable<Tag> updateTagAsync(UUID projectId, UUID tagId, Tag updatedTag) {
        return updateTagWithServiceResponseAsync(projectId, tagId, updatedTag).map(new Func1<ServiceResponse<Tag>, Tag>() {
            @Override
            public Tag call(ServiceResponse<Tag> response) {
                return response.body();
            }
        });
    }
818785
protected void updateDependencyManagement(DependencyManagement value, String xmlTag, Counter counter,
            Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         iterateDependency(innerCount, root, value.getDependencies(), "dependencies", "dependency");
      }
   }
836412
private void populateComitPerTag(
      final RevCommit from,
      final ObjectId to,
      final Map<String, Ref> tagPerCommitHash,
      final Map<String, String> tagPerCommitsHash,
      final Map<String, Set<GitCommit>> commitsPerTag,
      final Map<String, Date> datePerTag,
      final String startingTagName)
      throws Exception {
    final Set<TraversalWork> moreWork =
        populateCommitPerTag(
            from,
            to,
            commitsPerTag,
            tagPerCommitHash,
            tagPerCommitsHash,
            datePerTag,
            startingTagName);
    do {
      final Set<TraversalWork> evenMoreWork = newTreeSet();
      for (final TraversalWork tw : newArrayList(moreWork)) {
        moreWork.remove(tw);
        final Set<TraversalWork> newWork =
            populateCommitPerTag(
                from,
                tw.getTo(),
                commitsPerTag,
                tagPerCommitHash,
                tagPerCommitsHash,
                datePerTag,
                tw.getCurrentTagName());
        evenMoreWork.addAll(newWork);
      }
      moreWork.addAll(evenMoreWork);
      LOG.debug("Work left: " + moreWork.size());
    } while (!moreWork.isEmpty());
  }
1278529
protected void updateRelocation(Relocation value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
         findAndReplaceSimpleElement(innerCount, root, "artifactId", value.getArtifactId(), null);
         findAndReplaceSimpleElement(innerCount, root, "version", value.getVersion(), null);
         findAndReplaceSimpleElement(innerCount, root, "message", value.getMessage(), null);
      }
   }
1328886
private void setTag(final int i, final String name, final String value, 
      final boolean groupby) {
    setTagName(i, name);
    setTagValue(i, value);
    isTagGroupby(i, groupby);
  }
198890
@Override
	public boolean add(final T element) {
		requireNonNull(element);

		boolean updated = false;
		final Iterator<T> iterator = _population.iterator();
		while (iterator.hasNext()) {
			final T existing = iterator.next();

			int cmp = _dominance.compare(element, existing);
			if (cmp > 0) {
				iterator.remove();
				updated = true;
			} else if (cmp < 0 || element.equals(existing)) {
				return updated;
			}
		}

		_population.add(element);
		return true;
	}
946709
protected Element findAndReplaceXpp3DOM(Counter counter, Element parent, String name, Xpp3Dom dom)
   {
      boolean shouldExist = (dom != null) && ((dom.getChildCount() > 0) || (dom.getValue() != null));
      Element element = updateElement(counter, parent, name, shouldExist);
      if (shouldExist)
      {
         replaceXpp3DOM(element, dom, new Counter(counter.getDepth() + 1));
      }
      return element;
   }
66135
@Override
    public void tagLocation(DataBuffer buffer, Location location) {
        if (location == Location.HOST)
            AtomicAllocator.getInstance().getAllocationPoint(buffer).tickHostWrite();
        else if (location == Location.DEVICE)
            AtomicAllocator.getInstance().getAllocationPoint(buffer).tickDeviceWrite();
        else if (location == Location.EVERYWHERE) {
            AtomicAllocator.getInstance().getAllocationPoint(buffer).tickDeviceWrite();
            AtomicAllocator.getInstance().getAllocationPoint(buffer).tickHostRead();
        }
    }
49913
protected void updateSite(Site value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
         findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
         findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
      }
   }
828846
@Override public int setCount(E element, int count) {
    checkNotNull(element);
    checkNonnegative(count, "count");
    while (true) {
      AtomicInteger existingCounter = Maps.safeGet(countMap, element);
      if (existingCounter == null) {
        if (count == 0) {
          return 0;
        } else {
          existingCounter = countMap.putIfAbsent(element, new AtomicInteger(count));
          if (existingCounter == null) {
            return 0;
          }
          // existingCounter != null: fall through
        }
      }

      while (true) {
        int oldValue = existingCounter.get();
        if (oldValue == 0) {
          if (count == 0) {
            return 0;
          } else {
            AtomicInteger newCounter = new AtomicInteger(count);
            if ((countMap.putIfAbsent(element, newCounter) == null)
                || countMap.replace(element, existingCounter, newCounter)) {
              return 0;
            }
          }
          break;
        } else {
          if (existingCounter.compareAndSet(oldValue, count)) {
            if (count == 0) {
              // Just CASed to 0; remove the entry to clean up the map. If the removal fails,
              // another thread has already replaced it with a new counter, which is fine.
              countMap.remove(element, existingCounter);
            }
            return oldValue;
          }
        }
      }
    }
  }
1015418
public void setValue(Map<String, Tag> value) {
        this.value = new LinkedHashMap<String, Tag>(value);
    }
96402
public void add(Chromosome element) {
        if (population.size() == populationSize) {
            cullOperator.cullPopulation();
        }

        population.add(element);

        Collections.sort(population, chromosomeComparator);

        triggerPopulationChangedListeners(population);
    }
535187
protected void updateBuildBase(BuildBase value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "defaultGoal", value.getDefaultGoal(), null);
         iterateResource(innerCount, root, value.getResources(), "resources", "resource");
         iterateResource(innerCount, root, value.getTestResources(), "testResources", "testResource");
         findAndReplaceSimpleElement(innerCount, root, "directory", value.getDirectory(), null);
         findAndReplaceSimpleElement(innerCount, root, "finalName", value.getFinalName(), null);
         findAndReplaceSimpleLists(innerCount, root, value.getFilters(), "filters", "filter");
         updatePluginManagement(value.getPluginManagement(), "pluginManagement", innerCount, root);
         iteratePlugin(innerCount, root, value.getPlugins(), "plugins", "plugin");
      }
   }