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 ( ) { int a = 0 ; int b = 0 ; int c = 0 ; java.lang.System.out.println ( c ) ; }
|
public static void METHOD_1 ( ) { int a = 0 ; int b = 0 ; int c = 0 ; java.lang.System.out.println ( ( a + b ) ) ; java.lang.System.out.println ( c ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_1 ( VAR_2 . METHOD_2 ( ) ) ; }
|
public void METHOD_1 ( ) { VAR_1 . METHOD_1 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( java.lang.String error , java.lang.String VAR_1 ) { java.lang.Integer count = VAR_2 . get ( ( ( error + STRING_1 ) + VAR_1 ) ) ; return count == null ? 0 : count ; }
|
public int METHOD_1 ( java.lang.String error , java.lang.String VAR_1 ) { java.lang.Integer count = VAR_2 . get ( ( ( error + STRING_1 ) + VAR_1 ) ) ; count = ( count == null ) ? 0 : count ; return count + 1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { if ( ( index ) > ( this . VAR_1 . size ( ) ) ) { return false ; } return true ; }
|
public boolean METHOD_1 ( ) { if ( ( index ) >= ( this . VAR_1 . size ( ) ) ) { return true ; } return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( java.lang.Object VAR_1 ) { if ( ( VAR_2 ) == null ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( VAR_1 ) ; } return VAR_2 ; }
|
public java.util.List < TYPE_1 > METHOD_1 ( java.lang.Object VAR_1 ) { if ( ( VAR_2 ) == null ) { super . METHOD_1 ( VAR_1 ) ; } return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( ) ; java.lang.System.out.println ( STRING_1 ) ; for ( TYPE_1 VAR_1 : TYPE_1 . METHOD_3 ( ) ) { java.lang.System.out.println ( VAR_1 . METHOD_4 ( ) ) ; } }
|
public void METHOD_1 ( ) { for ( TYPE_1 VAR_1 : TYPE_1 . METHOD_3 ( ) ) { java.lang.System.out.println ( VAR_1 . METHOD_4 ( ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( VAR_1 . METHOD_2 ( ) ) return ; METHOD_3 ( ) ; METHOD_4 ( ) ; }
|
protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; METHOD_4 ( ) ; if ( ! ( VAR_1 . METHOD_2 ( ) ) ) METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( java.lang.String string ) throws TYPE_2 { TYPE_1 VAR_1 = ( ( TYPE_1 ) ( TYPE_3 . METHOD_2 ( string ) ) ) ; return VAR_1 ; }
|
private TYPE_1 METHOD_1 ( java.lang.String string ) throws TYPE_2 { TYPE_1 VAR_1 = new TYPE_1 ( TYPE_3 . METHOD_2 ( string ) . getTime ( ) ) ; return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String path ) { java.io.File VAR_1 = METHOD_2 ( path ) ; if ( ( VAR_1 != null ) && ( VAR_1 . METHOD_3 ( ) ) ) { VAR_1 . delete ( ) ; } else { java.lang.System.out.println ( STRING_1 ) ; } }
|
public void METHOD_1 ( java.lang.String path ) { java.io.File VAR_1 = METHOD_2 ( path ) ; if ( VAR_1 != null ) { VAR_1 . delete ( ) ; } else { java.lang.System.out.println ( STRING_1 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( ) { java.util.Date date = new java.util.Date ( ) ; TYPE_1 VAR_1 = new TYPE_2 ( STRING_1 ) ; java.lang.String VAR_2 = VAR_1 . format ( date ) ; return VAR_2 ; }
|
private static java.lang.String METHOD_1 ( ) { java.util.Date date = new java.util.Date ( ) ; TYPE_1 VAR_1 = new TYPE_2 ( STRING_1 ) ; java.lang.String VAR_2 = VAR_1 . format ( date ) ; return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 t , TYPE_2 c ) { if ( VAR_1 . METHOD_2 ( t ) ) { return VAR_2 . METHOD_1 ( t , c ) ; } else { return VAR_3 . METHOD_1 ( t , c ) ; } }
|
public TYPE_1 METHOD_1 ( TYPE_1 t , TYPE_2 c ) { if ( VAR_1 . METHOD_2 ( t , c ) ) { return VAR_2 . METHOD_1 ( t , c ) ; } else { return VAR_3 . METHOD_1 ( t , c ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_2 ) != null ) VAR_2 . METHOD_2 ( ) . select ( METHOD_3 ( VAR_1 , VAR_2 . METHOD_4 ( ) ) ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( ( VAR_2 ) != null ) && ( VAR_1 != null ) ) { VAR_2 . METHOD_2 ( ) . select ( METHOD_3 ( VAR_1 , VAR_2 . METHOD_4 ( ) ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) > 0 ) { ( VAR_1 ) -- ; java.lang.System.out.println ( ( STRING_1 + ( VAR_1 ) ) ) ; } }
|
public void METHOD_1 ( ) { if ( ( VAR_1 ) > 0 ) { ( VAR_1 ) -- ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws TYPE_1 { java.lang.String VAR_1 = STRING_1 ; VAR_2 . delete ( VAR_1 , VAR_3 ) ; TYPE_2 . METHOD_2 ( VAR_4 ) . METHOD_3 ( VAR_1 ) ; }
|
public void METHOD_1 ( ) throws TYPE_1 { java.lang.String VAR_1 = STRING_1 ; VAR_2 . delete ( VAR_1 , VAR_3 ) ; METHOD_2 ( VAR_4 ) . METHOD_3 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = true ; TYPE_1 . METHOD_2 ( VAR_2 ) ; METHOD_3 ( VAR_3 ) ; }
|
public void METHOD_1 ( ) { synchronized ( this ) { VAR_1 = true ; TYPE_1 . METHOD_2 ( VAR_2 ) ; } METHOD_3 ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . add ( new TYPE_1 ( ) ) ; METHOD_2 ( ) ; }
|
public void METHOD_1 ( ) { if ( ( VAR_1 ) == null ) VAR_1 = new java.util.ArrayList < > ( ) ; VAR_1 . add ( new TYPE_1 ( ) ) ; METHOD_2 ( ) ; }
|
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 ) { TYPE_1 . METHOD_2 ( VAR_3 , STRING_1 ) ; VAR_4 . METHOD_3 ( this ) ; return super . METHOD_1 ( intent , VAR_1 , VAR_2 ) ; }
|
public int METHOD_1 ( android.content.Intent intent , int VAR_1 , int VAR_2 ) { VAR_4 . METHOD_3 ( this ) ; return super . METHOD_1 ( intent , VAR_1 , VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object [ ] METHOD_1 ( ) { return VAR_1 . METHOD_2 ( ) ; }
|
public java.lang.Object [ ] METHOD_1 ( ) { return ( VAR_1 ) != null ? VAR_1 . METHOD_2 ( ) : null ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . remove ( p . METHOD_2 ( ) ) ; if ( ( p != null ) && ( p . METHOD_3 ( ) ) ) { METHOD_4 ( p , VAR_2 , VAR_3 ) ; } }
|
public void METHOD_1 ( ) { VAR_1 . remove ( p . METHOD_2 ( ) ) ; if ( ( p != null ) && ( p . METHOD_3 ( ) ) ) { METHOD_4 ( p , VAR_2 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { METHOD_2 ( ) . METHOD_3 ( TYPE_1 . id ( STRING_1 ) ) . METHOD_4 ( ( VAR_1 + ( VAR_2 ) ) ) ; }
|
public void METHOD_1 ( java.lang.String VAR_1 ) { METHOD_2 ( ) . METHOD_3 ( TYPE_1 . name ( STRING_1 ) ) . METHOD_4 ( ( VAR_1 + ( VAR_2 ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.Collection < TYPE_1 > list ( java.lang.String VAR_1 ) throws java.io.IOException , java.lang.ClassNotFoundException { return VAR_2 . values ( ) ; }
|
public java.util.Collection < TYPE_1 > list ( ) { return VAR_2 . values ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { ( VAR_1 ) ++ ; VAR_2 = VAR_3 . get ( this . VAR_1 ) ; METHOD_2 ( ) ; METHOD_3 ( VAR_2 ) ; }
|
private void METHOD_1 ( ) { METHOD_2 ( ) ; ( VAR_1 ) ++ ; VAR_2 = VAR_3 . get ( VAR_1 ) ; METHOD_3 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ! ( VAR_2 ) ) { VAR_3 = true ; } }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ! ( VAR_2 ) ) { VAR_3 = true ; } else { VAR_3 = false ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { if ( VAR_1 instanceof TYPE_3 ) VAR_2 = true ; VAR_3 = VAR_4 ; VAR_5 . put ( VAR_1 . key , VAR_1 ) ; TYPE_4 VAR_6 ; return this ; }
|
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { if ( VAR_1 . isEmpty ) return this ; if ( VAR_1 instanceof TYPE_3 ) VAR_2 = true ; VAR_3 = VAR_4 ; VAR_5 . put ( VAR_1 . key , VAR_1 ) ; TYPE_4 VAR_6 ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( this . VAR_1 , TYPE_1 . METHOD_3 ( ) ) . METHOD_4 ( ) ; }
|
private void METHOD_1 ( ) { METHOD_2 ( this . VAR_1 , METHOD_3 ( ) ) . METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_1 ; VAR_3 = new java.util.ArrayList < > ( ) ; }
|
public static void METHOD_1 ( TYPE_1 VAR_1 ) { 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_2 VAR_2 ) { TYPE_3 VAR_3 = METHOD_2 ( VAR_1 ) ; if ( VAR_3 . METHOD_1 ( VAR_1 , VAR_2 ) ) { METHOD_3 ( VAR_3 ) ; } else { METHOD_3 ( VAR_3 ) ; } }
|
public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { TYPE_3 VAR_3 = METHOD_2 ( VAR_1 ) ; VAR_3 . METHOD_1 ( VAR_1 , VAR_2 ) ; METHOD_3 ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; super . METHOD_1 ( ) ; TYPE_2 VAR_2 = new TYPE_2 ( this , VAR_3 class ) ; METHOD_3 ( VAR_2 , VAR_4 , VAR_5 ) ; }
|
public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; super . METHOD_1 ( ) ; android.content.Intent VAR_2 = new android.content.Intent ( this , VAR_3 class ) ; METHOD_3 ( VAR_2 , VAR_4 , VAR_5 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( final java.lang.String VAR_1 ) { return ( ( VAR_2 ) != null ) && ( VAR_2 . equals ( VAR_1 ) ) ; }
|
public boolean METHOD_1 ( final java.lang.String VAR_1 ) { return ( ( VAR_2 ) == null ) || ( VAR_2 . equals ( VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( VAR_1 ) { TYPE_1 . METHOD_2 ( VAR_2 , STRING_1 ) ; } }
|
public void METHOD_1 ( ) { super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) throws TYPE_3 { METHOD_2 ( ) ; TYPE_4 VAR_2 = TYPE_5 . METHOD_3 ( VAR_3 , VAR_1 ) ; TYPE_6 result = new TYPE_6 ( METHOD_4 ( ) , this , VAR_2 ) ; add ( result ) ; return result ; }
|
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) throws TYPE_3 { METHOD_2 ( ) ; TYPE_4 VAR_2 = TYPE_5 . METHOD_3 ( VAR_3 , VAR_1 ) ; TYPE_6 result = new TYPE_6 ( METHOD_4 ( ) , this , VAR_2 ) ; return result ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { try { METHOD_2 ( VAR_2 ) ; } catch ( TYPE_1 VAR_3 ) { VAR_3 . METHOD_3 ( ) ; } catch ( TYPE_2 VAR_3 ) { VAR_3 . METHOD_3 ( ) ; } }
|
public void METHOD_1 ( android.view.View VAR_1 ) { try { METHOD_2 ( VAR_2 ) ; } catch ( TYPE_1 VAR_3 ) { VAR_3 . METHOD_3 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String title ) { TYPE_2 . i ( STRING_1 , ( STRING_2 + title ) ) ; VAR_1 . METHOD_2 ( ) . setText ( title ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String title ) { TYPE_2 . i ( STRING_1 , ( STRING_2 + title ) ) ; this . title = title ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return TYPE_2 . METHOD_2 ( file ) ; }
|
private TYPE_1 METHOD_1 ( ) { return TYPE_2 . METHOD_2 ( file ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception ;
|
public abstract void METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int time ) { VAR_1 . METHOD_2 ( ) . METHOD_3 ( time ) ; }
|
public void METHOD_1 ( int time ) { METHOD_2 ( ) . METHOD_3 ( time ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) ; METHOD_3 ( ) ; }
|
public void METHOD_1 ( ) { }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < TYPE_2 > METHOD_1 ( ) { TYPE_3 . METHOD_2 ( ) ; return VAR_1 ; }
|
public TYPE_1 < TYPE_2 > METHOD_1 ( ) { return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int p ) { if ( ( p >= 0 ) && ( p <= INT_1 ) ) METHOD_2 ( STRING_1 , new java.lang.Integer ( p ) . toString ( ) ) ; }
|
public void METHOD_1 ( int p ) { if ( ( p >= 0 ) && ( p <= INT_1 ) ) { METHOD_2 ( STRING_1 , java.lang.Integer.toString ( p ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( java.lang.Object a , java.lang.Object b ) { return ( a == b ) || ( a . equals ( b ) ) ; }
|
private boolean METHOD_1 ( java.lang.Object a , java.lang.Object b ) { return ( ( ( a != null ) && ( b != null ) ) && ( a . equals ( b ) ) ) || ( a == b ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 context = TYPE_2 . METHOD_2 ( new java.io.File ( STRING_1 ) ) ; TYPE_3 function = context . METHOD_3 ( STRING_2 , null ) ; TYPE_4 . assertEquals ( STRING_3 , function . METHOD_4 ( ) ) ; }
|
public void METHOD_1 ( ) { TYPE_1 context = TYPE_2 . METHOD_2 ( new java.io.File ( STRING_1 ) ) ; TYPE_3 function = context . METHOD_3 ( STRING_2 , STRING_3 ) ; TYPE_4 . assertEquals ( STRING_3 , function . METHOD_4 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String params ) { if ( ( this . VAR_1 ) == null ) { this . VAR_1 = new TYPE_1 ( ) ; } this . VAR_1 . METHOD_2 ( params ) ; }
|
public void METHOD_1 ( java.lang.String params ) { if ( ( this . VAR_1 ) == null ) { this . VAR_1 = new TYPE_1 ( ) ; this . status = true ; } this . VAR_1 . METHOD_2 ( params ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( ) { return ( VAR_1 ) == null ? STRING_1 : VAR_1 . getName ( ) ; }
|
public java.lang.String METHOD_1 ( ) { return ( VAR_1 ) == null ? STRING_1 : VAR_1 . getName ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( boolean VAR_1 ) { if ( VAR_1 ) { super . METHOD_1 ( ) ; try { VAR_2 . METHOD_2 ( ) ; } catch ( java.io.IOException VAR_3 ) { throw new TYPE_1 ( VAR_4 , VAR_3 ) ; } VAR_2 = null ; } }
|
protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; try { VAR_2 . METHOD_2 ( ) ; VAR_2 = null ; } catch ( java.io.IOException VAR_3 ) { throw new TYPE_1 ( VAR_4 , VAR_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 = new TYPE_1 ( ) ; while ( ! ( VAR_2 ) ) { VAR_1 . METHOD_1 ( true ) ; } java.lang.System.exit ( 0 ) ; }
|
public static void main ( java.lang.String [ ] args ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float x , float y , float VAR_1 ) { VAR_2 . METHOD_1 ( x , y , VAR_1 ) ; }
|
public void METHOD_1 ( float x , float y , float VAR_1 ) { }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( java.lang.String str ) { if ( str . equals ( STRING_1 ) ) return VAR_1 ; return str ; }
|
public java.lang.String METHOD_1 ( java.lang.String str ) { if ( ( str == null ) || ( str . equals ( STRING_1 ) ) ) return VAR_1 ; return str ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( int VAR_1 ) { return ( VAR_1 >= VAR_1 ) && ( ( VAR_2 ) < INT_1 ) ; }
|
private boolean METHOD_1 ( int VAR_1 ) { return ( VAR_1 >= ( VAR_2 ) ) && ( VAR_1 < INT_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { if ( METHOD_2 ( ) ) throw new TYPE_2 ( STRING_1 ) ; return VAR_1 ; }
|
public TYPE_1 METHOD_1 ( ) { if ( ! ( METHOD_2 ( ) ) ) throw new TYPE_2 ( STRING_1 ) ; return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 context ) throws TYPE_2 , java.io.IOException { this . METHOD_2 ( context . METHOD_3 ( ) ) ; this . VAR_1 . METHOD_1 ( context ) ; }
|
public void METHOD_1 ( TYPE_1 context ) throws TYPE_2 , java.io.IOException { this . METHOD_2 ( context . METHOD_3 ( ) , context ) ; this . VAR_1 . METHOD_1 ( context ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( ) . METHOD_3 ( METHOD_4 ( ) ) ; TYPE_2 . init ( this ) ; }
|
public void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( ) . init ( METHOD_4 ( ) ) ; TYPE_2 . init ( this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.io.File METHOD_1 ( ) { java.lang.String VAR_1 = new TYPE_1 ( STRING_1 ) . format ( new java.util.Date ( ) ) ; java.io.File VAR_2 = new java.io.File ( ( ( ( VAR_3 ) + VAR_1 ) + STRING_2 ) ) ; return VAR_2 ; }
|
public java.io.File METHOD_1 ( ) { java.lang.String VAR_1 = new TYPE_1 ( STRING_1 ) . format ( new java.util.Date ( ) ) ; java.io.File VAR_2 = new java.io.File ( VAR_3 , ( VAR_1 + STRING_2 ) ) ; return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( final java.lang.String VAR_1 ) { final TYPE_2 VAR_2 = ( ( TYPE_2 ) ( TYPE_3 . METHOD_2 ( ) . METHOD_3 ( VAR_3 class ) ) ) ; return VAR_2 . METHOD_1 ( VAR_1 ) ; }
|
public TYPE_1 METHOD_1 ( final java.lang.String VAR_1 ) { final TYPE_2 VAR_2 = ( ( TYPE_2 ) ( TYPE_3 . METHOD_2 ( ) . METHOD_3 ( VAR_3 class ) ) ) ; return VAR_2 != null ? VAR_2 . METHOD_1 ( VAR_1 ) : null ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return ( METHOD_2 ( VAR_1 ) ) >= INT_1 ; }
|
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( java.lang.String key ) { java.lang.String VAR_1 = TYPE_1 . METHOD_2 ( key ) ; if ( VAR_1 == null ) { TYPE_1 . METHOD_3 ( key ) ; } return VAR_1 ; }
|
public java.lang.String METHOD_1 ( java.lang.String key ) { java.lang.String VAR_1 = TYPE_1 . METHOD_2 ( key ) ; if ( VAR_1 == null ) { VAR_1 = TYPE_1 . METHOD_3 ( key ) ; } return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { java.util.List < java.lang.String > VAR_1 = VAR_2 . METHOD_2 ( ) ; this . VAR_3 . METHOD_3 ( ) ; this . VAR_3 . METHOD_4 ( VAR_1 ) ; }
|
private void METHOD_1 ( ) { java.util.List < java.lang.String > VAR_1 = VAR_2 . METHOD_2 ( ) ; this . VAR_3 . METHOD_3 ( ) ; this . VAR_3 . METHOD_4 ( true , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static int METHOD_1 ( android.content.Context context , int VAR_1 ) { float VAR_2 = context . METHOD_2 ( ) . METHOD_3 ( ) . VAR_3 ; return ( ( int ) ( ( VAR_1 * VAR_2 ) + ( FLOAT_1 * VAR_1 ) ) ) ; }
|
public static int METHOD_1 ( android.content.Context context , int VAR_1 ) { float VAR_2 = context . METHOD_2 ( ) . METHOD_3 ( ) . VAR_3 ; return ( ( int ) ( ( VAR_1 * VAR_2 ) + FLOAT_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.CharSequence error ) { if ( error != null ) { VAR_1 . METHOD_1 ( error ) ; VAR_1 . METHOD_2 ( true ) ; } else { VAR_1 . METHOD_2 ( false ) ; } }
|
public void METHOD_1 ( java.lang.CharSequence error ) { if ( error != null ) { VAR_1 . METHOD_1 ( error ) ; } else { VAR_1 . METHOD_1 ( null ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { try { METHOD_2 ( VAR_1 , VAR_2 ) ; return true ; } catch ( java.lang.Exception VAR_3 ) { TYPE_1 . error ( STRING_1 , VAR_3 ) ; METHOD_3 ( ) ; return false ; } }
|
public boolean METHOD_1 ( ) { try { METHOD_2 ( VAR_1 , VAR_2 ) ; return true ; } catch ( java.io.IOException VAR_3 ) { TYPE_1 . error ( STRING_1 , VAR_3 ) ; METHOD_3 ( ) ; return false ; } }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( java.lang.Long VAR_1 ) throws java.lang.NullPointerException { }
|
public int METHOD_1 ( java.lang.Long VAR_1 ) throws java.lang.NullPointerException ;
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( java.util.ArrayList < java.lang.String > VAR_1 , java.lang.String VAR_2 ) { return VAR_3 . METHOD_1 ( VAR_1 , VAR_2 ) ; }
|
private java.util.List < TYPE_1 > METHOD_1 ( java.util.ArrayList < java.lang.String > VAR_1 , java.lang.String VAR_2 ) { return VAR_3 . METHOD_1 ( VAR_1 , VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.Object key , boolean value ) { METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( TYPE_1 . METHOD_5 ( key ) , value ) . commit ( ) ; return this ; }
|
public TYPE_1 METHOD_1 ( java.lang.Object key , boolean value ) { METHOD_2 ( ) . METHOD_4 ( TYPE_1 . METHOD_5 ( key ) , value ) ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return ( this . VAR_1 . size ( ) ) > 0 ; }
|
public boolean METHOD_1 ( ) { return ( ( this . VAR_1 ) != null ) && ( ( this . VAR_1 . size ( ) ) > 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( double x ) { return ( VAR_1 . METHOD_2 ( ) ) < x ; }
|
private boolean METHOD_1 ( double x ) { return ( VAR_1 . METHOD_2 ( ) ) <= x ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return VAR_2 [ VAR_1 . METHOD_2 ( ) ] ; }
|
public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { if ( VAR_1 != null ) { return VAR_2 [ VAR_1 . METHOD_2 ( ) ] ; } return null ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { final long VAR_1 = TYPE_1 . METHOD_2 ( ) ; data = METHOD_3 ( ) . query ( VAR_2 , null , null , null , null ) ; TYPE_1 . METHOD_4 ( VAR_1 ) ; }
|
public void METHOD_1 ( ) { }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( ) ; TYPE_1 . METHOD_3 ( ) ; }
|
public void METHOD_1 ( ) { METHOD_2 ( ) ; METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) . get ( VAR_2 ) . METHOD_3 ( VAR_3 ) ; }
|
public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) . get ( VAR_2 ) . METHOD_3 ( getActivity ( ) , VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private native void METHOD_1 ( long VAR_1 , long VAR_2 , boolean VAR_3 ) ;
|
private native void METHOD_1 ( long VAR_1 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { VAR_1 . METHOD_2 ( new TYPE_3 ( VAR_2 ) ) ; VAR_1 . set ( STRING_1 , VAR_2 ) ; return this ; }
|
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { VAR_1 . METHOD_2 ( new TYPE_3 ( VAR_2 ) ) ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 = true ; VAR_3 = 0 ; TYPE_1 . METHOD_2 ( ) ; java.lang.System.exit ( 0 ) ; }
|
public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 = true ; VAR_3 = 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws TYPE_1 { TYPE_2 . info ( STRING_1 ) ; TYPE_2 . info ( STRING_2 , VAR_1 . METHOD_2 ( ) ) ; startTime = TYPE_3 . METHOD_3 ( ) ; }
|
public void METHOD_1 ( ) throws TYPE_1 { TYPE_2 . info ( STRING_1 ) ; TYPE_2 . info ( STRING_2 , this . VAR_1 . METHOD_2 ( ) ) ; this . startTime = TYPE_3 . METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.Boolean METHOD_1 ( ) { try { if ( TYPE_1 . METHOD_2 ( ) ) { return true ; } else { return false ; } } catch ( TYPE_2 VAR_1 ) { TYPE_3 . METHOD_3 ( VAR_2 , null , VAR_1 ) ; return false ; } }
|
public java.lang.Boolean METHOD_1 ( ) { try { if ( TYPE_1 . METHOD_2 ( ) ) { return true ; } else { return false ; } } catch ( TYPE_2 VAR_1 ) { TYPE_3 . METHOD_3 ( VAR_2 , null , VAR_1 ) ; return false ; } }
|
The following code may contain bugs. Write a refined code without bugs. private static java.lang.Long METHOD_1 ( TYPE_1 p ) { return TYPE_2 . METHOD_1 ( p . getId ( ) ) ; }
|
public static java.lang.Long METHOD_1 ( TYPE_1 p ) { return TYPE_2 . METHOD_1 ( p . getId ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.lang.String VAR_1 ) { try { VAR_2 . METHOD_2 ( VAR_1 ) ; VAR_2 . METHOD_3 ( ) ; return true ; } catch ( java.io.IOException VAR_3 ) { VAR_3 . METHOD_4 ( ) ; return false ; } }
|
public boolean METHOD_1 ( java.lang.String VAR_1 ) { try { this . VAR_2 . METHOD_2 ( VAR_1 ) ; return true ; } catch ( java.io.IOException VAR_3 ) { VAR_3 . METHOD_4 ( ) ; return false ; } }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { if ( VAR_1 . get ( ) ) { return ; } METHOD_2 ( ) ; VAR_2 . METHOD_3 ( ) ; }
|
public static void METHOD_1 ( ) { if ( VAR_1 . get ( ) ) { return ; } METHOD_2 ( ) ; VAR_2 . METHOD_3 ( ) ; VAR_1 . set ( true ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_2 ( ) ; TYPE_1 VAR_2 = new TYPE_1 ( ) ; TYPE_2 VAR_3 = METHOD_3 ( ) . METHOD_4 ( ) ; VAR_3 . replace ( VAR_4 , VAR_2 ) ; VAR_3 . commit ( ) ; }
|
public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = TYPE_1 . start ( INT_1 ) ; }
|
public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( INT_1 ) ; java.lang.Thread t = new java.lang.Thread ( VAR_1 ) ; t . start ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { METHOD_2 ( ) ; java.lang.System.out.println ( STRING_1 ) ; return super . METHOD_1 ( ) ; }
|
public int METHOD_1 ( ) { METHOD_2 ( ) ; return super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_2 ) != null ) { if ( VAR_1 . METHOD_2 ( ) . equals ( STRING_1 ) ) { } } }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_2 ) != null ) { if ( STRING_1 . equals ( VAR_1 . METHOD_2 ( ) ) ) { } } }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( java.lang.String VAR_1 ) { android.content.Intent i = new android.content.Intent ( VAR_1 ) ; i . METHOD_2 ( STRING_1 , METHOD_3 ( ) ) ; i . METHOD_2 ( STRING_2 , METHOD_4 ( ) ) ; METHOD_5 ( i ) ; }
|
private void METHOD_1 ( java.lang.String VAR_1 ) { android.content.Intent i = new android.content.Intent ( VAR_1 ) ; METHOD_5 ( i ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 < ? extends java.lang.String > VAR_1 , java.lang.String VAR_2 , java.lang.String VAR_3 ) { METHOD_2 ( ) ; }
|
public void METHOD_1 ( TYPE_1 < ? extends java.lang.String > VAR_1 , java.lang.String VAR_2 , java.lang.String VAR_3 ) { METHOD_2 ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { this . VAR_1 = VAR_2 ; METHOD_2 ( ( STRING_1 + ( STRING_2 + STRING_3 ) ) ) ; }
|
public void METHOD_1 ( ) { METHOD_2 ( ( STRING_1 + ( STRING_2 + STRING_3 ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String to ( TYPE_1 VAR_1 ) { return TYPE_2 . toString ( VAR_1 , null ) ; }
|
public java.lang.String to ( TYPE_1 VAR_1 ) { if ( VAR_1 == null ) return null ; return TYPE_2 . toString ( VAR_1 , null ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 remove ( int id ) { TYPE_2 target = this . METHOD_1 ( id ) ; this . remove ( target , this . VAR_1 ) ; return target . element ; }
|
public TYPE_1 remove ( int id ) { if ( ( this . VAR_1 ) == null ) { return null ; } TYPE_2 target = this . METHOD_1 ( id ) ; this . remove ( target , this . VAR_1 ) ; return target . element ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( final java.lang.String VAR_1 , final java.lang.String VAR_2 , int VAR_3 , final java.lang.String VAR_4 ) { return METHOD_2 ( VAR_1 , VAR_3 , VAR_4 ) ? VAR_2 : STRING_1 ; }
|
public java.lang.String METHOD_1 ( final java.lang.String VAR_1 , final java.lang.String VAR_2 , java.lang.String VAR_3 , final java.lang.String VAR_4 ) { return METHOD_2 ( VAR_1 , VAR_3 , VAR_4 ) ? VAR_2 : STRING_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( ) { if ( ( VAR_1 . METHOD_1 ( ) ) != null ) { return VAR_1 . METHOD_1 ( ) ; } else { return null ; } return null ; }
|
public java.util.List < TYPE_1 > METHOD_1 ( ) { if ( ( VAR_1 . METHOD_1 ( ) ) != null ) { return VAR_1 . METHOD_1 ( ) ; } else { return null ; } }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) . METHOD_3 ( this ) ; if ( ( VAR_1 ) == null ) { VAR_1 = TYPE_2 . METHOD_4 ( ) ; VAR_1 . start ( ) ; } }
|
private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) . METHOD_3 ( this ) ; if ( ( VAR_1 ) == null ) { VAR_1 = TYPE_2 . METHOD_4 ( ) ; } VAR_1 . start ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public final TYPE_1 get ( final int index ) { return VAR_1 . get ( index ) ; }
|
public final TYPE_1 get ( final java.lang.String key ) { return VAR_1 . get ( key ) ; }
|
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 . get ( STRING_1 ) ; new TYPE_3 ( VAR_1 , STRING_2 ) . METHOD_2 ( ) ; }
|
public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = TYPE_2 . get ( STRING_1 ) ; java.lang.System.out.print ( new TYPE_3 ( VAR_1 , STRING_2 ) . METHOD_2 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { java.lang.System.out.println ( STRING_1 ) ; this . VAR_1 = TYPE_1 . METHOD_2 ( STRING_2 ) ; METHOD_3 ( this . VAR_1 ) ; }
|
public void METHOD_1 ( ) { this . VAR_1 = TYPE_1 . METHOD_2 ( STRING_2 ) ; METHOD_3 ( this . VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Long METHOD_1 ( java.lang.Long VAR_1 ) { if ( VAR_1 != ( VAR_2 ) ) { java.lang.System.out.println ( this . message ) ; } return VAR_2 ; }
|
public java.lang.Long METHOD_1 ( java.lang.Long VAR_1 ) { if ( VAR_1 != ( VAR_2 ) ) { java.lang.System.out.println ( message ) ; } return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( ( state ) != null ) { METHOD_2 ( state ) ; } }
|
public void METHOD_1 ( ) { if ( ( state ) != null ) { METHOD_2 ( state ) ; } super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception { java.lang.String VAR_2 = STRING_1 + ( METHOD_2 ( VAR_1 ) ) ; return TYPE_2 . METHOD_3 ( VAR_2 ) . METHOD_4 ( ) ; }
|
private java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception { java.lang.String VAR_2 = STRING_1 + ( METHOD_2 ( VAR_1 ) ) ; return TYPE_2 . METHOD_3 ( 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 ( getString ( VAR_2 ) , STRING_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 boolean equals ( java.lang.Object VAR_1 ) { return ( ( this ) == VAR_1 ) || ( ( VAR_1 instanceof TYPE_1 ) && ( TYPE_1 . METHOD_1 ( this . data , ( ( TYPE_1 ) ( VAR_1 ) ) . data ) ) ) ; }
|
public boolean equals ( java.lang.Object VAR_1 ) { return ( this ) == VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.CharSequence METHOD_1 ( int position ) { int VAR_1 = java.util.Calendar.getInstance ( ) . get ( VAR_2 ) ; return VAR_3 [ ( ( ( VAR_1 - 1 ) + ( INT_1 - position ) ) % INT_1 ) ] ; }
|
private java.lang.CharSequence METHOD_1 ( int position ) { int VAR_1 = java.util.Calendar.getInstance ( ) . get ( VAR_2 ) ; return VAR_3 [ ( ( ( VAR_1 - 1 ) + position ) % INT_1 ) ] ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String n ) { name = n ; }
|
public void METHOD_1 ( java.lang.String n ) { name = n ; this . update ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { final android.content.Context context = getContext ( ) ; final TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( context ) ; METHOD_3 ( VAR_1 ) ; }
|
private void METHOD_1 ( ) { final TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( getContext ( ) ) ; METHOD_3 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { for ( TYPE_1 VAR_2 : VAR_3 ) { if ( VAR_2 . getName ( ) . equals ( VAR_1 ) ) return VAR_2 ; } return null ; }
|
public long METHOD_1 ( java.lang.String VAR_1 ) { for ( TYPE_1 VAR_2 : VAR_3 ) { if ( VAR_2 . getName ( ) . equals ( VAR_1 ) ) return VAR_2 . getId ( ) ; } return - 1 ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.