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 ( TYPE_2 src , TYPE_3 VAR_1 , TYPE_4 context ) { if ( src == null ) { return null ; } return new TYPE_5 ( TYPE_6 . METHOD_1 ( src ) ) ; } | public TYPE_1 METHOD_1 ( final TYPE_2 src , final TYPE_3 VAR_1 , final TYPE_4 context ) { if ( src == null ) { return null ; } return new TYPE_5 ( src . toString ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_1 . getId ( ) , VAR_1 . getName ( ) ) ; VAR_3 . METHOD_2 ( VAR_1 . getName ( ) , VAR_1 . getId ( ) ) ; } | void METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 == null ) return ; VAR_2 . METHOD_2 ( VAR_1 . getId ( ) , VAR_1 . getName ( ) ) ; VAR_3 . METHOD_2 ( VAR_1 . getName ( ) , VAR_1 . getId ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.io.IOException { synchronized ( VAR_1 ) { VAR_2 . METHOD_1 ( ) ; VAR_2 = VAR_3 . METHOD_2 ( ) ; } } | public void METHOD_1 ( ) throws java.io.IOException { synchronized ( VAR_1 ) { VAR_2 . METHOD_1 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( final TYPE_2 node ) { final TYPE_2 VAR_1 = VAR_2 . METHOD_2 ( node ) ; final TYPE_1 VAR_3 = VAR_4 . get ( VAR_1 ) ; return VAR_3 ; } | private TYPE_1 METHOD_1 ( final TYPE_2 node ) { final TYPE_1 VAR_3 = VAR_4 . get ( node ) ; return VAR_3 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 , double x ) throws TYPE_1 { setValue ( VAR_1 , ( STRING_1 + x ) ) ; } | public void METHOD_1 ( int VAR_1 , double x ) throws TYPE_1 { setValue ( VAR_1 , java.lang.Double . toString ( x ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( ) . METHOD_3 ( VAR_1 ) ; } | protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void position ( long VAR_1 ) { VAR_2 . position ( 0 ) ; VAR_3 . position ( 0 ) ; } | public void position ( int VAR_1 ) { VAR_2 . position ( VAR_1 ) ; VAR_3 . position ( VAR_1 ) ; }
|
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 ) { METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ; VAR_3 . add ( new TYPE_2 ( VAR_1 , VAR_2 ) ) ; METHOD_4 ( ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String VAR_2 ) { METHOD_2 ( VAR_1 ) ; VAR_3 . add ( new TYPE_2 ( VAR_1 , VAR_2 ) ) ; METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 event ) throws java.io.IOException { METHOD_2 ( java.lang.Integer.parseInt ( VAR_1 . getText ( ) ) , false ) ; } | public void METHOD_1 ( TYPE_1 event ) throws java.io.IOException { METHOD_2 ( java.lang.Integer.parseInt ( VAR_1 . getText ( ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_2 = VAR_1 . METHOD_2 ( ) ; VAR_3 = VAR_1 . METHOD_3 ( ) ; VAR_4 . info ( STRING_1 ) ; } | private void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; this . VAR_2 = VAR_1 . METHOD_2 ( ) ; this . VAR_3 = VAR_1 . METHOD_3 ( ) ; VAR_4 . info ( STRING_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( ) { java.lang.String string = STRING_1 ; try { string = VAR_1 . METHOD_1 ( ) ; } catch ( java.io.IOException VAR_2 ) { java.lang.System.out.println ( STRING_2 ) ; java.lang.System.exit ( 1 ) ; } } | public static java.lang.String METHOD_1 ( ) { java.lang.String string = STRING_1 ; try { string = VAR_1 . METHOD_1 ( ) ; } catch ( java.io.IOException VAR_2 ) { java.lang.System.out.println ( STRING_2 ) ; java.lang.System.exit ( 1 ) ; } return string ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( x ) > INT_1 ) { x = x ; } else { x = ( x ) + INT_2 ; } } | public void METHOD_1 ( int n ) { if ( ( x ) > INT_1 ) { x = x ; } else { x = ( x ) + ( INT_2 + n ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return this . VAR_1 ? new TYPE_1 ( ) : null ; } | protected TYPE_1 METHOD_1 ( ) { return this . VAR_1 ? new TYPE_1 ( ) : null ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int VAR_1 , int to ) { return new TYPE_2 ( this . VAR_2 . METHOD_2 ( ) . METHOD_3 ( 0 ) . METHOD_4 ( ( to - VAR_1 ) ) ) ; } | public TYPE_1 METHOD_1 ( int VAR_1 , int to ) { return new TYPE_2 ( this . VAR_2 . METHOD_2 ( ) . METHOD_3 ( VAR_1 ) . METHOD_4 ( ( to - VAR_1 ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float VAR_1 ) { VAR_2 = VAR_1 ; VAR_3 . METHOD_2 ( ) ; } | public void METHOD_1 ( float VAR_1 ) { VAR_2 = VAR_1 ; METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { if ( ( VAR_1 . METHOD_2 ( ) ) == ( VAR_2 ) ) { return ( ( TYPE_1 ) ( VAR_3 ) ) . METHOD_1 ( ) ; } return false ; } | public boolean METHOD_1 ( ) { if ( ( ( VAR_1 ) != null ) && ( ( VAR_1 . METHOD_2 ( ) ) == ( VAR_2 ) ) ) { return ( ( TYPE_1 ) ( VAR_3 ) ) . METHOD_1 ( ) ; } return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 += STRING_1 ; } | public void METHOD_1 ( ) { text += STRING_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { this . VAR_1 . METHOD_2 ( 1L , VAR_2 ) ; TYPE_1 . METHOD_3 ( this . VAR_3 , TYPE_1 . METHOD_4 ( ) ) . METHOD_5 ( TYPE_2 . METHOD_6 ( VAR_4 class ) ) ; } | public void METHOD_1 ( ) { this . VAR_1 . METHOD_2 ( 1L ) ; TYPE_1 . METHOD_3 ( this . VAR_3 , TYPE_1 . METHOD_4 ( ) ) . METHOD_5 ( TYPE_2 . METHOD_6 ( VAR_4 class ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_2 = new TYPE_1 ( VAR_1 . METHOD_2 ( ) ) ; VAR_2 . METHOD_3 ( ) ; } } | public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_2 = new TYPE_1 ( VAR_1 . METHOD_2 ( ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void update ( ) { METHOD_1 ( ( ( TYPE_1 ) ( VAR_1 ) ) , VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( ) ) ; METHOD_5 ( ) ; } | public void update ( ) { METHOD_1 ( VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( ) ) ; METHOD_5 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 , TYPE_1 p ) { TYPE_2 . METHOD_2 ( this , VAR_2 , VAR_3 , VAR_4 , VAR_1 . METHOD_3 ( VAR_5 ) , VAR_1 . METHOD_3 ( VAR_6 . title ) ) ; } | public void METHOD_1 ( android.view.View VAR_1 , TYPE_1 p ) { TYPE_2 . METHOD_2 ( this , VAR_2 , VAR_3 , VAR_4 , VAR_1 . METHOD_3 ( VAR_5 ) , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 target ) { TYPE_2 VAR_1 = METHOD_2 ( VAR_2 ) ; this . replace ( VAR_1 ) ; target . add ( this ) ; } | private void METHOD_1 ( TYPE_1 target ) { TYPE_2 VAR_1 = METHOD_2 ( ) ; this . replace ( VAR_1 ) ; target . add ( this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { java.lang.System.out.println ( ( STRING_1 + VAR_1 ) ) ; } | private void METHOD_1 ( java.lang.String VAR_1 ) { java.lang.System.out.println ( ( STRING_1 + VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( this . METHOD_2 ( VAR_1 ) ) { this . VAR_2 . remove ( VAR_1 . getName ( ) ) ; VAR_1 . METHOD_3 ( ) ; } } | public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( this . METHOD_2 ( VAR_1 ) ) { this . VAR_2 . remove ( VAR_1 ) ; VAR_1 . METHOD_3 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 = STRING_1 ; } | public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 = STRING_1 ; return ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.util.ArrayList < java.lang.Double > VAR_1 ) { this . VAR_2 . add ( VAR_1 ) ; } | public void METHOD_1 ( java.util.List < java.lang.Double > VAR_1 ) { VAR_2 . add ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( boolean VAR_1 ) { if ( VAR_1 ) { METHOD_2 ( true ) ; } else { METHOD_3 ( true ) ; } } | public void METHOD_1 ( boolean VAR_1 ) { if ( VAR_1 ) { METHOD_2 ( ) ; } else { METHOD_3 ( true ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( VAR_2 ) ; TYPE_3 . METHOD_3 ( true ) . METHOD_4 ( VAR_1 ) . METHOD_5 ( ) ; TYPE_4 . assertTrue ( VAR_1 . METHOD_5 ( ) ) ; } | public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = TYPE_3 . METHOD_2 ( VAR_2 ) ; TYPE_3 . METHOD_3 ( true ) . METHOD_4 ( VAR_1 ) . METHOD_5 ( ) ; TYPE_4 . assertTrue ( VAR_1 . METHOD_5 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_3 ( ) ; VAR_2 . METHOD_2 ( ) . add ( VAR_1 ) ; VAR_1 . init ( ) ; VAR_1 . start ( ) ; } | public static void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_3 ( ) ; VAR_2 . METHOD_2 ( ) . add ( VAR_1 ) ; VAR_1 . init ( ) ; VAR_1 . start ( ) ; VAR_2 . show ( ) ; }
|
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 , toString ( ) , METHOD_2 ( ) . x , METHOD_2 ( ) . y ) ; java.lang.System.out.println ( toString ( ) ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_1 ( VAR_1 , toString ( ) , METHOD_2 ( ) . x , METHOD_2 ( ) . y ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void init ( TYPE_1 event ) { VAR_1 . init ( event ) ; TYPE_2 . init ( ) ; TYPE_3 . METHOD_1 ( VAR_2 , new TYPE_4 ( ) ) ; TYPE_5 . METHOD_2 ( ) ; } | public void init ( TYPE_1 event ) { VAR_1 . init ( event ) ; TYPE_3 . METHOD_1 ( VAR_2 , new TYPE_4 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) return ; VAR_1 = new TYPE_1 ( ) ; METHOD_2 ( ) ; VAR_1 . METHOD_3 ( VAR_2 , INT_1 , INT_2 ) ; } | public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) return ; VAR_1 = new TYPE_1 ( ) ; METHOD_2 ( ) ; VAR_1 . METHOD_3 ( VAR_2 , INT_2 , INT_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String toString ( ) { return ( STRING_1 + ( VAR_1 ) ) + STRING_2 ; } | public java.lang.String toString ( ) { return ( STRING_1 + ( VAR_1 . get ( ) ) ) + STRING_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. TYPE_1 < TYPE_2 < TYPE_3 > > METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , java.lang.Integer VAR_3 , java.lang.Integer VAR_4 ) ; | TYPE_1 < TYPE_2 < TYPE_3 > > METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , java.lang.Integer VAR_4 , java.lang.Integer VAR_3 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public char getColor ( ) throws java.io.IOException { VAR_1 . METHOD_1 ( ( STRING_1 + "\n" ) ) ; java.lang.String response = VAR_2 . METHOD_2 ( ) ; return response . METHOD_3 ( 0 ) ; } | public char getColor ( ) throws java.io.IOException { VAR_1 . METHOD_1 ( ( STRING_1 + "\n" ) ) ; java.lang.String response = VAR_2 . METHOD_2 ( ) ; java.lang.System.out.println ( response ) ; return response . METHOD_3 ( 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String name ) { if ( ( this . VAR_1 ) == null ) { this . VAR_1 = new TYPE_1 ( ) ; } this . VAR_1 . METHOD_1 ( name ) ; } | public void METHOD_1 ( java.lang.String name ) { if ( ( this . VAR_1 ) == null ) { this . VAR_1 = new TYPE_1 ( ) ; this . status = true ; } this . VAR_1 . METHOD_1 ( name ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { java.lang.System.out.println ( VAR_1 . METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ) ; return VAR_1 . METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ; } | public java.lang.String METHOD_1 ( ) { return VAR_1 . METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 response ) { java.util.Map < java.lang.String , TYPE_3 > VAR_2 = VAR_1 . METHOD_2 ( ) ; VAR_3 . METHOD_1 ( VAR_2 ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { java.util.Map < java.lang.String , TYPE_3 > VAR_2 = VAR_1 . METHOD_2 ( ) ; VAR_3 . METHOD_1 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void init ( TYPE_1 VAR_1 ) { super . init ( VAR_1 ) ; TYPE_2 . METHOD_1 ( ) ; TYPE_3 . METHOD_2 ( ) ; TYPE_4 . METHOD_3 ( ) ; } | public void init ( TYPE_1 VAR_1 ) { super . init ( VAR_1 ) ; TYPE_3 . METHOD_2 ( ) ; TYPE_2 . METHOD_1 ( ) ; TYPE_4 . METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String type , java.lang.String url ) { TYPE_2 VAR_2 = new TYPE_2 ( VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) , type , url , null ) ; VAR_3 . METHOD_4 ( VAR_2 , VAR_1 ) ; } | private boolean METHOD_1 ( TYPE_1 VAR_1 , java.lang.String type , java.lang.String url ) { TYPE_2 VAR_2 = new TYPE_2 ( VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) , type , url , null ) ; return VAR_3 . METHOD_4 ( VAR_2 , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . METHOD_2 ( VAR_1 , VAR_2 ) ; } | public void METHOD_2 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . METHOD_2 ( VAR_1 , 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 ( VAR_3 ) ; VAR_4 . remove ( VAR_1 ) ; VAR_5 . remove ( VAR_3 ) ; VAR_6 . METHOD_3 ( ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_4 . remove ( VAR_1 ) ; VAR_5 . remove ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = new TYPE_2 ( VAR_1 ) ; METHOD_2 ( VAR_2 . METHOD_3 ( ) ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = new TYPE_2 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String getColor ( ) { return VAR_1 . replaceAll ( STRING_1 , STRING_2 ) ; } | public java.lang.String getColor ( ) { if ( ( VAR_1 ) != null ) { return VAR_1 . replaceAll ( STRING_1 , STRING_2 ) ; } else { return null ; } }
|
The following code may contain bugs. Write a refined code without bugs. protected final TYPE_1 METHOD_1 ( boolean VAR_1 ) { return VAR_2 . METHOD_2 ( VAR_1 ) ; } | public final TYPE_1 METHOD_1 ( boolean VAR_1 ) { return VAR_2 . METHOD_2 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.lang.String VAR_1 ) { if ( VAR_1 . equals ( STRING_1 ) ) return false ; else return true ; } | public boolean METHOD_1 ( java.lang.String VAR_1 ) { return ! ( VAR_1 . equals ( STRING_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static double METHOD_1 ( TYPE_1 VAR_1 ) throws TYPE_2 { return 1.0 / ( TYPE_3 . METHOD_2 ( VAR_2 , VAR_3 , VAR_4 , VAR_5 , VAR_6 , VAR_1 ) ) ; } | public static double METHOD_1 ( TYPE_1 VAR_1 ) throws TYPE_2 { return 1.0 / ( ( TYPE_3 . METHOD_2 ( VAR_2 , VAR_3 , VAR_4 , VAR_5 , VAR_6 , VAR_1 ) ) - 1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 . METHOD_2 ( VAR_2 ) ; VAR_1 . METHOD_3 ( ( ( TYPE_1 ) ( VAR_2 . METHOD_4 ( ) . METHOD_5 ( ) ) ) , VAR_2 ) ; VAR_2 . METHOD_6 ( ) ; } | private void METHOD_1 ( ) { VAR_1 . METHOD_2 ( VAR_2 ) ; VAR_2 . METHOD_6 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float VAR_1 ) { VAR_2 += VAR_1 ; VAR_3 . METHOD_1 ( VAR_1 , new TYPE_1 ( 0.0F , 0.0F , 1.0F ) ) ; } | public void METHOD_1 ( float VAR_1 ) { VAR_3 . METHOD_1 ( VAR_1 , new TYPE_1 ( 0.0F , 0.0F , 1.0F ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return new TYPE_3 ( VAR_2 . equals ( "true" ) ) ; } | public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return new TYPE_3 ( VAR_2 . getText ( ) . equals ( "true" ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int count ) { TYPE_1 VAR_1 = this . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( ( STRING_1 + count ) ) ; VAR_1 . METHOD_4 ( ) ; } | public void METHOD_1 ( int count ) { TYPE_1 VAR_1 = this . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( ( STRING_1 + count ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { if ( VAR_2 ) { METHOD_2 ( ) ; } else { METHOD_3 ( ) ; } } | public void METHOD_1 ( android.view.View VAR_1 ) { if ( VAR_2 ) { METHOD_3 ( ) ; } else { METHOD_2 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_4 . METHOD_2 ( VAR_2 ) ; TYPE_2 . METHOD_3 ( VAR_1 , VAR_4 ) ; } | private void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_4 . METHOD_2 ( VAR_2 ) ; VAR_1 . METHOD_2 ( VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.String params ) { this . VAR_1 = params ; this . VAR_2 = TYPE_2 ; return this ; } | public TYPE_1 METHOD_1 ( java.lang.String params ) { this . VAR_1 = params ; this . VAR_2 = TYPE_2 . toString ( ) ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( ) ; } | private void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( ) ; TYPE_2 . METHOD_2 ( ) . METHOD_3 ( ) ; }
|
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 ) { VAR_2 . METHOD_2 ( VAR_3 , VAR_1 ) ; return new java.util.ArrayList ( VAR_3 . values ( ) ) ; } | public java.util.List < TYPE_1 > METHOD_1 ( ) { return new java.util.ArrayList ( VAR_3 . values ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static boolean METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_1 VAR_2 = VAR_3 . get ( VAR_1 . getId ( ) ) ; if ( VAR_2 != null ) return true ; VAR_3 . put ( VAR_1 . getId ( ) , VAR_1 ) ; return true ; } | public static TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_1 VAR_2 = VAR_3 . get ( VAR_1 . getId ( ) ) ; if ( VAR_2 != null ) return VAR_2 ; VAR_3 . put ( VAR_1 . getId ( ) , VAR_1 ) ; return 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 VAR_2 ) { final java.lang.String format = STRING_1 ; try { TYPE_2 VAR_3 = new TYPE_2 ( VAR_2 ) ; TYPE_3 . METHOD_2 ( VAR_1 , format , VAR_3 ) ; } catch ( TYPE_4 VAR_4 ) { } } | public static void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String VAR_2 ) { final java.lang.String format = STRING_1 ; try { java.io.File VAR_3 = new java.io.File ( VAR_2 ) ; TYPE_3 . METHOD_2 ( VAR_1 , format , VAR_3 ) ; } catch ( java.io.IOException VAR_4 ) { } }
|
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 static void main ( java.lang.String [ ] args ) { TYPE_1 VAR_1 = new TYPE_1 ( args [ 0 ] ) ; VAR_1 . METHOD_1 ( INT_1 , true ) ; java.lang.System.out.println ( VAR_1 ) ; } | public static void main ( java.lang.String [ ] args ) { TYPE_1 VAR_1 = new TYPE_1 ( args [ 0 ] ) ; VAR_1 . METHOD_1 ( java.lang.Integer.parseInt ( args [ 1 ] ) , true ) ; java.lang.System.out.println ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void init ( ) { VAR_1 = new TYPE_1 ( STRING_1 ) ; VAR_2 = new TYPE_2 ( STRING_2 ) ; VAR_3 = new TYPE_2 ( STRING_3 ) ; VAR_4 = new TYPE_2 ( STRING_4 ) ; } | public static void init ( ) { VAR_1 = new TYPE_1 ( STRING_1 ) ; VAR_2 = new TYPE_2 ( STRING_2 ) ; VAR_3 = new TYPE_2 ( STRING_3 ) ; VAR_4 = new TYPE_1 ( STRING_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { if ( ( VAR_2 ) == null ) VAR_2 = new TYPE_1 ( VAR_1 ) ; return VAR_2 ; } | public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { VAR_2 = new TYPE_1 ( VAR_1 ) ; return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.String string , TYPE_2 node ) { return TYPE_1 . get ( string ) ; } | public TYPE_1 METHOD_1 ( java.lang.String string , TYPE_2 node ) { return TYPE_1 . get ( string . toLowerCase ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void update ( java.util.ArrayList < TYPE_1 > VAR_1 ) { VAR_2 = VAR_1 ; METHOD_1 ( ) ; VAR_3 . METHOD_2 ( ) ; } | public void update ( java.util.ArrayList < TYPE_1 > VAR_1 ) { VAR_2 = VAR_1 ; METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected static boolean METHOD_1 ( java.lang.String VAR_1 ) { if ( VAR_2 ) return true ; else if ( TYPE_1 . contains ( VAR_1 ) ) return true ; else return TYPE_2 . METHOD_2 ( ( VAR_1 + STRING_1 ) ) ; } | protected static boolean METHOD_1 ( java.lang.String VAR_1 ) { return TYPE_2 . METHOD_2 ( ( VAR_1 + STRING_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 params , boolean VAR_1 ) { boolean VAR_2 = METHOD_2 ( STRING_1 , params ) ; if ( VAR_2 ) { METHOD_3 ( 0 ) ; } } | public void METHOD_1 ( TYPE_1 params , boolean VAR_1 ) { boolean VAR_2 = METHOD_2 ( STRING_1 , params ) ; METHOD_3 ( 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 = VAR_3 ; METHOD_2 ( VAR_4 . getText ( ) . toString ( ) , VAR_5 . getText ( ) . toString ( ) ) ; } | public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_2 ( VAR_4 . getText ( ) . toString ( ) , VAR_5 . getText ( ) . toString ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean equals ( java.lang.Object obj ) { return ( obj instanceof TYPE_1 ) && ( this . toString ( ) . equals ( obj . toString ( ) ) ) ; } | public boolean equals ( java.lang.Object obj ) { return ( obj instanceof TYPE_1 ) && ( this . id . equals ( ( ( TYPE_1 ) ( obj ) ) . id ) ) ; }
|
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 ) ; TYPE_2 . METHOD_2 ( VAR_2 , STRING_1 ) ; METHOD_3 ( ) . METHOD_4 ( VAR_3 , null , this ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_3 ( ) . METHOD_4 ( VAR_3 , null , this ) ; super . METHOD_1 ( VAR_1 ) ; TYPE_2 . METHOD_2 ( VAR_2 , STRING_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) { try { new TYPE_1 ( ) . METHOD_1 ( ) ; } catch ( java.lang.Exception VAR_1 ) { java.lang.System.err.println ( VAR_1 . METHOD_2 ( ) ) ; } java.lang.System.exit ( 0 ) ; } | public static void main ( java.lang.String [ ] args ) { new TYPE_1 ( ) . METHOD_1 ( ) ; java.lang.System.exit ( 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int count ( ) { assert METHOD_1 ( ) ; return METHOD_2 ( VAR_1 ) ; } | public int count ( ) { return METHOD_2 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void end ( ) { VAR_1 . METHOD_1 ( 0 , 0 , true ) ; } | protected void end ( ) { VAR_1 . METHOD_1 ( 0 , 0 , true , false ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return new TYPE_1 ( 0 , 0 , 0 ) ; } | public TYPE_1 METHOD_1 ( ) { return new TYPE_1 ( 1 , 1 , 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static java.lang.Boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { return VAR_1 . METHOD_2 ( VAR_2 ) ; } | public static java.lang.Boolean METHOD_1 ( java.util.Date VAR_1 , java.util.Date VAR_2 ) { return VAR_1 . METHOD_2 ( VAR_2 ) ; }
|
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_2 . METHOD_3 ( ) ; VAR_1 = null ; } } | public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { METHOD_3 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( TYPE_1 . METHOD_3 ( ) ) ; for ( TYPE_2 VAR_1 : TYPE_1 . METHOD_3 ( ) ) { METHOD_4 ( VAR_1 , TYPE_1 . METHOD_5 ( ) ) ; } } | public void METHOD_1 ( ) { METHOD_2 ( TYPE_1 . METHOD_3 ( ) ) ; }
|
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 ( VAR_1 . METHOD_2 ( ) ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { ( VAR_1 ) ++ ; VAR_2 . setText ( java.lang.String.format ( TYPE_1 . METHOD_2 ( ) , STRING_1 , VAR_1 ) ) ; } | protected void METHOD_1 ( ) { if ( ( VAR_1 ) == 0 ) { start ( ) ; } ( VAR_1 ) ++ ; VAR_2 . setText ( java.lang.String.format ( TYPE_1 . METHOD_2 ( ) , STRING_1 , VAR_1 ) ) ; }
|
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 ( VAR_1 , STRING_1 ) ; this . VAR_1 = VAR_1 ; } | public void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_1 = VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return getData ( ) . getBoolean ( STRING_1 ) ; } | public boolean METHOD_1 ( ) { return true ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = METHOD_2 ( ) ; VAR_2 . METHOD_3 ( VAR_1 . getId ( ) , METHOD_4 ( ) ) ; TYPE_2 . METHOD_5 ( VAR_3 ) . METHOD_6 ( TYPE_3 . METHOD_7 ( VAR_4 class ) ) ; } | public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = METHOD_2 ( ) ; VAR_2 . METHOD_3 ( VAR_1 . getId ( ) , METHOD_4 ( ) ) ; METHOD_5 ( VAR_3 ) . METHOD_6 ( TYPE_3 . METHOD_7 ( VAR_4 class ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public float METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , boolean VAR_3 ) { switch ( VAR_2 ) { case VAR_4 : return METHOD_2 ( VAR_1 , VAR_3 ) ; case VAR_5 : return METHOD_3 ( VAR_1 , VAR_3 ) ; } return 1.0F ; } | public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , boolean VAR_3 ) { switch ( VAR_2 ) { case VAR_4 : return METHOD_2 ( VAR_1 , VAR_3 ) ; case VAR_5 : return METHOD_3 ( VAR_1 , VAR_3 ) ; } return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return ( ( name . METHOD_1 ( ) ) + ( fileName . METHOD_1 ( ) ) ) + ( super . METHOD_1 ( ) ) ; } | public int METHOD_1 ( ) { return ( fileName . METHOD_1 ( ) ) + ( super . METHOD_1 ( ) ) ; }
|
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 , VAR_2 ) ; } | public void METHOD_1 ( ) { }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String date ) { if ( TYPE_1 . METHOD_2 ( date , false ) ) { VAR_1 = date ; VAR_2 . setText ( date ) ; } else { TYPE_2 . METHOD_3 ( METHOD_4 ( ) , STRING_1 ) ; } } | public void METHOD_1 ( java.lang.String date ) { if ( TYPE_1 . METHOD_2 ( date , true ) ) { VAR_1 = date ; VAR_2 . setText ( date ) ; } else { TYPE_2 . METHOD_3 ( METHOD_4 ( ) , STRING_1 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int position ) { TYPE_2 . METHOD_2 ( VAR_2 , ( STRING_1 + position ) ) ; TYPE_3 VAR_3 = VAR_4 [ position ] ; VAR_5 . setText ( VAR_3 . getName ( ) ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 , int position ) { TYPE_3 VAR_3 = VAR_4 [ position ] ; VAR_5 . setText ( VAR_3 . getName ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . remove ( id ) ; return STRING_1 ; } | public java.lang.String METHOD_1 ( java.lang.Long id ) { VAR_2 . remove ( id ) ; return STRING_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 response ) { return this . VAR_2 ; } | public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 response ) { synchronized ( this . VAR_2 ) { return this . VAR_2 ; } }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { VAR_1 . update ( VAR_1 . METHOD_2 ( ) ) ; TYPE_1 VAR_2 = ( ( TYPE_1 ) ( VAR_1 . METHOD_3 ( ) ) ) ; VAR_2 . METHOD_4 ( VAR_3 ) ; } | public static void METHOD_1 ( ) { VAR_1 . update ( VAR_1 . METHOD_2 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws TYPE_1 { VAR_1 . METHOD_2 ( VAR_2 ) ; TYPE_2 VAR_3 = VAR_1 . METHOD_3 ( VAR_4 ) ; TYPE_3 . METHOD_4 ( VAR_3 ) ; } | public void METHOD_1 ( ) throws TYPE_1 { VAR_1 . METHOD_2 ( VAR_2 ) ; TYPE_2 VAR_3 = VAR_1 . METHOD_3 ( VAR_4 ) ; METHOD_4 ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) ; VAR_1 = new TYPE_2 ( this ) ; } | private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) ; VAR_1 = new TYPE_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { VAR_1 . METHOD_2 ( STRING_1 , VAR_2 , VAR_3 ) ; VAR_4 = true ; METHOD_3 ( true , false ) ; } | public void METHOD_1 ( ) throws java.lang.Exception { VAR_4 = true ; METHOD_3 ( true , false ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private static java.lang.String METHOD_1 ( final java.lang.String name , int id ) { return name == null ? STRING_1 + id : name . replaceAll ( STRING_2 , STRING_3 ) ; } | private static java.lang.String METHOD_1 ( final java.lang.String name , int id ) { return ( name == null ) || ( name . trim ( ) . isEmpty ( ) ) ? STRING_1 + id : name . replaceAll ( STRING_2 , STRING_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < java.lang.String > METHOD_1 ( java.lang.String VAR_1 ) { if ( ! ( METHOD_2 ( VAR_1 ) ) ) return null ; return VAR_2 . get ( VAR_1 ) ; } | public java.util.List < java.lang.String > METHOD_1 ( java.lang.String VAR_1 ) { if ( ! ( METHOD_2 ( VAR_1 ) ) ) return null ; return new java.util.ArrayList < java.lang.String > ( VAR_2 . get ( VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = true ; VAR_2 = new TYPE_1 ( VAR_3 ) ; } | private void METHOD_1 ( ) { VAR_1 = true ; VAR_2 = new TYPE_1 ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { this . VAR_1 . set ( true ) ; this . VAR_2 . METHOD_2 ( this . VAR_3 ) ; this . VAR_3 . METHOD_3 ( ) ; TYPE_1 . METHOD_4 ( ) ; } | protected void METHOD_1 ( ) { this . VAR_1 . set ( true ) ; this . VAR_2 . METHOD_2 ( this . VAR_3 ) ; this . VAR_3 . METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ) ; VAR_2 = VAR_3 ; if ( ( VAR_4 ) == ( VAR_5 ) ) VAR_6 . METHOD_3 ( VAR_7 ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ) ; if ( ( VAR_4 ) == ( VAR_5 ) ) VAR_6 . METHOD_3 ( VAR_7 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { message = VAR_1 ; VAR_2 . METHOD_2 ( message . METHOD_3 ( TYPE_1 . METHOD_4 ( ) ) ) ; new java.lang.Thread ( new TYPE_2 ( false ) ) . start ( ) ; } | public void METHOD_1 ( ) { message = VAR_1 ; VAR_2 . METHOD_2 ( message ) ; new java.lang.Thread ( new TYPE_2 ( false ) ) . start ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 ) { VAR_2 -= VAR_1 ; if ( ( VAR_2 ) <= 0 ) { METHOD_2 ( ) ; } } | public void METHOD_1 ( int VAR_1 ) { VAR_2 -= VAR_1 ; if ( ( VAR_2 ) < 0 ) { METHOD_2 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.lang.Object VAR_1 ) { return false ; } | public boolean METHOD_1 ( java.lang.Object x ) { return false ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.