input stringlengths 96 415 | output stringlengths 18 303 |
|---|---|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) . METHOD_3 ( VAR_1 , "false" ) ; } | public static void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) . METHOD_3 ( VAR_1 , "true" ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 c , boolean VAR_1 ) throws TYPE_2 , java.io.IOException { c . METHOD_2 ( ) ; } | public void METHOD_1 ( TYPE_1 c , boolean VAR_1 ) throws TYPE_2 , java.io.IOException { if ( VAR_1 && ( c == null ) ) { return ; } c . METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String VAR_2 ) { TYPE_2 VAR_3 = new TYPE_3 ( ) . METHOD_2 ( VAR_2 ) ; VAR_1 = METHOD_3 ( VAR_1 , VAR_3 ) ; } | private void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String VAR_2 ) { TYPE_2 VAR_3 = new TYPE_3 ( ) . METHOD_2 ( VAR_2 ) ; VAR_1 = METHOD_3 ( VAR_1 , VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.Object VAR_1 ) { VAR_2 &= ~ ( INT_1 < < ( METHOD_2 ( VAR_1 , null ) ) ) ; } | public void METHOD_1 ( java.lang.Object VAR_1 ) { VAR_2 &= ~ ( 1 < < ( METHOD_2 ( VAR_1 , null ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < TYPE_2 > METHOD_1 ( java.lang.String url ) { try { return TYPE_1 . METHOD_2 ( VAR_1 . get ( url ) ) ; } catch ( TYPE_3 VAR_2 ) { VAR_2 . METHOD_3 ( ) ; } return TYPE_1 . METHOD_4 ( ) ; } | public TYPE_1 < TYPE_2 > METHOD_1 ( java.lang.String url ) { try { return VAR_1 . get ( url ) ; } catch ( TYPE_3 VAR_2 ) { VAR_2 . METHOD_3 ( ) ; } return TYPE_1 . METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return ( VAR_1 . size ( ) ) > ( ( index ) + 1 ) ; } | public boolean METHOD_1 ( ) { return ( VAR_1 . size ( ) ) > ( index ) ; }
|
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 ) { if ( VAR_1 . METHOD_2 ( STRING_1 ) ) { if ( METHOD_3 ( VAR_1 ) ) { return true ; } else { return false ; } } else { return false ; } } | public boolean METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { if ( VAR_2 . METHOD_2 ( STRING_1 ) ) { if ( METHOD_3 ( VAR_1 ) ) { return true ; } else { return false ; } } else { return false ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.Object VAR_1 ) { return TYPE_2 . METHOD_2 ( VAR_1 , METHOD_3 ( ) ) ; } | public TYPE_1 METHOD_1 ( java.lang.Object VAR_1 ) { return TYPE_2 . METHOD_2 ( VAR_1 , TYPE_2 . METHOD_3 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_1 ( INT_1 , VAR_1 , VAR_2 ) ; } | public void METHOD_1 ( ) { METHOD_1 ( VAR_1 , VAR_1 , VAR_2 ) ; }
|
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 ) { VAR_3 . METHOD_2 ( VAR_1 ) ; TYPE_4 . METHOD_3 ( null , STRING_1 , STRING_2 , VAR_4 ) ; return new TYPE_1 ( STRING_3 , STRING_4 , new TYPE_2 ( ) ) ; } | public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 VAR_2 ) { VAR_3 . METHOD_2 ( VAR_1 ) ; return new TYPE_1 ( STRING_3 , STRING_4 , new TYPE_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 ( STRING_1 , ( STRING_2 + ( VAR_1 . getName ( ) ) ) ) ; VAR_2 . setText ( VAR_1 . getName ( ) ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . setText ( VAR_1 . getName ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 , TYPE_1 VAR_3 ) { if ( ! ( TYPE_2 . METHOD_2 ( VAR_2 , VAR_1 , VAR_3 ) ) ) { METHOD_3 ( VAR_1 , VAR_2 , VAR_3 ) ; } } | private void METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 , TYPE_1 VAR_3 ) { if ( ! ( METHOD_2 ( VAR_2 , VAR_1 , VAR_3 ) ) ) { METHOD_3 ( VAR_1 , VAR_2 , VAR_3 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( java.lang.String VAR_1 ) { METHOD_2 ( result ) ; } | protected void METHOD_1 ( java.lang.String VAR_1 ) { METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , java.lang.Object VAR_2 , TYPE_3 VAR_3 ) { this . METHOD_2 ( ) ; java.util.List < TYPE_4 > VAR_4 = this . METHOD_3 ( VAR_1 , VAR_2 , VAR_3 ) ; return TYPE_5 . METHOD_4 ( this . VAR_5 , VAR_4 ) ; } | public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , java.lang.Object VAR_2 , TYPE_3 VAR_3 ) { this . METHOD_2 ( ) ; java.util.List < TYPE_4 > VAR_4 = this . METHOD_3 ( VAR_1 , VAR_2 , false ) ; return TYPE_5 . METHOD_4 ( this . VAR_5 , VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object METHOD_1 ( ) { return METHOD_2 ( ) ? null : TYPE_1 . METHOD_3 ( ) . METHOD_1 ( ) ; } | private java.lang.Object METHOD_1 ( ) { return METHOD_2 ( ) ? null : TYPE_1 . METHOD_3 ( ) . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private static java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { return TYPE_2 . METHOD_1 ( VAR_1 ) . replaceAll ( STRING_1 , STRING_2 ) . replaceAll ( STRING_3 , STRING_4 ) ; } | private static java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { return VAR_1 . METHOD_1 ( ) . replaceAll ( STRING_1 , STRING_2 ) . replaceAll ( STRING_3 , STRING_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Integer add ( java.lang.Integer a , java.lang.Integer b ) { return ( a + b ) + 1 ; } | public java.lang.Integer add ( java.lang.Integer a , java.lang.Integer b ) { return a + b ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { this . VAR_1 . METHOD_2 ( this . VAR_2 , VAR_3 . getValue ( ) ) ; } | public void METHOD_1 ( ) { if ( ( this . VAR_2 ) != null ) { this . VAR_1 . METHOD_2 ( this . VAR_2 , VAR_3 . getValue ( ) ) ; this . VAR_2 = null ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 data ) throws java.lang.Exception { VAR_1 = data ; METHOD_2 ( ) ; } | public void METHOD_1 ( TYPE_1 i ) throws java.lang.Exception { VAR_1 = i ; METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 , TYPE_1 status ) throws TYPE_2 { this . VAR_2 . put ( VAR_1 , status ) ; this . METHOD_2 ( ) ; } | public void METHOD_1 ( int VAR_1 , TYPE_1 status ) throws TYPE_2 { this . VAR_2 . put ( VAR_1 , status ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_2 ( ) ; VAR_2 . METHOD_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( new TYPE_2 ( ) ) ; } | private void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_2 ( ) ; VAR_2 . METHOD_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( java.lang.String name , TYPE_1 type ) { VAR_1 . add ( name ) ; VAR_2 . add ( false ) ; VAR_3 . add ( type ) ; } | public static void METHOD_1 ( java.lang.String name , TYPE_1 type ) { VAR_2 . add ( false ) ; VAR_3 . add ( type ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 f = ( ( TYPE_1 ) ( TYPE_2 . METHOD_2 ( STRING_1 ) ) ) ; METHOD_3 ( f . METHOD_4 ( ) , f . METHOD_5 ( ) ) ; } | public void METHOD_1 ( ) { TYPE_1 f = ( ( TYPE_1 ) ( METHOD_2 ( STRING_1 ) ) ) ; METHOD_3 ( f . METHOD_4 ( ) , f . METHOD_5 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void delete ( ) { METHOD_1 ( VAR_1 ) ; } | public void delete ( ) { if ( ( VAR_1 ) != null ) METHOD_1 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( int number ) { VAR_1 += java.lang.String . METHOD_2 ( number ) ; VAR_2 . setText ( VAR_1 ) ; } | void METHOD_1 ( long number ) { VAR_1 += java.lang.String . METHOD_2 ( number ) ; VAR_2 . setText ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , short VAR_2 , short VAR_3 , short VAR_4 ) { return METHOD_1 ( VAR_1 , null , VAR_2 , ( ( short ) ( 0 ) ) , ( ( short ) ( 0 ) ) ) ; } | public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , short VAR_2 , short VAR_3 , short VAR_4 ) { return METHOD_1 ( VAR_1 , null , VAR_2 , VAR_3 , VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { VAR_2 . METHOD_1 ( ) ; } | public void METHOD_1 ( java.lang.String VAR_1 ) { VAR_2 . METHOD_1 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( java.lang.String VAR_1 ) { VAR_2 . setText ( VAR_1 ) ; } | public void METHOD_1 ( java.lang.String VAR_1 ) { VAR_2 . setText ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final TYPE_1 VAR_1 ) { VAR_1 . METHOD_2 ( STRING_1 , this . VAR_2 ) ; VAR_1 . METHOD_3 ( STRING_2 , VAR_3 . toString ( ) ) ; } | public void METHOD_1 ( final TYPE_1 VAR_1 ) { VAR_1 . METHOD_2 ( STRING_1 , this . VAR_2 ) ; if ( ( VAR_3 ) != null ) VAR_1 . METHOD_3 ( STRING_2 , VAR_3 . toString ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int position , float VAR_1 , int VAR_2 ) { if ( VAR_3 ) { METHOD_2 ( ) ; } } | public void METHOD_1 ( int position , float VAR_1 , int VAR_2 ) { }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( VAR_2 ) ; TYPE_2 VAR_3 = ( ( TYPE_2 ) ( METHOD_3 ( VAR_4 ) ) ) ; VAR_3 . METHOD_4 ( VAR_5 , INT_1 , INT_2 , this ) ; } | protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( VAR_2 ) ; TYPE_2 VAR_3 = ( ( TYPE_2 ) ( METHOD_3 ( VAR_4 ) ) ) ; VAR_3 . METHOD_4 ( VAR_5 , 0 , 0 , this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void update ( float VAR_1 ) { VAR_2 . update ( VAR_1 ) ; TYPE_1 . update ( VAR_1 ) ; super . update ( VAR_1 ) ; } | public void update ( float VAR_1 ) { super . update ( VAR_1 ) ; TYPE_1 . update ( VAR_1 ) ; VAR_2 . update ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 event ) { for ( TYPE_2 VAR_1 : event . METHOD_2 ( ) . METHOD_3 ( ) ) { VAR_1 . METHOD_4 ( ) . get ( 1 ) . METHOD_5 ( STRING_1 ) . METHOD_6 ( ) ; } } | public void METHOD_1 ( TYPE_1 event ) { }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { return ( ( ( ( ( STRING_1 + ( name ) ) + STRING_2 ) + ( VAR_1 ) ) + STRING_3 ) + ( VAR_2 ) ) + STRING_4 ; } | public java.lang.String toString ( ) { return ( ( ( ( ( STRING_1 + ( name ) ) + STRING_2 ) + ( VAR_1 ) ) + STRING_3 ) + ( VAR_2 ) ) + STRING_4 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = new java.io.File ( METHOD_2 ( ) , STRING_1 ) ; VAR_2 = TYPE_1 . METHOD_3 ( VAR_1 ) ; METHOD_4 ( ) ; } | public void METHOD_1 ( ) { this . VAR_1 = new java.io.File ( METHOD_2 ( ) , STRING_1 ) ; this . VAR_2 = TYPE_1 . METHOD_3 ( this . VAR_1 ) ; METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( VAR_1 . contains ( METHOD_2 ( ) ) ) return ; VAR_2 . METHOD_1 ( ) ; } | public void METHOD_1 ( ) { VAR_2 . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void execute ( java.lang.String VAR_1 ) { java.lang.System.out.println ( STRING_1 ) ; java.lang.System.exit ( 0 ) ; } | public void execute ( ) { java.lang.System.out.println ( STRING_1 ) ; java.lang.System.exit ( 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 . METHOD_2 ( VAR_1 . METHOD_3 ( TYPE_2 . METHOD_4 ( ) , TYPE_2 . METHOD_4 ( ) ) ) . METHOD_5 ( null ) ; VAR_2 . METHOD_6 ( VAR_1 ) ; } | public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 . METHOD_2 ( VAR_1 . METHOD_3 ( TYPE_2 . METHOD_4 ( ) , TYPE_2 . METHOD_4 ( ) ) ) . METHOD_5 ( null ) ; this . VAR_2 . METHOD_6 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static < TYPE_1 > TYPE_1 METHOD_1 ( TYPE_1 VAR_1 , java.lang.Class < ? > VAR_2 ) { return ( ( TYPE_1 ) ( TYPE_2 . METHOD_2 ( VAR_3 class , new TYPE_3 ( VAR_1 , VAR_2 ) ) ) ) ; } | public static < TYPE_1 > TYPE_1 METHOD_1 ( TYPE_1 VAR_1 , java.lang.Class < ? > VAR_2 ) { return ( ( TYPE_1 ) ( TYPE_2 . METHOD_2 ( VAR_1 . getClass ( ) , new TYPE_3 ( VAR_1 , VAR_2 ) ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( boolean VAR_1 ) ; | void METHOD_1 ( ) ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_1 ( VAR_1 ) ; this . VAR_3 = 0 ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_2 ) != null ) VAR_2 . METHOD_1 ( VAR_1 ) ; this . target = VAR_1 ; this . VAR_3 = 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { counter . setText ( java.lang.String . METHOD_2 ( ( ( VAR_1 ) -- ) ) ) ; } | public void METHOD_1 ( ) { counter . setText ( java.lang.String . METHOD_2 ( ( -- ( VAR_1 ) ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( METHOD_3 ( ) ) ; } | public void METHOD_1 ( ) { METHOD_2 ( METHOD_3 ( ) , false ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public android.view.View METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , TYPE_3 VAR_3 ) { view = VAR_1 . METHOD_2 ( VAR_4 , VAR_2 , false ) ; METHOD_3 ( ) ; METHOD_4 ( ) ; return view ; } | public android.view.View METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , TYPE_3 VAR_3 ) { view = VAR_1 . METHOD_2 ( VAR_4 , VAR_2 , false ) ; METHOD_3 ( ) ; return view ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { switch ( this ) { case VAR_1 : return STRING_1 ; case VAR_2 : return STRING_2 ; case VAR_3 : return STRING_3 ; case VAR_4 : return STRING_4 ; case VAR_5 : return STRING_5 ; } return null ; } | public java.lang.String METHOD_1 ( ) { switch ( this ) { case VAR_1 : return STRING_1 ; case VAR_3 : return STRING_3 ; case VAR_4 : return STRING_4 ; case VAR_5 : return STRING_5 ; case VAR_2 : return STRING_2 ; } return null ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 p , java.lang.String id , java.lang.String name , java.lang.String VAR_1 ) { METHOD_2 ( p , id , name , VAR_1 , 1 , null ) ; } | public void METHOD_1 ( TYPE_1 p , java.lang.String id , java.lang.String name , java.lang.String VAR_1 ) { METHOD_2 ( p , id , name , VAR_1 , 1 , null ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static boolean METHOD_1 ( ) { } | public static boolean METHOD_1 ( ) { return false ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , int position ) { METHOD_1 ( VAR_1 , VAR_2 ) ; } | protected abstract void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , int position ) ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String VAR_2 ) throws TYPE_2 { if ( VAR_1 . METHOD_2 ( ) ) { TYPE_3 . METHOD_3 ( VAR_1 ) ; return ; } METHOD_4 ( VAR_1 , VAR_2 ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String VAR_2 ) throws TYPE_2 { METHOD_4 ( VAR_1 , VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.io.IOException { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( VAR_3 , VAR_4 class ) ; assertEquals ( 0 , VAR_1 . METHOD_3 ( ) ) ; assertEquals ( STRING_1 , VAR_1 . METHOD_4 ( ) ) ; } | public void METHOD_1 ( ) throws java.io.IOException { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( VAR_3 , VAR_4 class ) ; assertEquals ( 0 , VAR_1 . METHOD_3 ( ) . intValue ( ) ) ; assertEquals ( STRING_1 , VAR_1 . METHOD_4 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( int value ) { if ( ( value >= 0 ) && ( INT_1 <= value ) ) { return "0" . METHOD_2 ( java.lang.String . METHOD_3 ( value ) ) ; } return java.lang.String . METHOD_3 ( value ) ; } | public static java.lang.String METHOD_1 ( int value ) { if ( ( value >= 0 ) && ( value <= INT_1 ) ) { return "0" . METHOD_2 ( java.lang.String . METHOD_3 ( value ) ) ; } return java.lang.String . METHOD_3 ( value ) ; }
|
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 . METHOD_3 ( ) . METHOD_4 ( new TYPE_3 ( VAR_1 ) ) , VAR_3 ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_2 ( TYPE_2 . METHOD_3 ( ) . METHOD_4 ( new TYPE_3 ( VAR_1 ) ) , VAR_3 ) ; } }
|
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 ) ; } | public void METHOD_1 ( ) { super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public long METHOD_1 ( ) { return VAR_1 . METHOD_2 ( ) . size ( ) ; } | public long METHOD_1 ( ) { return 1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return ( VAR_2 . METHOD_2 ( VAR_1 . METHOD_3 ( ) ) . METHOD_4 ( ) ) == 0 ; } | public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return ( VAR_2 . METHOD_2 ( VAR_1 . METHOD_3 ( ) ) . METHOD_4 ( ) ) == 1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_1 ( false , VAR_1 ) ; } | public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_1 ( false , false , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( final java.lang.String VAR_1 , final java.lang.String msg ) { if ( VAR_2 ) TYPE_1 . METHOD_1 ( VAR_1 , msg ) ; } | public static void METHOD_1 ( final java.lang.String VAR_1 , final java.lang.String msg ) { TYPE_1 . METHOD_1 ( VAR_1 , msg ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . METHOD_2 ( STRING_1 ) ; METHOD_3 ( ) ; METHOD_4 ( VAR_1 , VAR_2 ) ; METHOD_5 ( VAR_2 ) ; METHOD_6 ( ) ; } | public void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . METHOD_2 ( STRING_1 ) ; METHOD_5 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void setValue ( java.lang.String key , boolean value ) { this . values . put ( key , value ) ; VAR_1 = true ; } | public void setValue ( java.lang.String key , double [ ] value ) { synchronized ( values ) { this . values . put ( key , value ) ; VAR_1 = true ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String message ) { try { METHOD_2 ( VAR_1 , message ) ; } catch ( java.io.IOException | TYPE_1 VAR_2 ) { TYPE_2 . METHOD_3 ( VAR_3 , STRING_1 , VAR_2 ) ; } } | public void METHOD_1 ( java.lang.String message ) { try { METHOD_2 ( VAR_1 , message ) ; } catch ( TYPE_1 VAR_2 ) { TYPE_2 . METHOD_3 ( VAR_3 , STRING_1 , VAR_2 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public synchronized void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . put ( VAR_4 , new TYPE_2 ( VAR_1 , VAR_2 ) ) ; } | public void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . put ( VAR_4 , new TYPE_2 ( VAR_1 , VAR_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void setText ( java.lang.String str ) { VAR_1 . setText ( str ) ; } | public void setText ( java.lang.String str ) { text = str ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 error ) { if ( error . METHOD_2 ( ) . equals ( VAR_1 ) ) { VAR_2 . METHOD_3 ( ) ; } else { VAR_2 . METHOD_4 ( STRING_1 ) ; } } | public void METHOD_1 ( TYPE_1 error ) { if ( error . METHOD_2 ( ) . toString ( ) . equals ( VAR_1 ) ) { VAR_2 . METHOD_3 ( ) ; } else { VAR_2 . METHOD_4 ( STRING_1 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.content.Context context , android.content.Intent intent ) { METHOD_2 ( ) ; } | public void METHOD_1 ( android.content.Context context , android.content.Intent intent ) { METHOD_2 ( false ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 VAR_2 = ( ( TYPE_1 ) ( METHOD_2 ( ) . METHOD_3 ( VAR_3 ) ) ) ; VAR_4 . METHOD_4 ( VAR_1 ) ; } | public void METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 VAR_2 = ( ( TYPE_1 ) ( METHOD_2 ( ) . METHOD_3 ( VAR_3 ) ) ) ; VAR_2 . METHOD_1 ( VAR_1 ) ; VAR_4 . METHOD_4 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_1 ( VAR_1 . METHOD_2 ( ) ) ; return STRING_1 ; } | TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return VAR_2 . METHOD_1 ( VAR_1 . METHOD_2 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( java.util.List < java.lang.Integer > VAR_1 ) { int VAR_2 = 0 ; for ( int VAR_3 : VAR_1 ) { VAR_2 += this . VAR_4 . get ( VAR_3 ) . METHOD_2 ( ) ; } return VAR_2 ; } | public int METHOD_1 ( java.util.List < java.lang.Integer > VAR_1 ) { int VAR_2 = 0 ; for ( int VAR_3 : VAR_1 ) { VAR_2 += this . VAR_4 . get ( VAR_3 ) . METHOD_2 ( ) ; } return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float VAR_1 , boolean VAR_2 ) { METHOD_1 ( VAR_1 , VAR_2 , VAR_2 ) ; } | public void METHOD_1 ( float VAR_1 , boolean VAR_2 ) { METHOD_1 ( VAR_1 , VAR_2 , VAR_2 , false ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; METHOD_2 ( TYPE_1 . METHOD_3 ( METHOD_4 ( ) ) , METHOD_5 ( ) . METHOD_6 ( ) ) ; } | protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_1 , VAR_3 ) ; } | protected void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_1 , ( - VAR_3 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { this . VAR_1 = VAR_1 ; this . VAR_2 = VAR_2 ; VAR_3 = false ; VAR_4 = false ; METHOD_2 ( ) ; VAR_1 . METHOD_3 ( VAR_5 ) ; } | void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { this . VAR_1 = VAR_1 ; this . VAR_2 = VAR_2 ; VAR_3 = false ; VAR_4 = false ; METHOD_2 ( VAR_2 ) ; VAR_1 . METHOD_3 ( VAR_5 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; VAR_1 = null ; } } | public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( STRING_1 ) ; VAR_2 . execute ( ( ) - > METHOD_3 ( ) ) ; } | public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( STRING_1 ) ; METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object METHOD_1 ( ) { return new TYPE_1 ( sum . toString ( ) ) ; } | public java.lang.Object METHOD_1 ( ) { return sum ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return new TYPE_1 ( 1.0F ) ; } | public TYPE_1 METHOD_1 ( ) { return ( ( TYPE_1 ) ( super . METHOD_1 ( ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { return this ; } | public TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_1 = VAR_1 ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_2 . METHOD_2 ( null ) ; VAR_1 . METHOD_3 ( ) ; } } | public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_2 . METHOD_2 ( null ) ; VAR_1 . METHOD_3 ( ) ; VAR_1 = null ; } }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { if ( null == ( VAR_1 ) ) throw new TYPE_1 ( STRING_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 ( ) { METHOD_2 ( ) ; setState ( VAR_1 ) ; this . VAR_2 = 0 ; java.lang.System.out.println ( ( STRING_1 + ( getName ( ) ) ) ) ; } | public void METHOD_1 ( ) { METHOD_2 ( ) ; setState ( VAR_1 ) ; this . VAR_2 = 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.util.List < java.lang.String > METHOD_1 ( java.lang.String VAR_1 ) { return TYPE_1 . METHOD_2 ( VAR_1 ) ; } | public java.util.List < java.lang.String > METHOD_1 ( java.lang.String VAR_1 ) { return TYPE_1 . METHOD_2 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected int METHOD_1 ( ) { if ( ( VAR_1 ) == null ) return 0 ; return VAR_1 . size ( ) ; } | public int METHOD_1 ( ) { if ( ( VAR_1 ) == null ) return 0 ; return VAR_1 . size ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( long VAR_1 ) { this . VAR_2 = new java.util.Date ( VAR_1 ) ; } | public void METHOD_1 ( long VAR_1 ) { this . VAR_2 = VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 . METHOD_3 ( VAR_3 ) ; VAR_2 . METHOD_4 ( ) ; } | public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 . METHOD_3 ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 , boolean VAR_2 ) { } | protected void METHOD_1 ( boolean VAR_2 ) { }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( int n , int [ ] VAR_1 ) { } | public int METHOD_1 ( int n , int [ ] VAR_1 ) { return n ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( false ) ; } | public void METHOD_1 ( ) { METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { if ( TYPE_1 . METHOD_2 ( ) ) { new TYPE_2 ( ) . execute ( VAR_1 ) ; } else { VAR_2 . METHOD_3 ( VAR_1 , TYPE_1 . METHOD_4 ( ) ) ; } } | public void METHOD_1 ( java.lang.String VAR_1 ) { if ( TYPE_1 . METHOD_2 ( ) ) { new TYPE_2 ( ) . execute ( VAR_1 ) ; } else { VAR_2 . METHOD_3 ( TYPE_1 . METHOD_4 ( ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( int VAR_1 , int VAR_2 ) throws TYPE_1 { TYPE_1 x = new TYPE_1 ( ) ; VAR_3 = VAR_1 ; VAR_4 = VAR_2 ; throw x ; } | public static void METHOD_1 ( int VAR_1 , int VAR_2 , java.lang.String msg ) throws TYPE_1 { throw new TYPE_1 ( VAR_1 , VAR_2 , msg ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_1 ( ( ( TYPE_2 < java.lang.String > ) ( VAR_1 . METHOD_2 ( ) ) ) , VAR_1 . getType ( ) ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_1 ( ( ( java.util.List < java.lang.String > ) ( VAR_1 . METHOD_2 ( ) ) ) , VAR_1 . getType ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 TYPE_2 ) { for ( TYPE_3 VAR_1 : TYPE_4 ) { METHOD_2 ( VAR_1 ) ; } TYPE_4 . METHOD_3 ( ) ; TYPE_5 . remove ( TYPE_2 ) ; } | public void METHOD_1 ( TYPE_1 TYPE_2 ) { for ( TYPE_3 VAR_1 : TYPE_4 ) { METHOD_2 ( VAR_1 ) ; } TYPE_4 . METHOD_3 ( ) ; TYPE_5 . remove ( TYPE_2 . toString ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { VAR_1 = true ; } | protected void METHOD_1 ( ) { VAR_1 = true ; super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return ( i ) < ( VAR_1 . size ( ) ) ; } | public boolean METHOD_1 ( ) { return ( ( i ) + 1 ) < ( VAR_1 . size ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { android.content.Intent intent = new android.content.Intent ( this , VAR_2 class ) ; intent . METHOD_2 ( STRING_1 , 1 ) ; intent . METHOD_2 ( STRING_2 , VAR_1 ) ; METHOD_3 ( intent ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { android.content.Intent intent = new android.content.Intent ( this , VAR_2 class ) ; intent . METHOD_2 ( "id" , 1 ) ; intent . METHOD_2 ( STRING_2 , VAR_1 ) ; METHOD_3 ( intent ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; METHOD_3 ( ) . METHOD_1 ( VAR_2 , null , this ) ; } | private void METHOD_1 ( ) { METHOD_3 ( ) . METHOD_1 ( VAR_2 , null , this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected static boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { return ( ( VAR_1 . METHOD_2 ( ) ) == 0 ) || ( ( VAR_2 . METHOD_2 ( ) ) == 0 ) ; } | protected static boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { return ( ( VAR_1 . METHOD_2 ( ) ) != 0 ) || ( ( VAR_2 . METHOD_2 ( ) ) != 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { if ( VAR_1 ) { return 1 ; } else { return 0 ; } } | public int METHOD_1 ( ) { return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( final TYPE_2 VAR_1 ) { VAR_2 . METHOD_1 ( VAR_1 ) ; return VAR_3 ; } | public TYPE_2 METHOD_1 ( final TYPE_2 VAR_1 ) { return VAR_2 . METHOD_1 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. boolean METHOD_1 ( TYPE_1 VAR_1 ) { return METHOD_1 ( METHOD_2 ( VAR_1 ) ) ; } | boolean METHOD_1 ( TYPE_1 VAR_1 ) { return METHOD_1 ( METHOD_2 ( VAR_1 ) , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { METHOD_2 ( VAR_1 , VAR_2 ) ; } | private void METHOD_1 ( ) { METHOD_2 ( VAR_1 , VAR_2 , null ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { java.util.List < TYPE_1 > VAR_1 = TYPE_2 . METHOD_2 ( ) ; assertEquals ( 0 , VAR_1 . size ( ) ) ; } | public void METHOD_1 ( ) throws java.lang.Exception { java.util.List < ? > VAR_1 = TYPE_2 . METHOD_2 ( ) ; assertEquals ( 0 , VAR_1 . size ( ) ) ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.