auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( device ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.getModel ( ) . setData ( device , screenshotImage , viewNode ) ; } } }

Target:
public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( hvDevice ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.models.ViewNode viewNode = hvDevice.loadWindowData ( com.android.hierarchyviewerlib.models.Window.getFocusedWindow ( hvDevice ) ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.getModel ( ) . setData ( hvDevice.getDevice ( ) , screenshotImage , viewNode ) ; } } }
Source:
public void onServiceStateChanged ( android.telephony.ServiceState serviceState ) { int newState = serviceState.getState ( ) ; if ( ( newState == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) && ( ( mServiceState ) != newState ) ) { tearDownAccounts ( ) ; setupAccounts ( ) ; } mServiceState = newState ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { com.android.services.telephony.Log.i ( this , "User changed, re-registering phone accounts." ) ; int userHandleId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; android.os.UserHandle currentUserHandle = new android.os.UserHandle ( userHandleId ) ; mIsPrimaryUser = android.os.UserManager.get ( mContext ) . getPrimaryUser ( ) . getUserHandle ( ) . equals ( currentUserHandle ) ; tearDownAccounts ( ) ; setupAccounts ( ) ; }
Source:
public void test_addSubjectAlternativeNameLintLjava_lang_String ( ) { int [ ] types = new int [ ] { org.apache.harmony.security.x509.GeneralName.OTHER_NAME , org.apache.harmony.security.x509.GeneralName.DNS_NAME , org.apache.harmony.security.x509.GeneralName.X400_ADDR , org.apache.harmony.security.x509.GeneralName.DIR_NAME , org.apache.harmony.security.x509.GeneralName.EDIP_NAME , org.apache.harmony.security.x509.GeneralName.UR_ID , org.apache.harmony.security.x509.GeneralName.IP_ADDR , org.apache.harmony.security.x509.GeneralName.REG_ID } ; for ( int i = 0 ; i < ( types.length ) ; i ++ ) { try { new java.security.cert.X509CertSelector ( ) . addSubjectAlternativeName ( types [ i ] , "-0xDFRF" ) ; fail ( ( "IOException expected for type: " + ( types [ i ] ) ) ) ; } catch ( java.io.IOException expected ) { } } }

Target:
public void test_addSubjectAlternativeNameLintLjava_lang_String ( ) { int [ ] types = new int [ ] { sun.security.x509.GeneralNameInterface.NAME_ANY , sun.security.x509.GeneralNameInterface.NAME_RFC822 , sun.security.x509.GeneralNameInterface.NAME_DNS , sun.security.x509.GeneralNameInterface.NAME_X400 , sun.security.x509.GeneralNameInterface.NAME_DIRECTORY , sun.security.x509.GeneralNameInterface.NAME_EDI , sun.security.x509.GeneralNameInterface.NAME_URI , sun.security.x509.GeneralNameInterface.NAME_IP , sun.security.x509.GeneralNameInterface.NAME_OID } ; for ( int i = 0 ; i < ( types.length ) ; i ++ ) { try { new java.security.cert.X509CertSelector ( ) . addSubjectAlternativeName ( types [ i ] , "-0xDFRF" ) ; fail ( ( "IOException expected for type: " + ( types [ i ] ) ) ) ; } catch ( java.io.IOException expected ) { } } }
Source:
public void testInjectSms ( ) { transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifySmsIntentBroadcasts ( 0 ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verify ( mContext , times ( 2 ) ) . sendBroadcast ( any ( android.content.Intent.class ) ) ; assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }

Target:
public void testInjectSms ( ) { transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifySmsIntentBroadcasts ( 0 ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; org.mockito.Mockito.verify ( mContext , org.mockito.Mockito.times ( 2 ) ) . sendBroadcast ( org.mockito.Matchers.any ( android.content.Intent.class ) ) ; org.junit.Assert.assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }
Source:
synchronized void nAllocationData1D ( long id , int off , int mip , int count , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData1D ( mContext , id , off , mip , count , d , sizeBytes ) ; }

Target:
synchronized void nScriptInvokeV ( long id , int slot , byte [ ] params , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptInvokeV ( curCon , id , slot , params , mUseInc ) ; }
Source:
public static com.android.jack.Options buildCommandLineArgs ( @ javax.annotation.Nonnull java.io.File fileOrSourcelist , @ javax.annotation.CheckForNull java.io.File jarjarRules ) throws java.io.IOException { com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( null , new java.io.File [ ] { fileOrSourcelist } ) ; if ( jarjarRules != null ) { options.setJarjarRulesFile ( jarjarRules ) ; } return options ; }

Target:
public static com.android.jack.Options buildCommandLineArgs ( @ javax.annotation.Nonnull java.io.File fileOrSourcelist , @ javax.annotation.Nonnull java.util.List < java.io.File > jarjarRules ) throws java.io.IOException { com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( null , new java.io.File [ ] { fileOrSourcelist } ) ; options.setJarjarRulesFiles ( jarjarRules ) ; return options ; }
Source:
public java.util.List < android.bluetooth.BluetoothDevice > getDevicesMatchingConnectionStates ( int [ ] states ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "getDevicesMatchingConnectionStates(): states=" + ( java.util.Arrays.toString ( states ) ) ) ) ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { return service.getDevicesMatchingConnectionStates ( states ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getDevicesMatchingConnectionStates ( int [ ] states ) { android.util.Log.v ( android.bluetooth.BluetoothHidDevice.TAG , ( "getDevicesMatchingConnectionStates(): states=" + ( java.util.Arrays.toString ( states ) ) ) ) ; final android.bluetooth.IBluetoothHidDevice service = mService ; if ( service != null ) { try { return service.getDevicesMatchingConnectionStates ( states ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHidDevice.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHidDevice.TAG , "Proxy not attached to service" ) ; } return new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; }
Source:
private com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode addUnknownAttribute ( java.lang.String xmlFullName , java.lang.String xmlAttrLocalName , java.lang.String xmlNsUri ) { com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor ( xmlAttrLocalName , xmlFullName , xmlNsUri , "Unknown XML attribute" , new com.android.ide.eclipse.adt.internal.resources.AttributeInfo ( xmlAttrLocalName , new com.android.ide.eclipse.adt.editors.layout.gscripts.IAttributeInfo.Format [ ] { com.android.ide.eclipse.adt.editors.layout.gscripts.IAttributeInfo.Format.STRING } ) ) ; com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode uiAttr = desc.createUiNode ( this ) ; mUnknownUiAttributes.add ( uiAttr ) ; return uiAttr ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode addUnknownAttribute ( java.lang.String xmlFullName , java.lang.String xmlAttrLocalName , java.lang.String xmlNsUri ) { com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor ( xmlAttrLocalName , xmlFullName , xmlNsUri , "Unknown XML attribute" , new com.android.ide.eclipse.adt.internal.resources.AttributeInfo ( xmlAttrLocalName , new com.android.ide.eclipse.adt.editors.layout.gscripts.IAttributeInfo.Format [ ] { com.android.ide.eclipse.adt.editors.layout.gscripts.IAttributeInfo.Format.STRING } ) ) ; com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode uiAttr = desc.createUiNode ( this ) ; uiAttr.setDirty ( true ) ; mUnknownUiAttributes.add ( uiAttr ) ; return uiAttr ; }
Source:
public void spliceOperationsFrom ( android.net.NetworkStats stats ) { for ( int i = 0 ; i < ( size ) ; i ++ ) { final int j = stats.findIndex ( iface [ i ] , uid [ i ] , set [ i ] , tag [ i ] , roaming [ i ] ) ; if ( j == ( - 1 ) ) { operations [ i ] = 0 ; } else { operations [ i ] = stats.operations [ j ] ; } } }

Target:
public void spliceOperationsFrom ( android.net.NetworkStats stats ) { for ( int i = 0 ; i < ( size ) ; i ++ ) { final int j = stats.findIndex ( iface [ i ] , uid [ i ] , set [ i ] , tag [ i ] , metered [ i ] , roaming [ i ] ) ; if ( j == ( - 1 ) ) { operations [ i ] = 0 ; } else { operations [ i ] = stats.operations [ j ] ; } } }
Source:
public void onStop ( ) { super . onStop ( ) ; com.android.dialer.common.LogUtil.i ( "AnswerFragment.onStop" , null ) ; handler.removeCallbacks ( swipeHintRestoreTimer ) ; if ( ( answerVideoCallScreen ) != null ) { answerVideoCallScreen.onVideoScreenStop ( ) ; } }

Target:
public void onStop ( ) { android.os.Trace.beginSection ( "AnswerFragment.onStop" ) ; super . onStop ( ) ; com.android.dialer.common.LogUtil.i ( "AnswerFragment.onStop" , null ) ; handler.removeCallbacks ( swipeHintRestoreTimer ) ; if ( ( answerVideoCallScreen ) != null ) { answerVideoCallScreen.onVideoScreenStop ( ) ; } android.os.Trace.endSection ( ) ; }
Source:
public boolean supports ( com.android.ide.common.rendering.api.Capability capability ) { if ( ( mBridge ) != null ) { return mBridge.getCapabilities ( ) . contains ( capability ) ; } if ( ( mLegacyBridge ) != null ) { switch ( capability ) { case UNBOUND_RENDERING : return ( getLegacyApiLevel ( ) ) == 4 ; } } return false ; }

Target:
public boolean supports ( com.android.ide.common.rendering.api.Capability capability ) { return supports ( capability.ordinal ( ) ) ; }
Source:
private void makeOptionsObjects ( ) { cfOptions = new com.android.dx.dex.cf.CfOptions ( ) ; cfOptions.positionInfo = positionInfo ; cfOptions.localInfo = localInfo ; cfOptions.strictNameCheck = strictNameCheck ; cfOptions.optimize = optimize ; cfOptions.optimizeListFile = optimizeListFile ; cfOptions.dontOptimizeListFile = dontOptimizeListFile ; cfOptions.statistics = statistics ; cfOptions.warn = com.android.dx.command.DxConsole.err ; dexOptions = new com.android.dx.dex.DexOptions ( ) ; dexOptions.forceJumbo = forceJumbo ; }

Target:
private void makeOptionsObjects ( ) { cfOptions = new com.android.dx.dex.cf.CfOptions ( ) ; cfOptions.positionInfo = positionInfo ; cfOptions.localInfo = localInfo ; cfOptions.strictNameCheck = strictNameCheck ; cfOptions.optimize = optimize ; cfOptions.optimizeListFile = optimizeListFile ; cfOptions.dontOptimizeListFile = dontOptimizeListFile ; cfOptions.statistics = statistics ; if ( warnings ) { cfOptions.warn = com.android.dx.command.DxConsole.err ; } else { cfOptions.warn = com.android.dx.command.DxConsole.noop ; } dexOptions = new com.android.dx.dex.DexOptions ( ) ; dexOptions.forceJumbo = forceJumbo ; }
Source:
public void test_getLocalSocketAddress_unbound ( ) throws java.lang.Exception { int portNumber = tests.support.Support_PortManager.getNextPortForUDP ( ) ; java.net.InetSocketAddress localAddress1 = new java.net.InetSocketAddress ( java.net.InetAddress.getLocalHost ( ) , portNumber ) ; java.net.DatagramSocket s = new java.net.DatagramSocket ( localAddress1 ) ; assertEquals ( localAddress1 , s.getLocalSocketAddress ( ) ) ; s.close ( ) ; java.net.InetSocketAddress remoteAddress = ( ( java.net.InetSocketAddress ) ( s.getRemoteSocketAddress ( ) ) ) ; assertNull ( remoteAddress ) ; }

Target:
public void test_getLocalSocketAddress_unbound ( ) throws java.lang.Exception { java.net.InetSocketAddress localAddress1 = new java.net.InetSocketAddress ( java.net.InetAddress.getLocalHost ( ) , 0 ) ; java.net.DatagramSocket s = new java.net.DatagramSocket ( localAddress1 ) ; assertEquals ( localAddress1.getAddress ( ) , s.getLocalAddress ( ) ) ; s.close ( ) ; java.net.InetSocketAddress remoteAddress = ( ( java.net.InetSocketAddress ) ( s.getRemoteSocketAddress ( ) ) ) ; assertNull ( remoteAddress ) ; }
Source:
public void run ( ) { handleApplicationWtfInner ( callingUid , callingPid , app , tag , crashInfo ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.i ( com.android.server.am.ActivityManagerService.TAG , "Shutting down activity manager..." ) ; shutdown ( 10000 ) ; android.util.Log.i ( com.android.server.am.ActivityManagerService.TAG , "Shutdown complete, restarting!" ) ; java.lang.Process.killProcess ( java.lang.Process.myPid ( ) ) ; java.lang.System.exit ( 10 ) ; }
Source:
public java.lang.String getIanaVersion ( ) { try ( java.io.Reader reader = xmlSource.get ( ) ) { org.xmlpull.v1.XmlPullParserFactory xmlPullParserFactory = org.xmlpull.v1.XmlPullParserFactory.newInstance ( ) ; xmlPullParserFactory.setNamespaceAware ( false ) ; org.xmlpull.v1.XmlPullParser parser = xmlPullParserFactory.newPullParser ( ) ; parser.setInput ( reader ) ; libcore.util.TimeZoneFinder.findRequiredStartTag ( parser , libcore.util.TimeZoneFinder.TIMEZONES_ELEMENT ) ; return parser.getAttributeValue ( null , libcore.util.TimeZoneFinder.IANA_VERSION_ATTRIBUTE ) ; } catch ( org.xmlpull.v1.XmlPullParserException | java.io.IOException e ) { return null ; } }

Target:
public boolean processHeader ( java.lang.String ianaVersion ) throws org.xmlpull.v1.XmlPullParserException { this . ianaVersion = ianaVersion ; return libcore.util.TimeZoneFinder.TimeZonesProcessor.HALT ; }
Source:
private java.lang.String format ( long number , android.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; ruleSet.format ( number , result , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }

Target:
private java.lang.String format ( double number , android.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; if ( ( getRoundingMode ( ) ) != ( android.icu.math.BigDecimal.ROUND_UNNECESSARY ) ) { number = new android.icu.math.BigDecimal ( java.lang.Double.toString ( number ) ) . setScale ( getMaximumFractionDigits ( ) , roundingMode ) . doubleValue ( ) ; } ruleSet.format ( number , result , 0 , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }
Source:
public void testAbiOnlyWithMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testAbiOnlyWithMultiMatch2 ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 2 ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 3 ) ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" , "bar" ) ; assertEquals ( match , result ) ; }
Source:
public void testTelephonyFeatures ( ) { int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : assertAvailable ( PackageManager.FEATURE_TELEPHONY ) ; assertAvailable ( PackageManager.FEATURE_TELEPHONY_GSM ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : assertAvailable ( PackageManager.FEATURE_TELEPHONY ) ; assertAvailable ( PackageManager.FEATURE_TELEPHONY_CDMA ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : assertNotAvailable ( PackageManager.FEATURE_TELEPHONY ) ; assertNotAvailable ( PackageManager.FEATURE_TELEPHONY_CDMA ) ; assertNotAvailable ( PackageManager.FEATURE_TELEPHONY_GSM ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }

Target:
public void testTelephonyFeatures ( ) { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) ) { return ; } int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : assertAvailable ( PackageManager.FEATURE_TELEPHONY_GSM ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : assertAvailable ( PackageManager.FEATURE_TELEPHONY_CDMA ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : fail ( "FEATURE_TELEPHONY is present; phone type should not be PHONE_TYPE_NONE" ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }
Source:
public java.lang.String [ ] getIsimPcscf ( ) throws android.os.RemoteException { com.android.internal.telephony.Phone phone = getPhone ( getDefaultSubscription ( ) ) ; mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimPcscf ( ) ; } else { return null ; } }

Target:
public java.lang.String [ ] getIsimImpu ( int subId ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimImpu ( ) ; } else { return null ; } } else { loge ( ( "getIsimImpu phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "hitCount" , hitCount ) . add ( "missCount" , missCount ) . add ( "loadSuccessCount" , loadSuccessCount ) . add ( "loadExceptionCount" , loadExceptionCount ) . add ( "totalLoadTime" , totalLoadTime ) . add ( "evictionCount" , evictionCount ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { return com.google.common.base.MoreObjects.toStringHelper ( this ) . add ( "hitCount" , hitCount ) . add ( "missCount" , missCount ) . add ( "loadSuccessCount" , loadSuccessCount ) . add ( "loadExceptionCount" , loadExceptionCount ) . add ( "totalLoadTime" , totalLoadTime ) . add ( "evictionCount" , evictionCount ) . toString ( ) ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; com.android.cts.verifier.TestListAdapter adapter = new com.android.cts.verifier.TestListAdapter ( this ) ; setListAdapter ( adapter ) ; com.android.cts.verifier.TestListActivity.TestResultContentObserver observer = new com.android.cts.verifier.TestListActivity.TestResultContentObserver ( adapter ) ; android.content.ContentResolver resolver = getContentResolver ( ) ; resolver.registerContentObserver ( TestResultsProvider.CONTENT_URI , true , observer ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; com.android.cts.verifier.TestListAdapter adapter = new com.android.cts.verifier.TestListAdapter ( this ) ; setListAdapter ( adapter ) ; com.android.cts.verifier.TestListActivity.TestResultContentObserver observer = new com.android.cts.verifier.TestListActivity.TestResultContentObserver ( adapter ) ; android.content.ContentResolver resolver = getContentResolver ( ) ; resolver.registerContentObserver ( TestResultsProvider.RESULTS_CONTENT_URI , true , observer ) ; }
Source:
public void checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = null ; javax.net.ssl.SSLParameters parameters = null ; if ( socket instanceof javax.net.ssl.SSLSocket ) { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( socket ) ) ; session = org.conscrypt.TrustManagerImpl.getHandshakeSessionOrThrow ( sslSocket ) ; parameters = sslSocket.getSSLParameters ( ) ; } checkTrusted ( chain , authType , session , parameters , false ) ; }

Target:
public java.util.List < java.security.cert.X509Certificate > getTrustedChainForServer ( java.security.cert.X509Certificate [ ] certs , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = null ; javax.net.ssl.SSLParameters parameters = null ; if ( socket instanceof javax.net.ssl.SSLSocket ) { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( socket ) ) ; session = org.conscrypt.TrustManagerImpl.getHandshakeSessionOrThrow ( sslSocket ) ; parameters = sslSocket.getSSLParameters ( ) ; } return checkTrusted ( certs , authType , session , parameters , false ) ; }
Source:
int getBuildApi ( ) { if ( ( project ) == null ) { return - 1 ; } com.android.ide.eclipse.adt.internal.editors.manifest.ManifestInfo manifest = com.android.ide.eclipse.adt.internal.editors.manifest.ManifestInfo.get ( project ) ; return manifest.getMinSdkVersion ( ) ; }

Target:
int getBuildApi ( ) { if ( ( project ) == null ) { return - 1 ; } com.android.sdklib.IAndroidTarget target = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTarget ( project ) ; if ( target != null ) { return target.getVersion ( ) . getApiLevel ( ) ; } return getMinSdk ( ) ; }
Source:
public void testAesCbcHmacMd5Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1000 , false ) ; }
Source:
public java.nio.ByteBuffer putShort ( int index , short value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.SHORT ) ; this . block.pokeShort ( ( ( offset ) + index ) , value , order ) ; return this ; }

Target:
private void checkIsAccessible ( ) { checkNotFreed ( ) ; if ( ! ( block.isAccessible ( ) ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } }
Source:
public boolean isMultipleAdvertisementSupported ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return false ; try { return mService.isMultiAdvertisementSupported ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "failed to get isMultipleAdvertisementSupported, error: " , e ) ; } return false ; }

Target:
public boolean isMultipleAdvertisementSupported ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return false ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.isMultiAdvertisementSupported ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "failed to get isMultipleAdvertisementSupported, error: " , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return false ; }
Source:
public java.io.FileDescriptor socket ( int domain , int type , int protocol ) throws android.system.ErrnoException { return tagSocket ( os.socket ( domain , type , protocol ) ) ; }

Target:
public java.io.FileDescriptor socket ( int domain , int type , int protocol ) throws android.system.ErrnoException { final java.io.FileDescriptor fd = os.socket ( domain , type , protocol ) ; if ( ( domain != ( AF_UNIX ) ) && ( domain != ( AF_NETLINK ) ) ) { tagSocket ( fd ) ; } return fd ; }
Source:
public void testDefaultDisconnectedState ( ) { com.android.bluetooth.hfpclient.HeadsetClientService mockService = mock ( com.android.bluetooth.hfpclient.HeadsetClientService.class ) ; android.media.AudioManager mockAudioManager = mock ( android.media.AudioManager.class ) ; when ( mockService.getSystemService ( Context.AUDIO_SERVICE ) ) . thenReturn ( mockAudioManager ) ; com.android.bluetooth.hfpclient.HeadsetClientStateMachine mockSM = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine ( mockService , getContext ( ) . getMainLooper ( ) ) ; assertEquals ( mockSM.getConnectionState ( ( ( android.bluetooth.BluetoothDevice ) ( null ) ) ) , BluetoothProfile.STATE_DISCONNECTED ) ; }

Target:
public void testDefaultDisconnectedState ( ) { com.android.bluetooth.hfpclient.HeadsetClientService mockService = mock ( com.android.bluetooth.hfpclient.HeadsetClientService.class ) ; android.media.AudioManager mockAudioManager = mock ( android.media.AudioManager.class ) ; when ( mockService.getSystemService ( Context.AUDIO_SERVICE ) ) . thenReturn ( mockAudioManager ) ; com.android.bluetooth.hfpclient.HeadsetClientStateMachine mockSM = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine ( mockService , mTargetContext.getMainLooper ( ) ) ; org.junit.Assert.assertEquals ( mockSM.getConnectionState ( ( ( android.bluetooth.BluetoothDevice ) ( null ) ) ) , BluetoothProfile.STATE_DISCONNECTED ) ; }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; long literal = in.readLong ( ) ; return new com.android.jack.dx.io.instructions.OneRegisterDecodedInstruction ( this , opcode , 0 , null , 0 , literal , a ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; long literal = in.readLong ( ) ; return new com.android.jack.dx.io.instructions.OneRegisterDecodedInstruction ( this , opcode , 0 , com.android.jack.dx.io.IndexType.NONE , 0 , literal , a ) ; }
Source:
private static void assertIdent ( com.android.tools.metalava.doclava1.ApiFile.Tokenizer tokenizer , java.lang.String token ) throws com.android.tools.metalava.doclava1.ApiParseException { if ( ! ( com.android.tools.metalava.doclava1.ApiFile.isident ( token.charAt ( 0 ) ) ) ) { throw new com.android.tools.metalava.doclava1.ApiParseException ( ( "Expected identifier: " + token ) , tokenizer.getLine ( ) ) ; } }

Target:
private static boolean isIdent ( java.lang.String token ) { return com.android.tools.metalava.doclava1.ApiFile.isIdent ( token.charAt ( 0 ) ) ; }
Source:
public void onStartRtt ( @ android.support.annotation.NonNull com.android.dialer.simulator.impl.RttTextStream rttTextStream ) { com.android.dialer.common.LogUtil.enterBlock ( "SimulatorConnection.onStartRtt" ) ; onEvent ( new com.android.dialer.simulator.Simulator.Event ( com.android.dialer.simulator.Simulator.Event.START_RTT ) ) ; }

Target:
public void onStartRtt ( @ android.support.annotation.NonNull android.telecom.Connection.RttTextStream rttTextStream ) { com.android.dialer.common.LogUtil.enterBlock ( "SimulatorConnection.onStartRtt" ) ; if ( ( ( this . rttTextStream ) != null ) || ( ( rttChatBot ) != null ) ) { com.android.dialer.common.LogUtil.e ( "SimulatorConnection.onStartRtt" , "rttTextStream or rttChatBot is not null!" ) ; } this . rttTextStream = rttTextStream ; rttChatBot = new com.android.dialer.simulator.impl.RttChatBot ( rttTextStream ) ; rttChatBot.start ( ) ; onEvent ( new com.android.dialer.simulator.Simulator.Event ( com.android.dialer.simulator.Simulator.Event.START_RTT ) ) ; }
Source:
private void refreshSimBadInfo ( ) { final com.android.internal.telephony.SimCard.State simState = mUpdateMonitor.getSimState ( ) ; if ( simState == ( SimCard.State.PUK_REQUIRED ) ) { mHeaderSimBad1.setText ( R.string.lockscreen_sim_puk_locked_message ) ; mHeaderSimBad2.setText ( R.string.lockscreen_sim_puk_locked_instructions ) ; } else if ( simState == ( SimCard.State.ABSENT ) ) { mHeaderSimBad1.setText ( R.string.lockscreen_missing_sim_message ) ; mHeaderSimBad2.setVisibility ( View.GONE ) ; } else { mHeaderSimBad1.setVisibility ( View.GONE ) ; mHeaderSimBad2.setVisibility ( View.GONE ) ; } }

Target:
private void refreshSimBadInfo ( ) { final com.android.internal.telephony.IccCard.State simState = mUpdateMonitor.getSimState ( ) ; if ( simState == ( IccCard.State.PUK_REQUIRED ) ) { mHeaderSimBad1.setText ( R.string.lockscreen_sim_puk_locked_message ) ; mHeaderSimBad2.setText ( R.string.lockscreen_sim_puk_locked_instructions ) ; } else if ( simState == ( IccCard.State.ABSENT ) ) { mHeaderSimBad1.setText ( R.string.lockscreen_missing_sim_message ) ; mHeaderSimBad2.setVisibility ( View.GONE ) ; } else { mHeaderSimBad1.setVisibility ( View.GONE ) ; mHeaderSimBad2.setVisibility ( View.GONE ) ; } }
Source:
public void enter ( ) { if ( ! ( configureIfaceIp ( true ) ) ) { mLastError = android.net.ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR ; return ; } try { mNMService.tetherInterface ( mIfaceName ) ; } catch ( java.lang.Exception e ) { android.util.Log.e ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Error Tethering: " + ( e.toString ( ) ) ) ) ; mLastError = android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR ; return ; } if ( ! ( mIPv6TetherSvc.start ( ) ) ) { android.util.Log.e ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , "Failed to start IPv6TetheringInterfaceServices" ) ; return ; } }

Target:
public void enter ( ) { if ( ! ( configureIfaceIp ( true ) ) ) { mLastError = android.net.ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR ; return ; } try { mNMService.tetherInterface ( mIfaceName ) ; } catch ( java.lang.Exception e ) { mLog.e ( ( "Error Tethering: " + e ) ) ; mLastError = android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR ; return ; } if ( ! ( mIPv6TetherSvc.start ( ) ) ) { mLog.e ( "Failed to start IPv6TetheringInterfaceServices" ) ; return ; } }
Source:
private java.lang.String inputStreamToString ( java.io.InputStream in ) throws java.io.IOException { java.io.BufferedReader r = new java.io.BufferedReader ( new java.io.InputStreamReader ( in , java.nio.charset.StandardCharsets.UTF_8 ) ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String str = null ; while ( ( str = r.readLine ( ) ) != null ) { sb.append ( str ) ; } return sb.toString ( ) ; }

Target:
private java.lang.String inputStreamToString ( java.io.InputStream in ) throws java.io.IOException { java.io.BufferedReader r = new java.io.BufferedReader ( new java.io.InputStreamReader ( in , java.nio.charset.StandardCharsets.UTF_8 ) ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String str = null ; while ( ( str = r.readLine ( ) ) != null ) { sb.append ( str ) ; } r.close ( ) ; return sb.toString ( ) ; }
Source:
public void testEmptyGeneration ( ) { final java.lang.String expectedOutput = "<?xml version='1.0' encoding='UTF-8' ?>" + ( ( ( "<testsuite name=\"test\" tests=\"0\" failures=\"0\" errors=\"0\" time=\"1\" " + "timestamp=\"ignore\" hostname=\"localhost\"> " ) + "<properties />" ) + "</testsuite>" ) ; mResultReporter.testRunStarted ( "test" , 1 ) ; mResultReporter.testRunEnded ( 1 , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; assertEquals ( expectedOutput , getOutput ( ) ) ; }

Target:
public void testEmptyGeneration ( ) { final java.lang.String expectedOutput = "<?xml version='1.0' encoding='UTF-8' ?>" + ( ( ( "<testsuite name=\"test\" tests=\"0\" failures=\"0\" errors=\"0\" time=\"#TIMEVALUE#\" " + "timestamp=\"ignore\" hostname=\"localhost\"> " ) + "<properties />" ) + "</testsuite>" ) ; mResultReporter.testRunStarted ( "test" , 1 ) ; mResultReporter.testRunEnded ( 1 , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; java.lang.String output = getOutput ( ) ; java.lang.String time = getTime ( output ) ; assertNotNull ( time ) ; java.lang.String expectedTimedOutput = expectedOutput.replaceFirst ( "#TIMEVALUE#" , time ) ; assertEquals ( expectedTimedOutput , output ) ; }
Source:
public void testWificondExistsOnStartup ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; com.android.server.wifi.WifiStateMachinePrime testWifiStateMachinePrime = new com.android.server.wifi.WifiStateMachinePrime ( mWifiInjector , mLooper.getLooper ( ) ) ; verify ( mWificond ) . tearDownInterfaces ( ) ; }

Target:
public void testEnterSoftApModeActiveWhenAlreadyInSoftApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( null ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.SOFT_AP_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; enterSoftApActiveMode ( ) ; }
Source:
public static synchronized java.util.List < java.security.Provider > getProvidersList ( ) { return new java.util.ArrayList < java.security.Provider > ( org.apache.harmony.security.fortress.Services.providers ) ; }

Target:
private static void appendServiceLocked ( java.lang.String key , java.security.Provider.Service service ) { java.util.ArrayList < java.security.Provider.Service > serviceList = org.apache.harmony.security.fortress.Services.services.get ( key ) ; if ( serviceList == null ) { serviceList = new java.util.ArrayList < java.security.Provider.Service > ( 1 ) ; org.apache.harmony.security.fortress.Services.services.put ( key , serviceList ) ; } serviceList.add ( service ) ; }
Source:
protected void setKernelData ( int targetLayer , com.android.rs.test.BlurStack blurStack ) { com.android.rs.test.d1new.KernelDataForRenderScriptd1new kernelData = new com.android.rs.test.d1new.KernelDataForRenderScriptd1new ( targetLayer , blurStack , renderScript ) ; if ( ( com.android.rs.test.d1new.RefocusFilterd1new.ENABLE_FAST_FILTER ) && ( ( kernelData.minDiskRadius ) > ( com.android.rs.test.d1new.RefocusFilterd1new.MIN_DISC_RADIUS_FOR_FAST_FILTER ) ) ) { useFastFilterForCurrentLayer = true ; } else { useFastFilterForCurrentLayer = false ; } scriptC.set_g_kernel_stack ( kernelData.stackAllocation ) ; scriptC.set_galloc_kernel_info ( kernelData.infoAllocation ) ; }

Target:
protected void setKernelData ( int targetLayer , com.android.rs.refocus.BlurStack blurStack ) { com.android.rs.refocus.d1new.KernelDataForRenderScriptd1new kernelData = new com.android.rs.refocus.d1new.KernelDataForRenderScriptd1new ( targetLayer , blurStack , renderScript ) ; if ( ( com.android.rs.refocus.d1new.RefocusFilterd1new.ENABLE_FAST_FILTER ) && ( ( kernelData.minDiskRadius ) > ( com.android.rs.refocus.d1new.RefocusFilterd1new.MIN_DISC_RADIUS_FOR_FAST_FILTER ) ) ) { useFastFilterForCurrentLayer = true ; } else { useFastFilterForCurrentLayer = false ; } scriptC.set_g_kernel_stack ( kernelData.stackAllocation ) ; scriptC.set_galloc_kernel_info ( kernelData.infoAllocation ) ; }
Source:
public void testMultiFilterWithNoMatch ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "zzz" ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 160 , "bar" ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "foo" ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertNull ( result ) ; }

Target:
public void testAbiOnlyWithNoMatch ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 2 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertNull ( result ) ; }
Source:
public java.util.ListIterator < java.util.Map.Entry < K , V > > listIterator ( int index ) { return new com.google.common.collect.TransformedListIterator < com.google.common.collect.LinkedListMultimap.Node < K , V > , java.util.Map.Entry < K , V > > ( new NodeIterator ( index ) ) { @ java.lang.Override java.util.Map.Entry < K , V > transform ( com.google.common.collect.LinkedListMultimap.Node < K , V > node ) { return com.google.common.collect.LinkedListMultimap.createEntry ( node ) ; } } ; }

Target:
public java.util.ListIterator < V > listIterator ( int index ) { final com.google.common.collect.LinkedListMultimap < K , V > . NodeIterator nodeItr = new NodeIterator ( index ) ; return new com.google.common.collect.TransformedListIterator < java.util.Map.Entry < K , V > , V > ( nodeItr ) { @ java.lang.Override V transform ( java.util.Map.Entry < K , V > entry ) { return entry.getValue ( ) ; } @ java.lang.Override public void set ( V value ) { nodeItr.setValue ( value ) ; } } ; }
Source:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] certs , java.lang.String authType , java.lang.String hostname ) throws java.security.cert.CertificateException { android.security.net.config.NetworkSecurityConfig config = mConfig.getConfigForHostname ( hostname ) ; return config.getTrustManager ( ) . checkServerTrusted ( certs , authType , hostname ) ; }

Target:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] certs , java.lang.String authType , java.lang.String hostname ) throws java.security.cert.CertificateException { if ( ( hostname == null ) && ( mConfig.hasPerDomainConfigs ( ) ) ) { throw new java.security.cert.CertificateException ( "Domain specific configurations require that the hostname be provided" ) ; } android.security.net.config.NetworkSecurityConfig config = mConfig.getConfigForHostname ( hostname ) ; return config.getTrustManager ( ) . checkServerTrusted ( certs , authType , hostname ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mWifiManager = ( ( android.net.wifi.WifiManager ) ( getContext ( ) . getSystemService ( Context.WIFI_SERVICE ) ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mWifiManager = ( ( android.net.wifi.WifiManager ) ( getContext ( ) . getSystemService ( Context.WIFI_SERVICE ) ) ) ; mWifiEnabled = mWifiManager.isWifiEnabled ( ) ; if ( ! ( mWifiEnabled ) ) { mWifiManager.setWifiEnabled ( true ) ; awaitWifiEnabledState ( true ) ; } }
Source:
public void handleChangedNonJavaFile ( org.eclipse.core.resources.IFolder currentSourceFolder , org.eclipse.core.resources.IFile file , int kind ) { java.lang.String ext = file.getFileExtension ( ) ; if ( AndroidConstants.EXT_AIDL.equalsIgnoreCase ( ext ) ) { com.android.ide.eclipse.adt.internal.build.AidlGenerator.AidlType type = com.android.ide.eclipse.adt.internal.build.AidlGenerator.getAidlType ( file ) ; if ( type == ( com.android.ide.eclipse.adt.internal.build.AidlGenerator.AidlType.INTERFACE ) ) { if ( kind == ( org.eclipse.core.resources.IResourceDelta.REMOVED ) ) { addFileToRemove ( currentSourceFolder , file ) ; } else if ( ( getForceCompile ( ) ) == false ) { addFileToCompile ( currentSourceFolder , file ) ; } } else { setForceCompile ( ) ; } } }

Target:
protected java.lang.String getExtension ( ) { return com.android.ide.eclipse.adt.AndroidConstants.EXT_AIDL ; }
Source:
public java.lang.String unprefix ( java.lang.String typeName ) { if ( ( ( prefix.length ( ) ) == 0 ) || ( ! ( typeName.startsWith ( prefix ) ) ) ) { return typeName ; } return typeName.substring ( prefix.length ( ) ) ; }

Target:
public java.lang.String unprefix ( java.lang.String typeName ) { if ( ( prefix.isEmpty ( ) ) || ( ! ( typeName.startsWith ( prefix ) ) ) ) { return typeName ; } return typeName.substring ( prefix.length ( ) ) ; }
Source:
public void setHorizontalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHorizontalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setHorizontalScrollbarOverlay ( overlay ) ; }

Target:
public void computeScroll ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { computeScroll ( ) ; } } ) ; return ; } mAwContents.computeScroll ( ) ; }
Source:
public void getIccSlotsStatus ( android.os.Message result ) { if ( ( mIccSlotStatus ) != null ) { resultSuccess ( result , mIccSlotStatus ) ; } else { resultFail ( result , null , new java.lang.RuntimeException ( "IccSlotStatus not set" ) ) ; } }

Target:
public void getIccSlotsStatus ( android.os.Message result ) { com.android.internal.telephony.test.SimulatedCommandsVerifier.getInstance ( ) . getIccSlotsStatus ( result ) ; if ( ( mIccSlotStatus ) != null ) { resultSuccess ( result , mIccSlotStatus ) ; } else { resultFail ( result , null , new com.android.internal.telephony.CommandException ( CommandException.Error.REQUEST_NOT_SUPPORTED ) ) ; } }
Source:
public void onCallListChange ( com.android.incallui.call.CallList callList ) { }

Target:
public void onCallListChange ( com.android.incallui.call.CallList callList ) { if ( ( ( ( ( bubble ) == null ) || ( ! ( bubble.isVisible ( ) ) ) ) && ( ( getCall ( ) ) != null ) ) && ( ! ( com.android.incallui.InCallPresenter.getInstance ( ) . isShowingInCallUi ( ) ) ) ) { com.android.dialer.common.LogUtil.i ( "NewReturnToCallController.onCallListChange" , "going to show bubble" ) ; show ( ) ; } }
Source:
public void dup2 ( ) { super . dup2 ( ) ; producerPop ( ) ; producerPop ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; }

Target:
public void dup2 ( ) { super . dup2 ( ) ; producerStack.pop ( ) ; producerStack.pop ( ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; actualProducerStack.dup2 ( ) ; }
Source:
public static < K extends java.lang.Comparable < ? super K > , V > com.google.common.collect.ImmutableSortedMap < K , V > of ( K k1 , V v1 , K k2 , V v2 ) { return new com.google.common.collect.ImmutableSortedMap.Builder < K , V > ( com.google.common.collect.Ordering.natural ( ) ) . put ( k1 , v1 ) . put ( k2 , v2 ) . build ( ) ; }

Target:
public static < K extends java.lang.Comparable < ? super K > , V > com.google.common.collect.ImmutableSortedMap < K , V > of ( K k1 , V v1 , K k2 , V v2 ) { return com.google.common.collect.ImmutableSortedMap.fromEntries ( com.google.common.collect.Ordering.natural ( ) , false , 2 , com.google.common.collect.ImmutableMap.entryOf ( k1 , v1 ) , com.google.common.collect.ImmutableMap.entryOf ( k2 , v2 ) ) ; }
Source:
public void setBackgroundColor ( final int color ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { org.chromium.base.ThreadUtils.postOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setBackgroundColor ( color ) ; } } ) ; return ; } mAwContents.setBackgroundColor ( color ) ; }

Target:
public int computeHorizontalScrollRange ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { int ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer call ( ) { return computeHorizontalScrollRange ( ) ; } } ) ; return ret ; } return mAwContents.computeHorizontalScrollRange ( ) ; }
Source:
public static android.nfc.NdefRecord newMimeRecord ( java.lang.String type , byte [ ] data ) { com.google.common.base.Preconditions.checkNotNull ( type ) ; com.google.common.base.Preconditions.checkNotNull ( data ) ; byte [ ] typeBytes = type.getBytes ( Charsets.US_ASCII ) ; return new android.nfc.NdefRecord ( android.nfc.NdefRecord.TNF_MIME_MEDIA , typeBytes , new byte [ 0 ] , data ) ; }

Target:
public static android.nfc.NdefRecord newMimeRecord ( java.lang.String type , byte [ ] data ) { com.google.common.base.Preconditions.checkNotNull ( type ) ; com.google.common.base.Preconditions.checkNotNull ( data ) ; byte [ ] typeBytes = type.getBytes ( java.nio.charset.StandardCharsets.US_ASCII ) ; return new android.nfc.NdefRecord ( android.nfc.NdefRecord.TNF_MIME_MEDIA , typeBytes , new byte [ 0 ] , data ) ; }
Source:
public void testAccessAdapter ( ) { mGridView = new android.widget.GridView ( mActivity ) ; android.widget.cts.GridViewTest.ImageAdapter adapter = new android.widget.cts.GridViewTest.ImageAdapter ( mActivity ) ; mGridView.setAdapter ( adapter ) ; assertSame ( adapter , mGridView.getAdapter ( ) ) ; mGridView.setAdapter ( null ) ; assertNull ( mGridView.getAdapter ( ) ) ; }

Target:
public void testAccessAdapter ( ) { mGridView = new android.widget.GridView ( mActivity ) ; android.widget.cts.GridViewTest.ImageAdapter adapter = new android.widget.cts.GridViewTest.ImageAdapter ( mActivity ) ; mGridView.setAdapter ( adapter ) ; org.junit.Assert.assertSame ( adapter , mGridView.getAdapter ( ) ) ; mGridView.setAdapter ( null ) ; org.junit.Assert.assertNull ( mGridView.getAdapter ( ) ) ; }