Buggy code:
protected MaterialContext [ ] materials ; protected Properties properties ; protected Map < String , Integer > boneIndexes = new HashMap < String , Integer > ( ) ; protected List < Modifier > postMeshCreationModifiers = new ArrayList < Modifier > ( ) ; protected List < Face > faces = new ArrayList < Face > ( ) ; protected List < Edge > edges = new ArrayList < Edge > ( ) ; protected List < Point > points = new ArrayList < Point > ( ) ; protected BoundingBox boundingBox ; public TemporalMesh ( Structure meshStructure , BlenderContext blenderContext ) throws BlenderFileException { } protected TemporalMesh ( Structure meshStructure , BlenderContext blenderContext , boolean loadData ) throws BlenderFileException { } public BlenderContext getBlenderContext ( ) { } public List < Vector3f > getVertices ( ) { } public List < Vector3f > getNormals ( ) { } public List < Face > getFaces ( ) { } public List < Edge > getEdges ( ) { } public List < Point > getPoints ( ) { } public List < byte [ ] > getVerticesColors ( ) { } public List < Map < String , Float > > getVertexGroups ( ) { } @ Override public TemporalMesh clone ( ) { } @ Override public void updateModelBound ( ) { } @ Override public BoundingVolume getModelBound ( ) { } @ Override public BoundingVolume getWorldBound ( ) { } public void triangulate ( ) { } public void append ( TemporalMesh mesh ) { } public void setProperties ( Properties properties ) { } public void setMaterials ( MaterialContext [ ] materials ) { } public void addBoneIndex ( String boneName , Integer boneIndex ) { } public void applyAfterMeshCreate ( Modifier modifier ) { } @ Override public int getVertexCount ( ) { } public void clear ( ) { } public void toGeometries ( ) { } protected void prepareFacesGeometry ( List < Geometry > result , MeshHelper meshHelper ) { TemporalMesh . LOGGER . fine ( "Preparing<seq2seq4repair_space>faces<seq2seq4repair_space>geometries." ) ; this . triangulate ( ) ; Vector3f [ ] tempVerts = new Vector3f [ 3 ] ; Vector3f [ ] tempNormals = new Vector3f [ 3 ] ; byte [ ] [ ] tempVertColors = new byte [ 3 ] [ ] ; List < Map < Float , Integer > > boneBuffers = new ArrayList < Map < Float , Integer > > ( 3 ) ; TemporalMesh . LOGGER . log ( Level . FINE , "Appending<seq2seq4repair_space>{0}<seq2seq4repair_space>faces<seq2seq4repair_space>to<seq2seq4repair_space>mesh<seq2seq4repair_space>buffers." , faces . size ( ) ) ; Map < Integer , MeshBuffers > faceMeshes = new HashMap < Integer , MeshBuffers > ( ) ; for ( Face face : faces ) { MeshBuffers meshBuffers = faceMeshes . get ( face . getMaterialNumber ( ) ) ; if ( meshBuffers == null ) { meshBuffers = new MeshBuffers ( face . getMaterialNumber ( ) ) ; faceMeshes . put ( face . getMaterialNumber ( ) , meshBuffers ) ; } List < List < Integer > > triangulatedIndexes = face . getCurrentIndexes ( ) ; List < byte [ ] > vertexColors = face . getVertexColors ( ) ; for ( List < Integer > indexes : triangulatedIndexes ) { assert ( indexes . size ( ) ) == 3 : "The<seq2seq4repair_space>mesh<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>been<seq2seq4repair_space>properly<seq2seq4repair_space>triangulated!" ; boneBuffers . clear ( ) ; for ( int i = 0 ; i < 3 ; ++ i ) { int vertIndex = indexes . get ( i ) ; tempVerts [ i ] = vertices . get ( vertIndex ) ; tempNormals [ i ] = normals . get ( vertIndex ) ; tempVertColors [ i ] = ( vertexColors != null ) ? vertexColors . get ( face . getIndexes ( ) . indexOf ( vertIndex ) ) : null ; <START_BUG> if ( ( boneIndexes . size ( ) ) > 0 ) { <END_BUG> Map < Float , Integer > boneBuffersForVertex = new HashMap < Float , Integer > ( ) ; Map < String , Float > vertexGroupsForVertex = vertexGroups . get ( vertIndex ) ; for ( Map . Entry < String , Integer > entry : boneIndexes . entrySet ( ) ) { if ( vertexGroupsForVertex . containsKey ( entry . getKey ( ) ) ) { boneBuffersForVertex . put ( vertexGroupsForVertex . get ( entry . getKey ( ) ) , entry . getValue ( ) ) ; } } boneBuffers . add ( boneBuffersForVertex ) ; } } Map < String , List < Vector2f > > uvs = meshHelper . selectUVSubset ( face , indexes . toArray ( new Integer [ indexes . size ( ) ] ) ) ; meshBuffers . append ( face . isSmooth ( ) , tempVerts , tempNormals , uvs , tempVertColors , boneBuffers ) ; } } TemporalMesh . LOGGER . fine ( "Converting<seq2seq4repair_space>mesh<seq2seq4repair_space>buffers<seq2seq4repair_space>to<seq2seq4repair_space>geometries." ) ; Map < Geometry , MeshBuffers > geometryToBuffersMap = new HashMap < Geometry , MeshBuffers > ( ) ; for ( Map . Entry < Integer , MeshBuffers > entry : faceMeshes . entrySet ( ) ) { MeshBuffers meshBuffers = entry . getValue ( ) ; Mesh mesh = new Mesh ( ) ; if ( meshBuffers . isShortIndexBuffer ( ) ) { mesh . setBuffer ( Index , 1 , ( ( ShortBuffer ) ( meshBuffers . getIndexBuffer ( ) ) ) ) ; } else { mesh . setBuffer ( Index , 1 , ( ( IntBuffer ) ( meshBuffers . getIndexBuffer ( ) ) ) ) ; } mesh . setBuffer ( meshBuffers . getPositionsBuffer ( ) ) ; mesh . setBuffer ( meshBuffers . getNormalsBuffer ( ) ) ; if ( meshBuffers . areVertexColorsUsed ( ) ) { mesh . setBuffer ( Color , 4 , meshBuffers . getVertexColorsBuffer ( ) ) ; mesh . getBuffer ( Color ) . setNormalized ( true ) ; } BoneBuffersData boneBuffersData = meshBuffers . getBoneBuffers ( ) ;

Fix:
if ( ( ( boneIndexes . size ( ) ) > 0 ) && ( ( vertexGroups . size ( ) ) > 0 ) ) {