auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static java.util.List < com.android.build.OutputFile > computeBestOutput ( @ com.android.annotations.NonNull java.util.List < ? extends com.android.build.VariantOutput > outputs , int density , @ com.android.annotations.NonNull java.lang.String ... abis ) { return com.android.ide.common.build.SplitOutputMatcher.computeBestOutput ( outputs , null , density , null , null , java.util.Arrays.asList ( abis ) ) ; }

Target:
private static java.util.List < java.io.File > computeBestOutput ( @ com.android.annotations.NonNull java.util.List < ? extends com.android.build.VariantOutput > outputs , int density , @ com.android.annotations.NonNull java.lang.String ... abis ) throws com.android.ide.common.process.ProcessException { com.android.builder.testing.api.DeviceConfigProvider deviceConfigProvider = org.mockito.Mockito.mock ( com.android.builder.testing.api.DeviceConfigProvider.class ) ; org.mockito.Mockito.when ( deviceConfigProvider.getDensity ( ) ) . thenReturn ( density ) ; org.mockito.Mockito.when ( deviceConfigProvider.getAbis ( ) ) . thenReturn ( java.util.Arrays.asList ( abis ) ) ; return com.android.ide.common.build.SplitOutputMatcher.computeBestOutput ( org.mockito.Mockito.mock ( com.android.ide.common.process.ProcessExecutor.class ) , null , deviceConfigProvider , outputs , null ) ; }
Source:
private synchronized void onSetProtocol ( byte protocol ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onSetProtocol(): protocol=" + protocol ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_SET_PROTOCOL ) ; msg.arg1 = protocol ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onGetReportFromNative ( byte type , byte id , short bufferSize ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( ( ( "onGetReport(): type=" + type ) + " id=" ) + id ) + " bufferSize=" ) + bufferSize ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_GET_REPORT ) ; msg.obj = ( bufferSize > 0 ) ? new java.lang.Integer ( bufferSize ) : null ; msg.arg1 = type ; msg.arg2 = id ; mHandler.sendMessage ( msg ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mAudioManager = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; android.os.Vibrator vibrator = ( ( android.os.Vibrator ) ( mContext.getSystemService ( Context.VIBRATOR_SERVICE ) ) ) ; mHasVibrator = ( vibrator != null ) && ( vibrator.hasVibrator ( ) ) ; mUseFixedVolume = mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.config_useFixedVolume ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mAudioManager = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; android.os.Vibrator vibrator = ( ( android.os.Vibrator ) ( mContext.getSystemService ( Context.VIBRATOR_SERVICE ) ) ) ; mHasVibrator = ( vibrator != null ) && ( vibrator.hasVibrator ( ) ) ; mUseFixedVolume = mContext.getResources ( ) . getBoolean ( android.content.res.Resources.getSystem ( ) . getIdentifier ( "config_useFixedVolume" , "bool" , "android" ) ) ; }
Source:
public void testKeyStore_IsCertificateEntry_CA_Success ( ) throws java.lang.Exception { mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertTrue ( "Should return true for CA certificate" , mKeyStore.isCertificateEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) ; }

Target:
public void testKeyStore_IsCertificateEntry_CA_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertTrue ( "Should return true for CA certificate" , mKeyStore.isCertificateEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) ; }
Source:
public void testCallMethodOnCreatedFeature ( ) throws android.os.RemoteException { com.android.ims.internal.IImsMMTelFeature f = mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; f.isConnected ( 0 , 0 ) ; junit.framework.Assert.assertTrue ( mTestImsService.mTestMMTelFeature.isConnectedCalled ) ; }

Target:
public void testQuerySupportedImsFeatures ( ) throws android.os.RemoteException { android.telephony.ims.stub.ImsFeatureConfiguration config = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . addFeature ( ImsFeature.FEATURE_RCS ) . build ( ) ; mTestImsService.testFeatureConfig = config ; android.telephony.ims.stub.ImsFeatureConfiguration result = mTestImsServiceBinder.querySupportedImsFeatures ( ) ; junit.framework.Assert.assertEquals ( config , result ) ; }
Source:
public void reportConnectionEvent ( byte event ) { switch ( event ) { case BaseWifiDiagnostics.CONNECTION_EVENT_STARTED : enableTracing ( ) ; return ; case BaseWifiDiagnostics.CONNECTION_EVENT_SUCCEEDED : disableTracing ( ) ; return ; case BaseWifiDiagnostics.CONNECTION_EVENT_FAILED : disableTracing ( ) ; mLastMileLogForLastFailure = readTrace ( ) ; break ; } }

Target:
public void reportConnectionEvent ( long connectionId , byte event ) { switch ( event ) { case BaseWifiDiagnostics.CONNECTION_EVENT_STARTED : enableTracing ( ) ; return ; case BaseWifiDiagnostics.CONNECTION_EVENT_SUCCEEDED : disableTracing ( ) ; return ; case BaseWifiDiagnostics.CONNECTION_EVENT_FAILED : disableTracing ( ) ; mLastMileLogForLastFailure = readTrace ( ) ; break ; } }
Source:
public static com.android.ahat.DocString render ( java.lang.Object val ) { if ( val instanceof com.android.tools.perflib.heap.Instance ) { return com.android.ahat.Value.renderInstance ( ( ( com.android.tools.perflib.heap.Instance ) ( val ) ) ) ; } else { return com.android.ahat.DocString.format ( "%s" , val ) ; } }

Target:
public static com.android.ahat.DocString render ( com.android.ahat.AhatSnapshot snapshot , java.lang.Object val ) { if ( val instanceof com.android.tools.perflib.heap.Instance ) { return com.android.ahat.Value.renderInstance ( snapshot , ( ( com.android.tools.perflib.heap.Instance ) ( val ) ) ) ; } else { return com.android.ahat.DocString.format ( "%s" , val ) ; } }
Source:
boolean getIdleTime ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getIdleTime: " + ( device.getAddress ( ) ) ) ) ; int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothHidHost.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_GET_IDLE_TIME , device ) ; mHandler.sendMessage ( msg ) ; return true ; }

Target:
boolean getIdleTime ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidHostService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , ( "getIdleTime: " + ( device.getAddress ( ) ) ) ) ; int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothHidHost.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidHostService.MESSAGE_GET_IDLE_TIME , device ) ; mHandler.sendMessage ( msg ) ; return true ; }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { startUpSync.countDown ( ) ; for ( int i = 0 ; i < ( NUM_STRESS_ITERATIONS ) ; i ++ ) { libcore.javax.net.ssl.SSLEngineTest.assertSendsCorrectly ( "This is the client. Hello!" . getBytes ( ) , pair.client , pair.server , false ) ; } return null ; }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { startUpSync.countDown ( ) ; for ( int i = 0 ; i < ( NUM_STRESS_ITERATIONS ) ; i ++ ) { libcore.javax.net.ssl.SSLEngineTest.assertSendsCorrectly ( "This is the client. Hello!" . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) , pair.client , pair.server , false ) ; } return null ; }
Source:
public void testWrongSeparator1 ( ) throws java.lang.Exception { assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( " <activity\n" + " ^\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }

Target:
public void testInnerClass ( ) throws java.lang.Exception { mScopes = null ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:23: Error: Class referenced in the manifest, test.pkg.Foo.Baz, was not found in the project or the libraries [MissingRegistered]\n" ) + " <activity\n" ) + " ^\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "registration/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" , "registration/Foo.java.txt=>src/test/pkg/Foo.java" ) ) ; }
Source:
private void updateCurrentTtyMode ( ) { int newTtyMode = android.telecom.TelecomManager.TTY_MODE_OFF ; if ( ( isTtySupported ( ) ) && ( mWiredHeadsetManager.isPluggedIn ( ) ) ) { newTtyMode = mPreferredTtyMode ; } com.android.server.telecom.Log.v ( this , "updateCurrentTtyMode, %d -> %d" , mCurrentTtyMode , newTtyMode ) ; if ( ( mCurrentTtyMode ) != newTtyMode ) { mCurrentTtyMode = newTtyMode ; android.content.Intent ttyModeChanged = new android.content.Intent ( android.telecom.TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED ) ; ttyModeChanged.putExtra ( TelecomManager.EXTRA_CURRENT_TTY_MODE , mCurrentTtyMode ) ; mContext.sendBroadcastAsUser ( ttyModeChanged , UserHandle.ALL ) ; updateAudioTtyMode ( ) ; } }

Target:
private void updateCurrentTtyMode ( ) { int newTtyMode = android.telecom.TelecomManager.TTY_MODE_OFF ; if ( ( isTtySupported ( ) ) && ( mWiredHeadsetManager.isPluggedIn ( ) ) ) { newTtyMode = mPreferredTtyMode ; } android.telecom.Log.v ( this , "updateCurrentTtyMode, %d -> %d" , mCurrentTtyMode , newTtyMode ) ; if ( ( mCurrentTtyMode ) != newTtyMode ) { mCurrentTtyMode = newTtyMode ; android.content.Intent ttyModeChanged = new android.content.Intent ( android.telecom.TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED ) ; ttyModeChanged.putExtra ( TelecomManager.EXTRA_CURRENT_TTY_MODE , mCurrentTtyMode ) ; mContext.sendBroadcastAsUser ( ttyModeChanged , UserHandle.ALL ) ; updateAudioTtyMode ( ) ; } }
Source:
public static void ensureFileDoesNotExist ( java.io.File file ) throws java.io.IOException { if ( file.exists ( ) ) { if ( ! ( file.isFile ( ) ) ) { throw new java.io.IOException ( ( file + " is not a file" ) ) ; } libcore.tzdata.update2.FileUtils.doDelete ( file ) ; } }

Target:
public static void ensureFileDoesNotExist ( java.io.File file ) throws java.io.IOException { if ( file.exists ( ) ) { if ( ! ( file.isFile ( ) ) ) { throw new java.io.IOException ( ( file + " is not a file" ) ) ; } libcore.tzdata.shared2.FileUtils.doDelete ( file ) ; } }
Source:
protected final void checkXML ( org.eclipse.core.resources.IResource resource , com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.BaseDeltaVisitor visitor ) { if ( resource instanceof org.eclipse.core.resources.IFile ) { org.eclipse.core.resources.IFile file = ( ( org.eclipse.core.resources.IFile ) ( resource ) ) ; removeMarkersFromFile ( file , AndroidConstants.MARKER_XML ) ; com.android.ide.eclipse.adt.internal.project.XmlErrorHandler reporter = new com.android.ide.eclipse.adt.internal.project.XmlErrorHandler ( file , visitor ) ; try { getParser ( ) . parse ( file.getContents ( ) , reporter ) ; } catch ( java.lang.Exception e1 ) { } } }

Target:
protected final void checkXML ( org.eclipse.core.resources.IResource resource , com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.BaseDeltaVisitor visitor ) { if ( resource instanceof org.eclipse.core.resources.IFile ) { org.eclipse.core.resources.IFile file = ( ( org.eclipse.core.resources.IFile ) ( resource ) ) ; removeMarkersFromResource ( file , AndroidConstants.MARKER_XML ) ; com.android.ide.eclipse.adt.internal.project.XmlErrorHandler reporter = new com.android.ide.eclipse.adt.internal.project.XmlErrorHandler ( file , visitor ) ; try { getParser ( ) . parse ( file.getContents ( ) , reporter ) ; } catch ( java.lang.Exception e1 ) { } } }
Source:
public static final javax.crypto.SecretKeyFactory getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { sun.security.jca.GetInstance.Instance instance = javax.crypto.JceSecurity.getInstance ( "SecretKeyFactory" , javax.crypto.SecretKeyFactorySpi.class , algorithm , provider ) ; return new javax.crypto.SecretKeyFactory ( ( ( javax.crypto.SecretKeyFactorySpi ) ( instance.impl ) ) , instance.provider , algorithm ) ; }

Target:
public static final javax.crypto.SecretKeyFactory getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { sun.security.jca.Providers.checkBouncyCastleDeprecation ( provider , "SecretKeyFactory" , algorithm ) ; sun.security.jca.GetInstance.Instance instance = javax.crypto.JceSecurity.getInstance ( "SecretKeyFactory" , javax.crypto.SecretKeyFactorySpi.class , algorithm , provider ) ; return new javax.crypto.SecretKeyFactory ( ( ( javax.crypto.SecretKeyFactorySpi ) ( instance.impl ) ) , instance.provider , algorithm ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { if ( mDestroyed.get ( ) ) { android.util.Log.e ( com.android.internal.telephony.ims.IsimUiccRecords.LOG_TAG , ( ( ( ( "Received message " + msg ) + "[" ) + ( msg.what ) ) + "] while being destroyed. Ignoring." ) ) ; return ; } try { switch ( msg.what ) { case com.android.internal.telephony.ims.IsimUiccRecords.EVENT_APP_READY : onReady ( ) ; break ; default : super . handleMessage ( msg ) ; } } catch ( java.lang.RuntimeException exc ) { android.util.Log.w ( com.android.internal.telephony.ims.IsimUiccRecords.LOG_TAG , "Exception parsing SIM record" , exc ) ; } }

Target:
public void handleMessage ( android.os.Message msg ) { if ( mDestroyed.get ( ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.ims.IsimUiccRecords.LOG_TAG , ( ( ( ( "Received message " + msg ) + "[" ) + ( msg.what ) ) + "] while being destroyed. Ignoring." ) ) ; return ; } try { switch ( msg.what ) { case com.android.internal.telephony.ims.IsimUiccRecords.EVENT_APP_READY : onReady ( ) ; break ; default : super . handleMessage ( msg ) ; } } catch ( java.lang.RuntimeException exc ) { android.telephony.Rlog.w ( com.android.internal.telephony.ims.IsimUiccRecords.LOG_TAG , "Exception parsing SIM record" , exc ) ; } }
Source:
public void findValidValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'14'" , "bar" ) ; com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . isNull ( ) ; }

Target:
public void findValidValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'14'" , "bar" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . isNull ( ) ; }
Source:
private void setMediaSessionPlaybackState ( boolean isPlaying ) { android.media.session.PlaybackState.Builder builder = new android.media.session.PlaybackState.Builder ( ) ; builder.setState ( ( isPlaying ? android.media.session.PlaybackState.STATE_PLAYING : android.media.session.PlaybackState.STATE_STOPPED ) , PlaybackState.PLAYBACK_POSITION_UNKNOWN , ( isPlaying ? com.android.tv.MainActivity.MEDIA_SESSION_PLAYING_SPEED : com.android.tv.MainActivity.MEDIA_SESSION_STOPPED_SPEED ) ) ; mMediaSession.setPlaybackState ( builder.build ( ) ) ; }

Target:
private void setMediaSessionActiveAndPlaybackState ( boolean isPlaying ) { if ( isPlaying ) { mMediaSession.setActive ( true ) ; mMediaSession.setPlaybackState ( com.android.tv.MainActivity.MEDIA_SESSION_STATE_PLAYING ) ; } else { mMediaSession.setPlaybackState ( com.android.tv.MainActivity.MEDIA_SESSION_STATE_STOPPED ) ; mMediaSession.setActive ( false ) ; } }
Source:
public static com.android.internal.telephony.gsm.SmsMessage newFromCDS ( java.lang.String line ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( com.android.internal.telephony.IccUtils.hexStringToBytes ( line ) ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.util.Log.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "CDS SMS PDU parsing failed: " , ex ) ; return null ; } }

Target:
public static com.android.internal.telephony.gsm.SmsMessage newFromCDS ( java.lang.String line ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( com.android.internal.telephony.IccUtils.hexStringToBytes ( line ) ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "CDS SMS PDU parsing failed: " , ex ) ; return null ; } }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Throwable thrown ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }
Source:
public static com.android.ide.common.resources.configuration.RegionQualifier getQualifier ( java.lang.String segment ) { java.util.regex.Matcher m = com.android.ide.common.resources.configuration.RegionQualifier.sRegionPattern.matcher ( segment ) ; if ( m.matches ( ) ) { com.android.ide.common.resources.configuration.RegionQualifier qualifier = new com.android.ide.common.resources.configuration.RegionQualifier ( ) ; qualifier.mValue = m.group ( 1 ) ; return qualifier ; } return null ; }

Target:
public static com.android.ide.common.resources.configuration.RegionQualifier getQualifier ( java.lang.String segment ) { java.util.regex.Matcher m = com.android.ide.common.resources.configuration.RegionQualifier.sRegionPattern.matcher ( segment ) ; if ( m.matches ( ) ) { com.android.ide.common.resources.configuration.RegionQualifier qualifier = new com.android.ide.common.resources.configuration.RegionQualifier ( ) ; assert ( m.group ( 1 ) . length ( ) ) == 2 ; qualifier.mValue = new java.lang.String ( new char [ ] { java.lang.Character.toUpperCase ( segment.charAt ( 1 ) ) , java.lang.Character.toUpperCase ( segment.charAt ( 2 ) ) } ) ; return qualifier ; } return null ; }
Source:
public java.lang.String getGeolocation ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : return phoneLookupInfo.getCequintInfo ( ) . getGeolocation ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public java.lang.String getGeolocation ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : return phoneLookupInfo.getCequintInfo ( ) . getGeolocation ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PHONE_NUMBER_CACHE : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
static native void stackArgsSignExtendedMips64 ( int i1 , int i2 , int i3 , int i4 , int i5 , int i6 , int i7 , int i8 ) ;

Target:
static native void stackArgsIntsFirst_Fast ( int i1 , int i2 , int i3 , int i4 , int i5 , int i6 , int i7 , int i8 , int i9 , int i10 , float f1 , float f2 , float f3 , float f4 , float f5 , float f6 , float f7 , float f8 , float f9 , float f10 ) ;
Source:
public void release ( ) { if ( ( mChannelTuner ) != null ) { mChannelTuner.removeListener ( mChannelTunerListener ) ; } if ( ( mTvView ) != null ) { mTvView.setOnScreenBlockedListener ( null ) ; } }

Target:
public void release ( ) { if ( ( mChannelTuner ) != null ) { mChannelTuner.removeListener ( mChannelTunerListener ) ; } if ( ( mTvView ) != null ) { mTvView.setOnScreenBlockedListener ( null ) ; } if ( ( mOptionsManager ) != null ) { mOptionsManager.setOptionChangedListener ( TvOptionsManager.OPTION_CLOSED_CAPTIONS , null ) ; mOptionsManager.setOptionChangedListener ( TvOptionsManager.OPTION_DISPLAY_MODE , null ) ; mOptionsManager.setOptionChangedListener ( TvOptionsManager.OPTION_MULTI_AUDIO , null ) ; } }
Source:
private static android.net.NetworkState buildWifiState ( ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_WIFI , 0 , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( com.android.server.net.NetworkStatsServiceTest.TEST_IFACE ) ; final android.net.NetworkCapabilities capabilities = new android.net.NetworkCapabilities ( ) ; return new android.net.NetworkState ( info , prop , capabilities , null , null , com.android.server.net.NetworkStatsServiceTest.TEST_SSID ) ; }

Target:
private static android.net.NetworkState buildWifiState ( boolean isMetered ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_WIFI , 0 , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( com.android.server.net.NetworkStatsServiceTest.TEST_IFACE ) ; final android.net.NetworkCapabilities capabilities = new android.net.NetworkCapabilities ( ) ; if ( ! isMetered ) { capabilities.addCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_METERED ) ; } return new android.net.NetworkState ( info , prop , capabilities , null , null , com.android.server.net.NetworkStatsServiceTest.TEST_SSID ) ; }
Source:
public com.android.build.gradle.internal.dsl.Map < java.lang.String , java.lang.Integer > getSeverityOverrides ( ) { if ( ( ( severities ) == null ) || ( severities.isEmpty ( ) ) ) { return null ; } com.android.build.gradle.internal.dsl.Map < java.lang.String , java.lang.Integer > map = com.google.common.collect.Maps.newHashMapWithExpectedSize ( severities.size ( ) ) ; for ( com.android.build.gradle.internal.dsl.Map.Entry < java.lang.String , com.android.tools.lint.detector.api.Severity > entry : severities.entrySet ( ) ) { map.put ( entry.key , com.android.build.gradle.internal.dsl.LintOptions.convert ( entry.value ) ) ; } return map ; }

Target:
public void ignore ( java.lang.String id ) { severities.put ( id , com.android.tools.lint.detector.api.Severity.IGNORE ) ; }
Source:
public void test_ConstructorLjava_lang_StringZ ( ) { try { java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( "Wrong.file" , false ) ; fail ( "Should throw IOException" ) ; } catch ( java.io.IOException e ) { } try { tests.support.resource.Support_Resources.copyFile ( resources , null , jarName ) ; java.lang.String fileName = new java.io.File ( resources , jarName ) . getCanonicalPath ( ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( fileName , true ) ; } catch ( java.io.IOException e ) { fail ( "Should not throw IOException" ) ; } }

Target:
public void test_ConstructorLjava_lang_StringZ ( ) { try { java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( "Wrong.file" , false ) ; fail ( "Should throw IOException" ) ; } catch ( java.io.IOException e ) { } try { java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , jarName ) ; java.lang.String fileName = file.getCanonicalPath ( ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( fileName , true ) ; jarFile.close ( ) ; } catch ( java.io.IOException e ) { fail ( "Should not throw IOException" ) ; } }
Source:
public boolean stopServiceAsUser ( android.content.Intent service , android.os.UserHandle user ) { try { service.prepareToLeaveProcess ( ) ; int res = android.app.ActivityManagerNative.getDefault ( ) . stopService ( mMainThread.getApplicationThread ( ) , service , service.resolveTypeIfNeeded ( getContentResolver ( ) ) , user.getIdentifier ( ) ) ; if ( res < 0 ) { throw new java.lang.SecurityException ( ( "Not allowed to stop service " + service ) ) ; } return res != 0 ; } catch ( android.os.RemoteException e ) { return false ; } }

Target:
private boolean stopServiceCommon ( android.content.Intent service , android.os.UserHandle user ) { try { validateServiceIntent ( service ) ; service.prepareToLeaveProcess ( ) ; int res = android.app.ActivityManagerNative.getDefault ( ) . stopService ( mMainThread.getApplicationThread ( ) , service , service.resolveTypeIfNeeded ( getContentResolver ( ) ) , user.getIdentifier ( ) ) ; if ( res < 0 ) { throw new java.lang.SecurityException ( ( "Not allowed to stop service " + service ) ) ; } return res != 0 ; } catch ( android.os.RemoteException e ) { return false ; } }
Source:
private static void assertNonDaylightOffset ( int expectedOffsetSeconds , long epochSeconds , java.util.TimeZone tz ) { assertEquals ( expectedOffsetSeconds , ( ( tz.getOffset ( ( epochSeconds * 1000 ) ) ) / 1000 ) ) ; assertFalse ( tz.inDaylightTime ( new java.util.Date ( ( epochSeconds * 1000 ) ) ) ) ; }

Target:
private static void assertNonDaylightOffset ( int expectedOffsetSeconds , long epochMillis , java.util.TimeZone tz ) { assertEquals ( expectedOffsetSeconds , ( ( tz.getOffset ( epochMillis ) ) / 1000 ) ) ; assertFalse ( tz.inDaylightTime ( new java.util.Date ( epochMillis ) ) ) ; }
Source:
private static long getConstructorId ( java.lang.Class < ? > clazz ) { java.lang.System.logE ( ( "WARNING: ObjectStreamClass.getConstructorId(Class<?>) is private API and" + "will be removed in a future Android release." ) ) ; return 1189998819991197253L ; }

Target:
private static long getConstructorId ( java.lang.Class < ? > clazz ) { final int targetSdkVersion = dalvik.system.VMRuntime.getRuntime ( ) . getTargetSdkVersion ( ) ; if ( ( targetSdkVersion > 0 ) && ( targetSdkVersion <= 24 ) ) { java.lang.System.logE ( ( "WARNING: ObjectStreamClass.getConstructorId(Class<?>) is private API and" + "will be removed in a future Android release." ) ) ; return 1189998819991197253L ; } throw new java.lang.UnsupportedOperationException ( ( ( "ObjectStreamClass.getConstructorId(Class<?>) is " + "not supported on SDK " ) + targetSdkVersion ) ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , int [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 4 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , byte [ ] data ) { validateIsInt8 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_8 , data.length ) ; }
Source:
protected com.android.tools.lint.detector.api.Project createProject ( @ com.android.annotations.NonNull java.io.File dir , @ com.android.annotations.NonNull java.io.File referenceDir ) { com.android.builder.model.AndroidProject model = org.mockito.Mockito.mock ( com.android.builder.model.AndroidProject.class ) ; org.mockito.Mockito.when ( model.getModelVersion ( ) ) . thenReturn ( "1.4.0-alpha1" ) ; com.android.tools.lint.detector.api.Project fromSuper = super . createProject ( dir , referenceDir ) ; com.android.tools.lint.detector.api.Project spy = org.mockito.Mockito.spy ( fromSuper ) ; org.mockito.Mockito.when ( spy.getGradleProjectModel ( ) ) . thenReturn ( model ) ; return spy ; }

Target:
protected com.android.tools.lint.detector.api.Project createProject ( @ com.android.annotations.NonNull java.io.File dir , @ com.android.annotations.NonNull java.io.File referenceDir ) { com.android.builder.model.AndroidProject model = org.mockito.Mockito.mock ( com.android.builder.model.AndroidProject.class ) ; org.mockito.Mockito.when ( model.getModelVersion ( ) ) . thenReturn ( "1.4.0-alpha1" ) ; com.android.tools.lint.detector.api.Project fromSuper = super . createProject ( dir , referenceDir ) ; com.android.tools.lint.detector.api.Project spy = org.mockito.Mockito.spy ( fromSuper ) ; org.mockito.Mockito.when ( spy.getGradleProjectModel ( ) ) . thenReturn ( model ) ; org.mockito.Mockito.when ( spy.isGradleProject ( ) ) . thenReturn ( true ) ; return spy ; }
Source:
public com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor getFqcnViewDescritor ( java.lang.String fqcn ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = getTargetData ( ) ; if ( data != null ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors layoutDesc = data.getLayoutDescriptors ( ) ; if ( layoutDesc != null ) { com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor docDesc = layoutDesc.getDescriptor ( ) ; if ( docDesc != null ) { return internalFindFqcnViewDescritor ( fqcn , docDesc.getChildren ( ) , null ) ; } } } return null ; }

Target:
public com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor getFqcnViewDescritor ( java.lang.String fqcn ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor desc = null ; com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = getTargetData ( ) ; if ( data != null ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors layoutDesc = data.getLayoutDescriptors ( ) ; if ( layoutDesc != null ) { com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor docDesc = layoutDesc.getDescriptor ( ) ; if ( docDesc != null ) { desc = internalFindFqcnViewDescritor ( fqcn , docDesc.getChildren ( ) , null ) ; } } } if ( desc == null ) { desc = createUnknownDescriptor ( fqcn ) ; } return desc ; }
Source:
public boolean shouldOverrideKeyEvent ( android.view.KeyEvent event ) { if ( event.isSystem ( ) ) return true ; org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "shouldOverrideKeyEvent" ) ; boolean result = mWebViewClient.shouldOverrideKeyEvent ( mWebView , event ) ; org.chromium.base.TraceEvent.end ( ) ; return result ; }

Target:
public boolean shouldOverrideKeyEvent ( android.view.KeyEvent event ) { if ( ! ( org.chromium.content.browser.ContentViewClient.shouldPropagateKey ( event.getKeyCode ( ) ) ) ) return true ; org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "shouldOverrideKeyEvent" ) ; boolean result = mWebViewClient.shouldOverrideKeyEvent ( mWebView , event ) ; org.chromium.base.TraceEvent.end ( ) ; return result ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getApplicationContext ( ) . getSystemService ( Context.SENSOR_SERVICE ) ) ) ; mGLSurfaceView = new android.opengl.GLSurfaceView ( this ) ; com.android.cts.verifier.sensors.AccelerometerTestRenderer renderer = new com.android.cts.verifier.sensors.AccelerometerTestRenderer ( this ) ; mListener = renderer ; mGLSurfaceView.setRenderer ( renderer ) ; setContentView ( mGLSurfaceView ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setResult ( com.android.cts.verifier.sensors.RESULT_CANCELED ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getApplicationContext ( ) . getSystemService ( Context.SENSOR_SERVICE ) ) ) ; com.android.cts.verifier.sensors.AccelerometerTestRenderer renderer = new com.android.cts.verifier.sensors.AccelerometerTestRenderer ( this ) ; mListener = renderer ; setContentView ( R.layout.pass_fail_gl ) ; mGLSurfaceView = ( ( android.opengl.GLSurfaceView ) ( findViewById ( R.id.gl_surface_view ) ) ) ; mGLSurfaceView.setRenderer ( renderer ) ; }
Source:
private static void addApiCoverage ( com.android.cts.apicoverage.ApiCoverage apiCoverage , java.io.File testApk ) throws java.io.IOException , org.xml.sax.SAXException { org.xml.sax.XMLReader xmlReader = org.xml.sax.helpers.XMLReaderFactory.createXMLReader ( ) ; com.android.cts.apicoverage.DexDepsXmlHandler dexDepsXmlHandler = new com.android.cts.apicoverage.DexDepsXmlHandler ( apiCoverage ) ; xmlReader.setContentHandler ( dexDepsXmlHandler ) ; java.lang.Process process = new java.lang.ProcessBuilder ( "out/host/linux-x86/bin/dexdeps" , "--format=xml" , testApk.getPath ( ) ) . start ( ) ; xmlReader.parse ( new org.xml.sax.InputSource ( process.getInputStream ( ) ) ) ; }

Target:
private static void addApiCoverage ( com.android.cts.apicoverage.ApiCoverage apiCoverage , java.io.File testApk , java.lang.String dexdeps ) throws java.io.IOException , org.xml.sax.SAXException { org.xml.sax.XMLReader xmlReader = org.xml.sax.helpers.XMLReaderFactory.createXMLReader ( ) ; com.android.cts.apicoverage.DexDepsXmlHandler dexDepsXmlHandler = new com.android.cts.apicoverage.DexDepsXmlHandler ( apiCoverage ) ; xmlReader.setContentHandler ( dexDepsXmlHandler ) ; java.lang.Process process = new java.lang.ProcessBuilder ( dexdeps , "--format=xml" , testApk.getPath ( ) ) . start ( ) ; xmlReader.parse ( new org.xml.sax.InputSource ( process.getInputStream ( ) ) ) ; }
Source:
public com.android.sched.vfs.InputVDir getDir ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.InputVFS currentSectionVFS = getSectionVFS ( fileType ) ; return currentSectionVFS.getRootInputVDir ( ) . getInputVDir ( typePath ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputVDir getDir ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.InputVFS currentSectionVFS = getSectionVFS ( fileType ) ; return currentSectionVFS.getRootDir ( ) . getInputVDir ( typePath ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public void sendEnvelope ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }

Target:
public void sendEnvelope ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_math s = new com.android.rs.test.ScriptC_math ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.invoke_math_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_math s = new com.android.rs.test.ScriptC_math ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.invoke_math_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
public boolean logOut ( ) { com.google.gct.login.CredentialedUser activeUser = users.getActiveUser ( ) ; if ( activeUser == null ) { return false ; } boolean loggedOut = activeUser.getGoogleLoginState ( ) . logOut ( ) ; if ( loggedOut ) { users.removeUser ( activeUser.getEmail ( ) ) ; } return loggedOut ; }

Target:
public boolean logOut ( ) { com.google.gct.login.CredentialedUser activeUser = users.getActiveUser ( ) ; if ( activeUser == null ) { return false ; } boolean loggedOut = activeUser.getGoogleLoginState ( ) . logOut ( ) ; if ( loggedOut ) { logOutAllUsers ( ) ; } return loggedOut ; }
Source:
public libcore.tzdata.update2.BundleVersion getBundleVersion ( ) throws java.io.IOException , libcore.tzdata.update2.BundleException { byte [ ] contents = libcore.tzdata.update2.TimeZoneBundle.getEntryContents ( new java.io.ByteArrayInputStream ( bytes ) , libcore.tzdata.update2.TimeZoneBundle.BUNDLE_VERSION_FILE_NAME ) ; if ( contents == null ) { throw new libcore.tzdata.update2.BundleException ( "Bundle version file entry not found" ) ; } return libcore.tzdata.update2.BundleVersion.extractFromBytes ( contents ) ; }

Target:
public libcore.tzdata.update2.BundleVersion getBundleVersion ( ) throws java.io.IOException , libcore.tzdata.update2.BundleException { byte [ ] contents = libcore.tzdata.update2.TimeZoneBundle.getEntryContents ( new java.io.ByteArrayInputStream ( bytes ) , libcore.tzdata.update2.TimeZoneBundle.BUNDLE_VERSION_FILE_NAME ) ; if ( contents == null ) { throw new libcore.tzdata.update2.BundleException ( "Bundle version file entry not found" ) ; } return libcore.tzdata.update2.BundleVersion.fromBytes ( contents ) ; }
Source:
static boolean installOnSd ( int flags ) { if ( ( ( flags & ( android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ) ) != 0 ) || ( ( flags & ( android.content.pm.PackageManager.INSTALL_INTERNAL ) ) != 0 ) ) { return false ; } if ( ( flags & ( android.content.pm.PackageManager.INSTALL_EXTERNAL ) ) != 0 ) { return true ; } return false ; }

Target:
private static boolean installForwardLocked ( int flags ) { return ( flags & ( android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ) ) != 0 ; }
Source:
private void writeAnnotation ( @ javax.annotation.Nonnull org.objectweb.asm.tree.AnnotationNode anno , @ javax.annotation.Nonnull com.android.jill.frontend.java.RetentionPolicy retentionPolicy ) throws java.io.IOException { sourceInfoWriter.writeUnknwonDebugBegin ( ) ; writer.writeKeyword ( Token.ANNOTATION_LITERAL ) ; writer.writeOpen ( ) ; writer.writeRetentionPolicyEnum ( retentionPolicy ) ; writer.writeId ( anno.desc ) ; writeNameValuePair ( anno.values ) ; sourceInfoWriter.writeUnknownDebugEnd ( ) ; writer.writeClose ( ) ; }

Target:
private void writeAnnotation ( @ javax.annotation.Nonnull org.objectweb.asm.tree.AnnotationNode anno , @ javax.annotation.Nonnull com.android.jill.frontend.java.RetentionPolicy retentionPolicy ) throws java.io.IOException { sourceInfoWriter.writeUnknwonDebugBegin ( ) ; writer.writeKeyword ( Token.ANNOTATION ) ; writer.writeOpen ( ) ; writer.writeRetentionPolicyEnum ( retentionPolicy ) ; writer.writeId ( anno.desc ) ; writeNameValuePair ( anno.values ) ; sourceInfoWriter.writeUnknownDebugEnd ( ) ; writer.writeClose ( ) ; }
Source:
private static < T > java.util.Set < T > removeAllNullEntries ( java.util.Collection < T > input ) { java.util.HashSet < T > output = new java.util.HashSet < T > ( ) ; for ( T element : input ) { if ( element != null ) { output.add ( element ) ; } } return output ; }

Target:
public com.android.build.gradle.internal.scope.VariantScope getScope ( ) { return scope ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { java.lang.String a = org.conscrypt.NativeCrypto.SSL_SESSION_cipher ( session ) ; assertTrue ( NativeCrypto.OPENSSL_TO_STANDARD_CIPHER_SUITES.containsKey ( a ) ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void run ( long sslSession ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.SSL_shutdown ( sslSession , org.conscrypt.NativeCryptoTest.INVALID_FD , org.conscrypt.NativeCryptoTest.DUMMY_CB ) ; fail ( ) ; } catch ( java.net.SocketException expected ) { } }
Source:
protected int reserveNetId ( ) { while ( true ) { final int netId = super . reserveNetId ( ) ; final android.net.Network [ ] networks = android.net.ConnectivityManager.from ( getContext ( ) ) . getAllNetworks ( ) ; boolean overlaps = false ; for ( android.net.Network network : networks ) { if ( netId == ( network.netId ) ) { overlaps = true ; break ; } } if ( overlaps ) continue ; return netId ; } }

Target:
protected int reserveNetId ( ) { while ( true ) { final int netId = super . reserveNetId ( ) ; android.content.Context context = android.support.test.InstrumentationRegistry.getContext ( ) ; final android.net.Network [ ] networks = android.net.ConnectivityManager.from ( context ) . getAllNetworks ( ) ; boolean overlaps = false ; for ( android.net.Network network : networks ) { if ( netId == ( network.netId ) ) { overlaps = true ; break ; } } if ( overlaps ) continue ; return netId ; } }
Source:
private void testUrlToUriMapping ( java.lang.String string , java.lang.String asAuthority , java.lang.String asFile , java.lang.String asQuery , java.lang.String asFragment ) throws java.lang.Exception { if ( asAuthority != null ) { java.net.URI authorityUri = backdoorUrlToUri ( new java.net.URL ( ( ( "http://host" + string ) + ".tld/" ) ) ) ; assertEquals ( ( ( "http://host" + asAuthority ) + ".tld/" ) , authorityUri.toString ( ) ) ; } if ( asFile != null ) { java.net.URI fileUri = backdoorUrlToUri ( new java.net.URL ( ( ( "http://host.tld/file" + string ) + "/" ) ) ) ; assertEquals ( ( ( "http://host.tld/file" + asFile ) + "/" ) , fileUri.toString ( ) ) ; } if ( asQuery != null ) { java.net.URI queryUri = backdoorUrlToUri ( new java.net.URL ( ( ( "http://host.tld/file?q" + string ) + "=x" ) ) ) ; assertEquals ( ( ( "http://host.tld/file?q" + asQuery ) + "=x" ) , queryUri.toString ( ) ) ; } assertEquals ( ( ( "http://host.tld/file#" + asFragment ) + "-x" ) , backdoorUrlToUri ( new java.net.URL ( ( ( "http://host.tld/file#" + asFragment ) + "-x" ) ) ) . toString ( ) ) ; }

Target:
private void testUrlToUriMapping ( java.lang.String string , java.lang.String asAuthority , java.lang.String asFile , java.lang.String asQuery , java.lang.String asFragment ) throws java.lang.Exception { if ( asAuthority != null ) { java.net.URI authorityUri = backdoorUrlToUri ( new java.net.URL ( ( ( "http://host" + string ) + ".tld/" ) ) ) ; org.junit.Assert.assertEquals ( ( ( "http://host" + asAuthority ) + ".tld/" ) , authorityUri.toString ( ) ) ; } if ( asFile != null ) { java.net.URI fileUri = backdoorUrlToUri ( new java.net.URL ( ( ( "http://host.tld/file" + string ) + "/" ) ) ) ; org.junit.Assert.assertEquals ( ( ( "http://host.tld/file" + asFile ) + "/" ) , fileUri.toString ( ) ) ; } if ( asQuery != null ) { java.net.URI queryUri = backdoorUrlToUri ( new java.net.URL ( ( ( "http://host.tld/file?q" + string ) + "=x" ) ) ) ; org.junit.Assert.assertEquals ( ( ( "http://host.tld/file?q" + asQuery ) + "=x" ) , queryUri.toString ( ) ) ; } org.junit.Assert.assertEquals ( ( ( "http://host.tld/file#" + asFragment ) + "-x" ) , backdoorUrlToUri ( new java.net.URL ( ( ( "http://host.tld/file#" + asFragment ) + "-x" ) ) ) . toString ( ) ) ; }
Source:
private void showUserSwitchDialog ( int userId , java.lang.String userName ) { android.app.Dialog d = new com.android.server.am.UserSwitchingDialog ( this , mContext , userId , userName , true ) ; d.show ( ) ; }

Target:
private void applyVrMode ( boolean enabled , android.content.ComponentName packageName , int userId , android.content.ComponentName callingPackage , boolean immediate ) { com.android.server.vr.VrManagerInternal vrService = com.android.server.LocalServices.getService ( com.android.server.vr.VrManagerInternal.class ) ; if ( immediate ) { vrService.setVrModeImmediate ( enabled , packageName , userId , callingPackage ) ; } else { vrService.setVrMode ( enabled , packageName , userId , callingPackage ) ; } }