auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void handleShareItemSelected ( ) { android.content.Intent target = new android.content.Intent ( android.content.Intent.ACTION_SEND ) ; target.setType ( "text/plain" ) ; com.android.cts.verifier.TestResultsReport report = new com.android.cts.verifier.TestResultsReport ( this , getListAdapter ( ) ) ; target.putExtra ( Intent.EXTRA_SUBJECT , report.getSubject ( ) ) ; target.putExtra ( Intent.EXTRA_TEXT , report.getBody ( ) ) ; startActivity ( android.content.Intent.createChooser ( target , getString ( R.string.share_test_results ) ) ) ; }

Target:
private void handleShareItemSelected ( ) { android.content.Intent target = new android.content.Intent ( android.content.Intent.ACTION_SEND ) ; target.setType ( "text/plain" ) ; com.android.cts.verifier.TestResultsReport report = new com.android.cts.verifier.TestResultsReport ( this , mAdapter ) ; target.putExtra ( Intent.EXTRA_SUBJECT , report.getSubject ( ) ) ; target.putExtra ( Intent.EXTRA_TEXT , report.getBody ( ) ) ; startActivity ( android.content.Intent.createChooser ( target , getString ( R.string.share_test_results ) ) ) ; }
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.common.api.IAttributeInfo.Format [ ] { com.android.ide.common.api.IAttributeInfo.Format.STRING } ) ) ; com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode uiAttr = desc.createUiNode ( this ) ; uiAttr.setDirty ( true ) ; 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.common.resources.platform.AttributeInfo ( xmlAttrLocalName , new com.android.ide.common.api.IAttributeInfo.Format [ ] { com.android.ide.common.api.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:
private boolean startIPv6 ( ) { try { enableInterfaceIPv6PrivacyExtensions ( ) ; setInterfaceIPv6RaRtInfoMaxPlen ( android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH ) ; mNwService.enableIpv6 ( mInterfaceName ) ; } catch ( java.lang.IllegalStateException | android.os.RemoteException | android.os.ServiceSpecificException e ) { logError ( "Unable to change interface settings: %s" , e ) ; return false ; } return true ; }

Target:
private boolean startIPv6 ( ) { final java.lang.String PREFER_TEMPADDRS = "2" ; try { android.net.util.NetdService.run ( ( android.net.INetd netd ) -> { netd.setProcSysNet ( INetd.IPV6 , INetd.CONF , mInterfaceName , "use_tempaddr" , PREFER_TEMPADDRS ) ; } ) ; mNwService.enableIpv6 ( mInterfaceName ) ; } catch ( java.lang.IllegalStateException | android.os.RemoteException | android.os.ServiceSpecificException e ) { logError ( "Unable to change interface settings: %s" , e ) ; return false ; } return true ; }
Source:
public void testRscLibraryInClassPath ( ) throws java.lang.Exception { java.io.File emptyLib = createRscLibrary ( ) ; com.android.jack.TestTools.compileSourceToDex ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getJackTestsWithJackFolder ( "library/test001" ) , ( ( ( com.android.jack.TestTools.getDefaultBootclasspathString ( ) ) + ( java.io.File.pathSeparator ) ) + ( emptyLib.getPath ( ) ) ) , com.android.jack.TestTools.createTempFile ( "library001" , ".zip" ) , true ) ; }

Target:
public void testRscLibraryInClassPath ( ) throws java.lang.Exception { java.io.File emptyLib = createRscLibrary ( ) ; com.android.jack.TestTools.compileSourceToDex ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getJackTestsWithJackFolder ( "library/test001" ) , ( ( ( com.android.jack.TestTools.getDefaultClasspathString ( ) ) + ( java.io.File.pathSeparator ) ) + ( emptyLib.getPath ( ) ) ) , com.android.jack.TestTools.createTempFile ( "library001" , ".zip" ) , true ) ; }
Source:
public boolean onGenericMotionEvent ( final android.view.MotionEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onGenericMotionEvent ( event ) ; } } ) ; return ret ; } return mAwContents.onGenericMotionEvent ( event ) ; }

Target:
public boolean requestFocus ( final int direction , final android.graphics.Rect previouslyFocusedRect ) { 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 requestFocus ( direction , previouslyFocusedRect ) ; } } ) ; return ret ; } mAwContents.requestFocus ( ) ; return mWebViewPrivate.super_requestFocus ( direction , previouslyFocusedRect ) ; }
Source:
boolean protectedHasArray ( ) { return ( this . block.array ( ) ) != null ; }

Target:
public final float getFloat ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.FLOAT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } float result = java.lang.Float.intBitsToFloat ( this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }
Source:
private void assertInstalledDistro ( com.android.timezone.distro.TimeZoneDistro timeZoneDistro ) throws java.lang.Exception { java.io.File currentTzDataDir = installer.getCurrentTzDataDir ( ) ; assertTrue ( currentTzDataDir.exists ( ) ) ; java.io.File versionFile = new java.io.File ( currentTzDataDir , com.android.timezone.distro.TimeZoneDistro.DISTRO_VERSION_FILE_NAME ) ; assertTrue ( versionFile.exists ( ) ) ; byte [ ] expectedVersionBytes = timeZoneDistro.getDistroVersion ( ) . toBytes ( ) ; byte [ ] actualVersionBytes = com.android.timezone.distro.FileUtils.readBytes ( versionFile , expectedVersionBytes.length ) ; org.junit.Assert.assertArrayEquals ( expectedVersionBytes , actualVersionBytes ) ; }

Target:
private void assertInstalledDistro ( byte [ ] distroBytes ) throws java.lang.Exception { java.io.File currentTzDataDir = installer.getCurrentTzDataDir ( ) ; assertTrue ( currentTzDataDir.exists ( ) ) ; java.io.File versionFile = new java.io.File ( currentTzDataDir , com.android.timezone.distro.TimeZoneDistro.DISTRO_VERSION_FILE_NAME ) ; assertTrue ( versionFile.exists ( ) ) ; byte [ ] expectedVersionBytes = new com.android.timezone.distro.TimeZoneDistro ( distroBytes ) . getDistroVersion ( ) . toBytes ( ) ; byte [ ] actualVersionBytes = com.android.timezone.distro.FileUtils.readBytes ( versionFile , expectedVersionBytes.length ) ; org.junit.Assert.assertArrayEquals ( expectedVersionBytes , actualVersionBytes ) ; }
Source:
public void onResume ( ) { if ( com.android.dialer.util.PermissionsUtil.hasPermission ( activity , android.Manifest.permission.READ_CONTACTS ) ) { contactInfoCache.start ( ) ; } contactsPreferences.refreshValue ( ContactsPreferences.DISPLAY_ORDER_KEY ) ; isSpamEnabled = com.android.dialer.spam.SpamComponent.get ( activity ) . spamSettings ( ) . isSpamEnabled ( ) ; getDuo ( ) . registerListener ( this ) ; notifyDataSetChanged ( ) ; }

Target:
public void onResume ( ) { contactsProviderMatchInfos.clear ( ) ; if ( com.android.dialer.util.PermissionsUtil.hasPermission ( activity , android.Manifest.permission.READ_CONTACTS ) ) { contactInfoCache.start ( ) ; } contactsPreferences.refreshValue ( ContactsPreferences.DISPLAY_ORDER_KEY ) ; isSpamEnabled = com.android.dialer.spam.SpamComponent.get ( activity ) . spamSettings ( ) . isSpamEnabled ( ) ; getDuo ( ) . registerListener ( this ) ; notifyDataSetChanged ( ) ; }
Source:
private com.android.jack.test.toolchain.JackBasedToolchain getToolchain ( boolean isApiTest ) { java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 1 ) ; excludeList.add ( com.android.jack.test.toolchain.LegacyJillToolchain.class ) ; if ( isApiTest ) { excludeList.add ( com.android.jack.test.toolchain.JackCliToolchain.class ) ; } return com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackApiToolchain.class , excludeList ) ; }

Target:
private com.android.jack.test.toolchain.JackBasedToolchain getToolchain ( boolean isApiTest ) { java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 1 ) ; excludeList.add ( com.android.jack.test.toolchain.LegacyJillToolchain.class ) ; if ( isApiTest ) { excludeList.add ( com.android.jack.test.toolchain.JackCliToolchain.class ) ; } return com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackApiToolchainBase.class , excludeList ) ; }
Source:
public void testWriteFile ( ) throws java.lang.Exception { final java.io.File file = new java.io.File ( mContext.getFilesDir ( ) , android.support.v4.content.FileProviderTest.TEST_FILE ) ; final android.net.Uri uri = stageFileAndGetUri ( file , android.support.v4.content.FileProviderTest.TEST_DATA ) ; assertContentsEquals ( android.support.v4.content.FileProviderTest.TEST_DATA , uri ) ; final java.io.OutputStream out = mResolver.openOutputStream ( uri ) ; try { out.write ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT ) ; } finally { libcore.io.IoUtils.closeQuietly ( out ) ; } assertContentsEquals ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT , uri ) ; }

Target:
public void testWriteFile ( ) throws java.lang.Exception { final java.io.File file = new java.io.File ( mContext.getFilesDir ( ) , android.support.v4.content.FileProviderTest.TEST_FILE ) ; final android.net.Uri uri = stageFileAndGetUri ( file , android.support.v4.content.FileProviderTest.TEST_DATA ) ; assertContentsEquals ( android.support.v4.content.FileProviderTest.TEST_DATA , uri ) ; final java.io.OutputStream out = mResolver.openOutputStream ( uri ) ; try { out.write ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT ) ; } finally { android.support.v4.content.FileProviderTest.closeQuietly ( out ) ; } assertContentsEquals ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT , uri ) ; }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "isConnected(): not allowed for non-active user" ) ; return false ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) && ( mRemoteDevice.equals ( device ) ) ; }

Target:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; return service.getState ( ) ; }
Source:
private static libcore.icu.Transliterator getJapaneseTransliterator ( ) { synchronized ( com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.class ) { if ( ! ( com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mInitializedTransliterator ) ) { com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mInitializedTransliterator = true ; libcore.icu.Transliterator t = null ; try { t = new libcore.icu.Transliterator ( ( "Hiragana-Latin; Katakana-Latin;" + " Latin-Ascii" ) ) ; } catch ( java.lang.RuntimeException e ) { android.util.Log.w ( com.android.providers.contacts.ContactLocaleUtils.TAG , ( "Hiragana/Katakana-Latin transliterator data" + " is missing" ) ) ; } com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mJapaneseTransliterator = t ; } return com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mJapaneseTransliterator ; } }

Target:
private static android.icu.text.Transliterator getJapaneseTransliterator ( ) { synchronized ( com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.class ) { if ( ! ( com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mInitializedTransliterator ) ) { com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mInitializedTransliterator = true ; android.icu.text.Transliterator t = null ; try { t = android.icu.text.Transliterator.getInstance ( ( "Hiragana-Latin; Katakana-Latin;" + " Latin-Ascii" ) ) ; } catch ( java.lang.IllegalArgumentException e ) { android.util.Log.w ( com.android.providers.contacts.ContactLocaleUtils.TAG , ( "Hiragana/Katakana-Latin transliterator data" + " is missing" ) ) ; } com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mJapaneseTransliterator = t ; } return com.android.providers.contacts.ContactLocaleUtils.JapaneseContactUtils.mJapaneseTransliterator ; } }
Source:
private static org.junit.runner.Request classes ( android.app.Instrumentation instr , boolean skipExecution , org.junit.runner.Computer computer , java.lang.Class < ? > ... classes ) { try { com.android.test.runner.AndroidRunnerBuilder builder = new com.android.test.runner.AndroidRunnerBuilder ( true , instr , skipExecution ) ; org.junit.runner.Runner suite = computer.getSuite ( builder , classes ) ; return org.junit.runner.Request.runner ( suite ) ; } catch ( org.junit.runners.model.InitializationError e ) { throw new java.lang.RuntimeException ( "Suite constructor, called as above, should always complete" ) ; } }

Target:
private static org.junit.runner.Request classes ( android.app.Instrumentation instr , android.os.Bundle bundle , boolean skipExecution , org.junit.runner.Computer computer , java.lang.Class < ? > ... classes ) { try { com.android.test.runner.AndroidRunnerBuilder builder = new com.android.test.runner.AndroidRunnerBuilder ( true , instr , bundle , skipExecution ) ; org.junit.runner.Runner suite = computer.getSuite ( builder , classes ) ; return org.junit.runner.Request.runner ( suite ) ; } catch ( org.junit.runners.model.InitializationError e ) { throw new java.lang.RuntimeException ( "Suite constructor, called as above, should always complete" ) ; } }
Source:
public void verifyCommandSetStreamVolume ( ) { mTvView.setStreamVolume ( 1.0F ) ; mInstrumentation.waitForIdleSync ( ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; return ( session != null ) && ( ( session.mSetStreamVolumeCount ) > 0 ) ; } } . run ( ) ; }

Target:
public void verifyCommandSetStreamVolume ( ) { resetCounts ( ) ; mTvView.setStreamVolume ( 1.0F ) ; mInstrumentation.waitForIdleSync ( ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; return ( session != null ) && ( ( session.mSetStreamVolumeCount ) > 0 ) ; } } . run ( ) ; }
Source:
public android.net.NetworkCapabilities addTransportType ( int transportType ) { if ( ( transportType < ( android.net.NetworkCapabilities.MIN_TRANSPORT ) ) || ( transportType > ( android.net.NetworkCapabilities.MAX_TRANSPORT ) ) ) { throw new java.lang.IllegalArgumentException ( "TransportType out of range" ) ; } mTransportTypes |= 1 << transportType ; setNetworkSpecifier ( mNetworkSpecifier ) ; return this ; }

Target:
public android.net.NetworkCapabilities addTransportType ( int transportType ) { android.net.NetworkCapabilities.checkValidTransportType ( transportType ) ; mTransportTypes |= 1 << transportType ; setNetworkSpecifier ( mNetworkSpecifier ) ; return this ; }
Source:
public void testCanInstallAndUninstallACaCert ( ) throws java.security.cert.CertificateException { assertFalse ( hasCaCertInstalled ( FAKE_RSA_1.caCertificate ) ) ; assertFalse ( hasCaCertInstalled ( FAKE_DSA_1.caCertificate ) ) ; assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_RSA_1.caCertificate ) ) ; assertTrue ( hasCaCertInstalled ( FAKE_RSA_1.caCertificate ) ) ; assertFalse ( hasCaCertInstalled ( FAKE_DSA_1.caCertificate ) ) ; mDevicePolicyManager.uninstallCaCert ( getWho ( ) , FAKE_RSA_1.caCertificate ) ; assertFalse ( hasCaCertInstalled ( FAKE_RSA_1.caCertificate ) ) ; assertFalse ( hasCaCertInstalled ( FAKE_DSA_1.caCertificate ) ) ; }

Target:
public void testCanInstallAndUninstallACaCert ( ) throws java.security.GeneralSecurityException , java.security.cert.CertificateException { assertUninstalled ( FAKE_RSA_1.caCertificate ) ; assertUninstalled ( FAKE_DSA_1.caCertificate ) ; assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_RSA_1.caCertificate ) ) ; assertInstalled ( FAKE_RSA_1.caCertificate ) ; assertUninstalled ( FAKE_DSA_1.caCertificate ) ; mDevicePolicyManager.uninstallCaCert ( getWho ( ) , FAKE_RSA_1.caCertificate ) ; assertUninstalled ( FAKE_RSA_1.caCertificate ) ; assertUninstalled ( FAKE_DSA_1.caCertificate ) ; }
Source:
public void onExecuteWrite ( android.bluetooth.BluetoothDevice device , int requestId , boolean execute ) { if ( com.android.cts.verifier.bluetooth.BleServerService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleServerService.TAG , "onExecuteWrite" ) ; if ( execute ) { notifyExecuteWrite ( ) ; getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) . setValue ( mReliableWriteValue ) ; } }

Target:
public void onExecuteWrite ( android.bluetooth.BluetoothDevice device , int requestId , boolean execute ) { if ( com.android.cts.verifier.bluetooth.BleServerService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleServerService.TAG , "onExecuteWrite" ) ; if ( execute ) { notifyExecuteWrite ( ) ; getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) . setValue ( mReliableWriteValue ) ; mGattServer.sendResponse ( device , requestId , BluetoothGatt.GATT_SUCCESS , 0 , null ) ; } }
Source:
public java.lang.String getOriginalUrl ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getOriginalUrl ( ) ; } } ) ; return ret ; } java.lang.String url = mAwContents.getOriginalUrl ( ) ; if ( ( url == null ) || ( url.trim ( ) . isEmpty ( ) ) ) return null ; return url ; }

Target:
public java.lang.String getUrl ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getUrl ( ) ; } } ) ; return ret ; } java.lang.String url = mAwContents.getUrl ( ) ; if ( ( url == null ) || ( url.trim ( ) . isEmpty ( ) ) ) return null ; return url ; }
Source:
public static com.android.sdklib.SdkManager createManager ( @ com.android.annotations.NonNull java.lang.String osSdkPath , @ com.android.annotations.NonNull com.android.utils.ILogger log ) { try { com.android.sdklib.SdkManager manager = new com.android.sdklib.SdkManager ( osSdkPath ) ; manager.reloadSdk ( log ) ; return manager ; } catch ( java.lang.IllegalArgumentException e ) { log.error ( e , "Error parsing the sdk." ) ; } return null ; }

Target:
public static com.android.sdklib.SdkManager createManager ( @ com.android.annotations.NonNull java.lang.String osSdkPath , @ com.android.annotations.NonNull com.android.utils.ILogger log ) { try { com.android.sdklib.SdkManager manager = new com.android.sdklib.SdkManager ( osSdkPath ) ; manager.reloadSdk ( log ) ; return manager ; } catch ( java.lang.Throwable throwable ) { log.error ( throwable , "Error parsing the sdk." ) ; } return null ; }
Source:
private com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor createMerge ( java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor > knownLayouts ) { java.lang.String xml_name = "merge" ; com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor [ ] viewLayoutAttribs = findViewLayoutAttributes ( AndroidConstants.CLASS_FRAMELAYOUT , knownLayouts ) ; com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( xml_name , xml_name , null , "A root tag useful for XML layouts inflated using a ViewStub." , null , null , viewLayoutAttribs , null , false ) ; return desc ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor createMerge ( java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor > knownLayouts ) { java.lang.String xml_name = "merge" ; com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor [ ] viewLayoutAttribs = findViewLayoutAttributes ( SdkConstants.CLASS_FRAMELAYOUT , knownLayouts ) ; com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( xml_name , xml_name , null , "A root tag useful for XML layouts inflated using a ViewStub." , null , null , viewLayoutAttribs , null , false ) ; return desc ; }
Source:
public void terminateSession ( int clientId , int sessionId ) { if ( android.net.wifi.nan.WifiNanManager.VDBG ) { android.util.Log.d ( android.net.wifi.nan.WifiNanManager.TAG , ( ( ( "terminateSession(): clientId=" + clientId ) + ", sessionId=" ) + sessionId ) ) ; } try { mService.terminateSession ( clientId , sessionId ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void terminateSession ( int clientId , int sessionId ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) { android.util.Log.d ( android.net.wifi.aware.WifiAwareManager.TAG , ( ( ( "terminateSession(): clientId=" + clientId ) + ", sessionId=" ) + sessionId ) ) ; } try { mService.terminateSession ( clientId , sessionId ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier ( org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID , java.security.AlgorithmParameters params ) throws org.bouncycastle.cert.crmf.CRMFException { org.bouncycastle.asn1.ASN1Encodable asn1Params ; if ( params != null ) { try { asn1Params = org.bouncycastle.jcajce.JcaJceUtils.extractParameters ( params ) ; } catch ( java.io.IOException e ) { throw new org.bouncycastle.cert.crmf.CRMFException ( ( "cannot encode parameters: " + ( e.getMessage ( ) ) ) , e ) ; } } else { asn1Params = org.bouncycastle.asn1.DERNull.INSTANCE ; } return new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( encryptionOID , asn1Params ) ; }

Target:
org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier ( org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID , java.security.AlgorithmParameters params ) throws org.bouncycastle.cert.crmf.CRMFException { org.bouncycastle.asn1.ASN1Encodable asn1Params ; if ( params != null ) { try { asn1Params = org.bouncycastle.jcajce.util.JcaJceUtils.extractParameters ( params ) ; } catch ( java.io.IOException e ) { throw new org.bouncycastle.cert.crmf.CRMFException ( ( "cannot encode parameters: " + ( e.getMessage ( ) ) ) , e ) ; } } else { asn1Params = org.bouncycastle.asn1.DERNull.INSTANCE ; } return new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( encryptionOID , asn1Params ) ; }
Source:
void addOptionInstance ( com.google.devtools.common.options.ParsedOptionDescription parsedOption , com.google.devtools.common.options.OptionDefinition implicitDependant , com.google.devtools.common.options.OptionDefinition expandedFrom , java.util.List < java.lang.String > warnings ) throws com.google.devtools.common.options.OptionsParsingException { java.lang.Object convertedValue = parsedOption.getConvertedValue ( ) ; if ( convertedValue instanceof java.util.List < ? > ) { optionValues.putAll ( parsedOption.getPriority ( ) , ( ( java.util.List < ? > ) ( convertedValue ) ) ) ; } else { optionValues.put ( parsedOption.getPriority ( ) , convertedValue ) ; } }

Target:
void addOptionInstance ( com.google.devtools.common.options.ParsedOptionDescription parsedOption , java.util.List < java.lang.String > warnings ) throws com.google.devtools.common.options.OptionsParsingException { java.lang.Object convertedValue = parsedOption.getConvertedValue ( ) ; com.google.devtools.common.options.OptionPriority priority = parsedOption.getPriority ( ) ; parsedOptions.put ( priority , parsedOption ) ; if ( convertedValue instanceof java.util.List < ? > ) { optionValues.putAll ( priority , ( ( java.util.List < ? > ) ( convertedValue ) ) ) ; } else { optionValues.put ( priority , convertedValue ) ; } }
Source:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.nan.WifiNanManager.DataPathRole int role , int peerId , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiNanManager" ) ; return null ; } return mgr.createNetworkSpecifier ( role , mSessionId , peerId , token ) ; } }

Target:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.nan.WifiNanManager.DataPathRole int role , int peerId , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiNanManager" ) ; return null ; } return mgr.createNetworkSpecifier ( mClientId , role , mSessionId , peerId , token ) ; } }
Source:
public org.objectweb.asm.tree.analysis.Value merge ( org.objectweb.asm.tree.analysis.Value value1 , org.objectweb.asm.tree.analysis.Value value2 ) { if ( ( value1 == ( com.android.tools.lint.checks.RecycleDetector.RecycleTracker.RECYCLED ) ) || ( value2 == ( com.android.tools.lint.checks.RecycleDetector.RecycleTracker.RECYCLED ) ) ) { return com.android.tools.lint.checks.RecycleDetector.RecycleTracker.RECYCLED ; } else if ( ( value1 == ( com.android.tools.lint.checks.RecycleDetector.RecycleTracker.INSTANCE ) ) || ( value2 == ( com.android.tools.lint.checks.RecycleDetector.RecycleTracker.INSTANCE ) ) ) { return com.android.tools.lint.checks.RecycleDetector.RecycleTracker.INSTANCE ; } return com.android.tools.lint.checks.RecycleDetector.RecycleTracker.UNKNOWN ; }

Target:
public org.objectweb.asm.tree.analysis.Value merge ( org.objectweb.asm.tree.analysis.Value value1 , org.objectweb.asm.tree.analysis.Value value2 ) { if ( ( value1 == ( com.android.tools.lint.checks.CleanupDetector.CleanupTracker.RECYCLED ) ) || ( value2 == ( com.android.tools.lint.checks.CleanupDetector.CleanupTracker.RECYCLED ) ) ) { return com.android.tools.lint.checks.CleanupDetector.CleanupTracker.RECYCLED ; } else if ( ( value1 == ( com.android.tools.lint.checks.CleanupDetector.CleanupTracker.INSTANCE ) ) || ( value2 == ( com.android.tools.lint.checks.CleanupDetector.CleanupTracker.INSTANCE ) ) ) { return com.android.tools.lint.checks.CleanupDetector.CleanupTracker.INSTANCE ; } return com.android.tools.lint.checks.CleanupDetector.CleanupTracker.UNKNOWN ; }
Source:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , id , slot , ain , aout ) ; } else { rsnScriptForEach ( mContext , id , slot , ain , aout , params ) ; } }

Target:
synchronized long nScriptInvokeIDCreate ( long sid , int slot ) { validate ( ) ; return rsnScriptInvokeIDCreate ( mContext , sid , slot ) ; }
Source:
public void testMakeTimeZone_OneDstTransition ( ) throws java.lang.Exception { int [ ] [ ] times = new int [ ] [ ] { new int [ ] { 0 , 0 } } ; int [ ] [ ] offsets = new int [ ] [ ] { new int [ ] { 3600 , 1 } } ; try { createZoneInfo ( times , offsets ) ; fail ( "Did not detect no non-DST transitions" ) ; } catch ( java.lang.IllegalStateException expected ) { } }

Target:
public void testReadTimeZone_OneDstTransition ( ) throws java.lang.Exception { int [ ] [ ] transitions = new int [ ] [ ] { new int [ ] { 0 , 0 } } ; int [ ] [ ] types = new int [ ] [ ] { new int [ ] { 3600 , 1 } } ; try { createZoneInfo ( transitions , types ) ; fail ( "Did not detect no non-DST transitions" ) ; } catch ( java.lang.IllegalStateException expected ) { } }
Source:
public long getDirectoryId ( ) { int position = getPosition ( ) ; while ( moveToPrevious ( ) ) { int id = getInt ( getColumnIndex ( com.android.dialer.searchfragment.remote.RemoteContactsCursor.COLUMN_DIRECTORY_ID ) ) ; if ( id != ( - 1 ) ) { moveToPosition ( position ) ; return id ; } } throw com.android.dialer.common.Assert.createIllegalStateFailException ( ( "No directory id for contact at: " + position ) ) ; }

Target:
public long getDirectoryId ( ) { int position = getPosition ( ) ; while ( moveToPrevious ( ) ) { int columnIndex = getColumnIndex ( com.android.dialer.searchfragment.remote.RemoteContactsCursor.COLUMN_DIRECTORY_ID ) ; if ( columnIndex == ( - 1 ) ) { continue ; } int id = getInt ( columnIndex ) ; if ( id == ( - 1 ) ) { continue ; } moveToPosition ( position ) ; return id ; } throw com.android.dialer.common.Assert.createIllegalStateFailException ( ( "No directory id for contact at: " + position ) ) ; }
Source:
public static double max ( double a , double b ) { if ( a != a ) return a ; if ( ( ( a == 0.0 ) && ( b == 0.0 ) ) && ( ( java.lang.Double.doubleToRawLongBits ( a ) ) == ( java.lang.StrictMath.negativeZeroDoubleBits ) ) ) { return b ; } return a >= b ? a : b ; }

Target:
public static double min ( double a , double b ) { return java.lang.Math.min ( a , b ) ; }
Source:
private void sendImageNotifications ( java.lang.String callId , com.android.incallui.ContactInfoCache.ContactCacheEntry entry ) { com.android.dialer.common.Assert.isMainThread ( ) ; final java.util.Set < com.android.incallui.ContactInfoCache.ContactInfoCacheCallback > callBacks = mCallBacks.get ( callId ) ; if ( ( callBacks != null ) && ( ( entry.photo ) != null ) ) { for ( com.android.incallui.ContactInfoCache.ContactInfoCacheCallback callBack : callBacks ) { callBack.onImageLoadComplete ( callId , entry ) ; } } }

Target:
private void sendImageNotifications ( java.lang.String callId , com.android.incallui.ContactInfoCache.ContactCacheEntry entry ) { android.os.Trace.beginSection ( "ContactInfoCache.sendImageNotifications" ) ; com.android.dialer.common.Assert.isMainThread ( ) ; final java.util.Set < com.android.incallui.ContactInfoCache.ContactInfoCacheCallback > callBacks = mCallBacks.get ( callId ) ; if ( ( callBacks != null ) && ( ( entry.photo ) != null ) ) { for ( com.android.incallui.ContactInfoCache.ContactInfoCacheCallback callBack : callBacks ) { callBack.onImageLoadComplete ( callId , entry ) ; } } android.os.Trace.endSection ( ) ; }
Source:
boolean isSupported ( ) { java.lang.String versionString = mDocument.getDocumentElement ( ) . getAttribute ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.ATTR_FORMAT ) ; if ( ( versionString != null ) && ( ! ( versionString.isEmpty ( ) ) ) ) { try { int version = java.lang.Integer.parseInt ( versionString ) ; return version <= ( TemplateHandler.CURRENT_FORMAT ) ; } catch ( java.lang.NumberFormatException nufe ) { return false ; } } return true ; }

Target:
boolean isSupported ( ) { java.lang.String versionString = mDocument.getDocumentElement ( ) . getAttribute ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.ATTR_FORMAT ) ; if ( ( versionString != null ) && ( ! ( versionString.isEmpty ( ) ) ) ) { try { int version = java.lang.Integer.parseInt ( versionString ) ; return version <= ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.CURRENT_FORMAT ) ; } catch ( java.lang.NumberFormatException nufe ) { return false ; } } return true ; }
Source:
public void testRevokePropagatedOnUpgradeNewToNewModel ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part1" ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part2" ) ; }

Target:
public void testRevokePropagatedOnUpgradeNewToNewModel ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part1" ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part2" ) ; }
Source:
public void addCall ( android.telecom.ParcelableCall call ) throws android.os.RemoteException { if ( mCallById.containsKey ( call.getId ( ) ) ) { throw new java.lang.RuntimeException ( ( ( "Call " + ( call.getId ( ) ) ) + " already added" ) ) ; } mCallById.put ( call.getId ( ) , call ) ; mLatestCallId = call.getId ( ) ; }

Target:
public void addCall ( android.telecom.ParcelableCall call ) throws android.os.RemoteException { if ( mCallById.containsKey ( call.getId ( ) ) ) { throw new java.lang.RuntimeException ( ( ( "Call " + ( call.getId ( ) ) ) + " already added" ) ) ; } mLatestCallId = call.getId ( ) ; mCallById.put ( call.getId ( ) , call ) ; mAddCallLock.countDown ( ) ; }
Source:
public void dispose ( ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new java.lang.IllegalStateException ( "No streaming service attached" ) ; } try { mService.disposeStream ( mAppName , mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.DeadObjectException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , "Remote process died" ) ; mService = null ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_SERVICE_LOST ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , ( "Caught remote exception calling dispose: " + e ) ) ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_UNKNOWN_REMOTE_EXCEPTION ) ; } }

Target:
public void stopStreaming ( ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new java.lang.IllegalStateException ( "No streaming service attached" ) ; } try { mService.stopStreaming ( mAppName , mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , "Remote process died" ) ; mService = null ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_SERVICE_LOST ) ; } }
Source:
public boolean isEnabled ( ) { try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.isEnabled ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public boolean isEnabled ( ) { try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.isEnabled ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return false ; }
Source:
public java.lang.String getTypeDescription ( ) { return "a comma-separated list of colon-separated key value pairs" ; }

Target:
public java.lang.String getTypeDescription ( ) { return java.lang.String.format ( "a comma-separated list of colon-separated key value pairs of the types %s and %s" , ( ( java.lang.reflect.ParameterizedType ) ( getClass ( ) . getGenericSuperclass ( ) ) ) . getActualTypeArguments ( ) [ 0 ] , ( ( java.lang.reflect.ParameterizedType ) ( getClass ( ) . getGenericSuperclass ( ) ) ) . getActualTypeArguments ( ) [ 1 ] ) ; }
Source:
public void setupDefaultSources ( ) { com.android.sdklib.internal.repository.SdkSources sources = getSources ( ) ; java.lang.String baseUrl = java.lang.System.getenv ( "SDK_TEST_BASE_URL" ) ; if ( ( ( baseUrl == null ) || ( ( baseUrl.length ( ) ) <= 0 ) ) || ( ! ( baseUrl.endsWith ( "/" ) ) ) ) { baseUrl = com.android.sdklib.repository.SdkRepoConstants.URL_GOOGLE_SDK_SITE ; } sources.add ( SdkSourceCategory.ANDROID_REPO , new com.android.sdklib.internal.repository.SdkRepoSource ( baseUrl , SdkSourceCategory.ANDROID_REPO.getUiName ( ) ) ) ; sources.loadUserAddons ( getSdkLog ( ) ) ; }

Target:
public void setupDefaultSources ( ) { com.android.sdklib.internal.repository.sources.SdkSources sources = getSources ( ) ; java.lang.String baseUrl = java.lang.System.getenv ( "SDK_TEST_BASE_URL" ) ; if ( ( ( baseUrl == null ) || ( ( baseUrl.length ( ) ) <= 0 ) ) || ( ! ( baseUrl.endsWith ( "/" ) ) ) ) { baseUrl = com.android.sdklib.repository.SdkRepoConstants.URL_GOOGLE_SDK_SITE ; } sources.add ( SdkSourceCategory.ANDROID_REPO , new com.android.sdklib.internal.repository.sources.SdkRepoSource ( baseUrl , SdkSourceCategory.ANDROID_REPO.getUiName ( ) ) ) ; sources.loadUserAddons ( getSdkLog ( ) ) ; }
Source:
protected void sendSubmitPdu ( com.android.internal.telephony.cdma.SmsMessage.SubmitPdu pdu , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , java.lang.String destAddr ) { if ( android.os.SystemProperties.getBoolean ( TelephonyProperties.PROPERTY_INECM_MODE , false ) ) { if ( sentIntent != null ) { try { sentIntent.send ( SmsManager.RESULT_ERROR_NO_SERVICE ) ; } catch ( android.app.PendingIntent.CanceledException ex ) { } } if ( com.android.internal.telephony.cdma.CdmaSMSDispatcher.VDBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.cdma.CdmaSMSDispatcher.TAG , "Block SMS in Emergency Callback mode" ) ; } return ; } sendRawPdu ( pdu.encodedScAddress , pdu.encodedMessage , sentIntent , deliveryIntent , destAddr ) ; }

Target:
protected void sendSubmitPdu ( com.android.internal.telephony.cdma.SmsTracker tracker ) { if ( android.os.SystemProperties.getBoolean ( TelephonyProperties.PROPERTY_INECM_MODE , false ) ) { if ( com.android.internal.telephony.cdma.CdmaSMSDispatcher.VDBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.cdma.CdmaSMSDispatcher.TAG , "Block SMS in Emergency Callback mode" ) ; } tracker.onFailed ( mContext , SmsManager.RESULT_ERROR_NO_SERVICE , 0 ) ; return ; } sendRawPdu ( tracker ) ; }
Source:
public boolean setNetworkExtra ( int netId , java.lang.String name , java.util.Map < java.lang.String , java.lang.String > values ) { java.lang.String encoded = com.android.server.wifi.WifiNative.createNetworkExtra ( values ) ; if ( encoded == null ) { return false ; } return setNetworkVariable ( netId , name , encoded ) ; }

Target:
public boolean setNetworkExtra ( int netId , java.lang.String name , java.util.Map < java.lang.String , java.lang.String > values ) { java.lang.String encoded = com.android.server.wifi.WifiNative.createNetworkExtra ( values ) ; if ( encoded == null ) { return false ; } return setNetworkVariable ( netId , name , ( ( "\"" + encoded ) + "\"" ) ) ; }
Source:
boolean cancelBondProcess ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; byte [ ] addr = com.android.bluetooth.Utils.getBytesFromAddress ( device.getAddress ( ) ) ; return cancelBondNative ( addr ) ; }

Target:
boolean cancelBondProcess ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; byte [ ] addr = com.android.bluetooth.Utils.getBytesFromAddress ( device.getAddress ( ) ) ; com.android.bluetooth.btservice.RemoteDevices.DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties ( device ) ; if ( deviceProp != null ) { deviceProp.setBondingInitiatedLocally ( false ) ; } return cancelBondNative ( addr ) ; }
Source:
public void testLibProguard ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libProguard" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/proguard/release" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int proguardInt -> a" } ) ; }

Target:
public void testLibProguard ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libProguard" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/proguard/release" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int proguardInt -> a" } ) ; }
Source:
private boolean migrateFromLegacyStore ( ) { if ( mWifiConfigStoreLegacy.areStoresPresent ( ) ) { com.android.server.wifi.WifiConfigStoreLegacy.WifiConfigStoreDataLegacy storeData = mWifiConfigStoreLegacy.read ( ) ; android.util.Log.d ( com.android.server.wifi.WifiConfigManagerNew.TAG , "Reading from legacy store completed" ) ; loadInternalData ( storeData.getConfigurations ( ) , storeData.getDeletedEphemeralSSIDs ( ) ) ; if ( ! ( saveToStore ( true ) ) ) { return false ; } android.util.Log.d ( com.android.server.wifi.WifiConfigManagerNew.TAG , "Migration from legacy store completed" ) ; } return true ; }

Target:
private boolean migrateFromLegacyStore ( ) { if ( mWifiConfigStoreLegacy.areStoresPresent ( ) ) { com.android.server.wifi.WifiConfigStoreLegacy.WifiConfigStoreDataLegacy storeData = mWifiConfigStoreLegacy.read ( ) ; android.util.Log.d ( com.android.server.wifi.WifiConfigManager.TAG , "Reading from legacy store completed" ) ; loadInternalData ( storeData.getConfigurations ( ) , storeData.getDeletedEphemeralSSIDs ( ) ) ; if ( ! ( saveToStore ( true ) ) ) { return false ; } android.util.Log.d ( com.android.server.wifi.WifiConfigManager.TAG , "Migration from legacy store completed" ) ; } return true ; }
Source:
public void testFailed ( com.android.ddmlib.testrunner.TestFailure status , com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( status.equals ( TestFailure.ERROR ) ) { mRunResult.reportTestFailure ( test , TestStatus.ERROR , trace ) ; } else { mRunResult.reportTestFailure ( test , TestStatus.FAILURE , trace ) ; } com.android.ddmlib.Log.d ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , java.lang.String.format ( "%s %s: %s" , test , status , trace ) ) ; }

Target:
public void testEnded ( com.android.ddmlib.testrunner.TestIdentifier test , java.util.Map < java.lang.String , java.lang.String > testMetrics ) { mRunResult.testEnded ( test , testMetrics ) ; }
Source:
public void testSize ( ) { com.android.test.runner.TestRequestBuilder b = new com.android.test.runner.TestRequestBuilder ( new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleTest.class . getName ( ) ) ; b.addTestSizeFilter ( "small" ) ; com.android.test.runner.TestRequest request = b.build ( mInstr ) ; org.junit.runner.JUnitCore testRunner = new org.junit.runner.JUnitCore ( ) ; org.junit.runner.Result result = testRunner.run ( request.getRequest ( ) ) ; org.junit.Assert.assertEquals ( 1 , result.getRunCount ( ) ) ; }

Target:
public void testSize ( ) { com.android.test.runner.TestRequestBuilder b = new com.android.test.runner.TestRequestBuilder ( new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleTest.class . getName ( ) ) ; b.addTestSizeFilter ( "small" ) ; com.android.test.runner.TestRequest request = b.build ( mInstr , mBundle ) ; org.junit.runner.JUnitCore testRunner = new org.junit.runner.JUnitCore ( ) ; org.junit.runner.Result result = testRunner.run ( request.getRequest ( ) ) ; org.junit.Assert.assertEquals ( 1 , result.getRunCount ( ) ) ; }
Source:
private void callbackUnavailableTest ( android.autofillservice.cts.CannedFillResponse response ) throws java.lang.Exception { enableService ( ) ; final android.autofillservice.cts.MyAutofillCallback callback = mActivity.registerCallback ( ) ; sReplier.addResponse ( response ) ; focusToUsername ( ) ; sReplier.getNextFillRequest ( ) ; sUiBot.assertNoDatasets ( ) ; callback.assertUiUnavailableEvent ( mActivity.mCustomView , mActivity.mUsername.text.id ) ; }

Target:
private void callbackUnavailableTest ( android.autofillservice.cts.CannedFillResponse response ) throws java.lang.Throwable { enableService ( ) ; final android.autofillservice.cts.MyAutofillCallback callback = mActivity.registerCallback ( ) ; sReplier.addResponse ( response ) ; focusToUsernameExpectNoWindowEvent ( ) ; sReplier.getNextFillRequest ( ) ; sUiBot.assertNoDatasets ( ) ; callback.assertUiUnavailableEvent ( mActivity.mCustomView , mActivity.mUsername.text.id ) ; }
Source:
private static void assertSubArrayEquals ( byte [ ] expected , int len , byte [ ] actual ) { assertEquals ( len , actual.length ) ; for ( int i = 0 ; i < len ; ++ i ) { assertEquals ( expected [ i ] , actual [ i ] ) ; } }

Target:
private static void assertSubArrayEquals ( int [ ] expected , int len , int [ ] actual ) { java.lang.String expectedString = libcore.io.Base64Test.intsToString ( expected , len ) ; java.lang.String actualString = libcore.io.Base64Test.intsToString ( actual , actual.length ) ; assertEquals ( expectedString , actualString ) ; }