Buggy code:
private void parseSQLResultSetMappings ( ClassMapping cm , SqlResultSetMapping ... annos ) { } private void parseDiscriminatorColumn ( ClassMapping cm , DiscriminatorColumn dcol ) { } private void parseInheritance ( ClassMapping cm , Inheritance inherit ) { } private void parseMappingOverrides ( ClassMapping cm , MappingOverride ... overs ) { } private void populate ( FieldMapping fm , MappingOverride over ) { } private void parseDataStoreIdColumn ( ClassMapping cm , DataStoreIdColumn id ) { } private void parseForeignKey ( MappingInfo info , ForeignKey fk ) { } protected void parseForeignKey ( MappingInfo info , String name , boolean enabled , boolean deferred , ForeignKeyAction deleteAction , ForeignKeyAction updateAction ) { } void assertDefault ( ForeignKey fk ) { } private int toForeignKeyAction ( ForeignKeyAction action ) { } private void parseIndex ( MappingInfo info , Index idx ) { } protected void parseIndex ( MappingInfo info , String name , boolean enabled , boolean unique ) { } private void parseUnique ( FieldMapping fm , org . apache . openjpa . persistence . jdbc . Unique anno ) { } private void parseVersionColumns ( ClassMapping cm , VersionColumn ... vcols ) { } private static Column newColumn ( VersionColumn anno ) { } private void parseMappingOverrides ( ClassMapping cm , XMappingOverride ... overs ) { } private void populate ( FieldMapping fm , XMappingOverride over ) { } private void parseElementColumns ( FieldMapping fm , ElementColumn ... pcols ) { } private static Column newColumn ( ElementColumn anno ) { } private void parseKeyJoinColumns ( FieldMapping fm , KeyJoinColumn ... joins ) { } private static Column newColumn ( KeyJoinColumn join ) { } private static int toEagerFetchModeConstant ( FetchMode mode ) { } @ Override protected void parseLobMapping ( FieldMetaData fmd ) { } @ Override protected void parseMemberMappingAnnotations ( FieldMetaData fmd ) { } protected boolean handleUnknownMemberMappingAnnotation ( FieldMapping fm , Annotation anno ) { } protected static int toPolymorphicConstant ( NonpolymorphicType val ) { } private void parseAssociationOverrides ( FieldMapping fm , AssociationOverride ... assocs ) { } private void parseAttributeOverrides ( FieldMapping fm , AttributeOverride ... attrs ) { } private void parseEnumerated ( FieldMapping fm , Enumerated anno ) { } private void parseTemporal ( FieldMapping fm , Temporal anno ) { } protected void parseColumns ( FieldMapping fm , javax . persistence ... pcols ) { if ( ( pcols . length ) == 0 ) return ; List cols = fm . getValueInfo ( ) . getColumns ( ) ; if ( ( ! ( cols . isEmpty ( ) ) ) && ( ( cols . size ( ) ) != ( pcols . length ) ) ) throw new org . apache . openjpa . util . MetaDataException ( AnnotationPersistenceMappingParser . _loc . get ( "num-cols-mismatch" , fm , String . valueOf ( cols . size ( ) ) , String . valueOf ( pcols . length ) ) ) ; Class xmlTypeClass = null ; try { xmlTypeClass = Class . forName ( "javax.xml.bind.annotation.XmlType" ) ; } catch ( Exception e ) { } int unique = 0 ; String secondary = null ; for ( int i = 0 ; i < ( pcols . length ) ; i ++ ) { if ( ( cols . size ( ) ) > i ) AnnotationPersistenceMappingParser . setupColumn ( ( ( Column ) ( cols . get ( i ) ) ) , pcols [ i ] ) ; else { if ( cols . isEmpty ( ) ) cols = new ArrayList < Column > ( pcols . length ) ; cols . add ( AnnotationPersistenceMappingParser . newColumn ( pcols [ i ] ) ) ; } <START_BUG> if ( ( ( xmlTypeClass != null ) && ( StringUtils . isEmpty ( pcols [ i ] . columnDefinition ( ) ) ) ) && ( ( ( Boolean ) ( AccessController . doPrivileged ( J2DoPriv5Helper . isAnnotationPresentAction ( fm . getDeclaredType ( ) , xmlTypeClass ) ) ) ) . booleanValue ( ) ) ) { <END_BUG> DBDictionary dict = ( ( org . apache . openjpa . jdbc . meta . MappingRepository ) ( getRepository ( ) ) ) . getDBDictionary ( ) ; if ( dict . supportsXMLColumn ) ( ( Column ) ( cols . get ( i ) ) ) . setTypeName ( dict . xmlTypeName ) ; } unique |= ( pcols [ i ] . unique ( ) ) ? AnnotationPersistenceMappingParser . TRUE : AnnotationPersistenceMappingParser . FALSE ; secondary = trackSecondaryTable ( fm , secondary , pcols [ i ] . table ( ) , i ) ; } setColumns ( fm , fm . getValueInfo ( ) , cols , unique ) ; if ( secondary != null ) fm . getMappingInfo ( ) . setTableName ( secondary ) ; } private static Column newColumn ( javax . persistence . Column anno ) { } private static void setupColumn ( Column col , javax . persistence . Column anno ) { } protected void setColumns ( FieldMapping fm , MappingInfo info , List < Column > cols , int unique ) { } private String trackSecondaryTable ( FieldMapping fm , String secondary , String colSecondary , int col ) { } private void parseJoinTable ( FieldMapping fm , JoinTable join ) { } private void parseJoinColumns ( FieldMapping fm , MappingInfo info , boolean secondaryAllowed , JoinColumn ... joins ) { } private static Column newColumn ( JoinColumn join ) { } private void parseKeyColumns ( FieldMapping fm , KeyColumn ... pcols ) { } private static Column newColumn ( KeyColumn anno ) { } private void parsePrimaryKeyJoinColumns ( FieldMapping fm , PrimaryKeyJoinColumn ... joins ) { } protected void parseXJoinColumns ( FieldMapping fm , MappingInfo info , boolean secondaryAllowed , XJoinColumn ... joins ) { } private static Column newColumn ( XJoinColumn join ) { } private void parseEmbeddedMapping ( FieldMapping fm , EmbeddedMapping anno ) { }

Fix:
if ( ( ( xmlTypeClass != null ) && ( StringUtils . isEmpty ( pcols [ i ] . columnDefinition ( ) ) ) ) && ( AccessController . doPrivileged ( J2DoPriv5Helper . isAnnotationPresentAction ( fm . getDeclaredType ( ) , xmlTypeClass ) ) . booleanValue ( ) ) ) {