auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void connectToWifi ( ) { android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver receiver = new android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver ( android.net.ConnectivityManager.TYPE_WIFI , android.net.NetworkInfo.State.CONNECTED ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( ConnectivityManager.CONNECTIVITY_ACTION ) ; mContext.registerReceiver ( receiver , filter ) ; HEAD ( 1 ) ; android.net.cts.a497 Merge ; }

Target:
private void connectToWifi ( ) { android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver receiver = new android.net.cts.ConnectivityManagerTest.ConnectivityActionReceiver ( android.net.ConnectivityManager.TYPE_WIFI , android.net.NetworkInfo.State.CONNECTED ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( ConnectivityManager.CONNECTIVITY_ACTION ) ; mContext.registerReceiver ( receiver , filter ) ; boolean connected = false ; try { assertTrue ( mWifiManager.setWifiEnabled ( true ) ) ; connected = receiver.waitForState ( ) ; } catch ( java.lang.InterruptedException ex ) { fail ( "connectToWifi was interrupted" ) ; } finally { mContext.unregisterReceiver ( receiver ) ; } assertTrue ( "Wifi must be configured to connect to an access point for this test." , connected ) ; }
Source:
public static boolean setProcessDefaultNetwork ( android.net.Network network ) { int netId = ( network == null ) ? android.net.ConnectivityManager.NETID_UNSET : network.netId ; if ( netId == ( android.net.NetworkUtils.getNetworkBoundToProcess ( ) ) ) { return true ; } if ( android.net.NetworkUtils.bindProcessToNetwork ( netId ) ) { java.net.InetAddress.clearDnsCache ( ) ; libcore.net.event.NetworkEventDispatcher.getInstance ( ) . onNetworkConfigurationChanged ( ) ; return true ; } else { return false ; } }

Target:
public static boolean setProcessDefaultNetwork ( android.net.Network network ) { int netId = ( network == null ) ? android.net.ConnectivityManager.NETID_UNSET : network.netId ; if ( netId == ( android.net.NetworkUtils.getNetworkBoundToProcess ( ) ) ) { return true ; } if ( android.net.NetworkUtils.bindProcessToNetwork ( netId ) ) { android.net.Proxy.setHttpProxySystemProperty ( android.net.ConnectivityManager.getInstance ( ) . getDefaultProxy ( ) ) ; java.net.InetAddress.clearDnsCache ( ) ; libcore.net.event.NetworkEventDispatcher.getInstance ( ) . onNetworkConfigurationChanged ( ) ; return true ; } else { return false ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JConditionalBasicBlock bb ) { com.android.jack.dx.rop.code.InsnList il = createInsnList ( instructions , 0 ) ; il.setImmutable ( ) ; com.android.jack.ir.ast.cfg.JBasicBlock primary = bb.getPrimarySuccessor ( ) ; com.android.jack.ir.ast.cfg.JBasicBlock secondary = bb.getAlternativeSuccessor ( ) ; int primarySuccessor = getBlockId ( primary ) ; com.android.jack.dx.util.IntList successors = com.android.jack.dx.util.IntList.makeImmutable ( primarySuccessor , getBlockId ( secondary ) ) ; ropBb.createBasicBlock ( getBlockId ( bb ) , il , successors , primarySuccessor ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JConditionalBasicBlock bb ) { java.util.List < com.android.jack.dx.ssa.SsaInsn > il = createInsnList ( instructions , 0 ) ; com.android.jack.ir.ast.cfg.JBasicBlock primary = bb.getPrimarySuccessor ( ) ; com.android.jack.ir.ast.cfg.JBasicBlock secondary = bb.getAlternativeSuccessor ( ) ; int primarySuccessor = getBlockId ( primary ) ; com.android.jack.dx.util.IntList successors = com.android.jack.dx.util.IntList.makeImmutable ( primarySuccessor , getBlockId ( secondary ) ) ; ssaBb.setRopLabel ( getBlockId ( bb ) ) ; ssaBb.setInsns ( il ) ; ssaBb.setSuccessors ( successors , primarySuccessor ) ; return false ; }
Source:
public void testEmptyConfig ( ) throws java.lang.Exception { android.util.ArraySet < android.util.Pair < android.security.net.config.Domain , android.security.net.config.NetworkSecurityConfig > > domainMap = new android.util.ArraySet < android.util.Pair < android.security.net.config.Domain , android.security.net.config.NetworkSecurityConfig > > ( ) ; android.security.net.config.ConfigSource testSource = new android.security.net.config.TestConfigSource ( domainMap , getEmptyConfig ( ) ) ; javax.net.ssl.SSLContext context = getSSLContext ( testSource ) ; assertConnectionFails ( context , "android.com" , 443 ) ; }

Target:
public void testEmptyConfig ( ) throws java.lang.Exception { android.util.ArraySet < android.util.Pair < android.security.net.config.Domain , android.security.net.config.NetworkSecurityConfig > > domainMap = new android.util.ArraySet < android.util.Pair < android.security.net.config.Domain , android.security.net.config.NetworkSecurityConfig > > ( ) ; android.security.net.config.ConfigSource testSource = new android.security.net.config.TestConfigSource ( domainMap , getEmptyConfig ( ) ) ; javax.net.ssl.SSLContext context = android.security.net.config.TestUtils.getSSLContext ( testSource ) ; android.security.net.config.TestUtils.assertConnectionFails ( context , "android.com" , 443 ) ; }
Source:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; doLog ( lr , bundleName ) ; }

Target:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg , java.lang.Object param1 ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; java.lang.Object [ ] params = new java.lang.Object [ ] { param1 } ; lr.setParameters ( params ) ; doLog ( lr ) ; }
Source:
public void setVisualVoicemailEnabled ( android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { telephony.setVisualVoicemailEnabled ( mContext.getOpPackageName ( ) , phoneAccountHandle , enabled ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }

Target:
public void setVoicemailRingtoneUri ( android.telecom.PhoneAccountHandle phoneAccountHandle , android.net.Uri uri ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { service.setVoicemailRingtoneUri ( getOpPackageName ( ) , phoneAccountHandle , uri ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setVoicemailRingtoneUri" , e ) ; } }
Source:
private void createPages ( ) { mAvdManagerPage = new com.android.sdkuilib.internal.repository.AvdManagerPage ( mPagesRootComposite , mUpdaterData ) ; mLocalPackagePage = new com.android.sdkuilib.internal.repository.LocalPackagesPage ( mPagesRootComposite , mUpdaterData ) ; mRemotePackagesPage = new com.android.sdkuilib.internal.repository.RemotePackagesPage ( mPagesRootComposite , mUpdaterData ) ; }

Target:
private void createPages ( ) { mAvdManagerPage = new com.android.sdkuilib.internal.repository.AvdManagerPage ( mPagesRootComposite , mUpdaterData ) ; if ( ( java.lang.System.getenv ( "EXPERIMENTAL" ) ) != null ) { mPackagesPage = new com.android.sdkuilib.internal.repository.PackagesPage ( mPagesRootComposite , mUpdaterData ) ; } else { mLocalPackagePage = new com.android.sdkuilib.internal.repository.LocalPackagesPage ( mPagesRootComposite , mUpdaterData ) ; mRemotePackagesPage = new com.android.sdkuilib.internal.repository.RemotePackagesPage ( mPagesRootComposite , mUpdaterData ) ; } }
Source:
protected boolean isFilterStopped ( android.content.pm.PackageParser.ActivityIntentInfo filter , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return true ; android.content.pm.PackageParser.Package p = filter.activity.owner ; if ( p != null ) { com.android.server.pm.PackageSetting ps = ( ( com.android.server.pm.PackageSetting ) ( p.mExtras ) ) ; if ( ps != null ) { return ( ps.getStopped ( userId ) ) && ( ( ( ps.pkgFlags ) & ( android.content.pm.ApplicationInfo.FLAG_SYSTEM ) ) == 0 ) ; } } return false ; }

Target:
public java.util.List < android.content.pm.ResolveInfo > queryIntent ( android.content.Intent intent , java.lang.String resolvedType , int flags , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return null ; mFlags = flags ; return super . queryIntent ( intent , resolvedType , ( ( flags & ( android.content.pm.PackageManager.MATCH_DEFAULT_ONLY ) ) != 0 ) , userId ) ; }
Source:
public void testPackageOverridePackageFromFlavorWithSuffix ( ) { com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilder ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) , false ) ; mFlavor.setPackageName ( "foo.bar" ) ; mDebug.setPackageNameSuffix ( ".fortytwo" ) ; builder.setBuildVariant ( mMain , mFlavor , mDebug ) ; assertEquals ( "foo.bar.fortytwo" , builder.getPackageOverride ( "" ) ) ; }

Target:
public void testPackageOverridePackageWithSuffixOnly ( ) { com.android.utils.StdLogger logger = new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) ; com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilderTest.AndroidBuilderMock ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.builder.AndroidBuilderTest.ManifestParserMock ( "fake.package.name" ) , new com.android.builder.CommandLineRunner ( logger ) , logger , false ) ; mDebug.getBuildType ( ) . setPackageNameSuffix ( "fortytwo" ) ; builder.setBuildVariant ( mMain , mDebug ) ; builder.addProductFlavor ( mFlavor ) ; assertEquals ( "fake.package.name.fortytwo" , builder.getPackageOverride ( "" ) ) ; }
Source:
public static java.lang.String getSyntheticSwitchMapInitializerName ( com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String enumName = com.android.jack.Jack.getLookupFormatter ( ) . getName ( enumType ) ; enumName = enumName.substring ( 1 , ( ( enumName.length ( ) ) - 1 ) ) . replace ( '/' , '_' ) ; return ( ( com.android.jack.transformations.enums.OptimizationUtil.LongerPrefix ) + enumName ) + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ; }

Target:
public static java.lang.String getSyntheticSwitchMapFieldName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String enumName = com.android.jack.util.NamingTools.getValidName ( com.android.jack.ir.formatter.BinaryQualifiedNameFormatter.getFormatter ( ) . getName ( enumType ) ) ; java.lang.String fieldName = com.android.jack.util.NamingTools.getNonSourceConflictingName ( ( enumName + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ) ) ; return fieldName ; }
Source:
public java.lang.String getName ( ) { if ( ( name ) == null ) { boolean first = true ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.builder.model.ProductFlavor flavor : flavorList ) { if ( first ) { sb.append ( flavor.getName ( ) ) ; first = false ; } else { sb.append ( com.android.build.gradle.internal.StringHelper.capitalize ( flavor.getName ( ) ) ) ; } } name = sb.toString ( ) ; } return name ; }

Target:
public java.lang.String getName ( ) { if ( ( name ) == null ) { boolean first = true ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.builder.model.ProductFlavor flavor : flavorList ) { if ( first ) { sb.append ( flavor.getName ( ) ) ; first = false ; } else { sb.append ( com.android.utils.StringHelper.capitalize ( flavor.getName ( ) ) ) ; } } name = sb.toString ( ) ; } return name ; }
Source:
public void testParse_failedResult ( ) { java.lang.StringBuilder output = new java.lang.StringBuilder ( ) ; final java.lang.String errorMessage = "Unable to instantiate instrumentation" ; output.append ( "INSTRUMENTATION_RESULT: shortMsg=" ) ; output.append ( errorMessage ) ; addLineBreak ( output ) ; output.append ( "INSTRUMENTATION_CODE: 0" ) ; addLineBreak ( output ) ; mMockListener.testRunStarted ( com.android.ddmlib.testrunner.InstrumentationResultParserTest.RUN_NAME , 0 ) ; mMockListener.testRunFailed ( errorMessage ) ; mMockListener.testRunEnded ( 0 , java.util.Collections.EMPTY_MAP ) ; injectAndVerifyTestString ( output.toString ( ) ) ; }

Target:
public void testParse_failedResult ( ) { java.lang.StringBuilder output = new java.lang.StringBuilder ( ) ; final java.lang.String errorMessage = "Unable to instantiate instrumentation" ; output.append ( "INSTRUMENTATION_RESULT: shortMsg=" ) ; output.append ( errorMessage ) ; addLineBreak ( output ) ; output.append ( "INSTRUMENTATION_CODE: 0" ) ; addLineBreak ( output ) ; mMockListener.testRunStarted ( com.android.ddmlib.testrunner.InstrumentationResultParserTest.RUN_NAME , 0 ) ; mMockListener.testRunFailed ( org.easymock.EasyMock.contains ( errorMessage ) ) ; mMockListener.testRunEnded ( 0 , java.util.Collections.EMPTY_MAP ) ; injectAndVerifyTestString ( output.toString ( ) ) ; }
Source:
private void verifyImplementedInterfaces ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface t ) { for ( com.android.jack.ir.ast.JInterface jInterface : t.getImplements ( ) ) { if ( jInterface instanceof com.android.jack.ir.ast.JPhantomInterface ) { t.addMarker ( new com.android.jack.shrob.shrink.PartialTypeHierarchy ( ( ( com.android.jack.ir.ast.JPhantomInterface ) ( jInterface ) ) ) ) ; } else { assert jInterface instanceof com.android.jack.ir.ast.JDefinedInterface ; verifyImplementedInterfaces ( ( ( com.android.jack.ir.ast.JDefinedInterface ) ( jInterface ) ) ) ; } } }

Target:
private void findUnknownTypes ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass t , @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JPhantomClassOrInterface > unknownTypes ) { com.android.jack.ir.ast.JClass superClass = t.getSuperClass ( ) ; if ( superClass instanceof com.android.jack.ir.ast.JPhantomClass ) { unknownTypes.add ( ( ( com.android.jack.ir.ast.JPhantomClass ) ( superClass ) ) ) ; } else if ( superClass != null ) { findUnknownTypes ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( superClass ) ) , unknownTypes ) ; } findUnknownTypes ( t.getImplements ( ) , unknownTypes ) ; }
Source:
public void test_zh_CN ( ) throws java.lang.Exception { libcore.icu.AlphabeticIndex.ImmutableIndex zh_CN = libcore.icu.AlphabeticIndexTest.createIndex ( new java.util.Locale ( "zh" , "CN" ) ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "贾" , "J" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "沈" , "C" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "瀋" , "S" ) ; }

Target:
public void test_zh_CN ( ) throws java.lang.Exception { libcore.icu.AlphabeticIndex.ImmutableIndex zh_CN = libcore.icu.AlphabeticIndexTest.createIndex ( new java.util.Locale ( "zh" , "CN" ) ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "贾" , "J" ) ; java.lang.String shenChenLabel = zh_CN.getBucketLabel ( zh_CN.getBucketIndex ( "沈" ) ) ; assertTrue ( ( ( shenChenLabel.equals ( "C" ) ) || ( shenChenLabel.equals ( "S" ) ) ) ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "瀋" , "S" ) ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.unittest.ScriptC_single_source_script s = new com.android.rs.unittest.ScriptC_single_source_script ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.invoke_entrypoint ( testAllocation1 , testAllocation2 ) ; s.forEach_oldFoo ( testAllocation2 , testAllocation2 ) ; s.forEach_oldGoo ( testAllocation2 , testAllocation2 ) ; s.invoke_validate ( testAllocation2 ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = createRenderScript ( true ) ; com.android.rs.unittest.ScriptC_single_source_script s = new com.android.rs.unittest.ScriptC_single_source_script ( pRS ) ; initializeGlobals ( pRS , s ) ; s.invoke_entrypoint ( testAllocation1 , testAllocation2 ) ; s.forEach_oldFoo ( testAllocation2 , testAllocation2 ) ; s.forEach_oldGoo ( testAllocation2 , testAllocation2 ) ; s.invoke_validate ( testAllocation2 ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
void startBonding ( ) { mState = com.android.nfc.handover.BluetoothPeripheralHandover.STATE_BONDING ; toast ( getToastString ( R.string.pairing_peripheral ) ) ; if ( ! ( mDevice.createBond ( mTransport ) ) ) { toast ( getToastString ( R.string.pairing_peripheral_failed ) ) ; complete ( false ) ; } }

Target:
void startBonding ( ) { mState = com.android.nfc.handover.BluetoothPeripheralHandover.STATE_BONDING ; toast ( getToastString ( R.string.pairing_peripheral ) ) ; if ( ( mOobData ) != null ) { if ( ! ( mDevice.createBondOutOfBand ( mTransport , mOobData ) ) ) { toast ( getToastString ( R.string.pairing_peripheral_failed ) ) ; complete ( false ) ; } } else if ( ! ( mDevice.createBond ( mTransport ) ) ) { toast ( getToastString ( R.string.pairing_peripheral_failed ) ) ; complete ( false ) ; } }
Source:
public void testPownF32_3_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_3 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 4 ] ; android.renderscript.cts.RSUtils.genRandomInts ( 10560497 , 32 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n3 ( nAlloc ) ; doF32_3_relaxed ( 11191281 , 128 ) ; }

Target:
public void testPownF32_3_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_3 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 4 ] ; android.renderscript.cts.RSUtils.genRandomInts ( 10560497 , ( - 16 ) , 15 , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n3 ( nAlloc ) ; doF32_3_relaxed ( 11191281 , 128 ) ; }
Source:
public void testInstall_missingIcuFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle installedBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( installedBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; libcore.tzdata.update2.TimeZoneBundle incompleteBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEWER_RULES_VERSION , "001" ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertFalse ( installer.install ( incompleteBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; }

Target:
public void testInstall_missingIcuFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle installedBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( installedBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; libcore.tzdata.update2.TimeZoneBundle incompleteBundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEWER_RULES_VERSION , 1 ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_STRUCTURE , installer.installWithErrorCode ( incompleteBundle.getBytes ( ) ) ) ; assertBundleInstalled ( installedBundle ) ; }
Source:
public void test_SSLEngine_getEnabledProtocols ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; javax.net.ssl.SSLEngine e = c.clientContext.createSSLEngine ( ) ; java.lang.String [ ] protocols = e.getEnabledProtocols ( ) ; libcore.java.security.StandardNames.assertSSLEngineDefaultProtocols ( protocols ) ; assertNotSame ( protocols , e.getEnabledProtocols ( ) ) ; c.close ( ) ; }

Target:
public void test_SSLEngine_getEnabledProtocols_returnsCopies ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; javax.net.ssl.SSLEngine e = c.clientContext.createSSLEngine ( ) ; assertNotSame ( e.getEnabledProtocols ( ) , e.getEnabledProtocols ( ) ) ; c.close ( ) ; }
Source:
public void compileBouncycastle ( ) throws java.lang.Exception { java.io.File out = com.android.jack.TestTools.createTempFile ( "bouncycastle" , ".dex" ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; options.disableDxOptimizations ( ) ; com.android.jack.TestTools.compileSourceToDex ( options , com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.SOURCELIST , com.android.jack.TestTools.getClasspathAsString ( com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.BOOTCLASSPATH ) , out , false , com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.JARJAR_RULES , null , false ) ; }

Target:
public void compileBouncycastle ( ) throws java.lang.Exception { java.io.File outDexFolder = com.android.jack.TestTools.createTempDir ( "bouncycastle" , ".dex" ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; options.disableDxOptimizations ( ) ; com.android.jack.TestTools.compileSourceToDex ( options , com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.SOURCELIST , com.android.jack.TestTools.getClasspathAsString ( com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.BOOTCLASSPATH ) , outDexFolder , false , com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.JARJAR_RULES , null , false ) ; }
Source:
public void testPownF32_3 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_3 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 4 ] ; android.renderscript.cts.RSUtils.genRandom ( 10560497 , 32 , 1 , ( - 16 ) , n , 4 , 1 ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n3 ( nAlloc ) ; doF32_3 ( 11191281 , 16 ) ; }

Target:
public void testPownF32_3 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_3 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 4 ] ; android.renderscript.cts.RSUtils.genRandomInts ( 10560497 , 32 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n3 ( nAlloc ) ; doF32_3 ( 11191281 , 16 ) ; }
Source:
public boolean isCompatible ( com.android.jack.dx.dex.code.DalvInsn insn ) { com.android.jack.dx.rop.code.RegisterSpecList regs = insn.getRegisters ( ) ; return ( ( ( insn instanceof com.android.jack.dx.dex.code.SimpleInsn ) && ( ( regs.size ( ) ) == 2 ) ) && ( unsignedFitsInByte ( regs.get ( 0 ) . getReg ( ) ) ) ) && ( unsignedFitsInShort ( regs.get ( 1 ) . getReg ( ) ) ) ; }

Target:
public boolean isCompatible ( com.android.jack.dx.dex.code.DalvInsn insn ) { com.android.jack.dx.rop.code.RegisterSpecList regs = insn.getRegisters ( ) ; return ( ( ( ( insn instanceof com.android.jack.dx.dex.code.SimpleInsn ) || ( insn instanceof com.android.jack.dx.dex.code.CstInsn ) ) && ( ( regs.size ( ) ) == 2 ) ) && ( unsignedFitsInByte ( regs.get ( 0 ) . getReg ( ) ) ) ) && ( unsignedFitsInShort ( regs.get ( 1 ) . getReg ( ) ) ) ; }
Source:
public void testJustWarningAndError ( ) { com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . addWarning ( "something weird happened" ) . addError ( "something bad happened" ) . build ( ) ; assertEquals ( MergingReport.Result.ERROR , mergingReport.getResult ( ) ) ; }

Target:
public void testJustInfoAndError ( ) { com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . addMessage ( mSourceLocation , 0 , 0 , Severity.INFO , "merging info" ) . addMessage ( mSourceLocation , 0 , 0 , Severity.ERROR , "something bad happened" ) . build ( ) ; assertEquals ( MergingReport.Result.ERROR , mergingReport.getResult ( ) ) ; }
Source:
private void addJavaChanges ( org.eclipse.ltk.core.refactoring.CompositeChange result , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException , org.eclipse.core.runtime.OperationCanceledException { if ( monitor.isCanceled ( ) ) { return ; } org.eclipse.ltk.core.refactoring.RefactoringStatus status = mFieldRefactoring.checkAllConditions ( monitor ) ; if ( ( status != null ) && ( ! ( status.hasError ( ) ) ) ) { org.eclipse.ltk.core.refactoring.Change fieldChanges = mFieldRefactoring.createChange ( monitor ) ; if ( fieldChanges != null ) { result.add ( fieldChanges ) ; disableResourceFileChange ( fieldChanges ) ; } } }

Target:
private void addJavaChanges ( org.eclipse.ltk.core.refactoring.CompositeChange result , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException , org.eclipse.core.runtime.OperationCanceledException { if ( monitor.isCanceled ( ) ) { return ; } org.eclipse.ltk.core.refactoring.RefactoringStatus status = mFieldRefactoring.checkAllConditions ( monitor ) ; if ( ( status != null ) && ( ! ( status.hasError ( ) ) ) ) { org.eclipse.ltk.core.refactoring.Change fieldChanges = mFieldRefactoring.createChange ( monitor ) ; if ( fieldChanges != null ) { result.add ( fieldChanges ) ; com.android.ide.eclipse.adt.internal.refactorings.core.RenameResourceParticipant.disableRClassChanges ( fieldChanges ) ; } } }
Source:
public boolean removeUser ( int userId ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can remove users" ) ; if ( ( userId == 0 ) || ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) ) { return false ; } cleanUpUser ( userId ) ; if ( com.android.server.pm.PackageManagerService.sUserManager.removeUser ( userId ) ) { android.content.Intent addedIntent = new android.content.Intent ( android.content.Intent.ACTION_USER_REMOVED ) ; addedIntent.putExtra ( Intent.EXTRA_USERID , userId ) ; mContext.sendBroadcast ( addedIntent , android.Manifest.permission.MANAGE_ACCOUNTS ) ; } com.android.server.pm.PackageManagerService.sUserManager.removePackageFolders ( userId ) ; return true ; }

Target:
public void setComponentEnabledSetting ( android.content.ComponentName componentName , int newState , int flags , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; setEnabledSetting ( componentName.getPackageName ( ) , componentName.getClassName ( ) , newState , flags , userId ) ; }
Source:
public com.android.sched.util.config.id.KeyId < T , S > addCategory ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.sched.util.config.category.Category > category ) { this . categories.add ( category ) ; return this ; }

Target:
public com.android.sched.util.config.id.KeyId < T , S > addCategory ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.sched.util.config.category.Category > category ) { if ( ! ( hasCategory ( category ) ) ) { this . categories.put ( category , null ) ; } else { throw new com.android.sched.util.config.ConfigurationError ( ( "Duplicate category " + ( category.getCanonicalName ( ) ) ) ) ; } return this ; }
Source:
public java.lang.String getProperty ( com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor editor , org.w3c.dom.Node node , java.lang.String name ) { org.eclipse.jface.text.IDocument document = editor.getStructuredSourceViewer ( ) . getDocument ( ) ; return getProperty ( document , node , name ) ; }

Target:
public static java.lang.String getProperty ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.NonNull java.lang.String name ) { if ( ( node.getNodeType ( ) ) == ( org.w3c.dom.Node.ELEMENT_NODE ) ) { org.w3c.dom.Element element = ( ( org.w3c.dom.Element ) ( node ) ) ; java.lang.String value = element.getAttributeNS ( com.android.tools.lint.detector.api.LintConstants.TOOLS_URI , name ) ; if ( ( value != null ) && ( value.isEmpty ( ) ) ) { value = null ; } return value ; } return null ; }
Source:
public void onClose ( ) { if ( com.android.bluetooth.opp.BluetoothOppObexServerSession.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppObexServerSession.TAG , "release WakeLock" ) ; releaseWakeLocks ( ) ; if ( ( mCallback ) != null ) { android.os.Message msg = android.os.Message.obtain ( mCallback ) ; msg.what = BluetoothOppObexSession.MSG_SESSION_COMPLETE ; msg.obj = mInfo ; msg.sendToTarget ( ) ; } }

Target:
public void onClose ( ) { if ( com.android.bluetooth.opp.BluetoothOppObexServerSession.D ) android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppObexServerSession.TAG , "onClose" ) ; releaseWakeLocks ( ) ; if ( ( mServerSocket ) != null ) { if ( com.android.bluetooth.opp.BluetoothOppObexServerSession.D ) android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppObexServerSession.TAG , "prepareForNewConnect" ) ; mServerSocket.prepareForNewConnect ( ) ; } if ( ( mCallback ) != null ) { android.os.Message msg = android.os.Message.obtain ( mCallback ) ; msg.what = BluetoothOppObexSession.MSG_SESSION_COMPLETE ; msg.obj = mInfo ; msg.sendToTarget ( ) ; } }
Source:
public void setDataEnabled ( int subId , boolean enable ) { try { android.util.Log.d ( android.telephony.TelephonyManager.TAG , ( "setDataEnabled: enabled=" + enable ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setDataEnabled ( subId , enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setDataEnabled" , e ) ; } }

Target:
public boolean getDataEnabled ( int subId ) { return isUserMobileDataEnabled ( subId ) ; }
Source:
public boolean pingSupplicant ( ) { enforceAccessPermission ( ) ; mLog.trace ( "pingSupplicant uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncPingSupplicant ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return false ; } }

Target:
public java.util.List < android.net.wifi.hotspot2.PasspointConfiguration > getPasspointConfigurations ( ) { enforceAccessPermission ( ) ; mLog.trace ( "getPasspointConfigurations uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ! ( mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.config_wifi_hotspot2_enabled ) ) ) { throw new java.lang.UnsupportedOperationException ( "Passpoint not enabled" ) ; } return mWifiStateMachine.syncGetPasspointConfigs ( mWifiStateMachineChannel ) ; }
Source:
public void getCellInfoList ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GET_CELL_INFO_LIST , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void getCellInfoList ( android.os.Message result , android.os.WorkSource workSource ) { workSource = getDeafultWorkSourceIfInvalid ( workSource ) ; com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GET_CELL_INFO_LIST , result , workSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem [ ] getResources ( com.android.ide.eclipse.adt.internal.resources.ResourceType type ) { checkAndUpdate ( type ) ; if ( type == ( com.android.ide.eclipse.adt.internal.resources.ResourceType.ID ) ) { synchronized ( mIdResourceList ) { return mIdResourceList.toArray ( new com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem [ mIdResourceList.size ( ) ] ) ; } } java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > items = mResourceMap.get ( type ) ; return items.toArray ( new com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem [ items.size ( ) ] ) ; }

Target:
public com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem [ ] getResources ( com.android.resources.ResourceType type ) { checkAndUpdate ( type ) ; if ( type == ( com.android.resources.ResourceType.ID ) ) { synchronized ( mIdResourceList ) { return mIdResourceList.toArray ( new com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem [ mIdResourceList.size ( ) ] ) ; } } java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > items = mResourceMap.get ( type ) ; return items.toArray ( new com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem [ items.size ( ) ] ) ; }
Source:
public void wifiNanDestroy ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId ) throws android.os.RemoteException , org.json.JSONException { android.net.wifi.nan.WifiNanSession session ; synchronized ( mLock ) { session = mSessions.get ( clientId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanDisconnect before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } session.destroy ( ) ; }

Target:
public void wifiAwareDestroy ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId ) throws android.os.RemoteException , org.json.JSONException { android.net.wifi.aware.WifiAwareSession session ; synchronized ( mLock ) { session = mSessions.get ( clientId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwareDisconnect before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } session.destroy ( ) ; }
Source:
private void doTestDragAndDrop ( java.lang.String sourceMode , java.lang.String targetMode , java.lang.String expectedDropResult ) throws java.lang.Exception { HEAD ( 2 ) ; android.wm.cts.a1541 Merge ; }

Target:
private void doTestDragAndDrop ( java.lang.String sourceMode , java.lang.String targetMode , java.lang.String expectedDropResult ) throws java.lang.Exception { if ( ! ( supportsDragAndDrop ( ) ) ) { return ; } launchDockedActivity ( mSourcePackageName , android.wm.cts.CrossAppDragAndDropTests.SOURCE_ACTIVITY_NAME , sourceMode ) ; launchFullscreenActivity ( mTargetPackageName , android.wm.cts.CrossAppDragAndDropTests.TARGET_ACTIVITY_NAME , targetMode ) ; clearLogs ( ) ; injectInput ( getWindowCenter ( getComponentName ( mSourcePackageName , android.wm.cts.CrossAppDragAndDropTests.SOURCE_ACTIVITY_NAME ) ) , getWindowCenter ( getComponentName ( mTargetPackageName , android.wm.cts.CrossAppDragAndDropTests.TARGET_ACTIVITY_NAME ) ) , android.wm.cts.CrossAppDragAndDropTests.SWIPE_DURATION_MS ) ; mResults = getLogResults ( android.wm.cts.CrossAppDragAndDropTests.TARGET_LOG_TAG ) ; assertResult ( android.wm.cts.CrossAppDragAndDropTests.RESULT_KEY_DROP_RESULT , expectedDropResult ) ; }
Source:
protected void finishMerge ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFile out ) throws com.android.jack.backend.dex.DexWritingException { java.io.OutputStream os = null ; try { try { os = new java.io.BufferedOutputStream ( out.openWrite ( ) ) ; merger.finish ( os ) ; } finally { if ( os != null ) { os.close ( ) ; } } } catch ( java.io.IOException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }

Target:
protected void finishMerge ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFile out ) throws com.android.jack.backend.dex.DexWritingException { java.io.OutputStream os = null ; try { try { os = new java.io.BufferedOutputStream ( out.getOutputStream ( ) ) ; merger.finish ( os ) ; } finally { if ( os != null ) { os.close ( ) ; } } } catch ( java.io.IOException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }
Source:
protected byte [ ] engineUpdate ( byte [ ] input , int inputOffset , int inputLen ) { if ( ( ( bufferOffset ) + inputLen ) > ( buffer.length ) ) { inputTooLarge = true ; return libcore.util.EmptyArray.BYTE ; } java.lang.System.arraycopy ( input , inputOffset , buffer , bufferOffset , inputLen ) ; bufferOffset += inputLen ; return libcore.util.EmptyArray.BYTE ; }

Target:
protected byte [ ] engineUpdate ( byte [ ] input , int inputOffset , int inputLen ) { if ( ( ( bufferOffset ) + inputLen ) > ( buffer.length ) ) { inputTooLarge = true ; return org.conscrypt.util.EmptyArray.BYTE ; } java.lang.System.arraycopy ( input , inputOffset , buffer , bufferOffset , inputLen ) ; bufferOffset += inputLen ; return org.conscrypt.util.EmptyArray.BYTE ; }
Source:
private void preRenderingTargetChangeCleanUp ( com.android.sdklib.IAndroidTarget oldTarget ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = currentSdk.getTargetData ( oldTarget ) ; if ( data != null ) { com.android.ide.common.rendering.LayoutLibrary layoutLib = data.getLayoutLibrary ( ) ; layoutLib.clearCaches ( mEditedFile.getProject ( ) ) ; } } }

Target:
private void preRenderingTargetChangeCleanUp ( com.android.sdklib.IAndroidTarget oldTarget ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = currentSdk.getTargetData ( oldTarget ) ; if ( data != null ) { com.android.ide.common.rendering.LayoutLibrary layoutLib = data.getLayoutLibrary ( ) ; layoutLib.clearCaches ( mEditedFile.getProject ( ) ) ; } } if ( ( ( mProjectCallback ) != null ) && ( mProjectCallback.isUsed ( ) ) ) { mProjectCallback = null ; } }
Source:
public void menuShown ( org.eclipse.swt.events.MenuEvent e ) { actionHaltItem.setEnabled ( ( ( mTBHalt.getEnabled ( ) ) && ( ( mCurrentClient ) != null ) ) ) ; actionCauseGcItem.setEnabled ( ( ( mTBCauseGc.getEnabled ( ) ) && ( ( mCurrentClient ) != null ) ) ) ; }

Target:
public void menuShown ( org.eclipse.swt.events.MenuEvent e ) { actionHaltItem.setEnabled ( ( ( mTBHalt.getEnabled ( ) ) && ( ( mCurrentClient ) != null ) ) ) ; actionCauseGcItem.setEnabled ( ( ( mTBCauseGc.getEnabled ( ) ) && ( ( mCurrentClient ) != null ) ) ) ; actionResetAdb.setEnabled ( true ) ; }
Source:
synchronized int getAudioState ( ) { com.android.internal.util.IState state = getCurrentState ( ) ; if ( state == ( mAudioConnecting ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTING ; } else if ( ( state == ( mAudioDisconnecting ) ) || ( state == ( mAudioOn ) ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ; } else { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ; } }

Target:
public synchronized int getConnectionState ( ) { com.android.bluetooth.hfp.HeadsetStateMachine.HeadsetStateBase state = ( ( com.android.bluetooth.hfp.HeadsetStateMachine.HeadsetStateBase ) ( getCurrentState ( ) ) ) ; if ( state == null ) { return android.bluetooth.BluetoothHeadset.STATE_DISCONNECTED ; } return state.getConnectionStateInt ( ) ; }
Source:
private void terminateMessageLooper ( ) throws java.lang.Exception { if ( android.hardware.cts.CameraGLTest.LOGV ) android.util.Log.v ( android.hardware.cts.CameraGLTest.TAG , "Shutting down camera" ) ; mCamera.release ( ) ; mLooper.quit ( ) ; mLooper.getThread ( ) . join ( ) ; mCamera = null ; mSurfaceTexture = null ; if ( android.hardware.cts.CameraGLTest.LOGV ) android.util.Log.v ( android.hardware.cts.CameraGLTest.TAG , "Shutdown of camera complete." ) ; }

Target:
private void terminateMessageLooper ( ) throws java.lang.Exception { if ( android.hardware.cts.CameraGLTest.LOGV ) android.util.Log.v ( android.hardware.cts.CameraGLTest.TAG , "Shutting down camera" ) ; mCamera.release ( ) ; mLooper.quit ( ) ; mLooper.getThread ( ) . join ( ) ; mCamera = null ; synchronized ( mSurfaceTextureSyncLock ) { mSurfaceTexture = null ; } if ( android.hardware.cts.CameraGLTest.LOGV ) android.util.Log.v ( android.hardware.cts.CameraGLTest.TAG , "Shutdown of camera complete." ) ; }
Source:
public void testIncompatiblePlugin ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.GRADLE_PLUGIN_COMPATIBILITY ) ; assertEquals ( ( ( ( ( ( ( "" + "build.gradle:6: Error: You must use a newer version of the Android Gradle plugin. The minimum supported version is 0.12.0 and the recommended version is " ) + ( com.android.SdkConstants.GRADLE_PLUGIN_RECOMMENDED_VERSION ) ) + " [AndroidGradlePluginVersion]\n" ) + " classpath \'com.android.tools.build:gradle:0.1.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) , lintProject ( "gradle/IncompatiblePlugin.gradle=>build.gradle" ) ) ; }

Target:
public void testIncompatiblePlugin ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.GRADLE_PLUGIN_COMPATIBILITY ) ; assertEquals ( ( ( ( ( ( ( ( ( "" + "build.gradle:6: Error: You must use a newer version of the Android Gradle plugin. The minimum supported version is " ) + ( com.android.SdkConstants.GRADLE_PLUGIN_MINIMUM_VERSION ) ) + " and the recommended version is " ) + ( com.android.SdkConstants.GRADLE_PLUGIN_RECOMMENDED_VERSION ) ) + " [AndroidGradlePluginVersion]\n" ) + " classpath \'com.android.tools.build:gradle:0.1.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) , lintProject ( "gradle/IncompatiblePlugin.gradle=>build.gradle" ) ) ; }
Source:
public void testBasicWorkingSntpClientQuery ( ) throws java.lang.Exception { mServer.setServerReply ( libcore.util.HexEncoding.decode ( android.net.SntpClientTest.WORKING_VERSION4.toCharArray ( ) , false ) ) ; assertTrue ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 , mNetwork ) ) ; assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; assertEquals ( 1 , mServer.numRepliesSent ( ) ) ; }

Target:
public void testBasicWorkingSntpClientQuery ( ) throws java.lang.Exception { mServer.setServerReply ( libcore.util.HexEncoding.decode ( android.net.SntpClientTest.WORKING_VERSION4.toCharArray ( ) , false ) ) ; junit.framework.Assert.assertTrue ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 , mNetwork ) ) ; junit.framework.Assert.assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; junit.framework.Assert.assertEquals ( 1 , mServer.numRepliesSent ( ) ) ; }
Source:
public java.util.List < java.lang.String > getAbis ( ) { java.util.List < java.lang.String > abis = com.google.common.collect.Lists.newArrayListWithExpectedSize ( 2 ) ; java.lang.String abi = iDevice.getProperty ( IDevice.PROP_DEVICE_CPU_ABI ) ; if ( abi != null ) { abis.add ( abi ) ; } abi = iDevice.getProperty ( IDevice.PROP_DEVICE_CPU_ABI2 ) ; if ( abi != null ) { abis.add ( abi ) ; } return abis ; }

Target:
public java.lang.String getSerialNumber ( ) { return iDevice.getSerialNumber ( ) ; }
Source:
private void setupInCallScreen ( ) { com.android.incallui.incall.protocol.InCallScreen inCallScreen = ( ( com.android.incallui.incall.protocol.InCallScreen ) ( getSupportFragmentManager ( ) . findFragmentByTag ( com.android.incallui.callpending.CallPendingActivity.TAG_IN_CALL_SCREEN ) ) ) ; inCallScreen.setPrimary ( createPrimaryInfo ( ) ) ; inCallScreen.setCallState ( com.android.incallui.incall.protocol.PrimaryCallState.builder ( ) . setState ( State.CALL_PENDING ) . setCustomLabel ( getCallPendingLabel ( ) ) . build ( ) ) ; inCallScreen.setEndCallButtonEnabled ( true , true ) ; }

Target:
private void setupInCallScreen ( ) { com.android.incallui.incall.protocol.InCallScreen inCallScreen = ( ( com.android.incallui.incall.protocol.InCallScreen ) ( getSupportFragmentManager ( ) . findFragmentByTag ( com.android.incallui.callpending.CallPendingActivity.TAG_IN_CALL_SCREEN ) ) ) ; inCallScreen.setPrimary ( createPrimaryInfo ( ) ) ; inCallScreen.setCallState ( com.android.incallui.incall.protocol.PrimaryCallState.builder ( ) . setState ( DialerCallState.CALL_PENDING ) . setCustomLabel ( getCallPendingLabel ( ) ) . build ( ) ) ; inCallScreen.setEndCallButtonEnabled ( true , true ) ; }
Source:
public boolean isTrue ( ) throws java.lang.Exception { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textContains ( "Location" ) ) . exists ( ) ; }

Target:
public boolean isTrue ( ) throws java.lang.Exception { return ( device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( "Location" ) ) . exists ( ) ) && ( device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( "Recent location requests" ) ) . exists ( ) ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) | ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } com.android.ide.common.blame.Message that = ( ( com.android.ide.common.blame.Message ) ( o ) ) ; return ( ( ( mKind ) == ( that.mKind ) ) && ( mText.equals ( that.mText ) ) ) && ( mSourceFilePositions.equals ( that.mSourceFilePositions ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof com.android.ide.common.blame.Message ) ) { return false ; } com.android.ide.common.blame.Message that = ( ( com.android.ide.common.blame.Message ) ( o ) ) ; return ( ( com.google.common.base.Objects.equal ( mKind , that.mKind ) ) && ( com.google.common.base.Objects.equal ( mText , that.mText ) ) ) && ( com.google.common.base.Objects.equal ( mSourceFilePositions , mSourceFilePositions ) ) ; }
Source:
public static java.lang.String get ( java.lang.String key , java.lang.String def ) { if ( ( key.length ( ) ) > ( android.os.SystemProperties.PROP_NAME_MAX ) ) { throw new java.lang.IllegalArgumentException ( ( "key.length > " + ( android.os.SystemProperties.PROP_NAME_MAX ) ) ) ; } return android.os.SystemProperties.native_get ( key , def ) ; }

Target:
public static java.lang.String get ( java.lang.String key , java.lang.String def ) { if ( ( key.length ( ) ) > ( android.os.SystemProperties.PROP_NAME_MAX ) ) { throw new java.lang.IllegalArgumentException ( ( "key.length > " + ( android.os.SystemProperties.PROP_NAME_MAX ) ) ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; return android.os.SystemProperties.native_get ( key , def ) ; }