input
stringlengths
96
415
output
stringlengths
18
303
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { if ( ( VAR_2 ) != null ) VAR_2 . METHOD_2 ( ) ; METHOD_3 ( ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { VAR_2 . add ( VAR_1 ) ; return this ; }
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { if ( VAR_1 != null ) { VAR_2 . add ( VAR_1 ) ; } return this ; }
The following code may contain bugs. Write a refined code without bugs. protected float METHOD_1 ( ) { return this . VAR_1 ; }
public float METHOD_1 ( ) { return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public double [ ] METHOD_1 ( ) { return this . VAR_1 ; }
public double [ ] METHOD_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 = new TYPE_1 ( null ) ; VAR_2 . METHOD_2 ( ) ; }
public static void METHOD_1 ( android.content.Context context ) { TYPE_1 VAR_1 = new TYPE_1 ( context ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_2 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { java.lang.String a ; java.util.Scanner VAR_1 = new java.util.Scanner ( VAR_2 ) ; a = VAR_1 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( ) ; return a ; }
public java.lang.String METHOD_1 ( java.util.Scanner VAR_1 ) { java.lang.String a ; a = VAR_1 . METHOD_2 ( ) ; return a ; }
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( TYPE_1 < TYPE_2 > VAR_1 ) { return ! ( ( java.lang.Integer.parseInt ( VAR_1 . toString ( ) ) ) < INT_1 ) ; }
private boolean METHOD_1 ( TYPE_1 < TYPE_2 > VAR_1 ) { return ( java.lang.Integer.parseInt ( VAR_1 . toString ( ) ) ) < INT_1 ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { java.util.List < java.lang.String > VAR_1 = METHOD_2 ( ) ; return VAR_1 . get ( new java.util.Random ( ) . METHOD_3 ( VAR_1 . size ( ) ) ) ; }
public java.lang.String METHOD_1 ( ) { return METHOD_2 ( 1 ) . get ( 0 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 element ) { METHOD_1 ( element , VAR_1 . size ( ) ) ; }
public void METHOD_1 ( TYPE_1 element ) { int index = VAR_1 . size ( ) ; index = ( VAR_1 . contains ( element ) ) ? index : index - 1 ; METHOD_1 ( element , index ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { VAR_1 = VAR_2 . data ; if ( ( VAR_2 ) != ( VAR_3 ) ) { VAR_2 = VAR_4 ; } VAR_5 = null ; return VAR_1 ; }
public TYPE_1 METHOD_1 ( ) { VAR_1 = VAR_2 . data ; if ( ( VAR_2 ) != ( VAR_3 ) ) { VAR_2 = VAR_4 ; VAR_5 = null ; } else { VAR_2 = null ; } ( size ) -- ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return this . METHOD_2 ( ) . contains ( VAR_1 ) ; }
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( ( this . METHOD_2 ( ) ) == null ) || ( ! ( this . METHOD_2 ( ) . contains ( VAR_1 ) ) ) ) { return false ; } else { return true ; } }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < java.lang.Integer > METHOD_1 ( java.lang.String string , java.lang.Class < java.lang.Integer > VAR_1 ) { VAR_2 = VAR_3 . METHOD_2 ( ) ; return VAR_2 . METHOD_1 ( string , VAR_1 ) ; }
public TYPE_1 < java.lang.Integer > METHOD_1 ( java.lang.String string , java.lang.Class < java.lang.Integer > VAR_1 ) { return VAR_2 . METHOD_1 ( string , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 VAR_2 ; if ( null != ( VAR_2 = VAR_3 . get ( VAR_1 ) ) ) return VAR_2 ; return new TYPE_1 ( null , null , null , VAR_1 ) ; }
private TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 VAR_2 ; if ( null != ( VAR_2 = VAR_3 . get ( VAR_1 ) ) ) return VAR_2 ; return new TYPE_1 ( null , null , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception { VAR_1 . METHOD_2 ( ) . METHOD_3 ( STRING_1 , STRING_2 , STRING_3 , STRING_4 , STRING_5 , STRING_6 , STRING_7 , STRING_8 , STRING_9 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception { VAR_1 . METHOD_2 ( ) . METHOD_3 ( STRING_1 , STRING_2 , STRING_3 , STRING_4 , STRING_7 , STRING_8 , STRING_9 ) ; }
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( java.lang.String VAR_1 ) { boolean VAR_2 = TYPE_1 . METHOD_2 ( VAR_1 ) ; if ( VAR_2 == true ) { return STRING_1 ; } else { return STRING_2 ; } }
private java.lang.String METHOD_1 ( java.lang.String VAR_1 ) { boolean VAR_2 = TYPE_1 . METHOD_2 ( VAR_1 ) ; if ( VAR_2 ) { return STRING_1 ; } else { return STRING_2 ; } }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( byte [ ] result ) { VAR_1 . METHOD_2 ( ) ; android.content.Intent intent = new android.content.Intent ( METHOD_3 ( ) , VAR_2 class ) ; VAR_3 = result ; METHOD_4 ( intent ) ; }
protected void METHOD_1 ( byte [ ] result ) { android.content.Intent intent = new android.content.Intent ( METHOD_3 ( ) , VAR_2 class ) ; VAR_3 = result ; METHOD_4 ( intent ) ; VAR_1 . METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_2 = VAR_1 ; }
protected void METHOD_1 ( final 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 ( ) throws java.lang.Exception { METHOD_2 ( ( ( long ) ( ( INT_1 < < INT_2 ) * FLOAT_1 ) ) , STRING_1 ) ; }
public void METHOD_1 ( ) throws java.lang.Exception { METHOD_2 ( ( ( long ) ( ( 1L < < INT_2 ) * FLOAT_1 ) ) , STRING_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( double VAR_1 ) { if ( ( ( VAR_1 + ( VAR_2 ) ) + ( VAR_3 ) ) == 1 ) { } else throw new TYPE_1 ( STRING_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 void METHOD_1 ( final TYPE_1 VAR_1 ) { if ( ! ( VAR_2 . get ( VAR_1 . getId ( ) ) ) ) { VAR_2 . set ( VAR_1 . getId ( ) ) ; VAR_3 . add ( VAR_1 ) ; } }
public void METHOD_1 ( final java.util.Collection VAR_1 ) { if ( ! ( VAR_2 . get ( VAR_1 . getId ( ) ) ) ) { VAR_2 . set ( VAR_1 . getId ( ) ) ; VAR_3 . add ( VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. private synchronized void METHOD_1 ( ) throws java.io.IOException { TYPE_1 VAR_1 = METHOD_2 ( ) ; if ( VAR_1 . METHOD_3 ( ) ) { VAR_1 . METHOD_4 ( this ) ; } }
private synchronized void METHOD_1 ( ) throws java.io.IOException { final TYPE_1 VAR_1 = METHOD_2 ( ) ; if ( ( VAR_1 != null ) && ( VAR_1 . METHOD_3 ( ) ) ) { VAR_1 . METHOD_4 ( this ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( ) ; VAR_2 . METHOD_4 ( ) ; VAR_3 . info ( STRING_1 ) ; VAR_2 . METHOD_5 ( ) ; }
public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( ) ; VAR_3 . info ( STRING_1 ) ; VAR_2 . METHOD_5 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.CharSequence VAR_1 , int start , int VAR_2 , int count ) { VAR_3 = VAR_4 . getText ( ) . toString ( ) ; TYPE_1 . METHOD_2 ( STRING_1 , VAR_3 ) ; }
public void METHOD_1 ( java.lang.CharSequence VAR_1 , int start , int VAR_2 , int count ) { VAR_3 = VAR_4 . getText ( ) . toString ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { android.content.Intent intent = new android.content.Intent ( ) ; intent . METHOD_2 ( STRING_1 , VAR_3 ) ; METHOD_3 ( VAR_4 , intent ) ; METHOD_4 ( ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { METHOD_4 ( ) ; }
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 VAR_2 = ( ( TYPE_2 ) ( VAR_1 ) ) ; java.io.File file = new java.io.File ( STRING_1 ) ; VAR_2 . METHOD_2 ( file ) ; }
public void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; TYPE_2 VAR_2 = ( ( TYPE_2 ) ( VAR_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { if ( VAR_1 . METHOD_2 ( ) ) VAR_1 . METHOD_3 ( ) ; super . METHOD_1 ( ) ; }
protected void METHOD_1 ( ) { if ( ( ( VAR_1 ) != null ) && ( VAR_1 . METHOD_2 ( ) ) ) VAR_1 . METHOD_3 ( ) ; super . METHOD_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 , int height ) { METHOD_2 ( VAR_2 , height ) ; METHOD_3 ( ) ; METHOD_4 ( ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 , int height ) { METHOD_2 ( VAR_2 , height ) ; METHOD_4 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return ( VAR_1 ) + ( VAR_2 ? 1 : 0 ) ; }
public int METHOD_1 ( ) { return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void remove ( TYPE_1 x ) { VAR_1 . remove ( x ) ; }
public synchronized void add ( TYPE_1 x ) { VAR_1 . put ( x , 1 ) ; }
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( java.io.File file ) { try { return file . METHOD_2 ( ) . equals ( file . METHOD_3 ( ) ) ; } catch ( java.io.IOException VAR_1 ) { return true ; } }
private static boolean METHOD_1 ( java.io.File file ) { try { return ! ( file . METHOD_2 ( ) . equals ( file . METHOD_3 ( ) ) ) ; } catch ( java.io.IOException VAR_1 ) { return true ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( ) ; TYPE_2 . METHOD_3 ( METHOD_4 ( ) , VAR_1 . METHOD_5 ( ) , VAR_3 ) . show ( ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 . METHOD_3 ( METHOD_4 ( ) , VAR_1 . METHOD_5 ( ) , VAR_3 ) . show ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 == null ) { throw new java.lang.NullPointerException ( STRING_1 ) ; } return VAR_1 . getName ( ) ; }
public java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 != null ) { return VAR_1 . getName ( ) ; } throw new java.lang.NullPointerException ( STRING_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) throws java.io.IOException { VAR_1 = new TYPE_1 ( ) ; TYPE_2 . METHOD_1 ( ) ; }
public static void main ( java.lang.String [ ] args ) throws java.io.IOException { TYPE_2 . METHOD_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. private void set ( ) { if ( ( VAR_1 [ 0 ] ) != ( - 1 ) ) { VAR_2 . METHOD_1 ( VAR_3 , VAR_4 , VAR_5 , VAR_6 , VAR_1 ) ; } }
private void set ( ) { if ( ( VAR_1 [ 0 ] ) != ( - 1 ) ) { VAR_2 . METHOD_1 ( VAR_3 , VAR_4 , ( ( VAR_5 ) - 1 ) , VAR_6 , VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( ) ; VAR_1 = INT_1 ; VAR_2 = ( ( byte ) ( INT_2 ) ) ; }
public void METHOD_1 ( ) { METHOD_2 ( ) ; VAR_1 = INT_1 ; VAR_2 = INT_2 ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { if ( ( ( VAR_1 . size ( ) ) % INT_1 ) == 0 ) return ( VAR_1 . size ( ) ) / INT_1 ; else return ( ( VAR_1 . size ( ) ) / INT_1 ) + 1 ; }
public int METHOD_1 ( ) { return VAR_1 . size ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_3 [ 0 ] . METHOD_1 ( VAR_4 , VAR_5 ) ; VAR_1 . status = VAR_6 ; VAR_7 . METHOD_2 ( ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_3 [ 0 ] . METHOD_1 ( VAR_4 , VAR_5 ) ; VAR_1 . status = VAR_6 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; METHOD_3 ( ) ; while ( ! ( VAR_1 . METHOD_4 ( ) ) ) ; VAR_2 . set ( false ) ; }
public void METHOD_1 ( ) { VAR_2 . set ( false ) ; METHOD_3 ( ) ; VAR_1 . METHOD_2 ( ) ; while ( ! ( VAR_1 . METHOD_4 ( ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected static void METHOD_1 ( int VAR_1 ) { TYPE_1 . METHOD_2 ( VAR_1 ) ; TYPE_2 . METHOD_3 ( VAR_1 ) ; }
protected static void METHOD_1 ( int VAR_1 ) { TYPE_1 . METHOD_2 ( VAR_1 ) ; TYPE_2 . METHOD_3 ( VAR_1 , false ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , java.util.List < TYPE_1 > VAR_3 ) { java.lang.System.out.println ( STRING_1 ) ; METHOD_2 ( ) . METHOD_3 ( VAR_1 , VAR_2 , VAR_3 ) ; }
public void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , java.util.List < TYPE_1 > VAR_3 ) { METHOD_2 ( ) . METHOD_3 ( VAR_1 , VAR_2 , VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ( ( byte ) ( 0 ) ) , false , false , VAR_1 . count ( ) ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ( ( byte ) ( 0 ) ) , true , false , VAR_1 . count ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void addComponent ( final java.lang.String VAR_1 , final TYPE_1 VAR_2 ) { VAR_3 . put ( VAR_1 , VAR_2 ) ; }
public void addComponent ( final java.lang.String VAR_1 , final TYPE_1 VAR_2 ) { final java.util.Map < java.lang.String , TYPE_1 > VAR_3 = new java.util.HashMap ( this . VAR_3 ) ; VAR_3 . put ( VAR_1 , VAR_2 ) ; this . VAR_3 = VAR_3 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( VAR_1 ) { getActivity ( ) . METHOD_2 ( ) ; } VAR_2 = null ; METHOD_3 ( VAR_3 ) ; METHOD_4 ( ) ; METHOD_5 ( true ) ; }
public void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_2 = null ; if ( VAR_1 ) { getActivity ( ) . METHOD_2 ( ) ; } METHOD_3 ( VAR_3 ) ; METHOD_4 ( ) ; METHOD_5 ( true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 , java.util.Date date , java.lang.String message ) { METHOD_1 ( new TYPE_1 ( this . VAR_1 , VAR_1 , date , message ) ) ; }
public void METHOD_1 ( java.lang.String VAR_1 , java.util.Date date , java.lang.String message ) { METHOD_1 ( new TYPE_1 ( VAR_1 , this . VAR_1 , date , message ) ) ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( int i ) { int x = this . array [ i ] ; }
void METHOD_1 ( int i ) { int x = array [ i ] ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; VAR_2 = new TYPE_2 ( VAR_3 . METHOD_2 ( STRING_1 ) ) ; VAR_1 . add ( STRING_2 , VAR_2 ) ; }
public static void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { int VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; this . METHOD_1 ( VAR_4 , VAR_2 . METHOD_2 ( VAR_1 ) ) ; }
public void METHOD_1 ( ) { int VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; this . METHOD_1 ( VAR_4 , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( ) { VAR_1 . METHOD_2 ( 0 , true ) ; VAR_1 . METHOD_2 ( VAR_2 , true ) ; VAR_1 . METHOD_3 ( VAR_2 , VAR_3 ) ; VAR_1 . METHOD_4 ( VAR_3 ) ; }
public static void METHOD_1 ( ) { VAR_1 . METHOD_2 ( 0 , true ) ; VAR_1 . METHOD_3 ( VAR_2 , VAR_3 ) ; VAR_1 . METHOD_4 ( VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int index , TYPE_1 element ) { METHOD_2 ( index ) ; if ( index == 1 ) METHOD_3 ( element ) ; else METHOD_4 ( element , node ( index ) ) ; }
public void METHOD_1 ( int index , TYPE_1 element ) { METHOD_2 ( index ) ; if ( index == 1 ) METHOD_3 ( element ) ; else METHOD_4 ( element , node ( ( index - 1 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public static long METHOD_1 ( long n , int VAR_1 ) { return ( n > > VAR_1 ) ^ ( n < < ( INT_1 - VAR_1 ) ) ; }
public static long METHOD_1 ( long n , int VAR_1 ) { return ( n > > > VAR_1 ) ^ ( n < < ( INT_1 - VAR_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( android.content.Context context ) { TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( context ) ; return VAR_1 . getString ( VAR_2 , STRING_1 ) ; }
private java.lang.String METHOD_1 ( ) { TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( getActivity ( ) ) ; return VAR_1 . getString ( VAR_2 , STRING_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( java.lang.String name , TYPE_2 context ) { TYPE_3 . METHOD_2 ( STRING_1 , name ) ; return new TYPE_1 ( name , TYPE_4 . value ( ) , context ) ; }
public static TYPE_1 METHOD_1 ( java.lang.String name , TYPE_2 context ) { return new TYPE_1 ( name , TYPE_4 . value ( ) , context ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 . METHOD_2 ( VAR_1 ) ; if ( ( TYPE_1 . METHOD_3 ( ) . METHOD_4 ( ) . length ) < 1 ) { throw new TYPE_2 ( ( STRING_1 + VAR_1 ) ) ; } }
public static void METHOD_1 ( java.lang.String VAR_1 ) { }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { if ( ( java.lang.Integer.parseInt ( VAR_1 ) ) >= ( VAR_2 ) ) TYPE_1 . METHOD_2 ( this , VAR_3 , true ) ; VAR_4 = false ; }
private void METHOD_1 ( ) { if ( ( java.lang.Integer.parseInt ( VAR_1 ) ) < ( VAR_2 ) ) TYPE_1 . METHOD_2 ( this , VAR_3 , true ) ; VAR_4 = false ; }
The following code may contain bugs. Write a refined code without bugs. int METHOD_1 ( long VAR_1 , int value ) { return value > INT_1 ? METHOD_2 ( VAR_1 ) : INT_1 ; }
int METHOD_1 ( long VAR_1 , int value ) { return ( value > INT_1 ) || ( value < 1 ) ? METHOD_2 ( VAR_1 ) : INT_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float y ) { METHOD_2 ( ( y - ( METHOD_3 ( ) ) ) ) ; }
public void METHOD_1 ( float y ) { super . METHOD_2 ( ( y - ( METHOD_3 ( ) ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return VAR_1 . get ( VAR_2 ) . METHOD_2 ( VAR_3 ) . isEmpty ( ) ; }
public boolean METHOD_1 ( ) { return ! ( VAR_1 . get ( VAR_2 ) . METHOD_2 ( VAR_3 ) . isEmpty ( ) ) ; }
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 ) throws java.io.IOException { java.io.FileOutputStream VAR_3 = new java.io.FileOutputStream ( VAR_2 ) ; VAR_1 . METHOD_2 ( VAR_4 , INT_1 , VAR_3 ) ; VAR_3 . METHOD_3 ( ) ; TYPE_2 . METHOD_4 ( VAR_1 ) ; }
public static void METHOD_1 ( TYPE_1 VAR_1 , java.lang.String VAR_2 ) throws java.io.IOException { java.io.FileOutputStream VAR_3 = new java.io.FileOutputStream ( VAR_2 ) ; VAR_1 . METHOD_2 ( VAR_4 , INT_1 , VAR_3 ) ; VAR_3 . METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public float METHOD_1 ( float VAR_1 ) { VAR_1 *= VAR_2 ; if ( ( java.lang.Math.abs ( VAR_1 ) ) < 1 ) ; { VAR_1 = 0 ; } return VAR_1 ; }
public float METHOD_1 ( float VAR_1 ) { VAR_1 *= VAR_2 ; if ( ( java.lang.Math.abs ( VAR_1 ) ) < 1 ) { VAR_1 = 0 ; } return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( float VAR_1 ) { VAR_2 . METHOD_2 ( ) ; for ( TYPE_1 VAR_3 : VAR_4 . METHOD_3 ( ) ) { VAR_3 . METHOD_4 ( ) . METHOD_5 ( VAR_2 ) ; } VAR_2 . end ( ) ; }
public void METHOD_1 ( float VAR_1 ) { for ( TYPE_1 VAR_3 : VAR_4 . METHOD_3 ( ) ) { VAR_3 . METHOD_4 ( ) . METHOD_5 ( VAR_2 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object METHOD_1 ( TYPE_1 name , TYPE_2 VAR_1 ) { getContext ( ) . METHOD_2 ( ) . METHOD_3 ( name , VAR_1 ) ; return VAR_1 ; }
public java.lang.Object METHOD_1 ( TYPE_1 name , TYPE_2 VAR_1 ) { getContext ( ) . METHOD_2 ( ) . METHOD_3 ( name . toString ( ) , VAR_1 ) ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 . append ( VAR_3 . getText ( ) ) ; if ( ( VAR_4 ) && ( ( VAR_5 ) == 1 ) ) VAR_6 = true ; VAR_4 = true ; }
public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 . append ( VAR_3 . getText ( ) ) ; if ( ( VAR_4 ) && ( ( VAR_5 ) >= 1 ) ) VAR_6 = true ; VAR_4 = true ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { java.util.List < TYPE_1 > VAR_1 = VAR_2 . METHOD_2 ( STRING_1 ) ; java.lang.System.out.println ( VAR_1 ) ; return STRING_2 ; }
public java.lang.String METHOD_1 ( ) { return STRING_2 ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , int VAR_2 ) { TYPE_3 . METHOD_2 ( STRING_1 ) ; android.view.View VAR_3 = TYPE_4 . METHOD_3 ( context ) . METHOD_4 ( VAR_4 , VAR_1 , false ) ; return new TYPE_1 ( VAR_3 ) ; }
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , int VAR_2 ) { android.view.View VAR_3 = TYPE_4 . METHOD_3 ( context ) . METHOD_4 ( VAR_4 , VAR_1 , false ) ; return new TYPE_1 ( VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { this . VAR_1 . METHOD_2 ( ) ; this . VAR_2 = true ; this . VAR_3 = null ; return true ; }
public boolean METHOD_1 ( ) { if ( ( this . VAR_1 ) != null ) this . VAR_1 . METHOD_2 ( ) ; this . VAR_2 = true ; this . VAR_3 = null ; return true ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_2 ( ) ; if ( ( VAR_1 ) != null ) VAR_2 = true ; VAR_3 . remove ( VAR_1 ) ; }
public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) VAR_2 = true ; VAR_3 . remove ( 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 ) throws TYPE_3 { if ( ( VAR_3 . METHOD_2 ( VAR_4 class ) ) == null ) { } java.util.ArrayList < TYPE_4 > VAR_5 = VAR_1 . METHOD_3 ( ) ; VAR_6 . METHOD_4 ( VAR_5 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) throws TYPE_3 { java.util.ArrayList < TYPE_4 > VAR_5 = VAR_1 . METHOD_3 ( ) ; VAR_6 . METHOD_4 ( VAR_5 ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void execute ( ) { VAR_1 . METHOD_1 ( ( - ( VAR_2 . METHOD_2 ( ) ) ) , ( - ( VAR_2 . METHOD_3 ( ) ) ) ) ; }
protected void execute ( ) { VAR_1 . METHOD_1 ( ( - ( VAR_2 . METHOD_2 ( ) ) ) , VAR_2 . METHOD_3 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { android.content.Intent VAR_2 = new android.content.Intent ( METHOD_2 ( ) , VAR_3 class ) ; VAR_2 . METHOD_3 ( VAR_4 ) ; METHOD_4 ( VAR_2 ) ; METHOD_5 ( ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_5 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( android.content.Context context , java.lang.String VAR_1 ) { TYPE_1 . METHOD_2 ( context , VAR_1 , true ) ; }
public static void METHOD_1 ( android.content.Context context , java.lang.String VAR_1 ) { TYPE_1 . METHOD_2 ( context , VAR_1 . toUpperCase ( ) , true ) ; }
The following code may contain bugs. Write a refined code without bugs. static java.lang.String [ ] METHOD_1 ( java.lang.String [ ] VAR_1 ) { TYPE_1 . METHOD_1 ( VAR_1 , ( java.lang.String VAR_2 , java.lang.String VAR_3 ) - > TYPE_2 . METHOD_2 ( VAR_2 ) . compareTo ( TYPE_2 . METHOD_2 ( VAR_3 ) ) ) ; return VAR_1 ; }
static void METHOD_1 ( java.lang.String [ ] VAR_1 ) { TYPE_1 . METHOD_1 ( VAR_1 , ( java.lang.String VAR_2 , java.lang.String VAR_3 ) - > TYPE_2 . METHOD_2 ( VAR_2 ) . compareTo ( TYPE_2 . METHOD_2 ( VAR_3 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { return METHOD_2 ( 0 ) ; }
public void METHOD_1 ( ) { METHOD_2 ( 0 ) ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( TYPE_1 data ) { return ; }
public void METHOD_1 ( TYPE_1 data ) { }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return ( VAR_1 . METHOD_2 ( VAR_2 class ) ) && ( VAR_1 . METHOD_3 ( ) ) ; }
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return ( ( ! ( VAR_1 . isEmpty ( ) ) ) && ( VAR_1 . METHOD_2 ( VAR_2 class ) ) ) && ( VAR_1 . METHOD_3 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { if ( METHOD_2 ( VAR_1 ) ) METHOD_3 ( ) ; return VAR_2 ; }
public TYPE_1 METHOD_1 ( ) { return VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( VAR_2 ) ; start ( new android.view.View ( this ) ) ; VAR_3 [ 1 ] [ 1 ] = VAR_3 [ INT_1 ] [ INT_2 ] ; }
protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( VAR_2 ) ; start ( new android.view.View ( this ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( STRING_1 , STRING_2 ) ; METHOD_3 ( ) ; }
protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; TYPE_1 . METHOD_2 ( STRING_1 , STRING_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws TYPE_1 { TYPE_2 VAR_1 = TYPE_3 . METHOD_2 ( TYPE_4 . METHOD_3 ( VAR_2 ) ) ; TYPE_5 . assertNotNull ( VAR_1 ) ; }
public void METHOD_1 ( ) throws TYPE_1 { TYPE_2 VAR_1 = TYPE_2 . METHOD_2 ( TYPE_4 . METHOD_3 ( VAR_2 ) ) ; TYPE_5 . assertNotNull ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return super . METHOD_1 ( ) ; }
public int METHOD_1 ( ) { return ( x ( ) ) ^ ( y ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { return METHOD_2 ( VAR_1 . toLowerCase ( ) , VAR_2 . toLowerCase ( ) ) ; }
public java.lang.String METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { if ( ( VAR_1 != null ) && ( VAR_2 != null ) ) { return METHOD_2 ( VAR_1 . toLowerCase ( ) , VAR_2 . toLowerCase ( ) ) ; } else { return null ; } }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( TYPE_1 context ) { for ( TYPE_2 VAR_1 : VAR_2 ) { if ( VAR_1 . METHOD_2 ( ) ) return VAR_1 . getText ( ) ; } return STRING_1 ; }
public java.lang.String METHOD_1 ( TYPE_1 context ) { for ( TYPE_2 VAR_1 : VAR_2 ) { if ( ! ( VAR_1 . METHOD_2 ( ) ) ) return VAR_1 . getText ( ) ; } return STRING_1 ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( android.content.Context context , java.lang.String VAR_1 , TYPE_1 VAR_2 ) { TYPE_2 . METHOD_2 ( context ) . METHOD_3 ( VAR_1 ) . METHOD_4 ( ) . METHOD_5 ( VAR_2 ) ; }
public static void METHOD_1 ( android.content.Context context , java.lang.String VAR_1 , TYPE_1 VAR_2 ) { TYPE_2 . METHOD_2 ( context ) . METHOD_3 ( VAR_1 ) . METHOD_5 ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { assert ( VAR_1 ) != null ; if ( ( VAR_1 ) == null ) return false ; TYPE_1 VAR_2 = VAR_1 . METHOD_2 ( VAR_3 , STRING_1 ) ; VAR_2 . METHOD_3 ( VAR_4 , this ) ; return true ; }
public boolean METHOD_1 ( ) { if ( ( VAR_1 ) == null ) return false ; TYPE_1 VAR_2 = VAR_1 . METHOD_2 ( VAR_3 , STRING_1 ) ; VAR_2 . METHOD_3 ( VAR_4 , this ) ; return true ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( java.lang.String message ) { if ( this . VAR_1 ) { int VAR_2 = VAR_3 ; TYPE_1 VAR_4 = TYPE_1 . METHOD_2 ( context , message , VAR_2 ) ; VAR_4 . show ( ) ; } }
private void METHOD_1 ( int message ) { if ( this . VAR_1 ) { int VAR_2 = VAR_3 ; TYPE_1 VAR_4 = TYPE_1 . METHOD_2 ( context , message , VAR_2 ) ; VAR_4 . show ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( TYPE_1 token ) { return ( ( token . METHOD_2 ( ) ) == STRING_1 ) || ( ( token . METHOD_2 ( ) ) == STRING_2 ) ; }
private boolean METHOD_1 ( TYPE_1 token ) { return ( token . METHOD_2 ( ) . equals ( STRING_1 ) ) || ( token . METHOD_2 ( ) . equals ( STRING_2 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . assertTrue ( VAR_1 . METHOD_2 ( null , true , false ) ) ; }
public void METHOD_1 ( ) { assertTrue ( VAR_1 . METHOD_2 ( null , true , false ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 query = VAR_2 . METHOD_2 ( STRING_1 , VAR_3 class ) ; query . METHOD_3 ( STRING_2 , VAR_1 ) ; return ( query . METHOD_4 ( ) . size ( ) ) > 0 ; }
public boolean METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 query = VAR_2 . METHOD_2 ( STRING_1 , VAR_3 class ) ; query . METHOD_3 ( STRING_2 , VAR_1 ) ; return ( query . METHOD_4 ( ) . size ( ) ) == 0 ; }
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( int VAR_1 ) { java.lang.String VAR_2 = TYPE_1 . METHOD_2 ( VAR_1 ) ; return TYPE_2 . METHOD_3 ( VAR_2 ) . toString ( ) ; }
private java.lang.String METHOD_1 ( int VAR_1 ) { java.lang.String VAR_2 = TYPE_1 . METHOD_2 ( VAR_1 ) ; return VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( int VAR_1 , TYPE_1 VAR_2 ) { TYPE_1 VAR_3 = TYPE_2 . get ( VAR_1 ) ; TYPE_2 . add ( VAR_1 , VAR_2 ) ; return VAR_3 ; }
private TYPE_1 METHOD_1 ( int VAR_1 , TYPE_1 VAR_2 ) { TYPE_1 VAR_3 = TYPE_2 . get ( VAR_1 ) ; TYPE_2 . add ( VAR_2 ) ; return VAR_3 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final float VAR_1 ) { VAR_2 . METHOD_1 ( VAR_1 ) ; }
public void METHOD_1 ( final float VAR_1 ) { if ( ( VAR_2 ) != null ) VAR_2 . METHOD_1 ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) throws TYPE_2 { return METHOD_1 ( VAR_1 . METHOD_2 ( ) , VAR_1 . METHOD_3 ( ) ) ; }
public TYPE_1 METHOD_1 ( ) throws TYPE_2 { return METHOD_1 ( this . VAR_1 . METHOD_2 ( ) , this . VAR_1 . METHOD_3 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( ) { return new java.util.ArrayList < > ( this . VAR_1 ) ; }
public java.util.List < TYPE_1 > METHOD_1 ( ) { if ( ( this . VAR_1 ) == null ) { return new java.util.ArrayList < > ( ) ; } return new java.util.ArrayList < > ( this . VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. TYPE_1 < ? > METHOD_1 ( java.lang.String VAR_1 , TYPE_2 VAR_2 ) ;
TYPE_1 < ? > METHOD_1 ( TYPE_2 VAR_2 ) ;
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; try { METHOD_3 ( ) ; METHOD_4 ( ) ; } catch ( java.lang.Exception VAR_2 ) { TYPE_1 . METHOD_5 ( VAR_2 ) ; } finally { VAR_1 . METHOD_6 ( ) ; } }
private void METHOD_1 ( ) { METHOD_3 ( ) ; METHOD_4 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( this . VAR_1 . METHOD_1 ( ) ) { VAR_2 . METHOD_2 ( ) ; } this . VAR_1 . METHOD_3 ( ) ; }
public void METHOD_1 ( ) { if ( this . VAR_1 . METHOD_1 ( ) ) { METHOD_2 ( ) ; } this . VAR_1 . METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { return VAR_3 . METHOD_1 ( VAR_1 , VAR_2 ) ; }
public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return VAR_3 . METHOD_1 ( null , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( TYPE_1 event ) throws java.io.IOException { TYPE_2 VAR_1 = new TYPE_2 ( STRING_1 , true , this . getClass ( ) ) ; ( ( TYPE_3 ) ( VAR_2 ) ) . METHOD_2 ( ) ; }
void METHOD_1 ( TYPE_1 event ) throws java.io.IOException { TYPE_2 VAR_1 = new TYPE_2 ( STRING_1 , true , this . getClass ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return TYPE_1 . values ( ) [ ( ( ( ( java.lang.Long ) ( this . VAR_1 . get ( VAR_2 ) . getValue ( ) ) ) . intValue ( ) ) - 1 ) ] ; }
public TYPE_1 METHOD_1 ( ) { return TYPE_1 . values ( ) [ ( ( java.lang.Long ) ( this . VAR_1 . get ( VAR_2 ) . getValue ( ) ) ) . intValue ( ) ] ; }
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( TYPE_1 VAR_1 , java.lang.Object string ) { if ( string == null ) return VAR_1 . METHOD_2 ( ) ? VAR_2 : null ; if ( string . equals ( VAR_2 ) ) return VAR_2 ; return string . toString ( ) ; }
public static java.lang.String METHOD_1 ( TYPE_1 VAR_1 , java.lang.Object string ) { if ( string == null ) return null ; if ( string . equals ( VAR_2 ) ) return VAR_1 . METHOD_2 ( ) ? null : VAR_2 ; return string . toString ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ! ( VAR_2 . contains ( VAR_1 ) ) ) { VAR_3 . add ( new java.util.LinkedList < java.lang.String > ( ) ) ; VAR_2 . add ( VAR_1 . METHOD_2 ( ) ) ; } }
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ! ( VAR_2 . contains ( VAR_1 ) ) ) { VAR_3 . add ( new java.util.HashSet < java.lang.String > ( ) ) ; VAR_2 . add ( VAR_1 . METHOD_2 ( ) ) ; } }