auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean isVideoEnabled ( ) { com.android.internal.telephony.Phone imsPhone = mImsPhone ; if ( ( imsPhone != null ) && ( ( imsPhone.getServiceState ( ) . getState ( ) ) == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) ) { return imsPhone.isVideoEnabled ( ) ; } return false ; }

Target:
public boolean isVideoEnabled ( ) { com.android.internal.telephony.Phone imsPhone = mImsPhone ; if ( imsPhone != null ) { return imsPhone.isVideoEnabled ( ) ; } return false ; }
Source:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.lang.String host ) throws java.security.cert.CertificateException { return mDelegate.checkServerTrusted ( chain , authType , new android.net.http.DelegatingSSLSession.HostnameWrap ( host ) ) ; }

Target:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.lang.String host ) throws java.security.cert.CertificateException { return mDelegate.checkServerTrusted ( chain , authType , host ) ; }
Source:
public void onConfigurationChanged ( android.content.res.Configuration newConfig ) { super . onConfigurationChanged ( newConfig ) ; setContentView ( R.layout.its_main ) ; setInfoResources ( R.string.camera_its_test , R.string.camera_its_test_info , ( - 1 ) ) ; setPassFailButtonClickListeners ( ) ; getPassButton ( ) . setEnabled ( false ) ; }

Target:
public void onConfigurationChanged ( android.content.res.Configuration newConfig ) { super . onConfigurationChanged ( newConfig ) ; setContentView ( R.layout.its_main ) ; setInfoResources ( R.string.camera_its_test , R.string.camera_its_test_info , ( - 1 ) ) ; setPassFailButtonClickListeners ( ) ; }
Source:
public void end ( ) throws java.lang.InterruptedException { }

Target:
public void end ( int key ) throws java.lang.InterruptedException { }
Source:
private void assertActiveRulesVersion ( java.lang.String expectedRulesVersion ) throws java.lang.Exception { java.lang.String expectedActiveRulesVersion = ( ( ( expectedRulesVersion + "," ) + expectedRulesVersion ) + "," ) + expectedRulesVersion ; java.lang.String actualActiveRulesVersion = waitForNoOperationInProgressAndReturn ( com.android.timezone.xts.TimeZoneUpdateHostTest.StateType.ACTIVE_RULES_VERSION ) ; assertEquals ( expectedActiveRulesVersion , actualActiveRulesVersion ) ; }

Target:
private void assertActiveRulesVersion ( java.lang.String expectedRulesVersion ) throws java.lang.Exception { java.lang.String expectedActiveRulesVersion = ( ( ( expectedRulesVersion + "," ) + expectedRulesVersion ) + "," ) + expectedRulesVersion ; java.lang.String actualActiveRulesVersion = waitForNoOperationInProgressAndReturn ( com.android.timezone.xts.TimeZoneUpdateHostTest.StateType.ACTIVE_RULES_VERSION ) ; org.junit.Assert.assertEquals ( expectedActiveRulesVersion , actualActiveRulesVersion ) ; }
Source:
void traverse ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVisitor visitor ) { for ( com.android.jack.ir.ast.JAnnotationLiteral annotation : annotations.values ( ) ) { visitor.accept ( annotation ) ; } }

Target:
void traverse ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVisitor visitor ) { for ( java.util.List < com.android.jack.ir.ast.JAnnotationLiteral > annotation : annotations.values ( ) ) { visitor.accept ( annotation ) ; } }
Source:
public void testCodeOverlay ( ) { assertEquals ( testString , mCodeOverlay3.getText ( ) ) ; }

Target:
public void testCodeOverlay ( ) { assertEquals ( testString , mCodeOverlay3.getText ( ) . toString ( ) ) ; }
Source:
public android.telephony.ImsiEncryptionInfo getCarrierInfoForImsiEncryption ( int keyType ) { return com.android.internal.telephony.CarrierInfoManager.getCarrierInfoForImsiEncryption ( keyType ) ; }

Target:
public android.telephony.ImsiEncryptionInfo getCarrierInfoForImsiEncryption ( int keyType ) { return com.android.internal.telephony.CarrierInfoManager.getCarrierInfoForImsiEncryption ( keyType , mContext ) ; }
Source:
public java.util.zip.ZipEntry getEntry ( java.lang.String name ) { java.util.zip.ZipEntry ze = super . getEntry ( name ) ; if ( ze == null ) { return ze ; } java.util.jar.JarEntry je = new java.util.jar.JarEntry ( ze ) ; je.parentJar = this ; return je ; }

Target:
public java.util.zip.ZipEntry getEntry ( java.lang.String name ) { java.util.zip.ZipEntry ze = super . getEntry ( name ) ; if ( ze == null ) { return ze ; } return new java.util.jar.JarEntry ( ze , this ) ; }
Source:
public synchronized double getMax ( ) { ensureSorted ( ) ; return samples [ count ] ; }

Target:
public synchronized double getMax ( ) { ensureSorted ( ) ; return samples [ ( ( count ) - 1 ) ] ; }
Source:
protected void onDestroy ( ) { super . onDestroy ( ) ; unregisterReceiver ( mUsbReceiver ) ; }

Target:
protected void onDestroy ( ) { super . onDestroy ( ) ; if ( ( mUsbReceiver ) != null ) { unregisterReceiver ( mUsbReceiver ) ; } }
Source:
public com.android.jack.dx.io.EncodedValue readEncodedValue ( ) { int start = position ; new com.android.jack.dx.io.EncodedValueReader ( this ) . readValue ( ) ; int end = position ; return new com.android.jack.dx.io.EncodedValue ( java.util.Arrays.copyOfRange ( data , start , end ) ) ; }

Target:
public com.android.jack.dx.io.EncodedValue readEncodedValue ( ) { int start = position ; new com.android.jack.dx.io.EncodedValueReader ( this , this ) . readValue ( ) ; int end = position ; return new com.android.jack.dx.io.EncodedValue ( java.util.Arrays.copyOfRange ( data , start , end ) ) ; }
Source:
public static com.android.ddmlib.IDevice [ ] getDevices ( ) { return com.android.hierarchyviewerlib.device.DeviceBridge.bridge.getDevices ( ) ; }

Target:
public static com.android.ddmlib.IDevice [ ] getDevices ( ) { if ( ( com.android.hierarchyviewerlib.device.DeviceBridge.bridge ) == null ) { return new com.android.ddmlib.IDevice [ 0 ] ; } return com.android.hierarchyviewerlib.device.DeviceBridge.bridge.getDevices ( ) ; }
Source:
public static boolean isVideoPresenceCompatible ( ) { return ( com.android.dialer.compat.SdkVersionOverride.getSdkVersion ( Build.VERSION_CODES.M ) ) > ( android.os.Build.VERSION_CODES.M ) ; }

Target:
public static boolean isVideoPresenceCompatible ( ) { return true ; }
Source:
public void waitForNetworkRequests ( final int count ) throws java.lang.InterruptedException { waitForRequests ( ) ; assertEquals ( count , getMyRequestCount ( ) ) ; }

Target:
public void waitForNetworkRequests ( final int count ) throws java.lang.InterruptedException { waitForRequests ( ) ; org.junit.Assert.assertEquals ( count , getMyRequestCount ( ) ) ; }
Source:
public static int $noinline$intConditionNotEqualOne ( int i ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } return ( i > 42 ) == ( Main.$inline$true ( ) ) ? 13 : 54 ; }

Target:
public static int $noinline$intConditionNotEqualOne ( int i ) { return ( i > 42 ) == ( Main.$inline$true ( ) ) ? 13 : 54 ; }
Source:
private void runSecondary ( ) { foo ( ) ; throw new java.lang.RuntimeException ( "Didn't expect to get back..." ) ; }

Target:
private void runSecondary ( ) { foo ( true ) ; throw new java.lang.RuntimeException ( "Didn't expect to get back..." ) ; }
Source:
public java.lang.Object clone ( ) { try { java.util.TimeZone other = ( ( java.util.TimeZone ) ( super . clone ( ) ) ) ; other.ID = ID ; return other ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( ) ; } }

Target:
public java.lang.Object clone ( ) { try { java.util.TimeZone other = ( ( java.util.TimeZone ) ( super . clone ( ) ) ) ; other.ID = ID ; return other ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( e ) ; } }
Source:
private java.lang.String getInnerClassName ( ) { return libcore.reflect.AnnotationAccess.getInnerClassName ( this ) ; }

Target:
private native java.lang.String getInnerClassName ( ) ;
Source:
public static int $noinline$intReverseCondition ( int i ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } return 42 > i ? 13 : 54 ; }

Target:
public static int $noinline$intReverseCondition ( int i ) { return 42 > i ? 13 : 54 ; }
Source:
public void setResult ( java.lang.String resultFormat , java.lang.Object ... args ) { java.lang.String text = java.lang.String.format ( resultFormat , args ) ; mUi.setResult ( text ) ; }

Target:
public void log ( java.lang.String format , java.lang.Object ... args ) { java.lang.String text = java.lang.String.format ( format , args ) ; mUi.log ( text ) ; }
Source:
public void onImsCapabilityChanged ( ) { if ( mPhone.isPhoneTypeGsm ( ) ) { sendMessage ( obtainMessage ( com.android.internal.telephony.ServiceStateTracker.EVENT_IMS_CAPABILITY_CHANGED ) ) ; } }

Target:
public void onImsCapabilityChanged ( ) { sendMessage ( obtainMessage ( com.android.internal.telephony.ServiceStateTracker.EVENT_IMS_CAPABILITY_CHANGED ) ) ; }
Source:
public void setAdvertisingParameters ( int advertiserId , android.bluetooth.le.AdvertisingSetParameters parameters ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; }

Target:
public void setAdvertisingParameters ( int advertiserId , android.bluetooth.le.AdvertisingSetParameters parameters ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.setAdvertisingParameters ( advertiserId , parameters ) ; }
Source:
public com.android.apksig.ApkVerifier.Builder setMinCheckedPlatformVersion ( int minSdkVersion ) { mMinSdkVersion = minSdkVersion ; mMaxSdkVersion = java.lang.Integer.MAX_VALUE ; return this ; }

Target:
public com.android.apksig.ApkVerifier.Builder setMinCheckedPlatformVersion ( int minSdkVersion ) { mMinSdkVersion = minSdkVersion ; return this ; }
Source:
public void timeEquals ( int reps ) { for ( int i = 0 ; i < reps ; ++ i ) { java.util.Arrays.deepEquals ( array , array2 ) ; } }

Target:
public void deepEquals ( int reps ) { for ( int i = 0 ; i < reps ; ++ i ) { java.util.Arrays.deepEquals ( array , array2 ) ; } }
Source:
public synchronized com.android.bluetooth.hfp.IProfileServiceBinder initBinder ( ) { return new com.android.bluetooth.hfp.HeadsetService.BluetoothHeadsetBinder ( this ) ; }

Target:
public com.android.bluetooth.hfp.IProfileServiceBinder initBinder ( ) { return new com.android.bluetooth.hfp.HeadsetService.BluetoothHeadsetBinder ( this ) ; }
Source:
private void init ( org.apache.harmony.xnet.provider.jsse.SSLParametersImpl sslParameters , java.lang.String [ ] enabledProtocols , java.lang.String [ ] enabledCipherSuites , java.lang.String [ ] enabledCompressionMethods ) throws java.io.IOException { this . sslParameters = sslParameters ; this . enabledProtocols = enabledProtocols ; this . enabledCipherSuites = enabledCipherSuites ; this . enabledCompressionMethods = enabledCompressionMethods ; }

Target:
private void init ( org.apache.harmony.xnet.provider.jsse.SSLParametersImpl sslParameters , java.lang.String [ ] enabledProtocols , java.lang.String [ ] enabledCipherSuites ) throws java.io.IOException { this . sslParameters = sslParameters ; this . enabledProtocols = enabledProtocols ; this . enabledCipherSuites = enabledCipherSuites ; }
Source:
private void updateDefaultChannel ( ) { if ( com.intellij.openapi.application.impl.ApplicationInfoImpl.getShadowInstance ( ) . isEAP ( ) ) { UPDATE_CHANNEL_TYPE = ChannelStatus.EAP_CODE ; } }

Target:
private void updateDefaultChannel ( ) { }
Source:
private void expectSystemReady ( ) throws java.lang.Exception { mNetManager.setGlobalAlert ( org.easymock.EasyMock.anyLong ( ) ) ; org.easymock.EasyMock.expectLastCall ( ) . atLeastOnce ( ) ; expectNetworkStatsSummary ( buildEmptyStats ( ) ) ; expectBandwidthControlCheck ( ) ; }

Target:
private void expectSystemReady ( ) throws java.lang.Exception { expectNetworkStatsSummary ( buildEmptyStats ( ) ) ; expectBandwidthControlCheck ( ) ; }
Source:
public void tune ( android.net.Uri channelUri ) { mHandler.removeCallbacksAndMessages ( null ) ; mHandler.obtainMessage ( com.android.tv.tuner.tvinput.TunerRecordingSessionWorker.MSG_TUNE , channelUri ) . sendToTarget ( ) ; }

Target:
public void tune ( android.net.Uri channelUri ) { mHandler.removeCallbacksAndMessages ( null ) ; mHandler.obtainMessage ( com.android.tv.tuner.tvinput.TunerRecordingSessionWorker.MSG_TUNE , 0 , 0 , channelUri ) . sendToTarget ( ) ; }
Source:
public void installPackage ( final android.net.Uri packageURI , final android.content.pm.IPackageInstallObserver observer , final int flags , final java.lang.String installerPackageName ) { installPackageWithVerification ( packageURI , observer , flags , installerPackageName , null , null ) ; }

Target:
public void installPackage ( final android.net.Uri packageURI , final android.content.pm.IPackageInstallObserver observer , final int flags , final java.lang.String installerPackageName ) { installPackageWithVerification ( packageURI , observer , flags , installerPackageName , null , null , null ) ; }
Source:
public void onError ( int errorCode , java.lang.String message ) { try { listener.error ( errorCode , message ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , subscriptionId ) ; } }

Target:
public void error ( int errorCode , java.lang.String message ) throws android.os.RemoteException { listener.error ( errorCode , message ) ; }
Source:
public synchronized void taskFinished ( org.apache.tools.ant.BuildEvent event ) { sendException ( event ) ; myTaskPriority.sendMessage ( com.intellij.rt.ant.execution.IdeaAntLogger2.TASK_END , event.getPriority ( ) , event.getException ( ) ) ; }

Target:
public synchronized void taskFinished ( org.apache.tools.ant.BuildEvent event ) { sendException ( event , true ) ; myTaskPriority.sendMessage ( com.intellij.rt.ant.execution.IdeaAntLogger2.TASK_END , event.getPriority ( ) , event.getException ( ) ) ; }
Source:
public int createSapsRecord ( java.lang.String serviceName , int rfcommChannel , int version ) { if ( ( com.android.bluetooth.sdp.SdpManager.sNativeAvailable ) == false ) { throw new java.lang.RuntimeException ( ( ( com.android.bluetooth.sdp.SdpManager.TAG ) + " sNativeAvailable == false - native not initialized" ) ) ; } return sdpCreateSapsRecordNative ( serviceName , rfcommChannel , version ) ; }

Target:
public int createSapsRecord ( java.lang.String serviceName , int rfcommChannel , int version ) { if ( ! ( com.android.bluetooth.sdp.SdpManager.sNativeAvailable ) ) { throw new java.lang.RuntimeException ( ( ( com.android.bluetooth.sdp.SdpManager.TAG ) + " sNativeAvailable == false - native not initialized" ) ) ; } return sdpCreateSapsRecordNative ( serviceName , rfcommChannel , version ) ; }
Source:
public final android.content.ContentProviderClient acquireContentProviderClient ( android.net.Uri uri ) { android.content.IContentProvider provider = acquireProvider ( uri ) ; if ( provider != null ) { return new android.content.ContentProviderClient ( this , provider ) ; } return null ; }

Target:
public final android.content.ContentProviderClient acquireContentProviderClient ( java.lang.String name ) { android.content.IContentProvider provider = acquireProvider ( name ) ; if ( provider != null ) { return new android.content.ContentProviderClient ( this , provider , true ) ; } return null ; }
Source:
void setUp ( ) { createChannel ( ) ; sendNotifications ( ) ; status = READY ; state = com.android.cts.verifier.notifications.NotificationListenerVerifierActivity.GetSnoozedNotificationTest.READY_TO_SNOOZE ; delay ( ) ; }

Target:
void setUp ( ) { createChannel ( ) ; sendNotifications ( ) ; status = READY ; state = com.android.cts.verifier.notifications.NotificationListenerVerifierActivity.GetSnoozedNotificationTest.READY_TO_SNOOZE ; }
Source:
private void addPage ( org.eclipse.swt.widgets.Composite page , java.lang.String title ) { page.setData ( title ) ; mPages.add ( page ) ; mPageList.add ( title ) ; }

Target:
protected void addPage ( org.eclipse.swt.widgets.Composite page , java.lang.String title ) { page.setData ( title ) ; mPages.add ( page ) ; if ( ( mPageList ) != null ) { mPageList.add ( title ) ; } }
Source:
public boolean isFilterEmpty ( ) { return ( mPids.size ( ) ) > 0 ; }

Target:
public boolean isFilterEmpty ( ) { return ( mPids.size ( ) ) == 0 ; }
Source:
public synchronized java.lang.String getPluginsPath ( ) { return "" ; }

Target:
public java.lang.String getPluginsPath ( ) { return "" ; }
Source:
public void testJavaStrings ( ) { assertEquals ( mAppTextView2.getText ( ) , "SUCCESS-APP" ) ; }

Target:
public void testJavaStrings ( ) { assertEquals ( "SUCCESS-APP" , mAppTextView2.getText ( ) . toString ( ) ) ; }
Source:
public com.google.common.collect.ImmutableSet < com.android.manifmerger.XmlNode.NodeKey > getNodeKeys ( ) { return mRecords.keySet ( ) ; }

Target:
public java.util.Set < com.android.manifmerger.XmlNode.NodeKey > getNodeKeys ( ) { return mRecords.keySet ( ) ; }
Source:
synchronized int nContextCreate ( int dev , int ver , int sdkVer , int contextType ) { return rsnContextCreate ( dev , ver , sdkVer , contextType ) ; }

Target:
native long rsnContextCreate ( long dev , int ver , int sdkVer , int contextType ) ;