Buggy code:
public class DistributionGraph extends JComponent implements Scrollable , Clearable { private static final long serialVersionUID = 240L ; private SamplingStatCalculator model ; private static final int xborder = 30 ; public DistributionGraph ( ) { } public DistributionGraph ( SamplingStatCalculator model ) { } private void init ( ) { } public boolean getScrollableTracksViewportWidth ( ) { } public boolean getScrollableTracksViewportHeight ( ) { } private void setModel ( Object model ) { } public Dimension getPreferredScrollableViewportSize ( ) { } public int getScrollableUnitIncrement ( Rectangle visibleRect , int orientation , int direction ) { } public int getScrollableBlockIncrement ( Rectangle visibleRect , int orientation , int direction ) { } public void clearData ( ) { } @ Override public void paintComponent ( Graphics g ) { } private void drawSample ( SamplingStatCalculator p_model , Graphics g ) { int width = getWidth ( ) ; double height = ( getHeight ( ) ) - 1.0 ; for ( int y = 0 ; y < 4 ; y ++ ) { int q1 = ( ( int ) ( height - ( ( height * 0.25 ) * y ) ) ) ; g . setColor ( Color . lightGray ) ; g . drawLine ( DistributionGraph . xborder , q1 , width , q1 ) ; g . setColor ( Color . black ) ; g . drawString ( String . valueOf ( ( ( 25 * y ) + "%" ) ) , 0 , q1 ) ; } g . setColor ( Color . black ) ; g . drawLine ( DistributionGraph . xborder , ( ( int ) ( height ) ) , width , ( ( int ) ( height ) ) ) ; g . drawLine ( DistributionGraph . xborder , 0 , DistributionGraph . xborder , ( ( int ) ( height ) ) ) ; if ( ( p_model != null ) && ( ( p_model . getCount ( ) ) > 50 ) ) { Number ninety = p_model . getPercentPoint ( 0.9 ) ; Number fifty = p_model . getPercentPoint ( 0.5 ) ; long total = p_model . getCount ( ) ; Collection < Number [ ] > values = p_model . getDistribution ( ) . values ( ) ; <START_BUG> Number [ ] [ ] objval = values . toArray ( new Number [ ] [ ] { } ) ; <END_BUG> Arrays . sort ( objval , new NumberComparator ( ) ) ; int len = objval . length ; for ( int count = 0 ; count < len ; count ++ ) { Number [ ] num = objval [ count ] ; double iper = ( ( double ) ( num [ 1 ] . intValue ( ) ) ) // ( ( double ) ( total ) ) ; double iheight = height * iper ; if ( iheight < 1 ) { iheight = 1.0 ; } int ix = ( ( count * 4 ) + ( DistributionGraph . xborder ) ) + 5 ; int dheight = ( ( int ) ( height - iheight ) ) ; g . setColor ( Color . blue ) ; g . drawLine ( ( ix - 1 ) , ( ( int ) ( height ) ) , ( ix - 1 ) , dheight ) ; g . drawLine ( ix , ( ( int ) ( height ) ) , ix , dheight ) ; g . setColor ( Color . black ) ; if ( ( num [ 0 ] . longValue ( ) ) == ( ninety . longValue ( ) ) ) { g . setColor ( Color . red ) ; g . drawLine ( ix , ( ( int ) ( height ) ) , ix , 55 ) ; g . drawLine ( ix , 35 , ix , 0 ) ; g . drawString ( "90%" , ( ix - 30 ) , 20 ) ; g . drawString ( String . valueOf ( num [ 0 ] . longValue ( ) ) , ( ix + 8 ) , 20 ) ; } if ( ( num [ 0 ] . longValue ( ) ) == ( fifty . longValue ( ) ) ) { g . setColor ( Color . orange ) ; g . drawLine ( ix , ( ( int ) ( height ) ) , ix , 30 ) ; g . drawString ( "50%" , ( ix - 30 ) , 50 ) ; g . drawString ( String . valueOf ( num [ 0 ] . longValue ( ) ) , ( ix + 8 ) , 50 ) ; } } } } }

Fix:
Number [ ] [ ] objval = values . toArray ( new Number [ values . size ( ) ] [ ] ) ;