auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private android.bluetooth.BluetoothGattService getService ( ) { android.bluetooth.BluetoothGattService service = null ; if ( ( mBluetoothGatt ) != null ) { service = mBluetoothGatt.getService ( com.android.cts.verifier.bluetooth.BleClientService.SERVICE_UUID ) ; if ( service == null ) { showMessage ( "Service not found" ) ; } } return service ; }

Target:
private android.bluetooth.BluetoothGattService getService ( ) { if ( ( mBluetoothGatt ) == null ) return null ; android.bluetooth.BluetoothGattService service = mBluetoothGatt.getService ( com.android.cts.verifier.bluetooth.BleClientService.SERVICE_UUID ) ; if ( service == null ) { showMessage ( "Service not found" ) ; return null ; } return service ; }
Source:
public void onStreamingServicesUpdated ( java.util.List < android.telephony.mbms.StreamingServiceInfo > services ) { try { listener.streamingServicesUpdated ( services ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , subscriptionId ) ; } }

Target:
public void streamingServicesUpdated ( java.util.List < android.telephony.mbms.StreamingServiceInfo > services ) throws android.os.RemoteException { listener.streamingServicesUpdated ( services ) ; }
Source:
public java.lang.String getName ( ) { return null ; }

Target:
public java.lang.String getName ( ) { return name ; }
Source:
public void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { logger.printf ( "[SDK Manager] %s" , line ) ; } }

Target:
public void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { logger.info ( "[SDK Manager] %s" , line ) ; } }
Source:
static void native_rewind ( int nPath ) { android.graphics.Path_Delegate.native_reset ( nPath ) ; }

Target:
static void native_rewind ( long nPath ) { android.graphics.Path_Delegate.native_reset ( nPath ) ; }
Source:
public com.android.ims.internal.IImsCallSession createCallSession ( int sessionId , com.android.ims.ImsCallProfile profile , com.android.ims.internal.IImsCallSessionListener listener ) throws android.os.RemoteException { synchronized ( mLock ) { checkServiceIsReady ( ) ; return getServiceInterface ( mBinder ) . createCallSession ( mSlotId , mSupportedFeature , sessionId , profile , listener ) ; } }

Target:
public com.android.ims.internal.IImsCallSession createCallSession ( int sessionId , com.android.ims.ImsCallProfile profile , com.android.ims.internal.IImsCallSessionListener listener ) throws android.os.RemoteException { synchronized ( mLock ) { checkServiceIsReady ( ) ; return getServiceInterface ( mBinder ) . createCallSession ( sessionId , profile , listener ) ; } }
Source:
private java.io.File getFile ( java.io.File baseDir ) { return new java.io.File ( baseDir , myPath ) ; }

Target:
protected java.io.File getFile ( java.io.File baseDir ) { return new java.io.File ( baseDir , myPath ) ; }
Source:
public java.lang.String insnArgString ( com.android.dx.dex.code.DalvInsn insn ) { com.android.dx.rop.code.RegisterSpecList regs = com.android.dx.dex.code.form.Form35c.explicitize ( insn.getRegisters ( ) ) ; return ( ( regListString ( regs ) ) + ", " ) + ( cstString ( insn ) ) ; }

Target:
public java.lang.String insnArgString ( com.android.dx.dex.code.DalvInsn insn ) { com.android.dx.rop.code.RegisterSpecList regs = com.android.dx.dex.code.form.Form35c.explicitize ( insn.getRegisters ( ) ) ; return ( ( regListString ( regs ) ) + ", " ) + ( insn.cstString ( ) ) ; }
Source:
public void onStateChange ( com.android.incallui.InCallPresenter.InCallState oldState , com.android.incallui.InCallPresenter.InCallState newState , com.android.incallui.call.CallList callList ) { com.android.dialer.common.LogUtil.d ( "StatusBarNotifier.onStateChange" , "%s->%s" , oldState , newState ) ; updateNotification ( callList ) ; }

Target:
public void onStateChange ( com.android.incallui.InCallPresenter.InCallState oldState , com.android.incallui.InCallPresenter.InCallState newState , com.android.incallui.call.CallList callList ) { com.android.dialer.common.LogUtil.d ( "StatusBarNotifier.onStateChange" , "%s->%s" , oldState , newState ) ; updateNotification ( ) ; }
Source:
public abstract void libToExe ( @ javax.annotation.Nonnull java.io.File in , @ javax.annotation.Nonnull java.io.File out , boolean zipFile ) throws java.lang.Exception ;

Target:
public final void libToExe ( @ javax.annotation.Nonnull java.io.File in , @ javax.annotation.Nonnull java.io.File out , boolean zipFile ) throws java.lang.Exception { libToExe ( new java.io.File [ ] { in } , out , zipFile ) ; }
Source:
public void onClick ( android.view.View v ) { if ( ( speedDialUiItem.defaultChannel ( ) ) != null ) { listener.onClick ( speedDialUiItem.defaultChannel ( ) ) ; } else { listener.onAmbiguousContactClicked ( speedDialUiItem.channels ( ) ) ; } }

Target:
public void onClick ( android.view.View v ) { if ( ( speedDialUiItem.defaultChannel ( ) ) != null ) { listener.onClick ( speedDialUiItem.defaultChannel ( ) ) ; } else { listener.onAmbiguousContactClicked ( speedDialUiItem ) ; } }
Source:
public static java.util.List < java.security.Provider > getProvidersList ( ) { synchronized ( org.apache.harmony.security.fortress.Services.providers ) { return new java.util.ArrayList < java.security.Provider > ( org.apache.harmony.security.fortress.Services.providers ) ; } }

Target:
public static synchronized java.util.List < java.security.Provider > getProvidersList ( ) { return new java.util.ArrayList < java.security.Provider > ( org.apache.harmony.security.fortress.Services.providers ) ; }
Source:
public void setWarnIfHeld ( java.lang.Object warnIfHeld ) { mInstaller.setWarnIfHeld ( warnIfHeld ) ; mWarnIfHeld = warnIfHeld ; }

Target:
public void setWarnIfHeld ( java.lang.Object warnIfHeld ) { if ( ( mInstaller ) != null ) { mInstaller.setWarnIfHeld ( warnIfHeld ) ; } mWarnIfHeld = warnIfHeld ; }
Source:
public int getSpi ( ) { checkOwnerOrSystemAndThrow ( ) ; return mSpi ; }

Target:
public int getSpi ( ) { return mSpi ; }
Source:
public void run ( ) { c.substring ( 0 ) . toString ( ) ; }

Target:
public void f ( java.lang.String s ) { c.substring ( 0 ) . toString ( ) ; }
Source:
public void setResult ( java.lang.String resultFormat , java.lang.Object ... args ) { mAutomaticallyCloseOnTaskCompletion = false ; mDialog.setResult ( resultFormat , args ) ; }

Target:
public void setResult ( java.lang.String resultFormat , java.lang.Object ... args ) { mAutomaticallyCloseOnTaskCompletion = false ; super . setResult ( resultFormat , args ) ; }
Source:
private void display ( java.lang.String format , java.lang.Object ... args ) { mMonitor.setResult ( format , args ) ; }

Target:
private void display ( java.lang.String format , java.lang.Object ... args ) { mMonitor.log ( format , args ) ; }
Source:
public static final int getHeaderSize ( @ javax.annotation.Nonnegative int dexVersion ) { int headerSize = ( ( ( 8 * ( com.android.jack.dx.dex.SizeOf.UBYTE ) ) + ( com.android.jack.dx.dex.SizeOf.UINT ) ) + ( com.android.jack.dx.dex.SizeOf.SIGNATURE ) ) + ( 20 * ( com.android.jack.dx.dex.SizeOf.UINT ) ) ; return headerSize ; }

Target:
public static int getHeaderSize ( ) { int headerSize = ( ( ( 8 * ( com.android.jack.dx.dex.SizeOf.UBYTE ) ) + ( com.android.jack.dx.dex.SizeOf.UINT ) ) + ( com.android.jack.dx.dex.SizeOf.SIGNATURE ) ) + ( 20 * ( com.android.jack.dx.dex.SizeOf.UINT ) ) ; return headerSize ; }
Source:
private void assertVerifiedForEach ( java.lang.String apkFilenamePatternInResources , java.lang.String [ ] args ) throws java.lang.Exception { assertVerifiedForEach ( apkFilenamePatternInResources , args , null ) ; }

Target:
private void assertVerifiedForEach ( java.lang.String apkFilenamePatternInResources , java.lang.String [ ] args ) throws java.lang.Exception { assertVerifiedForEach ( apkFilenamePatternInResources , args , null , null ) ; }
Source:
public void testAsinPiF32 ( ) { script_f32 = new android.renderscript.cts.ScriptC_asinpi_f32 ( mRS , mRes , R.raw.asinpi_f32 ) ; doF32 ( 10 , 5 ) ; }

Target:
public void testAsinPiF32 ( ) { doF32 ( 10 , 5 ) ; }
Source:
public void timeExpm1 ( int reps ) { for ( int rep = 0 ; rep < reps ; ++ rep ) { java.lang.Math.expm1 ( d ) ; } }

Target:
public double timeExpm1 ( int reps ) { double result = d ; for ( int rep = 0 ; rep < reps ; ++ rep ) { result = java.lang.Math.expm1 ( d ) ; } return result ; }
Source:
public void testRemoveTransportModeTransform ( ) throws java.lang.Exception { android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.fromSocket ( new java.net.Socket ( ) ) ; mIpSecService.removeTransportModeTransforms ( pfd , 1 ) ; org.mockito.Mockito.verify ( mMockNetd ) . ipSecRemoveTransportModeTransform ( pfd.getFileDescriptor ( ) ) ; }

Target:
public void testRemoveTransportModeTransform ( ) throws java.lang.Exception { android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.fromSocket ( new java.net.Socket ( ) ) ; mIpSecService.removeTransportModeTransforms ( pfd ) ; org.mockito.Mockito.verify ( mMockNetd ) . ipSecRemoveTransportModeTransform ( pfd.getFileDescriptor ( ) ) ; }
Source:
public void onDialerCallSessionModificationStateChange ( ) { if ( ( mDialerCall.getVideoTech ( ) . getSessionModificationState ( ) ) == ( com.android.incallui.videotech.utils.SessionModificationState.NO_REQUEST ) ) { cleanup ( ) ; updateNotification ( com.android.incallui.call.CallList.getInstance ( ) ) ; } }

Target:
public void onDialerCallSessionModificationStateChange ( ) { if ( ( mDialerCall.getVideoTech ( ) . getSessionModificationState ( ) ) == ( com.android.incallui.videotech.utils.SessionModificationState.NO_REQUEST ) ) { cleanup ( ) ; updateNotification ( ) ; } }
Source:
private native int genLibs ( java.lang.String working_dir , java.lang.String sysroot , boolean for_test ) ;

Target:
private native int genLibs ( java.lang.String working_dir , java.lang.String sysroot ) ;
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { switch ( 2147483647 ) { case 2147483647 : java.lang.System.err.println ( "good" ) ; break ; default : throw new java.lang.AssertionError ( ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { switch ( 2147483647 ) { case 2147483647 : java.lang.System.out.println ( "good" ) ; break ; default : throw new java.lang.AssertionError ( ) ; } }
Source:
protected void updateData ( ) { }

Target:
protected abstract void updateData ( ) ;
Source:
public static long $noinline$NotNot1 ( long arg ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } return ~ ( ~ arg ) ; }

Target:
public static long $noinline$NotNot1 ( long arg ) { return ~ ( ~ arg ) ; }
Source:
public void onMetadataChanged ( android.media.MediaMetadata metadata ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , "onMetadataChanged" ) ; updateCurrentMediaState ( ) ; }

Target:
public void onMetadataChanged ( android.media.MediaMetadata metadata ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , "onMetadataChanged" ) ; updateCurrentMediaState ( false ) ; }
Source:
private void handleRadioProxyExceptionForRR ( com.android.internal.telephony.RILRequest rr , java.lang.String caller , java.lang.Exception e ) { riljLoge ( caller , e ) ; rr.onError ( com.android.internal.telephony.RADIO_NOT_AVAILABLE , null ) ; decrementWakeLock ( rr ) ; rr.release ( ) ; resetProxyAndRequestList ( ) ; }

Target:
private void handleRadioProxyExceptionForRR ( com.android.internal.telephony.RILRequest rr , java.lang.String caller , java.lang.Exception e ) { riljLoge ( caller , e ) ; resetProxyAndRequestList ( ) ; }
Source:
public android.icu.text.DecimalFormatSymbols getDecimalFormatSymbols ( ) { try { return ( ( android.icu.text.DecimalFormatSymbols ) ( symbols.clone ( ) ) ) ; } catch ( java.lang.Exception foo ) { return null ; } }

Target:
public synchronized android.icu.text.DecimalFormatSymbols getDecimalFormatSymbols ( ) { return ( ( android.icu.text.DecimalFormatSymbols ) ( symbols.clone ( ) ) ) ; }
Source:
public void recordExistingFile ( @ com.android.annotations.NonNull java.lang.String absFilePath ) { recordExistingFile ( absFilePath , 0 , null ) ; }

Target:
public void recordExistingFile ( @ com.android.annotations.NonNull java.lang.String absFilePath ) { recordExistingFile ( absFilePath , 0 , ( ( byte [ ] ) ( null ) ) ) ; }
Source:
public void setSentDate ( java.util.Date sentDate ) throws com.android.voicemail.impl.mail.MessagingException { setHeader ( "Date" , com.android.voicemail.impl.mail.internet.MimeMessage.DATE_FORMAT.format ( sentDate ) ) ; this . mSentDate = sentDate ; }

Target:
public void setSentDate ( java.util.Date sentDate ) throws com.android.voicemail.impl.mail.MessagingException { setHeader ( "Date" , com.android.voicemail.impl.mail.internet.MimeMessage.DATE_FORMAT.format ( sentDate ) ) ; this . sentDate = sentDate ; }
Source:
public void loggedRun ( ) { synchronized ( mTelecomLock ) { if ( mIsPending ) { android.telecom.Log.i ( this , "Call filtering has timed out." ) ; android.telecom.Log.addEvent ( mCall , LogUtils.Events.FILTERING_TIMED_OUT ) ; mListener.onCallFilteringComplete ( mCall , mResult ) ; mIsPending = false ; } } }

Target:
public void loggedRun ( ) { if ( mIsPending ) { android.telecom.Log.i ( this , "Call filtering has timed out." ) ; android.telecom.Log.addEvent ( mCall , LogUtils.Events.FILTERING_TIMED_OUT ) ; mListener.onCallFilteringComplete ( mCall , mResult ) ; mIsPending = false ; } }
Source:
public void ignore ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message , @ com.android.annotations.Nullable java.lang.Object data ) { fail ( "Not supported in tests." ) ; }

Target:
public void ignore ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message ) { fail ( "Not supported in tests." ) ; }
Source:
public boolean isPageComplete ( ) { if ( ! ( mValues.createAppSkeleton ) ) { return true ; } if ( ! ( mShown ) ) { return false ; } return super . isPageComplete ( ) ; }

Target:
public boolean isPageComplete ( ) { if ( ! ( mShown ) ) { return false ; } return super . isPageComplete ( ) ; }
Source:
public java.io.File getInstallFolder ( java.lang.String osSdkRoot , java.lang.String suggestedDir , com.android.sdklib.SdkManager sdkManager ) { return new java.io.File ( osSdkRoot , com.android.sdklib.SdkConstants.FD_TOOLS ) ; }

Target:
public java.io.File getInstallFolder ( java.lang.String osSdkRoot , com.android.sdklib.SdkManager sdkManager ) { return new java.io.File ( osSdkRoot , com.android.sdklib.SdkConstants.FD_TOOLS ) ; }
Source:
long getLongUnchecked ( int i ) { return getLong ( ix ( i ) ) ; }

Target:
final long getLongUnchecked ( int i ) { return getLong ( ix ( i ) ) ; }