the provided comparator function should take a, b and return a negative number when a < b and equality when a == b
543100
function StablePriorityQueue(comparator) {
    this.array = [];
    this.size = 0;
    this.runningcounter = 0;
    this.compare = comparator || defaultcomparator;
    this.stable_compare = function(a, b) {
      var cmp = this.compare(a.value,b.value);
      return (cmp < 0) || ( (cmp == 0) && (a.counter < b.counter) );
    }
}
1065619
function compareRssi(a,b) {
  if(a.rssi < b.rssi)
    return 1;
  if(a.rssi > b.rssi)
    return -1;
  return 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;
}
922306
@Pure
	@Inline(value="($1 <= $2)", constantExpression=true)
	public static boolean operator_lessEqualsThan(long a, double b) {
		return a <= b;
	}
1094562
private static boolean numbersEqual(Number a, Number b) {
        if (a.equals(b)) {
            return true;
        }
        if (a.doubleValue() == b.doubleValue()) {
            return true;
        }
        return false;
    }
1048498
function (x, a, b) {
            if (x < a) {
                return a;
            } else if (x > b) {
                return b;
            }
            return x;
        }
1040937
function isLaxEqual(a, b){
		if(_.isArray(a))
			a = _.uniq(a.sort());
			
		if(_.isArray(b))
			b = _.uniq(b.sort());
		
		return _.isEqual(a, b);
	}
371837
function compareNumericWithNaNs(x, y) {
    if (!isNaN(x) && !isNaN(y))
      return x - y;
    if (isNaN(x))
      return 1;
    if (isNaN(y))
      return -1;
    return 0;
  }
253561
public static int compare(Number a, Number b) 
  {
    int aType = getType(a);
    int bType = getType(b);
    
    int compType = (aType >= bType) ? aType : bType;
    switch (compType) 
    {
      case INT :
        int li = a.intValue();
        int ri = b.intValue();
        return (li < ri) ? -1 : (li == ri) ? 0 : 1;
      case LONG :
        long ll = a.longValue();
        long rl = b.longValue();
        return (ll < rl) ? -1 : (ll == rl) ? 0 : 1;
      case FLOAT :
        float lf = a.floatValue();
        float rf = b.floatValue();
        return (lf < rf) ? -1 : (lf == rf) ? 0 : 1;
      case DOUBLE :
        double ld = a.doubleValue();
        double rd = b.doubleValue();
        return (ld < rd) ? -1 : (ld == rd) ? 0 : 1;
      default :
        throw new IllegalStateException();
    }
  }
1326767
function(other) {
        var comps = ["a", "b", "c", "d"],
            i, len;

        for (i=0, len=comps.length; i < len; i++) {
            if (this[comps[i]] < other[comps[i]]) {
                return -1;
            } else if (this[comps[i]] > other[comps[i]]) {
                return 1;
            }
        }

        return 0;
    }
1326865
function _sort(a,b) {
    if (a.weight < b.weight) {
      return 1;
    }
    else if (a.weight > b.weight) {
      return -1;
    }
    else {
      return 0;
    }
  }
109131
def BETWEEN(a, b):
    
    if any((isinstance(x, ConditionalElement) for x in (a, b))):
        raise TypeError(
            "A ConditionalElement can't be used as an operator condition.")
    else:
        return P(lambda x: a <= x <= b)
1032341
public int compare(String a, String b) {

        int i;

        if (collator == null) {
            i = a.compareTo(b);
        } else {
            i = collator.compare(a, b);
        }

        return (i == 0) ? 0
                        : (i < 0 ? -1
                                 : 1);
    }
242725
function(a, b) {
                var as = a.specificity;
                var bs = b.specificity;

                if (as[0] != bs[0]) return bs[0] - as[0];
                if (as[1] != bs[1]) return bs[1] - as[1];
                if (as[2] != bs[2]) return bs[2] - as[2];
                return bs[3] - as[3];
            }
674984
function eq (a,b) {
	if (a && a.length) return a[0] === b[0] && a[1] === b[1];
	return a === b;
}
521441
function(a,b) {
		var tA, tB, i;
		for (i=0; i<a.length; ++i) {
			tA = typeof a[i]; tB = typeof b[i];
			if (tA === tB) {
				if ((tA === 'number') || (tA === 'string') || (tA === 'boolean')) {
					if (a[i] < b[i]) return -1;
					if (a[i] > b[i]) return 1;
					if (a[i] !== b[i]) return 1;
				  /*if (a[i] == b[i]) continue;*/
				} else {
					if (a[i] === b[i]) continue;
					return 1;
				}
			} else {
				return 1;
			}
		}
		return 0;
	}
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);
}