input stringlengths 96 415 | output stringlengths 18 303 |
|---|---|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = false ; TYPE_1 . i ( VAR_2 , STRING_1 ) ; } | public void METHOD_1 ( ) { VAR_1 = false ; TYPE_1 . i ( VAR_2 , STRING_1 ) ; super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 [ ] METHOD_1 ( ) { TYPE_1 [ ] VAR_1 = VAR_2 . METHOD_2 ( ) ; return VAR_1 ; } | public TYPE_1 [ ] METHOD_1 ( ) { return null ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( ) { return VAR_1 . get ( ) ; } | public java.lang.String METHOD_1 ( ) { return VAR_1 . get ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 ) . METHOD_3 ( true ) ; } | public void METHOD_1 ( ) { }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; } } | protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int size ) { return ( ( TYPE_2 ) ( VAR_1 ) ) . METHOD_1 ( size ) ; } | public TYPE_1 METHOD_1 ( java.lang.Object [ ] data ) { return ( ( TYPE_2 ) ( VAR_1 ) ) . METHOD_1 ( data ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( java.lang.Long VAR_1 ) { return VAR_2 . METHOD_2 ( STRING_1 , VAR_3 class ) . METHOD_3 ( STRING_2 , VAR_1 ) . METHOD_4 ( VAR_4 ) . METHOD_5 ( ) ; } | public java.util.List < TYPE_1 > METHOD_1 ( java.lang.Long VAR_1 ) { return null ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = null ; METHOD_2 ( VAR_2 , VAR_3 , VAR_1 ) ; } | public void METHOD_1 ( ) { METHOD_2 ( false ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { VAR_2 = new TYPE_1 ( ) ; try { VAR_2 . METHOD_2 ( VAR_3 , VAR_1 . METHOD_3 ( ) ) ; } catch ( java.lang.Exception VAR_4 ) { throw new TYPE_3 ( VAR_4 ) ; } return VAR_2 ; } | protected TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { VAR_2 = new TYPE_1 ( ) ; VAR_2 . METHOD_2 ( VAR_3 , VAR_1 . METHOD_3 ( ) ) ; return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; super . METHOD_1 ( ) ; TYPE_1 . METHOD_3 ( ) . METHOD_4 ( this ) ; if ( ( VAR_2 ) != null ) { VAR_3 . METHOD_5 ( VAR_2 ) ; } } | public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; if ( ( VAR_2 ) != null ) { VAR_3 . METHOD_5 ( VAR_2 ) ; } TYPE_1 . METHOD_3 ( ) . METHOD_4 ( this ) ; super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { java.lang.String VAR_1 = VAR_2 . METHOD_2 ( TYPE_1 . get ( STRING_1 ) ) . METHOD_3 ( ) . METHOD_4 ( ) . METHOD_5 ( ) ; } | public void METHOD_1 ( ) throws java.lang.Exception { java.lang.String VAR_1 = VAR_2 . METHOD_2 ( TYPE_1 . get ( STRING_1 ) ) . METHOD_3 ( ) . METHOD_4 ( ) . METHOD_5 ( ) ; java.lang.System.out.println ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public < TYPE_1 > TYPE_2 METHOD_1 ( java.lang.Class < TYPE_1 > type , TYPE_3 < TYPE_1 > VAR_1 ) { VAR_2 . put ( type , new TYPE_4 ( type , VAR_1 ) ) ; return this ; } | public < TYPE_1 > TYPE_2 METHOD_1 ( java.lang.Class < TYPE_1 > type , TYPE_3 < TYPE_1 > VAR_1 ) { VAR_2 . add ( new TYPE_4 ( type , VAR_1 ) ) ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( final TYPE_1 VAR_1 ) { TYPE_2 . METHOD_2 ( STRING_1 ) ; VAR_2 . METHOD_3 ( METHOD_4 ( VAR_1 ) ) ; } | private void METHOD_1 ( final TYPE_1 VAR_1 ) { TYPE_2 . METHOD_2 ( STRING_1 ) ; this . VAR_2 . METHOD_3 ( this . METHOD_4 ( VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , TYPE_1 VAR_3 , TYPE_2 < TYPE_3 > VAR_4 ) ; | void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , TYPE_2 < TYPE_3 > VAR_4 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , java.lang.String VAR_3 ) throws TYPE_1 { TYPE_2 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 ) ; } | public static void METHOD_1 ( java.lang.String VAR_2 , java.lang.String VAR_3 ) throws TYPE_1 { TYPE_2 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_1 ( VAR_2 , VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void setValue ( long VAR_1 ) { this . value = VAR_1 ; } | public void setValue ( java.lang.String str ) { this . value = str ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 VAR_2 ) throws TYPE_4 { return new TYPE_1 ( VAR_1 . METHOD_2 ( STRING_1 ) ) ; } | public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 VAR_2 ) throws TYPE_4 { return new TYPE_1 ( ( VAR_1 != null ? VAR_1 . METHOD_2 ( STRING_1 ) : null ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public long METHOD_1 ( ) { VAR_1 [ count ] += VAR_2 ; long position = VAR_1 [ count ] ; count = ( ( count ) + 1 ) % ( VAR_1 . length ) ; return position ; } | public long METHOD_1 ( ) { long position = VAR_1 [ count ] ; VAR_1 [ count ] += VAR_2 ; count = ( ( count ) + 1 ) % ( VAR_1 . length ) ; return position ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { try { VAR_2 . METHOD_2 ( true ) ; } catch ( TYPE_3 VAR_3 ) { TYPE_4 . METHOD_3 ( ) . METHOD_4 ( VAR_3 ) ; } } | public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { try { VAR_2 . METHOD_2 ( true , null ) ; } catch ( TYPE_3 VAR_3 ) { TYPE_4 . METHOD_3 ( ) . METHOD_4 ( VAR_3 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( long id ) { VAR_1 . METHOD_2 ( id ) ; return new TYPE_1 ( STRING_1 ) ; } | public TYPE_1 METHOD_1 ( int id ) { VAR_1 . METHOD_2 ( id ) ; return new TYPE_1 ( STRING_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object METHOD_1 ( ) { return value ; } | public java.lang.Object getValue ( ) { return value ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { android.content.Intent intent = new android.content.Intent ( this , VAR_2 class ) ; METHOD_2 ( intent ) ; METHOD_3 ( VAR_3 , VAR_4 ) ; METHOD_4 ( ) ; } | public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_3 ( VAR_3 , VAR_4 ) ; METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = VAR_3 . METHOD_2 ( ) ; VAR_2 . add ( VAR_4 , VAR_1 ) ; VAR_2 . METHOD_3 ( null ) ; VAR_2 . commit ( ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = VAR_3 . METHOD_2 ( ) ; VAR_2 . add ( VAR_4 , VAR_1 ) ; VAR_2 . commit ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 , float VAR_3 , float VAR_4 ) { VAR_5 = ( java.lang.Math.abs ( VAR_3 ) ) >= ( VAR_6 ) ; return VAR_5 ; } | public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 , float VAR_3 , float VAR_4 ) { VAR_5 = ( java.lang.Math.abs ( VAR_3 ) ) >= ( VAR_6 ) ; return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( java.lang.String VAR_1 ) { return VAR_1 ; } | public java.lang.String METHOD_1 ( ) { return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { if ( ! ( VAR_1 . equals ( TYPE_1 ) ) ) { this . VAR_1 = VAR_1 ; this . VAR_2 = TYPE_2 . METHOD_2 ( VAR_1 ) ; } } | public void METHOD_1 ( java.lang.String VAR_1 ) { if ( ! ( TYPE_1 . equals ( VAR_1 ) ) ) { this . VAR_1 = VAR_1 ; this . VAR_2 = TYPE_2 . METHOD_2 ( VAR_1 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Boolean METHOD_1 ( java.util.List < TYPE_1 > VAR_1 ) { TYPE_2 . METHOD_2 ( STRING_1 , VAR_1 . get ( 0 ) . METHOD_3 ( ) ) ; return VAR_1 != null ; } | public java.lang.Boolean METHOD_1 ( java.util.List < TYPE_1 > VAR_1 ) { return VAR_1 != null ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { this . VAR_1 . METHOD_2 ( null ) ; this . VAR_1 = VAR_1 ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { this . VAR_1 = VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String info ) { if ( TYPE_2 . METHOD_2 ( ) ) VAR_1 . info ( info ) ; } | public static void METHOD_1 ( java.lang.String info ) { if ( TYPE_2 . METHOD_2 ( ) ) { java.lang.System.out.println ( info ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_2 = VAR_1 ; VAR_3 . METHOD_2 ( VAR_1 ) ; VAR_4 = VAR_5 . build ( ) ; METHOD_3 ( ) ; } | public void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_2 = VAR_1 ; VAR_3 . METHOD_2 ( VAR_1 ) ; VAR_4 = VAR_5 . build ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. int METHOD_1 ( int VAR_1 ) { VAR_2 = TYPE_1 . METHOD_2 ( VAR_1 , VAR_2 ) ; return VAR_2 ; } | int METHOD_1 ( int VAR_1 ) { VAR_2 = TYPE_1 . min ( VAR_1 , VAR_2 ) ; return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. TYPE_1 METHOD_1 ( TYPE_2 expr , TYPE_3 VAR_1 , TYPE_4 VAR_2 ) ; | TYPE_1 METHOD_1 ( TYPE_2 expr , TYPE_4 VAR_2 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( ) ; TYPE_2 node = new TYPE_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( node ) ; VAR_2 . METHOD_4 ( ) ; } | public TYPE_2 METHOD_1 ( ) { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( ) ; TYPE_2 node = new TYPE_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( node ) ; VAR_2 . METHOD_4 ( ) ; return node ; }
|
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return VAR_2 . METHOD_2 ( ) . METHOD_3 ( VAR_3 , VAR_4 ) ; } | private TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return VAR_2 . METHOD_2 ( ) . METHOD_3 ( VAR_3 , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.util.List < TYPE_1 > VAR_1 ) { VAR_2 . METHOD_2 ( ) ; VAR_2 . METHOD_3 ( VAR_1 ) ; } | public void METHOD_1 ( java.util.List < TYPE_1 > VAR_1 ) { VAR_2 . METHOD_2 ( ) ; VAR_2 = VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String key , float [ ] VAR_1 ) { METHOD_2 ( STRING_1 , key , STRING_2 , VAR_1 , 1 ) ; VAR_2 . add ( key ) ; TYPE_1 . METHOD_1 ( METHOD_3 ( ) , key , VAR_1 ) ; } | public void METHOD_1 ( java.lang.String key , float [ ] VAR_1 ) { METHOD_2 ( STRING_1 , key , STRING_2 , VAR_1 , 1 ) ; TYPE_1 . METHOD_1 ( METHOD_3 ( ) , key , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { if ( VAR_1 . isEmpty ( ) ) { return null ; } else { TYPE_1 VAR_2 = VAR_1 . METHOD_2 ( ) ; java.lang.System.out.println ( VAR_2 . METHOD_3 ( ) ) ; return VAR_1 . METHOD_2 ( ) ; } } | public TYPE_1 METHOD_1 ( ) { if ( VAR_1 . isEmpty ( ) ) { return null ; } else { TYPE_1 VAR_2 = VAR_1 . METHOD_2 ( ) ; java.lang.System.out.println ( VAR_2 . METHOD_3 ( ) ) ; return VAR_2 ; } }
|
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( final android.content.Context p ) { return ( ( TYPE_1 . METHOD_2 ( ) . METHOD_3 ( ) ) + STRING_1 ) + ( p . METHOD_4 ( ) ) ; } | public static final java.lang.String METHOD_1 ( final android.content.Context p ) { return ( ( TYPE_1 . METHOD_2 ( ) . METHOD_3 ( ) ) + STRING_1 ) + ( p . METHOD_4 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean equals ( java.lang.Object obj ) { return obj . equals ( this ) ; } | public boolean equals ( java.lang.Object obj ) { if ( obj == null ) { return false ; } return obj . equals ( this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { java.lang.String path = STRING_1 ; VAR_3 = VAR_2 ; VAR_1 . METHOD_2 ( VAR_3 , VAR_4 . x , VAR_4 . y , null ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { VAR_3 = VAR_2 ; VAR_1 . METHOD_2 ( VAR_3 , VAR_4 . x , VAR_4 . y , null ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 show ( ) { if ( ( TYPE_1 . context ) == null ) { TYPE_2 . METHOD_1 ( STRING_1 ) ; return null ; } TYPE_1 . METHOD_2 ( ) ; return this ; } | public TYPE_1 show ( ) { if ( ( context ) == null ) { TYPE_2 . METHOD_1 ( STRING_1 ) ; return null ; } TYPE_1 . METHOD_2 ( ) ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { this . METHOD_2 ( ) ; if ( ! ( TYPE_1 . METHOD_3 ( ) ) ) { VAR_1 . METHOD_4 ( ) ; } return null ; } | public java.lang.String METHOD_1 ( ) { if ( ! ( TYPE_1 . METHOD_3 ( ) ) ) { VAR_1 . METHOD_4 ( ) ; } return null ; }
|
The following code may contain bugs. Write a refined code without bugs. public static boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { return VAR_1 . METHOD_2 ( VAR_2 ) ; } | public static boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { if ( VAR_2 != null ) return VAR_1 . METHOD_2 ( VAR_2 ) ; else return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( boolean VAR_1 ) { METHOD_2 ( ( ! VAR_1 ) ) ; if ( ! VAR_1 ) { setValue ( STRING_1 ) ; } } | public void METHOD_1 ( boolean VAR_1 ) { if ( ! VAR_1 ) { METHOD_2 ( true ) ; setValue ( STRING_1 ) ; } else { METHOD_2 ( false ) ; } setState ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( java.lang.String VAR_1 ) ; | public TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) ;
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( java.lang.Void result ) { super . METHOD_1 ( result ) ; METHOD_2 ( ) ; METHOD_2 ( ) ; METHOD_3 ( ) ; VAR_1 . METHOD_4 ( ) ; } | protected void METHOD_1 ( java.lang.Void result ) { METHOD_2 ( ) ; super . METHOD_1 ( result ) ; VAR_1 . METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 arg ) { return TYPE_2 . METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ; } | public TYPE_1 METHOD_1 ( TYPE_1 arg ) { return TYPE_2 . METHOD_2 ( VAR_1 . getName ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( this ) ; VAR_1 . METHOD_2 ( STRING_1 ) ; VAR_1 . METHOD_3 ( false ) ; VAR_1 . show ( ) ; } | public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( this ) ; VAR_1 . METHOD_2 ( STRING_1 ) ; VAR_1 . show ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( long time ) { return ( METHOD_2 ( ) ) && ( ( ( TYPE_1 . METHOD_3 ( ) ) + time ) > ( VAR_1 ) ) ; } | public boolean METHOD_1 ( long time ) { return ( METHOD_2 ( ) ) && ( time < ( ( TYPE_1 . METHOD_3 ( ) ) - ( VAR_1 ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.Object obj ) { return append ( obj ) . append ( "\n" ) ; } | public TYPE_1 METHOD_1 ( java.lang.Object obj ) { append ( obj ) ; stringBuilder.append ( "\n" ) ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. public void remove ( final int i ) { if ( ( VAR_1 . size ( ) ) < i ) { this . VAR_1 . remove ( i ) ; } } | public void remove ( final int i ) { if ( ( VAR_1 . size ( ) ) > i ) { this . VAR_1 . remove ( i ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 < java.lang.Integer > VAR_1 ) { VAR_2 = VAR_1 ; if ( VAR_3 ) { VAR_4 . METHOD_2 ( VAR_5 ) ; } VAR_6 . METHOD_3 ( VAR_1 . get ( ) ) ; } | public void METHOD_1 ( TYPE_1 < java.lang.Integer > VAR_1 ) { if ( ( VAR_2 ) != VAR_1 ) { VAR_2 = VAR_1 ; if ( VAR_3 ) { VAR_4 . METHOD_2 ( VAR_5 ) ; } VAR_6 . METHOD_3 ( VAR_1 . get ( ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_1 ( VAR_1 ) ; TYPE_1 . METHOD_1 ( VAR_2 ) ; } | public void METHOD_1 ( ) { TYPE_1 . METHOD_1 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private static void METHOD_1 ( int i , TYPE_1 VAR_1 ) { boolean VAR_2 = false ; java.lang.System.out.println ( STRING_1 ) ; java.lang.System.out.println ( STRING_2 ) ; java.lang.System.out.println ( STRING_3 ) ; java.lang.System.out.println ( STRING_4 ) ; java.lang.System.out.println ( STRING_1 ) ; java.lang.System.out.print ( STRING_5 ) ; } | private static void METHOD_1 ( ) { java.lang.System.out.println ( STRING_1 ) ; java.lang.System.out.println ( STRING_2 ) ; java.lang.System.out.println ( STRING_3 ) ; java.lang.System.out.println ( STRING_4 ) ; java.lang.System.out.println ( STRING_1 ) ; java.lang.System.out.print ( STRING_5 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( int i ) { try { java.lang.Thread . METHOD_2 ( INT_1 ) ; } catch ( TYPE_1 VAR_1 ) { VAR_1 . METHOD_3 ( ) ; } return ( i % INT_2 ) == 0 ; } | private synchronized boolean METHOD_1 ( int i ) { try { java.lang.Thread . METHOD_2 ( INT_1 ) ; } catch ( TYPE_1 VAR_1 ) { VAR_1 . METHOD_3 ( ) ; } return ( i % INT_2 ) == 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. private void init ( ) { VAR_1 = null ; VAR_2 = null ; } | public void init ( ) { VAR_1 = null ; VAR_2 = null ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int x , int y ) { return VAR_1 [ x ] [ y ] ; } | public TYPE_1 METHOD_1 ( int x , int y ) { return VAR_1 [ y ] [ x ] ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 p ) { if ( p == null ) { throw new java.lang.NullPointerException ( ) ; } if ( ( VAR_1 ) == null ) return null ; else return METHOD_1 ( VAR_1 , p , VAR_1 . p , true ) ; } | public TYPE_1 METHOD_1 ( TYPE_1 p ) { if ( p == null ) { throw new java.lang.NullPointerException ( ) ; } if ( ( VAR_1 ) == null ) return null ; return METHOD_1 ( VAR_1 , p , VAR_1 . p , true ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.StringBuffer format ( long value , java.lang.StringBuffer buffer , TYPE_1 field ) { return buffer . append ( VAR_1 . format ( ( value - ( VAR_2 ) ) ) ) ; } | public java.lang.StringBuffer format ( long value , java.lang.StringBuffer buffer , TYPE_1 field ) { return buffer . append ( VAR_1 . format ( ( value - ( VAR_2 ) ) , false ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { remove ( VAR_2 ) ; remove ( VAR_3 ) ; remove ( VAR_4 ) ; add ( VAR_5 ) ; METHOD_2 ( ) ; METHOD_3 ( ) ; java.lang.System.out.println ( STRING_1 ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { remove ( VAR_5 ) ; remove ( VAR_3 ) ; remove ( VAR_4 ) ; add ( VAR_2 ) ; METHOD_2 ( ) ; METHOD_3 ( ) ; java.lang.System.out.println ( STRING_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( VAR_1 , ( STRING_1 + ( step . METHOD_3 ( ) ) ) ) ; if ( METHOD_4 ( ) ) { METHOD_5 ( step ) ; } } | public void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( METHOD_4 ( ) ) { METHOD_5 ( step ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < TYPE_2 > METHOD_1 ( java.lang.String VAR_1 ) { try { VAR_2 . delete ( VAR_1 ) ; return new TYPE_1 < TYPE_2 > ( VAR_3 ) ; } catch ( TYPE_3 VAR_4 ) { return new TYPE_1 < TYPE_2 > ( VAR_5 ) ; } } | public TYPE_1 < TYPE_2 > METHOD_1 ( java.lang.String VAR_1 ) { try { return new TYPE_1 < TYPE_2 > ( VAR_2 . delete ( VAR_1 ) , VAR_3 ) ; } catch ( TYPE_3 VAR_4 ) { return new TYPE_1 < TYPE_2 > ( VAR_5 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void update ( ) { for ( TYPE_1 VAR_1 : this . VAR_2 ) { VAR_1 . update ( ) ; METHOD_1 ( ) ; } } | public void update ( ) { METHOD_1 ( ) ; for ( TYPE_1 VAR_1 : this . VAR_2 ) { VAR_1 . update ( ) ; METHOD_1 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( java.lang.String VAR_1 ) { return METHOD_2 ( ( ( ( ( VAR_2 ) + STRING_1 ) + ( VAR_3 ) ) + VAR_1 ) ) ; } | public java.lang.String METHOD_1 ( java.lang.String VAR_1 ) { return METHOD_2 ( ( ( ( ( ( VAR_2 ) + ( VAR_3 ) ) + STRING_1 ) + ( VAR_3 ) ) + VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( android.view.View VAR_1 ) { android.content.Intent intent = new android.content.Intent ( this , VAR_2 class ) ; METHOD_2 ( intent ) ; } | public void METHOD_1 ( android.view.View VAR_1 ) { android.content.Intent intent = new android.content.Intent ( this , VAR_2 class ) ; METHOD_2 ( intent ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) ; TYPE_1 . METHOD_3 ( ) ; } | public static void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 . remove ( position ) ; TYPE_1 . init ( context ) ; TYPE_1 . METHOD_2 ( VAR_2 . get ( position ) ) ; METHOD_3 ( ) ; METHOD_4 ( ) ; } | public void METHOD_1 ( android.view.View VAR_1 ) { TYPE_1 . init ( context ) ; TYPE_1 . METHOD_2 ( VAR_2 . get ( position ) ) ; VAR_2 . remove ( position ) ; METHOD_3 ( ) ; METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( int x , int y ) { VAR_1 = x ; VAR_2 = y ; } | private static void METHOD_1 ( int x , int y ) { VAR_1 = x ; VAR_2 = y ; }
|
The following code may contain bugs. Write a refined code without bugs. private static TYPE_1 METHOD_1 ( final java.lang.Class < ? > type ) { return new TYPE_2 ( type . METHOD_2 ( ) . getName ( ) , type . METHOD_3 ( ) ) ; } | private static TYPE_1 METHOD_1 ( final java.lang.Class < ? > type ) { return new TYPE_2 ( type . METHOD_2 ( ) . getName ( ) , type . METHOD_3 ( ) , true ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean remove ( final java.lang.Object VAR_1 ) { return VAR_1 instanceof java.lang.Integer ? remove ( ( ( java.lang.Integer ) ( VAR_1 ) ) . intValue ( ) ) : false ; } | public boolean remove ( final java.lang.Object VAR_1 ) { return ( VAR_1 instanceof java.lang.Integer ) && ( remove ( ( ( java.lang.Integer ) ( VAR_1 ) ) . intValue ( ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_3 . get ( VAR_4 ) . METHOD_3 ( ) , 0 ) ; METHOD_4 ( ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 . setText ( getContext ( ) . getString ( VAR_2 , VAR_3 ) ) ; VAR_4 . setText ( getContext ( ) . getString ( VAR_2 , VAR_5 ) ) ; } | private void METHOD_1 ( ) { METHOD_1 ( VAR_3 , VAR_5 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 c ) { VAR_1 . add ( c ) ; } | private void METHOD_1 ( TYPE_1 c ) { if ( c != null ) VAR_1 . add ( c ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( double VAR_1 , float VAR_2 ) ; | public void METHOD_1 ( double VAR_1 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 < ? > VAR_1 , android.view.View view , int position , long id ) { VAR_2 = position ; } | public void METHOD_1 ( TYPE_1 < ? > VAR_1 , android.view.View view , int position , long id ) { VAR_2 = position + 1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { TYPE_1 . METHOD_1 ( VAR_3 . toString ( ) , VAR_1 , VAR_2 ) ; } | public void METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 . METHOD_1 ( VAR_3 . toString ( ) , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { TYPE_1 . METHOD_2 ( getActivity ( ) , STRING_1 , VAR_2 ) . show ( ) ; METHOD_3 ( ) ; } | public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( this ) ; VAR_1 = TYPE_1 . METHOD_3 ( ) ; VAR_1 . METHOD_4 ( ) . METHOD_5 ( ) . METHOD_6 ( this ) ; } | public void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( this ) ; VAR_1 = TYPE_1 . METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float arg ) { VAR_1 = arg ; METHOD_2 ( ) ; METHOD_3 ( ) ; } | public void METHOD_1 ( float arg ) { VAR_1 = arg ; METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. int METHOD_1 ( TYPE_1 obj , float [ ] data , long VAR_1 , double VAR_2 , int VAR_3 ) ; | int METHOD_1 ( TYPE_1 obj , float [ ] data , int VAR_1 , double VAR_2 , int VAR_3 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 < TYPE_2 > VAR_1 , TYPE_2 data ) { VAR_2 . METHOD_2 ( data ) ; if ( ( VAR_3 ) != ( VAR_4 ) ) { VAR_5 . METHOD_3 ( VAR_3 ) ; } VAR_6 = false ; VAR_7 = STRING_1 ; } | public void METHOD_1 ( TYPE_1 < TYPE_2 > VAR_1 , TYPE_2 data ) { VAR_2 . METHOD_2 ( data ) ; if ( ( VAR_3 ) != ( VAR_4 ) ) { VAR_5 . METHOD_3 ( VAR_3 ) ; } VAR_6 = false ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( char c , int x , int y ) { VAR_1 [ y ] [ x ] . setText ( ( STRING_1 + c ) ) ; VAR_1 [ y ] [ x ] . METHOD_2 ( VAR_2 ) ; } | public void METHOD_1 ( char c , int x , int y ) { VAR_1 [ x ] [ y ] . setText ( ( STRING_1 + c ) ) ; VAR_1 [ x ] [ y ] . METHOD_2 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { new TYPE_1 ( new TYPE_2 ( null , STRING_1 , STRING_2 ) ) ; } | public void METHOD_1 ( ) { new TYPE_1 ( new TYPE_2 ( null , STRING_1 , false , STRING_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( ) { boolean result = ( VAR_1 ) == ( ( VAR_2 . length ) - 1 ) ; return result ; } | private boolean METHOD_1 ( ) { boolean result = ( VAR_1 ) == ( ( VAR_2 . size ( ) ) - 1 ) ; return result ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Integer METHOD_1 ( ) { return VAR_1 ; } | public java.lang.String METHOD_1 ( ) { return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( TYPE_2 TYPE_3 , java.lang.String ... VAR_1 ) { return new TYPE_1 ( TYPE_4 . METHOD_2 ( VAR_1 ) . METHOD_3 ( TYPE_3 : : METHOD_4 ) . iterator ( ) ) ; } | public static TYPE_1 METHOD_1 ( TYPE_2 TYPE_3 , java.lang.String ... VAR_1 ) { return TYPE_1 . METHOD_1 ( TYPE_3 , java.util.Arrays.asList ( VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { if ( VAR_1 . METHOD_2 ( new java.util.Date ( ) ) ) { VAR_2 = false ; } return VAR_2 ; } | public boolean METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { return false ; } if ( VAR_1 . METHOD_2 ( new java.util.Date ( ) ) ) { VAR_2 = false ; } return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( TYPE_1 obj ) { for ( int i = 0 ; i < ( VAR_1 ) ; i ++ ) { VAR_2 [ i ] = VAR_3 ; } } | public static void METHOD_1 ( TYPE_1 obj ) { for ( int i = 0 ; i < ( ( VAR_1 ) + 1 ) ; i ++ ) { VAR_2 [ i ] = VAR_3 ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 view , int VAR_1 , java.lang.String VAR_2 , java.lang.String VAR_3 ) { super . METHOD_1 ( view , VAR_1 , VAR_2 , VAR_3 ) ; VAR_4 . METHOD_2 ( VAR_3 , VAR_1 , VAR_2 ) ; } | public void METHOD_1 ( TYPE_1 view , int VAR_1 , java.lang.String VAR_2 , java.lang.String VAR_3 ) { super . METHOD_1 ( view , VAR_1 , VAR_2 , VAR_3 ) ; VAR_4 . error ( VAR_3 , VAR_1 , VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private static java.lang.String METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( ( STRING_1 + STRING_2 ) ) ; } | private java.lang.String METHOD_1 ( ) { return METHOD_2 ( ( STRING_1 + STRING_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { if ( VAR_1 ) { return STRING_1 ; } else { return STRING_2 ; } } | public java.lang.String METHOD_1 ( ) { return VAR_1 ? STRING_1 : STRING_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( final TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( ( STRING_1 + VAR_1 ) ) ; VAR_2 . METHOD_3 ( ( - INT_1 ) , VAR_3 ) ; VAR_2 . METHOD_4 ( ) ; VAR_4 = false ; } | private void METHOD_1 ( final TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( ( STRING_1 + VAR_1 ) ) ; VAR_2 . METHOD_3 ( ( - INT_1 ) , VAR_3 ) ; VAR_4 = false ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( STRING_1 ) . METHOD_3 ( ) . METHOD_5 ( VAR_2 , VAR_3 ) . METHOD_6 ( ) . METHOD_7 ( ) . METHOD_6 ( ) ; } | protected void METHOD_1 ( TYPE_1 VAR_1 ) { }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.Collection < TYPE_1 > METHOD_1 ( ) { java.util.Set < TYPE_1 > VAR_1 = new java.util.HashSet < > ( ) ; TYPE_2 < TYPE_1 > results = TYPE_3 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( results . METHOD_4 ( ) ) ; return VAR_1 ; } | public java.util.Collection < TYPE_1 > METHOD_1 ( ) { return TYPE_3 . METHOD_2 ( ) . METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( METHOD_3 ( ) , this ) ; TYPE_1 . METHOD_2 ( STRING_1 , this ) ; } | public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( METHOD_3 ( ) , this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 ) { int time = 0 ; while ( time < VAR_1 ) { VAR_2 . METHOD_2 ( ) ; } } | public void METHOD_1 ( int VAR_1 ) { int time = 0 ; while ( time < VAR_1 ) { VAR_2 . METHOD_2 ( ) ; time ++ ; } }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String toString ( ) { return ( ( STRING_1 + ( this . name ) ) + STRING_2 ) + ( this . VAR_1 . toString ( ) ) ; } | public java.lang.String toString ( ) { return ( ( STRING_1 + ( name ) ) + STRING_2 ) + ( VAR_1 . toString ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 [ ] [ ] VAR_1 , int x , int y ) { get ( VAR_1 , x , y ) . METHOD_1 ( ) ; } | private void METHOD_1 ( TYPE_1 [ ] [ ] VAR_1 , int x , int y ) { get ( VAR_1 , x , y ) . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( java.util.Map.Entry < java.lang.String , java.lang.Integer > VAR_1 , java.util.Map.Entry < java.lang.String , java.lang.Integer > VAR_2 ) { return VAR_2 . getValue ( ) . compareTo ( VAR_1 . getValue ( ) ) ; } | public int METHOD_1 ( java.util.Map.Entry < java.lang.String , java.lang.Double > VAR_1 , java.util.Map.Entry < java.lang.String , java.lang.Double > VAR_2 ) { return VAR_2 . getValue ( ) . compareTo ( VAR_1 . getValue ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( double VAR_1 ) { VAR_2 = VAR_3 ; } | public void METHOD_1 ( double VAR_1 ) { }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.