input
stringlengths
96
415
output
stringlengths
18
303
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) { VAR_1 = new TYPE_1 ( INT_1 ) ; new java.lang.Thread ( VAR_1 ) ; }
public static void main ( java.lang.String [ ] args ) { VAR_1 = new TYPE_1 ( INT_1 ) ; new java.lang.Thread ( VAR_1 ) . start ( ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 c ) { TYPE_2 n = new TYPE_2 ( ) ; VAR_1 = c . METHOD_2 ( ) ; VAR_2 = VAR_3 ; VAR_3 = n ; }
private void METHOD_1 ( TYPE_1 c ) { TYPE_2 n = new TYPE_2 ( ) ; n . type = c . type ; VAR_1 = c . METHOD_2 ( ) ; VAR_2 = VAR_3 ; VAR_3 = n ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { set ( 0 ) ; VAR_1 . METHOD_2 ( VAR_2 . METHOD_3 ( ) ) ; VAR_1 . METHOD_1 ( ) ; METHOD_4 ( ) ; }
public void METHOD_1 ( ) { set ( 0 ) ; VAR_1 . METHOD_2 ( VAR_2 . METHOD_3 ( ) ) ; VAR_1 . METHOD_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public final void METHOD_1 ( int VAR_1 ) { this . VAR_1 = VAR_1 ; }
public void METHOD_1 ( int VAR_1 ) { this . VAR_1 = VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( new TYPE_2 ( METHOD_2 ( ) ) . open ( ) ) == ( VAR_2 ) ) { } METHOD_3 ( ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { new TYPE_2 ( METHOD_2 ( ) ) . open ( ) ; METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_1 = TYPE_1 . METHOD_2 ( STRING_1 , VAR_1 ) ; }
private void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_1 = TYPE_1 . METHOD_2 ( STRING_1 , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean main ( ) { if ( ( state ) == null ) { return false ; } return true ; }
public boolean main ( ) { if ( ( state ) != null ) { return false ; } return 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 , android.view.View target , int VAR_3 , int VAR_4 , int [ ] VAR_5 ) { super . METHOD_1 ( VAR_1 , VAR_2 , target , VAR_3 , VAR_4 , VAR_5 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , android.view.View target , int VAR_3 , int VAR_4 , int [ ] VAR_5 , int type ) { super . METHOD_1 ( VAR_1 , VAR_2 , target , VAR_3 , VAR_4 , VAR_5 , type ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; TYPE_2 . METHOD_2 ( this . getActivity ( ) ) ; if ( ( METHOD_3 ( ) ) != null ) { VAR_2 = METHOD_3 ( ) . getBoolean ( VAR_3 ) ; } }
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( METHOD_3 ( ) ) != null ) { VAR_2 = METHOD_3 ( ) . getBoolean ( VAR_3 ) ; } super . METHOD_1 ( VAR_1 ) ; TYPE_2 . METHOD_2 ( this . getActivity ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return VAR_1 . METHOD_2 ( TYPE_2 . get ( VAR_2 ) ) ; }
public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return VAR_1 . METHOD_2 ( TYPE_2 . get ( VAR_2 , name ) ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { final TYPE_2 VAR_2 = VAR_1 . METHOD_2 ( ) ; METHOD_1 ( VAR_1 , VAR_2 ) ; }
private void METHOD_1 ( TYPE_1 VAR_1 ) { final TYPE_2 VAR_2 = VAR_1 . METHOD_2 ( ) ; METHOD_1 ( VAR_1 , VAR_2 , true ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int start , int end , int length ) { VAR_1 = start ; VAR_2 = end ; VAR_3 = length ; METHOD_2 ( ) ; java.lang.System.out.println ( STRING_1 ) ; return this ; }
public TYPE_1 METHOD_1 ( int start , int end , int length ) { VAR_1 = start ; VAR_2 = end ; VAR_3 = length ; METHOD_2 ( ) ; return this ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_2 ( ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( VAR_3 . getText ( ) . toString ( ) , VAR_4 ) ; } }
public void METHOD_1 ( android.view.View VAR_1 ) { METHOD_2 ( ) ; if ( ( VAR_2 ) != null ) { VAR_4 . name = VAR_3 . getText ( ) . toString ( ) ; VAR_2 . METHOD_3 ( VAR_4 . id , VAR_4 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; METHOD_3 ( VAR_2 ) ; VAR_3 . METHOD_4 ( ) ; }
public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; if ( ( VAR_3 ) != null ) { METHOD_3 ( VAR_2 ) ; VAR_3 . METHOD_4 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) { TYPE_1 < java.lang.Integer > VAR_1 = TYPE_2 . METHOD_1 ( ) . build ( ) ; VAR_1 . METHOD_2 ( 1 ) ; VAR_1 . METHOD_3 ( INT_1 , INT_2 ) ; java.lang.System.out.println ( STRING_1 ) ; }
public static void main ( java.lang.String [ ] args ) { java.lang.System.out.println ( STRING_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( VAR_2 , STRING_1 ) ; }
public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( android.view.View VAR_1 , boolean VAR_2 ) { TYPE_1 VAR_3 = METHOD_2 ( VAR_1 ) ; METHOD_3 ( VAR_1 ) ; VAR_3 . METHOD_4 ( ) ; }
protected void METHOD_1 ( android.view.View VAR_1 , boolean VAR_2 ) { if ( VAR_1 != null ) { TYPE_1 VAR_3 = METHOD_2 ( VAR_1 ) ; METHOD_3 ( VAR_1 ) ; VAR_3 . METHOD_4 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 result ) { if ( ! ( VAR_1 . METHOD_2 ( ) ) ) { VAR_1 . METHOD_3 ( VAR_2 ) ; } }
public void METHOD_1 ( TYPE_1 VAR_2 ) { if ( ! ( VAR_1 . METHOD_2 ( ) ) ) { VAR_1 . METHOD_3 ( VAR_2 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.io.IOException { synchronized ( VAR_1 ) { if ( ( writer ) != null ) writer . METHOD_2 ( ) ; writer . METHOD_3 ( ) ; } }
public void METHOD_1 ( ) throws java.io.IOException { synchronized ( VAR_1 ) { if ( ( writer ) != null ) { writer . METHOD_2 ( ) ; writer . METHOD_3 ( ) ; } } }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) throws java.io.IOException { return ( VAR_1 ) != null ? VAR_1 : VAR_2 . get ( VAR_3 ) ; }
public TYPE_1 METHOD_1 ( ) throws java.io.IOException { return ( VAR_1 ) != null ? VAR_1 : ( VAR_3 ) != null ? VAR_2 . get ( VAR_3 ) : null ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { return java.lang.Double . METHOD_1 ( METHOD_2 ( VAR_1 ) , METHOD_2 ( VAR_2 ) ) ; }
public int METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { return java.lang.Double . METHOD_1 ( METHOD_2 ( VAR_2 ) , METHOD_2 ( VAR_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected TYPE_1 METHOD_1 ( ) { return new TYPE_2 ( ) ; }
public TYPE_1 METHOD_1 ( ) { return new TYPE_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 ) { VAR_2 = VAR_3 . get ( VAR_1 ) ; }
public void METHOD_1 ( int VAR_1 ) { VAR_2 = VAR_3 . get ( ( VAR_1 - 1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void remove ( TYPE_1 key ) { VAR_1 . remove ( key ) ; }
public void remove ( TYPE_1 key ) { VAR_1 . remove ( key . toString ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 ; for ( java.lang.Object VAR_2 : VAR_3 ) { VAR_1 = ( ( TYPE_1 ) ( VAR_2 ) ) ; java.lang.System.out.println ( VAR_1 . METHOD_2 ( ) ) ; } }
public void METHOD_1 ( ) { TYPE_1 VAR_1 ; for ( java.lang.Object VAR_2 : VAR_3 ) { VAR_1 = ( ( TYPE_1 ) ( VAR_2 ) ) ; } }
The following code may contain bugs. Write a refined code without bugs. private static native void METHOD_1 ( long VAR_1 , long VAR_2 , double VAR_3 , long VAR_4 , long VAR_5 , long VAR_6 ) ;
private static void METHOD_1 ( long VAR_1 , long VAR_2 , double VAR_3 , long VAR_4 , long VAR_5 , long VAR_6 ) { }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = false ; VAR_3 = 0 ; }
protected void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = false ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; VAR_1 . METHOD_2 ( VAR_2 , 0 , 0 , null ) ; METHOD_3 ( VAR_3 , VAR_1 , this ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; VAR_1 . METHOD_2 ( VAR_2 , 0 , 0 , null ) ; VAR_3 . METHOD_3 ( VAR_1 , this ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.Boolean get ( int index ) { return ( values . METHOD_1 ( index ) ) == 1 ; }
public java.lang.Boolean get ( int index ) { return values [ index ] ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( STRING_1 , STRING_2 , true ) ; }
public void METHOD_1 ( ) { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( STRING_1 , STRING_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { if ( ! ( TYPE_2 . equals ( this . VAR_1 , VAR_1 ) ) ) { this . VAR_2 = VAR_2 ; this . METHOD_2 ( VAR_3 ) ; } return this ; }
public TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { if ( ! ( TYPE_2 . equals ( this . VAR_1 , VAR_1 ) ) ) { this . VAR_1 = VAR_1 ; this . METHOD_2 ( VAR_3 ) ; } return this ; }
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) { java.lang.System.out.println ( STRING_1 ) ; error = VAR_1 ; }
public static void main ( java.lang.String [ ] args ) { java.lang.System.out.println ( STRING_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( ) ; } }
protected void METHOD_1 ( ) { super . METHOD_1 ( ) ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_3 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( TYPE_1 event ) { if ( TYPE_2 . METHOD_2 ( event . METHOD_3 ( ) ) ) { TYPE_2 . METHOD_4 ( event . METHOD_3 ( ) , false ) ; } TYPE_3 . METHOD_5 ( event . METHOD_3 ( ) ) ; }
public static void METHOD_1 ( TYPE_1 event ) { if ( TYPE_2 . METHOD_2 ( event . METHOD_3 ( ) ) ) { TYPE_2 . METHOD_4 ( event . METHOD_3 ( ) , false ) ; } }
The following code may contain bugs. Write a refined code without bugs. public synchronized void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . METHOD_2 ( new TYPE_2 < java.lang.String , TYPE_1 > ( VAR_1 , VAR_2 ) ) ; }
public synchronized void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { VAR_3 . add ( new TYPE_2 < java.lang.String , TYPE_1 > ( VAR_1 , VAR_2 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , final TYPE_2 VAR_2 , final java.lang.String param ) { VAR_3 . METHOD_2 ( ( ( ( STRING_1 + VAR_2 ) + STRING_2 ) + param ) ) ; if ( ( VAR_4 ) != null ) { } }
public void METHOD_1 ( TYPE_1 VAR_1 , final TYPE_2 VAR_2 , final java.lang.String param ) { if ( ( VAR_4 ) != null ) { } }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return METHOD_1 ( VAR_1 . name , VAR_2 , VAR_3 , VAR_4 , VAR_5 , VAR_1 . data , VAR_6 , VAR_7 , VAR_8 , VAR_9 ) ; }
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { return METHOD_1 ( VAR_1 . name , VAR_2 , VAR_3 , VAR_4 , VAR_5 , VAR_1 . data , VAR_6 , VAR_7 , VAR_9 , VAR_8 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { VAR_1 = new TYPE_1 ( new TYPE_2 ( ) ) ; VAR_2 = new TYPE_3 ( ) ; }
public void METHOD_1 ( ) throws java.lang.Exception { VAR_1 = new TYPE_1 ( new TYPE_2 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object execute ( TYPE_1 event ) throws TYPE_2 { final TYPE_3 VAR_1 = TYPE_4 . METHOD_1 ( event ) ; VAR_1 . METHOD_2 ( ) . METHOD_3 ( false ) ; VAR_1 . METHOD_4 ( ) ; TYPE_5 . METHOD_5 ( VAR_1 ) ; return null ; }
public java.lang.Object execute ( TYPE_1 event ) throws TYPE_2 { final TYPE_3 VAR_1 = TYPE_4 . METHOD_1 ( event ) ; VAR_1 . METHOD_2 ( ) . METHOD_3 ( false ) ; TYPE_5 . METHOD_5 ( VAR_1 ) ; VAR_1 . METHOD_4 ( ) ; return null ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { return null ; }
public void METHOD_1 ( ) { return ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < TYPE_2 > METHOD_1 ( TYPE_2 VAR_1 ) { TYPE_3 . info ( STRING_1 ) ; return VAR_2 . METHOD_2 ( 1 , INT_1 ) ; }
public TYPE_1 < TYPE_2 > METHOD_1 ( TYPE_2 VAR_1 ) { TYPE_3 . info ( STRING_1 ) ; return VAR_2 . METHOD_2 ( 0 , INT_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void show ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , TYPE_3 VAR_3 ) { TYPE_4 . show ( VAR_1 , VAR_2 , null , true , VAR_3 ) ; }
public static void show ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { TYPE_4 . show ( VAR_1 , VAR_2 , null , true ) ; }
The following code may contain bugs. Write a refined code without bugs. private java.util.List < java.lang.String > METHOD_1 ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList < > ( ) ; result . add ( VAR_1 ) ; result . add ( VAR_2 ) ; return result ; }
private java.util.List < java.lang.String > METHOD_1 ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList < > ( ) ; result . add ( 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 , boolean event ) { if ( ! event ) { this . METHOD_2 ( true ) ; } }
public void METHOD_1 ( android.view.View VAR_1 , boolean event ) { if ( ! event ) { METHOD_2 ( true ) ; } }
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( java.lang.String name ) { TYPE_2 . METHOD_2 ( STRING_1 , name ) ; return new TYPE_1 ( name , TYPE_3 . value ( ) ) ; }
public static TYPE_1 METHOD_1 ( java.lang.String name ) { return new TYPE_1 ( name , TYPE_3 . value ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return ( VAR_1 ) == null ? new TYPE_2 ( context ) : VAR_1 ; }
private TYPE_1 METHOD_1 ( ) { return ( VAR_1 ) == null ? new TYPE_2 ( context ) : VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return VAR_1 . counter ; }
public int METHOD_1 ( ) { return counter ; }
The following code may contain bugs. Write a refined code without bugs. public static < TYPE_1 > TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , java.lang.Class < TYPE_1 > VAR_2 , int position ) { return TYPE_3 . METHOD_1 ( VAR_1 , VAR_2 , position ) ; }
public static < TYPE_1 > TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , java.lang.Class < TYPE_1 > VAR_2 , int position ) { return TYPE_3 . METHOD_1 ( VAR_1 , VAR_2 , position , true ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( char temp , TYPE_1 VAR_1 ) { java.lang.System.out.println ( ( STRING_1 + temp ) ) ; TYPE_2 . METHOD_2 ( ( STRING_1 + temp ) ) . METHOD_3 ( VAR_1 ) ; }
public static void METHOD_1 ( char temp , TYPE_1 VAR_1 ) { TYPE_2 . METHOD_2 ( ( STRING_1 + temp ) ) . METHOD_3 ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.io.IOException { VAR_1 . METHOD_2 ( VAR_2 class ) ; METHOD_3 ( new TYPE_1 ( ) , null ) ; }
public void METHOD_1 ( ) throws java.io.IOException { this . VAR_1 . METHOD_2 ( VAR_2 class ) ; METHOD_3 ( new TYPE_1 ( ) , null ) ; }
The following code may contain bugs. Write a refined code without bugs. public final java.util.List < TYPE_1 > METHOD_1 ( final TYPE_2 VAR_1 ) throws TYPE_3 { return METHOD_1 ( VAR_1 , null ) ; }
public final java.util.List < TYPE_1 > METHOD_1 ( final TYPE_2 VAR_1 ) throws TYPE_3 { return METHOD_1 ( VAR_1 , null , null ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_1 ( VAR_1 ) ; }
private void METHOD_1 ( TYPE_1 VAR_1 ) { }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { if ( ( ! ( VAR_1 ) ) || ( ! ( VAR_2 ) ) ) return null ; return ( VAR_3 ) != null ? VAR_3 : VAR_4 . METHOD_2 ( ) ; }
public TYPE_1 METHOD_1 ( ) { if ( ( ! ( VAR_1 ) ) || ( ! ( VAR_2 ) ) ) return null ; return 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 ) ; java.lang.String result = VAR_1 . format ( VAR_2 ) ; assertEquals ( VAR_3 , result ) ; }
public void METHOD_1 ( ) { java.lang.String result = VAR_1 . format ( VAR_2 ) ; assertEquals ( VAR_3 , result ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( ) ; view . update ( ) ; }
public void METHOD_1 ( ) { super . METHOD_1 ( ) ; view . update ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_2 ( ) ; TYPE_3 VAR_3 = new TYPE_3 ( VAR_2 , VAR_4 ) ; VAR_4 . METHOD_2 ( false ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_2 ( ) ; TYPE_3 VAR_3 = new TYPE_3 ( VAR_2 ) ; VAR_4 . METHOD_2 ( false ) ; }
The following code may contain bugs. Write a refined code without bugs. public < TYPE_1 extends TYPE_2 > TYPE_1 METHOD_1 ( java.lang.Class < TYPE_1 > VAR_1 , java.lang.String url ) { TYPE_1 p = TYPE_3 . METHOD_2 ( VAR_1 , this , url ) ; VAR_2 . put ( VAR_1 , p ) ; return p ; }
public void METHOD_1 ( java.lang.Class < ? extends TYPE_2 > VAR_1 , java.lang.String url ) { METHOD_1 ( TYPE_3 . METHOD_2 ( VAR_1 , this , url ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( this ) ; METHOD_3 ( ) ; }
public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( this ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 writer , TYPE_2 VAR_1 ) throws java.io.IOException { METHOD_2 ( writer , new TYPE_2 [ ] { VAR_1 } ) ; }
public void METHOD_1 ( TYPE_1 writer , TYPE_2 VAR_1 ) throws java.io.IOException { if ( VAR_1 != null ) METHOD_2 ( writer , new TYPE_2 [ ] { VAR_1 } ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( double VAR_1 ) { TYPE_1 . assertTrue ( ( ( ( METHOD_2 ( ) ) - ( METHOD_3 ( ) ) ) < VAR_1 ) ) ; }
public void METHOD_1 ( double VAR_1 ) { TYPE_1 . assertEquals ( METHOD_2 ( ) , METHOD_3 ( ) , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { TYPE_1 VAR_1 = ( ( TYPE_1 ) ( METHOD_2 ( ) . get ( VAR_2 class , 0 ) ) ) ; VAR_1 . METHOD_1 ( true ) ; update ( VAR_1 ) ; return VAR_1 ; }
public TYPE_1 METHOD_1 ( ) { TYPE_1 VAR_1 = ( ( TYPE_1 ) ( METHOD_2 ( ) . get ( VAR_2 class , new java.lang.Long ( 0 ) ) ) ) ; VAR_1 . METHOD_1 ( true ) ; update ( VAR_1 ) ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( TYPE_1 VAR_1 ) { return VAR_1 . METHOD_2 ( ) . equals ( VAR_2 ) ; }
private boolean METHOD_1 ( TYPE_1 VAR_1 ) { return ( ( VAR_1 . METHOD_2 ( ) ) != null ) && ( VAR_1 . METHOD_2 ( ) . equals ( VAR_2 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final TYPE_1 VAR_1 , final TYPE_1 VAR_2 ) { VAR_3 . METHOD_2 ( STRING_1 , ( ( VAR_2 + STRING_2 ) + VAR_1 ) ) ; TYPE_2 . add ( VAR_1 , VAR_2 ) ; }
public void METHOD_1 ( final TYPE_1 VAR_1 , final TYPE_1 VAR_2 ) { TYPE_2 . add ( VAR_1 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . assertThat ( VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) ) . METHOD_4 ( STRING_1 ) . METHOD_5 ( 0 ) ; }
public void METHOD_1 ( ) { TYPE_1 . assertThat ( info . METHOD_3 ( ) ) . METHOD_4 ( STRING_1 ) . METHOD_5 ( 0 ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) throws java.io.IOException { VAR_1 . METHOD_2 ( ) ; VAR_2 . METHOD_2 ( ) ; VAR_3 . METHOD_1 ( ) ; }
private void METHOD_1 ( ) throws java.io.IOException { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; } if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_2 ( ) ; } VAR_3 . METHOD_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( listener ) ; }
public void METHOD_1 ( ) { super . METHOD_1 ( null ) ; }
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( int x , int y ) { return ( ( ( y - 1 ) * ( size ) ) + ( x - 1 ) ) + 1 ; }
private int METHOD_1 ( int x , int y ) { return ( ( y - 1 ) * ( size ) ) + x ; }
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( java.lang.Object obj ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; java.lang.String VAR_2 = VAR_1 . METHOD_2 ( obj ) ; return VAR_2 ; }
public static java.lang.String METHOD_1 ( java.lang.Object obj ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; return VAR_1 . METHOD_2 ( obj ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_4 . METHOD_2 ( VAR_3 ) ; VAR_5 . METHOD_2 ( VAR_3 ) ; VAR_6 . METHOD_2 ( VAR_7 ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_6 . METHOD_2 ( VAR_3 ) ; VAR_5 . METHOD_2 ( VAR_3 ) ; VAR_4 . METHOD_2 ( VAR_7 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) VAR_1 . METHOD_2 ( ) ; }
public static void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) VAR_1 . METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( int VAR_1 , int VAR_2 ) { if ( VAR_1 == 1 ) { this . VAR_3 = VAR_2 ; this . METHOD_2 ( ) ; } return true ; }
public boolean METHOD_1 ( int VAR_1 , int VAR_2 ) { if ( VAR_1 == 1 ) { this . VAR_3 = VAR_2 ; return true ; } else { return super . METHOD_1 ( VAR_1 , VAR_2 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . setValue ( true ) ; VAR_2 . METHOD_1 ( ) ; }
public void METHOD_1 ( ) { VAR_2 . METHOD_1 ( ) ; VAR_1 . setValue ( true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final TYPE_1 VAR_1 ) { VAR_2 . add ( VAR_1 ) ; VAR_3 . METHOD_2 ( VAR_1 . METHOD_3 ( ) , METHOD_4 ( VAR_1 ) ) ; }
public void METHOD_1 ( final TYPE_1 VAR_1 ) { VAR_2 . add ( VAR_1 ) ; VAR_3 . METHOD_2 ( VAR_1 . METHOD_3 ( ) . id ( ) , METHOD_4 ( VAR_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = true ; VAR_2 . METHOD_2 ( ) ; VAR_2 . METHOD_3 ( ) ; }
public void METHOD_1 ( ) { VAR_1 = true ; if ( ( VAR_2 ) != null ) { VAR_2 . METHOD_2 ( ) ; VAR_2 . METHOD_3 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.Object key , java.lang.String value ) { METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( TYPE_1 . METHOD_5 ( key ) , value ) . commit ( ) ; return this ; }
public TYPE_1 METHOD_1 ( java.lang.String key , java.lang.String value ) { METHOD_2 ( ) . METHOD_4 ( key , value ) ; return this ; }
The following code may contain bugs. Write a refined code without bugs. public double METHOD_1 ( TYPE_1 [ ] VAR_1 ) { return ( ( METHOD_2 ( METHOD_3 ( VAR_1 ) ) ) / ( VAR_2 ) ) * ( METHOD_4 ( VAR_1 ) ) ; }
public double METHOD_1 ( TYPE_1 [ ] VAR_1 ) { return ( ( METHOD_2 ( METHOD_3 ( VAR_1 ) ) ) - ( VAR_2 ) ) - ( METHOD_4 ( VAR_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { { return VAR_1 ; } }
public TYPE_1 METHOD_1 ( ) { return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( java.util.List < java.io.File > value ) { METHOD_2 ( ) . METHOD_3 ( value ) ; }
protected void METHOD_1 ( java.util.List < java.io.File > value ) { METHOD_2 ( ) . METHOD_3 ( 0 , value ) ; }
The following code may contain bugs. Write a refined code without bugs. private static native long METHOD_1 ( long VAR_1 , int VAR_2 , long VAR_3 , int VAR_4 , long VAR_5 ) ;
private static long METHOD_1 ( long VAR_1 , int VAR_2 , long VAR_3 , int VAR_4 , long VAR_5 ) { return 0 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws TYPE_1 { TYPE_2 . METHOD_2 ( METHOD_3 ( STRING_1 ) ) ; }
public void METHOD_1 ( ) throws TYPE_1 { METHOD_3 ( STRING_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 < TYPE_2 > result ) { METHOD_2 ( result ) ; }
public void METHOD_1 ( TYPE_1 < TYPE_2 > result ) { METHOD_2 ( result . data ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , ( STRING_1 + ( VAR_2 ) ) ) ; VAR_3 . METHOD_1 ( VAR_4 , VAR_5 , VAR_2 ) ; }
private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , ( STRING_1 + ( VAR_2 ) ) ) ; if ( ( VAR_2 ) > 0 ) { VAR_3 . METHOD_1 ( VAR_4 , VAR_5 , VAR_2 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int id ) { VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_2 . METHOD_3 ( VAR_3 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 , int id ) { VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_2 . METHOD_3 ( VAR_3 ) ; update ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; char VAR_2 = VAR_1 . METHOD_2 ( java.util.Arrays.asList ( CHAR_1 , CHAR_2 , CHAR_1 ) ) ; TYPE_2 . assertEquals ( CHAR_2 , VAR_2 ) ; }
public void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; char VAR_2 = VAR_1 . METHOD_2 ( java.util.Arrays.asList ( CHAR_1 , CHAR_2 , CHAR_1 ) ) ; assertEquals ( CHAR_2 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { source . METHOD_2 ( ) ; while ( METHOD_3 ( source . METHOD_4 ( ) ) ) { source . METHOD_2 ( ) ; } }
private void METHOD_1 ( ) { source . METHOD_2 ( ) ; while ( METHOD_3 ( source . METHOD_4 ( ) ) ) { source . METHOD_2 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( byte [ ] attribute ) { try { return new TYPE_2 ( attribute ) ; } catch ( TYPE_3 VAR_1 ) { throw new TYPE_4 ( VAR_1 . METHOD_2 ( ) , VAR_1 ) ; } }
public TYPE_1 METHOD_1 ( byte [ ] attribute ) { try { if ( attribute == null ) return null ; return new TYPE_2 ( attribute ) ; } catch ( TYPE_3 VAR_1 ) { throw new TYPE_4 ( VAR_1 . METHOD_2 ( ) , VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( this . VAR_1 ) instanceof TYPE_1 ) { this . VAR_1 = this . VAR_2 ; } else { this . VAR_1 = this . VAR_3 ; } METHOD_2 ( ) ; }
public void METHOD_1 ( ) { if ( this . VAR_1 . equals ( this . VAR_3 ) ) { this . VAR_1 = this . VAR_2 ; } else { this . VAR_1 = this . VAR_3 ; } METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( java.io.InputStream VAR_1 , int VAR_2 , int VAR_3 ) throws java.io.IOException { TYPE_1 source = TYPE_2 . METHOD_2 ( VAR_1 ) ; TYPE_1 VAR_4 = TYPE_3 . METHOD_3 ( source , VAR_5 , VAR_2 , VAR_3 ) ; return VAR_4 ; }
public static TYPE_1 METHOD_1 ( java.io.InputStream VAR_1 , int VAR_2 , int VAR_3 ) throws java.io.IOException { TYPE_1 source = TYPE_2 . METHOD_2 ( VAR_1 ) ; return TYPE_3 . METHOD_3 ( source , VAR_5 , VAR_2 , VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , int VAR_2 ) { android.view.View VAR_3 = TYPE_3 . METHOD_2 ( context ) . METHOD_3 ( VAR_4 , VAR_1 , false ) ; TYPE_1 VAR_5 = new TYPE_1 ( VAR_3 ) ; return VAR_5 ; }
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , int VAR_2 ) { android.view.View VAR_3 = TYPE_3 . METHOD_2 ( context ) . METHOD_3 ( VAR_4 , VAR_1 , false ) ; return new TYPE_1 ( VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( ) { return ( ( int ) ( TYPE_1 . METHOD_2 ( ( ( ( ( this . METHOD_3 ( ) ? FLOAT_1 : 0.0F ) + ( VAR_1 ) ) + FLOAT_2 ) - ( VAR_2 ) ) ) ) ) ; }
private float METHOD_1 ( ) { return ( ( ( this . METHOD_3 ( ) ? FLOAT_1 : 0.0F ) + ( VAR_1 ) ) + FLOAT_2 ) - ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.Object VAR_1 ) { this . VAR_2 . METHOD_2 ( VAR_1 ) ; }
public void METHOD_1 ( java.lang.Object VAR_1 ) { if ( VAR_1 == null ) return ; this . VAR_2 . METHOD_2 ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { double number = TYPE_1 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( STRING_1 , number ) ; VAR_1 . METHOD_4 ( key , listener , VAR_2 ) ; }
public void METHOD_1 ( ) { double number = TYPE_1 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( STRING_1 , number ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { ( VAR_1 ) -- ; }
public void METHOD_1 ( ) { java.lang.System.out.println ( VAR_1 ) ; ( VAR_1 ) -- ; java.lang.System.out.println ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return VAR_2 . METHOD_2 ( VAR_1 . getName ( ) ) ; }
TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { if ( VAR_1 == null ) { return null ; } return VAR_2 . METHOD_2 ( VAR_1 . getName ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 < TYPE_2 > VAR_1 , TYPE_3 VAR_2 ) { TYPE_4 . METHOD_2 ( STRING_1 , ( STRING_2 + ( VAR_1 . METHOD_3 ( ) ) ) ) ; super . METHOD_1 ( VAR_1 , VAR_2 ) ; }
protected void METHOD_1 ( TYPE_1 < TYPE_2 > VAR_1 , TYPE_3 VAR_2 ) { super . METHOD_1 ( VAR_1 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( TYPE_1 VAR_1 , final TYPE_2 VAR_2 ) { java.lang.String url ; VAR_1 . METHOD_2 ( ) . add ( new TYPE_3 ( ) ) ; return STRING_1 ; }
public java.lang.String METHOD_1 ( TYPE_1 VAR_1 , final TYPE_2 VAR_2 ) { VAR_1 . METHOD_2 ( ) . add ( new TYPE_3 ( ) ) ; return STRING_1 ; }
The following code may contain bugs. Write a refined code without bugs. public static boolean METHOD_1 ( java.lang.String VAR_1 ) { return VAR_1 . METHOD_2 ( VAR_2 ) ; }
public static boolean METHOD_1 ( java.lang.String VAR_1 ) { return VAR_1 != null ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 x ) { VAR_1 = METHOD_2 ( x ) ; return METHOD_1 ( x , VAR_2 , VAR_1 ) ; }
public TYPE_1 METHOD_1 ( TYPE_1 x ) { return METHOD_1 ( x , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { METHOD_2 ( ) ; TYPE_1 . i ( VAR_1 , STRING_1 ) ; }
public void METHOD_1 ( ) { METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return ( ( ( item ) != null ) && ( ( item . METHOD_2 ( ) ) != null ) ) && ( ( VAR_1 ) != null ) ; }
public boolean METHOD_1 ( ) { return ( ( item ) != null ) && ( ( item . METHOD_2 ( ) ) != null ) ; }