Two Alerts are related if either
A) their measurements are equal, or
B) either's relatedNames contains the other's measurement.

@param {!Alert} a
@param {!Alert} b
@return {boolean}
773709
function isRelated(a, b) {
  if (a.measurementAvg === b.measurementAvg) return true;
  if (a.relatedNames &&
      a.relatedNames.has(b.measurementAvg)) {
    return true;
  }
  if (b.relatedNames &&
      b.relatedNames.has(a.measurementAvg)) {
    return true;
  }
  return false;
}
602385
function areThingsEqual (a, b) {
  var aKeys , bKeys , i;

  // Strings, booleans, numbers, null
  if (a === null || typeof a === 'string' || typeof a === 'boolean' || typeof a === 'number' ||
      b === null || typeof b === 'string' || typeof b === 'boolean' || typeof b === 'number') { return a === b; }

  // Dates
  if (util.isDate(a) || util.isDate(b)) { return util.isDate(a) && util.isDate(b) && a.getTime() === b.getTime(); }

  // Arrays (no match since arrays are used as a $in)
  // undefined (no match since they mean field doesn't exist and can't be serialized)
  if ((!(util.isArray(a) && util.isArray(b)) && (util.isArray(a) || util.isArray(b))) || a === undefined || b === undefined) { return false; }

  // General objects (check for deep equality)
  // a and b should be objects at this point
  try {
    aKeys = Object.keys(a);
    bKeys = Object.keys(b);
  } catch (e) {
    return false;
  }

  if (aKeys.length !== bKeys.length) { return false; }
  for (i = 0; i < aKeys.length; i += 1) {
    if (bKeys.indexOf(aKeys[i]) === -1) { return false; }
    if (!areThingsEqual(a[aKeys[i]], b[aKeys[i]])) { return false; }
  }
  return true;
}
106963
function(a,b) {
			if( hasXY( a ) && hasXY( b ) ){
				this.x = mathUtils.clip(this.x, a.x, b.x);
				this.y = mathUtils.clip(this.y, a.y, b.y);
			} else if( isRect( a ) ){
				this.x = mathUtils.clip(this.x, a.x, a.x + a.width);
				this.y = mathUtils.clip(this.y, a.y, a.y + a.height);
			}
			return this;
		}
640040
function(a, b, aParent, bParent, prop, compares, options){
	var subsetCheck;
	if( !(prop in aParent)) {
		subsetCheck = "subsetB";
	} else if(prop in bParent){
		// property in a and b and not the same
		return false;
	}
	if( !(prop in bParent) ) {
		subsetCheck = "subsetA";
	}
	if(subsetCheck === "subsetB") {
		options.result[prop] = b;
	} else {
		options.result[prop] = a;
	}
	return undefined;
}
498402
function (a, b) {
    if (sjcl.bitArray.bitLength(a) !== sjcl.bitArray.bitLength(b)) {
      return false;
    }
    var x = 0, i;
    for (i=0; i<a.length; i++) {
      x |= a[i]^b[i];
    }
    return (x === 0);
  }
282097
function is(a, b) {
  if (a !== a) {
    // NaN
    return b !== b;
  }
  if (a === 0 && b === 0) {
    // +-0
    return 1 / a === 1 / b;
  }
  return a === b;
}
568488
function compare(a, b) {
  if (isNaN(a.short_version)) return 1;
  if (isNaN(b.short_version)) return -1;
  return Number(a.short_version) - Number(b.short_version);
}
1224782
function (a, b) {
    var aNeedsB = false;
    var bNeedsA = false;

    aNeedsB = Object.
    keys(a.dependencies).
    some(function (dependency) {
        return dependency === b.name;
    });

    if (aNeedsB) {
        return 1;
    }

    bNeedsA = Object.
    keys(b.dependencies).
    some(function (dependency) {
        return dependency === a.name;
    });

    if (bNeedsA) {
        return -1;
    }

    return 0;
}
530712
private static boolean equalsQualifiedName(PDescriptor a, PDescriptor b) {
        return (a != null) && (b != null) && (a.getQualifiedName()
                                               .equals(b.getQualifiedName()));
    }
101750
function(a,b,beStrict){
           if(this.isArray(a) && this.isArray(b)){
            var alen = a.length, i = 0;
            if(beStrict){
             if(alen !== (b).length){ return false; }
           }

           for(; i < alen; i++){
             if(a[i] === undefined || b[i] === undefined) break;
             if(b[i] !== a[i]){
              return false;
              break;
            }
          }
          return true;
        }
    }
335286
function(bb, other)
{
    return (bb.l <= other.l && bb.r >= other.r && bb.b <= other.b && bb.t >= other.t);
}
711141
function isEqual(a, b) {
      var k, checked;

      // Strict equals
      if (a === b) {
        return true;
      }

      // Compare null
      if (a === null || b === null) {
        return a === b;
      }

      // Compare number, boolean, string, undefined
      if (typeof a !== "object" || typeof b !== "object") {
        return a === b;
      }

      // Compare arrays
      if (Tools.isArray(b)) {
        if (a.length !== b.length) {
          return false;
        }

        k = a.length;
        while (k--) {
          if (!isEqual(a[k], b[k])) {
            return false;
          }
        }
      }

      // Shallow compare nodes
      if (isNode(a) || isNode(b)) {
        return a === b;
      }

      // Compare objects
      checked = {};
      for (k in b) {
        if (!isEqual(a[k], b[k])) {
          return false;
        }

        checked[k] = true;
      }

      for (k in a) {
        if (!checked[k] && !isEqual(a[k], b[k])) {
          return false;
        }
      }

      return true;
    }
911559
function compareHooks(a, b)
{
  return a.length < b.length ? -1 : (a.length > b.length ? 1 : (a < b ? -1 : (a > b ? 1 : 0)));
}
190126
function sameValues(a, b) {
  var
    i = a.length,
    j = b.length,
    k = i === j
  ;
  if (k) {
    while (i--) {
      if (a[i] !== b[i]) {
        return !k;
      }
    }
  }
  return k;
}
1251951
function (a, b) {
            if (a === b) {
                return true;
            }
            if (a === undef || a === null || b === undef || b === null) {
                // need type coercion
                return a == null && b == null;
            }
            if (a instanceof Date && b instanceof Date) {
                return a.getTime() === b.getTime();
            }
            if (typeof a === 'string' && typeof b === 'string') {
                return a === b;
            }
            if (typeof a === 'number' && typeof b === 'number') {
                return a === b;
            }
            if (typeof a === 'object' && typeof b === 'object') {
                return compareObjects(a, b);
            }    // Straight check
            // Straight check
            return a === b;
        }
711706
function(a, b){
			return (a._x < b._x + b._w && a._y < b._y + b._h 
					&& a._x + a._w > b._x && a._y + a._h > b._y)
		}
632742
function (a, b) {
        if (a === b) {
            return true;
        }
        if (typeof a !== typeof b) {
            return this._alike(a, b);
        }
        return this._objectLike(a, b);
    }