auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final void testGetBottomRight ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Point p = r.getBottomRight ( ) ; assertEquals ( ( 3 + 20 ) , p.x ) ; assertEquals ( ( 4 + 30 ) , p.y ) ; }

Target:
public final void testGetBottomRight ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.common.api.Point p = r.getBottomRight ( ) ; assertEquals ( ( 3 + 20 ) , p.x ) ; assertEquals ( ( 4 + 30 ) , p.y ) ; }
Source:
public void run ( ) { }

Target:
public boolean requestDrawGL ( android.graphics.Canvas canvas , boolean waitForCompletion , android.view.View containerView ) { if ( ( mGLfunctor ) == null ) { mGLfunctor = new com.android.webview.chromium.DrawGLFunctor ( mAwContents.getAwDrawGLViewContext ( ) ) ; } return mGLfunctor.requestDrawGL ( ( ( android.view.HardwareCanvas ) ( canvas ) ) , containerView.getViewRootImpl ( ) , waitForCompletion ) ; }
Source:
public void testLegacyForegroundAppAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mMockApplInfo.targetSdkVersion = Build.VERSION_CODES.GINGERBREAD ; mPkgNameOfTopActivity = com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testLegacyForegroundAppAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mMockApplInfo.targetSdkVersion = Build.VERSION_CODES.GINGERBREAD ; mPkgNameOfTopActivity = com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
public java.lang.Object clone ( ) { try { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.ArrayList < E > v = ( ( java.util.ArrayList < E > ) ( super . clone ( ) ) ) ; v.elementData = java.util.Arrays.copyOf ( elementData , size ) ; v.modCount = 0 ; return v ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( ) ; } }

Target:
public boolean tryAdvance ( java.util.function.Consumer < ? super E > action ) { if ( action == null ) throw new java.lang.NullPointerException ( ) ; int hi = getFence ( ) ; int i = index ; if ( i < hi ) { index = i + 1 ; @ java.lang.SuppressWarnings ( value = "unchecked" ) E e = ( ( E ) ( list.elementData [ i ] ) ) ; action.accept ( e ) ; if ( ( list.modCount ) != ( expectedModCount ) ) throw new java.util.ConcurrentModificationException ( ) ; return true ; } return false ; }
Source:
private static void setDefaultNetworkEvent ( com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent out , android.net.metrics.DefaultNetworkEvent in ) { com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.DefaultNetworkEvent defaultNetworkEvent = new com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.DefaultNetworkEvent ( ) ; defaultNetworkEvent.networkId = com.android.server.connectivity.IpConnectivityEventBuilder.netIdOf ( in.netId ) ; defaultNetworkEvent.previousNetworkId = com.android.server.connectivity.IpConnectivityEventBuilder.netIdOf ( in.prevNetId ) ; defaultNetworkEvent.transportTypes = in.transportTypes ; defaultNetworkEvent.previousNetworkIpSupport = com.android.server.connectivity.IpConnectivityEventBuilder.ipSupportOf ( in ) ; out.setDefaultNetworkEvent ( defaultNetworkEvent ) ; }

Target:
public static com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent toProto ( android.net.metrics.DefaultNetworkEvent in ) { com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.DefaultNetworkEvent ev = new com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.DefaultNetworkEvent ( ) ; ev.finalScore = in.finalScore ; ev.initialScore = in.initialScore ; ev.ipSupport = com.android.server.connectivity.IpConnectivityEventBuilder.ipSupportOf ( in ) ; ev.defaultNetworkDurationMs = in.durationMs ; ev.validationDurationMs = in.validatedMs ; ev.previousDefaultNetworkLinkLayer = com.android.server.connectivity.IpConnectivityEventBuilder.transportsToLinkLayer ( in.previousTransports ) ; final com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent out = com.android.server.connectivity.IpConnectivityEventBuilder.buildEvent ( in.netId , in.transports , null ) ; if ( ( in.transports ) == 0 ) { out.linkLayer = com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.NONE ; } out.setDefaultNetworkEvent ( ev ) ; return out ; }
Source:
public void testGetOutputStreamOnGetFails ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; try { connection.getOutputStream ( ) ; fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }

Target:
public void testGetOutputAfterGetInputStreamFails ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; connection.setDoOutput ( true ) ; try { connection.getInputStream ( ) ; connection.getOutputStream ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }
Source:
public void addOnSubscriptionsChangedListener ( android.telephony.SubscriptionManager.OnSubscriptionsChangedListener listener ) { java.lang.String pkgForDebug = ( ( mContext ) != null ) ? mContext.getOpPackageName ( ) : "<unknown>" ; if ( android.telephony.SubscriptionManager.DBG ) { android.telephony.SubscriptionManager.logd ( ( ( ( "register OnSubscriptionsChangedListener pkgForDebug=" + pkgForDebug ) + " listener=" ) + listener ) ) ; } try { com.android.internal.telephony.ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface ( android.os.ServiceManager.getService ( "telephony.registry" ) ) ; if ( tr != null ) { tr.addOnSubscriptionsChangedListener ( pkgForDebug , listener.callback ) ; } } catch ( android.os.RemoteException ex ) { } }

Target:
public void addOnSubscriptionsChangedListener ( android.telephony.SubscriptionManager.OnSubscriptionsChangedListener listener ) { java.lang.String pkgName = ( ( mContext ) != null ) ? mContext.getOpPackageName ( ) : "<unknown>" ; if ( android.telephony.SubscriptionManager.DBG ) { android.telephony.SubscriptionManager.logd ( ( ( ( "register OnSubscriptionsChangedListener pkgName=" + pkgName ) + " listener=" ) + listener ) ) ; } try { com.android.internal.telephony.ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface ( android.os.ServiceManager.getService ( "telephony.registry" ) ) ; if ( tr != null ) { tr.addOnSubscriptionsChangedListener ( pkgName , listener.callback ) ; } } catch ( android.os.RemoteException ex ) { } }
Source:
private static void test_directGetResourceAsStream ( dalvik.system.DexClassLoaderTest.Configuration config , java.lang.String resourceName , java.lang.String expectedContents ) throws java.lang.Exception { dalvik.system.DexClassLoader dcl = dalvik.system.DexClassLoaderTest.createInstance ( config ) ; java.io.InputStream in = dcl.getResourceAsStream ( resourceName ) ; byte [ ] contents = libcore.io.Streams.readFully ( in ) ; java.lang.String s = new java.lang.String ( contents , "UTF-8" ) ; assertEquals ( expectedContents , s ) ; }

Target:
public void test_oneJar_directGetResourceAsStream ( ) throws java.lang.Exception { java.lang.String result = createLoaderAndGetResource ( "test/Resource1.txt" , jar1 ) ; assertEquals ( "Muffins are tasty!\n" , result ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { android.os.AsyncResult ar ; switch ( msg.what ) { case com.android.settings.BandMode.EVENT_BAND_SCAN_COMPLETED : ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; bandListLoaded ( ar ) ; break ; case com.android.settings.BandMode.EVENT_BAND_SELECTION_DONE : ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; getWindow ( ) . setFeatureInt ( Window.FEATURE_INDETERMINATE_PROGRESS , Window.PROGRESS_VISIBILITY_OFF ) ; displayBandSelectionResult ( ar.exception ) ; break ; } }

Target:
public void handleMessage ( android.os.Message msg ) { android.os.AsyncResult ar ; switch ( msg.what ) { case com.android.settings.BandMode.EVENT_BAND_SCAN_COMPLETED : ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; bandListLoaded ( ar ) ; break ; case com.android.settings.BandMode.EVENT_BAND_SELECTION_DONE : ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; getWindow ( ) . setFeatureInt ( Window.FEATURE_INDETERMINATE_PROGRESS , Window.PROGRESS_VISIBILITY_OFF ) ; if ( ! ( isFinishing ( ) ) ) { displayBandSelectionResult ( ar.exception ) ; } break ; } }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newTool ( @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision revision , @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision minPlatformToolsRev ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_TOOLS ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getFullRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getMinPlatformToolsRev ( ) { return minPlatformToolsRev ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; } } ; }

Target:
public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { if ( ( mCustomIsUpdateFor ) != null ) { return mCustomIsUpdateFor.isUpdateFor ( this , existingDesc ) ; } else { return isGenericUpdateFor ( existingDesc ) ; } }
Source:
private static boolean willWorkForMulticast ( java.net.NetworkInterface iface ) throws java.io.IOException { return ( ( ( iface.isUp ( ) ) && ( ! ( iface.isLoopback ( ) ) ) ) && ( iface.supportsMulticast ( ) ) ) && ( iface.getInetAddresses ( ) . hasMoreElements ( ) ) ; }

Target:
private static boolean willWorkForMulticast ( java.net.NetworkInterface iface ) throws java.io.IOException { return ( ( ( ( ( iface.isUp ( ) ) && ( ( ( libcore.java.nio.channels.DatagramChannelMulticastTest.getOsFlags ( iface ) ) & ( android.system.OsConstants.IFF_RUNNING ) ) != 0 ) ) && ( ! ( iface.isLoopback ( ) ) ) ) && ( ! ( iface.isPointToPoint ( ) ) ) ) && ( iface.supportsMulticast ( ) ) ) && ( iface.getInetAddresses ( ) . hasMoreElements ( ) ) ; }
Source:
public void add ( E e ) { int i = cursor ; synchronized ( this ) { checkForComodification ( ) ; this . add ( i , e ) ; expectedModCount = modCount ; } cursor = i + 1 ; lastRet = - 1 ; }

Target:
public void add ( E e ) { int i = cursor ; synchronized ( this ) { checkForComodification ( ) ; this . add ( i , e ) ; expectedModCount = modCount ; ( limit ) ++ ; } cursor = i + 1 ; lastRet = - 1 ; }
Source:
public void testCheckReadPhoneNumber_hasPrivilegedPhoneStatePermission ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }

Target:
public void testCheckReadPhoneNumber_hasPrivilegedPhoneStatePermission ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
public static boolean shouldShowHdIconInCallLog ( android.content.Context context , int features ) { return ( ( com.android.dialer.configprovider.ConfigProviderBindings.get ( context ) . getBoolean ( com.android.dialer.oem.MotorolaUtils.CONFIG_HD_CODEC_SHOW_ICON_IN_CALL_LOG_ENABLED , true ) ) && ( ( features & ( com.android.dialer.oem.MotorolaUtils.FEATURES_HD_CALL ) ) == ( com.android.dialer.oem.MotorolaUtils.FEATURES_HD_CALL ) ) ) && ( com.android.dialer.oem.MotorolaUtils.isSupportingSprintHdCodec ( context ) ) ; }

Target:
public static boolean shouldShowHdIconInCallLog ( android.content.Context context , int features ) { return ( ( com.android.dialer.configprovider.ConfigProviderBindings.get ( context ) . getBoolean ( com.android.dialer.oem.MotorolaUtils.CONFIG_HD_CODEC_SHOW_ICON_IN_CALL_LOG_ENABLED , true ) ) && ( ( features & ( android.provider.CallLog.Calls.FEATURES_HD_CALL ) ) == ( android.provider.CallLog.Calls.FEATURES_HD_CALL ) ) ) && ( com.android.dialer.oem.MotorolaUtils.isSupportingSprintHdCodec ( context ) ) ; }
Source:
private void resolvePrivateDnsConfig ( ) { resolvePrivateDnsConfig ( com.android.server.connectivity.DnsManager.getPrivateDnsConfig ( mContext.getContentResolver ( ) ) ) ; }

Target:
private boolean sendPrivateDnsProbe ( ) { final java.lang.String ONE_TIME_HOSTNAME_SUFFIX = "-dnsotls-ds.metric.gstatic.com" ; final java.lang.String host = ( java.util.UUID.randomUUID ( ) . toString ( ) . substring ( 0 , 8 ) ) + ONE_TIME_HOSTNAME_SUFFIX ; try { final java.net.InetAddress [ ] ips = mNetworkAgentInfo.network ( ) . getAllByName ( host ) ; return ( ips != null ) && ( ( ips.length ) > 0 ) ; } catch ( java.net.UnknownHostException uhe ) { } return false ; }
Source:
public void testSubscribeTerminatedFail ( ) throws org.json.JSONException { final int subscribeId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "subscribe_id" , subscribeId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; com.android.server.wifi.aware.WifiAwareHalMock.callSubscribeTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( subscribeId , DiscoverySessionCallback.TERMINATE_REASON_FAIL , false ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testPublishTerminatedDone ( ) throws org.json.JSONException { final int publishId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "publish_id" , publishId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_SUCCESS ) ; com.android.server.wifi.aware.WifiAwareHalMock.callPublishTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( publishId , WifiAwareNative.AWARE_STATUS_SUCCESS , true ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
private static org.eclipse.core.resources.IResource findNonValueFile ( org.eclipse.core.resources.IProject project , com.android.ide.eclipse.adt.internal.resources.ResourceType type , java.lang.String name ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getResources ( project , false ) ; if ( resources == null ) { return null ; } com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration configuration = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getConfiguration ( ) ; if ( configuration != null ) { org.eclipse.core.resources.IResource file = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findFileByConfig ( type , name , resources , configuration ) ; if ( file != null ) { return file ; } } return com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findFileByConfig ( type , name , resources , null ) ; }

Target:
private static org.eclipse.core.resources.IResource findNonValueFile ( org.eclipse.core.resources.IProject project , com.android.resources.ResourceType type , java.lang.String name ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getResources ( project , false ) ; if ( resources == null ) { return null ; } com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration configuration = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getConfiguration ( ) ; if ( configuration != null ) { org.eclipse.core.resources.IResource file = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findFileByConfig ( type , name , resources , configuration ) ; if ( file != null ) { return file ; } } return com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findFileByConfig ( type , name , resources , null ) ; }
Source:
public static java.lang.String getStandaloneMonthString ( int month , int abbrev ) { libcore.icu.LocaleData d = libcore.icu.LocaleData.get ( java.util.Locale.getDefault ( ) ) ; java.lang.String [ ] names ; switch ( abbrev ) { case android.text.format.DateUtils.LENGTH_LONG : names = d.longStandAloneMonthNames ; break ; case android.text.format.DateUtils.LENGTH_MEDIUM : names = d.shortMonthNames ; break ; case android.text.format.DateUtils.LENGTH_SHORT : names = d.shortMonthNames ; break ; case android.text.format.DateUtils.LENGTH_SHORTER : names = d.shortMonthNames ; break ; case android.text.format.DateUtils.LENGTH_SHORTEST : names = d.tinyMonthNames ; break ; default : names = d.shortMonthNames ; break ; } return names [ month ] ; }

Target:
public static java.lang.String getStandaloneMonthString ( int month , int abbrev ) { libcore.icu.LocaleData d = libcore.icu.LocaleData.get ( java.util.Locale.getDefault ( ) ) ; java.lang.String [ ] names ; switch ( abbrev ) { case android.text.format.DateUtils.LENGTH_LONG : names = d.longStandAloneMonthNames ; break ; case android.text.format.DateUtils.LENGTH_MEDIUM : names = d.shortMonthNames ; break ; case android.text.format.DateUtils.LENGTH_SHORT : names = d.shortMonthNames ; break ; case android.text.format.DateUtils.LENGTH_SHORTER : names = d.shortMonthNames ; break ; case android.text.format.DateUtils.LENGTH_SHORTEST : names = d.tinyStandAloneMonthNames ; break ; default : names = d.shortMonthNames ; break ; } return names [ month ] ; }
Source:
private void deleteAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = new com.android.sdklib.internal.avd.AvdManager ( mSdkManager , mSdkLog ) ; com.android.sdklib.internal.avd.AvdInfo info = avdManager.getAvd ( avdName , false ) ; if ( info == null ) { errorAndExit ( "There is no Android Virtual Device named '%s'." , avdName ) ; return ; } avdManager.deleteAvd ( info , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } }

Target:
private void deleteAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = com.android.sdklib.internal.avd.AvdManager.getInstance ( mSdkManager , mSdkLog ) ; com.android.sdklib.internal.avd.AvdInfo info = avdManager.getAvd ( avdName , false ) ; if ( info == null ) { errorAndExit ( "There is no Android Virtual Device named '%s'." , avdName ) ; return ; } avdManager.deleteAvd ( info , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } }
Source:
boolean updateCurrentCarrierInProvider ( ) { if ( ( mIccRecords ) != null ) { try { android.net.Uri uri = android.net.Uri.withAppendedPath ( Telephony.Carriers.CONTENT_URI , "current" ) ; android.content.ContentValues map = new android.content.ContentValues ( ) ; map.put ( Telephony.Carriers.NUMERIC , mIccRecords.getOperatorNumeric ( ) ) ; mContext.getContentResolver ( ) . insert ( uri , map ) ; return true ; } catch ( android.database.SQLException e ) { android.util.Log.e ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "Can't store current operator" , e ) ; } } return false ; }

Target:
boolean updateCurrentCarrierInProvider ( ) { com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; if ( r != null ) { try { android.net.Uri uri = android.net.Uri.withAppendedPath ( Telephony.Carriers.CONTENT_URI , "current" ) ; android.content.ContentValues map = new android.content.ContentValues ( ) ; map.put ( Telephony.Carriers.NUMERIC , r.getOperatorNumeric ( ) ) ; mContext.getContentResolver ( ) . insert ( uri , map ) ; return true ; } catch ( android.database.SQLException e ) { android.util.Log.e ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "Can't store current operator" , e ) ; } } return false ; }
Source:
private void connectToWifi ( ) throws java.lang.InterruptedException { android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver receiver = new android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver ( android.net.ConnectivityManager.TYPE_WIFI ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( ConnectivityManager.CONNECTIVITY_ACTION ) ; mContext.registerReceiver ( receiver , filter ) ; assertTrue ( mWifiManager.setWifiEnabled ( true ) ) ; assertTrue ( "Wifi must be configured to connect to an access point for this test." , receiver.waitForConnection ( ) ) ; mContext.unregisterReceiver ( receiver ) ; }

Target:
private void connectToWifi ( ) throws java.lang.InterruptedException { android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver receiver = new android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver ( android.net.ConnectivityManager.TYPE_WIFI ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( ConnectivityManager.CONNECTIVITY_ACTION ) ; mContext.registerReceiver ( receiver , filter ) ; assertTrue ( mWifiManager.setWifiEnabled ( true ) ) ; assertTrue ( "[RERUN] Wifi must be configured to connect to an access point for this test." , receiver.waitForConnection ( ) ) ; mContext.unregisterReceiver ( receiver ) ; }
Source:
public void run ( ) { showFindDialog ( ) ; }

Target:
public void run ( ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > selectedMessages = getSelectedLogCatMessages ( ) ; if ( ( selectedMessages.size ( ) ) == 0 ) { addNewFilter ( ) ; } else { com.android.ddmuilib.logcat.LogCatMessage m = selectedMessages.get ( 0 ) ; addNewFilter ( m.getTag ( ) , m.getMessage ( ) , m.getPid ( ) , m.getAppName ( ) , m.getLogLevel ( ) ) ; } }
Source:
private android.os.IInterface createImsFeature ( int slotId , int featureType , com.android.ims.internal.IImsFeatureStatusCallback c ) throws android.os.RemoteException { switch ( featureType ) { case android.telephony.ims.feature.ImsFeature.EMERGENCY_MMTEL : { return mIImsServiceController.createEmergencyMMTelFeature ( slotId , c ) ; } case android.telephony.ims.feature.ImsFeature.MMTEL : { return mIImsServiceController.createMMTelFeature ( slotId , c ) ; } case android.telephony.ims.feature.ImsFeature.RCS : { return mIImsServiceController.createRcsFeature ( slotId , c ) ; } default : return null ; } }

Target:
protected android.os.IInterface createImsFeature ( int slotId , int featureType , com.android.ims.internal.IImsFeatureStatusCallback c ) throws android.os.RemoteException { switch ( featureType ) { case android.telephony.ims.feature.ImsFeature.FEATURE_MMTEL : { return mIImsServiceController.createMmTelFeature ( slotId , c ) ; } case android.telephony.ims.feature.ImsFeature.FEATURE_RCS : { return mIImsServiceController.createRcsFeature ( slotId , c ) ; } default : return null ; } }
Source:
public java.util.List < ? extends com.android.jack.resource.ResourceOrMeta > getImports ( ) throws com.android.jack.resource.ResourceReadingException { java.util.List < com.android.jack.resource.ResourceOrMeta > resultList = new java.util.ArrayList < com.android.jack.resource.ResourceOrMeta > ( ) ; try { for ( com.android.sched.vfs.InputVFS resourceDir : resourceDirs ) { importResourceDirElement ( resourceDir.getRootInputVDir ( ) . list ( ) , "" , resourceDir.getLocation ( ) , resultList ) ; } } catch ( com.android.jack.resource.ResourceImportConflictException e ) { throw new com.android.jack.resource.ResourceReadingException ( e ) ; } return resultList ; }

Target:
public java.util.List < ? extends com.android.jack.resource.ResourceOrMeta > getImports ( ) throws com.android.jack.resource.ResourceReadingException { java.util.List < com.android.jack.resource.ResourceOrMeta > resultList = new java.util.ArrayList < com.android.jack.resource.ResourceOrMeta > ( ) ; try { for ( com.android.sched.vfs.InputVFS resourceDir : resourceDirs ) { importResourceDirElement ( resourceDir.getRootDir ( ) . list ( ) , "" , resourceDir.getLocation ( ) , resultList ) ; } } catch ( com.android.jack.resource.ResourceImportConflictException e ) { throw new com.android.jack.resource.ResourceReadingException ( e ) ; } return resultList ; }
Source:
private static java.util.List < java.io.File > splitPaths ( java.lang.String path1 , java.lang.String path2 , boolean wantDirectories ) { java.util.List < java.io.File > result = new java.util.ArrayList < java.io.File > ( ) ; dalvik.system.DexPathList.splitAndAdd ( path1 , wantDirectories , result ) ; dalvik.system.DexPathList.splitAndAdd ( path2 , wantDirectories , result ) ; return result ; }

Target:
private static dalvik.system.DexPathList.Element [ ] makeDexElements ( java.util.List < java.io.File > files , java.io.File optimizedDirectory , java.util.List < java.io.IOException > suppressedExceptions ) { return dalvik.system.DexPathList.makeElements ( files , optimizedDirectory , suppressedExceptions , false ) ; }
Source:
public void stopNetworkQuery ( com.android.phone.INetworkQueryServiceCallback cb ) { unregisterCallback ( cb ) ; }

Target:
public void stopNetworkQuery ( ) { if ( com.android.phone.NetworkQueryService.DBG ) com.android.phone.NetworkQueryService.log ( "stop network query" ) ; if ( ( mNetworkScan ) != null ) { try { mNetworkScan.stop ( ) ; mState = com.android.phone.NetworkQueryService.QUERY_READY ; } catch ( android.os.RemoteException e ) { if ( com.android.phone.NetworkQueryService.DBG ) com.android.phone.NetworkQueryService.log ( "stop mNetworkScan failed" ) ; } catch ( java.lang.IllegalArgumentException e ) { } } }
Source:
private android.net.wifi.WifiConfiguration updateExistingInternalWifiConfigurationFromExternal ( android.net.wifi.WifiConfiguration config , int uid ) { android.net.wifi.WifiConfiguration existingConfig = new android.net.wifi.WifiConfiguration ( getInternalConfiguredNetwork ( config ) ) ; mergeWithInternalWifiConfiguration ( config , existingConfig ) ; existingConfig.lastUpdateUid = uid ; existingConfig.lastUpdateName = mContext.getPackageManager ( ) . getNameForUid ( uid ) ; existingConfig.updateTime = com.android.server.wifi.WifiConfigManager.createDebugTimeStampString ( mClock.getWallClockMillis ( ) ) ; return existingConfig ; }

Target:
private android.net.wifi.WifiConfiguration updateExistingInternalWifiConfigurationFromExternal ( android.net.wifi.WifiConfiguration internalConfig , android.net.wifi.WifiConfiguration externalConfig , int uid ) { android.net.wifi.WifiConfiguration newInternalConfig = new android.net.wifi.WifiConfiguration ( internalConfig ) ; mergeWithInternalWifiConfiguration ( newInternalConfig , externalConfig ) ; newInternalConfig.lastUpdateUid = uid ; newInternalConfig.lastUpdateName = mContext.getPackageManager ( ) . getNameForUid ( uid ) ; newInternalConfig.updateTime = com.android.server.wifi.WifiConfigManager.createDebugTimeStampString ( mClock.getWallClockMillis ( ) ) ; return newInternalConfig ; }
Source:
public void apply ( ) throws java.lang.UnsupportedOperationException { method.addParam ( parameter ) ; method.getMethodIdWide ( ) . addParam ( parameter.getType ( ) ) ; parameter.updateParents ( method ) ; }

Target:
public void apply ( ) throws java.lang.UnsupportedOperationException { assert ( method.getParams ( ) . size ( ) ) == ( method.getMethodIdWide ( ) . getParamTypes ( ) . size ( ) ) ; method.addParam ( parameter ) ; method.getMethodIdWide ( ) . addParam ( parameter.getType ( ) ) ; parameter.updateParents ( method ) ; }
Source:
public void handlesFirstUpstreamChange ( ) throws java.lang.Exception { initTetheredStateMachine ( ConnectivityManager.TETHERING_BLUETOOTH , null ) ; dispatchTetherConnectionChanged ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.UPSTREAM_IFACE ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mNMService ) ; inOrder.verify ( mNMService ) . enableNat ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.UPSTREAM_IFACE ) ; inOrder.verify ( mNMService ) . startInterfaceForwarding ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.UPSTREAM_IFACE ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }

Target:
public void handlesFirstUpstreamChange ( ) throws java.lang.Exception { initTetheredStateMachine ( android.net.ConnectivityManager.TETHERING_BLUETOOTH , null ) ; dispatchTetherConnectionChanged ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.UPSTREAM_IFACE ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mNMService ) ; inOrder.verify ( mNMService ) . enableNat ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.UPSTREAM_IFACE ) ; inOrder.verify ( mNMService ) . startInterfaceForwarding ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.UPSTREAM_IFACE ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }
Source:
private static void assertParameter0Annotations ( java.lang.reflect.Executable executable , java.lang.String ... expectedAnnotationStrings ) throws java.lang.Exception { java.lang.annotation.Annotation [ ] [ ] allAnnotations = executable.getParameterAnnotations ( ) ; final int expectedParameterCount = 1 ; assertEquals ( expectedParameterCount , allAnnotations.length ) ; java.lang.annotation.Annotation [ ] p0Annotations = allAnnotations [ 0 ] ; libcore.java.lang.reflect.annotations.AnnotatedElementTestSupport.assertAnnotationsMatch ( p0Annotations , expectedAnnotationStrings ) ; }

Target:
private static void assertOnlyParameterAnnotations ( java.lang.reflect.Executable executable , java.lang.String ... expectedAnnotationStrings ) throws java.lang.Exception { java.lang.annotation.Annotation [ ] [ ] allAnnotations = libcore.java.lang.reflect.annotations.ExecutableParameterTest.getParameterAnnotations ( executable , 1 ) ; java.lang.annotation.Annotation [ ] p0Annotations = allAnnotations [ 0 ] ; libcore.java.lang.reflect.annotations.AnnotatedElementTestSupport.assertAnnotationsMatch ( p0Annotations , expectedAnnotationStrings ) ; }
Source:
private java.lang.String removeDoubleQuotes ( java.lang.String string ) { if ( ( string.length ( ) ) <= 2 ) return "" ; return string.substring ( 1 , ( ( string.length ( ) ) - 1 ) ) ; }

Target:
private java.lang.String removeDoubleQuotes ( java.lang.String string ) { int length = string.length ( ) ; if ( ( ( length > 1 ) && ( ( string.charAt ( 0 ) ) == '"' ) ) && ( ( string.charAt ( ( length - 1 ) ) ) == '"' ) ) { return string.substring ( 1 , ( length - 1 ) ) ; } return string ; }
Source:
public final short getDNibble ( ) { int d = getD ( ) ; if ( ( d & ( ~ 15 ) ) != 0 ) { throw new com.android.jack.dx.util.DexException ( ( "Register D out of range: " + ( com.android.jack.dx.util.Hex.u8 ( d ) ) ) ) ; } return ( ( short ) ( d ) ) ; }

Target:
public final com.android.jack.dx.io.IndexType getSecondIndexType ( ) { return secondIndexType ; }
Source:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_SRC , getSampleImageSrc ( ) ) ; } }

Target:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType == ( com.android.ide.common.api.InsertType.CREATE ) ) { java.lang.String src = mRulesEngine.displayResourceInput ( "drawable" , "" ) ; if ( src != null ) { node.editXml ( "Set Image" , new com.android.ide.common.layout.PropertySettingNodeHandler ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_SRC , src ) ) ; return ; } } if ( insertType.isCreate ( ) ) { node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_SRC , getSampleImageSrc ( ) ) ; } }
Source:
private static void appendAttributes ( java.util.List < com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor > attributes , com.android.ide.common.resources.platform.AttributeInfo [ ] attributeInfos , java.lang.String appResource ) { for ( com.android.ide.common.resources.platform.AttributeInfo info : attributeInfos ) { java.lang.String nsUri ; if ( info.getName ( ) . startsWith ( com.android.ide.common.layout.LayoutConstants.ANDROID_NS_NAME_PREFIX ) ) { info.setName ( info.getName ( ) . substring ( com.android.ide.common.layout.LayoutConstants.ANDROID_NS_NAME_PREFIX.length ( ) ) ) ; nsUri = com.android.ide.common.layout.LayoutConstants.ANDROID_URI ; } else { nsUri = appResource ; } com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.appendAttribute ( attributes , null , nsUri , info , false , null ) ; } }

Target:
private static void appendAttributes ( java.util.List < com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor > attributes , com.android.ide.common.resources.platform.AttributeInfo [ ] attributeInfos , java.lang.String appResource ) { for ( com.android.ide.common.resources.platform.AttributeInfo info : attributeInfos ) { java.lang.String nsUri ; if ( info.getName ( ) . startsWith ( com.android.util.XmlUtils.ANDROID_NS_NAME_PREFIX ) ) { info.setName ( info.getName ( ) . substring ( com.android.util.XmlUtils.ANDROID_NS_NAME_PREFIX.length ( ) ) ) ; nsUri = com.android.util.XmlUtils.ANDROID_URI ; } else { nsUri = appResource ; } com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.appendAttribute ( attributes , null , nsUri , info , false , null ) ; } }
Source:
void handleUnlockResult ( android.os.AsyncResult ar ) { if ( ( ar.exception ) == null ) { handleSuccess ( ) ; return ; } if ( ( ( ar.exception ) instanceof com.android.internal.telephony.gsm.CommandException ) && ( ( ( ( com.android.internal.telephony.gsm.CommandException ) ( ar.exception ) ) . getCommandError ( ) ) == ( CommandException.Error.PASSWORD_INCORRECT ) ) ) { hidePinUnlockInProgress ( ) ; handleFailure ( ) ; } }

Target:
void handleUnlockResult ( android.os.AsyncResult ar ) { if ( ( ar.exception ) == null ) { handleSuccess ( ) ; return ; } if ( ( ( ar.exception ) instanceof com.android.internal.telephony.CommandException ) && ( ( ( ( com.android.internal.telephony.CommandException ) ( ar.exception ) ) . getCommandError ( ) ) == ( CommandException.Error.PASSWORD_INCORRECT ) ) ) { hidePinUnlockInProgress ( ) ; handleFailure ( ) ; } }
Source:
public void compileRegressions ( ) throws java.lang.Exception { com.android.jack.Options compilerArgs = com.android.jack.TestTools.buildCommandLineArgs ( null , null , com.android.jack.TestTools.getDalvikTestFolder ( "083-jit-regressions" ) ) ; com.android.jack.TestTools.runCompilation ( compilerArgs ) ; }

Target:
public void compileRegressions ( ) throws java.lang.Exception { java.io.File out = com.android.jack.TestTools.createTempFile ( "out" , ".zip" ) ; java.lang.String classpath = com.android.jack.TestTools.getClasspathAsString ( com.android.jack.compile.androidtree.dalvik.compilerregressions.CompilerRegressionsTest.BOOTCLASSPATH ) ; com.android.jack.TestTools.compileSourceToDex ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getDalvikTestFolder ( "083-jit-regressions" ) , classpath , out , true ) ; }
Source:
public void getBasebandVersion ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_BASEBAND_VERSION , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void getNetworkSelectionMode ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public static boolean contentUriExists ( android.content.Context context , java.lang.String uriString ) { android.content.res.AssetFileDescriptor asf = null ; try { asf = org.chromium.base.ContentUriUtils.getAssetFileDescriptor ( context , uriString ) ; return asf != null ; } finally { if ( asf != null ) { try { asf.close ( ) ; } catch ( java.io.IOException e ) { } } } }

Target:
public static boolean contentUriExists ( android.content.Context context , java.lang.String uriString ) { return ( org.chromium.base.ContentUriUtils.getParcelFileDescriptor ( context , uriString ) ) != null ; }
Source:
void createReportTasks ( org.gradle.model.collection.CollectionBuilder < org.gradle.api.Task > tasks , com.android.build.gradle.model.AndroidComponentSpec spec ) { com.android.build.gradle.internal.VariantManager variantManager ; ( spec = DefaultAndroidComponentSpec ) . new tasks.create ( "androidDependencies" , DependencyReportTask ) { com.android.build.gradle.internal.tasks.DependencyReportTask dependencyReportTask = com.android.build.gradle.model.dependencyReportTask.setDescription ( "Displays the Android dependencies of the project" ) . setVariants ( variantManager.variantDataList ) . setGroup ( "Android" ) [ tasks.create ( "signingReport" , com.android.build.gradle.internal.tasks.SigningReportTask ) ] ; { com.android.build.gradle.internal.tasks.SigningReportTask signingReportTask ; signingReportTask.setDescription ( "Displays the signing info for each variant" ) ; signingReportTask.setVariants ( variantManager.variantDataList ) ; signingReportTask.setGroup ( "Android" ) ; } } ; }

Target:
public void createRemainingTasks ( org.gradle.model.collection.CollectionBuilder < org.gradle.api.Task > tasks , com.android.build.gradle.internal.TaskManager taskManager , com.android.build.gradle.model.AndroidComponentSpec spec ) { com.android.build.gradle.internal.VariantManager variantManager = ( ( com.android.build.gradle.model.DefaultAndroidComponentSpec ) ( spec ) ) . getVariantManager ( ) ; taskManager.createTopLevelTestTasks ( new com.android.build.gradle.model.TaskCollectionBuilderAdaptor ( tasks ) , ( ! ( variantManager.getProductFlavors ( ) . isEmpty ( ) ) ) ) ; }
Source:
public void call ( org.chromium.mojo.bindings.interfacecontrol.RunResponseMessageParams response ) { if ( ( ( response.output ) != null ) && ( ( response.output.which ( ) ) == ( RunOutput.Tag.QueryVersionResult ) ) ) { mVersion = response.output.getQueryVersionResult ( ) . version ; } callback.call ( mVersion ) ; }

Target:
public void call ( org.chromium.mojo.bindings.RunResponseMessageParams response ) { mVersion = response.queryVersionResult.version ; callback.call ( mVersion ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { long timestamp = intent.getLongExtra ( "timestamp" , 0 ) ; android.util.Log.d ( com.android.graphics.benchmark.device.GraphicsBenchmarkTest.TAG , ( "Received intent at " + timestamp ) ) ; mReport.startLoop ( timestamp ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { long timestamp = intent.getLongExtra ( "timestamp" , 0 ) ; android.util.Log.d ( com.android.graphics.benchmark.device.GraphicsBenchmarkTest.TAG , ( "Received intent at " + timestamp ) ) ; mReport.startLoop ( timestamp ) ; if ( ! ( mGotIntent ) ) { mHandler.postDelayed ( ( ) -> mHandler.getLooper ( ) . quit ( ) , 10000 ) ; mGotIntent = true ; } }
Source:
public byte [ ] getEncoded ( ) throws java.security.cert.CertificateEncodingException { try { return c.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { throw new java.security.cert.CertificateEncodingException ( e.toString ( ) ) ; } }

Target:
public byte [ ] getEncoded ( ) throws java.security.cert.CertificateEncodingException { try { if ( ( encoded ) == null ) { encoded = c.getEncoded ( ASN1Encoding.DER ) ; } return encoded ; } catch ( java.io.IOException e ) { throw new java.security.cert.CertificateEncodingException ( e.toString ( ) ) ; } }
Source:
public void setNetworkSelectionModeAutomatic ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void setFacilityLock ( java.lang.String facility , boolean lockState , java.lang.String password , int serviceClass , android.os.Message result ) { setFacilityLockForApp ( facility , lockState , password , serviceClass , null , result ) ; }
Source:
public static long getUidTxBytes ( int uid ) { final int callingUid = android.net.android.os.Process.myUid ( ) ; if ( ( callingUid == android.net.android.os.Process ) || ( callingUid == uid ) ) { return android.net.TrafficStats.nativeGetUidStat ( uid , android.net.TrafficStats.TYPE_TX_BYTES ) ; } else { return android.net.TrafficStats.UNSUPPORTED ; } }

Target:
public static long getTxBytes ( java.lang.String iface ) { try { return android.net.TrafficStats.getStatsService ( ) . getIfaceStats ( iface , android.net.TrafficStats.TYPE_TX_BYTES ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public boolean hasFailedTests ( ) { return ( ( getNumErrorTests ( ) ) > 0 ) || ( ( getNumFailedTests ( ) ) > 0 ) ; }

Target:
private void updateTestResult ( com.android.ddmlib.testrunner.TestIdentifier test , com.android.ddmlib.testrunner.TestResult.TestStatus status , java.lang.String trace ) { com.android.ddmlib.testrunner.TestResult r = mTestResults.get ( test ) ; if ( r == null ) { com.android.ddmlib.Log.d ( com.android.ddmlib.testrunner.TestRunResult.LOG_TAG , java.lang.String.format ( "received test event without test start for %s" , test ) ) ; r = new com.android.ddmlib.testrunner.TestResult ( ) ; } r.setStatus ( status ) ; r.setStackTrace ( trace ) ; addTestResult ( test , r ) ; }
Source:
public java.lang.Integer wifiNanSubscribe ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "subscribeConfig" ) org.json.JSONObject subscribeConfig ) throws android.os.RemoteException , org.json.JSONException { synchronized ( mLock ) { android.net.wifi.nan.WifiNanSession session = mSessions.get ( clientId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanSubscribe before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } int discoverySessionId = getNextDiscoverySessionId ( ) ; session.subscribe ( null , com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.getSubscribeConfig ( subscribeConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.NanDiscoverySessionCallbackPostsEvents ( discoverySessionId ) ) ; return discoverySessionId ; } }

Target:
public java.lang.Integer wifiAwareSubscribe ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "subscribeConfig" ) org.json.JSONObject subscribeConfig ) throws android.os.RemoteException , org.json.JSONException { synchronized ( mLock ) { android.net.wifi.aware.WifiAwareSession session = mSessions.get ( clientId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwareSubscribe before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } int discoverySessionId = getNextDiscoverySessionId ( ) ; session.subscribe ( null , com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.getSubscribeConfig ( subscribeConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.AwareDiscoverySessionCallbackPostsEvents ( discoverySessionId ) ) ; return discoverySessionId ; } }