input
stringlengths 96
415
| output
stringlengths 18
303
|
---|---|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String path , java.util.Map < ? , ? > type ) { getConfig ( ) . set ( path , type ) ; }
|
public void METHOD_1 ( java.lang.String path , java.util.Map < ? , ? > type ) { p . getConfig ( ) . set ( path , type ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int count ) { METHOD_2 ( METHOD_3 ( STRING_1 ) , java.lang.Integer.toString ( count ) ) ; }
|
public void METHOD_1 ( int count ) { assertThat ( METHOD_2 ( METHOD_3 ( STRING_1 ) , java.lang.Integer.toString ( count ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int add ( int a , int b ) { VAR_1 = VAR_2 ; return a + b ; }
|
public int add ( int a , int b ) { return a + b ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( final java.util.Collection < ? extends TYPE_1 > VAR_1 ) { if ( VAR_2 ) { return VAR_3 . METHOD_2 ( VAR_1 ) ; } else { throw new TYPE_2 ( STRING_1 ) ; } }
|
public boolean METHOD_1 ( final java.util.Collection < ? extends TYPE_1 > VAR_1 ) { if ( VAR_2 ) { throw new TYPE_2 ( STRING_1 ) ; } else { return VAR_3 . METHOD_2 ( VAR_1 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { java.lang.String VAR_1 = STRING_1 ; java.lang.String result = VAR_2 . METHOD_1 ( VAR_1 ) ; TYPE_1 . assertThat ( result , TYPE_2 . METHOD_2 ( STRING_2 ) ) ; }
|
public void METHOD_1 ( ) throws java.lang.Exception { java.lang.String VAR_1 = STRING_1 ; java.lang.System.out.println ( VAR_1 . length ( ) ) ; java.lang.String result = VAR_2 . METHOD_1 ( VAR_1 ) ; TYPE_1 . assertThat ( result , TYPE_2 . METHOD_2 ( STRING_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { if ( ( state ) == ( VAR_1 ) ) return ( ( VAR_2 ) == null ) || ( VAR_2 . METHOD_1 ( ) ) ; return ( state ) != ( VAR_3 ) ; }
|
public boolean METHOD_1 ( ) { if ( ( state ) == ( VAR_3 ) ) return false ; if ( ( state ) == ( VAR_1 ) ) return ( ( VAR_2 ) == null ) || ( VAR_2 . METHOD_1 ( ) ) ; return true ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { android.content.Intent intent = new android.content.Intent ( VAR_2 ) ; intent . METHOD_2 ( VAR_3 , METHOD_3 ( ) ) ; METHOD_4 ( intent , VAR_4 ) ; }
|
public void METHOD_1 ( android.view.View VAR_1 ) { android.content.Intent intent = new android.content.Intent ( VAR_2 ) ; METHOD_4 ( intent , VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( VAR_2 ) ; java.lang.String VAR_3 = VAR_1 . METHOD_2 ( VAR_4 . file ) ; java.lang.System.out.println ( VAR_3 ) ; TYPE_2 VAR_5 = TYPE_3 . METHOD_3 ( VAR_3 ) ; VAR_1 . METHOD_4 ( VAR_5 ) ; }
|
public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; java.lang.String VAR_3 = VAR_1 . METHOD_2 ( VAR_4 . file ) ; java.lang.System.out.println ( VAR_3 ) ; TYPE_2 VAR_5 = TYPE_3 . METHOD_3 ( VAR_3 ) ; VAR_1 . METHOD_4 ( VAR_5 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 event ) { context = event . getContext ( ) ; content = context . METHOD_2 ( ) ; if ( ( VAR_1 ) != null ) { VAR_2 . METHOD_3 ( new TYPE_2 ( VAR_1 ) , this ) ; } }
|
public void execute ( ) { VAR_2 . METHOD_3 ( new TYPE_2 ( VAR_1 ) , this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return new TYPE_1 ( VAR_1 , ( ( VAR_2 . METHOD_2 ( ) ) * INT_1 ) , TYPE_3 . METHOD_3 ( ) ) ; }
|
private TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return new TYPE_1 ( VAR_1 , ( ( VAR_2 . METHOD_2 ( ) ) * INT_1 ) , TYPE_3 . METHOD_3 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { TYPE_1 . METHOD_2 ( VAR_1 ) ; VAR_1 = null ; } super . METHOD_1 ( ) ; TYPE_2 . METHOD_3 ( ) ; }
|
public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { TYPE_1 . METHOD_2 ( VAR_1 ) ; VAR_1 = null ; } super . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void add ( TYPE_1 VAR_1 , java.lang.Class < ? > VAR_2 , java.lang.Object value ) { TYPE_2 . add ( VAR_1 . METHOD_1 ( false ) , VAR_2 . getName ( ) , value ) ; }
|
public static void add ( TYPE_1 VAR_1 , java.lang.Class < ? > VAR_2 , java.lang.Object value ) { TYPE_2 . add ( VAR_1 , VAR_2 . getName ( ) , value ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 message ) { TYPE_2 . METHOD_2 ( VAR_1 , ( STRING_1 + message ) ) ; VAR_2 . METHOD_1 ( message ) ; }
|
public void METHOD_1 ( TYPE_1 message ) { TYPE_2 . METHOD_2 ( VAR_1 , ( STRING_1 + message ) ) ; VAR_2 . METHOD_1 ( message ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int ... params ) { for ( java.lang.Integer param : params ) { this . result += param ; } }
|
public void add ( int ... params ) { for ( java.lang.Integer param : params ) { this . result += param ; } }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( android.content.Intent intent , java.lang.String VAR_1 ) { java.util.List < TYPE_1 > VAR_2 = METHOD_2 ( intent , VAR_1 ) ; METHOD_3 ( VAR_2 , intent , VAR_1 ) ; }
|
private void METHOD_1 ( android.content.Intent intent , java.lang.String VAR_1 ) { java.util.List < TYPE_1 > VAR_2 = METHOD_2 ( intent , VAR_1 ) ; METHOD_3 ( VAR_2 , intent ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , int VAR_2 ) { java.util.Map < TYPE_2 , TYPE_1 > VAR_3 = METHOD_2 ( VAR_2 ) ; return VAR_3 . get ( VAR_1 ) ; }
|
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , int VAR_2 ) { java.util.Map < TYPE_2 , TYPE_1 > VAR_3 = METHOD_2 ( VAR_2 ) ; if ( VAR_3 == null ) { return null ; } return VAR_3 . get ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( TYPE_2 buffer ) { return new TYPE_3 ( ) . METHOD_2 ( ( ( TYPE_4 ) ( buffer ) ) ) ; }
|
public static TYPE_1 METHOD_1 ( TYPE_2 buffer ) { return new TYPE_3 ( ) . METHOD_2 ( buffer ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( java.lang.String value ) { if ( "true" . METHOD_2 ( value ) ) { return VAR_1 ; } if ( "false" . METHOD_2 ( value ) ) { return VAR_2 ; } return TYPE_1 . METHOD_3 ( value ) ; }
|
private TYPE_1 METHOD_1 ( java.lang.String value ) { if ( "true" . METHOD_2 ( value ) ) { return VAR_2 ; } if ( "false" . METHOD_2 ( value ) ) { return VAR_1 ; } return TYPE_1 . METHOD_3 ( value ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( final TYPE_2 VAR_1 , final TYPE_1 VAR_2 ) throws TYPE_3 { return VAR_3 . METHOD_1 ( VAR_2 ) ; }
|
public TYPE_1 METHOD_1 ( final TYPE_1 VAR_2 ) throws TYPE_3 { return event . METHOD_1 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { this . VAR_1 = VAR_1 ; METHOD_2 ( null , 0 , 0 , null ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 != ( this . VAR_1 ) ) { this . VAR_1 = VAR_1 ; METHOD_2 ( null , 0 , 0 , null ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( int x , int y ) { return ( ( x - 1 ) * ( VAR_1 ) ) + y ; }
|
private int METHOD_1 ( int x , int y ) { return ( ( x - 1 ) * ( VAR_1 ) ) + y ; }
|
The following code may contain bugs. Write a refined code without bugs. public static boolean METHOD_1 ( java.lang.String VAR_1 ) { if ( VAR_1 == null ) { return false ; } else if ( VAR_1 . isEmpty ( ) ) { return true ; } return TYPE_1 . METHOD_2 ( VAR_1 ) . METHOD_3 ( ) ; }
|
public static boolean METHOD_1 ( java.lang.String VAR_1 ) { return ( VAR_1 != null ) && ( ( VAR_1 . isEmpty ( ) ) || ( TYPE_1 . METHOD_2 ( VAR_1 ) . METHOD_3 ( ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static synchronized boolean METHOD_1 ( TYPE_1 VAR_1 ) { int VAR_2 = TYPE_2 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( VAR_2 ) ; VAR_3 . add ( VAR_1 ) ; TYPE_2 . METHOD_4 ( ) ; TYPE_3 . METHOD_5 ( VAR_2 ) ; return true ; }
|
public static synchronized int METHOD_1 ( TYPE_1 VAR_1 ) { int VAR_2 = TYPE_2 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( VAR_2 ) ; VAR_3 . add ( VAR_1 ) ; TYPE_2 . METHOD_4 ( ) ; return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. protected synchronized void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( this , STRING_1 , VAR_1 ) . show ( ) ; VAR_2 = new TYPE_2 ( this ) . METHOD_3 ( this ) . METHOD_4 ( this ) . METHOD_5 ( VAR_3 ) . build ( ) ; }
|
protected synchronized void METHOD_1 ( ) { VAR_2 = new TYPE_2 ( this ) . METHOD_3 ( this ) . METHOD_5 ( VAR_3 ) . build ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( VAR_2 ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; }
|
public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( VAR_2 ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( new java.util.ArrayList < TYPE_1 > ( ) ) ; TYPE_2 . METHOD_3 ( STRING_1 , STRING_2 ) ; }
|
protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( new java.util.ArrayList < TYPE_1 > ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { VAR_1 = ( VAR_2 . METHOD_2 ( INT_1 ) ) + 1 ; return VAR_1 ; }
|
public int METHOD_1 ( ) { return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { this . VAR_1 = METHOD_2 ( ) . METHOD_3 ( new TYPE_1 ( this ) ) ; VAR_1 . METHOD_4 ( this ) ; TYPE_2 . METHOD_5 ( VAR_2 , ( STRING_1 + ( VAR_3 . toString ( ) ) ) ) ; }
|
private void METHOD_1 ( ) { this . VAR_1 = METHOD_2 ( ) . METHOD_3 ( new TYPE_1 ( this ) ) ; VAR_1 . METHOD_4 ( this ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private static void METHOD_1 ( ) { java.lang.System.out.print ( STRING_1 ) ; java.lang.System.exit ( 0 ) ; }
|
public void METHOD_1 ( ) { java.lang.System.out.print ( STRING_1 ) ; java.lang.System.exit ( 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected java.lang.String METHOD_1 ( TYPE_1 response ) { java.lang.String VAR_1 = TYPE_2 . METHOD_2 ( VAR_2 ) ; return VAR_1 == null ? STRING_1 : VAR_1 ; }
|
protected java.lang.String METHOD_1 ( TYPE_1 response ) { return null ; }
|
The following code may contain bugs. Write a refined code without bugs. private static void METHOD_1 ( final TYPE_1 VAR_1 , final boolean value ) { try { VAR_1 . METHOD_2 ( VAR_2 , value ) ; } catch ( TYPE_2 VAR_3 ) { throw new TYPE_3 ( STRING_1 ) ; } }
|
private static void METHOD_1 ( final TYPE_1 VAR_1 , final boolean value ) { try { VAR_1 . METHOD_2 ( VAR_2 , value ) ; } catch ( TYPE_2 VAR_3 ) { throw new TYPE_3 ( STRING_1 , VAR_3 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.io.IOException { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( INT_1 , STRING_2 ) ; METHOD_4 ( ) ; } }
|
public void METHOD_1 ( ) throws java.io.IOException { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( INT_1 , STRING_2 ) ; } METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 response ) { response . METHOD_2 ( VAR_1 , STRING_1 ) ; }
|
private void METHOD_1 ( TYPE_1 response ) { }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int VAR_1 ) { int VAR_2 = VAR_1 / ( VAR_3 ) ; TYPE_1 VAR_4 = this . VAR_5 [ VAR_2 ] ; return VAR_4 ; }
|
private TYPE_1 METHOD_1 ( int VAR_1 ) { int VAR_2 = VAR_1 / ( VAR_3 ) ; TYPE_1 VAR_4 = this . VAR_5 [ VAR_2 ] ; return VAR_4 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View view ) { VAR_1 . METHOD_2 ( VAR_2 , VAR_3 , null , VAR_4 ) ; METHOD_3 ( ) ; }
|
public void METHOD_1 ( android.view.View view ) { VAR_1 . METHOD_2 ( VAR_2 , VAR_3 , null , VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = true ; METHOD_2 ( VAR_2 . get ( 0 ) ) ; }
|
public void METHOD_1 ( ) { VAR_1 = true ; METHOD_2 ( VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int position ) { METHOD_2 ( VAR_1 , position , VAR_2 . get ( position ) ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 , int position ) { METHOD_2 ( VAR_1 , position , ( ( VAR_2 . size ( ) ) > position ? VAR_2 . get ( position ) : null ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { ( ( TYPE_2 ) ( VAR_2 ) ) . METHOD_2 ( ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( boolean VAR_1 ) { this . VAR_1 = VAR_1 ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_2 ( ) ; } }
|
public void METHOD_1 ( boolean VAR_1 ) { this . VAR_1 = VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void setText ( java.lang.String text ) { text = text ; }
|
public void setText ( java.lang.String text ) { this . text = text ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( char c ) { switch ( c ) { case CHAR_1 : return VAR_1 ; case CHAR_2 : return VAR_2 ; case CHAR_3 : return VAR_3 ; case CHAR_4 : return VAR_4 ; } return VAR_5 ; }
|
public static TYPE_1 METHOD_1 ( char c ) { switch ( c ) { case CHAR_1 : return VAR_1 ; case CHAR_2 : return VAR_2 ; case CHAR_3 : return VAR_3 ; case CHAR_4 : return VAR_4 ; default : return null ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 event ) { state [ 0 ] = event . METHOD_2 ( ) ; VAR_1 . set ( true ) ; }
|
public void METHOD_1 ( TYPE_1 event ) { synchronized ( VAR_1 ) { state [ 0 ] = event . METHOD_2 ( ) ; VAR_1 . set ( true ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { METHOD_2 ( VAR_1 ) ; } if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( ) ; } VAR_3 . METHOD_4 ( VAR_4 ) ; }
|
private void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { METHOD_2 ( VAR_1 ) ; } if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { int VAR_3 = ( VAR_4 ) | ( VAR_5 ) ; int VAR_6 = ( VAR_7 ) | ( VAR_8 ) ; return METHOD_2 ( VAR_3 , VAR_6 ) ; }
|
public int METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { int VAR_3 = ( VAR_4 ) | ( VAR_5 ) ; int VAR_6 = VAR_7 ; return METHOD_2 ( VAR_3 , VAR_6 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void init ( ) { TYPE_1 . METHOD_1 ( this ) ; VAR_1 = new java.util.ArrayList < > ( ) ; METHOD_2 ( ) ; }
|
public void init ( ) { TYPE_1 . METHOD_1 ( this ) ; METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float VAR_1 , float VAR_2 ) { VAR_3 . add ( ( VAR_1 * ( VAR_4 ) ) , ( VAR_2 * ( VAR_4 ) ) ) ; VAR_3 . update ( ) ; }
|
public void METHOD_1 ( float VAR_1 , float VAR_2 ) { VAR_3 . add ( VAR_1 , VAR_2 ) ; VAR_3 . update ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 [ VAR_2 ] [ VAR_3 ] ; }
|
public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 [ VAR_3 ] [ VAR_2 ] ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { this . VAR_1 = VAR_1 ; this . VAR_2 . METHOD_1 ( this . VAR_1 ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { this . VAR_2 . METHOD_1 ( this . VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.lang.String VAR_1 ) { for ( java.lang.String key : VAR_2 . METHOD_2 ( ) ) { if ( VAR_1 . equals ( key ) ) return true ; } return false ; }
|
private boolean METHOD_1 ( java.lang.String VAR_1 ) { for ( java.lang.String key : VAR_2 . METHOD_2 ( ) ) { if ( VAR_1 . equals ( key ) ) return true ; } return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { if ( ( VAR_1 . getId ( ) ) == ( VAR_2 ) ) { VAR_3 . METHOD_2 ( VAR_4 ) ; VAR_5 . start ( ) ; } }
|
public void METHOD_1 ( android.view.View VAR_1 ) { if ( ( VAR_1 . getId ( ) ) == ( VAR_2 ) ) { VAR_3 . METHOD_2 ( VAR_4 ) ; VAR_3 . setEnabled ( false ) ; VAR_5 . start ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int VAR_1 ) { METHOD_2 ( ) ; TYPE_1 VAR_2 = new TYPE_1 ( getContext ( ) , VAR_3 ) ; return VAR_2 ; }
|
public TYPE_1 METHOD_1 ( int VAR_1 ) { METHOD_2 ( ) ; TYPE_1 VAR_2 = new TYPE_1 ( getActivity ( ) , VAR_3 ) ; return VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int value , int offset ) { return METHOD_2 ( new int [ ] { value } , new int [ ] { 1 } , new int [ ] { 1 } , offset ) ; }
|
public TYPE_1 METHOD_1 ( int value , int offset ) { return METHOD_2 ( new int [ ] { value } , new int [ ] { 1 , 1 } , new int [ ] { 1 , 1 } , offset ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 event ) { METHOD_2 ( ) ; return false ; }
|
public boolean METHOD_1 ( TYPE_1 event ) { return false ; }
|
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 ) { java.util.List < TYPE_1 > result = new java.util.ArrayList < TYPE_1 > ( ) ; METHOD_2 ( VAR_1 , result ) ; return result ; }
|
public java.util.List < TYPE_1 > METHOD_1 ( java.lang.String VAR_1 ) { return METHOD_1 ( VAR_1 , "\t" ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public long METHOD_1 ( long VAR_1 ) { return VAR_1 / ( ( VAR_2 . k ) / ( VAR_2 . b ) ) ; }
|
public double METHOD_1 ( double VAR_1 ) { return VAR_1 / ( ( VAR_2 . k ) / ( VAR_2 . b ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( double VAR_1 ) { this . VAR_1 = VAR_1 ; }
|
public void METHOD_1 ( double VAR_1 ) { this . VAR_1 = VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { TYPE_2 . METHOD_2 ( ) . METHOD_3 ( this . VAR_1 ) ; return this . VAR_2 . METHOD_1 ( this . VAR_1 ) ; }
|
public TYPE_1 METHOD_1 ( ) { TYPE_1 result = this . VAR_2 . METHOD_1 ( this . VAR_1 ) ; TYPE_2 . METHOD_2 ( ) . METHOD_3 ( this . VAR_1 ) ; return result ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { METHOD_2 ( VAR_1 , VAR_2 ) ; VAR_1 . METHOD_3 ( ) ; METHOD_4 ( VAR_3 , VAR_2 ) ; METHOD_2 ( VAR_3 , VAR_2 ) ; return VAR_3 ; }
|
public TYPE_1 METHOD_1 ( ) { METHOD_4 ( VAR_3 , VAR_2 ) ; METHOD_2 ( VAR_3 , VAR_2 ) ; return VAR_3 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) ; TYPE_2 . METHOD_3 ( ) ; }
|
public void METHOD_1 ( ) { TYPE_2 . METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean equals ( java.lang.Object field ) { return ( ( TYPE_1 ) ( field ) ) . value . equals ( value ) ; }
|
public boolean equals ( java.lang.Object field ) { if ( ! ( field instanceof TYPE_1 ) ) return false ; return ( ( TYPE_1 ) ( field ) ) . value . equals ( value ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 msg ) { VAR_1 . METHOD_2 ( ( ( TYPE_2 ) ( new TYPE_3 ( ) ) ) ) ; }
|
public void METHOD_1 ( TYPE_1 msg ) { VAR_1 . METHOD_2 ( new TYPE_3 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( java.lang.Long VAR_1 ) { return VAR_2 . METHOD_1 ( VAR_1 ) ; }
|
public java.util.List < TYPE_1 > METHOD_1 ( java.lang.String VAR_1 ) { return VAR_2 . METHOD_1 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 tmp ( TYPE_2 VAR_1 ) { return VAR_2 . set ( VAR_1 ) ; }
|
public static TYPE_1 tmp ( TYPE_2 VAR_1 ) { return VAR_2 . get ( ) . set ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { if ( VAR_1 != null ) { TYPE_1 VAR_2 = TYPE_1 . METHOD_2 ( getContext ( ) . METHOD_3 ( ) , ( STRING_1 + VAR_1 ) ) ; METHOD_4 ( VAR_2 ) ; this . VAR_3 = VAR_1 ; } }
|
public void METHOD_1 ( java.lang.String VAR_1 ) { if ( VAR_1 != null ) { TYPE_1 VAR_2 = TYPE_1 . METHOD_2 ( getContext ( ) . METHOD_3 ( ) , ( STRING_1 + VAR_1 ) ) ; METHOD_4 ( VAR_2 ) ; VAR_3 = VAR_1 ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { text ( ( ( STRING_1 + VAR_1 ) + STRING_2 ) ) ; }
|
public void METHOD_1 ( java.lang.String VAR_1 ) { text ( ( VAR_1 + STRING_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( int x , int y ) { return ( VAR_1 [ x ] [ y ] ) == null ; }
|
public boolean METHOD_1 ( int x , int y ) { return ( VAR_1 [ x ] [ y ] ) != null ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( int i , int j ) { return ( ( VAR_1 [ METHOD_2 ( i , j ) ] ) == 1 ) && ( ! ( VAR_2 . METHOD_3 ( 0 , METHOD_4 ( i , j ) ) ) ) ; }
|
public boolean METHOD_1 ( int i , int j ) { return ( VAR_1 [ METHOD_2 ( i , j ) ] ) == 1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 item ) { switch ( item . METHOD_2 ( ) ) { case VAR_2 : { VAR_3 . METHOD_3 ( ) ; VAR_4 . METHOD_4 ( ) ; } default : { return false ; } } }
|
public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 item ) { switch ( item . METHOD_2 ( ) ) { case VAR_2 : { VAR_3 . METHOD_3 ( ) ; VAR_4 . METHOD_4 ( ) ; return true ; } default : { return false ; } } }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) . METHOD_3 ( ) ; super . METHOD_1 ( ) ; METHOD_4 ( new android.content.Intent ( this , VAR_1 class ) ) ; TYPE_1 . METHOD_2 ( ) . METHOD_1 ( ) ; }
|
protected void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( ) . METHOD_3 ( ) ; super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( ) . METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , TYPE_3 VAR_3 ) { VAR_1 . METHOD_2 ( new TYPE_4 ( VAR_2 ) ) ; VAR_1 . METHOD_3 ( VAR_3 ) ; VAR_3 . METHOD_4 ( new TYPE_5 ( VAR_2 ) ) ; }
|
private void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , TYPE_3 VAR_3 ) { VAR_1 . METHOD_2 ( new TYPE_4 ( VAR_2 , this ) ) ; VAR_1 . METHOD_3 ( VAR_3 ) ; VAR_3 . METHOD_4 ( new TYPE_5 ( VAR_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( ) ; }
|
public int METHOD_1 ( ) { return ( TYPE_1 . METHOD_2 ( ) ) + 1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void update ( ) { java.util.ArrayList < java.lang.String > VAR_1 = TYPE_1 . METHOD_1 ( ) ; VAR_2 . METHOD_2 ( ) ; }
|
public void update ( ) { VAR_1 = TYPE_1 . METHOD_1 ( ) ; VAR_2 . METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { int response = TYPE_2 . METHOD_2 ( VAR_2 , STRING_1 , STRING_2 , VAR_3 ) ; if ( response == ( VAR_4 ) ) { VAR_2 . METHOD_3 ( ) ; } }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { int response = TYPE_2 . METHOD_2 ( VAR_2 , STRING_1 , STRING_2 , VAR_3 ) ; if ( response == ( VAR_4 ) ) { VAR_2 . METHOD_3 ( ) ; java.lang.System.exit ( 0 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.Throwable VAR_1 ) { VAR_1 . METHOD_2 ( ) ; TYPE_1 . METHOD_3 ( VAR_2 . METHOD_4 ( ) ) ; METHOD_5 ( TYPE_2 . METHOD_6 ( VAR_3 ) ) ; }
|
public void METHOD_1 ( java.lang.Throwable VAR_1 ) { VAR_1 . METHOD_2 ( ) ; TYPE_1 . METHOD_3 ( VAR_2 . METHOD_4 ( ) ) ; METHOD_5 ( TYPE_2 . METHOD_6 ( VAR_2 , VAR_3 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 param ) { for ( java.lang.Class < ? > VAR_1 : param . value ( ) ) { if ( ! ( context . METHOD_2 ( VAR_1 . getName ( ) ) ) ) { return true ; } } return true ; }
|
public boolean METHOD_1 ( TYPE_1 param ) { for ( java.lang.Class < ? > VAR_1 : param . value ( ) ) { if ( ! ( context . METHOD_2 ( VAR_1 . getName ( ) ) ) ) { return false ; } } return true ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( int VAR_1 ) { return ( VAR_2 [ VAR_1 ] ) && ( VAR_3 [ VAR_1 ] ) ; }
|
public boolean METHOD_1 ( int VAR_1 ) { return ( ! ( VAR_2 [ VAR_1 ] ) ) && ( VAR_3 [ VAR_1 ] ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object METHOD_1 ( ) { return TYPE_1 . get ( obj , ( ( index ) ++ ) ) ; }
|
public java.lang.Object METHOD_1 ( ) { return TYPE_1 . get ( obj , ( ( this . index ) ++ ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 item ) { TYPE_2 values = METHOD_2 ( item ) ; VAR_1 . METHOD_3 ( VAR_2 , null , values ) ; }
|
public boolean METHOD_1 ( TYPE_1 item ) { TYPE_2 values = METHOD_2 ( item ) ; return ( VAR_1 . METHOD_3 ( VAR_2 , null , values ) ) > 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 event ) { VAR_1 = new TYPE_2 ( this , VAR_2 ) ; VAR_1 . METHOD_2 ( ) ; VAR_3 = new TYPE_3 ( this , VAR_2 ) ; VAR_3 . init ( ) ; }
|
public void METHOD_1 ( TYPE_1 event ) { VAR_1 = new TYPE_2 ( this , VAR_2 ) ; VAR_1 . METHOD_2 ( ) ; VAR_3 = new TYPE_3 ( this , VAR_2 ) ; VAR_3 . METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private static boolean METHOD_1 ( android.content.Context context ) { return TYPE_1 . METHOD_2 ( context ) . getBoolean ( STRING_1 , true ) ; }
|
public static boolean METHOD_1 ( android.content.Context context ) { return TYPE_1 . METHOD_2 ( context ) . getBoolean ( STRING_1 , true ) ; }
|
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_3 . METHOD_2 ( ) ; } else { METHOD_3 ( ) ; METHOD_4 ( ) ; java.lang.System.exit ( 0 ) ; } }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_2 ) != null ) { VAR_3 . METHOD_2 ( ) ; } else { METHOD_3 ( ) ; java.lang.System.exit ( 0 ) ; } METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static boolean METHOD_1 ( java.lang.Integer VAR_1 ) { return VAR_1 > 0 ; }
|
public static boolean METHOD_1 ( java.lang.Integer VAR_1 ) { return VAR_1 >= 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { java.lang.System.out.println ( STRING_1 ) ; VAR_2 . METHOD_2 ( ) ; VAR_3 = ! ( VAR_3 ) ; TYPE_2 . METHOD_3 ( ) ; VAR_4 . setText ( ( STRING_2 + ( VAR_3 ) ) ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( ) ; VAR_3 = ! ( VAR_3 ) ; TYPE_2 . METHOD_3 ( ) ; VAR_4 . setText ( ( STRING_2 + ( VAR_3 ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void start ( ) { if ( VAR_1 . METHOD_1 ( false , true ) ) { METHOD_2 ( ) ; } }
|
public void start ( ) { if ( VAR_1 . METHOD_1 ( false , true ) ) { super . start ( ) ; METHOD_2 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( boolean VAR_1 ) { this . VAR_1 = VAR_1 ; if ( VAR_1 ) { this . VAR_2 = VAR_3 ; } else { this . VAR_2 = VAR_4 ; } }
|
public void METHOD_1 ( boolean VAR_1 ) { this . VAR_1 = VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { VAR_1 . METHOD_2 ( VAR_2 ) ; }
|
public void METHOD_1 ( ) throws java.lang.Exception { }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_1 . METHOD_2 ( message ) ; }
|
private void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_1 . METHOD_2 ( true ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( TYPE_2 . METHOD_2 ( 1 ) ) ; query ( VAR_1 ) ; assertThat ( VAR_2 . METHOD_3 ( ) , TYPE_3 . METHOD_4 ( INT_1 ) ) ; }
|
public void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( TYPE_2 . METHOD_2 ( 1 ) ) ; query ( VAR_1 ) ; assertThat ( VAR_2 . METHOD_3 ( ) , METHOD_4 ( INT_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 , int VAR_3 , int VAR_4 , java.lang.String VAR_5 ) ;
|
void METHOD_1 ( TYPE_1 VAR_1 , int VAR_3 , int VAR_4 , java.lang.String VAR_5 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { this . VAR_1 = VAR_1 ; this . VAR_2 &= METHOD_2 ( ) ; this . VAR_3 &= METHOD_2 ( ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 ) { this . VAR_1 = VAR_1 ; this . VAR_2 &= METHOD_2 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < java.lang.Object > METHOD_1 ( ) { java.util.Set < java.lang.Object > value = getValue ( ) ; if ( value == null ) { return null ; } return TYPE_1 . METHOD_2 ( value ) ; }
|
public java.util.List < java.lang.Object > METHOD_1 ( ) { java.util.Set < java.lang.Object > value = getValue ( ) ; if ( value == null ) { return null ; } return TYPE_1 . METHOD_2 ( ( ( java.lang.Object ) ( value ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , TYPE_3 VAR_3 ) throws TYPE_4 , java.io.IOException , TYPE_5 ;
|
void METHOD_1 ( TYPE_1 VAR_1 , TYPE_3 VAR_3 ) throws TYPE_4 , java.io.IOException , TYPE_5 ;
|
The following code may contain bugs. Write a refined code without bugs. void state ( TYPE_1 state ) { this . state = state ; METHOD_1 ( ) ; }
|
void state ( TYPE_1 state ) { this . state = state ; count . set ( 0 ) ; METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( ++ ( VAR_1 ) ) == INT_1 ) { java.lang.System.out.println ( STRING_1 ) ; TYPE_1 . METHOD_2 ( ) ; try { TYPE_2 . METHOD_3 ( ) ; } finally { TYPE_1 . METHOD_4 ( ) ; } } }
|
public void METHOD_1 ( ) { if ( ( ++ ( VAR_1 ) ) == INT_1 ) { TYPE_1 . METHOD_2 ( ) ; try { TYPE_2 . METHOD_3 ( ) ; } finally { TYPE_1 . METHOD_4 ( ) ; } } }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { if ( VAR_1 ) { METHOD_2 ( ) ; return STRING_1 + ( VAR_2 ) ; } else { return STRING_2 ; } }
|
public java.lang.String METHOD_1 ( ) { if ( VAR_1 ) { METHOD_2 ( ) ; return VAR_2 ; } else { return STRING_2 ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int x ) { java.lang.System.out.println ( java.lang.String.format ( STRING_1 , x ) ) ; this . x = x ; }
|
public void METHOD_1 ( int x ) { this . x = x ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 ) { if ( ( ++ ( VAR_2 ) ) == ( data . length ) ) VAR_2 = 0 ; data [ VAR_2 ] = VAR_1 ; VAR_3 = true ; }
|
public void METHOD_1 ( int VAR_1 ) { data [ VAR_2 ] = VAR_1 ; if ( ( VAR_2 ) == ( ( data . length ) - 1 ) ) VAR_2 = 0 ; else ( VAR_2 ) ++ ; VAR_3 = true ; }
|
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 ) { java.lang.System.out.println ( STRING_1 ) ; METHOD_2 ( VAR_1 , VAR_2 , VAR_1 . METHOD_3 ( VAR_2 ) , VAR_3 ) ; }
|
public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , TYPE_3 VAR_3 ) { METHOD_2 ( VAR_1 , VAR_2 , VAR_1 . METHOD_3 ( VAR_2 ) , VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = new TYPE_2 ( ) ; java.lang.Integer result = VAR_1 . METHOD_2 ( STRING_1 ) ; TYPE_3 . assertEquals ( new java.lang.Integer ( 0 ) , result ) ; }
|
public void METHOD_1 ( ) throws java.lang.Exception { java.lang.Integer result = VAR_1 . METHOD_2 ( STRING_1 ) ; assertEquals ( new java.lang.Integer ( 0 ) , result ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.util.List < TYPE_1 > VAR_1 ) { if ( VAR_1 . isEmpty ( ) ) { METHOD_2 ( ) . METHOD_3 ( ) ; } else { METHOD_2 ( ) . METHOD_4 ( VAR_1 ) ; } }
|
public void METHOD_1 ( java.util.List < TYPE_1 > VAR_1 ) { if ( VAR_1 . isEmpty ( ) ) { METHOD_2 ( ) . METHOD_3 ( VAR_1 ) ; } else { METHOD_2 ( ) . METHOD_4 ( VAR_1 ) ; } }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.