Imperfect attempt to detect a dead loop. This works with specific patterns that can be found in our AWT implementation. See HARMONY-5707 for details.

@param value
the object to check dupes for
@return true if a dead loop detected; false otherwise FIXME
338686
private boolean checkDeadLoop(Object value)
	{
		int n = 0;
		Object obj = value;

		while (obj != null)
		{
			Record rec = objRecordMap.get(obj);

			if (rec != null && rec.exp != null)
			{
				obj = rec.exp.getTarget();
			}
			else
			{
				break;
			}

			if (obj != null && (obj.getClass().isAssignableFrom(value.getClass())) && obj.equals(value))
			{
				n++;

				if (n >= DEADLOCK_THRESHOLD)
				{
					// System.out.println("Dead loop hit!");
					return true;
				}
			}
		}
		return false;
	}
203817
public static boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        if (value.length() == 0) {
            return false;
        }
        try {
            InternetAddress.parse(value, false);
            return true;
        } catch (final AddressException ex) {
            return false;
        }
    }
468471
public static boolean isEmpty(Object value) throws IOException {
		if(value instanceof String) {
			// If A is a string, then the result is A.
			return ((String)value).isEmpty();
		} else if(value == null) {
			// Otherwise, if A is null, then the result is "".
			return true;
		} else if(value instanceof Writable) {
			return ((Writable)value).getLength() == 0;
		} else if(value instanceof Node) {
			// Otherwise, if is a DOM node, serialize the output
			return false; // There is a node, is not empty
		} else {
			// Otherwise, if A.toString() throws an exception, then raise an error
			// Otherwise, the result is A.toString();
			return value.toString().isEmpty();
		}
	}
499996
public static Boolean isNotSet(File value) {
        return null == value || value.toString().isEmpty() || value.toString().trim().length() == 0;
    }
424162
public <T> void checkThat(final T value, final Matcher<T> matcher) {
        checkThat("", value, matcher);
    }
642011
@Override
    public boolean contains(Object value) {
        if (value == null) {
            return false;
        }
        final Iterator it = new StepIterator(this, stepSize);
        while (it.hasNext()) {
            if (compareEqual(value, it.next())) {
                return true;
            }
        }
        return false;
    }
1186075
private boolean patternMatchesAttributeValue(final Object value) {
        val matcher = value.toString();
        LOGGER.trace("Compiling a pattern matcher for [{}]", matcher);
        return this.compiledPattern.matcher(matcher).matches();
    }
1109970
protected boolean evaluate(String value) {
        if (ValidationMatcherUtils.isValidationMatcherExpression(matchingValue)) {
            try {
                ValidationMatcherUtils.resolveValidationMatcher(selectKey, value, matchingValue, context);
                return true;
            } catch (ValidationException e) {
                return false;
            }
        } else {
            return value.equals(matchingValue);
        }
    }
1229864
public static boolean safeRegexMatch(String pattern, String value) {
        if (StringUtils.isNotBlank(pattern)) {
            if (value == null) {
                return false;
            } else {
                try {
                    return Pattern.matches(pattern, value);
                } catch (PatternSyntaxException ex) {
                    return false;
                }
            }
        } else {
            return false;
        }
    }
1232715
public boolean isMatched(String value)
    {
        if (value == null)
            return false;
        if ((_match != null)) {
            for (int i = 0; i < _match.length; i++) {
                if (value.equals(_match[i]))
                    return true;
            }
        }
        else {
            if (_defaultSelections != null) {
                return (_defaultSelections.contains(value));
            }
        }

        return false;

    }
1088511
public static boolean isEmpty(Object value) {
		return (null == value || (value instanceof String && StrUtil.isEmpty((String) value)));
	}
960283
public boolean containsValue(final int value)
    {
        boolean found = false;
        if (value != initialValue)
        {
            final int[] entries = this.entries;
            @DoNotSub final int length = entries.length;

            for (@DoNotSub int i = 1; i < length; i += 2)
            {
                if (value == entries[i])
                {
                    found = true;
                    break;
                }
            }
        }

        return found;
    }
424928
private boolean isValueOutOfRange(final Double value) {
        return value == null || getMinValue() != Double.NEGATIVE_INFINITY && value < getMinValue()
                || getMaxValue() != Double.POSITIVE_INFINITY && value > getMaxValue();
    }
441347
public static boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        if (value.length() == 0) {
            return false;
        }
        final int space = value.indexOf(' ');
        if (space == -1) {
            return false;
        }

        // Try converting amount
        final String amount = value.substring(0, space);
        if (!(amount.matches(DECIMAL) || amount.matches(INTEGER))) {
            return false;
        }

        // Try to convert code into a currency
        final String currencyCode = value.substring(space + 1);
        try {
            Currency.getInstance(currencyCode);
        } catch (RuntimeException ex) {
            return false;
        }

        return true;
    }
1095753
public void containsValue(@NullableDecl Object value) {
    check("values()").that(actual().values()).contains(value);
  }
1198007
private boolean isTruthy(String value) {
    return value != null &&
           value.trim().toLowerCase().startsWith(TRUTHY_INITIAL_CHARACTER);
  }
1023767
private boolean isTrue(String value) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
            if (Boolean.valueOf(value.toLowerCase()).booleanValue()
                || value.toLowerCase().equals("on")
                || value.toLowerCase().equals("yes")
                || value.toLowerCase().equals("checked")
                || value.toLowerCase().equals("selected")) {
                return true;
            }
        }
        return false;
    }