Inverse of {@link #doMigrate}.
326514
private void unmigrateBuildsDir(File builds) throws Exception {
        File mapFile = new File(builds, MAP_FILE);
        if (!mapFile.isFile()) {
            System.err.println(builds + " does not look to have been migrated yet; skipping");
            return;
        }
        for (File build : builds.listFiles()) {
            int number;
            try {
                number = Integer.parseInt(build.getName());
            } catch (NumberFormatException x) {
                continue;
            }
            File buildXml = new File(build, "build.xml");
            if (!buildXml.isFile()) {
                System.err.println(buildXml + " did not exist");
                continue;
            }
            String xml = FileUtils.readFileToString(buildXml, Charsets.UTF_8);
            Matcher m = TIMESTAMP_ELT.matcher(xml);
            if (!m.find()) {
                System.err.println(buildXml + " did not contain <timestamp> as expected");
                continue;
            }
            long timestamp = Long.parseLong(m.group(1));
            String nl = m.group(2);
            xml = m.replaceFirst("  <number>" + number + "</number>" + nl);
            m = ID_ELT.matcher(xml);
            String id;
            if (m.find()) {
                id = m.group(1);
                xml = m.replaceFirst("");
            } else {
                // Post-migration build. We give it a new ID based on its timestamp.
                id = legacyIdFormatter.format(new Date(timestamp));
            }
            FileUtils.write(buildXml, xml, Charsets.UTF_8);
            if (!build.renameTo(new File(builds, id))) {
                System.err.println(build + " could not be renamed");
            }
            Util.createSymlink(builds, id, Integer.toString(number), StreamTaskListener.fromStderr());
        }
        Util.deleteFile(mapFile);
        System.err.println(builds + " has been restored to its original format");
    }
955433
protected L putInMap(L node) {
		nodeMap.put(node.get(), node);
		identityDetector.put(node.get(), node.get());
		return node;
	}
806121
function convertToAlias(id, paths) {
    var invertedPaths = _.invert(paths);
    if (invertedPaths[id]) {
        return invertedPaths[id];
    }
    else {
        return id;
    }
}
385971
public WordBuilder<I> reverse() {
        ensureUnlocked();
        int lowIdx = 0, highIdx = length - 1;

        while (lowIdx < highIdx) {
            Object tmp = array[lowIdx];
            array[lowIdx++] = array[highIdx];
            array[highIdx--] = tmp;
        }

        return this;
    }
711797
def inverse(self):
        
        result = G2Element()
        librelic.g2_neg_abi(byref(result), byref(self))
        return result
109862
function () {
        var self = this;

        if (self[0] && self[0].parentNode) {
          return domManipulate(self, arguments, function (node) {
            this.parentNode.insertBefore(node, this.nextSibling);
          }, true);
        }

        return self;
      }
848517
function inverseConvertHelper(arrayElement, id) {
  let elementJson = new Object();
  elementJson.id = ++id;

  if (typeof arrayElement === 'string') {
    elementJson.type = 'textnode';
    elementJson.value = arrayElement;
  } else if (['var', 'derived', 'data', 'meta'].indexOf(arrayElement[0]) > -1) {
    elementJson.type = arrayElement[0];
    elementJson.properties = {};
    arrayElement[1].forEach(property => {
      elementJson.properties[property[0]] = {
        type: property[1][0],
        value: property[1][1]
      };
    });
  } else {
    elementJson.type = 'component';
    elementJson.name = arrayElement[0];
    if (arrayElement[1].length !== 0) {
      elementJson.properties = {};
      arrayElement[1].forEach(property => {
        elementJson.properties[property[0]] = {
          type: property[1][0],
          value: property[1][1]
        };
      });
    }
    if (arrayElement[2]) {
      let children = [];
      arrayElement[2].forEach(element => {
        let childData = inverseConvertHelper(element, id);
        id = childData.id;
        children.push(childData.data);
      });
      elementJson.children = children;
    }
  }
  let result = new Object();
  result.id = id;
  result.data = elementJson;
  return result;
}
1055494
function () {
        return domManipulate(this, arguments, function (node) {
          // Either element or Shadow Root
          if (this.nodeType === 1 || (this.host && this.host.nodeType === 1)) {
            this.insertBefore(node, this.firstChild);
          }
        }, true);
      }
171366
public void reverseInplace() {
    for (int i = 0; i < this.size / 2; i++) {
      boolean temp = this.elements[i];
      this.elements[i] = this.elements[this.size - i - 1];
      this.elements[this.size() - i - 1] = temp;
    }
  }
814154
def dom_id(self):
        """"""
        parameter = 'DOMID'
        if parameter not in self._by:
            self._populate(by=parameter)
        return self._by[parameter]
353568
AppendableExpression setSanitizedContentDirectionality(Dir contentDir) {
    return withNewDelegate(
        delegate.invoke(SET_SANITIZED_CONTENT_DIRECTIONALITY, BytecodeUtils.constant(contentDir)),
        true);
  }
895531
@Override
  public IVersionRange invert() {
    switch (operator) {
      case ">":
        return new VersionRange("<=", version);
      case ">=":
        return new VersionRange("<", version);
      case "<":
        return new VersionRange(">=", version);
      case "<=":
        return new VersionRange(">", version);
      default:
        throw new UnsupportedOperationException();
    }
  }
637792
def _transform_i(self, x, i):
        """"""
        x = self._shift_or_mirror_into_invertible_i(x, i)
        lb = self._lb[self._index(i)]
        ub = self._ub[self._index(i)]
        al = self._al[self._index(i)]
        au = self._au[self._index(i)]
        if x < lb + al:
            return lb + (x - (lb - al))**2 / 4 / al
        elif x < ub - au:
            return x
        elif x < ub + 3 * au:
            return ub - (x - (ub + au))**2 / 4 / au
        else:
            assert False  # shift removes this case
            return ub + au - (x - (ub + au))
258121
function realDomain(id) {
  return id.lastIndexOf("@") === 0 ? id.substr(1).toLowerCase() :
    id.toLowerCase().
      replace(/@/g, "-at-").
      replace(/\./g, "-dot-").
      replace(UUID_PATTERN, "$1");
}
114409
public T reverse() {
        String id = getId();
        String REVERSE = "_REVERSE";
        if (id.endsWith(REVERSE)) {
            setId(id.substring(0, id.length() - REVERSE.length()));
        }

        float start = mStart;
        float end = mEnd;
        mStart = end;
        mEnd = start;
        mReverse = !mReverse;
        return self();
    }
94043
public static <T> Map<T, T> reverse(Map<T, T> map) {
		return filter(map, new Editor<Map.Entry<T, T>>() {
			@Override
			public Entry<T, T> edit(final Entry<T, T> t) {
				return new Entry<T, T>() {

					@Override
					public T getKey() {
						return t.getValue();
					}

					@Override
					public T getValue() {
						return t.getKey();
					}

					@Override
					public T setValue(T value) {
						throw new UnsupportedOperationException("Unsupported setValue method !");
					}
				};
			}
		});
	}
834948
@VisibleForTesting
  static String reverse(InetAddress address) {
    byte[] bytes = address.getAddress();
    if (bytes.length == 4) return reverseIpv4(bytes);
    else return reverseIpv6(bytes);
  }