input
stringlengths
96
415
output
stringlengths
18
303
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { assert ( VAR_1 ) != false ; assert ( VAR_2 ) != null ; return VAR_3 . METHOD_2 ( VAR_4 ) . METHOD_3 ( VAR_2 ) ; }
public boolean METHOD_1 ( ) { if ( VAR_1 ) { if ( ( VAR_2 ) != null ) { return VAR_3 . METHOD_2 ( VAR_4 ) . METHOD_3 ( VAR_2 ) ; } return true ; } return false ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int x , int y ) { result = x * y ; }
public void METHOD_1 ( int x , int y ) { result = x - y ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 p , int i ) { VAR_1 . add ( i , p ) ; }
public void METHOD_1 ( TYPE_1 p , int i ) { VAR_1 . add ( ( i - 1 ) , p ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; VAR_2 . METHOD_3 ( ) . METHOD_4 ( this ) ; this . VAR_3 = false ; }
public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) ; if ( VAR_3 ) { VAR_2 . METHOD_3 ( ) . METHOD_4 ( this ) ; } this . VAR_3 = false ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( VAR_2 ) ; android.view.View view = VAR_2 . METHOD_3 ( ) . METHOD_4 ( ) ; METHOD_5 ( view ) ; }
public void METHOD_1 ( ) { METHOD_5 ( view ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int id ) { }
public void METHOD_1 ( TYPE_1 VAR_1 , int id ) { first = true ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 param ) { super . METHOD_1 ( param ) ; if ( param . getName ( ) . equals ( TYPE_2 . getName ( ) ) ) { METHOD_2 ( param ) ; } }
protected void METHOD_1 ( TYPE_1 param ) { if ( param . getName ( ) . equals ( TYPE_2 . getName ( ) ) ) { METHOD_2 ( param ) ; } }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { if ( TYPE_1 . METHOD_2 ( ) ) { android.content.Intent VAR_1 = new android.content.Intent ( this , VAR_2 class ) ; VAR_1 . METHOD_3 ( STRING_1 , STRING_2 ) ; METHOD_4 ( VAR_1 ) ; } }
public void METHOD_1 ( ) { if ( TYPE_1 . METHOD_2 ( ) ) { android.content.Intent VAR_1 = new android.content.Intent ( this , VAR_2 class ) ; VAR_1 . METHOD_3 ( STRING_1 , STRING_2 ) ; METHOD_4 ( VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 item , int position ) { if ( TYPE_2 . isEmpty ( VAR_1 ) ) { return ; } VAR_1 . add ( position , item ) ; METHOD_2 ( ) ; }
public void METHOD_1 ( TYPE_1 item , int position ) { if ( TYPE_2 . isEmpty ( VAR_1 ) ) { VAR_1 = new java.util.ArrayList < > ( ) ; } VAR_1 . add ( position , item ) ; METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = METHOD_2 ( STRING_1 ) ; VAR_2 . METHOD_3 ( VAR_1 , VAR_3 , VAR_4 , STRING_2 , STRING_3 ) ; }
public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = METHOD_2 ( STRING_1 ) ; VAR_2 . METHOD_3 ( VAR_1 , VAR_3 , VAR_4 , STRING_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( ) { return number ; }
public java.lang.String METHOD_1 ( ) { return number ; }
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) { TYPE_1 . METHOD_1 ( ) . METHOD_2 ( true ) ; TYPE_2 . METHOD_1 ( ) . start ( ) ; }
public static void main ( java.lang.String [ ] args ) { TYPE_1 . METHOD_1 ( ) . METHOD_2 ( true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String [ ] result ) { if ( result != null ) { VAR_1 . setText ( result [ 0 ] ) ; } }
public void METHOD_1 ( java.lang.String [ ] result ) { java.lang.System.out.println ( result ) ; if ( result != null ) { VAR_1 . setText ( result [ 0 ] ) ; } }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 c ) { if ( ( METHOD_2 ( ) ) > 1 ) { for ( TYPE_1 VAR_1 : METHOD_3 ( ) ) { if ( VAR_1 != c ) { VAR_2 . METHOD_4 ( c ) ; } } } }
private void METHOD_1 ( TYPE_1 c ) { if ( ( METHOD_2 ( ) ) > 1 ) { for ( TYPE_1 VAR_1 : METHOD_3 ( ) ) { if ( VAR_1 != c ) { VAR_2 . METHOD_4 ( VAR_1 ) ; } } } }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 event ) { java.lang.System.out.println ( STRING_1 ) ; if ( ( event . METHOD_2 ( ) ) == ( VAR_1 ) ) { } return super . METHOD_1 ( event ) ; }
public boolean METHOD_1 ( TYPE_1 event ) { if ( ( event . METHOD_2 ( ) ) == ( VAR_1 ) ) { } return super . METHOD_1 ( event ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.CharSequence VAR_1 ) { return append ( VAR_1 ) . append ( "\n" ) ; }
public TYPE_1 METHOD_1 ( java.lang.CharSequence VAR_1 ) { append ( VAR_1 ) ; stringBuilder.append ( "\n" ) ; return this ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . setEnabled ( true ) ; VAR_1 . show ( INT_1 ) ; if ( ( VAR_2 ) != 0 ) { VAR_3 . METHOD_2 ( VAR_2 ) ; VAR_3 . start ( ) ; } }
public void METHOD_1 ( ) { VAR_1 . setEnabled ( true ) ; if ( ( VAR_2 ) != 0 ) { VAR_3 . METHOD_2 ( VAR_2 ) ; VAR_3 . start ( ) ; } else { VAR_1 . show ( INT_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = null ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_2 VAR_2 ) throws TYPE_3 { TYPE_4 VAR_3 = ( ( TYPE_4 ) ( this . METHOD_1 ( ) ) ) ; VAR_3 . METHOD_2 ( VAR_1 ) ; VAR_3 . METHOD_3 ( VAR_2 ) ; return VAR_3 ; }
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_2 VAR_2 ) throws TYPE_3 { return this . METHOD_1 ( null , VAR_1 , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { if ( ( VAR_1 . getId ( ) ) != 1 ) { VAR_2 = VAR_1 . METHOD_2 ( ) ; } else { VAR_1 = null ; } } return VAR_2 ; }
public java.lang.String METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_2 = VAR_1 . METHOD_2 ( ) ; } return VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_1 . getId ( ) ) <= 0 ) { return null ; } VAR_2 . put ( VAR_1 . METHOD_2 ( ) , VAR_1 ) ; return VAR_1 ; }
public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 . METHOD_2 ( ) . isEmpty ( ) ) { return null ; } VAR_2 . put ( VAR_1 . METHOD_2 ( ) , VAR_1 ) ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_2 ( INT_1 ) ; VAR_1 . METHOD_3 ( VAR_2 ) ; VAR_1 . METHOD_4 ( VAR_3 ) ; } return VAR_1 ; }
public TYPE_1 METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_2 ( INT_1 ) ; VAR_1 . METHOD_3 ( VAR_2 ) ; VAR_1 . METHOD_4 ( VAR_3 ) ; } return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 node ) { if ( node != null ) nodes . add ( node ) ; }
public void METHOD_1 ( TYPE_1 node ) { if ( node != null ) { nodes . add ( node ) ; if ( ( start ) == null ) start = node ; } }
The following code may contain bugs. Write a refined code without bugs. public java.util.Set METHOD_1 ( ) { java.lang.String VAR_1 = VAR_2 . METHOD_2 ( STRING_1 ) ; java.lang.System.out.println ( VAR_1 ) ; return VAR_3 ; }
public java.util.Set METHOD_1 ( ) { return VAR_3 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int [ ] VAR_1 ) { this . VAR_1 = VAR_1 ; METHOD_2 ( ) ; }
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 TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return new TYPE_1 ( this . METHOD_2 ( VAR_1 . METHOD_3 ( new TYPE_1 ( ( - 1 ) , 1 ) ) ) ) ; }
public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return this . METHOD_2 ( VAR_1 . METHOD_3 ( new TYPE_1 ( ( - 1 ) , 1 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( java.util.HashMap < java.lang.String , java.lang.Integer > VAR_1 , java.lang.String VAR_2 ) { VAR_1 . put ( VAR_2 , ( ( ( java.lang.Integer ) ( VAR_3 . get ( VAR_2 ) . intValue ( ) ) ) + 1 ) ) ; }
private void METHOD_1 ( java.util.HashMap < java.lang.String , java.lang.Integer > VAR_1 , java.lang.String VAR_2 ) { VAR_1 . put ( VAR_2 , ( ( java.lang.Integer ) ( ( VAR_1 . get ( VAR_2 ) . intValue ( ) ) + 1 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. private static boolean METHOD_1 ( android.content.Context context ) { return ( ( VAR_1 ) > ( VAR_2 ) ) && ( ( context . METHOD_2 ( VAR_3 ) ) == ( VAR_4 ) ) ; }
private static boolean METHOD_1 ( android.content.Context context ) { return ( ( VAR_1 ) >= ( VAR_2 ) ) && ( ( context . METHOD_2 ( VAR_3 ) ) == ( VAR_4 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void init ( ) { if ( ! ( VAR_1 ) ) { TYPE_1 VAR_2 = new TYPE_1 ( VAR_3 , VAR_4 ) ; VAR_2 . start ( ) ; } }
public void init ( ) { if ( ! ( VAR_1 ) ) { TYPE_1 VAR_2 = new TYPE_1 ( VAR_3 , VAR_4 ) ; VAR_2 . start ( ) ; VAR_1 = true ; } }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.util.Map < java.lang.String , java.lang.String > VAR_1 ) { java.lang.String VAR_2 = VAR_3 . METHOD_2 ( STRING_1 , STRING_2 ) ; return METHOD_1 ( VAR_2 , null ) ; }
public TYPE_1 METHOD_1 ( java.util.Map < java.lang.String , java.lang.String > VAR_1 ) { java.lang.String VAR_2 = VAR_3 . METHOD_2 ( STRING_1 , STRING_2 ) ; return METHOD_1 ( VAR_2 , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_1 ; }
public static void METHOD_1 ( ) { }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final TYPE_1 VAR_1 ) { METHOD_2 ( field . getText ( ) , false ) ; }
public void METHOD_1 ( final TYPE_1 VAR_1 ) { METHOD_2 ( field . getText ( ) , true ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) throws java.io.IOException { return new TYPE_2 ( ) { public void METHOD_2 ( ) { VAR_1 this . data = toString ( ) ; } public void METHOD_3 ( ) { VAR_1 this . data = toString ( ) ; } } ; }
public void METHOD_2 ( ) throws java.io.IOException { }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { return ( ( VAR_1 ) + STRING_1 ) + ( VAR_2 [ VAR_3 ] ) ; }
public java.lang.String METHOD_1 ( ) { return METHOD_1 ( VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , boolean VAR_3 ) { VAR_4 . METHOD_2 ( ( ( ( STRING_1 + VAR_3 ) + STRING_2 ) + VAR_1 ) ) ; if ( ! VAR_3 ) { METHOD_3 ( ) ; } }
public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , boolean VAR_3 ) { VAR_4 . METHOD_2 ( ( ( ( STRING_1 + VAR_3 ) + STRING_2 ) + VAR_1 ) ) ; if ( ! VAR_3 ) { METHOD_3 ( false ) ; } }
The following code may contain bugs. Write a refined code without bugs. protected boolean METHOD_1 ( final TYPE_1 VAR_1 , final int VAR_2 , final byte VAR_3 ) { VAR_4 . METHOD_2 ( ) ; return true ; }
protected boolean METHOD_1 ( final TYPE_1 VAR_1 , final int VAR_2 , final byte VAR_3 ) { VAR_4 . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 ) ; return true ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 = VAR_2 . get ( VAR_3 ) ; VAR_3 = ( ( VAR_3 ) ++ ) % ( VAR_2 . size ( ) ) ; }
private void METHOD_1 ( ) { VAR_1 = VAR_2 . get ( VAR_3 ) ; VAR_3 = ( ++ ( VAR_3 ) ) % ( VAR_2 . size ( ) ) ; java.lang.System.out.println ( VAR_3 ) ; java.lang.System.out.println ( VAR_2 . size ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public synchronized void METHOD_1 ( boolean VAR_1 ) { this . VAR_1 = VAR_1 ; if ( VAR_1 ) { METHOD_2 ( ) ; } }
public synchronized void METHOD_1 ( boolean VAR_1 ) { if ( this . VAR_1 = VAR_1 ) { METHOD_2 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. protected void execute ( ) { VAR_1 . METHOD_1 ( ( FLOAT_1 * ( VAR_2 . METHOD_2 ( VAR_3 ) ) ) , ( FLOAT_1 * ( VAR_2 . METHOD_2 ( VAR_4 ) ) ) ) ; }
protected void execute ( ) { VAR_1 . METHOD_1 ( ( ( ( - 1 ) * FLOAT_1 ) * ( VAR_2 . METHOD_2 ( VAR_3 ) ) ) , ( FLOAT_1 * ( VAR_2 . METHOD_2 ( VAR_4 ) ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void main ( java.lang.String [ ] args ) { TYPE_1 VAR_1 = new TYPE_1 ( path ) ; VAR_1 . METHOD_1 ( true ) ; }
public static void main ( java.lang.String [ ] args ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_1 ( true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( final java.lang.String str ) { VAR_1 . METHOD_1 ( str ) ; VAR_2 . METHOD_2 ( str ) ; }
public void METHOD_2 ( final java.lang.String str ) { VAR_1 . METHOD_2 ( str ) ; VAR_2 . METHOD_2 ( str ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; java.lang.System.out.println ( VAR_1 ) ; }
private void METHOD_1 ( ) { VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < java.lang.Double > METHOD_1 ( ) { return VAR_1 . METHOD_2 ( ) ; }
public java.util.List < java.lang.Double > METHOD_1 ( ) { return VAR_1 . METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_3 . METHOD_2 ( VAR_4 ) ; }
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 ( ) { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_1 . METHOD_3 ( ) ; }
public void METHOD_1 ( ) { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_1 . METHOD_3 ( ) ; VAR_3 = null ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { java.lang.System.out.println ( STRING_1 ) ; long i = 0 ; boolean VAR_1 ; while ( true ) { VAR_1 = METHOD_2 ( ) ; if ( VAR_1 == false ) { i ++ ; } } }
public void METHOD_1 ( ) { METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_2 . METHOD_2 ( ) ) { VAR_2 . info ( STRING_1 , VAR_1 ) ; } super . METHOD_1 ( VAR_1 ) ; }
protected void METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_2 . METHOD_2 ( ) ) { VAR_2 . info ( STRING_1 , this . VAR_1 ) ; } super . METHOD_1 ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return new TYPE_1 ( ( STRING_1 + ( path ) ) , true ) ; }
public TYPE_1 METHOD_1 ( ) { return new TYPE_1 ( ( STRING_1 + ( path ) ) , false ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { if ( ! ( METHOD_2 ( VAR_1 ) ) ) return true ; else if ( VAR_1 instanceof TYPE_2 ) return false ; else return false ; }
public boolean METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 instanceof TYPE_2 ) return false ; if ( METHOD_2 ( VAR_1 ) ) return false ; else return true ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { TYPE_1 VAR_2 = new TYPE_2 ( ) ; this . VAR_1 = VAR_2 . METHOD_2 ( VAR_1 ) ; }
public void METHOD_1 ( java.lang.String VAR_1 ) { if ( VAR_1 != null ) { TYPE_1 VAR_2 = new TYPE_2 ( ) ; this . VAR_1 = VAR_2 . METHOD_2 ( VAR_1 ) ; } else this . VAR_1 = null ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 = VAR_2 . METHOD_2 ( VAR_3 class ) ; TYPE_1 VAR_4 = VAR_2 . METHOD_3 ( VAR_1 ) ; TYPE_2 . METHOD_4 ( VAR_4 ) ; return ; }
private void METHOD_1 ( ) { if ( ( VAR_2 ) != null ) { VAR_1 = VAR_2 . METHOD_2 ( VAR_3 class ) ; TYPE_1 VAR_4 = VAR_2 . METHOD_3 ( VAR_1 ) ; TYPE_2 . METHOD_4 ( VAR_4 ) ; } return ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { buffer . METHOD_1 ( ) ; }
public void METHOD_1 ( ) { synchronized ( this ) { buffer . METHOD_1 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_1 ( ) ; VAR_2 . add ( VAR_3 , VAR_1 ) ; } else { VAR_2 . show ( VAR_1 ) ; } }
private void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; VAR_2 . add ( VAR_3 , VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws TYPE_1 { android.content.Intent intent = new android.content.Intent ( this , VAR_1 class ) ; TYPE_2 . METHOD_2 ( ) ; METHOD_3 ( INT_1 ) ; METHOD_4 ( intent ) ; }
public void METHOD_1 ( ) { android.content.Intent intent = new android.content.Intent ( this , VAR_1 class ) ; TYPE_2 . METHOD_2 ( ) ; METHOD_4 ( intent ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean add ( TYPE_1 node ) { if ( node != null ) { VAR_1 . add ( node ) ; VAR_2 = this ; return true ; } return false ; }
public boolean add ( TYPE_1 node ) { if ( node != null ) { node . remove ( ) ; VAR_1 . add ( node ) ; VAR_2 = this ; return true ; } return false ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception { super . METHOD_1 ( VAR_1 ) ; VAR_2 . METHOD_2 ( STRING_1 ) ; VAR_1 . METHOD_3 ( TYPE_2 . METHOD_4 ( STRING_2 , TYPE_3 . METHOD_5 ( STRING_3 ) ) ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) throws java.lang.Exception { super . METHOD_1 ( VAR_1 ) ; VAR_1 . METHOD_3 ( TYPE_2 . METHOD_4 ( STRING_2 , TYPE_3 . METHOD_5 ( STRING_3 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { view . METHOD_2 ( ) ; view . METHOD_3 ( false ) ; VAR_2 . add ( VAR_1 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { view . METHOD_2 ( ) ; VAR_2 . add ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int position ) { TYPE_1 VAR_1 = null ; switch ( position ) { case 0 : VAR_1 = VAR_2 ; break ; case 1 : VAR_1 = VAR_3 ; break ; case INT_1 : VAR_1 = VAR_4 ; break ; } return VAR_1 ; }
public TYPE_1 METHOD_1 ( int position ) { TYPE_1 VAR_1 = null ; switch ( position ) { case 0 : VAR_1 = VAR_3 ; break ; case 1 : VAR_1 = VAR_2 ; break ; case INT_1 : VAR_1 = VAR_4 ; break ; } return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( ) { java.lang.String str = TYPE_1 . METHOD_2 ( java.lang.String . METHOD_3 ( ( ( TYPE_2 . METHOD_4 ( ) ) + ( ( INT_1 * INT_2 ) * INT_3 ) ) ) , VAR_1 ) ; return str ; }
private java.lang.String METHOD_1 ( ) { java.lang.String str = TYPE_1 . METHOD_2 ( java.lang.String . METHOD_3 ( TYPE_2 . METHOD_4 ( ) ) , VAR_1 ) ; return str ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { this . setText ( VAR_1 . METHOD_2 ( ) ) ; TYPE_2 VAR_2 = this . VAR_3 . get ( VAR_1 . getId ( ) ) ; this . METHOD_3 ( VAR_2 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = this . VAR_3 . get ( VAR_1 . getId ( ) ) ; this . setText ( VAR_1 . METHOD_2 ( ) ) ; this . METHOD_3 ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 VAR_1 = METHOD_2 ( ) ; java.lang.System.out.println ( STRING_1 ) ; if ( VAR_1 != null ) { java.lang.System.out.println ( STRING_2 ) ; VAR_2 = VAR_1 . METHOD_3 ( VAR_3 ) ; } else { VAR_2 = null ; } }
private void METHOD_1 ( ) { TYPE_1 VAR_1 = METHOD_2 ( ) ; if ( VAR_1 != null ) { VAR_2 = VAR_1 . METHOD_3 ( VAR_3 ) ; } else { VAR_2 = null ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( long VAR_1 ) { VAR_2 -= INT_1 ; VAR_3 . METHOD_2 ( VAR_2 ) ; if ( ( VAR_2 ) <= 0 ) { VAR_4 = true ; } VAR_5 = true ; }
public void METHOD_1 ( long VAR_1 ) { }
The following code may contain bugs. Write a refined code without bugs. public java.util.Set < TYPE_1 > METHOD_1 ( ) { java.util.Set < TYPE_1 > VAR_1 = new java.util.HashSet < > ( ) ; VAR_1 . add ( this ) ; METHOD_1 ( VAR_1 ) ; return VAR_1 ; }
public java.util.Set < TYPE_1 > METHOD_1 ( ) { java.util.Set < TYPE_1 > VAR_1 = new java.util.HashSet < > ( ) ; METHOD_1 ( VAR_1 ) ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( ) { return this . VAR_1 ; }
public java.util.List < TYPE_1 > METHOD_1 ( ) { return new java.util.LinkedList ( this . VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( java.lang.String name , java.lang.Object [ ] values , TYPE_1 VAR_1 ) { for ( int i = 0 ; i < ( values . length ) ; i ++ ) { METHOD_2 ( name , values [ i ] , VAR_1 ) ; } }
protected void METHOD_1 ( java.lang.String name , java.lang.String [ ] values , TYPE_1 VAR_1 ) { for ( int i = 0 ; i < ( values . length ) ; i ++ ) { METHOD_2 ( name , values [ i ] , VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = false ; if ( VAR_3 ) { if ( ( VAR_4 ) != null ) { VAR_4 . METHOD_2 ( ) ; } } }
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_3 ) { if ( ( VAR_4 ) != null ) { VAR_4 . METHOD_2 ( ) ; } VAR_3 = false ; } }
The following code may contain bugs. Write a refined code without bugs. public static int intValue ( java.lang.Object VAR_1 , int VAR_2 ) { if ( ( VAR_1 == null ) || ( STRING_1 . equals ( VAR_1 ) ) ) { return VAR_2 ; } return TYPE_1 . METHOD_1 ( VAR_1 , false ) ; }
public static int intValue ( java.lang.Object VAR_1 , int VAR_2 ) { if ( ( VAR_1 == null ) || ( STRING_1 . equals ( VAR_1 ) ) ) { return VAR_2 ; } return TYPE_1 . METHOD_1 ( VAR_1 , false ) . intValue ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.Integer METHOD_1 ( ) { int VAR_1 = METHOD_2 ( ) ; int VAR_2 = METHOD_3 ( ) ; return ( ( ( type . METHOD_1 ( ) ) * INT_1 ) + ( VAR_1 * INT_2 ) ) + VAR_2 ; }
public java.lang.Integer METHOD_1 ( ) { int VAR_1 = METHOD_2 ( ) ; int VAR_2 = METHOD_3 ( ) ; return ( ( ( getType ( ) . METHOD_1 ( ) ) * INT_1 ) + ( VAR_1 * INT_2 ) ) + VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; TYPE_1 . METHOD_3 ( new TYPE_2 ( ) ) ; VAR_1 . METHOD_4 ( ) ; } }
public void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; TYPE_1 . METHOD_3 ( new TYPE_2 ( ) ) ; } }
The following code may contain bugs. Write a refined code without bugs. private java.util.Map < java.lang.String , TYPE_1 > METHOD_1 ( ) { VAR_1 = TYPE_2 . METHOD_2 ( VAR_2 ) ; return VAR_1 ; }
private java.util.Map < java.lang.String , TYPE_1 > METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = TYPE_2 . METHOD_2 ( VAR_2 ) ; } return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { return METHOD_1 ( VAR_1 , false ) ; }
TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { return METHOD_1 ( VAR_1 , false , true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 , int VAR_2 , TYPE_1 intent ) { if ( VAR_1 == ( VAR_3 ) ) { METHOD_2 ( VAR_2 , intent ) ; } else { super . METHOD_1 ( VAR_1 , VAR_2 , intent ) ; } }
public void METHOD_1 ( int VAR_1 , int VAR_2 , android.content.Intent intent ) { if ( VAR_1 == ( VAR_3 ) ) { METHOD_2 ( VAR_2 , intent ) ; } else { super . METHOD_1 ( VAR_1 , VAR_2 , intent ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void handle ( TYPE_1 event ) { if ( ( event . METHOD_1 ( ) ) == ( VAR_1 ) ) { VAR_2 = false ; } if ( ( event . METHOD_1 ( ) ) == ( VAR_3 ) ) { VAR_4 = false ; } }
public void handle ( TYPE_1 event ) { if ( ( event . METHOD_1 ( ) ) == ( VAR_1 ) ) { VAR_2 = false ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View view ) { VAR_1 . show ( ) ; METHOD_2 ( ) ; }
public void METHOD_1 ( android.view.View view ) { METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public synchronized void METHOD_1 ( TYPE_1 message ) { VAR_1 . add ( message ) ; METHOD_2 ( ) ; }
protected synchronized void METHOD_1 ( TYPE_1 message ) { VAR_1 . add ( message ) ; METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { METHOD_2 ( TYPE_1 . METHOD_3 ( ) , VAR_1 , new TYPE_2 ( ) , VAR_2 ) ; }
protected void METHOD_1 ( ) { METHOD_2 ( TYPE_1 . METHOD_3 ( ) , VAR_1 ) ; METHOD_2 ( TYPE_1 . METHOD_3 ( ) , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws TYPE_1 { java.lang.String type = VAR_1 . String class . METHOD_2 ( ) ; java.lang.Object obj = TYPE_2 . METHOD_3 ( type ) ; TYPE_3 . fail ( STRING_1 ) ; }
public void METHOD_1 ( ) throws TYPE_1 { java.lang.String type = VAR_1 . String class . METHOD_2 ( ) ; java.lang.Object obj = TYPE_2 . METHOD_3 ( type ) ; }
The following code may contain bugs. Write a refined code without bugs. public static int size ( ) { int i = 0 ; for ( TYPE_1 p : TYPE_1 . values ( ) ) { i ++ ; } return i ; }
public static int size ( ) { return TYPE_1 . values ( ) . length ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { boolean VAR_3 = VAR_4 . METHOD_2 ( VAR_1 , VAR_2 ) ; TYPE_1 . info ( ( STRING_1 + VAR_2 ) , VAR_1 , VAR_3 ) ; return VAR_3 ; }
public boolean METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 ) { boolean VAR_3 = VAR_4 . METHOD_2 ( VAR_1 , VAR_2 ) ; TYPE_1 . info ( STRING_1 , VAR_2 , VAR_1 , VAR_3 ) ; return VAR_3 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { TYPE_1 . METHOD_2 ( true ) ; android.content.Intent VAR_2 = new android.content.Intent ( this , VAR_3 class ) ; METHOD_3 ( VAR_2 ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { android.content.Intent VAR_2 = new android.content.Intent ( this , VAR_3 class ) ; METHOD_3 ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( java.lang.String date , android.content.Context VAR_1 ) ;
void METHOD_1 ( java.lang.String date , android.content.Context VAR_1 , java.lang.String id ) ;
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 i ) { return VAR_1 . METHOD_2 ( i ) ; }
public boolean METHOD_1 ( TYPE_1 i ) { return VAR_1 . get ( i ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { boolean VAR_1 = VAR_2 . METHOD_2 ( ) ; if ( ! VAR_1 ) { VAR_3 = VAR_4 ; VAR_5 . METHOD_3 ( ) ; } }
public void METHOD_1 ( ) { boolean VAR_1 = false ; if ( ( VAR_2 ) != null ) { VAR_1 = VAR_2 . METHOD_2 ( ) ; } if ( ! VAR_1 ) { VAR_3 = VAR_4 ; VAR_5 . METHOD_3 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { METHOD_2 ( ) ; } super . METHOD_1 ( ) ; }
protected void METHOD_1 ( ) { METHOD_2 ( ) ; super . METHOD_1 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { TYPE_1 VAR_1 = ( ( TYPE_1 ) ( METHOD_2 ( VAR_2 ) ) ) ; return VAR_1 . METHOD_3 ( ) . toString ( ) ; }
public java.lang.String METHOD_1 ( ) { return VAR_1 . METHOD_3 ( ) . toString ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 result ) { if ( this . equals ( result ) ) { return this ; } this . VAR_1 = result ; return result ; }
public TYPE_1 METHOD_1 ( TYPE_1 result ) { this . VAR_1 = result ; return result ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , java.lang.String VAR_3 , java.lang.String [ ] args ) { return METHOD_2 ( ( ( TYPE_3 ) ( VAR_1 ) ) , VAR_3 , args ) ; }
public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , java.lang.String VAR_3 , java.lang.String [ ] args ) { return METHOD_2 ( VAR_1 , VAR_3 , args ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( this . METHOD_2 ( ) ) { this . endTime = ( TYPE_1 . METHOD_3 ( ) ) * ( VAR_1 ) ; VAR_2 = false ; } }
public void METHOD_1 ( ) { if ( this . METHOD_2 ( ) ) { this . endTime = TYPE_1 . METHOD_3 ( ) ; VAR_2 = false ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int id ) { this . id = id ; METHOD_2 ( TYPE_1 . METHOD_3 ( ) ) ; }
public void METHOD_1 ( int id ) { this . id = id ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { java.util.Collection < TYPE_1 > VAR_1 = VAR_2 . METHOD_2 ( VAR_3 , VAR_4 , null ) ; TYPE_2 . assertThat ( VAR_1 , TYPE_3 . METHOD_3 ( INT_1 ) ) ; }
public void METHOD_1 ( ) { java.util.Collection < TYPE_1 > VAR_1 = VAR_2 . METHOD_2 ( VAR_3 , VAR_4 , null ) ; assertThat ( VAR_1 , TYPE_3 . METHOD_3 ( INT_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { if ( VAR_1 ) { METHOD_2 ( ) ; METHOD_3 ( ) ; METHOD_4 ( ) ; METHOD_5 ( ) ; METHOD_6 ( ) ; } else { } }
public void METHOD_1 ( ) { if ( VAR_1 ) { METHOD_2 ( ) ; METHOD_3 ( ) ; METHOD_5 ( ) ; METHOD_6 ( ) ; } else { } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View view , TYPE_1 VAR_1 ) { METHOD_2 ( view ) ; METHOD_3 ( view ) ; METHOD_4 ( view ) ; METHOD_5 ( view ) ; }
public void METHOD_1 ( android.view.View view , TYPE_1 VAR_1 ) { METHOD_2 ( view ) ; METHOD_4 ( view ) ; METHOD_5 ( view ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( java.util.Collection < java.io.File > VAR_1 , TYPE_1 VAR_2 ) { TYPE_2 VAR_3 = new TYPE_2 ( VAR_1 , VAR_2 ) ; VAR_4 . execute ( VAR_3 ) ; }
public static void METHOD_1 ( java.util.Collection < java.io.File > VAR_1 , TYPE_1 VAR_2 ) { VAR_4 . execute ( new TYPE_2 ( VAR_1 , VAR_2 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { TYPE_1 VAR_2 = new TYPE_1 ( ) ; VAR_2 . show ( METHOD_2 ( ) , STRING_1 ) ; VAR_2 . METHOD_3 ( VAR_3 , false ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { TYPE_1 VAR_2 = new TYPE_1 ( ) ; VAR_2 . show ( METHOD_2 ( ) , STRING_1 ) ; VAR_2 . METHOD_3 ( false ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( int VAR_1 ) { if ( ( VAR_1 >= 0 ) && ( VAR_1 < ( VAR_2 ) ) ) { VAR_3 = VAR_1 - 1 ; } }
public static void METHOD_1 ( int VAR_1 ) { if ( ( VAR_1 >= 1 ) && ( VAR_1 < ( VAR_2 ) ) ) { VAR_3 = VAR_1 - 1 ; } }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( android.content.Context context ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_1 ( context ) ; } return VAR_1 ; }
public static TYPE_1 METHOD_1 ( android.content.Context context ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_1 ( context ) ; } return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int x ) { }
public TYPE_1 METHOD_1 ( int x ) { return this ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int text ) { TYPE_1 . METHOD_2 ( this , text , VAR_1 ) . show ( ) ; }
public void METHOD_1 ( java.lang.String text ) { TYPE_1 . METHOD_2 ( this , text , VAR_1 ) . show ( ) ; }
The following code may contain bugs. Write a refined code without bugs. int METHOD_1 ( double VAR_1 ) { return TYPE_1 . METHOD_2 ( ( ( java.lang.Math.round ( ( ( VAR_1 * ( VAR_2 ) ) * FLOAT_1 ) ) ) / FLOAT_1 ) ) ; }
int METHOD_1 ( double VAR_1 ) { return TYPE_1 . METHOD_2 ( ( ( java.lang.Math.round ( ( ( ( VAR_1 - ( offset ) ) * ( VAR_2 ) ) * FLOAT_1 ) ) ) / FLOAT_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 , int type ) { METHOD_2 ( VAR_1 ) ; METHOD_3 ( type ) ; METHOD_4 ( ) ; METHOD_5 ( ) ; METHOD_6 ( ) ; }
private void METHOD_1 ( int VAR_1 , int type ) { METHOD_2 ( VAR_1 ) ; METHOD_3 ( type ) ; METHOD_4 ( ) ; METHOD_5 ( ) ; METHOD_6 ( ) ; }