Buggy code:
private void classify ( BodyEntry bEntry ) { if ( ( getTreatmentByName ( bEntry . getName ( ) ) ) != null ) { LogTool . print ( ( "Entry<seq2seq4repair_space>already<seq2seq4repair_space>exists:<seq2seq4repair_space>" + ( bEntry . getName ( ) ) ) , "debug" ) ; return ; } LogTool . print ( ( "Measuring<seq2seq4repair_space>entry<seq2seq4repair_space>" + ( bEntry . getName ( ) ) ) , "debug" ) ; int [ ] typeCount = new int [ ( bEntry . getMaxType ( ) ) + 1 ] ; double [ ] tcoDists = new double [ ( bEntry . getMaxType ( ) ) + 1 ] ; double [ ] tclDists = new double [ ( bEntry . getMaxType ( ) ) + 1 ] ; double [ ] [ ] typeSum = new double [ ( bEntry . getMaxType ( ) ) + 1 ] [ 3 ] ; ArrayList < double [ ] > tumorVoxel = new ArrayList < double [ ] > ( ) ; LogTool . print ( "Counting<seq2seq4repair_space>voxel" , "debug" ) ; Coordinate c = null ; for ( int i = 0 ; i < ( bEntry . getDimensions ( ) [ 0 ] ) ; i ++ ) { for ( int j = 0 ; j < ( bEntry . getDimensions ( ) [ 1 ] ) ; j ++ ) { for ( int k = 0 ; k < ( bEntry . getDimensions ( ) [ 2 ] ) ; k ++ ) { ( typeCount [ bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getBodyType ( ) ] ) ++ ; typeSum [ bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getBodyType ( ) ] [ 0 ] += bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getCoordinate ( ) . getX ( ) ; typeSum [ bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getBodyType ( ) ] [ 1 ] += bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getCoordinate ( ) . getY ( ) ; typeSum [ bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getBodyType ( ) ] [ 2 ] += bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getCoordinate ( ) . getZ ( ) ; if ( ( bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getBodyType ( ) ) == ( Config . TUMOR ) ) { c = bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getCoordinate ( ) ; tumorVoxel . add ( new double [ ] { c . getX ( ) , c . getY ( ) , c . getZ ( ) } ) ; } } } } LogTool . print ( "Calculating<seq2seq4repair_space>volume<seq2seq4repair_space>center" , "debug" ) ; for ( int i = 0 ; i < ( typeSum . length ) ; i ++ ) { typeSum [ i ] [ 0 ] = ( typeSum [ i ] [ 0 ] ) // ( typeCount [ i ] ) ; typeSum [ i ] [ 1 ] = ( typeSum [ i ] [ 1 ] ) // ( typeCount [ i ] ) ; typeSum [ i ] [ 2 ] = ( typeSum [ i ] [ 2 ] ) // ( typeCount [ i ] ) ; } LogTool . print ( "Calculating<seq2seq4repair_space>center<seq2seq4repair_space>distances" , "debug" ) ; for ( int i = 0 ; i < ( tcoDists . length ) ; i ++ ) { tcoDists [ i ] = getDistance ( typeSum [ Config . TUMOR ] , typeSum [ i ] ) ; } LogTool . print ( "Calculating<seq2seq4repair_space>closest<seq2seq4repair_space>distances" , "debug" ) ; int type = - 1 ; double dist = - 1 ; for ( int i = 0 ; i < ( tclDists . length ) ; i ++ ) { tclDists [ i ] = 50000 ; } for ( int i = 0 ; i < ( bEntry . getDimensions ( ) [ 0 ] ) ; i ++ ) { <START_BUG> System . out . println ( ( "" + i ) ) ; <END_BUG> for ( int j = 0 ; j < ( bEntry . getDimensions ( ) [ 1 ] ) ; j ++ ) { for ( int k = 0 ; k < ( bEntry . getDimensions ( ) [ 2 ] ) ; k ++ ) { for ( int l = 0 ; l < ( tumorVoxel . size ( ) ) ; l ++ ) { type = bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getBodyType ( ) ; dist = getDistance ( bEntry . getBodyArray ( ) [ i ] [ j ] [ k ] . getCoordinate ( ) , tumorVoxel . get ( l ) ) ; if ( ( tclDists [ type ] ) > dist ) { tclDists [ type ] = dist ; } } } } } TreatmentEntry tEntry = new TreatmentEntry ( bEntry . getName ( ) ) ; tEntry . setVolumeCenters ( typeSum ) ; tEntry . setVolumeSizes ( typeCount ) ; tEntry . setTumorCenterDistances ( tcoDists ) ; tEntry . setTumorClosestDistances ( tclDists ) ; addTreatmentEntry ( tEntry ) ; LogTool . print ( ( "New<seq2seq4repair_space>entry:\n" + ( tEntry . toString ( ) ) ) , "debug" ) ; } private double getDistance ( Coordinate coordinate , double [ ] voxel2 ) { } private double getDistance ( double [ ] vc1 , double [ ] vc2 ) { } public void addTreatmentEntry ( TreatmentEntry entry ) { }

Fix:
System . out . println ( String . format ( "Measuring<seq2seq4repair_space>done:<seq2seq4repair_space>%f" , ( ( ( float ) ( i ) ) // ( ( float ) ( bEntry . getDimensions ( ) [ 0 ] ) ) ) ) ) ;