auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.google.common.truth.CollectionSubject issuesAsCollection ( ) { return com.google.common.truth.Truth.assertThat ( getSubject ( ) . getSyncIssues ( ) ) ; }

Target:
public com.android.builder.model.SyncIssue hasSingleIssue ( int severity , int type ) { java.util.Collection < com.android.builder.model.SyncIssue > subject = getSubject ( ) . getSyncIssues ( ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( subject ) . hasSize ( 1 ) ; com.android.builder.model.SyncIssue issue = subject.iterator ( ) . next ( ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( issue ) . isNotNull ( ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( issue ) . hasSeverity ( severity ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( issue ) . hasType ( type ) ; return issue ; }
Source:
private void notifyUserAction ( boolean enable ) { if ( ( mService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "mService is null" ) ; return ; } try { if ( enable ) { mService.onLeServiceUp ( ) ; } else { mService.onBrEdrDown ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } }

Target:
private void notifyUserAction ( boolean enable ) { try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "mService is null" ) ; return ; } if ( enable ) { mService.onLeServiceUp ( ) ; } else { mService.onBrEdrDown ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } }
Source:
public void testNoAddedCertificates ( ) throws java.lang.Exception { java.util.Set < java.lang.String > oemCertificateWhitelist = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( OEMCertificateWhitelist.OEM_CERTIFICATE_WHITELIST ) ) ; java.util.Set < java.lang.String > expectedCertificates = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( CertificateData.CERTIFICATE_DATA ) ) ; java.util.Set < java.lang.String > deviceCertificates = getDeviceCertificates ( ) ; deviceCertificates.removeAll ( expectedCertificates ) ; deviceCertificates.removeAll ( oemCertificateWhitelist ) ; assertEquals ( "Unknown CA certificates" , java.util.Collections.EMPTY_SET , deviceCertificates ) ; }

Target:
public void testNoAddedCertificates ( ) throws java.lang.Exception { java.util.Set < java.lang.String > oemWhitelistedCertificates = getOemWhitelistedCertificates ( ) ; java.util.Set < java.lang.String > expectedCertificates = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( CertificateData.CERTIFICATE_DATA ) ) ; java.util.Set < java.lang.String > deviceCertificates = getDeviceCertificates ( ) ; deviceCertificates.removeAll ( expectedCertificates ) ; deviceCertificates.removeAll ( oemWhitelistedCertificates ) ; assertEquals ( "Unknown CA certificates" , java.util.Collections.EMPTY_SET , deviceCertificates ) ; }
Source:
private static void verfyBatteryLevelChangedIntent ( android.bluetooth.BluetoothDevice device , int batteryLevel , org.mockito.ArgumentCaptor < android.content.Intent > intentArgument ) { org.junit.Assert.assertEquals ( BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED , intentArgument.getValue ( ) . getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intentArgument.getValue ( ) . getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( batteryLevel , intentArgument.getValue ( ) . getIntExtra ( BluetoothDevice.EXTRA_BATTERY_LEVEL , ( - 15 ) ) ) ; org.junit.Assert.assertEquals ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT , intentArgument.getValue ( ) . getFlags ( ) ) ; }

Target:
private static void verifyBatteryLevelChangedIntent ( android.bluetooth.BluetoothDevice device , int batteryLevel , org.mockito.ArgumentCaptor < android.content.Intent > intentArgument ) { com.android.bluetooth.btservice.RemoteDevicesTest.verifyBatteryLevelChangedIntent ( device , batteryLevel , intentArgument.getValue ( ) ) ; }
Source:
private static void validateAndroidAttributes ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement xmlElement ) { for ( com.android.manifmerger.XmlAttribute xmlAttribute : xmlElement.getAttributes ( ) ) { com.android.manifmerger.AttributeModel model = xmlAttribute.getModel ( ) ; if ( ( model != null ) && ( ( model.getValidator ( ) ) != null ) ) { model.getValidator ( ) . validates ( mergingReport , xmlAttribute , xmlAttribute.getValue ( ) ) ; } } }

Target:
private static void validateAndroidAttributes ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement xmlElement ) { for ( com.android.manifmerger.XmlAttribute xmlAttribute : xmlElement.getAttributes ( ) ) { com.android.manifmerger.AttributeModel model = xmlAttribute.getModel ( ) ; if ( ( model != null ) && ( ( model.getOnReadValidator ( ) ) != null ) ) { model.getOnReadValidator ( ) . validates ( mergingReport , xmlAttribute , xmlAttribute.getValue ( ) ) ; } } }
Source:
public boolean createDirectory ( proguard.io.DataEntry dataEntry ) throws java.io.IOException { if ( ! ( prepareEntry ( dataEntry ) ) ) { return false ; } closeEntry ( ) ; java.lang.String name = ( dataEntry.getName ( ) ) + ( proguard.classfile.ClassConstants.INTERNAL_PACKAGE_SEPARATOR ) ; if ( jarEntryNames.add ( name ) ) { currentJarOutputStream.putNextEntry ( new java.util.zip.ZipEntry ( name ) ) ; currentJarOutputStream.closeEntry ( ) ; } currentFinisher = null ; currentDataEntry = null ; return true ; }

Target:
public boolean createDirectory ( proguard.io.DataEntry dataEntry ) throws java.io.IOException { if ( ! ( prepareEntry ( dataEntry ) ) ) { return false ; } closeEntry ( ) ; java.lang.String name = ( dataEntry.getName ( ) ) + ( proguard.classfile.ClassConstants.PACKAGE_SEPARATOR ) ; if ( jarEntryNames.add ( name ) ) { currentJarOutputStream.putNextEntry ( new java.util.zip.ZipEntry ( name ) ) ; currentJarOutputStream.closeEntry ( ) ; } currentFinisher = null ; currentDataEntry = null ; return true ; }
Source:
public void testHasEntry ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putInt ( "key" , 1 ) ; assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasEntry ( "key" , 1 ) . matches ( bundle ) ) ; assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasEntry ( "key" , org.hamcrest.Matchers.equalTo ( 1 ) ) . matches ( bundle ) ) ; assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasEntry ( org.hamcrest.Matchers.equalTo ( "key" ) , org.hamcrest.Matchers.equalTo ( 1 ) ) . matches ( bundle ) ) ; }

Target:
public void hasEntryTesting ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putInt ( "key" , 1 ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasEntry ( "key" , 1 ) . matches ( bundle ) ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasEntry ( "key" , org.hamcrest.Matchers.equalTo ( 1 ) ) . matches ( bundle ) ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasEntry ( org.hamcrest.Matchers.equalTo ( "key" ) , org.hamcrest.Matchers.equalTo ( 1 ) ) . matches ( bundle ) ) ; }
Source:
public static void decode ( com.android.tools.rpclib.rpc.Decoder d , com.android.tools.rpclib.rpc.Device o ) throws java.io.IOException { o.Name = d.string ( ) ; o.Model = d.string ( ) ; o.OS = d.string ( ) ; o.MaxMemorySize = d.uint64 ( ) ; o.RequiresShaderPatching = d.bool ( ) ; }

Target:
public static void decode ( com.android.tools.rpclib.rpc.Decoder d , com.android.tools.rpclib.rpc.Device o ) throws java.io.IOException { o.Name = d.string ( ) ; o.Model = d.string ( ) ; o.OS = d.string ( ) ; o.PointerSize = d.uint8 ( ) ; o.PointerAlignment = d.uint8 ( ) ; o.MaxMemorySize = d.uint64 ( ) ; o.RequiresShaderPatching = d.bool ( ) ; }
Source:
public java.lang.String formatValue ( @ javax.annotation.Nonnull java.util.Map.Entry < T , U > data ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( keyParser.formatValue ( data.getKey ( ) ) ) ; sb.append ( separator ) ; sb.append ( valueParser.formatValue ( data.getValue ( ) ) ) ; return sb.toString ( ) ; }

Target:
public void checkValue ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull com.android.sched.util.codec.PairCodec.Pair < T , U > data ) throws com.android.sched.util.codec.CheckingException { com.android.sched.util.config.ChainedException.ChainedExceptionBuilder < com.android.sched.util.codec.CheckingException > exceptions = new com.android.sched.util.config.ChainedException.ChainedExceptionBuilder < com.android.sched.util.codec.CheckingException > ( ) ; try { keyParser.checkValue ( context , data.getFirst ( ) ) ; } catch ( com.android.sched.util.codec.CheckingException e ) { exceptions.appendException ( e ) ; } try { valueParser.checkValue ( context , data.getSecond ( ) ) ; } catch ( com.android.sched.util.codec.CheckingException e ) { exceptions.appendException ( e ) ; } exceptions.throwIfNecessary ( ) ; }
Source:
public boolean handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallbackDelegate.MSG_SNAPSHOT_OK : mCallback.onSuccess ( ( ( android.os.ParcelFileDescriptor ) ( msg.obj ) ) ) ; break ; case android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallbackDelegate.MSG_ERROR : mCallback.onError ( msg.arg1 ) ; break ; default : return false ; } return true ; }

Target:
public void onSuccess ( final android.os.ParcelFileDescriptor profileReadFd ) { mExecutor.execute ( ( ) -> mCallback.onSuccess ( profileReadFd ) ) ; }
Source:
public void trackingEnabled_updateAppNotPrivileged ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureUpdateAppPackageNotPrivileged ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME ) ; configureDataAppPackageOk ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME ) ; try { mPackageTracker.start ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } mFakeIntentHelper.assertNotInitialized ( ) ; mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; }

Target:
public void trackingEnabled_updateAppNotPrivileged ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureUpdateAppPackageNotPrivileged ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME ) ; configureDataAppPackageOk ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME ) ; try { mPackageTracker.start ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } mFakeIntentHelper.assertNotInitialized ( ) ; mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; }
Source:
public void testSelectedDescendantsMatch_ThereAreNone ( ) { android.view.View grany = setUpViewHierarchy ( ) ; try { android.support.test.espresso.assertion.ViewAssertions.selectedDescendantsMatch ( android.support.test.espresso.matcher.ViewMatchers.withText ( "welfjkw" ) , android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) ) . check ( grany , absentException ) ; } catch ( java.lang.AssertionError error ) { throw new java.lang.RuntimeException ( "Should not die!!!" , error ) ; } }

Target:
public void selectedDescendantsMatch_ThereAreNone ( ) { android.view.View grany = setUpViewHierarchy ( ) ; android.support.test.espresso.assertion.ViewAssertions.selectedDescendantsMatch ( android.support.test.espresso.matcher.ViewMatchers.withText ( "welfjkw" ) , android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) ) . check ( grany , absentException ) ; }
Source:
public static java.lang.String getConfigDir ( java.util.Locale locale ) { if ( locale == null ) locale = java.util.Locale.US ; java.lang.String dir = "/system/usr/srec/config/" + ( locale.toString ( ) . replace ( '_' , '.' ) . toLowerCase ( ) ) ; if ( new java.io.File ( dir ) . isDirectory ( ) ) return dir ; return null ; }

Target:
public static java.lang.String getConfigDir ( java.util.Locale locale ) { if ( locale == null ) locale = java.util.Locale.US ; java.lang.String dir = "/system/usr/srec/config/" + ( locale.toString ( ) . replace ( '_' , '.' ) . toLowerCase ( java.util.Locale.ROOT ) ) ; if ( new java.io.File ( dir ) . isDirectory ( ) ) return dir ; return null ; }
Source:
public void visitProgramMethod ( proguard.optimize.ProgramClass programClass , proguard.optimize.ProgramMethod programMethod ) { if ( ! ( proguard.optimize.info.ParameterUsageMarker.isParameterUsed ( programMethod , 0 ) ) ) { programMethod.u2accessFlags = ( ( programMethod.getAccessFlags ( ) ) & ( ~ ( ClassConstants.INTERNAL_ACC_FINAL ) ) ) | ( ClassConstants.INTERNAL_ACC_STATIC ) ; if ( ( extraStaticMemberVisitor ) != null ) { extraStaticMemberVisitor.visitProgramMethod ( programClass , programMethod ) ; } } }

Target:
public void visitProgramMethod ( proguard.optimize.ProgramClass programClass , proguard.optimize.ProgramMethod programMethod ) { if ( ! ( proguard.optimize.info.ParameterUsageMarker.isParameterUsed ( programMethod , 0 ) ) ) { programMethod.u2accessFlags = ( ( programMethod.getAccessFlags ( ) ) & ( ~ ( ClassConstants.ACC_FINAL ) ) ) | ( ClassConstants.ACC_STATIC ) ; if ( ( extraStaticMemberVisitor ) != null ) { extraStaticMemberVisitor.visitProgramMethod ( programClass , programMethod ) ; } } }
Source:
public com.android.jack.ir.ast.JVariable getJVariable ( @ javax.annotation.Nonnull org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding ecjVar ) { com.android.jack.ir.ast.JVariable jackVar = null ; if ( ( ecjVar.declaration ) == null ) { jackVar = locals.get ( ecjVar ) ; } else { jackVar = locals.get ( ecjVar.declaration ) ; } assert jackVar != null ; return jackVar ; }

Target:
public com.android.jack.ir.ast.JVariable getJVariable ( @ javax.annotation.Nonnull org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding ecjVar ) { com.android.jack.ir.ast.JVariable jackVar = null ; if ( ( ecjVar.declaration ) == null ) { jackVar = locals.get ( ecjVar ) ; } else { jackVar = locals.get ( ecjVar.declaration ) ; if ( ( jackVar == null ) && ( ( ( ecjVar.declaration.bits ) & ( org.eclipse.jdt.internal.compiler.ast.ASTNode.IsReachable ) ) == 0 ) ) { body.addLocal ( ast.createLocal ( ecjVar.declaration ) ) ; jackVar = locals.get ( ecjVar.declaration ) ; } } assert jackVar != null ; return jackVar ; }
Source:
public void testTimedoutNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.UNAVAILABLE , null ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testTimedoutNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.UNAVAILABLE , null ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( android.net.NetworkCapabilities.TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Object param1 ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; java.lang.Object [ ] params = new java.lang.Object [ ] { param1 } ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.util.function.Supplier < java.lang.String > msgSupplier ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msgSupplier.get ( ) ) ; doLog ( lr ) ; }
Source:
public boolean shouldDelayChildPressedState ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return shouldDelayChildPressedState ( ) ; } } ) ; return ret ; } return true ; }

Target:
public boolean zoomOut ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return zoomOut ( ) ; } } ) ; return ret ; } return mAwContents.zoomOut ( ) ; }
Source:
void update ( ) { libcore.util.MutableInt icon = new libcore.util.MutableInt ( 0 ) ; java.lang.CharSequence status = concat ( getChargeInfo ( icon ) , getOwnerInfo ( ) , getCurrentMessage ( ) ) ; setCompoundDrawablesWithIntrinsicBounds ( icon.value , 0 , 0 , 0 ) ; setText ( status ) ; }

Target:
void update ( ) { android.util.MutableInt icon = new android.util.MutableInt ( 0 ) ; java.lang.CharSequence status = concat ( getChargeInfo ( icon ) , getOwnerInfo ( ) , getCurrentMessage ( ) ) ; setCompoundDrawablesWithIntrinsicBounds ( icon.value , 0 , 0 , 0 ) ; setText ( status ) ; }
Source:
public void testKeyStore_DeleteEntry_NonExistent_Success ( ) throws java.lang.Exception { mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.importKey ( ( ( Credentials.USER_PRIVATE_KEY ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_KEY_1 ) ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.USER_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_USER_1 ) ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; mKeyStore.deleteEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ; }

Target:
public void testKeyStore_DeleteEntry_NonExistent_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.importKey ( ( ( Credentials.USER_PRIVATE_KEY ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_KEY_1 ) ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.USER_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_USER_1 ) ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; mKeyStore.deleteEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ; }
Source:
public void testAesCbcHmacSha512Tcp4UdpEncap ( ) 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_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesCbcHmacMd5Udp4UdpEncap ( ) 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 , android.net.cts.IpSecManagerTest.getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
private void updateState ( android.net.NetworkInfo.DetailedState detailedState , java.lang.String reason ) { if ( com.android.server.connectivity.Vpn.LOGD ) android.util.Log.d ( com.android.server.connectivity.Vpn.TAG , ( ( ( "setting state=" + detailedState ) + ", reason=" ) + reason ) ) ; mNetworkInfo.setDetailedState ( detailedState , reason , null ) ; if ( ( mNetworkAgent ) != null ) { mNetworkAgent.sendNetworkInfo ( mNetworkInfo ) ; } }

Target:
protected void updateState ( android.net.NetworkInfo.DetailedState detailedState , java.lang.String reason ) { if ( com.android.server.connectivity.Vpn.LOGD ) android.util.Log.d ( com.android.server.connectivity.Vpn.TAG , ( ( ( "setting state=" + detailedState ) + ", reason=" ) + reason ) ) ; mNetworkInfo.setDetailedState ( detailedState , reason , null ) ; if ( ( mNetworkAgent ) != null ) { mNetworkAgent.sendNetworkInfo ( mNetworkInfo ) ; } updateAlwaysOnNotification ( detailedState ) ; }
Source:
public void testPressImeActionButtonOnNonEditorWidget ( ) { try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.send_button ) ) . perform ( android.support.test.espresso.action.ViewActions.pressImeActionButton ( ) ) ; fail ( "Expected exception on previous call" ) ; } catch ( android.support.test.espresso.PerformException expected ) { assertTrue ( ( ( expected.getCause ( ) ) instanceof java.lang.IllegalStateException ) ) ; } }

Target:
public void pressImeActionButtonOnNonEditorWidget ( ) { expectedException.expect ( android.support.test.espresso.PerformException.class ) ; expectedException.expectCause ( new org.hamcrest.CustomTypeSafeMatcher < java.lang.Throwable > ( "instance of IllegalStateException" ) { @ java.lang.Override protected boolean matchesSafely ( java.lang.Throwable throwable ) { return throwable instanceof java.lang.IllegalStateException ; } } ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.send_button ) ) . perform ( android.support.test.espresso.action.ViewActions.pressImeActionButton ( ) ) ; }
Source:
public void installPackage ( @ com.android.annotations.NonNull java.io.File apkFile , int timeout , com.android.utils.ILogger logger ) throws com.android.builder.testing.api.DeviceException { try { iDevice.installPackage ( apkFile.getAbsolutePath ( ) , true ) ; } catch ( java.lang.Exception e ) { logger.error ( e , ( "Unable to install " + ( apkFile.getAbsolutePath ( ) ) ) ) ; throw new com.android.builder.testing.api.DeviceException ( e ) ; } }

Target:
public void installPackage ( @ com.android.annotations.NonNull java.io.File apkFile , @ com.android.annotations.NonNull java.util.Collection < java.lang.String > options , int timeout , com.android.utils.ILogger logger ) throws com.android.builder.testing.api.DeviceException { try { iDevice.installPackage ( apkFile.getAbsolutePath ( ) , true , options ) ; } catch ( java.lang.Exception e ) { logger.error ( e , ( "Unable to install " + ( apkFile.getAbsolutePath ( ) ) ) ) ; throw new com.android.builder.testing.api.DeviceException ( e ) ; } }
Source:
public void testShowWhenLockedActivity ( ) throws java.lang.Exception { if ( ! ( isHandheld ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; pressHomeButton ( ) ; unlockDevice ( ) ; }

Target:
public void testShowWhenLockedActivity ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; pressHomeButton ( ) ; unlockDevice ( ) ; }
Source:
public int setProvisionedStringValue ( int item , java.lang.String value ) throws com.android.ims.ImsException { int ret = com.android.ims.ImsConfig.OperationStatusConstants.UNKNOWN ; try { ret = miConfig.setProvisionedStringValue ( item , value ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "setProvisionedStringValue()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } if ( DBG ) { android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( ( ( "setProvisionedStringValue(): item = " + item ) + ", value =" ) + value ) ) ; } return ret ; }

Target:
public int setProvisionedStringValue ( int item , java.lang.String value ) throws com.android.ims.ImsException { return setConfig ( item , value ) ; }
Source:
public void onMerge ( android.telecom.Connection connection ) { try { com.android.internal.telephony.Phone phone = ( ( com.android.services.telephony.TelephonyConnection ) ( connection ) ) . getPhone ( ) ; if ( phone != null ) { phone.conference ( ) ; } } catch ( com.android.internal.telephony.CallStateException e ) { android.telecom.Log.e ( this , e , "Exception thrown trying to merge call into a conference" ) ; } }

Target:
public void onMerge ( android.telecom.Connection connection ) { try { com.android.internal.telephony.Phone phone = mConferenceHost.getPhone ( ) ; if ( phone != null ) { phone.conference ( ) ; } } catch ( com.android.internal.telephony.CallStateException e ) { android.telecom.Log.e ( this , e , "Exception thrown trying to merge call into a conference" ) ; } }
Source:
public static < E extends java.lang.Comparable < ? super E > > com.google.common.collect.ImmutableSortedSet < E > of ( E e1 , E e2 , E e3 , E e4 , E e5 ) { return com.google.common.collect.ImmutableSortedSet.copyOf ( com.google.common.collect.Ordering.natural ( ) , java.util.Arrays.asList ( e1 , e2 , e3 , e4 , e5 ) ) ; }

Target:
public static < E extends java.lang.Comparable < ? super E > > com.google.common.collect.ImmutableSortedSet < E > of ( E e1 , E e2 , E e3 , E e4 , E e5 ) { return com.google.common.collect.ImmutableSortedSet.construct ( com.google.common.collect.Ordering.natural ( ) , 5 , e1 , e2 , e3 , e4 , e5 ) ; }
Source:
public boolean onTouchEvent ( final android.view.MotionEvent ev ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onTouchEvent ( ev ) ; } } ) ; return ret ; } return mAwContents.onTouchEvent ( ev ) ; }

Target:
public boolean onHoverEvent ( final android.view.MotionEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onHoverEvent ( event ) ; } } ) ; return ret ; } return mAwContents.onHoverEvent ( event ) ; }
Source:
public static void loop7 ( boolean incoming ) { while ( ( java.lang.Runtime.getRuntime ( ) ) != null ) { java.lang.System.out.println ( incoming ) ; while ( incoming ) { } } }

Target:
public static void loop6 ( boolean incoming ) { for ( long i = java.lang.System.nanoTime ( ) ; i < 42 ; ++ i ) { java.lang.System.out.println ( incoming ) ; for ( long j = java.lang.System.currentTimeMillis ( ) ; j != 42 ; ++ j ) { } } }
Source:
public void testGetAndSetUncaughtExceptionHandler ( ) { java.lang.Thread current = java.lang.Thread.currentThread ( ) ; java.lang.ThreadGroup tg = current.getThreadGroup ( ) ; jsr166.ThreadTest.MyHandler eh = new jsr166.ThreadTest.MyHandler ( ) ; assertEquals ( tg , current.getUncaughtExceptionHandler ( ) ) ; current.setUncaughtExceptionHandler ( eh ) ; assertEquals ( eh , current.getUncaughtExceptionHandler ( ) ) ; current.setUncaughtExceptionHandler ( null ) ; assertEquals ( tg , current.getUncaughtExceptionHandler ( ) ) ; }

Target:
public void testGetAndSetUncaughtExceptionHandler ( ) { java.lang.Thread current = java.lang.Thread.currentThread ( ) ; java.lang.ThreadGroup tg = current.getThreadGroup ( ) ; jsr166.ThreadTest.MyHandler eh = new jsr166.ThreadTest.MyHandler ( ) ; assertSame ( tg , current.getUncaughtExceptionHandler ( ) ) ; current.setUncaughtExceptionHandler ( eh ) ; try { assertSame ( eh , current.getUncaughtExceptionHandler ( ) ) ; } finally { current.setUncaughtExceptionHandler ( null ) ; } assertSame ( tg , current.getUncaughtExceptionHandler ( ) ) ; }
Source:
public final void update ( java.nio.ByteBuffer input ) { if ( ! ( isInitMac ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input != null ) { spiImpl.engineUpdate ( input ) ; } else { throw new java.lang.IllegalArgumentException ( "input == null" ) ; } }

Target:
public final void update ( java.nio.ByteBuffer input ) { if ( ! ( isInitMac ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input != null ) { getSpi ( ) . engineUpdate ( input ) ; } else { throw new java.lang.IllegalArgumentException ( "input == null" ) ; } }
Source:
public void createOatDir ( java.lang.String oatDir , java.lang.String dexInstructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.createOatDir ( oatDir , dexInstructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void createOatDir ( java.lang.String oatDir , java.lang.String dexInstructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createOatDir ( oatDir , dexInstructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void clearLocalPkg ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.sdklib.repository.descriptors.PkgType > filters ) { mCachedTargets = null ; mLegacyBuildTools = null ; for ( com.android.sdklib.repository.descriptors.PkgType filter : filters ) { mVisitedDirs.removeAll ( filter ) ; mLocalPackages.removeAll ( filter ) ; } }

Target:
public void clearLocalPkg ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.sdklib.repository.descriptors.PkgType > filters ) { mLegacyBuildTools = null ; for ( com.android.sdklib.repository.descriptors.PkgType filter : filters ) { mVisitedDirs.removeAll ( filter ) ; mLocalPackages.removeAll ( filter ) ; } if ( ( filters.contains ( PkgType.PKG_PLATFORMS ) ) || ( filters.contains ( PkgType.PKG_ADDONS ) ) ) { mCachedTargets = null ; } }
Source:
public static void writeUnsignedLeb128 ( com.android.dx.util.ByteOutput out , int value ) { int remaining = value > > > 7 ; while ( remaining != 0 ) { out.writeByte ( ( ( byte ) ( ( value & 127 ) | 128 ) ) ) ; value = remaining ; remaining >>>= 7 ; } out.writeByte ( ( ( byte ) ( value & 127 ) ) ) ; }

Target:
public static void writeUnsignedLeb128 ( com.android.dex.util.ByteOutput out , int value ) { int remaining = value > > > 7 ; while ( remaining != 0 ) { out.writeByte ( ( ( byte ) ( ( value & 127 ) | 128 ) ) ) ; value = remaining ; remaining >>>= 7 ; } out.writeByte ( ( ( byte ) ( value & 127 ) ) ) ; }
Source:
public android.net.http.SslCertificate getCertificate ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.net.http.SslCertificate ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.net.http.SslCertificate > ( ) { @ java.lang.Override public android.net.http.SslCertificate call ( ) { return getCertificate ( ) ; } } ) ; return ret ; } return mAwContents.getCertificate ( ) ; }

Target:
public boolean overlayVerticalScrollbar ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return overlayVerticalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayVerticalScrollbar ( ) ; }
Source:
public boolean isKeyguardSecure ( ) { if ( ( mKeyguardMediator ) == null ) return false ; return mKeyguardMediator.isSecure ( ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( Intent.ACTION_DREAMING_STARTED.equals ( intent.getAction ( ) ) ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onDreamingStarted ( ) ; } } else if ( Intent.ACTION_DREAMING_STOPPED.equals ( intent.getAction ( ) ) ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onDreamingStopped ( ) ; } } }
Source:
public static java.net.InetAddress getLocalHost ( ) throws java.net.UnknownHostException { java.lang.SecurityManager security = java.lang.System.getSecurityManager ( ) ; try { java.lang.String local = Libcore.os.uname ( ) . nodename ; if ( security != null ) { security.checkConnect ( local , ( - 1 ) ) ; } return java.net.InetAddress.lookupHostByName ( local , java.net.InetAddress.NETID_UNSET ) [ 0 ] ; } catch ( java.lang.SecurityException e ) { return java.net.InetAddress.impl.loopbackAddress ( ) ; } }

Target:
public static java.net.InetAddress [ ] getAllByNameOnNet ( java.lang.String host , int netId ) throws java.net.UnknownHostException { return java.net.InetAddress.impl.lookupAllHostAddr ( host , netId ) . clone ( ) ; }
Source:
public void testNextLongBadBounds ( ) { try { long f = java.util.concurrent.ThreadLocalRandom.current ( ) . nextLong ( 17 , 2 ) ; shouldThrow ( ) ; } catch ( java.lang.IllegalArgumentException success ) { } }

Target:
public void testNextLongBoundNonPositive ( ) { java.util.concurrent.ThreadLocalRandom rnd = java.util.concurrent.ThreadLocalRandom.current ( ) ; for ( long bound : new long [ ] { 0L , - 17L , java.lang.Long.MIN_VALUE } ) { try { rnd.nextLong ( bound ) ; shouldThrow ( ) ; } catch ( java.lang.IllegalArgumentException success ) { } } }
Source:
private void assertNoContentInstalled ( ) { java.io.File currentTzDataDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.CURRENT_TZ_DATA_DIR_NAME ) ; assertFalse ( currentTzDataDir.exists ( ) ) ; java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertFalse ( workingDir.exists ( ) ) ; java.io.File oldDataDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.OLD_TZ_DATA_DIR_NAME ) ; assertFalse ( oldDataDir.exists ( ) ) ; }

Target:
public void testUninstall_oldDirsAlreadyExists ( ) throws java.lang.Exception { java.io.File oldTzDataDir = installer.getOldTzDataDir ( ) ; assertTrue ( oldTzDataDir.mkdir ( ) ) ; java.io.File currentDataDir = installer.getCurrentTzDataDir ( ) ; assertTrue ( currentDataDir.mkdir ( ) ) ; assertTrue ( installer.uninstall ( ) ) ; assertNoContentInstalled ( ) ; }
Source:
public boolean visit ( org.eclipse.jdt.internal.compiler.ast.FieldDeclaration x , org.eclipse.jdt.internal.compiler.lookup.MethodScope scope ) { try { pushInitializerMethodInfo ( x , scope ) ; return true ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }

Target:
public boolean visit ( org.eclipse.jdt.internal.compiler.ast.FieldDeclaration x , org.eclipse.jdt.internal.compiler.lookup.MethodScope scope ) { try { pushInitializerMethodInfo ( x , scope ) ; return true ; } catch ( com.android.jack.lookup.JMethodLookupException e ) { throw translateException ( x , e ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
protected boolean turnOnMasterTetherSettings ( ) { final com.android.server.connectivity.Tethering.TetheringConfiguration cfg = mConfig ; try { mNMService.setIpForwardingEnabled ( true ) ; } catch ( java.lang.Exception e ) { transitionTo ( mSetIpForwardingEnabledErrorState ) ; return false ; } try { mNMService.startTethering ( cfg.dhcpRanges ) ; } catch ( java.lang.Exception e ) { try { mNMService.stopTethering ( ) ; mNMService.startTethering ( cfg.dhcpRanges ) ; } catch ( java.lang.Exception ee ) { transitionTo ( mStartTetheringErrorState ) ; return false ; } } return true ; }

Target:
protected boolean turnOnMasterTetherSettings ( ) { final com.android.server.connectivity.tethering.TetheringConfiguration cfg = mConfig ; try { mNMService.setIpForwardingEnabled ( true ) ; } catch ( java.lang.Exception e ) { transitionTo ( mSetIpForwardingEnabledErrorState ) ; return false ; } try { mNMService.startTethering ( cfg.dhcpRanges ) ; } catch ( java.lang.Exception e ) { try { mNMService.stopTethering ( ) ; mNMService.startTethering ( cfg.dhcpRanges ) ; } catch ( java.lang.Exception ee ) { transitionTo ( mStartTetheringErrorState ) ; return false ; } } return true ; }
Source:
private boolean sendException ( org.apache.tools.ant.BuildEvent event ) { java.lang.Throwable exception = event.getException ( ) ; if ( exception != null ) { myAlwaysSend.sendMessage ( com.intellij.rt.ant.execution.IdeaAntLogger2.EXCEPTION , event.getPriority ( ) , exception ) ; return true ; } return false ; }

Target:
private boolean sendException ( org.apache.tools.ant.BuildEvent event , boolean isFailOnError ) { java.lang.Throwable exception = event.getException ( ) ; if ( exception != null ) { if ( isFailOnError ) { myAlwaysSend.sendMessage ( com.intellij.rt.ant.execution.IdeaAntLogger2.EXCEPTION , event.getPriority ( ) , exception ) ; return true ; } myMessagePriority.sendMessage ( com.intellij.rt.ant.execution.IdeaAntLogger2.MESSAGE , Project.MSG_WARN , exception.getMessage ( ) ) ; } return false ; }
Source:
private static void assertEqualsFuzzy ( long expected , long actual , long fuzzy ) { final long low = expected - fuzzy ; final long high = expected + fuzzy ; if ( ( actual < low ) || ( actual > high ) ) { fail ( ( ( ( ( ( ( "value " + actual ) + " is outside [" ) + low ) + "," ) + high ) + "]" ) ) ; } }

Target:
private static void assertEqualsFuzzy ( long expected , long actual , long fuzzy ) { final long low = expected - fuzzy ; final long high = expected + fuzzy ; if ( ( actual < low ) || ( actual > high ) ) { org.junit.Assert.fail ( ( ( ( ( ( ( "value " + actual ) + " is outside [" ) + low ) + "," ) + high ) + "]" ) ) ; } }
Source:
void onSaveInstanceState ( @ android.support.annotation.NonNull android.os.Bundle bundle ) { bundle.putParcelableArrayList ( com.android.incallui.rtt.impl.RttChatAdapter.KEY_MESSAGE_DATA , ( ( java.util.ArrayList < com.android.incallui.rtt.impl.RttChatMessage > ) ( rttMessages ) ) ) ; bundle.putInt ( com.android.incallui.rtt.impl.RttChatAdapter.KEY_LAST_LOCAL_MESSAGE , lastIndexOfLocalMessage ) ; }

Target:
java.lang.String onRestoreRttChat ( com.android.dialer.rtt.RttTranscript rttTranscript ) { com.android.dialer.common.LogUtil.enterBlock ( "RttChatAdapater.onRestoreRttChat" ) ; rttMessages = com.android.incallui.rtt.impl.RttChatMessage.fromTranscript ( rttTranscript ) ; lastIndexOfLocalMessage = com.android.incallui.rtt.impl.RttChatMessage.getLastIndexLocalMessage ( rttMessages ) ; notifyDataSetChanged ( ) ; if ( ( lastIndexOfLocalMessage ) < 0 ) { return null ; } com.android.incallui.rtt.impl.RttChatMessage message = rttMessages.get ( lastIndexOfLocalMessage ) ; if ( ! ( message.isFinished ( ) ) ) { return message.getContent ( ) ; } else { return null ; } }
Source:
public int hashCode ( ) { return getDisplayName ( ) . hashCode ( ) ; }

Target:
public java.lang.Class < ? > getTestClass ( ) { if ( ( fTestClass ) != null ) { return fTestClass ; } java.lang.String name = getClassName ( ) ; if ( name == null ) { return null ; } try { fTestClass = java.lang.Class.forName ( name , false , getClass ( ) . getClassLoader ( ) ) ; return fTestClass ; } catch ( java.lang.ClassNotFoundException e ) { return null ; } }
Source:
static < E > int setCountImpl ( com.google.common.collect.Multiset < E > self , E element , int count ) { com.google.common.collect.Multisets.checkNonnegative ( count , "count" ) ; int oldCount = self.count ( element ) ; int delta = count - oldCount ; if ( delta > 0 ) { self.add ( element , delta ) ; } else if ( delta < 0 ) { self.remove ( element , ( - delta ) ) ; } return oldCount ; }

Target:
static < E > int setCountImpl ( com.google.common.collect.Multiset < E > self , E element , int count ) { com.google.common.collect.CollectPreconditions.checkNonnegative ( count , "count" ) ; int oldCount = self.count ( element ) ; int delta = count - oldCount ; if ( delta > 0 ) { self.add ( element , delta ) ; } else if ( delta < 0 ) { self.remove ( element , ( - delta ) ) ; } return oldCount ; }
Source:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , "getConnectedDevices()" ) ; return null ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , "getConnectedDevices()" ) ; if ( ( mService ) != null ) { try { return mService.getConnectedDevices ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; }
Source:
private static android.icu.text.SimpleDateFormat getCannedSimpleDateFormat ( java.lang.String pattern , android.icu.util.ULocale uloc ) { android.icu.text.DateFormatSymbols dfs = android.icu.dev.test.serializable.FormatTests.getCannedDateFormatSymbols ( uloc ) ; return new android.icu.text.SimpleDateFormat ( pattern , dfs , uloc ) ; }

Target:
private static android.icu.text.SimpleDateFormat getCannedSimpleDateFormat ( java.lang.String pattern , android.icu.util.ULocale uloc ) { android.icu.text.DateFormatSymbols dfs = android.icu.dev.test.serializable.FormatHandler.getCannedDateFormatSymbols ( uloc ) ; android.icu.util.TimeZone pt = android.icu.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; android.icu.text.SimpleDateFormat cannedSDF = new android.icu.text.SimpleDateFormat ( pattern , dfs , uloc ) ; cannedSDF.setTimeZone ( pt ) ; return cannedSDF ; }
Source:
void writeStrings ( @ javax.annotation.Nonnull java.lang.String prefixStr , @ javax.annotation.Nonnull java.util.Collection < java.lang.String > strings ) { ps.print ( prefixStr ) ; ps.print ( ": " ) ; ps.print ( com.google.common.base.Joiner.on ( "," ) . useForNull ( "" ) . join ( strings ) ) ; ps.println ( ) ; }

Target:
void writeStrings ( @ javax.annotation.Nonnull java.lang.String prefixStr , @ javax.annotation.Nonnull java.util.Collection < java.lang.String > strings ) { ps.print ( prefixStr ) ; ps.print ( ": " ) ; ps.print ( com.android.jack.incremental.IncrementalLogWriter.commaJoiner.join ( strings ) ) ; ps.println ( ) ; }
Source:
public java.lang.String getAttributeValue ( java.lang.String namespace , java.lang.String localName ) { if ( filter != null ) { java.lang.Object cookie = getViewCookie ( ) ; if ( cookie instanceof com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) { com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy node = nodeFactory.create ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( cookie ) ) ) ; if ( node != null ) { java.lang.String value = filter.getAttribute ( node , namespace , localName ) ; if ( value != null ) { return value ; } } } } return super . getAttributeValue ( namespace , localName ) ; }

Target:
public int getMinSdkVersion ( ) { return mMinSdkVersion ; }
Source:
private static android.net.wifi.hotspot2.pps.Credential createCredentialWithCertificateCredential ( ) { android.net.wifi.hotspot2.pps.Credential.CertificateCredential certCred = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; certCred.certType = "x509v3" ; certCred.certSha256FingerPrint = new byte [ 32 ] ; return android.net.wifi.hotspot2.pps.CredentialTest.createCredential ( null , certCred , null , FakeKeys.CA_CERT0 , new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } , FakeKeys.RSA_KEY1 ) ; }

Target:
private static android.net.wifi.hotspot2.pps.Credential createCredentialWithCertificateCredential ( ) throws java.security.NoSuchAlgorithmException , java.security.cert.CertificateEncodingException { android.net.wifi.hotspot2.pps.Credential.CertificateCredential certCred = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; certCred.setCertType ( "x509v3" ) ; certCred.setCertSha256Fingerprint ( java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ) ; return android.net.wifi.hotspot2.pps.CredentialTest.createCredential ( null , certCred , null , FakeKeys.CA_CERT0 , new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } , FakeKeys.RSA_KEY1 ) ; }
Source:
public final java.lang.Object clone ( ) throws java.lang.CloneNotSupportedException { javax.crypto.MacSpi newSpiImpl = ( ( javax.crypto.MacSpi ) ( spiImpl.clone ( ) ) ) ; javax.crypto.Mac mac = new javax.crypto.Mac ( newSpiImpl , this . provider , this . algorithm ) ; mac.isInitMac = this . isInitMac ; return mac ; }

Target:
public final java.lang.Object clone ( ) throws java.lang.CloneNotSupportedException { javax.crypto.MacSpi newSpiImpl = null ; final javax.crypto.MacSpi spi = getSpi ( ) ; if ( spi != null ) { newSpiImpl = ( ( javax.crypto.MacSpi ) ( spi.clone ( ) ) ) ; } javax.crypto.Mac mac = new javax.crypto.Mac ( newSpiImpl , this . provider , this . algorithm ) ; mac.isInitMac = this . isInitMac ; return mac ; }
Source:
public final java.nio.ByteBuffer duplicate ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } return new java.nio.DirectByteBuffer ( memoryRef , this . markValue ( ) , this . position ( ) , this . limit ( ) , this . capacity ( ) , offset , isReadOnly ) ; }

Target:
void getUnchecked ( int pos , char [ ] dst , int dstOffset , int length ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } libcore.io.Memory.peekCharArray ( ix ( pos ) , dst , dstOffset , length , ( ! ( nativeByteOrder ) ) ) ; }
Source:
public com.android.tools.lint.client.api.Configuration getConfiguration ( com.android.tools.lint.detector.api.Project project ) { if ( project != null ) { org.eclipse.core.resources.IProject eclipseProject = getProject ( project ) ; if ( eclipseProject != null ) { return com.android.ide.eclipse.adt.internal.lint.ProjectLintConfiguration.get ( this , eclipseProject , mFatalOnly ) ; } } return com.android.ide.eclipse.adt.internal.lint.GlobalLintConfiguration.get ( ) ; }

Target:
public com.android.tools.lint.client.api.Configuration getConfigurationFor ( @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Project project ) { if ( project != null ) { org.eclipse.core.resources.IProject eclipseProject = getProject ( project ) ; if ( eclipseProject != null ) { return com.android.ide.eclipse.adt.internal.lint.ProjectLintConfiguration.get ( this , eclipseProject , mFatalOnly ) ; } } return com.android.ide.eclipse.adt.internal.lint.GlobalLintConfiguration.get ( ) ; }