Program: 27965
Project: 27965
Buggy source:
/** 
 * Tests the behavior of the unresolved Bottom type.
 */
public void testNoResolvedType() throws Exception {
  assertFalse(NO_RESOLVED_TYPE.isNoObjectType());
  assertFalse(NO_RESOLVED_TYPE.isNoType());
  assertTrue(NO_RESOLVED_TYPE.isNoResolvedType());
  assertFalse(NO_RESOLVED_TYPE.isArrayType());
  assertFalse(NO_RESOLVED_TYPE.isBooleanValueType());
  assertFalse(NO_RESOLVED_TYPE.isDateType());
  assertFalse(NO_RESOLVED_TYPE.isEnumElementType());
  assertFalse(NO_RESOLVED_TYPE.isNullType());
  assertFalse(NO_RESOLVED_TYPE.isNamedType());
  assertTrue(NO_RESOLVED_TYPE.isNumber());
  assertFalse(NO_RESOLVED_TYPE.isNumberObjectType());
  assertFalse(NO_RESOLVED_TYPE.isNumberValueType());
  assertTrue(NO_RESOLVED_TYPE.isObject());
  assertFalse(NO_RESOLVED_TYPE.isFunctionPrototypeType());
  assertFalse(NO_RESOLVED_TYPE.isRegexpType());
  assertTrue(NO_RESOLVED_TYPE.isString());
  assertFalse(NO_RESOLVED_TYPE.isStringObjectType());
  assertFalse(NO_RESOLVED_TYPE.isStringValueType());
  assertFalse(NO_RESOLVED_TYPE.isEnumType());
  assertFalse(NO_RESOLVED_TYPE.isUnionType());
  assertFalse(NO_RESOLVED_TYPE.isStruct());
  assertFalse(NO_RESOLVED_TYPE.isDict());
  assertFalse(NO_RESOLVED_TYPE.isAllType());
  assertFalse(NO_RESOLVED_TYPE.isVoidType());
  assertTrue(NO_RESOLVED_TYPE.isConstructor());
  assertFalse(NO_RESOLVED_TYPE.isInstanceType());
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NO_RESOLVED_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NO_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(ARRAY_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(BOOLEAN_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(BOOLEAN_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(DATE_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(EVAL_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(functionType));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NULL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NUMBER_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NUMBER_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(URI_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(RANGE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(REFERENCE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(REGEXP_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(STRING_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(STRING_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(SYNTAX_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(TYPE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(ALL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(VOID_TYPE));
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NO_RESOLVED_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NO_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NO_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,ARRAY_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,BOOLEAN_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,BOOLEAN_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,DATE_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,EVAL_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,functionType);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NULL_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NUMBER_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NUMBER_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,URI_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,RANGE_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,REFERENCE_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,REGEXP_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,STRING_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,STRING_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,SYNTAX_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,TYPE_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,ALL_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,VOID_TYPE);
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NO_RESOLVED_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NO_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(ARRAY_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(BOOLEAN_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(BOOLEAN_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(DATE_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(EVAL_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(functionType));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NULL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NUMBER_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NUMBER_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(URI_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(RANGE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(REFERENCE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(REGEXP_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(STRING_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(STRING_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(SYNTAX_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(TYPE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(ALL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(VOID_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isNullable());
  assertTrue(NO_RESOLVED_TYPE.isObject());
  assertTrue(NO_RESOLVED_TYPE.matchesInt32Context());
  assertTrue(NO_RESOLVED_TYPE.matchesNumberContext());
  assertTrue(NO_RESOLVED_TYPE.matchesObjectContext());
  assertTrue(NO_RESOLVED_TYPE.matchesStringContext());
  assertTrue(NO_RESOLVED_TYPE.matchesUint32Context());
  assertEquals("String_Node_Str",NO_RESOLVED_TYPE.toString());
  assertEquals(null,NO_RESOLVED_TYPE.getDisplayName());
  assertFalse(NO_RESOLVED_TYPE.hasDisplayName());
  assertTypeEquals(CHECKED_UNKNOWN_TYPE,NO_RESOLVED_TYPE.getPropertyType("String_Node_Str"));
  Asserts.assertResolvesToSame(NO_RESOLVED_TYPE);
  assertTrue(forwardDeclaredNamedType.isEmptyType());
  assertTrue(forwardDeclaredNamedType.isNoResolvedType());
}

Fixed version (ground truth):
/** 
 * Tests the behavior of the unresolved Bottom type.
 */
public void testNoResolvedType() throws Exception {
  assertFalse(NO_RESOLVED_TYPE.isNoObjectType());
  assertFalse(NO_RESOLVED_TYPE.isNoType());
  assertTrue(NO_RESOLVED_TYPE.isNoResolvedType());
  assertFalse(NO_RESOLVED_TYPE.isArrayType());
  assertFalse(NO_RESOLVED_TYPE.isBooleanValueType());
  assertFalse(NO_RESOLVED_TYPE.isDateType());
  assertFalse(NO_RESOLVED_TYPE.isEnumElementType());
  assertFalse(NO_RESOLVED_TYPE.isNullType());
  assertFalse(NO_RESOLVED_TYPE.isNamedType());
  assertTrue(NO_RESOLVED_TYPE.isNumber());
  assertFalse(NO_RESOLVED_TYPE.isNumberObjectType());
  assertFalse(NO_RESOLVED_TYPE.isNumberValueType());
  assertTrue(NO_RESOLVED_TYPE.isObject());
  assertFalse(NO_RESOLVED_TYPE.isFunctionPrototypeType());
  assertFalse(NO_RESOLVED_TYPE.isRegexpType());
  assertTrue(NO_RESOLVED_TYPE.isString());
  assertFalse(NO_RESOLVED_TYPE.isStringObjectType());
  assertFalse(NO_RESOLVED_TYPE.isStringValueType());
  assertFalse(NO_RESOLVED_TYPE.isEnumType());
  assertFalse(NO_RESOLVED_TYPE.isUnionType());
  assertFalse(NO_RESOLVED_TYPE.isStruct());
  assertFalse(NO_RESOLVED_TYPE.isDict());
  assertFalse(NO_RESOLVED_TYPE.isAllType());
  assertFalse(NO_RESOLVED_TYPE.isVoidType());
  assertTrue(NO_RESOLVED_TYPE.isConstructor());
  assertFalse(NO_RESOLVED_TYPE.isInstanceType());
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NO_RESOLVED_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NO_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(ARRAY_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(BOOLEAN_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(BOOLEAN_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(DATE_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(EVAL_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(functionType));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NULL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NUMBER_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(NUMBER_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(URI_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(RANGE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(REFERENCE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(REGEXP_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(STRING_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(STRING_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(SYNTAX_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(TYPE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(ALL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isSubtype(VOID_TYPE));
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NO_RESOLVED_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NO_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NO_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,ARRAY_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,BOOLEAN_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,BOOLEAN_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,DATE_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,EVAL_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,functionType);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NULL_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NUMBER_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,NUMBER_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,URI_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,RANGE_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,REFERENCE_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,REGEXP_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,STRING_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,STRING_OBJECT_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,SYNTAX_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,TYPE_ERROR_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,ALL_TYPE);
  assertCanTestForEqualityWith(NO_RESOLVED_TYPE,VOID_TYPE);
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NO_RESOLVED_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NO_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(ARRAY_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(BOOLEAN_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(BOOLEAN_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(DATE_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(EVAL_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(functionType));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NULL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NUMBER_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(NUMBER_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(URI_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(RANGE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(REFERENCE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(REGEXP_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(STRING_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(STRING_OBJECT_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(SYNTAX_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(TYPE_ERROR_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(ALL_TYPE));
  assertTrue(NO_RESOLVED_TYPE.canTestForShallowEqualityWith(VOID_TYPE));
  assertTrue(NO_RESOLVED_TYPE.isNullable());
  assertTrue(NO_RESOLVED_TYPE.isObject());
  assertTrue(NO_RESOLVED_TYPE.matchesInt32Context());
  assertTrue(NO_RESOLVED_TYPE.matchesNumberContext());
  assertTrue(NO_RESOLVED_TYPE.matchesObjectContext());
  assertTrue(NO_RESOLVED_TYPE.matchesStringContext());
  assertTrue(NO_RESOLVED_TYPE.matchesUint32Context());
  assertEquals("String_Node_Str",NO_RESOLVED_TYPE.toString());
  assertEquals(null,NO_RESOLVED_TYPE.getDisplayName());
  assertFalse(NO_RESOLVED_TYPE.hasDisplayName());
  assertTypeEquals(CHECKED_UNKNOWN_TYPE,NO_RESOLVED_TYPE.getPropertyType("String_Node_Str"));
  Asserts.assertResolvesToSame(NO_RESOLVED_TYPE);
  assertTrue(forwardDeclaredNamedType.isEmptyType());
  assertTrue(forwardDeclaredNamedType.isNoResolvedType());
  UnionType nullable=(UnionType)registry.createNullableType(NO_RESOLVED_TYPE);
  assertTypeEquals(nullable,nullable.getGreatestSubtype(NULL_TYPE));
  assertTypeEquals(NO_RESOLVED_TYPE,nullable.getRestrictedUnion(NULL_TYPE));
}