input stringlengths 96 415 | output stringlengths 18 303 |
|---|---|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 value ( ) { return t ; } | public java.lang.Double value ( ) { return t . get ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void set ( float value ) { if ( ( java.lang.Math.abs ( ( ( VAR_1 ) - value ) ) ) > VAR_2 ) { out . METHOD_1 ( ) ; } } | public void set ( float value ) { if ( ( java.lang.Math.abs ( ( ( VAR_1 ) - value ) ) ) > VAR_2 ) { VAR_1 = value ; out . METHOD_1 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return METHOD_2 ( TYPE_1 . METHOD_3 ( VAR_1 ) ) . METHOD_1 ( TYPE_1 . METHOD_4 ( VAR_1 ) ) ; } | public TYPE_1 METHOD_1 ( TYPE_1 VAR_1 ) { return METHOD_2 ( TYPE_1 . METHOD_3 ( VAR_1 ) ) . METHOD_1 ( VAR_1 . METHOD_4 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void update ( java.util.ArrayList < TYPE_1 > VAR_1 , TYPE_2 VAR_2 , double VAR_3 , TYPE_3 VAR_4 , TYPE_4 time , TYPE_5 VAR_5 ) { } | public void update ( java.util.ArrayList < TYPE_1 > VAR_1 , double VAR_3 , TYPE_3 VAR_4 , TYPE_4 time , TYPE_5 VAR_5 ) { }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_2 ( VAR_1 . METHOD_2 ( ) ) ; VAR_2 . METHOD_3 ( VAR_3 ) ; VAR_2 . METHOD_4 ( ) ; return false ; } | private boolean METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_2 ( VAR_1 . METHOD_2 ( ) ) ; VAR_2 . METHOD_3 ( VAR_3 ) ; VAR_2 . METHOD_4 ( ) ; return true ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( ) { if ( METHOD_2 ( ) ) { return true ; } if ( METHOD_3 ( VAR_1 ) ) { return true ; } return false ; } | private boolean METHOD_1 ( ) { if ( METHOD_2 ( ) ) return true ; if ( METHOD_3 ( VAR_1 ) ) return true ; return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String key ) { try { VAR_1 . remove ( ( ( METHOD_2 ( ) ) + key ) , METHOD_2 ( ) ) ; } catch ( java.lang.Exception VAR_2 ) { TYPE_1 . METHOD_3 ( this , STRING_1 , VAR_2 ) ; } } | public void METHOD_1 ( java.lang.String key ) { try { VAR_1 . remove ( key , METHOD_2 ( ) ) ; } catch ( java.lang.Exception VAR_2 ) { TYPE_1 . METHOD_3 ( this , STRING_1 , VAR_2 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( METHOD_3 ( ) ) ; TYPE_2 . METHOD_4 ( this ) ; } | protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( METHOD_3 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean isEmpty ( ) { return ( VAR_1 . p ) == null ; } | public boolean isEmpty ( ) { return ( this . size ( ) ) == 0 ; }
|
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( int VAR_1 , int VAR_2 , int VAR_3 ) { assert VAR_3 >= VAR_2 ; int VAR_4 = ( VAR_3 - VAR_2 ) + 1 ; return min ( VAR_1 , VAR_4 ) ; } | private int METHOD_1 ( int VAR_1 , int VAR_2 , int VAR_3 ) { assert VAR_3 >= VAR_2 ; if ( VAR_2 == VAR_3 ) { return VAR_1 ; } int VAR_4 = ( VAR_3 - VAR_2 ) + 1 ; return min ( VAR_1 , VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { return ( data . size ( ) ) + 1 ; } | public int METHOD_1 ( ) { return data . size ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) throws TYPE_2 { return VAR_1 . METHOD_2 ( VAR_2 , ( ( java.lang.Math.random ( ) ) * INT_1 ) , ( ( java.lang.Math.random ( ) ) * INT_2 ) ) ; } | private TYPE_1 METHOD_1 ( ) throws TYPE_2 { return VAR_1 . METHOD_2 ( VAR_2 , ( ( java.lang.Math.random ( ) ) * INT_1 ) , ( ( java.lang.Math.random ( ) ) * INT_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) { if ( ( VAR_2 ) != null ) { this . VAR_1 = VAR_1 ; VAR_2 . METHOD_2 ( ) ; } TYPE_1 . METHOD_3 ( STRING_1 , STRING_2 ) ; } | public void METHOD_1 ( java.lang.String VAR_1 ) { if ( ( VAR_2 ) != null ) { this . VAR_1 = VAR_1 ; VAR_2 . METHOD_2 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. private float METHOD_1 ( float VAR_1 ) { return ( ( float ) ( VAR_1 * FLOAT_1 ) ) ; } | protected float METHOD_1 ( float VAR_1 ) { return ( ( float ) ( VAR_1 * FLOAT_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( VAR_1 , VAR_2 , null , null , parameters . METHOD_3 ( ) , parameters . METHOD_4 ( ) , parameters . METHOD_5 ( ) ) ; } | public void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( parameters . METHOD_4 ( ) , parameters . METHOD_3 ( ) , VAR_1 , VAR_2 , parameters . METHOD_5 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String getName ( ) { if ( ( field ) != null ) { return field . getName ( ) ; } else { return VAR_1 . getName ( ) ; } } | public java.lang.String getName ( ) { return VAR_1 . getName ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { java.lang.String VAR_1 = METHOD_2 ( data ) . replaceAll ( STRING_1 , STRING_2 ) ; VAR_2 . METHOD_3 ( ( ( STRING_3 + VAR_1 ) + STRING_4 ) ) ; TYPE_1 . METHOD_4 ( STRING_5 , VAR_1 ) ; } | public void METHOD_1 ( ) { VAR_2 . METHOD_3 ( ( ( STRING_3 + data ) + STRING_4 ) ) ; TYPE_1 . METHOD_4 ( STRING_5 , data ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( ) { if ( ( length ) == 0 ) throw new TYPE_1 ( STRING_1 ) ; return length ; } | public int METHOD_1 ( ) { return length ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < TYPE_1 > METHOD_1 ( ) { java.util.List < TYPE_1 > VAR_1 = new java.util.ArrayList < TYPE_1 > ( ) ; VAR_1 = VAR_2 . METHOD_2 ( false , true , false ) ; return VAR_1 ; } | public java.util.List < TYPE_1 > METHOD_1 ( ) { java.util.List < TYPE_1 > VAR_1 = new java.util.ArrayList < TYPE_1 > ( ) ; VAR_1 = VAR_2 . METHOD_2 ( true , false , false ) ; return VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { for ( TYPE_1 VAR_1 : VAR_2 ) { java.lang.System.out.println ( VAR_1 ) ; } java.lang.System.out.println ( "\n" ) ; TYPE_2 VAR_3 = new TYPE_2 ( ) ; VAR_3 . init ( ) ; } | public void METHOD_1 ( ) { for ( TYPE_1 VAR_1 : VAR_2 ) { java.lang.System.out.println ( VAR_1 ) ; } java.lang.System.out.println ( "\n" ) ; VAR_3 . init ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 . METHOD_2 ( ) . METHOD_3 ( 0 ) ; } | public void execute ( ) { VAR_1 . METHOD_2 ( ) . METHOD_3 ( 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 == null ) throw new java.lang.NullPointerException ( STRING_1 ) ; return VAR_2 . contains ( VAR_2 ) ? false : VAR_2 . add ( VAR_1 ) ; } | public boolean METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 == null ) throw new java.lang.NullPointerException ( STRING_1 ) ; return VAR_2 . contains ( VAR_1 ) ? false : VAR_2 . add ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int position ) { try { return VAR_1 . get ( position ) ; } catch ( TYPE_2 VAR_2 ) { return null ; } } | public TYPE_1 METHOD_1 ( int position ) { return VAR_1 . get ( position ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( android.content.Intent intent ) { int VAR_1 = intent . METHOD_2 ( VAR_2 , 0 ) ; if ( VAR_1 == 0 ) { VAR_3 = STRING_1 ; } VAR_4 . METHOD_3 ( VAR_1 ) ; } | private void METHOD_1 ( android.content.Intent intent ) { int VAR_1 = intent . METHOD_2 ( VAR_2 , 0 ) ; VAR_4 . METHOD_3 ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public synchronized void METHOD_1 ( java.lang.String VAR_1 , java.lang.String className , java.lang.String VAR_2 , java.lang.String error ) throws java.lang.Exception { this . METHOD_1 ( VAR_1 , className , VAR_2 , error ) ; } | public synchronized void METHOD_1 ( java.lang.String VAR_1 , java.lang.String className , java.lang.String VAR_2 , java.lang.String error ) throws java.lang.Exception { super . METHOD_1 ( VAR_1 , className , VAR_2 , error ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( null ) ; VAR_1 = null ; } VAR_2 . METHOD_3 ( null ) ; VAR_2 . METHOD_4 ( null ) ; } | void METHOD_1 ( ) { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( null ) ; VAR_1 = null ; } VAR_2 . METHOD_3 ( null ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.List < java.lang.String > METHOD_1 ( TYPE_1 VAR_1 , java.lang.String [ ] args ) { switch ( args.length ) { case INT_1 : return TYPE_2 . METHOD_2 ( args ) ; case INT_2 : return TYPE_2 . METHOD_3 ( args ) ; default : return null ; } } | public java.util.List < java.lang.String > METHOD_1 ( TYPE_1 VAR_1 , java.lang.String [ ] args ) { switch ( args.length ) { case INT_1 : return METHOD_2 ( args ) ; case INT_2 : return METHOD_3 ( args ) ; default : return null ; } }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 error ) { TYPE_2 . METHOD_2 ( error . METHOD_3 ( ) ) ; } | public void METHOD_1 ( TYPE_1 error ) { }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_2 ( INT_1 ) ; TYPE_2 . assertTrue ( ( ( VAR_1 . METHOD_3 ( ) ) == INT_1 ) ) ; } | public void METHOD_1 ( ) { final int num = INT_1 ; TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_2 ( num ) ; TYPE_2 . assertTrue ( ( ( VAR_1 . METHOD_3 ( ) ) == num ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = this ; METHOD_2 ( ) ; METHOD_3 ( ) ; TYPE_1 . METHOD_4 ( ) ; } | public void METHOD_1 ( ) { VAR_1 = this ; METHOD_2 ( ) ; METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { return key . toString ( ) ; } | public java.lang.String METHOD_1 ( ) { return key . get ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.util.ArrayList < TYPE_1 > METHOD_1 ( TYPE_2 VAR_1 ) { java.util.ArrayList < TYPE_1 > VAR_2 = METHOD_2 ( VAR_3 ) ; VAR_4 . METHOD_3 ( VAR_2 ) ; java.lang.System.out.println ( STRING_1 ) ; return TYPE_3 . METHOD_4 ( METHOD_2 ( VAR_5 ) ) ; } | public java.util.ArrayList < TYPE_1 > METHOD_1 ( TYPE_2 VAR_1 ) { java.util.ArrayList < TYPE_1 > VAR_2 = METHOD_2 ( VAR_3 ) ; VAR_4 . METHOD_3 ( VAR_2 ) ; return TYPE_3 . METHOD_4 ( METHOD_2 ( VAR_5 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = true ; if ( ( VAR_3 ) != null ) { TYPE_2 VAR_4 = VAR_3 . METHOD_2 ( VAR_1 ) ; if ( VAR_4 != null ) { VAR_5 = VAR_4 ; } } } | private void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 = true ; if ( ( VAR_3 ) != null ) { VAR_5 = VAR_3 . METHOD_2 ( VAR_1 ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( VAR_2 ) ; TYPE_2 . METHOD_3 ( this ) ; VAR_3 . METHOD_4 ( this ) ; VAR_4 = TYPE_3 . METHOD_5 ( ) ; METHOD_6 ( ) ; } | protected void METHOD_1 ( TYPE_1 VAR_1 ) { super . METHOD_1 ( VAR_1 ) ; METHOD_2 ( VAR_2 ) ; TYPE_2 . METHOD_3 ( this ) ; VAR_3 . METHOD_4 ( this ) ; VAR_4 = TYPE_3 . METHOD_5 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View view ) { VAR_1 . METHOD_2 ( ) ; VAR_1 . METHOD_3 ( 0 ) ; } | public void METHOD_1 ( android.view.View view ) { VAR_1 . METHOD_2 ( false ) ; VAR_1 . METHOD_3 ( 0 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 < java.lang.String > METHOD_1 ( ) { return VAR_1 ; } | public TYPE_1 < java.lang.String > METHOD_1 ( ) { return this . VAR_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) throws TYPE_3 { field . METHOD_1 ( VAR_2 ) ; VAR_3 . METHOD_1 ( VAR_1 , VAR_2 ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) throws TYPE_3 { }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . add ( VAR_1 ) ; VAR_3 . add ( INT_1 ) ; ( size ) ++ ; METHOD_2 ( ( ( VAR_4 ) + STRING_1 ) , toString ( ) , true ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { VAR_2 . add ( VAR_1 ) ; VAR_3 . add ( INT_1 ) ; ( size ) ++ ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { x += VAR_1 ; y += VAR_2 ; METHOD_2 ( ) ; } | public void METHOD_1 ( ) { x += VAR_1 ; y += VAR_2 ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( VAR_1 , VAR_2 , 1.0F , 0.0F , 0.0F ) ; for ( java.util.List < TYPE_2 > VAR_3 : VAR_4 ) { METHOD_2 ( VAR_1 , VAR_3 , FLOAT_1 , FLOAT_1 , FLOAT_1 ) ; } } | private void METHOD_1 ( TYPE_1 VAR_1 ) { for ( java.util.List < TYPE_2 > VAR_3 : VAR_4 ) { METHOD_2 ( VAR_1 , VAR_3 , FLOAT_1 , FLOAT_1 , FLOAT_1 ) ; } METHOD_2 ( VAR_1 , VAR_2 , 1.0F , 0.0F , 0.0F ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private static boolean METHOD_1 ( final java.lang.String str ) { return ( str != null ) && ( str . isEmpty ( ) ) ; } | private static boolean METHOD_1 ( final java.lang.String str ) { return ( str != null ) && ( ! ( str . isEmpty ( ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { return new TYPE_1 ( ( ( VAR_1 . x ) + 1 ) , ( ( VAR_1 . y ) + INT_1 ) ) ; } | public TYPE_1 METHOD_1 ( ) { return new TYPE_1 ( ( ( VAR_1 . x ) + 1 ) , VAR_1 . y ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected java.lang.Class < ? > [ ] METHOD_1 ( ) { return new java.lang.Class [ ] { VAR_1 class , VAR_2 class } ; } | protected java.lang.Class < ? > [ ] METHOD_1 ( ) { return new java.lang.Class [ ] { } ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View VAR_1 ) { if ( position != ( VAR_2 ) ) { METHOD_2 ( position ) ; } else { METHOD_3 ( ) ; } } | public void METHOD_1 ( android.view.View VAR_1 ) { if ( position != ( VAR_2 ) ) METHOD_2 ( position ) ; else METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.io.IOException { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_4 = VAR_1 . getInt ( STRING_1 ) ; VAR_5 = VAR_1 . getBoolean ( STRING_2 ) ; VAR_6 = VAR_1 . getString ( STRING_3 ) ; } | public void METHOD_1 ( ) throws java.io.IOException { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( VAR_3 ) ; VAR_4 = VAR_1 . getInt ( STRING_1 ) ; VAR_5 = VAR_1 . getBoolean ( STRING_2 ) ; this . VAR_6 = VAR_1 . getString ( STRING_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { TYPE_3 VAR_3 = TYPE_4 . METHOD_2 ( VAR_4 , VAR_5 , VAR_6 , VAR_7 ) ; TYPE_4 . METHOD_3 ( VAR_3 , VAR_2 , false , this , false ) ; return false ; } | protected boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { TYPE_3 VAR_3 = TYPE_4 . METHOD_2 ( VAR_4 , VAR_5 , VAR_6 , VAR_7 ) ; TYPE_4 . METHOD_3 ( VAR_3 , VAR_2 , false , this ) ; return false ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( int id ) { TYPE_1 VAR_1 = list . get ( id ) ; return VAR_1 ; } | public TYPE_1 METHOD_1 ( int id ) { return list . get ( id ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( TYPE_1 result ) { listener . METHOD_2 ( result ) ; } | protected void METHOD_1 ( TYPE_1 result ) { if ( ( listener ) != null ) listener . METHOD_2 ( result ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.String height ( ) { if ( ( METHOD_1 ( ) . METHOD_2 ( ) ) == null ) return STRING_1 ; return METHOD_1 ( ) . METHOD_2 ( ) . METHOD_3 ( METHOD_4 ( ) , VAR_1 ) ; } | private java.lang.String height ( ) { return ( METHOD_1 ( ) . METHOD_2 ( ) ) != null ? METHOD_1 ( ) . METHOD_2 ( ) . METHOD_3 ( METHOD_4 ( ) , VAR_1 ) : STRING_1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 listener ) { TYPE_2 . METHOD_2 ( listener ) ; if ( ! ( VAR_1 . contains ( listener ) ) ) { VAR_1 . add ( listener ) ; } } | public void METHOD_1 ( TYPE_1 listener ) { if ( ! ( VAR_1 . contains ( listener ) ) ) { VAR_1 . add ( listener ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public boolean getBoolean ( java.lang.String VAR_1 ) throws TYPE_1 { return java.lang.Boolean . METHOD_1 ( ( ( java.lang.String ) ( VAR_2 [ VAR_3 . METHOD_2 ( VAR_1 ) ] ) ) ) ; } | public boolean getBoolean ( java.lang.String VAR_1 ) throws TYPE_1 { return ( ( java.lang.Boolean ) ( VAR_2 [ VAR_3 . METHOD_2 ( VAR_1 ) ] ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) throws java.lang.Exception { return ( VAR_1 != null ) && ( VAR_2 != null ) ; } | public boolean METHOD_1 ( ) throws java.lang.Exception { return VAR_1 != null ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { METHOD_2 ( ) ; METHOD_3 ( ) ; VAR_1 . METHOD_4 ( ) ; METHOD_5 ( ) ; VAR_2 . start ( ) ; } | private void METHOD_1 ( ) { METHOD_2 ( ) ; METHOD_3 ( ) ; METHOD_5 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { super . METHOD_1 ( ) ; ( ( TYPE_1 ) ( VAR_1 ) ) . METHOD_2 ( ) ; VAR_1 = null ; } | public void METHOD_1 ( ) { super . METHOD_1 ( ) ; VAR_1 = null ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( TYPE_1 c ) { if ( c . METHOD_2 ( ) ) { return false ; } return true ; } | private boolean METHOD_1 ( TYPE_1 c ) { return ! ( c . METHOD_2 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ) . add ( ( ( TYPE_2 ) ( VAR_1 ) ) ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ) . add ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 target , TYPE_2 < TYPE_3 > VAR_1 ) { TYPE_3 VAR_2 = VAR_1 . METHOD_2 ( ) ; METHOD_3 ( target , VAR_2 . METHOD_4 ( ) ) ; } | public void METHOD_1 ( TYPE_1 target , TYPE_2 < TYPE_3 > VAR_1 ) { TYPE_3 VAR_2 = VAR_1 . METHOD_2 ( ) ; METHOD_3 ( target , VAR_2 ) ; }
|
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 ( ) ; VAR_3 . METHOD_2 ( VAR_2 . METHOD_3 ( ) ) ; VAR_4 . METHOD_4 ( ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = new TYPE_2 ( ) ; if ( ( VAR_2 . METHOD_3 ( ) ) != null ) VAR_3 . METHOD_2 ( VAR_2 . METHOD_3 ( ) ) ; VAR_4 . METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { super . METHOD_1 ( VAR_1 , VAR_2 ) ; VAR_3 . METHOD_2 ( VAR_4 ) ; METHOD_3 ( ) . METHOD_4 ( true ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 ) { super . METHOD_1 ( VAR_1 , VAR_2 ) ; METHOD_3 ( ) . METHOD_4 ( true ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( this , this . METHOD_3 ( ) , this . METHOD_4 ( ) , this . METHOD_5 ( ) ) ; this . METHOD_6 ( ) ; } | protected void METHOD_1 ( ) { TYPE_1 . METHOD_2 ( this , this . METHOD_3 ( ) , this . METHOD_4 ( ) , this . METHOD_5 ( ) ) ; this . METHOD_6 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.String METHOD_1 ( ) { return this . METHOD_2 ( VAR_1 ) ; } | public java.lang.String METHOD_1 ( ) { return this . METHOD_2 ( VAR_1 ) . trim ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. protected void METHOD_1 ( android.view.View VAR_1 ) { VAR_1 . METHOD_2 ( VAR_2 ) . METHOD_3 ( this ) ; VAR_3 = METHOD_4 ( VAR_4 , new TYPE_1 ( METHOD_5 ( ) . METHOD_6 ( false ) ) ) ; } | protected void METHOD_1 ( android.view.View VAR_1 ) { VAR_1 . METHOD_2 ( VAR_2 ) . METHOD_3 ( this ) ; VAR_3 = METHOD_4 ( VAR_4 , new TYPE_1 ( ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.view.View view ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . show ( METHOD_2 ( ) , VAR_2 ) ; } | public void METHOD_1 ( android.view.View view ) { VAR_1 . show ( METHOD_2 ( ) , VAR_2 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.String VAR_1 ) throws java.lang.Exception { this . VAR_2 . METHOD_1 ( VAR_1 , false ) ; this . VAR_3 . get ( 0 ) . put ( VAR_1 , new TYPE_1 ( VAR_1 , 0 , 0 ) ) ; } | public void METHOD_1 ( java.lang.String VAR_1 ) throws java.lang.Exception { this . VAR_2 . METHOD_1 ( VAR_1 , false ) ; this . VAR_3 . get ( 0 ) . put ( VAR_1 , new TYPE_1 ( VAR_1 , 0 , 0 , 0 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { if ( ( VAR_1 ) != null ) { VAR_1 . METHOD_2 ( ) ; } } | public void METHOD_1 ( ) throws java.lang.Exception { if ( ( this . VAR_1 ) != null ) { this . VAR_1 . METHOD_2 ( ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 [ ] METHOD_1 ( ) { TYPE_1 [ ] tmp = new TYPE_1 [ VAR_1 . size ( ) ] ; VAR_1 . values ( ) . METHOD_2 ( tmp ) ; return tmp ; } | public TYPE_1 [ ] METHOD_1 ( ) { TYPE_1 [ ] tmp = new TYPE_1 [ VAR_1 . size ( ) ] ; return VAR_1 . values ( ) . METHOD_2 ( tmp ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( ) { final java.lang.String VAR_1 = STRING_1 ; return TYPE_2 . METHOD_2 ( ) . METHOD_3 ( VAR_1 ) . build ( ) . METHOD_4 ( ) ; } | public TYPE_1 METHOD_1 ( ) { return TYPE_2 . METHOD_2 ( ) . METHOD_3 ( VAR_1 ) . build ( ) . METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 execute ( ) throws TYPE_2 { assert ( VAR_1 ) != null ; VAR_1 . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( VAR_2 ) ; VAR_1 . METHOD_3 ( ) ; return new TYPE_1 ( java.lang.String.format ( VAR_3 , VAR_2 ) ) ; } | public TYPE_1 execute ( ) throws TYPE_2 { assert ( VAR_1 ) != null ; VAR_1 . METHOD_1 ( ) ; VAR_1 . METHOD_2 ( VAR_2 ) ; return new TYPE_1 ( java.lang.String.format ( VAR_3 , VAR_2 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { VAR_3 = true ; METHOD_2 ( VAR_4 ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 , int VAR_2 ) { VAR_3 = false ; METHOD_2 ( VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( STRING_1 , VAR_2 , null ) ; METHOD_3 ( VAR_1 , VAR_2 , VAR_3 ) ; } | public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = TYPE_2 . METHOD_2 ( STRING_1 , VAR_2 ) ; METHOD_3 ( VAR_1 , VAR_2 , VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. void METHOD_1 ( TYPE_1 file , int VAR_1 ) ; | void METHOD_1 ( java.lang.String filename , int VAR_1 ) ;
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { try { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( 1 ) ; TYPE_2 . assertNotNull ( VAR_1 ) ; } catch ( java.lang.Exception VAR_3 ) { VAR_3 . METHOD_3 ( ) ; } } | public void METHOD_1 ( ) throws java.lang.Exception { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( 1 ) ; TYPE_2 . assertNotNull ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( int VAR_1 , int VAR_2 , int VAR_3 , int VAR_4 ) { VAR_5 = VAR_3 ; VAR_6 = VAR_1 ; VAR_7 = VAR_2 ; VAR_8 = VAR_4 ; METHOD_1 ( ) ; } | public void METHOD_1 ( int VAR_1 , int VAR_2 , int VAR_3 , int VAR_4 ) { METHOD_1 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static void METHOD_1 ( java.lang.String message , TYPE_1 VAR_1 , java.lang.String VAR_2 ) { TYPE_2 . assertTrue ( message , ( null != ( TYPE_3 . METHOD_2 ( VAR_1 , VAR_2 ) ) ) ) ; } | public static void METHOD_1 ( java.lang.String message , TYPE_1 VAR_1 , java.lang.String VAR_2 ) { TYPE_2 . assertTrue ( message , ( null != ( VAR_1 . METHOD_2 ( VAR_2 ) ) ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public java.lang.Object METHOD_1 ( ) { VAR_1 . METHOD_1 ( METHOD_2 ( ) , METHOD_3 ( ) , METHOD_4 ( ) ) ; return null ; } | public java.lang.Object METHOD_1 ( ) { VAR_1 . METHOD_1 ( METHOD_2 ( ) , METHOD_3 ( ) , file ) ; return null ; }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( int VAR_1 ) { for ( int x : VAR_2 ) { if ( VAR_1 == x ) { return true ; } } return false ; } | public boolean METHOD_1 ( java.lang.String VAR_1 ) { for ( java.lang.String x : VAR_2 ) { if ( VAR_1 . equals ( x ) ) { return true ; } } return false ; }
|
The following code may contain bugs. Write a refined code without bugs. java.lang.String METHOD_1 ( ) { java.lang.String result = STRING_1 ; for ( int i = 0 ; i <= INT_1 ; i ++ ) { result += ( METHOD_2 ( i ) ) + STRING_2 ; } return result ; } | java.lang.String METHOD_1 ( ) { java.lang.String result = STRING_1 ; for ( int i = 1 ; i <= INT_1 ; i ++ ) { result += ( METHOD_2 ( i ) ) + STRING_2 ; } return result ; }
|
The following code may contain bugs. Write a refined code without bugs. private int height ( TYPE_1 node ) { if ( node == null ) return - 1 ; else return node . height ; java.util.ArrayList = VAR_1 ; } | private int height ( TYPE_1 node ) { if ( node == null ) return - 1 ; else return node . height ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( ) { final TYPE_1 < TYPE_2 > field = METHOD_2 ( ) ; if ( field . METHOD_3 ( ) ) { return field . get ( ) . METHOD_4 ( ) ; } else { return STRING_1 ; } } | private java.lang.String METHOD_4 ( ) { final TYPE_1 < TYPE_2 > field = METHOD_2 ( ) ; if ( field . METHOD_3 ( ) ) { return field . get ( ) . METHOD_4 ( ) ; } else { return STRING_1 ; } }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( java.util.ArrayList < java.lang.Long > VAR_1 ) { for ( int index = 0 ; index < ( VAR_1 . size ( ) ) ; index ++ ) METHOD_2 ( index , VAR_1 . get ( index ) ) ; } | private void METHOD_1 ( java.util.ArrayList < java.lang.Long > VAR_1 ) { for ( int index = 0 ; index < ( VAR_1 . size ( ) ) ; index ++ ) METHOD_2 ( ( index + 1 ) , VAR_1 . get ( index ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = true ; this . METHOD_2 ( new TYPE_1 ( VAR_2 . METHOD_3 ( STRING_1 ) ) ) ; } | public void METHOD_1 ( ) { if ( ! ( VAR_1 ) ) { VAR_1 = true ; this . METHOD_2 ( new TYPE_1 ( VAR_2 . METHOD_3 ( STRING_1 ) ) ) ; } }
|
The following code may contain bugs. Write a refined code without bugs. public boolean METHOD_1 ( ) { return VAR_1 . substring ( INT_1 ) . equals ( STRING_1 ) ; } | private boolean METHOD_1 ( ) { return VAR_1 . substring ( INT_1 ) . equals ( STRING_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 status ) { ( ( TYPE_2 ) ( METHOD_2 ( ) ) ) . METHOD_3 ( ) . METHOD_4 ( ) . METHOD_5 ( ) ; METHOD_6 ( new android.content.Intent ( METHOD_7 ( ) , VAR_1 class ) ) ; } | public void METHOD_1 ( TYPE_1 status ) { ( ( TYPE_2 ) ( METHOD_2 ( ) ) ) . METHOD_3 ( ) . METHOD_5 ( ) ; METHOD_6 ( new android.content.Intent ( METHOD_7 ( ) , VAR_1 class ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = VAR_1 . select ( STRING_1 ) . METHOD_2 ( ) . select ( STRING_2 ) ; return TYPE_3 . METHOD_3 ( VAR_2 ) ? VAR_2 . METHOD_2 ( ) . text ( ) : STRING_3 ; } | private java.lang.String METHOD_1 ( TYPE_1 VAR_1 ) { TYPE_1 VAR_2 = VAR_1 . select ( STRING_1 ) . METHOD_2 ( ) . select ( STRING_2 ) . METHOD_2 ( ) ; return TYPE_3 . METHOD_3 ( VAR_2 ) ? VAR_2 . text ( ) : STRING_3 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_2 ( STRING_1 ) ; VAR_1 . METHOD_3 ( java.lang.Integer.parseInt ( STRING_2 ) ) ; TYPE_2 . METHOD_4 ( VAR_2 . METHOD_5 ( VAR_3 ) ) ; } | public void METHOD_1 ( ) { VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_2 ( STRING_1 ) ; VAR_1 . METHOD_3 ( STRING_2 ) ; TYPE_2 . METHOD_4 ( VAR_2 . METHOD_5 ( VAR_1 ) ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { java.lang.String VAR_3 = VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) ; return METHOD_4 ( VAR_2 ) . contains ( VAR_3 ) ; } | public boolean METHOD_1 ( TYPE_1 VAR_1 , TYPE_1 VAR_2 ) { java.lang.String VAR_3 = VAR_1 . METHOD_2 ( ) . METHOD_3 ( ) ; return METHOD_4 ( VAR_2 ) . contains ( VAR_3 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private int METHOD_1 ( java.lang.String fileName ) { for ( java.lang.String [ ] file : this . VAR_1 ) { if ( ( file [ 0 ] ) == fileName ) return java.lang.Integer.parseInt ( file [ 1 ] ) ; } return - 1 ; } | private int METHOD_1 ( java.lang.String fileName ) { for ( java.lang.String [ ] file : this . VAR_1 ) { if ( file [ 0 ] . equals ( fileName ) ) return java.lang.Integer.parseInt ( file [ 1 ] ) ; } return - 1 ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( android.content.Context context , android.content.Intent intent ) { switch ( intent . METHOD_2 ( ) ) { case VAR_1 : METHOD_3 ( true ) ; case VAR_2 : METHOD_3 ( false ) ; } } | public void METHOD_1 ( android.content.Context context , android.content.Intent intent ) { switch ( intent . METHOD_2 ( ) ) { case VAR_1 : METHOD_3 ( true ) ; break ; case VAR_2 : METHOD_3 ( false ) ; break ; } }
|
The following code may contain bugs. Write a refined code without bugs. boolean METHOD_1 ( ) { return true ; } | boolean METHOD_1 ( ) { return false ; }
|
The following code may contain bugs. Write a refined code without bugs. private void METHOD_1 ( ) { while ( VAR_1 ) { try { java.lang.Thread . METHOD_2 ( INT_1 ) ; } catch ( TYPE_1 VAR_2 ) { VAR_2 . METHOD_3 ( ) ; } c . METHOD_4 ( STRING_1 ) ; c . METHOD_4 ( STRING_2 ) ; } } | private void METHOD_1 ( ) { while ( VAR_1 ) { try { java.lang.Thread . METHOD_2 ( INT_1 ) ; } catch ( TYPE_1 VAR_2 ) { VAR_2 . METHOD_3 ( ) ; } } }
|
The following code may contain bugs. Write a refined code without bugs. public static boolean METHOD_1 ( TYPE_1 p ) { return TYPE_2 . METHOD_1 ( p , null ) ; } | public static boolean METHOD_1 ( TYPE_1 p ) { return TYPE_2 . METHOD_1 ( p , null , null ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private boolean METHOD_1 ( java.lang.String VAR_1 ) { java.lang.String VAR_2 = VAR_3 . METHOD_2 ( ) ; TYPE_1 VAR_4 = TYPE_2 . METHOD_3 ( ) ; return VAR_4 . equals ( VAR_2 , VAR_1 ) ; } | private boolean METHOD_1 ( java.lang.String VAR_1 ) { if ( VAR_1 == null ) { return false ; } java.lang.String VAR_2 = VAR_3 . METHOD_2 ( ) ; TYPE_1 VAR_4 = TYPE_2 . METHOD_3 ( ) ; return VAR_4 . equals ( VAR_2 , VAR_1 ) ; }
|
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 ( false ) ; METHOD_3 ( ) ; } | public void METHOD_1 ( ) { TYPE_1 . i ( VAR_1 , STRING_1 ) ; METHOD_3 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 < TYPE_2 > METHOD_1 ( final TYPE_3 type ) { return new TYPE_1 < TYPE_2 > ( ) { public boolean METHOD_2 ( TYPE_2 VAR_1 ) { return ( VAR_1 . getType ( ) ) == type ; } } ; } | public static TYPE_1 METHOD_1 ( final TYPE_3 type ) { return new TYPE_1 < TYPE_2 > ( ) { public boolean METHOD_2 ( TYPE_2 VAR_1 ) { return ( VAR_1 . getType ( ) ) == type ; } } ; }
|
The following code may contain bugs. Write a refined code without bugs. public static TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { try { return TYPE_2 . METHOD_2 ( new TYPE_3 ( VAR_1 ) ) ; } catch ( TYPE_4 VAR_2 ) { } } | public static TYPE_1 METHOD_1 ( java.lang.String VAR_1 ) { try { return TYPE_2 . METHOD_2 ( new java.io.File ( VAR_1 ) ) ; } catch ( java.io.IOException VAR_2 ) { return null ; } }
|
The following code may contain bugs. Write a refined code without bugs. public int METHOD_1 ( java.lang.String VAR_1 ) { return this . VAR_2 . get ( VAR_1 ) ; } | public int METHOD_1 ( java.lang.String VAR_1 ) { if ( ( this . VAR_2 . get ( VAR_1 ) ) == null ) { return 0 ; } return this . VAR_2 . get ( VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. private TYPE_1 METHOD_1 ( int number ) { int VAR_1 = number / ( size ) ; int VAR_2 = number % ( size ) ; return new TYPE_1 ( VAR_1 , VAR_2 ) ; } | private TYPE_1 METHOD_1 ( int number ) { int VAR_1 = number / ( size ) ; int VAR_2 = number % ( size ) ; return new TYPE_1 ( VAR_2 , VAR_1 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public TYPE_1 METHOD_1 ( java.util.List < TYPE_2 > VAR_1 , TYPE_3 VAR_2 , java.lang.String name , boolean VAR_3 , int count , java.lang.String VAR_4 ) { return super . METHOD_1 ( VAR_1 , VAR_2 , name , true , count , VAR_4 ) ; } | public TYPE_1 METHOD_1 ( java.util.List < TYPE_2 > VAR_1 , TYPE_3 VAR_2 , java.lang.String name , boolean VAR_3 , int count , java.lang.String VAR_4 ) { return super . METHOD_1 ( VAR_1 , VAR_2 , name , false , count , VAR_4 ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ) ; METHOD_3 ( ) ; METHOD_4 ( ) ; METHOD_5 ( ) ; } | public void METHOD_1 ( TYPE_1 VAR_1 ) { METHOD_2 ( ) ; METHOD_5 ( ) ; METHOD_3 ( ) ; METHOD_4 ( ) ; }
|
The following code may contain bugs. Write a refined code without bugs. public void METHOD_1 ( java.lang.Object msg ) { if ( TYPE_1 . METHOD_2 ( VAR_1 ) ) { java.lang.System.err.println ( ( STRING_1 + ( METHOD_3 ( msg ) ) ) ) ; } } | public void METHOD_1 ( java.lang.Object msg ) { if ( VAR_1 . METHOD_2 ( TYPE_1 ) ) { java.lang.System.err.println ( ( STRING_1 + ( METHOD_3 ( msg ) ) ) ) ; } }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.