auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addHotlist ( com.android.server.wifi.scanner.WifiScanningServiceImpl.ClientInfo ci , int handler , android.net.wifi.WifiScanner.HotlistSettings settings ) { mActiveHotlistSettings.addRequest ( ci , handler , null , settings ) ; resetHotlist ( ) ; }

Target:
private boolean addHotlist ( com.android.server.wifi.scanner.WifiScanningServiceImpl.ClientInfo ci , int handler , android.net.wifi.WifiScanner.HotlistSettings settings ) { if ( ci == null ) { android.util.Log.d ( com.android.server.wifi.scanner.WifiScanningServiceImpl.TAG , ( "Failing hotlist request ClientInfo not found " + handler ) ) ; return false ; } mActiveHotlistSettings.addRequest ( ci , handler , null , settings ) ; resetHotlist ( ) ; return true ; }
Source:
private int calculateAesCbcEspPacketSizeWithAuth ( int payloadLen , int authTruncLen ) { return calculateEspPacketSize ( payloadLen , android.net.cts.IpSecManagerTest.AES_CBC_IV_LEN , android.net.cts.IpSecManagerTest.AES_CBC_BLK_SIZE , authTruncLen ) ; }

Target:
private int getIvLen ( android.net.IpSecAlgorithm cryptOrAead ) { if ( cryptOrAead == null ) { return 0 ; } switch ( cryptOrAead.getName ( ) ) { case android.net.IpSecAlgorithm.CRYPT_AES_CBC : return android.net.cts.IpSecManagerTest.AES_CBC_IV_LEN ; case android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM : return android.net.cts.IpSecManagerTest.AES_GCM_IV_LEN ; default : throw new java.lang.IllegalArgumentException ( ( "IV length unknown for algorithm" + ( cryptOrAead.getName ( ) ) ) ) ; } }
Source:
public void testGetConfig2 ( ) { com.android.ide.common.resources.configuration.FolderConfiguration configForFolder = com.android.ide.common.resources.configuration.FolderConfiguration.getConfigForFolder ( "values-en-rUS" ) ; assertNotNull ( configForFolder ) ; assertEquals ( "en" , configForFolder.getLanguageQualifier ( ) . getValue ( ) ) ; assertEquals ( "US" , configForFolder.getRegionQualifier ( ) . getValue ( ) ) ; assertNull ( configForFolder.getScreenDimensionQualifier ( ) ) ; assertNull ( configForFolder.getLayoutDirectionQualifier ( ) ) ; }

Target:
public void testGetConfig1 ( ) { com.android.ide.common.resources.configuration.FolderConfiguration configForFolder = com.android.ide.common.resources.configuration.FolderConfiguration.getConfig ( new java.lang.String [ ] { "values" , "en" , "rUS" } ) ; assertNotNull ( configForFolder ) ; assertEquals ( "en" , configForFolder.getLocaleQualifier ( ) . getLanguage ( ) ) ; assertEquals ( "US" , configForFolder.getLocaleQualifier ( ) . getRegion ( ) ) ; assertNull ( configForFolder.getScreenDimensionQualifier ( ) ) ; assertNull ( configForFolder.getLayoutDirectionQualifier ( ) ) ; }
Source:
public long connectivityGetRxBytesForDevice ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "subscriberId" ) java.lang.String subscriberId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "startTime" ) java.lang.Long startTime , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "endTime" ) java.lang.Long endTime , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "connType" ) java.lang.Integer connType ) throws android.os.RemoteException , java.lang.SecurityException { if ( connType == null ) connType = android.net.ConnectivityManager.TYPE_MOBILE ; android.app.usage.NetworkStats.Bucket bucket = mNetStatsManager.querySummaryForDevice ( connType , subscriberId , startTime , endTime ) ; return bucket.getRxBytes ( ) ; }

Target:
public long connectivityQueryDetailsForUidRxBytes ( java.lang.Integer connType , java.lang.String subscriberId , java.lang.Long startTime , java.lang.Long endTime , java.lang.Integer uid ) throws android.os.RemoteException , java.lang.SecurityException { long rxBytes = 0 ; android.app.usage.NetworkStats netStats = mNetStatsManager.queryDetailsForUid ( connType , subscriberId , startTime , endTime , uid ) ; android.app.usage.NetworkStats.Bucket bucket = new android.app.usage.NetworkStats.Bucket ( ) ; while ( ( netStats.hasNextBucket ( ) ) && ( netStats.getNextBucket ( bucket ) ) ) { rxBytes += bucket.getRxBytes ( ) ; } netStats.close ( ) ; return rxBytes ; }
Source:
public void callBackFromMissedCall ( java.lang.String number , android.net.Uri callUri ) { closeSystemDialogs ( context ) ; com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.markSingleMissedCallInCallLogAsRead ( context , callUri ) ; com.android.dialer.app.calllog.MissedCallNotifier.cancelSingleMissedCallNotification ( context , callUri ) ; com.android.dialer.util.DialerUtils.startActivityWithErrorToast ( context , com.android.dialer.precall.PreCall.getIntent ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , CallInitiationType.Type.MISSED_CALL_NOTIFICATION ) ) . setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ) ; }

Target:
public void sendSmsFromMissedCall ( java.lang.String number , android.net.Uri callUri ) { closeSystemDialogs ( context ) ; com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.markSingleMissedCallInCallLogAsRead ( context , callUri ) ; com.android.dialer.notification.missedcalls.MissedCallNotificationCanceller.cancelSingle ( context , callUri ) ; com.android.dialer.util.DialerUtils.startActivityWithErrorToast ( context , com.android.dialer.util.IntentUtil.getSendSmsIntent ( number ) . setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ) ; }
Source:
public final void add ( T item , boolean insertToEnd ) { int i ; if ( insertToEnd ) { i = findInsertPosition ( item ) ; } else { i = findInsertPositionBinary ( item ) ; } super . add ( i , item ) ; if ( ( com.android.tv.dvr.ui.SortedArrayAdapter.size ( ) ) > ( ( mMaxItemCount ) + ( mExtraItemCount ) ) ) { removeItems ( mMaxItemCount , ( ( ( com.android.tv.dvr.ui.SortedArrayAdapter.size ( ) ) - ( mMaxItemCount ) ) - ( mExtraItemCount ) ) ) ; } }

Target:
final void setInitialItems ( java.util.List < T > items ) { java.util.List < T > itemsCopy = new java.util.ArrayList < > ( items ) ; java.util.Collections.sort ( itemsCopy , mComparator ) ; for ( T item : itemsCopy ) { add ( item , true ) ; if ( ( com.android.tv.dvr.ui.SortedArrayAdapter.size ( ) ) == ( mMaxItemCount ) ) { break ; } } }
Source:
public void testSetValues007_Float ( ) { org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointFloat" , StackTrace002Debuggee.FLOAT_METHOD ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointFloat" ) ; methodInfo.addVariable ( "param" , new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.FLOAT_PARAM_VALUE ) , new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.FLOAT_PARAM_VALUE_TO_SET ) ) ; runStackFrameTest ( tester ) ; }

Target:
public void testSetValues009_ObjectConstantWithExceptionAndNativeTransition ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value newValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.OBJECT_METHOD_WITH_EXCEPTION_FROM_NATIVE_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointObjectWithException" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue , newValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObjectWithExceptionAndNativeTransition" ) ; methodInfo.addVariable ( "local" , oldValue , newValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public void rmdex ( java.lang.String codePath , java.lang.String instructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.rmdex ( codePath , instructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void rmdex ( java.lang.String codePath , java.lang.String instructionSet ) throws com.android.server.pm.Installer.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.rmdex ( codePath , instructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public boolean p2pExtListen ( boolean enable , int period , int interval ) { if ( enable && ( interval < period ) ) { return false ; } return doBooleanCommand ( ( "P2P_EXT_LISTEN" + ( enable ? ( ( " " + period ) + " " ) + interval : "" ) ) ) ; }

Target:
public boolean p2pExtListen ( boolean enable , int period , int interval ) { if ( enable && ( interval < period ) ) { return false ; } if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.configureExtListen ( enable , period , interval ) ; } else { return doBooleanCommand ( ( "P2P_EXT_LISTEN" + ( enable ? ( ( " " + period ) + " " ) + interval : "" ) ) ) ; } }
Source:
private java.lang.String getScheduleTitle ( com.android.tv.dvr.ScheduledRecording schedule ) { if ( ( schedule.getType ( ) ) == ( com.android.tv.dvr.ScheduledRecording.TYPE_TIMED ) ) { com.android.tv.data.Channel channel = com.android.tv.TvApplication.getSingletons ( getContext ( ) ) . getChannelDataManager ( ) . getChannel ( schedule.getChannelId ( ) ) ; if ( channel != null ) { return channel.getDisplayName ( ) ; } else { return null ; } } else { return schedule.getProgramTitle ( ) ; } }

Target:
private java.lang.String getScheduleTitle ( com.android.tv.dvr.data.ScheduledRecording schedule ) { if ( ( schedule.getType ( ) ) == ( com.android.tv.dvr.data.ScheduledRecording.TYPE_TIMED ) ) { com.android.tv.data.Channel channel = com.android.tv.TvApplication.getSingletons ( getContext ( ) ) . getChannelDataManager ( ) . getChannel ( schedule.getChannelId ( ) ) ; if ( channel != null ) { return channel.getDisplayName ( ) ; } else { return null ; } } else { return schedule.getProgramTitle ( ) ; } }
Source:
public static float $noinline$returnFloat ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 200000 ; ++ i ) { } while ( ! ( Main.isInOsrCode ( "$noinline$returnFloat" ) ) ) { } java.lang.System.out.println ( i ) ; return 42.2F ; }

Target:
public static float $noinline$returnFloat ( ) { boolean interpreting = Main.isInInterpreter ( "$noinline$returnFloat" ) ; int i = 0 ; for ( ; i < 200000 ; ++ i ) { } if ( interpreting ) { while ( ! ( Main.isInOsrCode ( "$noinline$returnFloat" ) ) ) { } } java.lang.System.out.println ( i ) ; return 42.2F ; }
Source:
protected void cleanup ( ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , "cleanup()" ) ; } if ( mNativeAvailable ) { mHidDeviceNativeInterface.cleanup ( ) ; mNativeAvailable = false ; } }

Target:
protected boolean stop ( ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , "stop()" ) ; } com.android.bluetooth.hid.HidDeviceService.setHidDeviceService ( null ) ; if ( mNativeAvailable ) { mHidDeviceNativeInterface.cleanup ( ) ; mNativeAvailable = false ; } mActivityManager.removeOnUidImportanceListener ( mUidImportanceListener ) ; return true ; }
Source:
public static java.io.File getDataDirectory ( ) throws java.lang.Exception { java.lang.Class < ? > environmentClass = java.lang.Class.forName ( "android.os.Environment" ) ; java.lang.reflect.Method method = environmentClass.getMethod ( "getDataDirectory" ) ; java.lang.Object dataDirectory = method.invoke ( null ) ; return ( ( java.io.File ) ( dataDirectory ) ) ; }

Target:
public static java.io.File getDataDirectory ( ) { java.lang.String envVariable = "ANDROID_DATA" ; java.lang.String defaultLoc = "/data" ; java.lang.String path = java.lang.System.getenv ( envVariable ) ; return path == null ? new java.io.File ( defaultLoc ) : new java.io.File ( path ) ; }
Source:
public void cannotForgetNetworkConfigWhenWifiDisabled ( ) throws java.lang.Exception { mWsm.sendMessage ( WifiManager.FORGET_NETWORK , 0 , com.android.server.wifi.WifiStateMachineTest.MANAGED_PROFILE_UID ) ; mLooper.dispatchAll ( ) ; verify ( mWifiConfigManager , never ( ) ) . removeNetwork ( anyInt ( ) , anyInt ( ) ) ; }

Target:
public void canForgetNetworkConfigWhenWifiDisabled ( ) throws java.lang.Exception { when ( mWifiConfigManager.removeNetwork ( eq ( 0 ) , anyInt ( ) ) ) . thenReturn ( true ) ; mWsm.sendMessage ( WifiManager.FORGET_NETWORK , 0 , com.android.server.wifi.WifiStateMachineTest.MANAGED_PROFILE_UID ) ; mLooper.dispatchAll ( ) ; verify ( mWifiConfigManager ) . removeNetwork ( anyInt ( ) , anyInt ( ) ) ; }
Source:
static void addItem ( java.util.List < java.util.Map < java.lang.String , ? > > data , java.lang.String title , android.content.Intent intent ) { java.util.HashMap item = new java.util.HashMap ( 2 ) ; item.put ( com.android.cts.verifier.TestListActivity.TestListAdapter.TITLE , title ) ; item.put ( com.android.cts.verifier.TestListActivity.TestListAdapter.INTENT , intent ) ; data.add ( item ) ; }

Target:
static void addItem ( java.util.List < java.util.Map < java.lang.String , ? > > tests , java.lang.String title , android.content.Intent intent ) { java.util.HashMap item = new java.util.HashMap ( 2 ) ; item.put ( com.android.cts.verifier.TestListActivity.TestListAdapter.TITLE , title ) ; item.put ( com.android.cts.verifier.TestListActivity.TestListAdapter.INTENT , intent ) ; tests.add ( item ) ; }
Source:
public void testSameItemAs ( ) throws java.lang.Exception { java.util.Properties props1 = createProps ( ) ; com.android.sdklib.internal.repository.packages.SourcePackage p1 = createSourcePackageTest ( props1 ) ; assertTrue ( p1.sameItemAs ( p1 ) ) ; java.util.Properties props2 = new java.util.Properties ( props1 ) ; props2.setProperty ( PkgProps.VERSION_API_LEVEL , "6" ) ; com.android.sdklib.internal.repository.packages.SourcePackage p2 = createSourcePackageTest ( props2 ) ; assertFalse ( p1.sameItemAs ( p2 ) ) ; assertFalse ( p2.sameItemAs ( p1 ) ) ; }

Target:
public void testSameItemAs ( ) throws java.lang.Exception { java.util.Properties props1 = createExpectedProps ( ) ; com.android.sdklib.internal.repository.packages.SourcePackage p1 = createSourcePackageTest ( props1 ) ; assertTrue ( p1.sameItemAs ( p1 ) ) ; java.util.Properties props2 = new java.util.Properties ( props1 ) ; props2.setProperty ( PkgProps.VERSION_API_LEVEL , "6" ) ; com.android.sdklib.internal.repository.packages.SourcePackage p2 = createSourcePackageTest ( props2 ) ; assertFalse ( p1.sameItemAs ( p2 ) ) ; assertFalse ( p2.sameItemAs ( p1 ) ) ; }
Source:
public void testMissingIcuFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle installedBundle = libcore.tzdata.update2.TzDataBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( installedBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; libcore.tzdata.update2.TimeZoneBundle incompleteBundle = libcore.tzdata.update2.TzDataBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEWER_RULES_VERSION , "001" ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertFalse ( installer.install ( incompleteBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; }

Target:
public void testMissingIcuFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle installedBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( installedBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; libcore.tzdata.update2.TimeZoneBundle incompleteBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEWER_RULES_VERSION , "001" ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertFalse ( installer.install ( incompleteBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; }
Source:
public java.lang.String getIdOverride ( ) { java.lang.String idName = mMergedFlavor.getApplicationId ( ) ; java.lang.String idSuffix = mBuildType.getApplicationIdSuffix ( ) ; if ( ( idSuffix != null ) && ( ! ( idSuffix.isEmpty ( ) ) ) ) { if ( idName == null ) { idName = getPackageFromManifest ( ) ; } if ( ( idSuffix.charAt ( 0 ) ) == '.' ) { idName = idName + idSuffix ; } else { idName = ( idName + '.' ) + idSuffix ; } } return idName ; }

Target:
public java.lang.String getVersionName ( ) { java.lang.String versionName = mMergedFlavor.getVersionName ( ) ; java.lang.String versionSuffix = mBuildType.getVersionNameSuffix ( ) ; if ( ( versionSuffix != null ) && ( ! ( versionSuffix.isEmpty ( ) ) ) ) { if ( versionName == null ) { if ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { versionName = getVersionNameFromManifest ( ) ; } else { versionName = "" ; } } versionName = versionName + versionSuffix ; } return versionName ; }
Source:
public void setVideoProvider ( com.android.internal.telecom.IVideoProvider videoProvider ) { android.telecom.Log.v ( this , "setVideoProvider" ) ; if ( videoProvider != null ) { try { mVideoProviderProxy = new com.android.server.telecom.VideoProviderProxy ( mLock , videoProvider , this , mCallsManager ) ; } catch ( android.os.RemoteException ignored ) { } } else { mVideoProviderProxy = null ; } mVideoProvider = videoProvider ; for ( com.android.server.telecom.Call.Listener l : mListeners ) { l.onVideoCallProviderChanged ( this ) ; } }

Target:
public void setVideoProvider ( com.android.internal.telecom.IVideoProvider videoProvider ) { android.telecom.Log.v ( this , "setVideoProvider" ) ; if ( ( mVideoProviderProxy ) != null ) { mVideoProviderProxy.clearVideoCallback ( ) ; mVideoProviderProxy = null ; } if ( videoProvider != null ) { try { mVideoProviderProxy = new com.android.server.telecom.VideoProviderProxy ( mLock , videoProvider , this , mCallsManager ) ; } catch ( android.os.RemoteException ignored ) { } } mVideoProvider = videoProvider ; for ( com.android.server.telecom.Call.Listener l : mListeners ) { l.onVideoCallProviderChanged ( this ) ; } }
Source:
private void close ( int cause ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "Closing " + ( mClosed ) ) ) ; } if ( mClosed ) { return ; } setDisconnected ( new android.telecom.DisconnectCause ( cause ) ) ; mClosed = true ; mCurrentCall = null ; destroy ( ) ; }

Target:
public synchronized void close ( int cause ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( ( ( "Closing call " + ( mCurrentCall ) ) + "state: " ) + ( mClosed ) ) ) ; } if ( mClosed ) { return ; } android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( ( "Setting " + ( mCurrentCall ) ) + " to disconnected" ) ) ; setDisconnected ( new android.telecom.DisconnectCause ( cause ) ) ; mClosed = true ; mCurrentCall = null ; destroy ( ) ; }
Source:
public void onProgressChanged ( android.webkit.WebView view , int newProgress ) { mPageLoadProgress = newProgress ; if ( newProgress == 100 ) { mInPageLoad = false ; } mWebViewController.onProgressChanged ( this ) ; }

Target:
public void onProgressChanged ( android.webkit.WebView view , int newProgress ) { mPageLoadProgress = newProgress ; if ( newProgress == 100 ) { mInPageLoad = false ; } mWebViewController.onProgressChanged ( this ) ; if ( ( mUpdateThumbnail ) && ( newProgress == 100 ) ) { mUpdateThumbnail = false ; } }
Source:
public void testInstall_missingIcuFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle installedBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( installedBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; libcore.tzdata.update2.TimeZoneBundle incompleteBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEWER_RULES_VERSION , 1 ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_STRUCTURE , installer.installWithErrorCode ( incompleteBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; }

Target:
public void testInstall_missingIcuFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneDistro installedDistro = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( installedDistro.getBytes ( ) ) ) ; assertDistroInstalled ( installedDistro ) ; libcore.tzdata.update2.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEWER_RULES_VERSION , 1 ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertDistroInstalled ( installedDistro ) ; }
Source:
private void clearImsUceService ( ) { synchronized ( mSyncObj ) { mImsUceManager = null ; mStackService = null ; mStackPresService = null ; } }

Target:
private void clearImsUceService ( ) { synchronized ( mSyncObj ) { try { logger.info ( "clearImsUceService: removing listener and presence service." ) ; if ( ( mStackPresService ) != null ) { mStackPresService.removeListener ( mStackPresenceServiceHandle , mListenerHandle ) ; } if ( ( mStackService ) != null ) { mStackService.destroyPresenceService ( mStackPresenceServiceHandle ) ; } } catch ( android.os.RemoteException e ) { logger.warn ( "clearImsUceService: Couldn't clean up stack service" ) ; } mImsUceManager = null ; mStackService = null ; mStackPresService = null ; } }
Source:
synchronized void nScriptSetVarV ( long id , int slot , byte [ ] val ) { validate ( ) ; rsnScriptSetVarV ( mContext , id , slot , val ) ; }

Target:
synchronized void nScriptSetVarVE ( long id , int slot , byte [ ] val , long e , int [ ] dims , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetVarVE ( curCon , id , slot , val , e , dims , mUseInc ) ; }
Source:
protected static void writeToFile ( java.io.File file , org.w3c.dom.Document doc ) throws java.io.FileNotFoundException , javax.xml.transform.TransformerException , javax.xml.transform.TransformerFactoryConfigurationError { javax.xml.transform.Transformer t = javax.xml.transform.TransformerFactory.newInstance ( ) . newTransformer ( ) ; t.setOutputProperty ( "indent" , "yes" ) ; t.transform ( new javax.xml.transform.dom.DOMSource ( doc ) , new javax.xml.transform.stream.StreamResult ( new java.io.FileOutputStream ( file ) ) ) ; }

Target:
protected static void writeToFile ( java.io.File file , org.w3c.dom.Document doc ) throws java.io.FileNotFoundException , java.io.IOException , javax.xml.transform.TransformerException , javax.xml.transform.TransformerFactoryConfigurationError { javax.xml.transform.Transformer t = javax.xml.transform.TransformerFactory.newInstance ( ) . newTransformer ( ) ; t.setOutputProperty ( "indent" , "yes" ) ; java.io.FileOutputStream fos = new java.io.FileOutputStream ( file ) ; try { javax.xml.transform.stream.StreamResult sr = new javax.xml.transform.stream.StreamResult ( fos ) ; t.transform ( new javax.xml.transform.dom.DOMSource ( doc ) , sr ) ; } finally { fos.close ( ) ; } }
Source:
public void testVerify_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; assertTrue ( "Signature should verify with same data" , mKeyStore.verify ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA , signature ) ) ; }

Target:
public void testVerify_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; assertTrue ( "Signature should verify with same data" , mKeyStore.verify ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA , signature ) ) ; }
Source:
public void bindAllocation ( android.support.v8.renderscript.Allocation va , int slot ) { mRS.validate ( ) ; if ( va != null ) { mRS.nScriptBindAllocation ( getID ( mRS ) , va.getID ( mRS ) , slot ) ; } else { mRS.nScriptBindAllocation ( getID ( mRS ) , 0 , slot ) ; } }

Target:
public void bindAllocation ( android.support.v8.renderscript.Allocation va , int slot ) { mRS.validate ( ) ; if ( va != null ) { mRS.nScriptBindAllocation ( getID ( mRS ) , va.getID ( mRS ) , slot , mUseIncSupp ) ; } else { mRS.nScriptBindAllocation ( getID ( mRS ) , 0 , slot , mUseIncSupp ) ; } }
Source:
public void testSetFailureHandler ( ) { final java.util.concurrent.atomic.AtomicBoolean handled = new java.util.concurrent.atomic.AtomicBoolean ( false ) ; android.support.test.espresso.Espresso.setFailureHandler ( new android.support.test.espresso.FailureHandler ( ) { @ java.lang.Override public void handle ( java.lang.Throwable error , org.hamcrest.Matcher < android.view.View > viewMatcher ) { handled.set ( true ) ; } } ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withText ( "does not exist" ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; assertTrue ( handled.get ( ) ) ; }

Target:
public void setFailureHandler ( ) { final java.util.concurrent.atomic.AtomicBoolean handled = new java.util.concurrent.atomic.AtomicBoolean ( false ) ; android.support.test.espresso.Espresso.setFailureHandler ( new android.support.test.espresso.FailureHandler ( ) { @ java.lang.Override public void handle ( java.lang.Throwable error , org.hamcrest.Matcher < android.view.View > viewMatcher ) { handled.set ( true ) ; } } ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withText ( "does not exist" ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; org.junit.Assert.assertTrue ( handled.get ( ) ) ; }
Source:
public void dumpShowsLastFailureTraceAndPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #1" ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #2" ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #1" ) ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #2" ) ) ; }

Target:
public void dumpShowsFailureTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }
Source:
void updateIndex ( int offset , com.android.dx.merge.IndexMap indexMap , int oldIndex , int newIndex ) { indexMap.protoIds [ oldIndex ] = ( ( short ) ( newIndex ) ) ; }

Target:
void updateIndex ( int offset , com.android.dx.merge.IndexMap indexMap , int oldIndex , int newIndex ) { if ( ( newIndex < 0 ) || ( newIndex > 65535 ) ) { throw new java.lang.IllegalArgumentException ( ( "proto ID not in [0, 0xffff]: " + newIndex ) ) ; } indexMap.protoIds [ oldIndex ] = ( ( short ) ( newIndex ) ) ; }
Source:
boolean isInProximity ( double latitude , double longitude ) { android.location.Location loc = new android.location.Location ( "" ) ; loc.setLatitude ( latitude ) ; loc.setLongitude ( longitude ) ; double radius = loc.distanceTo ( mLocation ) ; return radius <= ( mRadius ) ; }

Target:
boolean isInProximity ( double latitude , double longitude , float accuracy ) { android.location.Location loc = new android.location.Location ( "" ) ; loc.setLatitude ( latitude ) ; loc.setLongitude ( longitude ) ; double radius = loc.distanceTo ( mLocation ) ; return radius <= ( java.lang.Math.max ( mRadius , accuracy ) ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeIntArray ( mFeatures.stream ( ) . mapToInt ( ( i ) -> i ) . toArray ( ) ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair [ ] featureSlotPairs = new android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair [ mFeatures.size ( ) ] ; mFeatures.toArray ( featureSlotPairs ) ; dest.writeInt ( featureSlotPairs.length ) ; for ( android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair featureSlotPair : featureSlotPairs ) { dest.writeInt ( featureSlotPair.slotId ) ; dest.writeInt ( featureSlotPair.featureType ) ; } }
Source:
public void testHasExtraDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( ) . putExtra ( "key1" , "value1" ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key1" , "value2" ) . matches ( intent ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key2" , "value1" ) . matches ( intent ) ) ; }

Target:
public void hasExtraDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( ) . putExtra ( "key1" , "value1" ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key1" , "value2" ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key2" , "value1" ) . matches ( intent ) ) ; }
Source:
protected com.android.internal.telephony.SMSDispatcher.SmsTracker getSmsTracker ( java.util.HashMap < java.lang.String , java.lang.Object > data , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , java.lang.String format , android.net.Uri messageUri , boolean isExpectMore , java.lang.String fullMessageText , boolean isText , boolean persistMessage ) { return getSmsTracker ( data , sentIntent , deliveryIntent , format , null , null , messageUri , null , isExpectMore , fullMessageText , isText , persistMessage ) ; }

Target:
public void sendRetrySms ( com.android.internal.telephony.SMSDispatcher.SmsTracker tracker ) { if ( ( mSmsDispatchersController ) != null ) { mSmsDispatchersController.sendRetrySms ( tracker ) ; } else { android.telephony.Rlog.e ( com.android.internal.telephony.SMSDispatcher.TAG , ( ( mSmsDispatchersController ) + " is null. Retry failed" ) ) ; } }
Source:
public void testDebug ( ) { com.android.builder.BuildType type = new com.android.builder.BuildType ( "debug" ) ; assertTrue ( type.isDebuggable ( ) ) ; assertTrue ( type.isDebugJniBuild ( ) ) ; assertTrue ( type.isDebugSigned ( ) ) ; }

Target:
public void testDebug ( ) { com.android.builder.BuildType type = new com.android.builder.BuildType ( "debug" ) ; assertTrue ( type.isDebuggable ( ) ) ; assertTrue ( type.isDebugJniBuild ( ) ) ; assertNotNull ( type.getKeystore ( ) ) ; assertTrue ( type.getKeystore ( ) . isSigningReady ( ) ) ; }
Source:
public void removeParticipants ( java.lang.String [ ] participants ) throws com.android.ims.ImsException { logi ( ( "removeParticipants :: session=" + ( mSession ) ) ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "removeParticipants :: " ) ; throw new com.android.ims.ImsException ( "No call session" , ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } mSession.removeParticipants ( participants ) ; } }

Target:
public void removeParticipants ( java.lang.String [ ] participants ) throws com.android.ims.ImsException { logi ( ( "removeParticipants :: session=" + ( mSession ) ) ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "removeParticipants :: " ) ; throw new com.android.ims.ImsException ( "No call session" , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } mSession.removeParticipants ( participants ) ; } }
Source:
public void subTask ( java.lang.String name ) { }

Target:
public void createConfigFile ( ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog dialog = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog ( mConfigChooser.getShell ( ) , mEditedFile.getName ( ) , mConfigChooser.getConfiguration ( ) . getFullConfig ( ) ) ; if ( ( dialog.open ( ) ) != ( org.eclipse.jface.window.Window.OK ) ) { return ; } com.android.ide.common.resources.configuration.FolderConfiguration config = new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; dialog.getConfiguration ( config ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob job = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob ( this , mEditedFile , config ) ; job.schedule ( ) ; }
Source:
public void setModel ( com.android.uiautomator.UiAutomatorModel model , java.io.File modelBackingFile , org.eclipse.swt.graphics.Image screenshot ) { mModel = model ; mModelFile = modelBackingFile ; if ( ( mScreenshot ) != null ) { mScreenshot.dispose ( ) ; } mScreenshot = screenshot ; redrawScreenshot ( ) ; com.android.uiautomator.tree.BasicTreeNode wrapper = new com.android.uiautomator.tree.BasicTreeNode ( ) ; wrapper.addChild ( mModel.getXmlRootNode ( ) ) ; setInputHierarchy ( wrapper ) ; mTreeViewer.getTree ( ) . setFocus ( ) ; }

Target:
public void setModel ( com.android.uiautomator.UiAutomatorModel model , java.io.File modelBackingFile , org.eclipse.swt.graphics.Image screenshot ) { mModel = model ; mModelFile = modelBackingFile ; if ( ( mScreenshot ) != null ) { mScreenshot.dispose ( ) ; } mScreenshot = screenshot ; clearSearchResult ( ) ; redrawScreenshot ( ) ; com.android.uiautomator.tree.BasicTreeNode wrapper = new com.android.uiautomator.tree.BasicTreeNode ( ) ; wrapper.addChild ( mModel.getXmlRootNode ( ) ) ; setInputHierarchy ( wrapper ) ; mTreeViewer.getTree ( ) . setFocus ( ) ; }
Source:
public void test_parkUntil_3 ( ) { tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( true , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }

Target:
public void test_parkUntil_3 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }
Source:
android.icu.text.NFRuleSet findRuleSet ( java.lang.String name ) throws java.lang.IllegalArgumentException { for ( int i = 0 ; i < ( ruleSets.length ) ; i ++ ) { if ( ruleSets [ i ] . getName ( ) . equals ( name ) ) { return ruleSets [ i ] ; } } throw new java.lang.IllegalArgumentException ( ( "No rule set named " + name ) ) ; }

Target:
android.icu.text.NFRuleSet findRuleSet ( java.lang.String name ) throws java.lang.IllegalArgumentException { android.icu.text.NFRuleSet result = ruleSetsMap.get ( name ) ; if ( result == null ) { throw new java.lang.IllegalArgumentException ( ( "No rule set named " + name ) ) ; } return result ; }
Source:
public final void readAnnotation ( ) { int typeIndex = com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ; int size = com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ; visitAnnotation ( typeIndex , size ) ; for ( int i = 0 ; i < size ; i ++ ) { visitAnnotationName ( com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ) ; readValue ( ) ; } }

Target:
public int peek ( ) { if ( ( type ) == ( com.android.dx.io.EncodedValueReader.MUST_READ ) ) { int argAndType = ( in.readByte ( ) ) & 255 ; type = argAndType & 31 ; arg = ( argAndType & 224 ) > > 5 ; } return type ; }
Source:
private static com.ibm.icu.text.MeasureFormat.NumericFormatters loadNumericFormatters ( com.ibm.icu.util.ULocale locale ) { com.ibm.icu.impl.ICUResourceBundle r = ( ( com.ibm.icu.impl.ICUResourceBundle ) ( com.ibm.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , locale ) ) ) ; return new com.ibm.icu.text.MeasureFormat.NumericFormatters ( com.ibm.icu.text.MeasureFormat.loadNumericDurationFormat ( r , "hm" ) , com.ibm.icu.text.MeasureFormat.loadNumericDurationFormat ( r , "ms" ) , com.ibm.icu.text.MeasureFormat.loadNumericDurationFormat ( r , "hms" ) ) ; }

Target:
private static com.ibm.icu.text.MeasureFormat.NumericFormatters loadNumericFormatters ( com.ibm.icu.util.ULocale locale ) { com.ibm.icu.impl.ICUResourceBundle r = ( ( com.ibm.icu.impl.ICUResourceBundle ) ( com.ibm.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_UNIT_BASE_NAME , locale ) ) ) ; return new com.ibm.icu.text.MeasureFormat.NumericFormatters ( com.ibm.icu.text.MeasureFormat.loadNumericDurationFormat ( r , "hm" ) , com.ibm.icu.text.MeasureFormat.loadNumericDurationFormat ( r , "ms" ) , com.ibm.icu.text.MeasureFormat.loadNumericDurationFormat ( r , "hms" ) ) ; }
Source:
public static final int getHeaderSize ( @ javax.annotation.Nonnegative int apiLevel ) { return ( ( ( 8 * ( com.android.jack.dx.dex.SizeOf.UBYTE ) ) + ( com.android.jack.dx.dex.SizeOf.UINT ) ) + ( com.android.jack.dx.dex.SizeOf.SIGNATURE ) ) + ( 20 * ( com.android.jack.dx.dex.SizeOf.UINT ) ) ; }

Target:
public static final int getHeaderSize ( @ javax.annotation.Nonnegative int apiLevel ) { int headerSize = ( ( ( 8 * ( com.android.jack.dx.dex.SizeOf.UBYTE ) ) + ( com.android.jack.dx.dex.SizeOf.UINT ) ) + ( com.android.jack.dx.dex.SizeOf.SIGNATURE ) ) + ( 20 * ( com.android.jack.dx.dex.SizeOf.UINT ) ) ; if ( apiLevel >= ( DexFormat.API_ANDROID_O ) ) { headerSize += 2 * ( com.android.jack.dx.dex.SizeOf.UINT ) ; } return headerSize ; }
Source:
public boolean onKeyUp ( final int keyCode , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyUp ( keyCode , event ) ; } } ) ; return ret ; } return mAwContents.onKeyUp ( keyCode , event ) ; }

Target:
public boolean onKeyDown ( final int keyCode , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyDown ( keyCode , event ) ; } } ) ; return ret ; } com.android.webview.chromium.UnimplementedWebViewApi.invoke ( ) ; return false ; }
Source:
public void startDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , ( ( "startDtmf called with invalid character '" + c ) + "'" ) ) ; } else { mCM.startDtmf ( c , null ) ; } }

Target:
public void startDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , ( ( "startDtmf called with invalid character '" + c ) + "'" ) ) ; } else { mCi.startDtmf ( c , null ) ; } }
Source:
public void testDismissKeyguard_fromShowWhenLocked_notAllowed ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; executeShellCommand ( "am broadcast -a trigger_broadcast --ez dismissKeyguard true" ) ; assertShowingAndOccluded ( ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; }

Target:
public void testKeyguardLock ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "KeyguardLockActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "KeyguardLockActivity" } ) ; mAmWmState.assertVisibility ( "KeyguardLockActivity" , true ) ; executeShellCommand ( android.server.cts.FINISH_ACTIVITY_BROADCAST ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; }
Source:
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 ( ) ; fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }

Target:
public void testGetContentLengthConnects ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "ABC" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; org.junit.Assert.assertEquals ( 3 , connection.getContentLength ( ) ) ; connection.disconnect ( ) ; }
Source:
public void systemReady ( ) { mSystemReady = true ; boolean compatibilityModeEnabled = ( android.provider.Settings.System.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.System.COMPATIBILITY_MODE , 1 ) ) == 1 ; android.content.pm.PackageParser.setCompatibilityModeEnabled ( compatibilityModeEnabled ) ; if ( com.android.server.pm.PackageManagerService.DEBUG_SETTINGS ) { android.util.Log.d ( com.android.server.pm.PackageManagerService.TAG , ( "compatibility mode:" + compatibilityModeEnabled ) ) ; } }

Target:
private int getUnknownSourcesSettings ( ) { return android.provider.Settings.Global.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.Global.INSTALL_NON_MARKET_APPS , ( - 1 ) ) ; }
Source:
private void onRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRoamingOff" ) ; if ( ! ( mDataEnabledSettings.isUserDataEnabled ( ) ) ) return ; if ( ( getDataOnRoamingEnabled ( ) ) == false ) { notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }

Target:
private void onDataRoamingOnOrSettingsChanged ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOnOrSettingsChanged" ) ; if ( ! ( mPhone.getServiceState ( ) . getDataRoaming ( ) ) ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "device is not roaming. ignored the request." ) ; return ; } if ( getDataRoamingEnabled ( ) ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOnOrSettingsChanged: setup data on roaming" ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_ON ) ; notifyDataConnection ( Phone.REASON_ROAMING_ON ) ; } else { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOnOrSettingsChanged: Tear down data connection on roaming." ) ; cleanUpAllConnections ( true , Phone.REASON_ROAMING_ON ) ; notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_ON ) ; } }
Source:
private void postIcon ( ) { if ( ( mState ) == ( com.android.internal.telephony.gsm.stk.IconLoader.STATE_SINGLE_ICON ) ) { mEndMsg.obj = mCurrentIcon ; mEndMsg.sendToTarget ( ) ; } else if ( ( mState ) == ( com.android.internal.telephony.gsm.stk.IconLoader.STATE_MULTI_ICONS ) ) { mIcons [ ( ( mCurrentRecordIndex ) ++ ) ] = mCurrentIcon ; if ( ( mCurrentRecordIndex ) < ( mRecordNumbers.length ) ) { startLoadingIcon ( mRecordNumbers [ mCurrentRecordIndex ] ) ; } else { mEndMsg.obj = mIcons ; mEndMsg.sendToTarget ( ) ; } } }

Target:
private void postIcon ( ) { if ( ( mState ) == ( com.android.internal.telephony.cat.IconLoader.STATE_SINGLE_ICON ) ) { mEndMsg.obj = mCurrentIcon ; mEndMsg.sendToTarget ( ) ; } else if ( ( mState ) == ( com.android.internal.telephony.cat.IconLoader.STATE_MULTI_ICONS ) ) { mIcons [ ( ( mCurrentRecordIndex ) ++ ) ] = mCurrentIcon ; if ( ( mCurrentRecordIndex ) < ( mRecordNumbers.length ) ) { startLoadingIcon ( mRecordNumbers [ mCurrentRecordIndex ] ) ; } else { mEndMsg.obj = mIcons ; mEndMsg.sendToTarget ( ) ; } } }