Buggy code:
public static void checkNull ( ) { } @ SuppressWarnings ( "deprecation" ) public static String getTimeString ( long time ) { } private static String formNum ( int i ) { } public static void logData ( ) throws Exception { } public static void saveGraph ( ) throws Exception { } private static class GraphPoint { public final int x ; public final int y ; public final long time ; public final int downs ; public GraphPoint ( double px , double py , long t , int d ) { } } public static void displayGraph ( final Curse . Project mod ) { final JLabel picLabel = new JLabel ( new ImageIcon ( Graph . image_graph ) ) { private static final long serialVersionUID = 1L ; public void paint ( Graphics g ) { super . paint ( g ) ; Graphics2D g2d = ( ( Graphics2D ) ( g ) ) ; g2d . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; g2d . setRenderingHint ( RenderingHints . KEY_TEXT_ANTIALIASING , RenderingHints . VALUE_TEXT_ANTIALIAS_ON ) ; int w = getWidth ( ) ; int h = getHeight ( ) ; Map < Long , Integer > map = Graph . graphData . projects . get ( mod . projectID ) ; Graph . TimedValue [ ] values = new Graph . TimedValue [ map . size ( ) ] ; long minTime = - 1 ; long maxTime = - 1 ; int minDown = - 1 ; int maxDown = - 1 ; int index = - 1 ; for ( Long l : map . keySet ( ) ) values [ ( ++ index ) ] = new Graph . TimedValue ( l , map . get ( l ) ) ; Arrays . sort ( values ) ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { if ( ( minTime == ( - 1 ) ) || ( ( values [ i ] . time ) < minTime ) ) minTime = values [ i ] . time ; if ( ( maxTime == ( - 1 ) ) || ( ( values [ i ] . time ) > maxTime ) ) maxTime = values [ i ] . time ; if ( ( minDown == ( - 1 ) ) || ( ( values [ i ] . down ) < minDown ) ) minDown = values [ i ] . down ; if ( ( maxDown == ( - 1 ) ) || ( ( values [ i ] . down ) > maxDown ) ) maxDown = values [ i ] . down ; } ArrayList < Graph . GraphPoint > points = new ArrayList < Graph . GraphPoint > ( ) ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { long time = values [ i ] . time . longValue ( ) ; int downs = values [ i ] . down . intValue ( ) ; double x = 0 ; double y = 0 ; if ( graphRelative . booleanValue ( ) ) { x = Utils . map ( time , minTime , maxTime , 0.0 , w ) ; y = Utils . map ( downs , minDown , maxDown , h , 0.0 ) ; } else { x = Utils . map ( time , minTime , maxTime , 0.0 , w ) ; <START_BUG> y = h - ( Utils . map ( downs , minDown , maxDown , h , 0.0 ) ) ; <END_BUG> } y = Math . max ( 2 , Math . min ( y , ( h - 2 ) ) ) ; points . add ( new Graph . GraphPoint ( x , y , time , downs ) ) ; } boolean isOver = false ; for ( int i = ( points . size ( ) ) - 1 ; i >= 0 ; i -- ) { Graph . GraphPoint p = points . get ( i ) ; Graph . GraphPoint pp = new Graph . GraphPoint ( 0 , ( h - 1 ) , 0 , 0 ) ; if ( i > 0 ) pp = points . get ( ( i - 1 ) ) ; g . drawLine ( pp . x , pp . y , p . x , p . y ) ; g . drawOval ( ( ( p . x ) - 3 ) , ( ( p . y ) - 3 ) , 6 , 6 ) ; if ( ( ( ! isOver ) && ( ( p . time ) > 0L ) ) && ( ( Utils . distSq ( Graph . mouseX , Graph . mouseY , p . x , p . y ) ) <= 100.0 ) ) { isOver = true ; g . drawString ( ( ( ( Graph . getTimeString ( p . time ) ) + "<seq2seq4repair_space>::<seq2seq4repair_space>" ) + ( p . downs ) ) , 4 , 16 ) ; Color c = g . getColor ( ) ; g . setColor ( Color . red ) ; g . drawOval ( ( ( p . x ) - 1 ) , ( ( p . y ) - 1 ) , 2 , 2 ) ; g . drawOval ( ( ( p . x ) - 2 ) , ( ( p . y ) - 2 ) , 4 , 4 ) ; g . setColor ( c ) ; } } if ( ! isOver ) { g . drawString ( ( "" + maxDown ) , 4 , 16 ) ;

Fix:
y = Utils . map ( downs , minDown , maxDown , h , 0.0 ) ;