auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void answer ( com.android.server.telecom.Call call , int videoState ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "answer" ) ) ) { try { logOutgoing ( "answer %s %d" , callId , videoState ) ; if ( android.telecom.VideoProfile.isAudioOnly ( videoState ) ) { mServiceInterface.answer ( callId ) ; } else { mServiceInterface.answerVideo ( callId , videoState ) ; } } catch ( android.os.RemoteException e ) { } } }

Target:
void answer ( com.android.server.telecom.Call call , int videoState ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "answer" ) ) ) { try { logOutgoing ( "answer %s %d" , callId , videoState ) ; if ( android.telecom.VideoProfile.isAudioOnly ( videoState ) ) { mServiceInterface.answer ( callId , android.telecom.Log.getExternalSession ( ) ) ; } else { mServiceInterface.answerVideo ( callId , videoState , android.telecom.Log.getExternalSession ( ) ) ; } } catch ( android.os.RemoteException e ) { } } }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getClient" + ( mRemoteDevice ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getClient(): not allowed for non-active user" ) ; return null ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ) ) { return null ; } return mRemoteDevice ; }

Target:
private com.android.bluetooth.pbap.BluetoothPbapService getService ( java.lang.String perm ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { mService.enforceCallingOrSelfPermission ( perm , ( ( "Need " + perm ) + " permission" ) ) ; return mService ; } return null ; }
Source:
public void reject ( boolean rejectWithMessage , java.lang.String textMessage ) { if ( isRinging ( "reject" ) ) { mVideoStateHistory |= mVideoState ; if ( ( mConnectionService ) != null ) { mConnectionService.reject ( this , rejectWithMessage , textMessage ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "reject call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_REJECT ) ; } }

Target:
public void deflect ( android.net.Uri address ) { if ( isRinging ( "deflect" ) ) { mVideoStateHistory |= mVideoState ; if ( ( mConnectionService ) != null ) { mConnectionService.deflect ( this , address ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "deflect call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_DEFLECT , android.telecom.Log.pii ( address ) ) ; } }
Source:
public java.io.File getBinaryFile ( ) { assert ( binaryFile ) != null ; if ( ( workingDir ) != null ) { return new java.io.File ( workingDir , binaryFile.getPath ( ) ) ; } else { return binaryFile ; } }

Target:
public java.io.File getBinaryFile ( ) { assert ( binaryFile ) != null ; if ( ( ( workingDir ) != null ) && ( ! ( binaryFile.isAbsolute ( ) ) ) ) { return new java.io.File ( workingDir , binaryFile.getPath ( ) ) ; } else { return binaryFile ; } }
Source:
public static void setUp ( ) throws java.lang.Exception { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.optimizations.ExpressionSimplifierTest.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.optimizations.ExpressionSimplifierTest.hooks ) ; options.getConfigBuilder ( com.android.jack.optimizations.ExpressionSimplifierTest.hooks ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; }

Target:
public static void setUp ( ) throws java.lang.Exception { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.optimizations.ExpressionSimplifierTest.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.optimizations.ExpressionSimplifierTest.hooks ) ; com.android.sched.util.config.GatherConfigBuilder configBuilder = options.getConfigBuilder ( com.android.jack.optimizations.ExpressionSimplifierTest.hooks ) ; configBuilder.setDebug ( ) ; configBuilder.set ( Optimizations.ENABLE_NULL_INSTANCEOF.getName ( ) , java.lang.Boolean.TRUE ) ; com.android.sched.util.config.ThreadConfig.setConfig ( configBuilder.build ( ) ) ; }
Source:
public void copy1DRangeFrom ( int off , int count , android.support.v8.renderscript.Allocation data , int dataOff ) { mRS.nAllocationData2D ( getIDSafe ( ) , off , 0 , mSelectedLOD , mSelectedFace.mID , count , 1 , data.getID ( mRS ) , dataOff , 0 , data.mSelectedLOD , data.mSelectedFace.mID ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , float [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }
Source:
public static float min ( float a , float b ) { if ( a != a ) return a ; if ( ( ( a == 0.0F ) && ( b == 0.0F ) ) && ( ( java.lang.Float.floatToRawIntBits ( b ) ) == ( java.lang.StrictMath.negativeZeroFloatBits ) ) ) { return b ; } return a <= b ? a : b ; }

Target:
public static float abs ( float a ) { return java.lang.Math.abs ( a ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { mAndroidKeyStore = android.security.android.security.KeyStore.getInstance ( ) ; assertTrue ( mAndroidKeyStore.reset ( ) ) ; assertFalse ( mAndroidKeyStore.isUnlocked ( ) ) ; assertTrue ( mAndroidKeyStore.password ( "1111" ) ) ; assertTrue ( mAndroidKeyStore.isUnlocked ( ) ) ; assertEquals ( 0 , mAndroidKeyStore.saw ( "" ) . length ) ; mGenerator = java.security.KeyPairGenerator.getInstance ( AndroidKeyPairGenerator.NAME ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { mAndroidKeyStore = android.security.android.security.KeyStore.getInstance ( ) ; assertTrue ( mAndroidKeyStore.reset ( ) ) ; assertFalse ( mAndroidKeyStore.isUnlocked ( ) ) ; assertTrue ( mAndroidKeyStore.password ( "1111" ) ) ; assertTrue ( mAndroidKeyStore.isUnlocked ( ) ) ; java.lang.String [ ] aliases = mAndroidKeyStore.saw ( "" ) ; assertNotNull ( aliases ) ; assertEquals ( 0 , aliases.length ) ; mGenerator = java.security.KeyPairGenerator.getInstance ( AndroidKeyPairGenerator.NAME ) ; }
Source:
private boolean hasExampleAnnotation ( java.lang.Class < ? extends junit.framework.TestCase > aClass , java.lang.String methodName ) throws java.lang.NoSuchMethodException { java.lang.reflect.Method method = aClass.getMethod ( methodName ) ; android.test.suitebuilder.TestMethod testMethod = new android.test.suitebuilder.TestMethod ( method , aClass ) ; return new android.test.suitebuilder.annotation.HasAnnotation ( android.test.suitebuilder.annotation.HasAnnotationTest.Example.class ) . apply ( testMethod ) ; }

Target:
private boolean hasExampleAnnotation ( java.lang.Class < ? extends junit.framework.TestCase > aClass , java.lang.String methodName ) throws java.lang.NoSuchMethodException { java.lang.reflect.Method method = aClass.getMethod ( methodName ) ; android.test.suitebuilder.TestMethod testMethod = new android.test.suitebuilder.TestMethod ( method , aClass ) ; return android.test.suitebuilder.TestPredicates.hasAnnotation ( android.test.suitebuilder.TestPredicatesTest.Example.class ) . apply ( testMethod ) ; }
Source:
public void setCdmaBroadcastActivation ( boolean activate , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_BROADCAST_ACTIVATION , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( activate ? 0 : 1 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void iccCloseLogicalChannel ( int channel , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SIM_CLOSE_CHANNEL , response , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( channel ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public boolean getBooleanProperty ( java.lang.String key , boolean defVal ) { java.lang.String s = getProperty ( key ) ; if ( s != null ) { if ( ( s.equalsIgnoreCase ( "yes" ) ) || ( s.equals ( "true" ) ) ) { return true ; } if ( ( s.equalsIgnoreCase ( "no" ) ) || ( s.equalsIgnoreCase ( "false" ) ) ) { return false ; } } return defVal ; }

Target:
public long getLongProperty ( java.lang.String key , long defVal ) { java.lang.String s = getProperty ( key ) ; if ( s == null ) { return defVal ; } return java.lang.Long.valueOf ( s ) ; }
Source:
private void compileJava7Test ( @ javax.annotation.Nonnull java.lang.String name ) throws java.lang.Exception { com.android.jack.test.toolchain.JackBasedToolchain jackBasedToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; jackBasedToolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . addToClasspath ( jackBasedToolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , new java.io.File ( com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( ( "com.android.jack.java7.exceptions." + name ) ) , "jack" ) ) ; }

Target:
public void java7Exception002 ( ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( TEST002 ) . setSourceLevel ( SourceLevel.JAVA_7 ) . compileAndRunTest ( ) ; }
Source:
public void visitResourceReference ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable lombok.ast.AstVisitor visitor , @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.NonNull java.lang.String type , @ com.android.annotations.NonNull java.lang.String name , boolean isFramework ) { if ( ! isFramework ) { com.android.resources.ResourceType t = com.android.resources.ResourceType.getEnum ( type ) ; assert t != null : type ; com.android.tools.lint.checks.ResourceUsageModel.markReachable ( mModel.addResource ( t , name , null ) ) ; } }

Target:
public void visitResourceReference ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable com.intellij.psi.JavaElementVisitor visitor , @ com.android.annotations.NonNull com.intellij.psi.PsiElement node , @ com.android.annotations.NonNull com.android.resources.ResourceType type , @ com.android.annotations.NonNull java.lang.String name , boolean isFramework ) { if ( ! isFramework ) { com.android.tools.lint.checks.ResourceUsageModel.markReachable ( mModel.addResource ( type , name , null ) ) ; } }
Source:
public void run ( ) { try { java.lang.Thread.sleep ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.TIME_UNIT ) ; channel2.close ( ) ; } catch ( java.lang.Exception e ) { } }

Target:
public void test_read_$LByteBuffer ( ) throws java.lang.Exception { channel1.connect ( channel2Address ) ; channel2.connect ( channel1Address ) ; channel2.write ( java.nio.ByteBuffer.allocate ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_NORMAL ) ) ; java.nio.ByteBuffer [ ] readBuf = new java.nio.ByteBuffer [ 2 ] ; readBuf [ 0 ] = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_NORMAL ) ; readBuf [ 1 ] = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_NORMAL ) ; channel1.configureBlocking ( true ) ; assertEquals ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_NORMAL , channel1.read ( readBuf ) ) ; }
Source:
public void testGetName_EncodingWithWrongOidButGoodName_MultAVA_RFC2253 ( ) throws java.lang.Exception { java.lang.String dn = "OID.2.16.4.3=B + CN=A" ; javax.security.auth.x500.X500Principal principal = new javax.security.auth.x500.X500Principal ( dn ) ; byte [ ] enc = principal.getEncoded ( ) ; javax.security.auth.x500.X500Principal principal2 = new javax.security.auth.x500.X500Principal ( enc ) ; java.lang.String s = principal2.getName ( javax.security.auth.x500.X500Principal.RFC2253 ) ; assertEquals ( "2.16.4.3=#130142+CN=A" , s ) ; }

Target:
public void testGetName_EncodingWithWrongOidButGoodName_MultAVA_RFC2253 ( ) throws java.lang.Exception { java.lang.String dn = "OID.2.16.4.3=B + CN=A" ; javax.security.auth.x500.X500Principal principal = new javax.security.auth.x500.X500Principal ( dn ) ; byte [ ] enc = principal.getEncoded ( ) ; javax.security.auth.x500.X500Principal principal2 = new javax.security.auth.x500.X500Principal ( enc ) ; java.lang.String s = principal2.getName ( javax.security.auth.x500.X500Principal.RFC2253 ) ; assertTrue ( ( ( "2.16.4.3=#130142+CN=A" . equals ( s ) ) || ( "CN=A+2.16.4.3=#130142" . equals ( s ) ) ) ) ; }
Source:
private android.net.wifi.aware.WifiAwareSession attachAndGetSession ( ) { android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest attachCb = new android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest ( ) ; mWifiAwareManager.attach ( attachCb , null ) ; int cbCalled = attachCb.waitForAnyCallback ( ) ; assertEquals ( "Wi-Fi Aware attach" , android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest.ATTACHED , cbCalled ) ; android.net.wifi.aware.WifiAwareSession session = attachCb.getSession ( ) ; assertNotNull ( "Wi-Fi Aware session" , session ) ; return session ; }

Target:
private android.net.wifi.aware.WifiAwareSession attachAndGetSession ( ) { android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest attachCb = new android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest ( ) ; mWifiAwareManager.attach ( attachCb , mHandler ) ; int cbCalled = attachCb.waitForAnyCallback ( ) ; assertEquals ( "Wi-Fi Aware attach" , android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest.ATTACHED , cbCalled ) ; android.net.wifi.aware.WifiAwareSession session = attachCb.getSession ( ) ; assertNotNull ( "Wi-Fi Aware session" , session ) ; return session ; }
Source:
public android.content.Intent getIntentForIntentSender ( android.content.IIntentSender pendingResult ) { if ( ! ( pendingResult instanceof com.android.server.am.PendingIntentRecord ) ) { return null ; } try { com.android.server.am.PendingIntentRecord res = ( ( com.android.server.am.PendingIntentRecord ) ( pendingResult ) ) ; return ( res.key.requestIntent ) != null ? new android.content.Intent ( res.key.requestIntent ) : null ; } catch ( java.lang.ClassCastException e ) { } return null ; }

Target:
public android.content.Intent getIntentForIntentSender ( android.content.IIntentSender pendingResult ) { enforceCallingPermission ( Manifest.permission.GET_INTENT_SENDER_INTENT , "getIntentForIntentSender()" ) ; if ( ! ( pendingResult instanceof com.android.server.am.PendingIntentRecord ) ) { return null ; } try { com.android.server.am.PendingIntentRecord res = ( ( com.android.server.am.PendingIntentRecord ) ( pendingResult ) ) ; return ( res.key.requestIntent ) != null ? new android.content.Intent ( res.key.requestIntent ) : null ; } catch ( java.lang.ClassCastException e ) { } return null ; }
Source:
protected void engineInit ( int opmode , java.security.Key key , java.security.SecureRandom random ) throws java.security.InvalidKeyException { final byte [ ] encodedKey = checkInitArgs ( opmode , key ) ; try { engineInitInternal ( opmode , encodedKey , null , random ) ; } catch ( java.security.InvalidAlgorithmParameterException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
protected void engineInit ( int opmode , java.security.Key key , java.security.SecureRandom random ) throws java.security.InvalidKeyException { checkAndSetEncodedKey ( opmode , key ) ; try { engineInitInternal ( this . encodedKey , null , random ) ; } catch ( java.security.InvalidAlgorithmParameterException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public java.lang.String [ ] getIsimPcscf ( ) throws android.os.RemoteException { com.android.internal.telephony.Phone phone = getPhone ( getDefaultSubscription ( ) ) ; mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimPcscf ( ) ; } else { return null ; } }

Target:
public java.lang.String getIsimIst ( int subId ) throws android.os.RemoteException { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimIst ( ) ; } else { return null ; } } else { loge ( ( "getIsimIst phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
public static com.android.server.pm.PackageManagerService main ( android.content.Context context , com.android.server.pm.Installer installer , boolean factoryTest , boolean onlyCore ) { com.android.server.pm.PackageManagerService m = new com.android.server.pm.PackageManagerService ( context , installer , factoryTest , onlyCore ) ; android.os.ServiceManager.addService ( "package" , m ) ; return m ; }

Target:
public static com.android.server.pm.PackageManagerService main ( android.content.Context context , com.android.server.pm.Installer installer , boolean factoryTest , boolean onlyCore ) { com.android.server.pm.PackageManagerServiceCompilerMapping.checkProperties ( ) ; com.android.server.pm.PackageManagerService m = new com.android.server.pm.PackageManagerService ( context , installer , factoryTest , onlyCore ) ; m.enableSystemUserPackages ( ) ; com.android.internal.telephony.CarrierAppUtils.disableCarrierAppsUntilPrivileged ( context.getOpPackageName ( ) , m , UserHandle.USER_SYSTEM ) ; android.os.ServiceManager.addService ( "package" , m ) ; return m ; }
Source:
private static com.android.build.tests.ProjectTest createTest ( java.io.File projectFolder , java.io.File sdkFolder , java.io.File ndkFolder ) { java.lang.String testName = "build_" + ( projectFolder.getName ( ) ) ; com.android.build.tests.ProjectTest test = ( ( com.android.build.tests.ProjectTest ) ( junit.framework.TestSuite.createTest ( com.android.build.tests.ProjectTest.class , testName ) ) ) ; test.setProjectInfo ( projectFolder , sdkFolder , ndkFolder ) ; return test ; }

Target:
private static com.android.build.tests.ProjectTest createTest ( @ com.android.annotations.NonNull java.io.File projectFolder , @ com.android.annotations.NonNull java.io.File sdkFolder , @ com.android.annotations.NonNull java.io.File ndkFolder , @ com.android.annotations.NonNull java.lang.String taskName ) { java.lang.String testName = "build_" + ( projectFolder.getName ( ) ) ; com.android.build.tests.ProjectTest test = ( ( com.android.build.tests.ProjectTest ) ( junit.framework.TestSuite.createTest ( com.android.build.tests.ProjectTest.class , testName ) ) ) ; test.setProjectInfo ( projectFolder , sdkFolder , ndkFolder , taskName ) ; return test ; }
Source:
public java.lang.String getISO3Country ( ) { if ( ( countryCode.length ( ) ) == 0 ) { return countryCode ; } return libcore.icu.ICU.getISO3CountryNative ( toString ( ) ) ; }

Target:
public java.lang.String getISO3Country ( ) { java.lang.String code = libcore.icu.ICU.getISO3CountryNative ( toString ( ) ) ; if ( ( ! ( countryCode.isEmpty ( ) ) ) && ( code.isEmpty ( ) ) ) { throw new java.util.MissingResourceException ( ( "No 3-letter country code for locale: " + ( this ) ) , ( "FormatData_" + ( this ) ) , "ShortCountry" ) ; } return code ; }
Source:
private byte [ ] getPBPrimaryFolderVersion ( ) { long primaryVcMsb = 0 ; java.nio.ByteBuffer pvc = java.nio.ByteBuffer.allocate ( 16 ) ; pvc.putLong ( primaryVcMsb ) ; android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapObexServer.TAG , ( "BluetoothPbapService.primaryVersionCounter is " + ( BluetoothPbapService.primaryVersionCounter ) ) ) ; updatePBSecondaryFolderVersion ( BluetoothPbapService.primaryVersionCounter ) ; pvc.putLong ( BluetoothPbapService.primaryVersionCounter ) ; BluetoothPbapService.primaryVersionCounter = 0 ; return pvc.array ( ) ; }

Target:
private byte [ ] getPBPrimaryFolderVersion ( ) { long primaryVcMsb = 0 ; java.nio.ByteBuffer pvc = java.nio.ByteBuffer.allocate ( 16 ) ; pvc.putLong ( primaryVcMsb ) ; android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapObexServer.TAG , ( "primaryVersionCounter is " + ( BluetoothPbapUtils.primaryVersionCounter ) ) ) ; pvc.putLong ( BluetoothPbapUtils.primaryVersionCounter ) ; return pvc.array ( ) ; }
Source:
public static void assertArrayEquals ( java.lang.String message , short [ ] expecteds , short [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }

Target:
public static void assertArrayEquals ( java.lang.String message , short [ ] expecteds , short [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { org.junit.Assert.fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }
Source:
synchronized boolean isScanningTooFrequently ( ) { if ( ( lastScans.size ( ) ) < ( com.android.bluetooth.gatt.AppScanStats.NUM_SCAN_DURATIONS_KEPT ) ) { return false ; } return ( ( java.lang.System.currentTimeMillis ( ) ) - ( lastScans.get ( 0 ) . timestamp ) ) < ( com.android.bluetooth.gatt.AppScanStats.EXCESSIVE_SCANNING_PERIOD_MS ) ; }

Target:
synchronized boolean isScanningTooFrequently ( ) { if ( ( lastScans.size ( ) ) < ( com.android.bluetooth.gatt.AppScanStats.NUM_SCAN_DURATIONS_KEPT ) ) { return false ; } return ( ( android.os.SystemClock.elapsedRealtime ( ) ) - ( lastScans.get ( 0 ) . timestamp ) ) < ( com.android.bluetooth.gatt.AppScanStats.EXCESSIVE_SCANNING_PERIOD_MS ) ; }
Source:
public com.google.common.collect.ImmutableList < com.android.build.gradle.api.ApkOutputFile > getOutputs ( ) { com.google.common.collect.ImmutableList.Builder < com.android.build.gradle.api.ApkOutputFile > outputs = com.google.common.collect.ImmutableList.builder ( ) ; outputs.add ( getMainOutputFile ( ) ) ; if ( ( packageSplitResourcesTask ) != null ) { outputs.addAll ( packageSplitResourcesTask.getOutputSplitFiles ( ) ) ; } return outputs.build ( ) ; }

Target:
public com.google.common.collect.ImmutableList < com.android.build.gradle.api.ApkOutputFile > getOutputs ( ) { com.google.common.collect.ImmutableList.Builder < com.android.build.gradle.api.ApkOutputFile > outputs = com.google.common.collect.ImmutableList.builder ( ) ; outputs.add ( getMainOutputFile ( ) ) ; if ( ( splitZipAlign ) != null ) { outputs.addAll ( splitZipAlign.getOutputSplitFiles ( ) ) ; } else { if ( ( packageSplitResourcesTask ) != null ) { outputs.addAll ( packageSplitResourcesTask.getOutputSplitFiles ( ) ) ; } } return outputs.build ( ) ; }
Source:
public void removeImsFeatureStatusCallback ( com.android.ims.internal.IImsFeatureStatusCallback c ) { if ( c == null ) { return ; } synchronized ( mStatusCallbacks ) { mStatusCallbacks.remove ( c ) ; } }

Target:
public void onChangeCapabilityConfigurationError ( int capability , int radioTech , @ android.telephony.ims.feature.ImsFeature.ImsCapabilityError int reason ) { if ( ( mCallback ) == null ) { return ; } try { mCallback.onChangeCapabilityConfigurationError ( capability , radioTech , reason ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.ims.feature.ImsFeature.LOG_TAG , "onChangeCapabilityConfigurationError called on dead binder." ) ; } }
Source:
public static void nonBlockingUpdateNewMessageIndicator ( final android.content.Context context , final boolean isNew , final boolean isStatusMessage ) { new java.lang.Thread ( new java.lang.Runnable ( ) { public void run ( ) { com.android.mms.transaction.MessagingNotification.blockingUpdateNewMessageIndicator ( context , isNew , isStatusMessage ) ; } } ) . start ( ) ; }

Target:
public static void nonBlockingUpdateNewMessageIndicator ( final android.content.Context context , final long newMsgThreadId , final boolean isStatusMessage ) { new java.lang.Thread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.mms.transaction.MessagingNotification.blockingUpdateNewMessageIndicator ( context , newMsgThreadId , isStatusMessage ) ; } } , "MessagingNotification.nonBlockingUpdateNewMessageIndicator" ) . start ( ) ; }
Source:
public void testUnknownContentXml ( ) throws java.lang.Exception { java.lang.String document = ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + "<r:unknown />" ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-complex-type.2.4.a: Invalid content was found.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testValidateLocalAddonFile2 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/addon_sample_2.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getAddonValidator ( 2 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }
Source:
public void reset ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.reset" , ( ( ( "the uri for this is " + ( voicemailUri ) ) + " and number is " ) + ( numberVoicemailFrom ) ) ) ; voicemailUri = null ; voicemailLoadingStatusView.setVisibility ( com.android.dialer.voicemail.listui.GONE ) ; numberVoicemailFrom = null ; }

Target:
public void reset ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.reset" , ( ( ( "the uri for this is " + ( voicemailUri ) ) + " and number is " ) + ( numberVoicemailFrom ) ) ) ; voicemailUri = null ; voicemailLoadingStatusView.setVisibility ( com.android.dialer.voicemail.listui.GONE ) ; numberVoicemailFrom = null ; phoneAccountId = null ; phoneAccountComponentName = null ; }
Source:
private android.bluetooth.BluetoothGattDescriptor getDescriptor ( ) { android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleClientService.CHARACTERISTIC_UUID ) ; if ( characteristic == null ) return null ; android.bluetooth.BluetoothGattDescriptor descriptor = characteristic.getDescriptor ( com.android.cts.verifier.bluetooth.BleClientService.DESCRIPTOR_UUID ) ; if ( descriptor == null ) { showMessage ( "Descriptor not found" ) ; return null ; } return descriptor ; }

Target:
private android.bluetooth.BluetoothGattCharacteristic getCharacteristic ( java.util.UUID serverUid , java.util.UUID characteristicUid ) { android.bluetooth.BluetoothGattCharacteristic characteristic = null ; android.bluetooth.BluetoothGattService service = getService ( serverUid ) ; if ( service != null ) { characteristic = service.getCharacteristic ( characteristicUid ) ; if ( characteristic == null ) { showMessage ( "Characteristic not found" ) ; } } return characteristic ; }
Source:
private static java.io.File getAutoProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ) == null ) { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getReferenceToolchain ( ) ; java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsSrcDir = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.annotation.processor.sample.processors" ) ; toolchain.srcToLib ( processorsDir , false , com.android.jack.annotation.processor.AnnotationProcessorTests.ANNOTATIONS_DIR , processorsSrcDir ) ; com.android.jack.test.toolchain.AbstractTestTools.copyFileToDir ( new java.io.File ( processorsSrcDir , "javax.annotation.processing.Processor" ) , "META-INF/services/javax.annotation.processing.Processor" , processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors = processorsDir ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ; }

Target:
private static java.io.File getAutoProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ) == null ) { java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsJar = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "autoProcessor" , ".jar" ) ; java.io.File processorsSrcDir = com.android.jack.annotation.processor.AnnotationProcessorTests.compileProcessorsToDir ( processorsDir ) ; com.android.jack.test.toolchain.AbstractTestTools.copyFileToDir ( new java.io.File ( processorsSrcDir , "javax.annotation.processing.Processor" ) , "META-INF/services/javax.annotation.processing.Processor" , processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.makeZipFromDir ( processorsDir , processorsJar ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors = processorsJar ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ; }
Source:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) throws android.os.RemoteException { synchronized ( this ) { mDidUpdate = true ; } systemReady ( goingCallback ) ; }

Target:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) { mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.server.am.ActivityManagerService.this ) { mDidUpdate = true ; } com.android.server.am.ActivityManagerService.writeLastDonePreBootReceivers ( doneReceivers ) ; systemReady ( goingCallback ) ; } } ) ; }
Source:
public void run ( ) { mAwContents.onDetachedFromWindow ( ) ; }

Target:
public void onDetachedFromWindow ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDetachedFromWindow ( ) ; } } ) ; return ; } mAwContents.onDetachedFromWindow ( ) ; if ( ( mGLfunctor ) != null ) { mGLfunctor.detach ( ) ; } }
Source:
private static java.net.InetAddress [ ] getAllByName0 ( java.lang.String host , java.net.InetAddress reqAddr , int netId , boolean check ) throws java.net.UnknownHostException { if ( check ) { java.lang.SecurityManager security = java.lang.System.getSecurityManager ( ) ; if ( security != null ) { security.checkConnect ( host , ( - 1 ) ) ; } } return java.net.InetAddress.lookupHostByName ( host , netId ) ; }

Target:
public static java.net.InetAddress getLoopbackAddress ( ) { return java.net.InetAddress.impl.loopbackAddresses ( ) [ 0 ] ; }
Source:
public java.lang.String guessZoneIdByInstantOffsetDstCountry ( long timeMillis , int utcOffsetMillis , boolean isDst , java.lang.String isoCountryCode ) { java.util.TimeZone timeZone = android.util.TimeUtils.getTimeZone ( utcOffsetMillis , isDst , timeMillis , isoCountryCode ) ; return timeZone == null ? null : timeZone.getID ( ) ; }

Target:
public com.android.internal.telephony.TimeZoneLookupHelper.OffsetResult lookupByNitzCountry ( com.android.internal.telephony.NitzData nitzData , java.lang.String isoCountryCode ) { libcore.util.CountryTimeZones countryTimeZones = libcore.util.TimeZoneFinder.getInstance ( ) . lookupCountryTimeZones ( isoCountryCode ) ; if ( countryTimeZones == null ) { return null ; } java.util.TimeZone bias = android.icu.util.TimeZone.getDefault ( ) ; libcore.util.CountryTimeZones.OffsetResult offsetResult = countryTimeZones.lookupByOffsetWithBias ( nitzData.getLocalOffsetMillis ( ) , nitzData.isDst ( ) , nitzData.getCurrentTimeInMillis ( ) , bias ) ; if ( offsetResult == null ) { return null ; } return new com.android.internal.telephony.TimeZoneLookupHelper.OffsetResult ( offsetResult.mTimeZone.getID ( ) , offsetResult.mOneMatch ) ; }
Source:
public void onCreate ( ) { mHandlerThread = new android.os.HandlerThread ( "RecommendationProvider" ) ; mHandlerThread.start ( ) ; mHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; mProvider = new com.android.networkrecommendation.DefaultNetworkRecommendationService.DefaultNetworkRecommendationProvider ( mHandler , ( ( android.net.NetworkScoreManager ) ( getSystemService ( Context.NETWORK_SCORE_SERVICE ) ) ) ) ; }

Target:
public void onCreate ( ) { mHandlerThread = new android.os.HandlerThread ( "RecommendationProvider" ) ; mHandlerThread.start ( ) ; mHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; mProvider = new com.android.networkrecommendation.DefaultNetworkRecommendationService.DefaultNetworkRecommendationProvider ( mHandler , ( ( android.net.NetworkScoreManager ) ( getSystemService ( Context.NETWORK_SCORE_SERVICE ) ) ) , new com.android.networkrecommendation.DefaultNetworkRecommendationService.ScoreStorage ( ) ) ; }
Source:
public void run ( ) { mActivity.changeTest ( mTestName , false ) ; android.util.Log.v ( TAG , ( ( ( "Benchmark for test \"" + ( mTestName.toString ( ) ) ) + "\" is: " ) + ( mResult ) ) ) ; synchronized ( this ) { this . notify ( ) ; } }

Target:
public void run ( ) { mResult = mActivity.mProcessor.getInstrumentationResult ( mTestName ) ; android.util.Log.v ( TAG , ( ( ( "Benchmark for test \"" + ( mTestName.toString ( ) ) ) + "\" is: " ) + ( mResult ) ) ) ; synchronized ( this ) { this . notify ( ) ; } }
Source:
public static float nextUp ( float f ) { if ( ( sun.misc.FpUtils.isNaN ( f ) ) || ( f == ( sun.misc.FloatConsts.POSITIVE_INFINITY ) ) ) return f ; else { f += 0.0F ; return java.lang.Float.intBitsToFloat ( ( ( java.lang.Float.floatToRawIntBits ( f ) ) + ( f >= 0.0F ? + 1 : - 1 ) ) ) ; } }

Target:
public static float nextUp ( float f ) { return java.lang.Math.nextUp ( f ) ; }
Source:
public void call ( org.chromium.mojo.bindings.RunResponseMessageParams response ) { mVersion = response.queryVersionResult.version ; callback.call ( mVersion ) ; }

Target:
public void call ( org.chromium.mojo.bindings.interfacecontrol.RunResponseMessageParams response ) { if ( ( ( response.output ) != null ) && ( ( response.output.which ( ) ) == ( RunOutput.Tag.QueryVersionResult ) ) ) { mVersion = response.output.getQueryVersionResult ( ) . version ; } callback.call ( mVersion ) ; }
Source:
public void testAesCbcHmacMd5Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacSha1Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 ) ; }
Source:
public boolean addToBlacklist ( java.lang.String bssid ) { if ( android.text.TextUtils.isEmpty ( bssid ) ) return false ; return doBooleanCommand ( ( "BLACKLIST " + bssid ) ) ; }

Target:
public boolean stopFilteringMulticastV6Packets ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.addRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V6_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) ; } else { return ( ( doBooleanCommand ( "DRIVER RXFILTER-STOP" ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-ADD 3" ) ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-START" ) ) ; } }
Source:
private void gCTRPartial ( byte [ ] buf , int off , int len , byte [ ] out , int outOff ) { byte [ ] tmp = getNextCounterBlock ( ) ; org.bouncycastle.crypto.modes.GCMBlockCipher.xor ( tmp , buf , off , len ) ; java.lang.System.arraycopy ( tmp , 0 , out , outOff , len ) ; gHASHPartial ( S , ( forEncryption ? tmp : buf ) , 0 , len ) ; totalLength += len ; }

Target:
private void gCTRPartial ( byte [ ] buf , int off , int len , byte [ ] out , int outOff ) { byte [ ] tmp = getNextCounterBlock ( ) ; org.bouncycastle.crypto.modes.gcm.GCMUtil.xor ( tmp , buf , off , len ) ; java.lang.System.arraycopy ( tmp , 0 , out , outOff , len ) ; gHASHPartial ( S , ( forEncryption ? tmp : buf ) , 0 , len ) ; totalLength += len ; }
Source:
private void updateHoverRegion ( int x , int y ) { x = imageXCoordinate ( x ) ; y = imageYCoordinate ( y ) ; com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo verticalUpdateRegion = findVerticalPatch ( x , y ) ; com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo horizontalUpdateRegion = findHorizontalPatch ( x , y ) ; computeHighlightRegions ( verticalUpdateRegion , horizontalUpdateRegion ) ; java.awt.Cursor c = getCursor ( x , y , verticalUpdateRegion , horizontalUpdateRegion ) ; setCursor ( c ) ; }

Target:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo findHorizontalPatch ( int x , int y ) { java.util.List < com.android.draw9patch.ui.Pair < java.lang.Integer > > markers ; com.android.draw9patch.ui.ImageViewer.UpdateRegion region ; if ( y < ( ( image.getHeight ( ) ) / 2 ) ) { markers = patchInfo.horizontalPatchMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.TOP_PATCH ; } else { markers = patchInfo.horizontalPaddingMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.BOTTOM_PADDING ; } return getContainingPatch ( markers , x , region ) ; }
Source:
private static long getFormatter ( java.lang.String skeleton , java.lang.String localeName , java.lang.String tzName ) { java.lang.String key = ( ( ( skeleton + "\t" ) + localeName ) + "\t" ) + tzName ; java.lang.Long formatter = libcore.icu.DateIntervalFormat.CACHED_FORMATTERS.get ( key ) ; if ( formatter != null ) { return formatter ; } long address = libcore.icu.DateIntervalFormat.createDateIntervalFormat ( skeleton , localeName , tzName ) ; libcore.icu.DateIntervalFormat.CACHED_FORMATTERS.put ( key , address ) ; return address ; }

Target:
private static com.ibm.icu.text.DateIntervalFormat getFormatter ( java.lang.String skeleton , java.util.Locale locale , java.util.TimeZone tz ) { java.lang.String key = ( ( ( skeleton + "\t" ) + locale ) + "\t" ) + tz ; libcore.icu.DateIntervalFormat formatter = libcore.icu.DateIntervalFormat.CACHED_FORMATTERS.get ( key ) ; if ( formatter != null ) { return formatter ; } formatter = libcore.icu.com.ibm.icu.text.DateIntervalFormat.getInstance ( skeleton , locale ) ; formatter.setTimeZone ( libcore.icu.DateIntervalFormat.icuTimeZone ( tz ) ) ; libcore.icu.DateIntervalFormat.CACHED_FORMATTERS.put ( key , formatter ) ; return formatter ; }
Source:
public void notifyObservers ( java.lang.Object arg ) { java.util.Observer [ ] arrLocal ; synchronized ( this ) { if ( ! ( changed ) ) return ; arrLocal = observers.toArray ( new java.util.Observer [ observers.size ( ) ] ) ; clearChanged ( ) ; } for ( int i = ( arrLocal.length ) - 1 ; i >= 0 ; i -- ) arrLocal [ i ] . update ( this , arg ) ; }

Target:
public void notifyObservers ( java.lang.Object arg ) { java.util.Observer [ ] arrLocal ; synchronized ( this ) { if ( ! ( hasChanged ( ) ) ) return ; arrLocal = observers.toArray ( new java.util.Observer [ observers.size ( ) ] ) ; clearChanged ( ) ; } for ( int i = ( arrLocal.length ) - 1 ; i >= 0 ; i -- ) arrLocal [ i ] . update ( this , arg ) ; }
Source:
public void destroyUserData ( java.lang.String uuid , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { mInstaller.execute ( "destroy_user_data" , uuid , userId , flags ) ; }

Target:
public void createUserData ( java.lang.String uuid , int userId , int userSerial , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.createUserData ( uuid , userId , userSerial , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void testPressKey ( ) { initTextViewForTyping ( ) ; mInstrumentation.sendStringSync ( "a" ) ; assertEquals ( "a" , mTextView.getText ( ) . toString ( ) ) ; mInstrumentation.sendStringSync ( "b" ) ; assertEquals ( "ab" , mTextView.getText ( ) . toString ( ) ) ; sendKeys ( KeyEvent.KEYCODE_DEL ) ; assertEquals ( "a" , mTextView.getText ( ) . toString ( ) ) ; }

Target:
public void testPressKey ( ) { initTextViewForTyping ( ) ; mKeyEventUtil.sendString ( mTextView , "a" ) ; assertEquals ( "a" , mTextView.getText ( ) . toString ( ) ) ; mKeyEventUtil.sendString ( mTextView , "b" ) ; assertEquals ( "ab" , mTextView.getText ( ) . toString ( ) ) ; mKeyEventUtil.sendKeys ( mTextView , KeyEvent.KEYCODE_DEL ) ; assertEquals ( "a" , mTextView.getText ( ) . toString ( ) ) ; }
Source:
public static void refresh ( ) { if ( org.apache.harmony.security.fortress.Services.needRefresh ) { ( org.apache.harmony.security.fortress.Services.refreshNumber ) ++ ; org.apache.harmony.security.fortress.Services.updateServiceInfo ( ) ; } }

Target:
public static int getCacheVersion ( ) { synchronized ( org.apache.harmony.security.fortress.Services.providers ) { if ( org.apache.harmony.security.fortress.Services.needRefresh ) { ( org.apache.harmony.security.fortress.Services.cacheVersion ) ++ ; synchronized ( org.apache.harmony.security.fortress.Services.services ) { org.apache.harmony.security.fortress.Services.services.clear ( ) ; } org.apache.harmony.security.fortress.Services.cachedSecureRandomService = null ; for ( java.security.Provider p : org.apache.harmony.security.fortress.Services.providers ) { org.apache.harmony.security.fortress.Services.initServiceInfo ( p ) ; } org.apache.harmony.security.fortress.Services.needRefresh = false ; } return org.apache.harmony.security.fortress.Services.cacheVersion ; } }
Source:
public void clearField ( java.lang.String fieldName ) throws java.lang.NoSuchMethodException { java.lang.reflect.Method m = getClass ( ) . getMethod ( android.icu.dev.test.format.NumberFormatTestTuple.fieldToClearer ( fieldName ) ) ; try { m.invoke ( this ) ; } catch ( java.lang.IllegalAccessException e ) { throw new java.lang.RuntimeException ( e ) ; } catch ( java.lang.reflect.InvocationTargetException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void clearField ( java.lang.String fieldName ) throws java.lang.NoSuchMethodException { java.lang.reflect.Method m = getClass ( ) . getMethod ( android.icu.dev.test.format.NumberFormatTestData.fieldToClearer ( fieldName ) ) ; try { m.invoke ( this ) ; } catch ( java.lang.IllegalAccessException e ) { throw new java.lang.RuntimeException ( e ) ; } catch ( java.lang.reflect.InvocationTargetException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
private void registerUiccCardEvents ( ) { if ( ( mUiccApplication ) != null ) { mUiccApplication.registerForReady ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_APP_READY , null ) ; mUiccApplication.registerForNetworkLocked ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_NETWORK_LOCKED , null ) ; } if ( ( mIccRecords ) != null ) { mIccRecords.registerForRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_RECORDS_LOADED , null ) ; mIccRecords.registerForLockedRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_LOCKED , null ) ; mIccRecords.registerForRecordsEvents ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_RECORD_EVENTS , null ) ; } }

Target:
private void registerUiccCardEvents ( ) { if ( ( mUiccApplication ) != null ) { mUiccApplication.registerForReady ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_APP_READY , null ) ; } if ( ( mIccRecords ) != null ) { mIccRecords.registerForRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_RECORDS_LOADED , null ) ; mIccRecords.registerForLockedRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_LOCKED , null ) ; mIccRecords.registerForNetworkLockedRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_NETWORK_LOCKED , null ) ; mIccRecords.registerForRecordsEvents ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_RECORD_EVENTS , null ) ; } }
Source:
public boolean writeToFile ( java.lang.String path , java.lang.String format ) { java.awt.image.BufferedImage argb = convertSnapshot ( ) ; try { javax.imageio.ImageIO.write ( argb , format , new java.io.File ( path ) ) ; } catch ( java.io.IOException e ) { return false ; } return true ; }

Target:
public boolean writeToFile ( org.python.core.PyObject [ ] args , java.lang.String [ ] kws ) { org.python.core.ArgParser ap = com.android.monkeyrunner.JythonUtils.createArgParser ( args , kws ) ; com.google.common.base.Preconditions.checkNotNull ( ap ) ; java.lang.String path = ap.getString ( 0 ) ; java.lang.String format = ap.getString ( 1 , null ) ; return impl.writeToFile ( path , format ) ; }
Source:
public void handleSourceFile ( org.eclipse.core.resources.IFile file , int kind ) { if ( mProcessor.getExtension ( ) . equals ( file.getFileExtension ( ) ) ) { if ( kind == ( org.eclipse.core.resources.IResourceDelta.REMOVED ) ) { mRemoved.add ( file ) ; } else { mToCompile.add ( file ) ; } } mToCompile.addAll ( mProcessor.isDependency ( file ) ) ; }

Target:
public void handleSourceFile ( org.eclipse.core.resources.IFile file , int kind ) { if ( mProcessor.getExtensions ( ) . contains ( file.getFileExtension ( ) ) ) { if ( kind == ( org.eclipse.core.resources.IResourceDelta.REMOVED ) ) { mRemoved.add ( file ) ; } else { mToCompile.add ( file ) ; } } mToCompile.addAll ( mProcessor.isDependency ( file ) ) ; }