auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
static int [ ] removeInts ( int [ ] cur , int [ ] rem ) { if ( rem == null ) return cur ; if ( cur == null ) return cur ; final int N = rem.length ; for ( int i = 0 ; i < N ; i ++ ) { cur = com.android.server.pm.PackageManagerService.removeInt ( cur , rem [ i ] ) ; } return cur ; }

Target:
static int [ ] removeInts ( int [ ] cur , int [ ] rem ) { if ( rem == null ) return cur ; if ( cur == null ) return cur ; final int N = rem.length ; for ( int i = 0 ; i < N ; i ++ ) { cur = com.android.internal.util.ArrayUtils.removeInt ( cur , rem [ i ] ) ; } return cur ; }
Source:
public void startLockTaskModeOnCurrent ( ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "startLockTaskModeOnCurrent" ) ; com.android.server.am.ActivityRecord r = null ; synchronized ( this ) { r = mStackSupervisor.topRunningActivityLocked ( ) ; } startLockTaskMode ( r.task ) ; }

Target:
public void startLockTaskModeOnCurrent ( ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "startLockTaskModeOnCurrent" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { com.android.server.am.ActivityRecord r = null ; synchronized ( this ) { r = mStackSupervisor.topRunningActivityLocked ( ) ; } startLockTaskMode ( r.task ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
private final void resetContext ( ) { org.conscrypt.NativeRef.EVP_MD_CTX ctxLocal = new org.conscrypt.NativeRef.EVP_MD_CTX ( org.conscrypt.NativeCrypto.EVP_MD_CTX_create ( ) ) ; org.conscrypt.NativeCrypto.EVP_MD_CTX_init ( ctxLocal ) ; final org.conscrypt.OpenSSLKey macKey = this . macKey ; if ( macKey != null ) { org.conscrypt.NativeCrypto.EVP_DigestSignInit ( ctxLocal , evp_md , macKey.getNativeRef ( ) ) ; } this . ctx = ctxLocal ; }

Target:
private final void resetContext ( ) { org.conscrypt.NativeRef.HMAC_CTX ctxLocal = new org.conscrypt.NativeRef.HMAC_CTX ( org.conscrypt.NativeCrypto.HMAC_CTX_new ( ) ) ; if ( ( keyBytes ) != null ) { org.conscrypt.NativeCrypto.HMAC_Init_ex ( ctxLocal , keyBytes , evp_md ) ; } this . ctx = ctxLocal ; }
Source:
public java.lang.String getVoiceMailAlphaTag ( ) { java.lang.String ret ; com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; ret = ( r != null ) ? r.getVoiceMailAlphaTag ( ) : "" ; if ( ( ret == null ) || ( ( ret.length ( ) ) == 0 ) ) { return mContext.getText ( com.android.internal.R.string.defaultVoiceMailAlphaTag ) . toString ( ) ; } return ret ; }

Target:
public java.lang.String getVoiceMailAlphaTag ( ) { java.lang.String ret ; com.android.internal.telephony.uicc.IccRecords r = mIccRecords.get ( ) ; ret = ( r != null ) ? r.getVoiceMailAlphaTag ( ) : "" ; if ( ( ret == null ) || ( ( ret.length ( ) ) == 0 ) ) { return mContext.getText ( com.android.internal.R.string.defaultVoiceMailAlphaTag ) . toString ( ) ; } return ret ; }
Source:
public void addGeneratedSourceFolders ( @ com.android.annotations.NonNull org.gradle.api.Task task , @ com.android.annotations.NonNull java.lang.Iterable < java.io.File > generatedSourceFolders ) { if ( ( extraGeneratedSourceFolders ) == null ) { extraGeneratedSourceFolders = com.google.common.collect.Lists.newArrayList ( ) ; } javaCompileTask.dependsOn ( task ) ; for ( java.io.File f : generatedSourceFolders ) { extraGeneratedSourceFolders.add ( f ) ; javaCompileTask.source ( f ) ; } }

Target:
public void registerJavaGeneratingTask ( @ com.android.annotations.NonNull org.gradle.api.Task task , @ com.android.annotations.NonNull java.io.File ... generatedSourceFolders ) { if ( ( extraGeneratedSourceFolders ) == null ) { extraGeneratedSourceFolders = com.google.common.collect.Lists.newArrayList ( ) ; } javaCompileTask.dependsOn ( task ) ; for ( java.io.File f : generatedSourceFolders ) { javaCompileTask.source ( f ) ; } addJavaSourceFoldersToModel ( generatedSourceFolders ) ; }
Source:
public final java.lang.String getClassName ( com.android.tools.perflib.heap.State state ) { com.android.tools.perflib.heap.ClassObj theClass ; if ( ( mType ) == ( RootType.SYSTEM_CLASS ) ) { theClass = state.findClass ( mId ) ; } else { theClass = state.findReference ( mId ) . getClassObj ( ) ; } if ( theClass == null ) { return "no class defined!!" ; } return theClass.mClassName ; }

Target:
public final java.lang.String getClassName ( com.android.tools.perflib.heap.Snapshot snapshot ) { com.android.tools.perflib.heap.ClassObj theClass ; if ( ( mType ) == ( RootType.SYSTEM_CLASS ) ) { theClass = snapshot.findClass ( mId ) ; } else { theClass = snapshot.findReference ( mId ) . getClassObj ( ) ; } if ( theClass == null ) { return "no class defined!!" ; } return theClass.mClassName ; }
Source:
public void test_dropSourceSpecific_twice_IPv4 ( ) throws java.lang.Exception { test_dropSourceSpecific_twice ( libcore.java.nio.channels.DatagramChannelMulticastTest.GOOD_MULTICAST_IPv4 , libcore.java.nio.channels.DatagramChannelMulticastTest.UNICAST_IPv4_1 ) ; }

Target:
public void test_joinSourceSpecific_nonUniicastSourceAddress_IPv6 ( ) throws java.lang.Exception { if ( ! ( supportsMulticast ) ) { return ; } java.nio.channels.DatagramChannel dc = createReceiverChannel ( ) ; try { dc.join ( libcore.java.nio.channels.DatagramChannelMulticastTest.GOOD_MULTICAST_IPv6 , ipv6NetworkInterface , libcore.java.nio.channels.DatagramChannelMulticastTest.BAD_MULTICAST_IPv6 ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } dc.close ( ) ; }
Source:
public java.lang.String getShortDescription ( ) { java.lang.String s = java.lang.String.format ( "Samples for SDK API %1$s%2$s, revision %3$d%4$s" , mVersion.getApiString ( ) , ( mVersion.isPreview ( ) ? " Preview" : "" ) , getRevision ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; return s ; }

Target:
public java.lang.String getShortDescription ( ) { java.lang.String s = java.lang.String.format ( "Samples for SDK API %1$s%2$s, revision %3$s%4$s" , mVersion.getApiString ( ) , ( mVersion.isPreview ( ) ? " Preview" : "" ) , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; return s ; }
Source:
public void cannotForgetNetworkConfigWhenWifiDisabled ( ) throws java.lang.Exception { mWsm.sendMessage ( WifiManager.FORGET_NETWORK , 0 , com.android.server.wifi.WifiStateMachineTest.MANAGED_PROFILE_UID ) ; mLooper.dispatchAll ( ) ; verify ( mWifiConfigManager , never ( ) ) . removeNetwork ( anyInt ( ) , anyInt ( ) ) ; }

Target:
public void canForgetNetworkConfigInClientMode ( ) throws java.lang.Exception { when ( mWifiConfigManager.removeNetwork ( eq ( 0 ) , anyInt ( ) ) ) . thenReturn ( true ) ; addNetworkAndVerifySuccess ( ) ; mWsm.sendMessage ( WifiManager.FORGET_NETWORK , 0 , com.android.server.wifi.WifiStateMachineTest.MANAGED_PROFILE_UID ) ; mLooper.dispatchAll ( ) ; verify ( mWifiConfigManager ) . removeNetwork ( anyInt ( ) , anyInt ( ) ) ; }
Source:
public void testAesCbcHmacSha256Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha384Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV6_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV6_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
public static void jarjarJackToJack ( com.android.jack.Options options , java.io.File in , java.lang.String classpath , java.io.File out , java.io.File jarjarRules , boolean zip ) throws java.lang.Exception { options.jayceImport = new java.util.ArrayList < java.io.File > ( 1 ) ; options.jayceImport.add ( in ) ; options.classpath = classpath ; if ( zip ) { options.libraryOutZip = out ; } else { options.libraryOutDir = out ; } options.jarjarRulesFile = jarjarRules ; com.android.jack.Jack.run ( options ) ; }

Target:
public static void jarjarJackToJack ( com.android.jack.Options options , java.io.File in , java.lang.String classpath , java.io.File out , java.io.File jarjarRules , boolean zip ) throws java.lang.Exception { options.importedLibraries = new java.util.ArrayList < java.io.File > ( 1 ) ; options.importedLibraries.add ( in ) ; options.classpath = classpath ; if ( zip ) { options.libraryOutZip = out ; } else { options.libraryOutDir = out ; } options.jarjarRulesFile = jarjarRules ; com.android.jack.Jack.run ( options ) ; }
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 sendDialerSpecialCode ( java.lang.String inputCode ) { try { final com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; telephony.sendDialerSpecialCode ( mContext.getOpPackageName ( ) , inputCode ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowFromSystemServer ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } }
Source:
public java.lang.String getObject ( java.util.spi.CurrencyNameProvider currencyNameProvider , java.util.Locale locale , java.lang.String key , java.lang.Object ... params ) { assert ( params.length ) == 1 ; int type = ( ( java.lang.Integer ) ( params [ 0 ] ) ) ; switch ( type ) { case java.util.Currency.SYMBOL : return currencyNameProvider.getSymbol ( key , locale ) ; case java.util.Currency.DISPLAYNAME : return currencyNameProvider.getDisplayName ( key , locale ) ; default : assert false ; } return null ; }

Target:
public int getNumericCode ( ) { return icuCurrency.getNumericCode ( ) ; }
Source:
public java.util.List < java.lang.String > callGetSelectionHint ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy parentNode , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy childNode ) { com.android.ide.common.api.IViewRule rule = loadRule ( parentNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.getSelectionHint ( parentNode , childNode ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%getSelectionHint() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }

Target:
public java.util.List < java.lang.String > callGetSelectionHint ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy parentNode , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy childNode ) { com.android.ide.common.api.IViewRule rule = loadRule ( parentNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.getSelectionHint ( parentNode , childNode ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.getSelectionHint() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }
Source:
public static java.lang.String toASCII ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToASCII ( input , result , info ) ; if ( info.hasErrors ( ) ) { throw new java.lang.IllegalArgumentException ( ( "Invalid input to toASCII: " + input ) ) ; } return result.toString ( ) ; }

Target:
public static java.lang.String toASCII ( java.lang.String input , int flags ) { return libcore.icu.NativeIDN.toASCII ( input , flags ) ; }
Source:
public void setUidForeground ( int uid , boolean uidForeground ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.MODIFY_NETWORK_ACCOUNTING , com.android.server.net.NetworkStatsService.TAG ) ; synchronized ( mStatsLock ) { final int set = ( uidForeground ) ? android.net.NetworkStats.SET_FOREGROUND : android.net.NetworkStats.SET_DEFAULT ; final int oldSet = mActiveUidCounterSet.get ( uid , android.net.NetworkStats.SET_DEFAULT ) ; if ( oldSet != set ) { mActiveUidCounterSet.put ( uid , set ) ; com.android.server.NetworkManagementSocketTagger.setKernelCounterSet ( uid , set ) ; } } }

Target:
public void setUidForeground ( int uid , boolean uidForeground ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.CONNECTIVITY_INTERNAL , com.android.server.net.NetworkStatsService.TAG ) ; synchronized ( mStatsLock ) { final int set = ( uidForeground ) ? android.net.NetworkStats.SET_FOREGROUND : android.net.NetworkStats.SET_DEFAULT ; final int oldSet = mActiveUidCounterSet.get ( uid , android.net.NetworkStats.SET_DEFAULT ) ; if ( oldSet != set ) { mActiveUidCounterSet.put ( uid , set ) ; com.android.server.NetworkManagementSocketTagger.setKernelCounterSet ( uid , set ) ; } } }
Source:
private int getWifiBadgeResourceForEnum ( int badgeEnum ) { switch ( badgeEnum ) { case android.net.ScoredNetwork.BADGING_SD : return com.android.internal.R.drawable.ic_signal_wifi_badged_sd ; case android.net.ScoredNetwork.BADGING_HD : return com.android.internal.R.drawable.ic_signal_wifi_badged_hd ; case android.net.ScoredNetwork.BADGING_4K : return com.android.internal.R.drawable.ic_signal_wifi_badged_4k ; default : throw new java.lang.IllegalArgumentException ( ( "No badge resource for enum :" + badgeEnum ) ) ; } }

Target:
private int getWifiBadgeResourceForEnum ( int badgeEnum ) { switch ( badgeEnum ) { case android.net.ScoredNetwork.BADGING_NONE : return 0 ; case android.net.ScoredNetwork.BADGING_SD : return R.drawable.ic_signal_wifi_badged_sd ; case android.net.ScoredNetwork.BADGING_HD : return R.drawable.ic_signal_wifi_badged_hd ; case android.net.ScoredNetwork.BADGING_4K : return R.drawable.ic_signal_wifi_badged_4k ; default : throw new java.lang.IllegalArgumentException ( ( "No badge resource for enum :" + badgeEnum ) ) ; } }
Source:
public static java.security.cert.X509Certificate createCa ( java.security.PublicKey publicKey , java.security.PrivateKey privateKey , java.lang.String subject ) { try { javax.security.auth.x500.X500Principal principal = new javax.security.auth.x500.X500Principal ( subject ) ; return libcore.java.security.TestKeyStore.createCertificate ( publicKey , privateKey , principal , principal , 0 , true , new java.util.Vector < com.android.org.bouncycastle.asn1.x509.GeneralName > ( ) , new java.util.Vector < com.android.org.bouncycastle.asn1.x509.GeneralSubtree > ( ) , new java.util.Vector < com.android.org.bouncycastle.asn1.x509.GeneralSubtree > ( ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public static java.security.cert.X509Certificate createCa ( java.security.PublicKey publicKey , java.security.PrivateKey privateKey , java.lang.String subject ) { try { javax.security.auth.x500.X500Principal principal = new javax.security.auth.x500.X500Principal ( subject ) ; return libcore.java.security.TestKeyStore.createCertificate ( publicKey , privateKey , principal , principal , 0 , true , new java.util.ArrayList < com.android.org.bouncycastle.asn1.x509.KeyPurposeId > ( ) , new java.util.ArrayList < java.lang.Boolean > ( ) , new java.util.ArrayList < com.android.org.bouncycastle.asn1.x509.GeneralName > ( ) , new java.util.ArrayList < com.android.org.bouncycastle.asn1.x509.GeneralSubtree > ( ) , new java.util.ArrayList < com.android.org.bouncycastle.asn1.x509.GeneralSubtree > ( ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public static org.bouncycastle.crypto.params.DHPrivateKeyParameters generateEphemeralServerKeyExchange ( java.security.SecureRandom random , org.bouncycastle.crypto.params.DHParameters dhParams , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.AsymmetricCipherKeyPair kp = org.bouncycastle.crypto.tls.TlsDHUtils.generateDHKeyPair ( random , dhParams ) ; org.bouncycastle.crypto.params.DHPublicKeyParameters dhPublicKey = ( ( org.bouncycastle.crypto.params.DHPublicKeyParameters ) ( kp.getPublic ( ) ) ) ; org.bouncycastle.crypto.tls.ServerDHParams params = new org.bouncycastle.crypto.tls.ServerDHParams ( dhPublicKey ) ; params.encode ( output ) ; return ( ( org.bouncycastle.crypto.params.DHPrivateKeyParameters ) ( kp.getPrivate ( ) ) ) ; }

Target:
public static org.bouncycastle.crypto.params.DHPrivateKeyParameters generateEphemeralServerKeyExchange ( java.security.SecureRandom random , org.bouncycastle.crypto.params.DHParameters dhParams , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.AsymmetricCipherKeyPair kp = org.bouncycastle.crypto.tls.TlsDHUtils.generateDHKeyPair ( random , dhParams ) ; org.bouncycastle.crypto.params.DHPublicKeyParameters dhPublic = ( ( org.bouncycastle.crypto.params.DHPublicKeyParameters ) ( kp.getPublic ( ) ) ) ; new org.bouncycastle.crypto.tls.ServerDHParams ( dhPublic ) . encode ( output ) ; return ( ( org.bouncycastle.crypto.params.DHPrivateKeyParameters ) ( kp.getPrivate ( ) ) ) ; }
Source:
protected void handleClick ( ) { if ( ( mAdapter ) == null ) return ; com.android.internal.logging.MetricsLogger.action ( mContext , getMetricsCategory ( ) , ( ! ( mState.value ) ) ) ; if ( ! ( mAdapter.isEnabled ( ) ) ) { mAdapter.enable ( ) ; } else { mAdapter.disable ( ) ; } }

Target:
protected void handleClick ( ) { com.android.internal.logging.MetricsLogger.action ( mContext , getMetricsCategory ( ) , ( ! ( mState.value ) ) ) ; if ( ! ( getAdapter ( ) . isEnabled ( ) ) ) { getAdapter ( ) . enable ( ) ; } else { getAdapter ( ) . disable ( ) ; } }
Source:
private static void testPackagePrivateConstructor ( ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "sub.PPClass" ) ; java.lang.reflect.Constructor cons = c.getConstructor ( ) ; cons.newInstance ( ) ; throw new java.lang.RuntimeException ( "Expected IllegalAccessException." ) ; } catch ( java.lang.IllegalAccessException e ) { } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }

Target:
private static void testPackagePrivateConstructor ( ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "sub.PPClass" ) ; java.lang.reflect.Constructor < ? > cons = c.getConstructor ( ) ; cons.newInstance ( ) ; throw new java.lang.RuntimeException ( "Expected IllegalAccessException." ) ; } catch ( java.lang.IllegalAccessException e ) { } catch ( java.lang.Exception e ) { e.printStackTrace ( java.lang.System.out ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.DiffFieldsTest" , "com.android.ahat.DiffTest" , "com.android.ahat.DominatorsTest" , "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.ProguardMapTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" , "com.android.ahat.SiteTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.DiffFieldsTest" , "com.android.ahat.DiffTest" , "com.android.ahat.DominatorsTest" , "com.android.ahat.HtmlEscaperTest" , "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.ProguardMapTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" , "com.android.ahat.SiteTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }
Source:
public void tearDown ( ) { mA2dpService.stop ( ) ; mA2dpService.cleanup ( ) ; mA2dpService = null ; mTargetContext.unregisterReceiver ( mConnectionStateChangedReceiver ) ; mConnectionStateChangedQueue.clear ( ) ; }

Target:
private void stopService ( ) throws java.util.concurrent.TimeoutException { android.content.Intent stopIntent = new android.content.Intent ( android.support.test.InstrumentationRegistry.getTargetContext ( ) , com.android.bluetooth.a2dp.A2dpService.class ) ; stopIntent.putExtra ( AdapterService.EXTRA_ACTION , AdapterService.ACTION_SERVICE_STATE_CHANGED ) ; stopIntent.putExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.STATE_OFF ) ; mServiceRule.startService ( stopIntent ) ; verify ( mAdapterService , timeout ( com.android.bluetooth.a2dp.A2dpServiceTest.TIMEOUT_MS ) ) . onProfileServiceStateChanged ( eq ( com.android.bluetooth.a2dp.A2dpService.class . getName ( ) ) , eq ( BluetoothAdapter.STATE_OFF ) ) ; mA2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; org.junit.Assert.assertNull ( mA2dpService ) ; }
Source:
static java.lang.String getSimpleName ( @ javax.annotation.Nonnull java.util.zip.ZipEntry entry ) { java.lang.String name = entry.getName ( ) ; int index = name.lastIndexOf ( com.android.sched.vfs.ZipUtils.IN_ZIP_SEPARATOR ) ; if ( index < 0 ) { return name ; } else { return name.substring ( ( index + 1 ) ) ; } }

Target:
static java.lang.String getSimpleName ( @ javax.annotation.Nonnull java.util.zip.ZipEntry entry ) { java.lang.String name = entry.getName ( ) ; assert ! ( name.endsWith ( ( "" + ( com.android.sched.vfs.ZipUtils.IN_ZIP_SEPARATOR ) ) ) ) ; int index = name.lastIndexOf ( com.android.sched.vfs.ZipUtils.IN_ZIP_SEPARATOR ) ; if ( index < 0 ) { return name ; } else { return name.substring ( ( index + 1 ) ) ; } }
Source:
private static void edgeSplitMoveExceptionsAndResults ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getInternalBlocksUnordered ( ) ) { if ( ( ( ! ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) ) && ( ( com.android.jack.transformations.ssa.SsaUtil.getNumPredecessor ( block ) ) > 1 ) ) && ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) { } } }

Target:
private static void edgeSplitMoveExceptionsAndResults ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getInternalBlocksUnordered ( ) ) { if ( ( ( ! ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) ) && ( ( block.getPredecessorCount ( ) ) > 1 ) ) && ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock predecssor : block.getPredecessors ( ) ) { predecssor.split ( 0 ) ; } } } }
Source:
public java.util.List < java.lang.String > getKeepUninstalledPackages ( @ android.annotation.NonNull android.content.ComponentName admin ) { throwIfParentInstance ( "getKeepUninstalledPackages" ) ; if ( ( mService ) != null ) { try { return mService.getKeepUninstalledPackages ( admin ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }

Target:
public java.util.List < java.lang.String > getKeepUninstalledPackages ( @ android.annotation.Nullable android.content.ComponentName admin ) { throwIfParentInstance ( "getKeepUninstalledPackages" ) ; if ( ( mService ) != null ) { try { return mService.getKeepUninstalledPackages ( admin , mContext.getPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }
Source:
public void testDeserializeNullUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( "3742453657269616c697a61626c65436f6e7461696e65723100000000000000000200014c000e7" + "56e73657269616c697a61626c657400124c6a6176612f6c616e672f4f626a6563743b787070" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; libcore.java.io.SerializationTest.SerializableContainer1 sc = ( ( libcore.java.io.SerializationTest.SerializableContainer1 ) ( libcore.util.SerializationTester.deserializeHex ( s ) ) ) ; assertNull ( sc.unserializable ) ; assertTrue ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; }

Target:
public void testDeserializeNullUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( "3742453657269616c697a61626c65436f6e7461696e65723100000000000000000200014c000e7" + "56e73657269616c697a61626c657400124c6a6176612f6c616e672f4f626a6563743b787070" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; libcore.java.io.SerializationTest.SerializableContainer1 sc = ( ( libcore.java.io.SerializationTest.SerializableContainer1 ) ( libcore.libcore.util.SerializationTester.deserializeHex ( s ) ) ) ; assertNull ( sc.unserializable ) ; assertTrue ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; }
Source:
public void onAudioBufferConsumed ( android.media.MediaSync sync , java.nio.ByteBuffer byteBuffer , int bufferIndex ) { android.media.cts.MediaSyncTest.Decoder decoderAudio = mDecoderAudio ; if ( decoderAudio != null ) { decoderAudio.releaseOutputBuffer ( bufferIndex , NO_TIMESTAMP ) ; } synchronized ( conditionFirstAudioBuffer ) { conditionFirstAudioBuffer.notify ( ) ; } }

Target:
public void onAudioBufferConsumed ( android.media.MediaSync sync , java.nio.ByteBuffer byteBuffer , int bufferIndex ) { android.media.cts.MediaSyncTest.Decoder decoderAudio = mDecoderAudio ; if ( decoderAudio != null ) { decoderAudio.releaseOutputBuffer ( bufferIndex , NO_TIMESTAMP ) ; } synchronized ( conditionFirstAudioBuffer ) { synchronized ( mConditionTaggedAudioBufferIndex ) { if ( ( ( mTaggedAudioBufferIndex ) >= 0 ) && ( ( mTaggedAudioBufferIndex ) == bufferIndex ) ) { conditionFirstAudioBuffer.notify ( ) ; } } } }
Source:
private com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor createElement ( java.lang.String xmlName , com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor [ ] childrenElements , com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor.Mandatory mandatory ) { java.lang.String styleName = guessStyleName ( xmlName ) ; java.lang.String sdkUrl = ( com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.MANIFEST_SDK_URL ) + styleName ; java.lang.String uiName = getUiName ( xmlName ) ; com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor element = new com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.ManifestElementDescriptor ( xmlName , uiName , null , sdkUrl , null , childrenElements , mandatory ) ; return element ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor createElement ( java.lang.String xmlName , com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor [ ] childrenElements , com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor.Mandatory mandatory ) { java.lang.String styleName = guessStyleName ( xmlName ) ; java.lang.String sdkUrl = ( com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.MANIFEST_SDK_URL ) + styleName ; java.lang.String uiName = com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors.getUiName ( xmlName ) ; com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor element = new com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.ManifestElementDescriptor ( xmlName , uiName , null , sdkUrl , null , childrenElements , mandatory ) ; return element ; }
Source:
public void onIntrData ( android.bluetooth.BluetoothDevice device , byte reportId , byte [ ] data ) { com.googlecode.android_scripting.Log.d ( ( ( ( "onIntrData: device=" + device ) + " reportId=" ) + reportId ) ) ; android.os.Bundle result = new android.os.Bundle ( ) ; result.putByte ( "registered" , reportId ) ; result.putByteArray ( "data" , data ) ; mEventFacade.postEvent ( "onIntrData" , result ) ; }

Target:
public void onInterruptData ( android.bluetooth.BluetoothDevice device , byte reportId , byte [ ] data ) { com.googlecode.android_scripting.Log.d ( ( ( ( "onInterruptData: device=" + device ) + " reportId=" ) + reportId ) ) ; android.os.Bundle result = new android.os.Bundle ( ) ; result.putByte ( "registered" , reportId ) ; result.putByteArray ( "data" , data ) ; mEventFacade.postEvent ( "onInterruptData" , result ) ; }
Source:
public abstract void visitMethodInsn ( final int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) ;

Target:
public void visitMethodInsn ( final int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc , final boolean itf ) { if ( ( api ) < ( org.objectweb.asm.Opcodes.ASM5 ) ) { if ( itf != ( opcode == ( org.objectweb.asm.Opcodes.INVOKEINTERFACE ) ) ) { throw new java.lang.IllegalArgumentException ( "INVOKESPECIAL/STATIC on interfaces require ASM 5" ) ; } visitMethodInsn ( opcode , owner , name , desc ) ; return ; } throw new java.lang.RuntimeException ( "Must be overriden" ) ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { long time = org.conscrypt.NativeCrypto.SSL_SESSION_get_time ( session ) ; assertTrue ( ( time != 0 ) ) ; assertTrue ( ( time < ( java.lang.System.currentTimeMillis ( ) ) ) ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void run ( long sslSession ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.SSL_shutdown ( sslSession , null , org.conscrypt.NativeCryptoTest.DUMMY_CB ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }
Source:
public void dispose ( ) { super . dispose ( ) ; if ( mDisposeImage ) { mImage.dispose ( ) ; } mImage = null ; }

Target:
public void dispose ( ) { super . dispose ( ) ; if ( ( ( mDisposeImage ) && ( ( mImage ) != null ) ) && ( ! ( mImage.isDisposed ( ) ) ) ) { mImage.dispose ( ) ; } mImage = null ; }
Source:
private static final void replaceAllLogFormatters ( java.util.logging.Formatter form ) { java.util.logging.LogManager mgr = java.util.logging.LogManager.getLogManager ( ) ; java.util.Enumeration < java.lang.String > loggerNames = mgr.getLoggerNames ( ) ; while ( loggerNames.hasMoreElements ( ) ) { java.lang.String loggerName = loggerNames.nextElement ( ) ; java.util.logging.Logger logger = mgr.getLogger ( loggerName ) ; for ( java.util.logging.Handler handler : logger.getHandlers ( ) ) { handler.setFormatter ( form ) ; handler.setLevel ( java.util.logging.Level.INFO ) ; } } }

Target:
private static final void replaceAllLogFormatters ( java.util.logging.Formatter form , java.util.logging.Level level ) { java.util.logging.LogManager mgr = java.util.logging.LogManager.getLogManager ( ) ; java.util.Enumeration < java.lang.String > loggerNames = mgr.getLoggerNames ( ) ; while ( loggerNames.hasMoreElements ( ) ) { java.lang.String loggerName = loggerNames.nextElement ( ) ; java.util.logging.Logger logger = mgr.getLogger ( loggerName ) ; for ( java.util.logging.Handler handler : logger.getHandlers ( ) ) { handler.setFormatter ( form ) ; handler.setLevel ( level ) ; } } }
Source:
public java.util.Collection < com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem > getResourceItemsOfType ( com.android.resources.ResourceType type ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem > list = mResourceMap.get ( type ) ; if ( list == null ) { return java.util.Collections.emptyList ( ) ; } java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem > roList = mReadOnlyListMap.get ( list ) ; if ( roList == null ) { roList = java.util.Collections.unmodifiableList ( list ) ; mReadOnlyListMap.put ( list , roList ) ; } return roList ; }

Target:
public java.util.Collection < com.android.ide.common.resources.ResourceItem > getResourceItemsOfType ( com.android.resources.ResourceType type ) { java.util.List < com.android.ide.common.resources.ResourceItem > list = mResourceMap.get ( type ) ; if ( list == null ) { return java.util.Collections.emptyList ( ) ; } java.util.List < com.android.ide.common.resources.ResourceItem > roList = mReadOnlyListMap.get ( list ) ; if ( roList == null ) { roList = java.util.Collections.unmodifiableList ( list ) ; mReadOnlyListMap.put ( list , roList ) ; } return roList ; }
Source:
public java.util.List < com.google.currysrc.api.transform.DocumentTransformRule > getDocumentTransformRules ( java.io.File file ) { return com.google.common.collect.Lists.newArrayList ( com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.createMandatoryRule ( new com.google.currysrc.transformers.InsertHeader ( com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.SOURCE_CODE_HEADER ) ) ) ; }

Target:
public java.util.List < com.google.currysrc.api.transform.DocumentTransformRule > getDocumentTransformRules ( java.io.File file ) { return com.google.common.collect.Lists.newArrayList ( com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.createMandatoryRule ( new com.google.currysrc.transformers.InsertHeader ( com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.SOURCE_CODE_HEADER ) ) , com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.createOptionalRule ( new com.google.currysrc.transformers.HidePublicClasses ( java.util.Collections.< com.google.currysrc.api.transform.ast.TypeLocater > emptyList ( ) , "All android.icu classes are currently hidden" ) ) , com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.createOptionalRule ( new com.android.icu4j.srcgen.MungeIcuJavaDocTags ( ) ) ) ; }
Source:
public int hashCode ( ) { return com.google.common.base.Objects.hashCode ( initialCapacity , maximumSize , maximumWeight , concurrencyLevel , keyStrength , valueStrength , com.google.common.cache.CacheBuilderSpec.durationInNanos ( writeExpirationDuration , writeExpirationTimeUnit ) , com.google.common.cache.CacheBuilderSpec.durationInNanos ( accessExpirationDuration , accessExpirationTimeUnit ) , com.google.common.cache.CacheBuilderSpec.durationInNanos ( refreshDuration , refreshTimeUnit ) ) ; }

Target:
public int hashCode ( ) { return com.google.common.base.Objects.hashCode ( initialCapacity , maximumSize , maximumWeight , concurrencyLevel , keyStrength , valueStrength , recordStats , com.google.common.cache.CacheBuilderSpec.durationInNanos ( writeExpirationDuration , writeExpirationTimeUnit ) , com.google.common.cache.CacheBuilderSpec.durationInNanos ( accessExpirationDuration , accessExpirationTimeUnit ) , com.google.common.cache.CacheBuilderSpec.durationInNanos ( refreshDuration , refreshTimeUnit ) ) ; }
Source:
public void test_ConstructorLjava_lang_String ( ) throws java.io.IOException { f = java.io.File.createTempFile ( "FileOutputStreamTest" , "tst" ) ; java.lang.String fileName = f.getAbsolutePath ( ) ; fos = new java.io.FileOutputStream ( fileName ) ; new java.io.FileOutputStream ( "nul" ) ; }

Target:
public void test_ConstructorLjava_lang_String ( ) throws java.io.IOException { f = java.io.File.createTempFile ( "FileOutputStreamTest" , "tst" ) ; java.lang.String fileName = f.getAbsolutePath ( ) ; fos = new java.io.FileOutputStream ( fileName ) ; fos = new java.io.FileOutputStream ( "/dev/null" ) ; fos.close ( ) ; }
Source:
private boolean install ( libcore.tzdata.update2.ConfigBundle configBundle ) throws java.lang.Exception { return installer.install ( configBundle.getBundleBytes ( ) ) ; }

Target:
public void testInstallWithMissingBundleVersionFile ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createTzDataBundleWithoutFormatVersionFile ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertFalse ( installer.install ( tzData.getBundleBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
private static void testThreadCapacity ( ) throws java.lang.Exception { Main.TestCapacityThread [ ] threads = new Main.TestCapacityThread [ 512 ] ; for ( int i = 0 ; i < 512 ; i ++ ) { threads [ i ] = new Main.TestCapacityThread ( ) ; } for ( Main.TestCapacityThread thread : threads ) { thread.start ( ) ; } for ( Main.TestCapacityThread thread : threads ) { thread.join ( ) ; } java.lang.System.out.println ( ( "testThreadCapacity thread count: " + ( Main.TestCapacityThread.mCount ) ) ) ; }

Target:
private static void testThreadCapacity ( ) throws java.lang.Exception { Main.TestCapacityThread [ ] threads = new Main.TestCapacityThread [ 128 ] ; for ( int i = 0 ; i < ( threads.length ) ; i ++ ) { threads [ i ] = new Main.TestCapacityThread ( ) ; } for ( Main.TestCapacityThread thread : threads ) { thread.start ( ) ; } for ( Main.TestCapacityThread thread : threads ) { thread.join ( ) ; } java.lang.System.out.println ( ( "testThreadCapacity thread count: " + ( Main.TestCapacityThread.mCount ) ) ) ; }
Source:
private void sendConnectCancelMessage ( ) { if ( ( mSessionStatusHandler ) != null ) { android.os.Message msg = mSessionStatusHandler.obtainMessage ( com.android.bluetooth.map.BluetoothMapService.MSG_MAS_CONNECT_CANCEL ) ; msg.sendToTarget ( ) ; } }

Target:
public void sendStartListenerMessage ( int masId ) { if ( ( ( mSessionStatusHandler ) != null ) && ( ! ( mSessionStatusHandler.hasMessages ( com.android.bluetooth.map.BluetoothMapService.START_LISTENER ) ) ) ) { android.os.Message msg = mSessionStatusHandler.obtainMessage ( com.android.bluetooth.map.BluetoothMapService.START_LISTENER , masId , 0 ) ; mSessionStatusHandler.sendMessageDelayed ( msg , 20 ) ; } else if ( ( mSessionStatusHandler ) != null ) { if ( com.android.bluetooth.map.BluetoothMapService.DEBUG ) android.util.Log.w ( com.android.bluetooth.map.BluetoothMapService.TAG , "mSessionStatusHandler START_LISTENER message already in Queue" ) ; } }
Source:
public boolean notifyInstantiation ( @ javax.annotation.Nonnull java.util.ArrayList < ? > list , @ javax.annotation.Nonnegative long size , int count , @ javax.annotation.Nonnull com.android.sched.util.log.EventType type ) { this . eventTypeName = type.getName ( ) ; try { previousCapacity = ( ( java.lang.Object [ ] ) ( com.android.sched.util.log.tracer.watcher.ArrayListWatcher.arrayRef.get ( list ) ) ) . length ; previousUnused = ( previousCapacity ) - ( list.size ( ) ) ; return true ; } catch ( java.lang.IllegalAccessException e ) { com.android.sched.util.log.LoggerFactory.getLogger ( ) . log ( java.util.logging.Level.WARNING , "Can not get ArrayList array" , e ) ; } return false ; }

Target:
public boolean notifyInstantiation ( @ javax.annotation.Nonnull java.util.ArrayList < ? > list , @ javax.annotation.Nonnegative long size , int count , @ javax.annotation.Nonnull com.android.sched.util.log.EventType type , @ javax.annotation.CheckForNull java.lang.StackTraceElement site ) { this . eventTypeName = type.getName ( ) ; try { previousCapacity = ( ( java.lang.Object [ ] ) ( com.android.sched.util.log.tracer.watcher.ArrayListWatcher.arrayRef.get ( list ) ) ) . length ; previousUnused = ( previousCapacity ) - ( list.size ( ) ) ; return true ; } catch ( java.lang.IllegalAccessException e ) { com.android.sched.util.log.LoggerFactory.getLogger ( ) . log ( java.util.logging.Level.WARNING , "Can not get ArrayList array" , e ) ; } return false ; }
Source:
public void getOperator ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_OPERATOR , 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 getAvailableNetworks ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_QUERY_AVAILABLE_NETWORKS , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getAvailableNetworks ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getAvailableNetworks" , e ) ; } } }
Source:
public static java.lang.String toASCII ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToASCII ( input , result , info ) ; if ( info.hasErrors ( ) ) { throw new java.lang.IllegalArgumentException ( ( "Invalid input to toASCII: " + input ) ) ; } return result.toString ( ) ; }

Target:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { return libcore.icu.NativeIDN.toUnicode ( input , flags ) ; }
Source:
public boolean hasFrequents ( ) { android.app.Fragment page = mAdapter.getItem ( mAdapter.getRtlPosition ( com.android.dialer.app.list.DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL ) ) ; return page instanceof com.android.dialer.app.list.OldSpeedDialFragment ? ( ( com.android.dialer.app.list.OldSpeedDialFragment ) ( page ) ) . hasFrequents ( ) : ( ( com.android.dialer.speeddial.SpeedDialFragment ) ( page ) ) . hasFrequents ( ) ; }

Target:
public boolean hasFrequents ( ) { android.app.Fragment page = mAdapter.getItem ( mAdapter.getRtlPosition ( DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL ) ) ; return page instanceof com.android.dialer.app.list.OldSpeedDialFragment ? ( ( com.android.dialer.app.list.OldSpeedDialFragment ) ( page ) ) . hasFrequents ( ) : ( ( com.android.dialer.speeddial.SpeedDialFragment ) ( page ) ) . hasFrequents ( ) ; }
Source:
public void testCheckReadPhoneNumber_defaultSmsApp ( ) { org.mockito.Mockito.when ( mMockAppOps.noteOp ( AppOpsManager.OP_WRITE_SMS , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE ) ) . thenReturn ( AppOpsManager.MODE_ALLOWED ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }

Target:
public void testCheckReadPhoneState_hasCarrierPrivileges ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockTelephony.getCarrierPrivilegeStatusForUid ( org.mockito.ArgumentMatchers.eq ( com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID ) , org.mockito.ArgumentMatchers.eq ( com.android.internal.telephony.TelephonyPermissionsTest.UID ) ) ) . thenReturn ( TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
public int getVoiceActivationState ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getVoiceActivationStateForSubscriber" ) ) ) { return android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getVoiceActivationState ( ) ; } else { return android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN ; } }

Target:
public int getDataActivationState ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getDataActivationStateForSubscriber" ) ) ) { return android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getDataActivationState ( ) ; } else { return android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN ; } }
Source:
public void run ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.InterruptedException , java.lang.reflect.InvocationTargetException { monitor.beginTask ( "Recording..." , IProgressMonitor.UNKNOWN ) ; while ( true ) { if ( latch.await ( 1 , java.util.concurrent.TimeUnit.SECONDS ) ) { break ; } if ( monitor.isCanceled ( ) ) { receiver.cancel ( ) ; latch.await ( 1 , java.util.concurrent.TimeUnit.SECONDS ) ; break ; } } }

Target:
public void run ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.InterruptedException , java.lang.reflect.InvocationTargetException { int timeInSecond = 0 ; monitor.beginTask ( "Recording..." , IProgressMonitor.UNKNOWN ) ; while ( true ) { if ( latch.await ( 1 , java.util.concurrent.TimeUnit.SECONDS ) ) { break ; } monitor.subTask ( java.lang.String.format ( "Recording...%d seconds elapsed" , ( timeInSecond ++ ) ) ) ; if ( monitor.isCanceled ( ) ) { receiver.cancel ( ) ; monitor.subTask ( "Stopping..." ) ; latch.await ( 1 , java.util.concurrent.TimeUnit.SECONDS ) ; break ; } } }
Source:
public void testInstallWithMissingBundleVersionFile ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createTzDataBundleWithoutFormatVersionFile ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertFalse ( installer.install ( tzData.getBundleBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstallWithMissingBundleVersionFile ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createTzDataBundleWithoutFormatVersionFile ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertFalse ( installer.install ( tzData.getBundleBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }