GroupElement.GROUP_NAME_PROP );
IGroupElementModel.GROUP_NAME_PROP );
	private List doValidate( Module module, ListingElement toValidate )	{		List list = new ArrayList( );		ListingElement targetElement = getListingElement( module, toValidate );		if ( targetElement == null )			targetElement = toValidate;		// Collect all group name in this element.		List groupList = getGroupsWithContents( module, toValidate );		// Check whether the duplicate group name exists in the group name list.		Set duplicateNames = null;		int size = groupList.size( );		for ( int i = 0; i < size - 1; i++ )		{			GroupElement group1 = (GroupElement) groupList.get( i );			String groupName1 = group1.getStringProperty( module,					GroupElement.GROUP_NAME_PROP );			assert groupName1 != null;			// Let's see the case: 1, 3, 5, 1, 2, 1			// We think the second "1" and third "1" duplicate the first "1",			// this case has just two errors, instead of three. So the duplicate			// name will be not checked again.			if ( duplicateNames != null && duplicateNames.contains( groupName1 ) )				continue;			for ( int j = i + 1; j < size; j++ )			{				GroupElement group2 = (GroupElement) groupList.get( j );				String groupName2 = group2.getStringProperty( module,						GroupElement.GROUP_NAME_PROP );				assert groupName2 != null;				if ( groupName1.equalsIgnoreCase( groupName2 ) )				{					if ( duplicateNames == null )						duplicateNames = new HashSet( );					duplicateNames.add( groupName1 );					list							.add( new SemanticError(									group2.getContainer( ),									new String[]{groupName1},									SemanticError.DESIGN_EXCEPTION_DUPLICATE_GROUP_NAME ) );				}			}		}		return list;	}