Program: 91697
Project: 91697
Buggy source:
/** 
 * Implementation of   {@link #testComplex()} for the given minimum and maximum occurrences.
 */
private static void testComplex(final DefaultAttributeType<String> city,final DefaultAttributeType<Integer> population,final int minimumOccurs,final int maximumOccurs){
  final DefaultAttributeType<String> festival=new DefaultAttributeType<>(singletonMap(DefaultAttributeType.NAME_KEY,"String_Node_Str"),String.class,minimumOccurs,maximumOccurs,null);
  final DefaultFeatureType complex=new DefaultFeatureType(singletonMap(DefaultAttributeType.NAME_KEY,"String_Node_Str"),false,null,city,population,festival);
  assertUnmodifiable(complex);
  final Collection<PropertyType> properties=complex.getProperties(false);
  final Iterator<PropertyType> it=properties.iterator();
  assertEquals("String_Node_Str","String_Node_Str",complex.getName().toString());
  assertTrue("String_Node_Str",complex.getSuperTypes().isEmpty());
  assertTrue("String_Node_Str",complex.isAssignableFrom(complex));
  assertFalse("String_Node_Str",complex.isAbstract());
  assertFalse("String_Node_Str",complex.isSparse());
  assertEquals("String_Node_Str",maximumOccurs == minimumOccurs,complex.isSimple());
  assertEquals("String_Node_Str",maximumOccurs == 0 ? 2 : 3,complex.indices().size());
  assertEquals("String_Node_Str",minimumOccurs,festival.getMinimumOccurs());
  assertEquals("String_Node_Str",maximumOccurs,festival.getMaximumOccurs());
  assertEquals("String_Node_Str",3,properties.size());
  assertSame("String_Node_Str",city,it.next());
  assertSame("String_Node_Str",population,it.next());
  assertSame("String_Node_Str",festival,it.next());
  assertFalse(it.hasNext());
}

Fixed version (ground truth):
/** 
 * Implementation of   {@link #testComplex()} for the given minimum and maximum occurrences.
 */
private static void testComplex(final DefaultAttributeType<String> city,final DefaultAttributeType<Integer> population,final int minimumOccurs,final int maximumOccurs){
  final DefaultAttributeType<String> festival=new DefaultAttributeType<>(name("String_Node_Str"),String.class,minimumOccurs,maximumOccurs,null);
  final DefaultFeatureType complex=new DefaultFeatureType(name("String_Node_Str"),false,null,city,population,festival);
  assertUnmodifiable(complex);
  final Collection<PropertyType> properties=complex.getProperties(false);
  final Iterator<PropertyType> it=properties.iterator();
  assertEquals("String_Node_Str","String_Node_Str",complex.getName().toString());
  assertTrue("String_Node_Str",complex.getSuperTypes().isEmpty());
  assertTrue("String_Node_Str",complex.isAssignableFrom(complex));
  assertFalse("String_Node_Str",complex.isAbstract());
  assertFalse("String_Node_Str",complex.isSparse());
  assertEquals("String_Node_Str",maximumOccurs == minimumOccurs,complex.isSimple());
  assertEquals("String_Node_Str",maximumOccurs == 0 ? 2 : 3,complex.indices().size());
  assertEquals("String_Node_Str",minimumOccurs,festival.getMinimumOccurs());
  assertEquals("String_Node_Str",maximumOccurs,festival.getMaximumOccurs());
  assertEquals("String_Node_Str",3,properties.size());
  assertSame("String_Node_Str",city,it.next());
  assertSame("String_Node_Str",population,it.next());
  assertSame("String_Node_Str",festival,it.next());
  assertFalse(it.hasNext());
}