Returns number representation of object's complexity
@method complexity
@return {Number} complexity
349164
function() {
      return this.paths.reduce(function(total, path) {
        return total + ((path && path.complexity) ? path.complexity() : 0);
      }, 0);
    }
597372
function() {
			// Create a new stats object to work with
			var nums = this.clone();

			// Go through each element and make the element the gcd of it
			// and the element to its left
			for (var i = 1; i < nums.size(); i++) {
				nums.set(i, gcd(nums.get(i - 1), nums.get(i)));
			}

			// The gcd of all the numbers is now in the final element
			return nums.get(nums.size() - 1);
		}
628761
function mul() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var mul = 1;
        if (args.length > 0) {
            args.map(function (number) {
                if (isNumber(number)) {
                    mul *= number;
                }
            });
        }
        else {
            return 0;
        }
        return mul;
    }
514766
function ( obj ) {
		var values = {},
		    count  = 0,
		    nth    = 0,
		    mode   = [],
		    result;

		// Counting values
		array.each( obj, function ( i ) {
			if ( !isNaN( values[i] ) ) {
				values[i]++;
			}
			else {
				values[i] = 1;
			}
		});

		// Finding the highest occurring count
		count = array.max( array.cast( values ) );

		// Finding values that match the count
		utility.iterate( values, function ( v, k ) {
			if ( v === count ) {
				mode.push( number.parse( k ) );
			}
		});

		// Determining the result
		nth = mode.length;

		if ( nth > 0 ) {
			result = nth === 1 ? mode[0] : mode;
		}

		return result;
	}
335616
function size(o) {
  var bbox = o.getBounds ? o.getBounds() : o;

  var foo = bbox[1].minus(bbox[0]);
  return foo;
}
1365667
function () {
                var boundingBox = this.boundingBox;
                var size = boundingBox.maximumWorld.subtract(boundingBox.minimumWorld);
                return size.length();
            }
1081244
function checkPartition(obj) {
  var count = 0
  Object.keys(obj).forEach(key=> {
    if (obj[key] === '*String') count += 1
    if (obj[key] === '*Number') count += 1
  })
  return count === 1
}
1263458
function(v) {
                if (isNumber(v)) {
                    v = Math.min(Math.max(0, v), 255);
                    var i, next;
                    for (i=0; i<256; i=i+51) {
                        next = i+51;
                        if (v >= i && v <= next) {
                            return (v-i > 25) ? next : i;
                        }
                    }
                }

                return v;
            }
1007407
function() {
    if (!this.isSquare()) { return null; }
    var tr = this.elements[0][0], n = this.elements.length - 1, k = n, i;
    do { i = k - n + 1;
      tr += this.elements[i][i];
    } while (--n);
    return tr;
  }
1194186
function() {
        var min_size = Infinity;
        var index = null;
        for (var i = 0; i < this.bound_textures.length; i++) {
            var t = this.bound_textures[i];
            if (t.size < min_size) {
                min_size = t.size;
                index = i;
            }
        }
        return index;
    }
645811
function size(collection) {
  var x, i = 0;

  if ('object' === type(collection)) {
    for (x in collection) i++;
    return i;
  }

  return +collection.length;
}
653434
function(obj) {
			var max_len = 0, len;
			for(var key in obj) {
				if((len = key.length) > max_len && obj.hasOwnProperty(key)) {
					max_len = len;
				}
			}
			return max_len;
		}
431494
function() {
			// Create a new stats object to work with
			var nums = this.clone();

			// Go through each element and make the element the lcm of it
			// and the element to its left
			for (var i = 1; i < nums.size(); i++) {
				nums.set(i, lcm(nums.get(i - 1), nums.get(i)));
			}

			// The lcm of all the numbers if now in the final element
			return nums.get(nums.size() - 1);
		}
631177
function(n) {
    n = _.isInteger(n) ? n : 0

    return {
      x: n,
      y: n,
      data: _.map(_.range(n), function (num) {
        return [num]
      })
    }
  }
478025
def compute_cyclomatic_complexity(function):
    
    # from https://en.wikipedia.org/wiki/Cyclomatic_complexity
    # M = E - N + 2P
    # where M is the complexity
    # E number of edges
    # N number of nodes
    # P number of connected components

    E = compute_number_edges(function)
    N = len(function.nodes)
    P = len(compute_strongly_connected_components(function))
    return E - N + 2 * P
974712
function() {
      var result = {};
      for (var i = arguments.length - 1; i >= 0; i--) {
        var obj = arguments[i];
        for (var k in obj) {
          if (obj.hasOwnProperty(k)) {
            result[k] = obj[k];
          }
        }
      }
      return result;
    }
906232
public static int length(Object obj) {
		if (obj == null) {
			return 0;
		}
		if (obj instanceof CharSequence) {
			return ((CharSequence) obj).length();
		}
		if (obj instanceof Collection) {
			return ((Collection<?>) obj).size();
		}
		if (obj instanceof Map) {
			return ((Map<?, ?>) obj).size();
		}

		int count;
		if (obj instanceof Iterator) {
			Iterator<?> iter = (Iterator<?>) obj;
			count = 0;
			while (iter.hasNext()) {
				count++;
				iter.next();
			}
			return count;
		}
		if (obj instanceof Enumeration) {
			Enumeration<?> enumeration = (Enumeration<?>) obj;
			count = 0;
			while (enumeration.hasMoreElements()) {
				count++;
				enumeration.nextElement();
			}
			return count;
		}
		if (obj.getClass().isArray() == true) {
			return Array.getLength(obj);
		}
		return -1;
	}