Buggy code:
@ SuppressWarnings ( "serial" ) public class ClassMappingInfo extends MappingInfo implements SourceTracker , Commentable { private static final Localizer _loc = Localizer . forPackage ( ClassMappingInfo . class ) ; private String _className = Object . class . getName ( ) ; private DBIdentifier _tableName = DBIdentifier . NULL ; private DBIdentifier _schemaName = DBIdentifier . NULL ; private boolean _joined = false ; private Map < DBIdentifier , List < Column > > _seconds = null ; private String _subStrat = null ; private File _file = null ; private int _srcType = SRC_OTHER ; private String [ ] _comments = null ; private int _lineNum = 0 ; private int _colNum = 0 ; private Map < DBIdentifier , List < Unique > > _uniques ; public String getClassName ( ) { } public void setClassName ( String name ) { } public String getHierarchyStrategy ( ) { } public void setHierarchyStrategy ( String strategy ) { } public String getTableName ( ) { } public DBIdentifier getTableIdentifier ( ) { } public void setTableName ( String table ) { } public void setTableIdentifier ( DBIdentifier table ) { } public String getSchemaName ( ) { } public DBIdentifier getSchemaIdentifier ( ) { } public void setSchemaName ( String schema ) { } public void setSchemaIdentifier ( DBIdentifier schema ) { } public boolean isJoinedSubclass ( ) { } public void setJoinedSubclass ( boolean joined ) { } public String [ ] getSecondaryTableNames ( ) { } public DBIdentifier [ ] getSecondaryTableIdentifiers ( ) { if ( ( _seconds ) == null ) return new DBIdentifier [ 0 ] ; <START_BUG> return ( ( DBIdentifier [ ] ) ( _seconds . keySet ( ) . toArray ( new DBIdentifier [ ] { } ) ) ) ; <END_BUG> } public String getSecondaryTableName ( String tableName ) { } public DBIdentifier getSecondaryTableIdentifier ( DBIdentifier tableName ) { } public List < Column > getSecondaryTableJoinColumns ( String tableName ) { } public List < Column > getSecondaryTableJoinColumns ( DBIdentifier tableName ) { } public void addSecondaryTable ( String second ) { } public void addSecondaryTable ( DBIdentifier second ) { } public void setSecondaryTableJoinColumns ( String tableName , List < Column > cols ) { } public void setSecondaryTableJoinColumns ( DBIdentifier tableName , List < Column > cols ) { } public Table getTable ( final ClassMapping cls , String tableName , boolean adapt ) { } public Table getTable ( final ClassMapping cls , DBIdentifier tableName , boolean adapt ) { } public Table getTable ( final ClassMapping cls , boolean adapt ) { } public Column [ ] getDataStoreIdColumns ( ClassMapping cls , Column [ ] tmplates , Table table , boolean adapt ) { } public ForeignKey getSuperclassJoin ( final ClassMapping cls , Table table , boolean adapt ) { } public void syncWith ( ClassMapping cls ) { } public boolean hasSchemaComponents ( ) { } protected void clear ( boolean canFlags ) { } public void copy ( MappingInfo info ) { } public void addUnique ( String table , Unique unique ) { } public void addUnique ( DBIdentifier table , Unique unique ) { } public Unique [ ] getUniques ( String table ) { } public Unique [ ] getUniques ( DBIdentifier table ) { } public Unique [ ] getUniques ( MetaDataContext cm , boolean adapt ) { } public File getSourceFile ( ) { } public Object getSourceScope ( ) { } public int getSourceType ( ) { } public void setSource ( File file , int srcType ) { } public String getResourceName ( ) { } public String [ ] getComments ( ) { } public void setComments ( String [ ] comments ) { } public int getLineNumber ( ) { } public void setLineNumber ( int lineNum ) { } public int getColNumber ( ) { } public void setColNumber ( int colNum ) { } }

Fix:
return ( ( DBIdentifier [ ] ) ( _seconds . keySet ( ) . toArray ( new DBIdentifier [ _seconds . size ( ) ] ) ) ) ;