input
stringlengths
96
415
output
stringlengths
18
303
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return this . VAR_1 = VAR_2 . METHOD_2 ( ) ; }
public TYPE_1 METHOD_2 ( ) { this . VAR_1 = null ; return VAR_2 . METHOD_2 ( ) ; }
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.util.List < TYPE_3 > VAR_3 ) { super . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 ) ; VAR_3 . add ( new TYPE_3 ( VAR_1 , 1 , 1 ) ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , java.util.List < TYPE_3 > VAR_3 ) { super . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { TYPE_1 VAR_3 = new TYPE_1 ( VAR_4 . METHOD_2 ( ) , null ) ; return VAR_3 . METHOD_1 ( VAR_5 ) ; }
public boolean METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { TYPE_1 VAR_3 = new TYPE_1 ( VAR_4 . METHOD_2 ( ) , null ) ; return VAR_3 . METHOD_1 ( VAR_1 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; getActivity ( ) . METHOD_2 ( VAR_1 ) ; VAR_2 . start ( ) ; }
public void METHOD_1 ( ) { super . METHOD_1 ( ) ; getActivity ( ) . METHOD_2 ( VAR_1 ) ; if ( ( VAR_2 ) != null ) { VAR_2 . start ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { this . METHOD_2 ( ) ; this . init ( ) ; this . start ( ) ; }
public void METHOD_1 ( ) { this . init ( ) ; this . start ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { this . VAR_1 = VAR_2 ; this . VAR_2 = null ; }
public void METHOD_1 ( ) { if ( ( VAR_2 ) != null ) { this . VAR_1 = VAR_2 ; } this . VAR_2 = null ; }
The following code may contain bugs. Write a refined code without bugs. public void add ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { info . add ( VAR_1 , VAR_2 ) ; VAR_3 . add ( VAR_1 , VAR_2 ) ; VAR_3 . add ( VAR_1 , VAR_2 ) ; }
public void add ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { info . add ( VAR_1 , VAR_2 ) ; VAR_3 . add ( VAR_1 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public long METHOD_1 ( ) { return ( VAR_1 ) + ( VAR_2 . getTime ( ) ) ; }
public long METHOD_1 ( ) { return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String title ) { if ( ( this . VAR_1 ) == null ) this . VAR_1 = new java.util.LinkedList < TYPE_1 > ( ) ; this . title = title ; }
public void METHOD_1 ( java.lang.String title ) { this . title = title ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_1 . METHOD_2 ( ) ; VAR_3 = ( VAR_1 . METHOD_3 ( ) ) + INT_1 ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_1 . METHOD_2 ( ) ; VAR_3 = VAR_1 . METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = STRING_1 ; }
public void METHOD_1 ( ) { }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_1 ( ) ; super . METHOD_1 ( ) ; }
public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_1 ( ) ; } super . METHOD_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View view , boolean VAR_1 ) { if ( VAR_1 ) { VAR_2 . METHOD_2 ( METHOD_3 ( VAR_3 , VAR_4 , index ) ) ; VAR_5 = index ; } }
public void METHOD_1 ( android.view.View view , boolean VAR_1 ) { if ( VAR_1 ) { VAR_2 . METHOD_2 ( METHOD_3 ( VAR_3 , index ) ) ; VAR_5 = index ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final int [ ] VAR_1 ) { METHOD_2 ( VAR_2 ) ; VAR_3 = VAR_4 ; VAR_5 = VAR_1 [ 0 ] ; VAR_6 = VAR_1 [ 1 ] ; TYPE_1 . METHOD_3 ( this ) ; }
public void METHOD_1 ( final int [ ] VAR_1 ) { if ( METHOD_2 ( VAR_2 ) ) { VAR_3 = VAR_4 ; VAR_5 = VAR_1 [ 0 ] ; VAR_6 = VAR_1 [ 1 ] ; TYPE_1 . METHOD_3 ( this ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( VAR_1 . METHOD_2 ( ) ) { VAR_1 . METHOD_3 ( ) ; TYPE_1 . METHOD_4 ( this , STRING_1 , VAR_2 ) . show ( ) ; } }
public void METHOD_1 ( ) { if ( VAR_1 . METHOD_2 ( ) ) { VAR_1 . METHOD_3 ( ) ; } super . METHOD_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 a ) { TYPE_1 VAR_2 = new TYPE_1 ( VAR_1 , a ) ; VAR_3 . add ( 1 , VAR_2 ) ; }
public void METHOD_1 ( java.lang.String VAR_1 , java.lang.String a ) { TYPE_1 VAR_2 = new TYPE_1 ( VAR_1 , a ) ; VAR_3 . add ( 0 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. private java.lang.Double METHOD_1 ( ) { synchronized ( VAR_1 ) { if ( ( VAR_2 ) == null ) { try { init ( ) ; } catch ( java.lang.Exception VAR_3 ) { TYPE_1 . METHOD_2 ( STRING_1 , VAR_3 ) ; } } return VAR_2 ; } }
private java.lang.Double METHOD_1 ( ) { synchronized ( VAR_1 ) { if ( ( VAR_2 ) == null ) { try { init ( ) ; } catch ( java.lang.Exception VAR_3 ) { TYPE_1 . METHOD_2 ( VAR_3 , STRING_1 ) ; } } return VAR_2 ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String name , int VAR_1 ) { TYPE_1 VAR_2 = new TYPE_1 ( name , VAR_1 ) ; VAR_3 . add ( VAR_2 ) ; }
public void METHOD_1 ( TYPE_1 VAR_2 ) { VAR_3 . add ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { for ( int i = 0 ; i < INT_1 ; i ++ ) { VAR_1 . get ( i ) . METHOD_2 ( ) ; } }
public void METHOD_1 ( ) { for ( int i = 0 ; i < ( VAR_1 . size ( ) ) ; i ++ ) { VAR_1 . get ( i ) . METHOD_2 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( ) { return java.util.Arrays.asList ( VAR_1 , VAR_2 , VAR_3 , VAR_4 , VAR_5 , VAR_6 , VAR_7 ) ; }
public java.util.List < TYPE_1 > METHOD_1 ( ) { return java.util.Arrays.asList ( VAR_1 , VAR_2 , VAR_3 , VAR_5 , VAR_6 , VAR_7 ) ; }
The following code may contain bugs. Write a refined code without bugs. static TYPE_1 METHOD_1 ( ) { return TYPE_2 . METHOD_2 ( ) . METHOD_3 ( ) ; }
private static native TYPE_1 METHOD_1 ( ) ;
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] arg ) { VAR_1 . METHOD_1 ( STRING_1 ) ; }
public static void main ( java.lang.String [ ] arg ) { java.lang.System.out.println ( STRING_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final TYPE_1 event ) { METHOD_2 ( VAR_1 , index , event . METHOD_3 ( ) , event . METHOD_4 ( ) , event . METHOD_5 ( ) ) ; }
public void METHOD_1 ( final TYPE_1 event ) { METHOD_2 ( VAR_1 , index , event . METHOD_5 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( ) { java.lang.System.out.println ( STRING_1 ) ; return METHOD_2 ( STRING_2 ) ; }
public java.util.List < TYPE_1 > METHOD_1 ( ) { return METHOD_2 ( STRING_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. private static byte [ ] METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( new byte [ ] { 0 , INT_1 , INT_2 , INT_3 , INT_4 , INT_5 } ) ; }
private static byte [ ] METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( new byte [ ] { 0 , INT_1 , INT_2 , INT_3 , INT_4 } ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; VAR_2 . METHOD_1 ( VAR_1 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( boolean f ) { java.lang.System.out.println ( ( STRING_1 + f ) ) ; VAR_1 = f ; }
public void METHOD_1 ( boolean f ) { VAR_1 = f ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.Integer VAR_1 ) { this . VAR_1 = VAR_1 ; this . VAR_2 = ( this . VAR_1 ) + ( this . VAR_3 ) ; }
public void METHOD_1 ( java.lang.Integer VAR_1 ) { this . VAR_1 = VAR_1 ; this . VAR_2 = ( ( this . VAR_2 ) == null ) ? 0 : ( this . VAR_1 ) + ( this . VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean execute ( java.lang.String query ) throws TYPE_1 { TYPE_2 VAR_1 = VAR_2 . METHOD_1 ( ) ; return VAR_1 . execute ( query ) ; }
public void execute ( java.lang.String query ) throws TYPE_1 { TYPE_2 VAR_1 = VAR_2 . METHOD_1 ( ) ; VAR_1 . execute ( query ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( long VAR_1 ) { VAR_2 . setText ( ( ( n ) + STRING_1 ) ) ; ( n ) -- ; VAR_3 . METHOD_2 ( ( ( INT_1 - ( n ) ) * INT_1 ) ) ; }
public void METHOD_1 ( long VAR_1 ) { VAR_2 . setText ( ( ( n ) + STRING_1 ) ) ; VAR_3 . METHOD_2 ( ( ( INT_1 - ( n ) ) * INT_1 ) ) ; ( n ) -- ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { boolean VAR_1 = VAR_2 . METHOD_2 ( this ) ; VAR_3 . info ( ( ( ( STRING_1 + VAR_1 ) + STRING_2 ) + ( this . toString ( ) ) ) ) ; return VAR_1 ; }
public boolean METHOD_1 ( ) { boolean VAR_1 = VAR_2 . METHOD_2 ( this ) ; VAR_3 . info ( ( STRING_1 + VAR_1 ) ) ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { if ( VAR_2 . METHOD_2 ( ) ) { TYPE_3 . error ( VAR_2 . METHOD_3 ( ) . toString ( ) ) ; } return VAR_3 ; }
public java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { return VAR_3 ; }
The following code may contain bugs. Write a refined code without bugs. protected int METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { return METHOD_2 ( VAR_1 . METHOD_3 ( ) , VAR_1 . METHOD_3 ( ) , VAR_2 , new java.util.ArrayList < TYPE_2 > ( ) ) ; }
public int METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { return METHOD_2 ( VAR_1 . METHOD_3 ( ) , VAR_1 . METHOD_3 ( ) , VAR_2 , new java.util.ArrayList < TYPE_2 > ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = 0 ; VAR_3 = ( ( double ) ( VAR_2 ) ) / FLOAT_1 ; VAR_4 = new java.lang.Double ( VAR_3 ) . toString ( 1.0 ) ; VAR_5 . setText ( VAR_4 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = 0 ; VAR_3 = ( ( double ) ( VAR_2 ) ) / FLOAT_1 ; VAR_4 = new java.lang.Double ( VAR_3 ) . toString ( ) ; VAR_5 . setText ( VAR_4 ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 a ) { for ( TYPE_2 c : VAR_1 ) { a . METHOD_2 ( c ) ; } }
private void METHOD_1 ( TYPE_1 a ) { if ( ( VAR_1 . size ( ) ) != 0 ) { for ( TYPE_2 c : VAR_1 ) { a . METHOD_2 ( c ) ; } } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 . METHOD_2 ( ) ; }
public void METHOD_2 ( ) throws java.lang.Exception { TYPE_1 . METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.util.Calendar METHOD_1 ( int VAR_1 , int VAR_2 , int VAR_3 ) { java.util.Calendar VAR_4 = java.util.Calendar.getInstance ( TYPE_1 . METHOD_2 ( STRING_1 ) ) ; VAR_4 . set ( VAR_1 , ( VAR_2 - 1 ) , VAR_3 ) ; return VAR_4 ; }
public java.util.Calendar METHOD_1 ( int VAR_1 , int VAR_2 , int VAR_3 ) { java.util.Calendar VAR_4 = java.util.Calendar.getInstance ( TYPE_1 . METHOD_2 ( STRING_1 ) ) ; VAR_4 . set ( VAR_1 , VAR_2 , VAR_3 ) ; return VAR_4 ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 VAR_1 = ( ( TYPE_1 ) ( VAR_2 . METHOD_2 ( ) . METHOD_3 ( ) ) ) ; VAR_1 . METHOD_4 ( ) ; }
private void METHOD_1 ( ) { VAR_1 = ( ( TYPE_1 ) ( VAR_2 . METHOD_2 ( ) . METHOD_3 ( ) ) ) ; VAR_1 . METHOD_4 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.util.ArrayList < TYPE_1 > VAR_1 ) { this . VAR_2 = VAR_2 ; }
public void METHOD_1 ( java.util.ArrayList < TYPE_1 > VAR_2 ) { this . VAR_2 = VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. public final TYPE_1 METHOD_1 ( ) { if ( ! ( VAR_1 ) ) { METHOD_2 ( ) ; } return new TYPE_2 ( result ) ; }
public final TYPE_1 METHOD_1 ( ) { if ( ! ( VAR_1 ) ) { result = METHOD_2 ( ) ; } return new TYPE_2 ( result ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( INT_1 ) ; assertEquals ( STRING_1 , INT_2 , VAR_1 . METHOD_3 ( ) ) ; }
public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( INT_1 ) ; assertEquals ( STRING_1 , INT_2 , VAR_1 . METHOD_3 ( ) , 0 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { int VAR_1 = VAR_2 . METHOD_2 ( ) . METHOD_3 ( ) ; if ( VAR_3 ) { VAR_2 . METHOD_4 ( ) ; VAR_4 = true ; } }
public void METHOD_1 ( ) { if ( VAR_3 ) { VAR_2 . METHOD_4 ( ) ; VAR_4 = true ; } }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( int VAR_1 , TYPE_1 VAR_2 , boolean remove ) { if ( ( VAR_3 ) != null ) METHOD_2 ( VAR_1 , VAR_2 , remove ) ; }
protected void METHOD_1 ( int VAR_1 , TYPE_1 VAR_2 , boolean remove ) { if ( ( VAR_3 ) != null ) METHOD_2 ( VAR_1 , VAR_2 , remove , false ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 p ) { TYPE_2 VAR_1 = VAR_2 . METHOD_2 ( this . VAR_3 ) ; if ( VAR_1 == null ) { java.lang.System.out.println ( STRING_1 ) ; return ; } VAR_1 . METHOD_3 ( p . METHOD_4 ( ) ) ; }
public void METHOD_1 ( TYPE_1 p ) { TYPE_2 VAR_1 = VAR_2 . METHOD_2 ( this . VAR_3 ) ; if ( VAR_1 == null ) { return ; } VAR_1 . METHOD_3 ( p . METHOD_4 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 ) { if ( VAR_1 < 0 ) { return ; } this . VAR_1 += VAR_1 ; VAR_2 . setText ( ( STRING_1 + VAR_1 ) ) ; }
public void METHOD_1 ( int VAR_1 ) { if ( VAR_1 < 0 ) { return ; } this . VAR_1 += VAR_1 ; VAR_2 . setText ( ( STRING_1 + ( this . VAR_1 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( java.util.Map < java.lang.String , java.lang.Object > VAR_1 , TYPE_2 VAR_2 ) throws TYPE_3 { return TYPE_4 . METHOD_1 ( VAR_1 , null , false , VAR_2 ) ; }
public static TYPE_1 METHOD_1 ( TYPE_2 VAR_2 , java.util.Map < java.lang.String , java.lang.Object > VAR_1 ) throws TYPE_3 { return TYPE_4 . METHOD_1 ( VAR_2 , VAR_1 , null , false ) ; }
The following code may contain bugs. Write a refined code without bugs. protected TYPE_1 add ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { VAR_1 . add ( VAR_2 ) ; }
protected TYPE_1 add ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { return VAR_1 . add ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( VAR_1 ) ; VAR_2 . METHOD_3 ( ) . METHOD_4 ( VAR_3 . size ( ) ) ; VAR_2 . METHOD_3 ( ) . METHOD_5 ( ) ; }
public void METHOD_1 ( ) { METHOD_2 ( VAR_1 ) ; VAR_2 . METHOD_3 ( ) . METHOD_5 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 . METHOD_2 ( VAR_2 , new TYPE_2 ( ) { public boolean METHOD_3 ( java.lang.Object VAR_3 ) { return true ; } } , false ) ; }
public static void METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 . METHOD_2 ( VAR_1 , new TYPE_2 ( ) { public boolean METHOD_3 ( java.lang.Object VAR_3 ) { return true ; } } , false ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { return false ; }
public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { return true ; }
The following code may contain bugs. Write a refined code without bugs. protected final void METHOD_1 ( ) { VAR_1 = false ; VAR_2 = true ; this . METHOD_2 ( ) ; }
protected final void METHOD_1 ( ) { this . VAR_1 = false ; this . VAR_2 = true ; this . 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 . METHOD_2 ( METHOD_3 ( ) ) ; TYPE_1 . METHOD_4 ( STRING_1 , STRING_2 ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int x , int y ) { if ( y != 0 ) result = x / y ; else java.lang.System.out.println ( STRING_1 ) ; }
public void METHOD_1 ( int x , int y ) { if ( y != 0 ) result = x / y ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { ( ( TYPE_2 ) ( getActivity ( ) ) ) . METHOD_2 ( ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_1 = null ; }
void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; VAR_1 = null ; } }
The following code may contain bugs. Write a refined code without bugs. static void METHOD_1 ( int [ ] array , long VAR_1 ) { for ( int i = 0 ; i < VAR_1 ; i ++ ) { TYPE_1 . METHOD_2 ( array ) ; } }
static void METHOD_1 ( int [ ] array , long VAR_1 ) { for ( long i = 1 ; i <= VAR_1 ; i ++ ) { TYPE_1 . METHOD_2 ( array ) ; } }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { return ( ( VAR_1 ) + ( VAR_2 ) ) + ( ( ( ( VAR_3 ) + ( VAR_2 ) ) + ( METHOD_2 ( ) ) ) . replace ( CHAR_1 , VAR_4 ) ) ; }
public java.lang.String METHOD_1 ( ) { return ( ( ( ( VAR_1 ) + ( VAR_2 ) ) + ( VAR_3 ) ) + ( VAR_2 ) ) + ( METHOD_2 ( ) . replace ( CHAR_1 , VAR_4 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < TYPE_2 > METHOD_1 ( ) { return VAR_1 ; }
public java.util.ArrayList < TYPE_2 > METHOD_1 ( ) { return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 item ) { android.content.Intent VAR_1 = new android.content.Intent ( this , VAR_2 class ) ; METHOD_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( VAR_4 ) ; }
public void METHOD_1 ( TYPE_1 item ) { METHOD_2 ( new android.content.Intent ( this , VAR_2 class ) ) ; VAR_3 . METHOD_3 ( VAR_4 ) ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( android.content.Intent intent , int VAR_1 , int VAR_2 ) { if ( intent != null ) { VAR_3 = intent . METHOD_2 ( VAR_4 ) ; } return super . METHOD_1 ( intent , VAR_1 , VAR_2 ) ; }
public int METHOD_1 ( android.content.Intent intent , int VAR_1 , int VAR_2 ) { VAR_3 = intent . METHOD_2 ( VAR_4 ) ; return super . METHOD_1 ( intent , VAR_1 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 expr ) { if ( expr == null ) return null ; return ( ( TYPE_3 ) ( METHOD_2 ( expr ) ) ) ; }
public TYPE_1 METHOD_1 ( TYPE_2 expr ) { return ( ( TYPE_3 ) ( METHOD_2 ( expr ) ) ) ; }
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 ( STRING_1 , STRING_2 ) ; TYPE_2 . METHOD_3 ( STRING_3 , STRING_4 ) ; VAR_2 . METHOD_4 ( ) ; METHOD_5 ( ) ; TYPE_3 . METHOD_6 ( getActivity ( ) , VAR_1 ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { TYPE_1 . METHOD_2 ( STRING_1 , STRING_2 ) ; TYPE_2 . METHOD_3 ( STRING_3 , STRING_4 ) ; VAR_2 . METHOD_4 ( ) ; TYPE_3 . METHOD_6 ( getActivity ( ) , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( STRING_1 , STRING_2 ) ; METHOD_3 ( ) ; VAR_1 . METHOD_4 ( VAR_2 ) ; METHOD_5 ( ) ; }
public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( STRING_1 , STRING_2 ) ; METHOD_3 ( ) ; VAR_1 . METHOD_4 ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int node ) { nodes . add ( node ) ; VAR_1 += VAR_2 [ node ] ; }
public boolean add ( int node ) { nodes . add ( node ) ; VAR_1 += VAR_2 [ node ] ; return true ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { METHOD_2 ( VAR_1 ) ; TYPE_1 VAR_2 = METHOD_3 ( VAR_3 ) ; java.lang.System.out.println ( STRING_1 ) ; return VAR_2 . METHOD_4 ( ) ; }
public int METHOD_1 ( ) { TYPE_1 VAR_2 = METHOD_3 ( VAR_3 ) ; java.lang.System.out.println ( STRING_1 ) ; return VAR_2 . METHOD_4 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void update ( ) { data = TYPE_1 . METHOD_1 ( getContext ( ) ) ; VAR_1 = new TYPE_2 < java.lang.String > ( getActivity ( ) , VAR_2 , data ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; getActivity ( ) . METHOD_3 ( ) ; }
public void update ( ) { data = TYPE_1 . METHOD_1 ( getContext ( ) ) ; VAR_1 = new TYPE_2 ( getActivity ( ) , VAR_2 , data ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; getActivity ( ) . METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) { TYPE_1 VAR_1 ; TYPE_2 VAR_2 ; VAR_1 = new TYPE_1 ( STRING_1 ) ; VAR_1 . METHOD_1 ( VAR_3 ) ; VAR_1 . METHOD_2 ( ) ; }
public static void main ( java.lang.String [ ] args ) { TYPE_2 VAR_2 ; VAR_2 = new TYPE_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( ) { int VAR_1 = 0 ; for ( TYPE_1 i = this ; i != null ; i = VAR_2 , ++ VAR_1 ) { } return VAR_1 ; }
private int METHOD_1 ( ) { int VAR_1 = 0 ; for ( TYPE_1 i = this ; i != null ; i = VAR_2 , ++ VAR_1 ) ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void remove ( byte [ ] VAR_1 , int VAR_2 ) { TYPE_1 < TYPE_2 > . VAR_3 node ; node = METHOD_1 ( VAR_1 , VAR_2 ) ; if ( node != null ) { node . METHOD_2 ( ) ; } }
public void remove ( byte [ ] VAR_1 , int VAR_2 ) { TYPE_1 < TYPE_2 > . VAR_3 node = METHOD_1 ( VAR_1 , VAR_2 ) ; if ( node != null ) { node . METHOD_2 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; VAR_2 . METHOD_2 ( VAR_1 ) ; VAR_1 . METHOD_3 ( VAR_3 ) ; METHOD_4 ( ) . METHOD_5 ( INT_1 ) ; }
public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_3 ( VAR_3 ) ; VAR_2 . METHOD_2 ( VAR_1 ) ; METHOD_4 ( ) . METHOD_5 ( INT_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( VAR_1 . key ) ; }
public int METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( key ) ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( int position ) { TYPE_1 . METHOD_2 ( STRING_1 , ( STRING_2 + position ) ) ; if ( ( position + 1 ) == ( METHOD_3 ( ) ) ) { return VAR_1 ; } else { return VAR_2 ; } }
public int METHOD_1 ( int position ) { if ( ( position + 1 ) == ( METHOD_3 ( ) ) ) { return VAR_1 ; } else { return VAR_2 ; } }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { java.lang.String [ ] VAR_1 = TYPE_1 . METHOD_2 ( ) ; if ( ( VAR_1 . length ) == 0 ) return ; for ( java.lang.String VAR_2 : VAR_1 ) this . VAR_3 . append ( ( VAR_2 + "\n" ) ) ; }
protected void METHOD_1 ( ) { java.lang.String [ ] VAR_1 = TYPE_1 . METHOD_2 ( ) ; for ( java.lang.String VAR_2 : VAR_1 ) this . VAR_3 . append ( ( VAR_2 + "\n" ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.content.Context context ) { TYPE_1 . i ( VAR_1 , ( ( ( this . getClass ( ) . METHOD_2 ( ) ) + ( getId ( ) ) ) + STRING_1 ) ) ; super . METHOD_1 ( context ) ; }
public void METHOD_1 ( android.content.Context context ) { TYPE_1 . i ( VAR_1 , ( ( getId ( ) ) + STRING_1 ) ) ; super . METHOD_1 ( context ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 view ) { view . METHOD_2 ( new TYPE_2 ( VAR_1 ) ) ; view . METHOD_2 ( new TYPE_3 ( FLOAT_1 ) ) ; view . METHOD_3 ( VAR_2 ) ; view . METHOD_4 ( true ) ; }
public void METHOD_1 ( TYPE_1 view ) { view . METHOD_2 ( new TYPE_2 ( VAR_1 ) ) ; view . METHOD_2 ( new TYPE_3 ( FLOAT_1 ) ) ; view . METHOD_3 ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; if ( ! ( this . VAR_2 ) ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_2 ) ; this . VAR_2 = true ; } }
private void METHOD_1 ( ) { }
The following code may contain bugs. Write a refined code without bugs. private static void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 . METHOD_2 ( ) ; VAR_3 . METHOD_2 ( ) ; VAR_4 . METHOD_2 ( ) ; VAR_5 . METHOD_2 ( ) ; }
private static void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 . METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. private static void METHOD_1 ( TYPE_1 VAR_1 ) throws java.io.IOException , TYPE_2 { java.lang.Thread . METHOD_2 ( INT_1 ) ; TYPE_3 VAR_2 = VAR_1 . METHOD_3 ( ) ; java.lang.System.out.println ( ( STRING_1 + ( VAR_2 . toString ( ) ) ) ) ; }
private static void METHOD_1 ( TYPE_1 VAR_1 ) throws java.io.IOException , TYPE_2 { TYPE_3 VAR_2 = VAR_1 . METHOD_3 ( ) ; java.lang.System.out.println ( ( STRING_1 + ( VAR_2 . toString ( ) ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String arg ) { if ( arg == null ) { java.lang.System.out.println ( ( STRING_1 + ( arg . trim ( ) ) ) ) ; } }
public void METHOD_1 ( java.lang.String arg ) { if ( arg != null ) { java.lang.System.out.println ( ( STRING_1 + ( arg . trim ( ) ) ) ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 a = VAR_1 . METHOD_2 ( state ) ; VAR_2 [ a . y ( ) ] [ a . x ( ) ] . METHOD_3 ( ) ; }
public void METHOD_1 ( ) { TYPE_1 a = VAR_1 . METHOD_2 ( state ) ; VAR_2 [ a . x ( ) ] [ a . y ( ) ] . METHOD_3 ( ) ; }
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 . assertNotNull ( METHOD_2 ( ) ) ; TYPE_1 . assertThat ( METHOD_2 ( ) , TYPE_2 . METHOD_3 ( ( ( VAR_1 + STRING_1 ) + VAR_2 ) ) ) ; }
public void METHOD_1 ( java.lang.String VAR_2 ) { TYPE_1 . assertNotNull ( METHOD_2 ( ) ) ; TYPE_1 . assertThat ( METHOD_2 ( ) , TYPE_2 . METHOD_3 ( VAR_2 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. double METHOD_1 ( ) { double result = 0 ; for ( TYPE_1 node : VAR_1 ) { node . METHOD_1 ( ) ; } return result ; }
double METHOD_1 ( ) { double result = 0 ; for ( TYPE_1 node : VAR_1 ) { result = result + ( node . METHOD_1 ( ) ) ; } return result ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 . METHOD_3 ( VAR_3 ) ; VAR_4 . METHOD_4 ( false ) ; }
private void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; if ( ( VAR_4 ) != null ) { VAR_2 . METHOD_3 ( VAR_3 ) ; VAR_4 . METHOD_4 ( false ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String type ) { this . type = type ; }
public java.lang.String METHOD_1 ( java.lang.String type ) { return this . type = type ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; return super . METHOD_1 ( ) ; }
public int METHOD_1 ( ) { return super . METHOD_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 . info ( ( STRING_1 + ( VAR_2 ) ) ) ; VAR_2 . METHOD_2 ( VAR_1 ) ; return VAR_3 . remove ( VAR_1 ) ; }
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_1 ) ; return VAR_3 . remove ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = METHOD_2 ( VAR_1 ) ; VAR_2 = VAR_3 . METHOD_3 ( VAR_2 ) ; return new TYPE_3 ( VAR_2 ) ; }
public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = METHOD_2 ( VAR_1 ) ; java.lang.System.out.println ( VAR_2 ) ; VAR_2 = VAR_3 . METHOD_3 ( VAR_2 ) ; return new TYPE_3 ( VAR_2 ) ; }
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 ( INT_1 ) ; TYPE_1 . METHOD_4 ( true ) ; }
protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; VAR_1 . METHOD_2 ( ) . METHOD_3 ( INT_1 ) ; TYPE_1 . METHOD_4 ( true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { java.lang.String [ ] VAR_1 = TYPE_1 . METHOD_2 ( INT_1 , INT_2 ) ; for ( java.lang.String string : VAR_1 ) { java.lang.System.out.println ( string ) ; } }
public void METHOD_1 ( ) { java.lang.String [ ] VAR_1 = TYPE_1 . METHOD_2 ( INT_1 , INT_2 ) ; if ( VAR_1 != null ) { for ( java.lang.String string : VAR_1 ) { java.lang.System.out.println ( string ) ; } } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { java.lang.System.out.println ( ( STRING_1 + VAR_1 ) ) ; VAR_2 . add ( VAR_1 ) ; VAR_3 . add ( VAR_1 , VAR_1 . METHOD_2 ( ) ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . add ( VAR_1 ) ; VAR_3 . add ( VAR_1 , VAR_1 . METHOD_2 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.Integer METHOD_1 ( int VAR_1 , java.lang.String VAR_2 ) throws java.lang.Exception { TYPE_1 VAR_3 = new TYPE_1 ( ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( VAR_2 ) ; VAR_4 . add ( VAR_3 ) ; return VAR_3 . getId ( ) ; }
public TYPE_1 METHOD_1 ( int VAR_1 , java.lang.String VAR_2 ) throws java.lang.Exception { TYPE_1 VAR_3 = new TYPE_1 ( ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( VAR_2 ) ; VAR_4 . add ( VAR_3 ) ; return VAR_3 ; }
The following code may contain bugs. Write a refined code without bugs. public static < TYPE_1 > TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_1 VAR_2 ) { TYPE_3 VAR_3 = new TYPE_4 ( VAR_1 ) ; TYPE_5 . METHOD_1 ( VAR_3 , VAR_2 ) ; return VAR_2 ; }
public static < TYPE_1 > TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_1 VAR_2 ) { TYPE_3 VAR_3 = new TYPE_4 ( VAR_1 ) ; TYPE_5 . METHOD_1 ( VAR_1 , VAR_3 , VAR_2 ) ; return VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( TYPE_3 . toString ( ) , true ) ; boolean VAR_2 = VAR_1 . METHOD_3 ( VAR_3 , new java.util.HashMap < > ( ) ) ; TYPE_4 . assertTrue ( VAR_2 ) ; }
public void METHOD_1 ( ) { TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( TYPE_3 . toString ( ) ) ; boolean VAR_2 = VAR_1 . METHOD_3 ( VAR_3 , new java.util.HashMap < > ( ) ) ; TYPE_4 . assertTrue ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 event ) { VAR_1 . METHOD_2 ( this , VAR_2 , VAR_3 . getText ( ) ) ; }
public void METHOD_1 ( TYPE_1 event ) { VAR_1 . METHOD_2 ( this , VAR_2 , VAR_3 . getSelection ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . set ( null ) ; METHOD_2 ( ) ; }
public void METHOD_1 ( ) { VAR_1 . set ( null ) ; }
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( int VAR_1 ) { if ( ( VAR_2 [ VAR_1 ] ) == ( VAR_3 ) ) { VAR_2 [ VAR_1 ] = VAR_4 ; ( VAR_4 ) ++ ; } return VAR_2 [ VAR_1 ] ; }
public int METHOD_1 ( int VAR_1 ) { if ( ( VAR_2 [ VAR_1 ] ) == ( VAR_3 ) ) { VAR_2 [ VAR_1 ] = VAR_4 ; ( VAR_4 ) ++ ; } return VAR_2 [ VAR_1 ] ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 state ) { java.lang.Integer VAR_1 = state . METHOD_2 ( ) . METHOD_3 ( ) ; TYPE_2 VAR_2 = VAR_3 ; VAR_2 . METHOD_4 ( VAR_1 ) ; state . METHOD_5 ( 0 , VAR_2 , VAR_4 ) ; }
public void METHOD_1 ( TYPE_1 state ) { java.lang.Integer VAR_1 = state . METHOD_2 ( ) . METHOD_3 ( ) ; TYPE_2 VAR_2 = VAR_3 ; state . METHOD_5 ( 0 , VAR_2 , VAR_4 ) ; }
The following code may contain bugs. Write a refined code without bugs. public abstract int key ( ) ;
public int key ( ) { return java.lang.Integer.parseInt ( this . key ) ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( this , STRING_1 , VAR_1 ) . show ( ) ; TYPE_2 . METHOD_3 ( this , this ) ; }
void METHOD_1 ( ) { TYPE_2 . METHOD_3 ( this , this ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) throws java.lang.Exception { if ( ( VAR_1 ) > 1 ) { ( VAR_1 ) -- ; } else { throw new java.lang.Exception ( STRING_1 ) ; } }
static void METHOD_1 ( ) throws java.lang.Exception { if ( ( VAR_1 ) > 1 ) { ( VAR_1 ) -- ; } else { throw new java.lang.Exception ( STRING_1 ) ; } }