input
stringlengths 96
415
| output
stringlengths 18
303
|
---|---|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { TYPE_1 . init ( STRING_1 ) ; VAR_1 = VAR_2 ; VAR_3 . METHOD_2 ( VAR_1 ) ; }
|
protected void METHOD_1 ( ) { TYPE_1 . init ( STRING_1 ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public long METHOD_1 ( ) { if ( ( VAR_1 ) == null ) throw new TYPE_1 ( STRING_1 ) ; return ( ( VAR_2 ) + ( VAR_1 . offset ) ) - ( position ( ) ) ; }
|
public long METHOD_1 ( ) { if ( ( VAR_1 ) == null ) throw new TYPE_1 ( STRING_1 ) ; return ( VAR_2 ) + ( ( position ( ) ) - ( VAR_1 . offset ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; }
|
public void METHOD_1 ( android.view.View VAR_1 ) { }
|
The following code may contain bugs. Write a refined code without bugs. private static java.lang.String METHOD_1 ( java.util.List < TYPE_1 > VAR_1 , int n ) { return STRING_1 + ( TYPE_2 . METHOD_2 ( VAR_1 , n ) ) ; }
|
protected java.lang.String METHOD_1 ( java.util.List < TYPE_1 > VAR_1 , int n ) { return STRING_1 + ( TYPE_2 . METHOD_2 ( VAR_1 , n ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( STRING_1 ) ; }
|
public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( STRING_1 , null ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( java.lang.String VAR_1 ) { VAR_2 = VAR_1 ; VAR_3 = METHOD_2 ( VAR_2 , INT_1 ) ; }
|
public void METHOD_1 ( java.lang.String VAR_1 ) { VAR_2 = 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 ; if ( ( VAR_2 ) < FLOAT_1 ) VAR_2 = FLOAT_1 ; TYPE_1 . i ( VAR_3 , ( STRING_1 + VAR_1 ) ) ; }
|
public void METHOD_1 ( float VAR_1 ) { VAR_2 = VAR_1 ; if ( ( VAR_2 ) < 1.0F ) VAR_2 = 1.0F ; TYPE_1 . i ( VAR_3 , ( STRING_1 + VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( long VAR_1 ) { TYPE_1 . METHOD_2 ( getActivity ( ) , STRING_1 , VAR_2 ) . show ( ) ; }
|
public void METHOD_1 ( long VAR_1 ) { }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 , int x , int y , int VAR_2 ) { if ( VAR_1 . METHOD_2 ( x , y , VAR_2 , VAR_3 ) ) { return true ; } else { return false ; } }
|
public boolean METHOD_1 ( TYPE_1 VAR_1 , int x , int y , int VAR_2 ) { if ( VAR_1 . METHOD_2 ( x , ( y - 1 ) , VAR_2 , VAR_3 ) ) { return true ; } else { return false ; } }
|
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 , new TYPE_2 ( ) ) ; }
|
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return METHOD_2 ( VAR_1 , new java.util.HashMap < > ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ; if ( ( VAR_2 != null ) && ( VAR_2 != null ) ) { return VAR_2 . METHOD_1 ( VAR_1 ) ; } return false ; }
|
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ; if ( VAR_2 != null ) { return VAR_2 . METHOD_1 ( VAR_1 ) ; } return false ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.Boolean METHOD_1 ( ) { return ( ( VAR_1 . METHOD_2 ( ) ) || ( VAR_1 . METHOD_3 ( ) ) ) || ( VAR_1 . METHOD_4 ( ) ) ; }
|
private java.lang.Boolean METHOD_1 ( ) { return ( VAR_1 . METHOD_3 ( ) ) || ( VAR_1 . METHOD_4 ( ) ) ; }
|
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 ) ; TYPE_1 . METHOD_3 ( ) ; TYPE_1 . METHOD_4 ( ) ; }
|
public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 . METHOD_2 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 < TYPE_4 > VAR_2 , TYPE_3 < TYPE_4 > VAR_3 ) { return TYPE_1 . METHOD_2 ( VAR_4 , VAR_1 , VAR_2 , VAR_3 ) . get ( ) ; }
|
public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 < TYPE_4 > VAR_2 , TYPE_3 < TYPE_4 > VAR_3 ) { return TYPE_1 . METHOD_2 ( VAR_4 , VAR_1 , VAR_2 , VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( java.util.Map < java.lang.String , java.lang.String > VAR_1 , boolean VAR_2 ) throws java.io.IOException ;
|
void METHOD_1 ( java.util.Map < java.lang.String , java.lang.String > VAR_1 ) throws java.io.IOException ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String text ) { this . VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) . setValue ( text ) ; VAR_2 . METHOD_4 ( METHOD_5 ( ) ) ; this . VAR_3 = false ; this . state = VAR_4 ; }
|
public void METHOD_1 ( java.lang.String text ) { this . VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) . setValue ( text ) ; VAR_2 . METHOD_4 ( METHOD_5 ( ) ) ; this . state = VAR_4 ; this . VAR_3 = false ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { TYPE_2 VAR_1 = METHOD_2 ( ) ; return VAR_1 ; }
|
public TYPE_1 METHOD_1 ( ) { return METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 != null ) { } }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_1 = VAR_2 . METHOD_2 ( ) ; }
|
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 void METHOD_1 ( int VAR_1 , int VAR_2 ) { METHOD_2 ( ) ; }
|
public void METHOD_1 ( int VAR_1 , int VAR_2 ) { METHOD_2 ( false ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static boolean isEmpty ( java.lang.String str ) { return ( str == null ) || ( ( str . length ( ) ) == 0 ) ; }
|
public static boolean isEmpty ( java.lang.CharSequence str ) { return ( str == null ) || ( ( str . length ( ) ) == 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return ( METHOD_2 ( ) ) && ( METHOD_3 ( ) ) ; }
|
public boolean METHOD_1 ( ) { return METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( ) ; VAR_2 = 0 ; METHOD_3 ( ) ; }
|
public void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( ) ; VAR_2 = 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String url ) { if ( ! ( STRING_1 . equals ( url ) ) ) { this . VAR_1 = url ; this . VAR_2 = true ; } }
|
public void METHOD_1 ( java.lang.String url ) { if ( ( url == null ) || ( ! ( STRING_1 . equals ( url ) ) ) ) { this . VAR_1 = url ; this . VAR_2 = true ; } }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { TYPE_3 index = TYPE_4 . METHOD_2 ( ) ; return index . get ( VAR_2 ) ; }
|
public static TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { TYPE_3 index = TYPE_4 . METHOD_2 ( ) ; if ( index == null ) return null ; return index . get ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return new TYPE_1 ( INT_1 , INT_2 ) . append ( name ) . append ( VAR_1 ) . append ( VAR_2 ) . append ( VAR_3 ) . METHOD_2 ( ) ; }
|
public int getId ( ) { return id ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.Object param ) { return new TYPE_2 ( ( ( param . toString ( ) ) + 1 ) ) ; }
|
public TYPE_1 METHOD_1 ( java.lang.Object param ) { return new TYPE_2 ( ( ( java.lang.Long.parseLong ( param . toString ( ) ) ) + 1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private float METHOD_1 ( ) { return ( ( VAR_1 . METHOD_2 ( ) ) / FLOAT_1 ) * ( VAR_2 ) ; }
|
public float METHOD_1 ( ) { return ( ( VAR_1 . METHOD_2 ( ) ) / FLOAT_1 ) * ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { if ( VAR_1 ) return ; if ( ( METHOD_2 ( ) ) != STRING_1 ) METHOD_3 ( STRING_2 ) ; }
|
private void METHOD_1 ( ) { if ( VAR_1 ) return ; if ( ! ( STRING_1 . equals ( METHOD_2 ( ) ) ) ) METHOD_3 ( STRING_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected boolean METHOD_1 ( double value ) { if ( value > ( ( VAR_1 ) * ( VAR_2 ) ) ) { return true ; } else { return false ; } }
|
protected boolean METHOD_1 ( double value ) { if ( value == ( ( VAR_1 ) * ( VAR_2 ) ) ) { return true ; } else { return false ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( 1 , STRING_1 ) ; VAR_1 . METHOD_2 ( STRING_2 ) ; assertEquals ( STRING_2 , VAR_1 . METHOD_3 ( ) ) ; }
|
public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( STRING_2 ) ; assertEquals ( STRING_2 , VAR_1 . METHOD_3 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( VAR_1 ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( VAR_3 , getString ( VAR_4 ) ) ; } }
|
public void METHOD_1 ( boolean b ) { METHOD_2 ( VAR_1 ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( VAR_3 , getString ( VAR_4 ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.Object VAR_1 ) { if ( ( this . VAR_2 ) != null ) { throw new TYPE_2 ( STRING_1 ) ; } this . VAR_3 = true ; this . VAR_1 = VAR_1 ; return this ; }
|
public TYPE_1 METHOD_1 ( java.lang.Integer VAR_1 ) { this . VAR_3 = true ; this . VAR_1 = VAR_1 ; return this ; }
|
The following code may contain bugs. Write a refined code without bugs. protected java.lang.Object METHOD_1 ( double length ) { this . METHOD_2 ( ( ( ( METHOD_3 ( ) ) == null ) || ( METHOD_3 ( ) . METHOD_4 ( ) ) ? VAR_1 : VAR_2 ) ) ; return null ; }
|
protected java.lang.Object METHOD_1 ( double length ) { return null ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.util.ArrayList VAR_1 , TYPE_1 VAR_2 ) { if ( VAR_2 != ( VAR_3 ) ) { throw new TYPE_2 ( STRING_1 ) ; } VAR_1 . add ( VAR_4 ) ; }
|
public void METHOD_1 ( java.util.List < java.lang.String > VAR_1 , TYPE_1 VAR_2 ) { if ( VAR_2 != ( VAR_3 ) ) { throw new TYPE_2 ( STRING_1 ) ; } VAR_1 . add ( VAR_4 ) ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.