input
stringlengths
96
415
output
stringlengths
18
303
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { android.content.Intent intent = new android.content.Intent ( VAR_1 . getContext ( ) , VAR_3 class ) ; VAR_1 . METHOD_2 ( intent , VAR_2 ) ; }
public static void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { if ( VAR_1 != null ) { android.content.Intent intent = new android.content.Intent ( VAR_1 . getContext ( ) , VAR_3 class ) ; VAR_1 . METHOD_2 ( intent , VAR_2 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String title ) { VAR_1 . METHOD_2 ( title ) ; }
public void METHOD_1 ( java.lang.String title ) { this . title = title ; if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( title ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void delete ( long key ) { super . delete ( key ) ; if ( ( this . VAR_1 ) != null ) { this . VAR_1 . METHOD_1 ( ) ; } ( this . key ) -- ; }
public void delete ( long key ) { super . delete ( key ) ; if ( ( this . VAR_1 ) != null ) { this . VAR_1 . METHOD_1 ( ) ; } this . key = key - 1 ; }
The following code may contain bugs. Write a refined code without bugs. public java.util.HashMap < java.lang.String , java.lang.String > METHOD_1 ( ) { return this . VAR_1 ; }
public java.util.HashMap < java.lang.String , java.lang.String > METHOD_1 ( ) { return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.util.Collection < ? extends TYPE_2 > VAR_1 ) { TYPE_3 . METHOD_2 ( ( ( this . VAR_1 ) != null ) , STRING_1 ) ; this . VAR_1 = VAR_1 ; return this ; }
public TYPE_1 METHOD_1 ( java.util.Collection < ? extends TYPE_2 > VAR_1 ) { TYPE_3 . METHOD_2 ( ( ( this . VAR_1 ) == null ) , STRING_1 ) ; this . VAR_1 = VAR_1 ; return this ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) throws TYPE_2 , java.io.IOException , TYPE_3 { VAR_2 . put ( VAR_1 . METHOD_2 ( ) , VAR_1 ) ; METHOD_3 ( ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) throws TYPE_2 , java.io.IOException , TYPE_3 { VAR_2 . put ( VAR_1 . getId ( ) , VAR_1 ) ; METHOD_3 ( ) ; }
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 ( STRING_1 , VAR_2 . METHOD_3 ( ) ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; if ( ( VAR_2 ) != null ) { VAR_1 . METHOD_2 ( STRING_1 , VAR_2 . METHOD_3 ( ) ) ; } }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( 1.0F , 1.0F , 1.0F , 1.0F ) ; TYPE_1 . METHOD_3 ( VAR_1 ) ; TYPE_1 . METHOD_4 ( VAR_2 ) ; TYPE_1 . METHOD_5 ( VAR_3 , VAR_4 ) ; }
private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( 1.0F , 1.0F , 1.0F , 1.0F ) ; TYPE_1 . METHOD_4 ( VAR_2 ) ; TYPE_1 . METHOD_3 ( VAR_1 ) ; TYPE_1 . METHOD_5 ( VAR_3 , VAR_4 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( ( VAR_1 . METHOD_2 ( ) ) == ( VAR_2 ) ) { VAR_3 = true ; java.lang.System.out.println ( STRING_1 ) ; } }
public void METHOD_1 ( TYPE_1 VAR_1 ) { }
The following code may contain bugs. Write a refined code without bugs. int METHOD_1 ( ) throws java.lang.Exception { return java.lang.Integer.parseInt ( METHOD_2 ( ) ) ; }
int METHOD_1 ( ) throws java.lang.Exception { return java.lang.Integer.parseInt ( this . METHOD_2 ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_1 ; if ( ( VAR_2 ) != null ) { TYPE_2 . METHOD_2 ( getContext ( ) , STRING_1 , VAR_3 ) . show ( ) ; METHOD_3 ( ) ; } }
protected void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = VAR_1 ; if ( ( VAR_2 ) != null ) { METHOD_3 ( ) ; } }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return ( VAR_1 ) && ( ( VAR_2 . METHOD_2 ( ) ) || ( VAR_2 . METHOD_3 ( ) ) ) ; }
public boolean METHOD_1 ( ) { return ( VAR_2 . METHOD_2 ( ) ) || ( VAR_2 . METHOD_3 ( ) ) ; }
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 ) { TYPE_1 VAR_3 = new TYPE_1 ( VAR_2 , VAR_1 ) ; VAR_4 . METHOD_2 ( VAR_3 ) ; }
public void METHOD_1 ( java.lang.String VAR_1 , java.lang.String title , java.lang.String VAR_2 ) { TYPE_1 VAR_3 = new TYPE_1 ( title , VAR_2 , VAR_1 ) ; VAR_4 . METHOD_2 ( VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 event ) { VAR_1 = new TYPE_2 ( VAR_2 ) ; TYPE_3 . METHOD_2 ( ) . METHOD_3 ( VAR_1 ) ; }
public void METHOD_1 ( TYPE_1 event ) { VAR_1 = new TYPE_2 ( VAR_2 , name ) ; TYPE_3 . METHOD_2 ( ) . METHOD_3 ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { synchronized ( VAR_2 ) { java.lang.System.out.println ( ( ( STRING_1 + ( VAR_1 . getClass ( ) . getName ( ) ) ) + STRING_2 ) ) ; VAR_2 . add ( VAR_1 ) ; } }
public void METHOD_1 ( TYPE_1 VAR_1 ) { synchronized ( VAR_2 ) { VAR_2 . add ( VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( android.content.Context c ) { VAR_1 = ( ( TYPE_1 ) ( c . METHOD_2 ( VAR_2 ) ) ) ; VAR_3 = ( ( TYPE_2 ) ( c . METHOD_2 ( VAR_4 ) ) ) ; context = c ; }
public static void METHOD_1 ( android.content.Context c ) { VAR_1 = ( ( TYPE_1 ) ( c . METHOD_2 ( VAR_2 ) ) ) ; VAR_3 = ( ( TYPE_2 ) ( c . METHOD_2 ( VAR_4 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 [ ] METHOD_1 ( ) { return new TYPE_1 [ ] { new TYPE_2 ( STRING_1 ) , new TYPE_3 ( ) , new TYPE_4 ( ) , new TYPE_2 ( VAR_1 ) } ; }
public TYPE_1 [ ] METHOD_1 ( ) { return new TYPE_1 [ ] { new TYPE_2 ( STRING_1 ) } ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( final TYPE_1 VAR_1 ) { if ( TYPE_2 . METHOD_2 ( this ) ) { VAR_2 = VAR_1 ; METHOD_3 ( ) . METHOD_4 ( VAR_1 ) ; METHOD_5 ( VAR_1 . getName ( ) ) ; } }
protected void METHOD_1 ( final TYPE_1 VAR_1 ) { if ( TYPE_2 . METHOD_2 ( this ) ) { VAR_2 = VAR_1 ; METHOD_5 ( VAR_1 . getName ( ) ) ; METHOD_3 ( ) . METHOD_4 ( VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 < TYPE_1 > VAR_2 , TYPE_1 VAR_3 ) { VAR_4 = true ; METHOD_2 ( VAR_1 , VAR_2 ) ; }
private void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 < TYPE_1 > VAR_2 , TYPE_1 VAR_3 ) { VAR_4 = true ; VAR_2 . add ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.content.Context context ) { super . METHOD_1 ( context ) ; VAR_1 = METHOD_2 ( ) ; }
public void METHOD_1 ( android.content.Context context ) { super . METHOD_1 ( context ) ; METHOD_2 ( ) ; }
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 = VAR_1 . split ( STRING_1 ) ; METHOD_2 ( ( String ? VAR_3 : VAR_2 ) ) ; { VAR_4 . add ( VAR_3 ) ; } }
public void METHOD_1 ( java.lang.String VAR_1 ) { java.lang.String [ ] VAR_2 = VAR_1 . split ( STRING_1 ) ; for ( java.lang.String VAR_3 : VAR_2 ) { VAR_4 . add ( VAR_3 ) ; } }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { VAR_1 = ( ( TYPE_1 ) ( VAR_2 . METHOD_2 ( STRING_1 ) ) ) ; VAR_1 . METHOD_3 ( this ) ; }
private void METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = ( ( TYPE_1 ) ( VAR_2 . METHOD_2 ( STRING_1 ) ) ) ; VAR_1 . METHOD_3 ( this ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void start ( ) { TYPE_1 . METHOD_1 ( ) . METHOD_2 ( VAR_1 ) ; VAR_2 = TYPE_1 . METHOD_1 ( ) . METHOD_3 ( VAR_1 ) ; VAR_3 = METHOD_4 ( ) ; VAR_3 . start ( ) ; }
public void start ( ) { TYPE_1 . METHOD_1 ( ) . METHOD_2 ( VAR_1 ) ; VAR_3 = METHOD_4 ( ) ; VAR_3 . start ( ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = METHOD_2 ( ) ; VAR_2 = METHOD_3 ( VAR_3 ) ; VAR_1 . put ( VAR_3 , VAR_2 ) ; } }
private void METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = METHOD_2 ( ) ; VAR_2 = METHOD_3 ( VAR_3 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String getName ( ) { }
public java.lang.String getName ( ) { return name ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( double VAR_1 ) { java.lang.System.out.println ( VAR_1 ) ; if ( VAR_1 > INT_1 ) { java.lang.System.out.println ( STRING_1 ) ; } else if ( VAR_1 >= FLOAT_1 ) { java.lang.System.out.println ( STRING_2 ) ; } else { java.lang.System.out.println ( STRING_3 ) ; } }
public static void METHOD_1 ( double VAR_1 ) { if ( VAR_1 > INT_1 ) { java.lang.System.out.println ( STRING_1 ) ; } else if ( VAR_1 >= FLOAT_1 ) { java.lang.System.out.println ( STRING_2 ) ; } else { java.lang.System.out.println ( STRING_3 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void set ( java.util.List VAR_1 , int VAR_2 ) { VAR_3 . METHOD_1 ( ) ; VAR_4 . METHOD_1 ( ) ; METHOD_2 ( VAR_1 , VAR_2 ) ; }
public void set ( java.util.List VAR_1 , int VAR_2 ) { VAR_3 . METHOD_1 ( ) ; VAR_4 . METHOD_1 ( ) ; if ( VAR_1 == null ) { add ( null , VAR_2 ) ; } else { METHOD_2 ( VAR_1 , VAR_2 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public boolean equals ( java.lang.Object VAR_1 ) { return ( ( this ) == VAR_1 ) || ( ( VAR_1 . METHOD_1 ( TYPE_1 ) ) && ( VAR_2 . equals ( ( ( TYPE_1 ) ( VAR_1 ) ) . VAR_2 ) ) ) ; }
public boolean equals ( java.lang.Object VAR_1 ) { return ( ( this ) == VAR_1 ) || ( ( VAR_1 instanceof TYPE_1 ) && ( VAR_2 . equals ( ( ( TYPE_1 ) ( VAR_1 ) ) . VAR_2 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 status ) { java.lang.String id = VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) . get ( VAR_2 ) ; return ( METHOD_4 ( VAR_1 ) ) && ( METHOD_5 ( id , VAR_2 ) ) ; }
protected boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 status ) { return true ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String [ ] METHOD_1 ( ) throws java.io.IOException , TYPE_1 { return VAR_1 . METHOD_1 ( ) ; }
public java.lang.String [ ] METHOD_1 ( ) throws java.io.IOException , TYPE_1 { return ( VAR_1 ) != null ? VAR_1 . METHOD_1 ( ) : new java.lang.String [ 0 ] ; }
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( java.lang.Long VAR_1 ) { java.util.List < TYPE_1 > VAR_2 = null ; try { VAR_2 = VAR_3 . METHOD_2 ( VAR_1 ) ; } catch ( java.lang.Exception VAR_4 ) { VAR_4 . METHOD_3 ( ) ; } return VAR_2 ; }
public java.util.List < TYPE_1 > METHOD_1 ( java.lang.Long id ) { java.util.List < TYPE_1 > VAR_2 = null ; try { VAR_2 = VAR_3 . METHOD_2 ( id ) ; } catch ( java.lang.Exception VAR_4 ) { VAR_4 . METHOD_3 ( ) ; } return VAR_2 ; }
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 ( ) ; } }
protected void METHOD_1 ( ) { VAR_1 . METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.lang.String VAR_1 , TYPE_2 < TYPE_3 > VAR_2 ) throws java.io.IOException { return VAR_3 . METHOD_1 ( VAR_1 , VAR_4 , VAR_2 , true , null ) ; }
public TYPE_1 METHOD_1 ( java.lang.String VAR_1 , TYPE_2 < TYPE_3 > VAR_2 ) throws java.io.IOException { return VAR_3 . METHOD_1 ( VAR_1 , VAR_2 , true , null ) ; }
The following code may contain bugs. Write a refined code without bugs. public double METHOD_1 ( ) { if ( ( VAR_1 ) == 0 ) { return 0.0 ; } else { return ( VAR_2 ) / ( ( double ) ( VAR_3 ) ) ; } }
public double METHOD_1 ( ) { if ( ( VAR_3 ) == 0 ) { return 0.0 ; } else { return ( VAR_2 ) / ( ( double ) ( VAR_3 ) ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( boolean VAR_1 ) { int VAR_2 = ( VAR_1 ) ? VAR_3 : VAR_4 ; VAR_5 . METHOD_2 ( VAR_2 ) ; VAR_6 . METHOD_3 ( VAR_1 ) ; }
public void METHOD_1 ( boolean VAR_1 ) { if ( ( VAR_5 ) != null ) { int VAR_2 = ( VAR_1 ) ? VAR_3 : VAR_4 ; VAR_5 . METHOD_2 ( VAR_2 ) ; VAR_6 . METHOD_3 ( VAR_1 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . update ( ) ; }
public void METHOD_1 ( ) { VAR_1 . update ( true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.Object VAR_1 ) throws java.io.IOException { TYPE_1 VAR_2 = new TYPE_1 ( VAR_3 . METHOD_2 ( ) ) ; VAR_2 . METHOD_3 ( ( ( TYPE_2 ) ( VAR_1 ) ) ) ; }
public void METHOD_1 ( java.lang.Object VAR_1 ) throws java.io.IOException { VAR_2 . METHOD_3 ( ( ( TYPE_2 ) ( VAR_1 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void remove ( java.io.File key , java.io.File VAR_1 ) { java.util.Collection < java.io.File > VAR_2 = get ( key ) ; VAR_2 . remove ( VAR_1 ) ; set ( key , VAR_2 ) ; }
public void remove ( java.io.File key , java.io.File VAR_1 ) { java.util.Set < java.io.File > VAR_2 = new java.util.HashSet < > ( get ( key ) ) ; VAR_2 . remove ( VAR_1 ) ; set ( key , VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { if ( ! ( VAR_2 . getText ( ) . toString ( ) . equals ( STRING_1 ) ) ) { VAR_2 . setText ( STRING_2 ) ; VAR_3 . METHOD_2 ( VAR_4 ) ; } }
public void METHOD_1 ( android.view.View VAR_1 ) { if ( ! ( VAR_2 . getText ( ) . toString ( ) . equals ( STRING_2 ) ) ) { VAR_2 . setText ( STRING_2 ) ; VAR_3 . METHOD_2 ( VAR_4 ) ; } }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return ( this . VAR_1 ) * INT_1 ; }
public int METHOD_1 ( ) { return ( this . VAR_1 ) % INT_1 ; }
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 source ) { return ( ( ( VAR_1 . METHOD_2 ( ) ) + STRING_1 ) + ( TYPE_2 . METHOD_3 ( VAR_1 ) ) ) + STRING_2 ; }
public static java.lang.String METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 source ) { return ( ( ( VAR_1 . METHOD_2 ( ) ) + STRING_1 ) + ( TYPE_2 . METHOD_3 ( source ) ) ) + STRING_2 ; }
The following code may contain bugs. Write a refined code without bugs. public int add ( int VAR_1 , int VAR_2 ) { return 0 ; }
public int add ( int VAR_1 , int VAR_2 ) { return VAR_1 + VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( int i ) { }
public int METHOD_1 ( int i , int j ) { return i - j ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( byte [ ] data ) ;
void METHOD_1 ( java.lang.String key , byte [ ] data ) ;
The following code may contain bugs. Write a refined code without bugs. public java.util.List < java.lang.String > METHOD_1 ( ) { return METHOD_2 ( null , true , true ) ; }
public java.util.List < java.lang.String > METHOD_1 ( ) { return METHOD_2 ( null , null , true ) ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_1 ( ) ; } java.lang.String VAR_2 = TYPE_2 . METHOD_2 ( ) ; return VAR_1 . METHOD_1 ( VAR_2 ) ; }
public boolean METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_1 ( ) ; } java.lang.String VAR_2 = TYPE_2 . METHOD_2 ( ) ; return true ; }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( java.util.Collection < ? extends TYPE_1 > c ) { throw new TYPE_2 ( ) ; }
public boolean METHOD_1 ( java.util.Collection < ? extends TYPE_1 > c ) { return METHOD_1 ( size ( ) , c ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = true ; view . METHOD_2 ( VAR_2 ) ; }
public void METHOD_1 ( ) { VAR_1 = true ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { java.lang.System.out.println ( ) ; java.lang.System.out.println ( STRING_1 ) ; VAR_1 . METHOD_2 ( ) ; }
public void METHOD_1 ( ) { java.lang.System.out.println ( STRING_1 ) ; VAR_1 . METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; METHOD_2 ( ) ; METHOD_3 ( VAR_1 ) ; }
public void METHOD_1 ( ) { super . METHOD_1 ( ) ; METHOD_2 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( this ) ; VAR_1 . METHOD_2 ( INT_1 , INT_2 , INT_1 , 0 , INT_3 , INT_4 ) ; return VAR_1 ; }
public TYPE_1 METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( this ) ; VAR_1 . METHOD_2 ( INT_4 , INT_4 , INT_4 , INT_4 , INT_3 , 0 ) ; return VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int x , int y ) { METHOD_2 ( x , y , false ) ; }
public void METHOD_1 ( int x , int y ) { METHOD_2 ( x , y , true ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 < TYPE_2 > VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; TYPE_3 . METHOD_3 ( VAR_1 , VAR_3 ) ; }
public void METHOD_1 ( ) { TYPE_1 < TYPE_2 > VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; METHOD_3 ( VAR_1 , VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( java.lang.String name ) { java.util.List < TYPE_1 > VAR_1 = METHOD_2 ( ) ; for ( TYPE_1 VAR_2 : VAR_1 ) { if ( METHOD_3 ( VAR_2 ) . contains ( name ) ) return VAR_2 ; } return null ; }
private TYPE_1 METHOD_1 ( java.lang.String name ) { java.util.List < TYPE_1 > VAR_1 = METHOD_2 ( ) ; for ( TYPE_1 VAR_2 : VAR_1 ) { if ( METHOD_3 ( VAR_2 ) . startsWith ( name ) ) return VAR_2 ; } return null ; }
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , java.lang.String VAR_3 , java.lang.String VAR_4 , java.lang.String VAR_5 ) { java.lang.System.out.println ( ( STRING_1 + VAR_2 ) ) ; super . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 , VAR_4 , VAR_5 ) ; }
protected void METHOD_1 ( java.lang.String VAR_1 , java.lang.String VAR_2 , java.lang.String VAR_3 , java.lang.String VAR_4 , java.lang.String VAR_5 ) { super . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 , VAR_4 , VAR_5 ) ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( int VAR_1 , java.util.List < TYPE_1 > VAR_2 ) { if ( VAR_2 == null ) { VAR_2 = new java.util.LinkedList < TYPE_1 > ( ) ; } VAR_2 . METHOD_2 ( VAR_1 , VAR_2 ) ; }
void METHOD_1 ( int VAR_1 , java.util.List < TYPE_1 > VAR_2 ) { if ( ( this . VAR_2 ) == null ) { this . VAR_2 = new java.util.LinkedList < TYPE_1 > ( ) ; } this . VAR_2 . METHOD_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 ) { if ( ( VAR_2 ) != null ) VAR_2 . METHOD_2 ( VAR_1 , METHOD_3 ( ) ) ; }
public void METHOD_1 ( android.view.View VAR_1 ) { if ( ( VAR_2 ) != null ) { int p = METHOD_3 ( ) ; if ( p >= 0 ) VAR_2 . METHOD_2 ( VAR_1 , p ) ; } }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = this . METHOD_2 ( ) ; this . VAR_2 = VAR_3 ; this . y = VAR_1 . y ; this . x = VAR_1 . x ; this . VAR_4 = this . METHOD_3 ( ) ; }
public void METHOD_1 ( ) { TYPE_1 VAR_1 = this . METHOD_2 ( ) ; this . VAR_2 = VAR_3 ; this . y = VAR_1 . y ; this . x = VAR_1 . x ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String message ) { METHOD_2 ( STRING_1 , message , VAR_1 ) ; }
public void METHOD_1 ( java.lang.String message ) { METHOD_2 ( STRING_1 , message , VAR_1 , false ) ; }
The following code may contain bugs. Write a refined code without bugs. public static java.lang.String METHOD_1 ( final TYPE_1 line ) { java.lang.String message = line . METHOD_2 ( ) ; message = ( message != null ) ? TYPE_2 . METHOD_3 ( message ) : STRING_1 ; return TYPE_2 . METHOD_4 ( message ) ; }
public static java.lang.String METHOD_1 ( final TYPE_1 line ) { java.lang.String message = line . METHOD_2 ( ) ; message = ( message != null ) ? TYPE_2 . METHOD_4 ( message ) : STRING_1 ; return TYPE_2 . METHOD_3 ( message ) ; }
The following code may contain bugs. Write a refined code without bugs. TYPE_1 < java.lang.Void > METHOD_1 ( java.util.List < TYPE_2 > VAR_1 ) ;
METHOD_1 ( java.util.List < TYPE_2 > VAR_1 ) { }
The following code may contain bugs. Write a refined code without bugs. protected java.lang.String METHOD_1 ( TYPE_1 obj ) { }
protected java.lang.String METHOD_1 ( ) { return position ; }
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 ( STRING_1 ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; }
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 ) ; java.lang.System.out.println ( STRING_2 ) ; java.lang.System.out.println ( STRING_3 ) ; VAR_1 . METHOD_1 ( STRING_4 ) ; java.lang.System.out.println ( STRING_5 ) ; }
public static void main ( java.lang.String [ ] args ) { java.lang.System.out.println ( STRING_1 ) ; java.lang.System.out.println ( STRING_2 ) ; java.lang.System.out.println ( STRING_3 ) ; java.lang.System.out.println ( STRING_4 ) ; java.lang.System.out.println ( STRING_5 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { long VAR_1 = TYPE_1 . METHOD_2 ( ) ; assert ( VAR_2 ) != null : STRING_1 ; VAR_3 . add ( ( VAR_1 - ( VAR_2 ) ) ) ; VAR_2 = null ; }
public void METHOD_1 ( ) { long VAR_1 = TYPE_1 . METHOD_2 ( ) ; if ( ( VAR_2 ) == null ) { VAR_2 = VAR_1 ; } VAR_3 . add ( ( VAR_1 - ( VAR_2 ) ) ) ; VAR_2 = null ; }
The following code may contain bugs. Write a refined code without bugs. private void init ( ) { TYPE_1 . METHOD_1 ( this , new TYPE_2 ( this , VAR_1 , VAR_2 , VAR_3 ) ) ; }
private void init ( ) { }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { java.lang.System.out.println ( ( STRING_1 + VAR_1 ) ) ; }
public void METHOD_1 ( TYPE_1 VAR_1 ) { java.lang.System.out.println ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 error , TYPE_2 VAR_1 , java.lang.String args ) throws java.io.IOException { java.lang.System.out.println ( VAR_1 ) ; METHOD_1 ( error , VAR_1 . METHOD_2 ( ) , args ) ; }
public void METHOD_1 ( TYPE_1 error , TYPE_2 VAR_1 , java.lang.String args ) throws java.io.IOException { METHOD_1 ( error , VAR_1 . METHOD_2 ( ) , args ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . i ( VAR_1 , STRING_1 ) ; METHOD_2 ( true ) ; VAR_2 . METHOD_3 ( INT_1 ) ; METHOD_4 ( ) ; }
public void METHOD_1 ( ) { TYPE_1 . i ( VAR_1 , STRING_1 ) ; VAR_2 . METHOD_3 ( INT_1 ) ; METHOD_4 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { TYPE_2 . METHOD_1 ( VAR_1 , VAR_2 , null ) ; }
public void METHOD_1 ( java.lang.String VAR_1 , TYPE_1 VAR_2 ) { METHOD_1 ( VAR_1 , VAR_2 , null ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { for ( TYPE_1 VAR_1 : VAR_2 . METHOD_2 ( ) ) { if ( ( VAR_3 . METHOD_3 ( VAR_1 ) ) == false ) VAR_3 . put ( VAR_1 , TYPE_2 . METHOD_4 ( ) ) ; } VAR_4 = true ; }
public void METHOD_1 ( ) { for ( TYPE_1 VAR_1 : VAR_2 . METHOD_2 ( ) ) { if ( ! ( VAR_3 . METHOD_3 ( VAR_1 ) ) ) VAR_3 . put ( VAR_1 , TYPE_2 . METHOD_4 ( ) ) ; } VAR_4 = true ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = ( ( TYPE_2 ) ( VAR_1 . METHOD_2 ( VAR_3 ) ) ) ; }
private void METHOD_1 ( android.view.View VAR_1 ) { VAR_2 = ( ( TYPE_2 ) ( VAR_1 . METHOD_2 ( VAR_3 ) ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_2 ( VAR_2 , VAR_3 < TYPE_1 > METHOD_2 ( ) ) ; VAR_1 . METHOD_3 ( ) ; } return VAR_1 . METHOD_4 ( ) ; }
public java.util.List < TYPE_1 > METHOD_1 ( ) { if ( ( VAR_1 ) == null ) { VAR_1 = new TYPE_2 ( VAR_2 , VAR_3 < TYPE_1 > METHOD_2 ( ) ) ; } return VAR_1 . METHOD_4 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public double METHOD_1 ( int VAR_1 ) { double VAR_2 ; if ( VAR_1 == INT_1 ) { VAR_2 = FLOAT_1 ; } else { VAR_2 = FLOAT_2 ; } return VAR_2 ; }
public double METHOD_1 ( int VAR_1 ) { double VAR_2 = 0 ; if ( VAR_1 == INT_1 ) { VAR_2 = FLOAT_1 ; } else { VAR_2 = FLOAT_2 ; } return VAR_2 ; }
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( TYPE_1 VAR_1 ) { return TYPE_2 . METHOD_2 ( ) . equals ( METHOD_3 ( VAR_1 ) ) ; }
private boolean METHOD_1 ( TYPE_1 VAR_1 ) { if ( null == VAR_1 ) return false ; return TYPE_2 . METHOD_2 ( ) . equals ( METHOD_3 ( VAR_1 ) ) ; }
The following code may contain bugs. Write a refined code without bugs. protected boolean METHOD_1 ( ) { return ( METHOD_2 ( ) ) != null ; }
protected boolean METHOD_1 ( ) { return true ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; VAR_2 . METHOD_3 ( ) ; TYPE_2 . METHOD_4 ( ) ; VAR_3 . METHOD_5 ( false ) ; VAR_3 = null ; TYPE_3 . METHOD_6 ( VAR_4 ) ; }
public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , STRING_1 ) ; VAR_2 . METHOD_3 ( ) ; VAR_3 . METHOD_5 ( false ) ; VAR_3 = null ; TYPE_3 . METHOD_6 ( VAR_4 ) ; TYPE_2 . METHOD_4 ( ) ; VAR_2 = null ; }
The following code may contain bugs. Write a refined code without bugs. public long METHOD_1 ( ) { return ( VAR_1 ) + ( VAR_2 . get ( ) ) ; }
public long METHOD_1 ( ) { return ( VAR_1 ) + ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { if ( ( this . VAR_1 ) != null ) { this . VAR_1 . METHOD_2 ( getValue ( ) ) ; } }
public void METHOD_1 ( ) { if ( ( this . VAR_1 ) != null ) { this . VAR_1 . METHOD_2 ( getValue ( ) ) ; } }
The following code may contain bugs. Write a refined code without bugs. protected abstract java.lang.String METHOD_1 ( ) ;
public abstract java.lang.String METHOD_1 ( ) ;
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View view ) { METHOD_2 ( view ) ; getActivity ( ) . METHOD_3 ( view ) ; }
public void METHOD_1 ( android.view.View view ) { getActivity ( ) . METHOD_3 ( view ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( TYPE_1 VAR_1 , java.lang.String id ) { java.lang.System.out.println ( id ) ; VAR_2 . METHOD_2 ( id ) ; return STRING_1 ; }
public java.lang.String METHOD_1 ( TYPE_1 VAR_1 , java.lang.String id ) { VAR_2 . METHOD_2 ( id ) ; return STRING_1 ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { VAR_1 = VAR_2 . METHOD_2 ( ) ; return VAR_1 ; }
public void METHOD_1 ( ) { this . VAR_1 = 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 VAR_1 = TYPE_1 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( ) ; return VAR_1 . substring ( 0 , ( ( VAR_1 . length ( ) ) - INT_1 ) ) ; }
public java.lang.String METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 c ) { if ( ( VAR_1 ) != null ) c . METHOD_2 ( ) ; VAR_1 = c ; METHOD_3 ( ) ; }
public void METHOD_1 ( TYPE_1 c ) { if ( ( VAR_1 ) != null ) VAR_1 . METHOD_2 ( ) ; VAR_1 = c ; METHOD_3 ( ) ; }
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( ) { try { return VAR_1 . METHOD_2 ( 1 ) ? 0 : 1 ; } catch ( TYPE_1 VAR_2 ) { VAR_2 . METHOD_3 ( ) ; } return 0 ; }
private boolean METHOD_1 ( ) { try { return VAR_1 . METHOD_2 ( 1 ) ; } catch ( TYPE_1 VAR_2 ) { VAR_2 . METHOD_3 ( ) ; return false ; } }
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return new TYPE_1 ( VAR_2 . getValue ( ) ) ; }
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 ) { return new TYPE_1 ( VAR_2 . getValue ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_1 = ( ( VAR_1 == null ) || ( VAR_1 . trim ( ) . isEmpty ( ) ) ) ? VAR_2 : VAR_1 ; }
public void METHOD_1 ( java.lang.String VAR_1 ) { this . VAR_1 = ( ( VAR_1 == null ) || ( VAR_1 . trim ( ) . isEmpty ( ) ) ) ? null : VAR_1 ; }
The following code may contain bugs. Write a refined code without bugs. public synchronized void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = METHOD_2 ( VAR_1 ) ; synchronized ( this ) { if ( VAR_2 != null ) { VAR_2 . METHOD_3 ( null ) ; return ; } } throw new TYPE_3 ( ) ; }
public synchronized void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = METHOD_2 ( VAR_1 ) ; synchronized ( this ) { if ( VAR_2 != null ) { VAR_2 . METHOD_3 ( null ) ; return ; } } }
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return TYPE_1 . METHOD_2 ( this ) . getBoolean ( VAR_1 , false ) ; }
public boolean METHOD_1 ( ) { return false ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( STRING_1 ) ; METHOD_3 ( VAR_1 ) ; METHOD_4 ( ) ; VAR_2 . METHOD_5 ( 0 , METHOD_6 ( ) , VAR_3 , this ) ; METHOD_7 ( VAR_1 ) ; TYPE_1 . METHOD_2 ( STRING_2 ) ; }
public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( STRING_1 ) ; METHOD_3 ( VAR_1 ) ; METHOD_4 ( ) ; VAR_2 . METHOD_5 ( 0 , METHOD_6 ( ) , VAR_3 , this ) ; TYPE_1 . METHOD_2 ( STRING_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. protected void init ( TYPE_1 VAR_1 ) { VAR_2 = new TYPE_2 ( this , this ) ; METHOD_1 ( ) ; TYPE_3 . init ( VAR_2 ) ; TYPE_3 . METHOD_2 ( ) . METHOD_3 ( VAR_3 ) ; }
protected void init ( TYPE_1 VAR_1 ) { VAR_2 = new TYPE_2 ( this , this ) ; METHOD_1 ( ) ; TYPE_3 . init ( VAR_2 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { try { return TYPE_2 . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 ) ; } catch ( TYPE_3 VAR_4 ) { throw new TYPE_4 ( VAR_4 ) ; } }
public TYPE_1 METHOD_1 ( ) throws TYPE_3 { return TYPE_2 . METHOD_1 ( VAR_1 , VAR_2 , VAR_3 ) ; }
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 add ( TYPE_1 VAR_1 ) { VAR_1 . METHOD_1 ( new java.util.Date ( ) ) ; VAR_1 . METHOD_2 ( new java.util.Date ( ) ) ; VAR_1 . METHOD_3 ( new java.util.Date ( ) ) ; return VAR_2 . METHOD_4 ( VAR_1 ) ; }
public TYPE_1 add ( TYPE_1 VAR_1 ) { return VAR_2 . METHOD_4 ( VAR_1 ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( TYPE_1 context , TYPE_2 VAR_1 , java.lang.Object VAR_2 ) { if ( VAR_2 != null ) return java.lang.String . METHOD_2 ( ( ( TYPE_3 ) ( VAR_2 ) ) . getId ( ) ) ; return STRING_1 ; }
public java.lang.String METHOD_1 ( TYPE_1 context , TYPE_2 VAR_1 , java.lang.Object VAR_2 ) { return java.lang.String . METHOD_2 ( ( ( TYPE_3 ) ( VAR_2 ) ) . getId ( ) ) ; }
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { java.lang.String type = VAR_1 ; return ( type + STRING_1 ) + ( TYPE_1 . METHOD_2 ( VAR_2 . METHOD_3 ( type , 1 ) . METHOD_4 ( ) , INT_1 , "0" ) ) ; }
public java.lang.String METHOD_1 ( ) { return null ; }
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( int target , TYPE_1 data , int VAR_1 ) ;
public abstract void METHOD_1 ( int target , TYPE_1 data , int VAR_1 ) ;
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( java.lang.String path , TYPE_2 VAR_1 , int VAR_2 , TYPE_3 VAR_3 ) { return TYPE_1 . METHOD_1 ( path , VAR_1 , VAR_2 , VAR_3 , null ) ; }
public static TYPE_1 METHOD_1 ( java.lang.String path , TYPE_2 VAR_1 , int VAR_2 , TYPE_3 VAR_3 ) { return TYPE_1 . METHOD_1 ( path , VAR_1 , VAR_2 , 0 , VAR_3 , null ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 . fail ( ) ; }
public void METHOD_1 ( ) throws java.lang.Exception { fail ( ) ; }
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( false ) ; VAR_2 . setEnabled ( false ) ; if ( ( ( VAR_3 ) != null ) && ( VAR_3 . METHOD_3 ( ) ) ) { METHOD_4 ( ) ; } }
public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . METHOD_2 ( false ) ; VAR_2 . setEnabled ( false ) ; if ( ( ( VAR_3 ) != null ) || ( VAR_3 . METHOD_3 ( ) ) ) { METHOD_4 ( ) ; } }