Returns either null, or something of the form #xxxxxx.
550136
function parseSimpleColor(color) {
	color = normalizeColor(color);
	var matches = /^rgb\(([0-9]+), ([0-9]+), ([0-9]+)\)$/.exec(color);
	if (matches) {
		return "#"
			+ parseInt(matches[1]).toString(16).replace(/^.$/, "0$&")
			+ parseInt(matches[2]).toString(16).replace(/^.$/, "0$&")
			+ parseInt(matches[3]).toString(16).replace(/^.$/, "0$&");
	}
	return null;
}
52320
function(i,j) {
            	if (i < 1 || i > this.elements.length || j < 1 || j > this.elements[0].length) { return null; }
            	return this.elements[i - 1][j - 1];
                }
840957
public int get(Object o) {
        Integer n = indices.get(o);
        return n == null ? -1 : n.intValue();
    }
247903
function(url) {
		var query = getQueryString(url);
		for (var name in query) {
			if (query[name] === '?') {
				return name;
			}
		}
		return null;
	}
410679
public final Object getValue(int varNum) {
    int index = getValueIndex(varNum);
    if (index < 0) {
      return null;
    } else {
      return values[index];
    }
  }
701689
public String getString (int index) {
        Object object = getObject (index);
        try {
            return (String) object;
        } catch (ClassCastException exception) {
            log.warn ("Cannot cast value type (" + object.getClass ().getName () + ") to String for index (" + index + ")");
        }
        return null;
    }
499589
def null_term(str):
    ''''''
    if sys.version_info.major < 3:
        return str
    if isinstance(str, bytes):
        str = str.decode("utf-8")
    idx = str.find("\0")
    if idx != -1:
        str = str[:idx]
    return str
296652
@Nullable
  String getId() {
    ImmutableList<String> parts = getSegments();

    if (!parts.isEmpty()) {
      return parts.get(parts.size() - 1);
    } else {
      return null;
    }
  }
61927
private NullnessAnnotation getMethodNullnessAnnotation() {

        if (method.getSignature().indexOf(")L") >= 0 || method.getSignature().indexOf(")[") >= 0) {
            if (DEBUG_NULLRETURN) {
                System.out.println("Checking return annotation for "
                        + SignatureConverter.convertMethodSignature(classContext.getJavaClass(), method));
            }

            XMethod m = XFactory.createXMethod(classContext.getJavaClass(), method);
            return AnalysisContext.currentAnalysisContext().getNullnessAnnotationDatabase().getResolvedAnnotation(m, false);
        }
        return NullnessAnnotation.UNKNOWN_NULLNESS;
    }
849317
public static String getXmx(String option) {
        String[] args = option.split(" ");
        for (String s : args) {
            if (s.startsWith("-Xmx")) {
                return s;
            }
        }
        return null;
    }
404300
@Nullable
    String next() {
        if( lastIdx >= selector.length() ) {
            return null;
        }
        LOOP: do {
            if( ++idx == selector.length() ) {
                break LOOP;
            }
            switch( selector.charAt( idx ) ) {
                case '.':
                case '#':
                case ':':
                case '[':
                    break LOOP;
            }
        } while( true );
        String str = selector.substring( lastIdx, idx ).trim();
        lastIdx = idx;
        return str;
    }
573619
public int getInt( int index ) throws OdaException
	{
		Integer value = (Integer) getFieldValue(index);
        return value==null?0:value;
	}
785620
private static Object nullValueForType(final Class<?> expectedClz)
    {
        if (expectedClz == long.class) {
            return VoltType.NULL_BIGINT;
        }
        else if (expectedClz == int.class) {
            return VoltType.NULL_INTEGER;
        }
        else if (expectedClz == short.class) {
            return VoltType.NULL_SMALLINT;
        }
        else if (expectedClz == byte.class) {
            return VoltType.NULL_TINYINT;
        }
        else if (expectedClz == double.class) {
            return VoltType.NULL_FLOAT;
        }

        // all non-primitive types can handle null
        return null;
    }
1222400
public T fetchSingleOrNull() throws InstantiationException, IllegalAccessException, SQLException {
        if (!finished) {
            T result = primitive ? fetchSinglePrimitiveInternal() : fetchSingleInternal();
            next();
            return result;
        } else {
            return null;
        }
    }
521104
@Nullable
  public String singleVar() {
    if (bindings.size() == 1) {
      return bindings.entrySet().iterator().next().getKey();
    }
    return null;
  }
34696
public static Integer checkNull(Integer value, Integer elseValue) {
        return isNull(value) ? elseValue : value;
    }
69752
@Nullable
    public T getValue() {
        Object data = mData;
        if (data != NOT_SET) {
            //noinspection unchecked
            return (T) data;
        }
        return null;
    }