auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static java.util.Properties loadLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vfs ) throws com.android.jack.library.NotJackLibraryException { java.util.Properties libraryProperties = new java.util.Properties ( ) ; try { com.android.sched.vfs.InputVFile libProp = vfs.getRootDir ( ) . getInputVFile ( JackLibrary.LIBRARY_PROPERTIES_VPATH ) ; libraryProperties.load ( libProp.openRead ( ) ) ; } catch ( java.io.IOException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Fails to read " + ( JackLibrary.LIBRARY_PROPERTIES_VPATH.getPathAsString ( '/' ) ) ) + " from " ) + vfs ) , e ) ; throw new com.android.jack.library.NotJackLibraryException ( vfs.getLocation ( ) ) ; } return libraryProperties ; }

Target:
private static java.util.Properties loadLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vfs ) throws com.android.jack.library.NotJackLibraryException { java.util.Properties libraryProperties = new java.util.Properties ( ) ; try { com.android.sched.vfs.InputVFile libProp = vfs.getRootInputVDir ( ) . getInputVFile ( JackLibrary.LIBRARY_PROPERTIES_VPATH ) ; libraryProperties.load ( libProp.openRead ( ) ) ; } catch ( java.io.IOException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Fails to read " + ( JackLibrary.LIBRARY_PROPERTIES_VPATH.getPathAsString ( '/' ) ) ) + " from " ) + vfs ) , e ) ; throw new com.android.jack.library.NotJackLibraryException ( vfs.getLocation ( ) ) ; } return libraryProperties ; }
Source:
void playDtmfTone ( char digit ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "playDtmfTone() request on a call without a connection service." ) ; } else { android.telecom.Log.i ( this , "Send playDtmfTone to connection service for call %s" , this ) ; mConnectionService.playDtmfTone ( this , digit ) ; android.telecom.Log.addEvent ( this , LogUtils.Events.START_DTMF , android.telecom.Log.pii ( digit ) ) ; } }

Target:
public void playDtmfTone ( char digit ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "playDtmfTone() request on a call without a connection service." ) ; } else { android.telecom.Log.i ( this , "Send playDtmfTone to connection service for call %s" , this ) ; mConnectionService.playDtmfTone ( this , digit ) ; android.telecom.Log.addEvent ( this , LogUtils.Events.START_DTMF , android.telecom.Log.pii ( digit ) ) ; } mPlayingDtmfTone = digit ; }
Source:
public int dexOptSecondaryDexPath ( android.content.pm.ApplicationInfo info , java.lang.String path , java.util.Set < java.lang.String > isas , java.lang.String compilerFilter , boolean isUsedByOtherApps ) { synchronized ( mInstallLock ) { final boolean useLock = mSystemReady ; if ( useLock ) { mDexoptWakeLock.setWorkSource ( new android.os.WorkSource ( info.uid ) ) ; mDexoptWakeLock.acquire ( ) ; } try { return dexOptSecondaryDexPathLI ( info , path , isas , compilerFilter , isUsedByOtherApps ) ; } finally { if ( useLock ) { mDexoptWakeLock.release ( ) ; } } } }

Target:
private long acquireWakeLockLI ( final int uid ) { if ( ! ( mSystemReady ) ) { return - 1 ; } mDexoptWakeLock.setWorkSource ( new android.os.WorkSource ( uid ) ) ; mDexoptWakeLock.acquire ( com.android.server.pm.PackageDexOptimizer.WAKELOCK_TIMEOUT_MS ) ; return android.os.SystemClock.elapsedRealtime ( ) ; }
Source:
public void testTopSort ( ) { mSnapshot = new com.android.tools.perflib.heap.analysis.SnapshotBuilder ( 4 ) . addReferences ( 1 , 3 , 2 ) . addReferences ( 3 , 2 ) . addRoot ( 1 ) . getSnapshot ( ) ; mSnapshot.computeDominators ( ) ; assertEquals ( 6 , mSnapshot.findReference ( 1 ) . getRetainedSize ( 1 ) ) ; assertEquals ( 2 , mSnapshot.findReference ( 2 ) . getRetainedSize ( 1 ) ) ; assertEquals ( 3 , mSnapshot.findReference ( 3 ) . getRetainedSize ( 1 ) ) ; }

Target:
public void testTopSort ( ) { mSnapshot = new com.android.tools.perflib.heap.analysis.SnapshotBuilder ( 4 ) . addReferences ( 1 , 3 , 2 ) . addReferences ( 3 , 2 ) . addRoot ( 1 ) . getSnapshot ( ) ; mSnapshot.computeDominators ( ) ; assertEquals ( 6 , mSnapshot.findInstance ( 1 ) . getRetainedSize ( 1 ) ) ; assertEquals ( 2 , mSnapshot.findInstance ( 2 ) . getRetainedSize ( 1 ) ) ; assertEquals ( 3 , mSnapshot.findInstance ( 3 ) . getRetainedSize ( 1 ) ) ; }
Source:
private static void fulfillInspectInputJarEntryRequest ( com.android.apksig.util.DataSource lfhSection , com.android.apksig.internal.zip.LocalFileRecord localFileRecord , com.android.apksig.ApkSignerEngine.InspectJarEntryRequest inspectEntryRequest ) throws com.android.apksig.zip.ZipFormatException , java.io.IOException { localFileRecord.outputUncompressedData ( lfhSection , inspectEntryRequest.getDataSink ( ) ) ; inspectEntryRequest.done ( ) ; }

Target:
private static void fulfillInspectInputJarEntryRequest ( com.android.apksig.util.DataSource lfhSection , com.android.apksig.internal.zip.LocalFileRecord localFileRecord , com.android.apksig.ApkSignerEngine.InspectJarEntryRequest inspectEntryRequest ) throws com.android.apksig.apk.ApkFormatException , java.io.IOException { try { localFileRecord.outputUncompressedData ( lfhSection , inspectEntryRequest.getDataSink ( ) ) ; } catch ( com.android.apksig.zip.ZipFormatException e ) { throw new com.android.apksig.apk.ApkFormatException ( ( "Malformed ZIP entry: " + ( localFileRecord.getName ( ) ) ) , e ) ; } inspectEntryRequest.done ( ) ; }
Source:
private void buildAvdList ( java.util.ArrayList < com.android.sdklib.internal.avd.AvdInfo > allList , com.android.sdklib.ISdkLog log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { java.io.File [ ] avds = buildAvdFilesList ( ) ; if ( avds != null ) { for ( java.io.File avd : avds ) { com.android.sdklib.internal.avd.AvdInfo info = parseAvdInfo ( avd , log ) ; if ( info != null ) { allList.add ( info ) ; } } } }

Target:
private void buildAvdList ( java.util.ArrayList < com.android.sdklib.internal.avd.AvdInfo > allList , com.android.utils.ILogger log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { java.io.File [ ] avds = buildAvdFilesList ( ) ; if ( avds != null ) { for ( java.io.File avd : avds ) { com.android.sdklib.internal.avd.AvdInfo info = parseAvdInfo ( avd , log ) ; if ( info != null ) { allList.add ( info ) ; } } } }
Source:
public boolean p2pExtListen ( boolean enable , int period , int interval ) { if ( enable && ( interval < period ) ) { return false ; } if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.configureExtListen ( enable , period , interval ) ; } else { return doBooleanCommand ( ( "P2P_EXT_LISTEN" + ( enable ? ( ( " " + period ) + " " ) + interval : "" ) ) ) ; } }

Target:
public boolean p2pExtListen ( boolean enable , int period , int interval ) { if ( enable && ( interval < period ) ) { return false ; } if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.configureExtListen ( enable , period , interval ) ; } else { return doBooleanCommand ( ( "P2P_EXT_LISTEN" + ( enable ? ( ( " " + period ) + " " ) + interval : "" ) ) ) ; } }
Source:
public void save ( ) { for ( com.intellij.openapi.options.SchemesManager registeredManager : myRegisteredManagers ) { try { registeredManager.save ( ) ; } catch ( java.lang.Throwable e ) { com.intellij.openapi.options.SchemesManagerFactoryImpl.LOG.error ( ( "Cannot save settings for " + ( registeredManager.getClass ( ) . getName ( ) ) ) , e ) ; } } }

Target:
public void save ( ) { java.util.List < java.lang.Throwable > errors = null ; for ( com.intellij.openapi.options.SchemesManager registeredManager : myRegisteredManagers ) { try { registeredManager.save ( ) ; } catch ( java.lang.Throwable e ) { if ( errors == null ) { errors = new com.intellij.util.SmartList < java.lang.Throwable > ( ) ; } errors.add ( e ) ; } } com.intellij.util.lang.CompoundRuntimeException.doThrow ( errors ) ; }
Source:
public void testMissingChunkBody ( ) throws java.io.IOException { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "5" ) . clearHeaders ( ) . addHeader ( "Transfer-encoding: chunked" ) . setSocketPolicy ( com.google.mockwebserver.SocketPolicy.DISCONNECT_AT_END ) ) ; server.play ( ) ; java.net.URLConnection connection = server.getUrl ( "/" ) . openConnection ( ) ; try { readAscii ( connection.getInputStream ( ) , java.lang.Integer.MAX_VALUE ) ; fail ( ) ; } catch ( java.io.IOException e ) { } }

Target:
public void testMissingChunkBody ( ) throws java.io.IOException { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "5" ) . clearHeaders ( ) . addHeader ( "Transfer-encoding: chunked" ) . setSocketPolicy ( com.google.mockwebserver.SocketPolicy.DISCONNECT_AT_END ) ) ; server.play ( ) ; java.net.URLConnection connection = server.getUrl ( "/" ) . openConnection ( ) ; try { readAscii ( connection.getInputStream ( ) , java.lang.Integer.MAX_VALUE ) ; org.junit.Assert.fail ( ) ; } catch ( java.io.IOException e ) { } }
Source:
public int updateNetwork ( int netId , java.lang.String ssid , boolean hidden , int securityType , java.lang.String password ) throws java.lang.SecurityException { if ( ! ( mWifiManager.isWifiEnabled ( ) ) ) { mWifiManager.setWifiEnabled ( true ) ; } android.net.wifi.WifiConfiguration wifiConf = null ; java.util.List < android.net.wifi.WifiConfiguration > configs = mWifiManager.getConfiguredNetworks ( ) ; for ( android.net.wifi.WifiConfiguration config : configs ) { if ( ( config.networkId ) == netId ) { wifiConf = config ; break ; } } return updateNetwork ( wifiConf , ssid , hidden , securityType , password ) ; }

Target:
public int updateNetwork ( int netId , java.lang.String ssid , boolean hidden , int securityType , java.lang.String password ) throws java.lang.InterruptedException , java.lang.SecurityException { checkAndEnableWifi ( ) ; android.net.wifi.WifiConfiguration wifiConf = null ; java.util.List < android.net.wifi.WifiConfiguration > configs = mWifiManager.getConfiguredNetworks ( ) ; for ( android.net.wifi.WifiConfiguration config : configs ) { if ( ( config.networkId ) == netId ) { wifiConf = config ; break ; } } return updateNetwork ( wifiConf , ssid , hidden , securityType , password ) ; }
Source:
private void deleteOatArtifactsOfPackage ( android.content.pm.PackageParser.Package pkg ) { java.lang.String [ ] instructionSets = com.android.server.pm.InstructionSets.getAppDexInstructionSets ( pkg.applicationInfo ) ; for ( java.lang.String codePath : pkg.getAllCodePaths ( ) ) { for ( java.lang.String isa : instructionSets ) { try { mPackageManagerService.mInstaller.deleteOdex ( codePath , isa , com.android.server.pm.OtaDexoptService.getOatDir ( pkg ) ) ; } catch ( com.android.internal.os.InstallerConnection.InstallerException e ) { android.util.Log.e ( com.android.server.pm.OtaDexoptService.TAG , ( "Failed deleting oat files for " + codePath ) , e ) ; } } } }

Target:
private void deleteOatArtifactsOfPackage ( android.content.pm.PackageParser.Package pkg ) { java.lang.String [ ] instructionSets = com.android.server.pm.InstructionSets.getAppDexInstructionSets ( pkg.applicationInfo ) ; for ( java.lang.String codePath : pkg.getAllCodePaths ( ) ) { for ( java.lang.String isa : instructionSets ) { try { mPackageManagerService.mInstaller.deleteOdex ( codePath , isa , com.android.server.pm.OtaDexoptService.getOatDir ( pkg ) ) ; } catch ( com.android.server.pm.Installer.InstallerException e ) { android.util.Log.e ( com.android.server.pm.OtaDexoptService.TAG , ( "Failed deleting oat files for " + codePath ) , e ) ; } } } }
Source:
public static boolean isSimConfig ( android.net.wifi.WifiConfiguration config ) { if ( ( config == null ) || ( ( config.enterpriseConfig ) == null ) ) { return false ; } return com.android.server.wifi.util.TelephonyUtil.isSimEapMethod ( config.enterpriseConfig.getEapMethod ( ) ) ; }

Target:
private static int getSimMethodForConfig ( android.net.wifi.WifiConfiguration config ) { if ( ( config == null ) || ( ( config.enterpriseConfig ) == null ) ) { return WifiEnterpriseConfig.Eap.NONE ; } int eapMethod = config.enterpriseConfig.getEapMethod ( ) ; if ( eapMethod == ( WifiEnterpriseConfig.Eap.PEAP ) ) { switch ( config.enterpriseConfig.getPhase2Method ( ) ) { case WifiEnterpriseConfig.Phase2.SIM : eapMethod = WifiEnterpriseConfig.Eap.SIM ; break ; case WifiEnterpriseConfig.Phase2.AKA : eapMethod = WifiEnterpriseConfig.Eap.AKA ; break ; case WifiEnterpriseConfig.Phase2.AKA_PRIME : eapMethod = WifiEnterpriseConfig.Eap.AKA_PRIME ; break ; } } return com.android.server.wifi.util.TelephonyUtil.isSimEapMethod ( eapMethod ) ? eapMethod : WifiEnterpriseConfig.Eap.NONE ; }
Source:
private int getPhoneTypeFromProperty ( int phoneId ) { java.lang.String type = android.telephony.TelephonyManager.getTelephonyProperty ( phoneId , TelephonyProperties.CURRENT_ACTIVE_PHONE , null ) ; if ( ( type == null ) || ( type.equals ( "" ) ) ) { return getPhoneTypeFromNetworkType ( phoneId ) ; } return java.lang.Integer.parseInt ( type ) ; }

Target:
private int getPhoneTypeFromProperty ( int phoneId ) { java.lang.String type = android.telephony.TelephonyManager.getTelephonyProperty ( phoneId , TelephonyProperties.CURRENT_ACTIVE_PHONE , null ) ; if ( ( type == null ) || ( type.isEmpty ( ) ) ) { return getPhoneTypeFromNetworkType ( phoneId ) ; } return java.lang.Integer.parseInt ( type ) ; }
Source:
public static final java.security.cert.CertificateFactory getInstance ( java.lang.String type , java.security.Provider provider ) throws java.security.cert.CertificateException { try { sun.security.jca.GetInstance.Instance instance = sun.security.jca.GetInstance.getInstance ( "CertificateFactory" , java.security.cert.CertificateFactorySpi.class , type , provider ) ; return new java.security.cert.CertificateFactory ( ( ( java.security.cert.CertificateFactorySpi ) ( instance.impl ) ) , instance.provider , type ) ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new java.security.cert.CertificateException ( ( type + " not found" ) , e ) ; } }

Target:
public static final java.security.cert.CertificateFactory getInstance ( java.lang.String type , java.security.Provider provider ) throws java.security.cert.CertificateException { try { sun.security.jca.Providers.checkBouncyCastleDeprecation ( provider , "CertificateFactory" , type ) ; sun.security.jca.GetInstance.Instance instance = sun.security.jca.GetInstance.getInstance ( "CertificateFactory" , java.security.cert.CertificateFactorySpi.class , type , provider ) ; return new java.security.cert.CertificateFactory ( ( ( java.security.cert.CertificateFactorySpi ) ( instance.impl ) ) , instance.provider , type ) ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new java.security.cert.CertificateException ( ( type + " not found" ) , e ) ; } }
Source:
public void testHasExtra ( ) { android.content.Intent intent = new android.content.Intent ( ) . putExtra ( "key1" , "value1" ) . putExtra ( "key2" , 100.0 ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key1" , "value1" ) . matches ( intent ) ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key2" , 100.0 ) . matches ( intent ) ) ; }

Target:
public void hasExtraTesting ( ) { android.content.Intent intent = new android.content.Intent ( ) . putExtra ( "key1" , "value1" ) . putExtra ( "key2" , 100.0 ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key1" , "value1" ) . matches ( intent ) ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra ( "key2" , 100.0 ) . matches ( intent ) ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , d.length , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFrom ( int off , int count , byte [ ] d ) { validateIsInt8 ( ) ; copy1DRangeFromUnchecked ( off , count , d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
private static void sendMulticastMessage ( java.net.InetAddress group , int port , java.lang.String msg , java.net.NetworkInterface sendingInterface ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; if ( sendingInterface != null ) { dc.setOption ( java.net.StandardSocketOptions.IP_MULTICAST_IF , sendingInterface ) ; } libcore.java.nio.channels.DatagramChannelMulticastTest.sendMessage ( dc , msg , new java.net.InetSocketAddress ( group , port ) ) ; dc.close ( ) ; }

Target:
private static void sendMessage ( java.net.InetAddress targetGroup , int targetPort , java.lang.String msg , java.net.NetworkInterface sendingInterface ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.setOption ( java.net.StandardSocketOptions.IP_MULTICAST_IF , sendingInterface ) ; libcore.java.nio.channels.DatagramChannelMulticastTest.sendMessage ( dc , msg , new java.net.InetSocketAddress ( targetGroup , targetPort ) ) ; dc.close ( ) ; }
Source:
void onSyncLost ( int sync_handle ) throws java.lang.Exception { logd ( ( "onSyncLost() - sync_handle=" + sync_handle ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > entry = findSync ( sync_handle ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.PeriodicScanManager.TAG , ( "onSyncLost() - no callback found for sync_handle " + sync_handle ) ) ; return ; } android.bluetooth.le.IPeriodicAdvertisingCallback callback = entry.getValue ( ) . callback ; mSyncs.remove ( entry ) ; callback.onSyncLost ( sync_handle ) ; }

Target:
void onSyncLost ( int sync_handle ) throws java.lang.Exception { if ( com.android.bluetooth.gatt.PeriodicScanManager.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.PeriodicScanManager.TAG , ( "onSyncLost() - sync_handle=" + sync_handle ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > entry = findSync ( sync_handle ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.PeriodicScanManager.TAG , ( "onSyncLost() - no callback found for sync_handle " + sync_handle ) ) ; return ; } android.bluetooth.le.IPeriodicAdvertisingCallback callback = entry.getValue ( ) . callback ; mSyncs.remove ( entry ) ; callback.onSyncLost ( sync_handle ) ; }
Source:
public boolean equalsIgnoreCase ( java.lang.String anotherString ) { return ( this ) == anotherString ? true : ( ( anotherString != null ) && ( ( anotherString.count ) == ( count ) ) ) && ( regionMatches ( true , 0 , anotherString , 0 , count ) ) ; }

Target:
public boolean equalsIgnoreCase ( java.lang.String anotherString ) { final int len = length ( ) ; return ( this ) == anotherString ? true : ( ( anotherString != null ) && ( ( anotherString.length ( ) ) == len ) ) && ( regionMatches ( true , 0 , anotherString , 0 , len ) ) ; }
Source:
private synchronized void onApplicationStateChanged ( byte [ ] address , boolean registered ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onApplicationStateChanged(): registered=" + registered ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_APPLICATION_STATE_CHANGED ) ; msg.obj = address ; msg.arg1 = ( registered ) ? 1 : 0 ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onVirtualCableUnplugFromNative ( ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , "onVirtualCableUnplug()" ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_VC_UNPLUG ) ; mHandler.sendMessage ( msg ) ; }
Source:
public java.lang.String formatValue ( @ javax.annotation.Nonnull java.util.Map.Entry < T , U > data ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( keyParser.formatValue ( data.getKey ( ) ) ) ; sb.append ( separator ) ; sb.append ( valueParser.formatValue ( data.getValue ( ) ) ) ; return sb.toString ( ) ; }

Target:
public java.lang.String formatValue ( @ javax.annotation.Nonnull com.android.sched.util.codec.PairCodec.Pair < T , U > data ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( keyParser.formatValue ( data.getFirst ( ) ) ) ; sb.append ( separator ) ; sb.append ( valueParser.formatValue ( data.getSecond ( ) ) ) ; return sb.toString ( ) ; }
Source:
private void validateInternalSessionInfoCleanedUp ( int clientId , int sessionId ) throws java.lang.Exception { com.android.server.wifi.nan.WifiNanClientState client = com.android.server.wifi.nan.WifiNanStateManagerTest.getInternalClientState ( mDut , clientId ) ; collector.checkThat ( ( "Client record exists clientId=" + clientId ) , client , org.hamcrest.core.IsNull.notNullValue ( ) ) ; com.android.server.wifi.nan.WifiNanSessionState session = com.android.server.wifi.nan.WifiNanStateManagerTest.getInternalSessionState ( client , sessionId ) ; collector.checkThat ( ( "Client record not cleaned-up for sessionId=" + sessionId ) , session , org.hamcrest.core.IsNull.nullValue ( ) ) ; }

Target:
private void validateInternalSessionInfoCleanedUp ( int clientId , int sessionId ) throws java.lang.Exception { com.android.server.wifi.nan.WifiNanClientState client = com.android.server.wifi.nan.WifiNanStateManagerTest.getInternalClientState ( mDut , clientId ) ; collector.checkThat ( ( "Client record exists clientId=" + clientId ) , client , org.hamcrest.core.IsNull.notNullValue ( ) ) ; com.android.server.wifi.nan.WifiNanDiscoverySessionState session = com.android.server.wifi.nan.WifiNanStateManagerTest.getInternalSessionState ( client , sessionId ) ; collector.checkThat ( ( "Client record not cleaned-up for sessionId=" + sessionId ) , session , org.hamcrest.core.IsNull.nullValue ( ) ) ; }
Source:
private static com.android.dx.dex.file.ClassDefItem translateClass ( byte [ ] bytes , com.android.dx.cf.direct.DirectClassFile cf ) { try { return com.android.dx.dex.cf.CfTranslator.translate ( cf , bytes , com.android.dx.command.dexer.Main.args.cfOptions , com.android.dx.command.dexer.Main.args.dexOptions , com.android.dx.command.dexer.Main.outputDex ) ; } catch ( com.android.dx.cf.iface.ParseException ex ) { DxConsole.err.println ( "\ntrouble processing:" ) ; if ( com.android.dx.command.dexer.Main.args.debug ) { ex.printStackTrace ( DxConsole.err ) ; } else { ex.printContext ( DxConsole.err ) ; } } com.android.dx.command.dexer.Main.errors.incrementAndGet ( ) ; return null ; }

Target:
private com.android.dx.dex.file.ClassDefItem translateClass ( byte [ ] bytes , com.android.dx.cf.direct.DirectClassFile cf ) { try { return com.android.dx.dex.cf.CfTranslator.translate ( context , cf , bytes , args.cfOptions , args.dexOptions , outputDex ) ; } catch ( com.android.dx.cf.iface.ParseException ex ) { context.err.println ( "\ntrouble processing:" ) ; if ( args.debug ) { ex.printStackTrace ( context.err ) ; } else { ex.printContext ( context.err ) ; } } errors.incrementAndGet ( ) ; return null ; }
Source:
void remove ( int id ) { synchronized ( mApps ) { java.util.Iterator < com.android.bluetooth.gatt.ContextMap < T > . App > i = mApps.iterator ( ) ; while ( i.hasNext ( ) ) { com.android.bluetooth.gatt.ContextMap < T > . App entry = i.next ( ) ; if ( ( entry.id ) == id ) { entry.unlinkToDeath ( ) ; mAppScanStats.get ( entry.name ) . isRegistered = false ; i.remove ( ) ; break ; } } } }

Target:
void remove ( int id ) { synchronized ( mApps ) { java.util.Iterator < com.android.bluetooth.gatt.ContextMap < T > . App > i = mApps.iterator ( ) ; while ( i.hasNext ( ) ) { com.android.bluetooth.gatt.ContextMap < T > . App entry = i.next ( ) ; if ( ( entry.id ) == id ) { entry.unlinkToDeath ( ) ; entry.appScanStats.isRegistered = false ; i.remove ( ) ; break ; } } } }
Source:
public static com.android.manifmerger.XmlDocument load ( com.android.utils.Pair < java.lang.String , java.io.File > xmlFile ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.io.InputStream inputStream = new java.io.BufferedInputStream ( new java.io.FileInputStream ( xmlFile.getSecond ( ) ) ) ; com.android.utils.PositionXmlParser positionXmlParser = new com.android.utils.PositionXmlParser ( ) ; org.w3c.dom.Document domDocument = positionXmlParser.parse ( inputStream ) ; return domDocument != null ? new com.android.manifmerger.XmlDocument ( positionXmlParser , new com.android.manifmerger.XmlLoader.FileSourceLocation ( xmlFile.getFirst ( ) , xmlFile.getSecond ( ) ) , domDocument.getDocumentElement ( ) ) : null ; }

Target:
public static com.android.manifmerger.XmlLoader.SourceLocation locationFromXml ( org.w3c.dom.Element location ) { java.lang.String scheme = location.getAttribute ( "scheme" ) ; if ( com.google.common.base.Strings.isNullOrEmpty ( scheme ) ) { return com.android.manifmerger.XmlLoader.UNKNOWN ; } if ( scheme.equals ( "file://" ) ) { return new com.android.manifmerger.XmlLoader.FileSourceLocation ( location.getAttribute ( "name" ) , new java.io.File ( location.getAttribute ( "value" ) ) ) ; } throw new java.lang.RuntimeException ( ( scheme + " scheme unsupported" ) ) ; }
Source:
public boolean accept ( com.android.sdklib.internal.avd.AvdManager.AvdInfo avd ) { if ( ( mDevices ) != null ) { for ( com.android.ddmlib.IDevice d : mDevices ) { if ( ( ( mProjectTarget.canRunOn ( avd.getTarget ( ) ) ) == false ) || ( avd.getName ( ) . equals ( d.getAvdName ( ) ) ) ) { return false ; } } } return true ; }

Target:
public boolean accept ( com.android.sdklib.internal.avd.AvdInfo avd ) { if ( ( mDevices ) != null ) { for ( com.android.ddmlib.IDevice d : mDevices ) { if ( ( ( mProjectTarget.canRunOn ( avd.getTarget ( ) ) ) == false ) || ( avd.getName ( ) . equals ( d.getAvdName ( ) ) ) ) { return false ; } } } return true ; }
Source:
public void getAvailableNetworks ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_QUERY_AVAILABLE_NETWORKS , response ) ; 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:
protected void computeResult ( ) { org.eclipse.jface.viewers.TreePath treeSelection = getSelection ( ) ; if ( treeSelection != null ) { if ( ( treeSelection.getSegmentCount ( ) ) == 2 ) { com.android.resources.ResourceType resourceType = ( ( com.android.resources.ResourceType ) ( treeSelection.getFirstSegment ( ) ) ) ; com.android.ide.eclipse.adt.internal.resources.ResourceItem resourceItem = ( ( com.android.ide.eclipse.adt.internal.resources.ResourceItem ) ( treeSelection.getLastSegment ( ) ) ) ; mCurrentResource = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getXmlString ( resourceType , resourceItem , false ) ; } } }

Target:
protected void computeResult ( ) { org.eclipse.jface.viewers.TreePath treeSelection = getSelection ( ) ; if ( treeSelection != null ) { if ( ( treeSelection.getSegmentCount ( ) ) == 2 ) { com.android.resources.ResourceType resourceType = ( ( com.android.resources.ResourceType ) ( treeSelection.getFirstSegment ( ) ) ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem resourceItem = ( ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem ) ( treeSelection.getLastSegment ( ) ) ) ; mCurrentResource = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getXmlString ( resourceType , resourceItem , false ) ; } } }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return false ; } return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }

Target:
public void disconnect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "disconnect" ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return ; } service.disconnect ( device ) ; }
Source:
public void wifiNanSendMessage ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session" + " was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer being communicated " + "with. Obtained from a previous message or match session." ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "message" ) java.lang.String message , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "messageId" , description = "Arbitrary handle used for " + "identification of the message in the message status callbacks" ) java.lang.Integer messageId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "retryCount" , description = "Number of retries (0 for none) if " + "transmission fails due to no ACK reception" ) java.lang.Integer retryCount ) throws android.os.RemoteException { android.net.wifi.nan.WifiNanSession session = mSessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanSendMessage before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = message.getBytes ( ) ; session.sendMessage ( peerId , bytes , messageId , retryCount ) ; }

Target:
public void wifiNanSendMessage ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session" + " was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer being communicated " + "with. Obtained from a previous message or match session." ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "message" ) java.lang.String message , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "messageId" , description = "Arbitrary handle used for " + "identification of the message in the message status callbacks" ) java.lang.Integer messageId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "retryCount" , description = "Number of retries (0 for none) if " + "transmission fails due to no ACK reception" ) java.lang.Integer retryCount ) throws android.os.RemoteException { android.net.wifi.nan.WifiNanDiscoveryBaseSession session = mSessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanSendMessage before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = message.getBytes ( ) ; session.sendMessage ( peerId , bytes , messageId , retryCount ) ; }
Source:
public void testEndCallWithNoForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( null ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }

Target:
public void testEndCallWithNonRingingForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getForegroundCall ( ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( com.android.server.telecom.tests.TelecomServiceImplTest.TEST_PACKAGE ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( org.mockito.Matchers.eq ( 0L ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.TelecomServiceImplTest.TEST_PACKAGE ) ) ; }
Source:
private int getFlags ( ) throws java.net.SocketException { java.io.FileDescriptor fd = null ; try { fd = Libcore.os.socket ( java.net.AF_INET , java.net.SOCK_DGRAM , 0 ) ; return Libcore.os.ioctlFlags ( fd , name ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsSocketException ( ) ; } catch ( java.lang.Exception ex ) { throw new java.net.SocketException ( ex ) ; } finally { libcore.io.IoUtils.closeQuietly ( fd ) ; } }

Target:
private int getFlags ( ) throws java.net.SocketException { java.io.FileDescriptor fd = null ; try { fd = Libcore.rawOs.socket ( java.net.AF_INET , java.net.SOCK_DGRAM , 0 ) ; return Libcore.rawOs.ioctlFlags ( fd , name ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsSocketException ( ) ; } catch ( java.lang.Exception ex ) { throw new java.net.SocketException ( ex ) ; } finally { libcore.io.IoUtils.closeQuietly ( fd ) ; } }
Source:
public void exitEmergencyCallbackMode ( int indicationType ) { }

Target:
public void radioCapabilityIndication ( int indicationType , com.android.internal.telephony.V1_0.RadioCapability rc ) { mRil.processIndication ( indicationType ) ; com.android.internal.telephony.RadioCapability response = com.android.internal.telephony.RIL.convertHalRadioCapability ( rc , mRil ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RADIO_CAPABILITY , response ) ; mRil.mPhoneRadioCapabilityChangedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public boolean setNetworkCandidateScanResult ( int networkId , android.net.wifi.ScanResult scanResult , int score ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( ( ( "Set network candidate scan result " + scanResult ) + " for " ) + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( scanResult ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( score ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( true ) ; return true ; }

Target:
public boolean setNetworkCandidateScanResult ( int networkId , android.net.wifi.ScanResult scanResult , int score ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( ( ( "Set network candidate scan result " + scanResult ) + " for " ) + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( scanResult ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( score ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( true ) ; return true ; }
Source:
public android.net.NetworkCapabilities createFromParcel ( android.os.Parcel in ) { android.net.NetworkCapabilities netCap = new android.net.NetworkCapabilities ( ) ; netCap.mNetworkCapabilities = in.readLong ( ) ; netCap.mTransportTypes = in.readLong ( ) ; netCap.mLinkUpBandwidthKbps = in.readInt ( ) ; netCap.mLinkDownBandwidthKbps = in.readInt ( ) ; netCap.mNetworkSpecifier = in.readParcelable ( null ) ; netCap.mSignalStrength = in.readInt ( ) ; netCap.mUids = ( ( android.util.ArraySet < android.net.UidRange > ) ( in.readArraySet ( null ) ) ) ; return netCap ; }

Target:
public android.net.NetworkCapabilities createFromParcel ( android.os.Parcel in ) { android.net.NetworkCapabilities netCap = new android.net.NetworkCapabilities ( ) ; netCap.mNetworkCapabilities = in.readLong ( ) ; netCap.mUnwantedNetworkCapabilities = in.readLong ( ) ; netCap.mTransportTypes = in.readLong ( ) ; netCap.mLinkUpBandwidthKbps = in.readInt ( ) ; netCap.mLinkDownBandwidthKbps = in.readInt ( ) ; netCap.mNetworkSpecifier = in.readParcelable ( null ) ; netCap.mSignalStrength = in.readInt ( ) ; netCap.mUids = ( ( android.util.ArraySet < android.net.UidRange > ) ( in.readArraySet ( null ) ) ) ; return netCap ; }
Source:
public void testBasicCycle ( ) { com.android.tools.perflib.heap.Snapshot snapshot = new com.android.tools.perflib.heap.analysis.SnapshotBuilder ( 3 ) . addReferences ( 1 , 2 ) . addReferences ( 2 , 3 ) . addReferences ( 3 , 1 ) . addRoot ( 1 ) . getSnapshot ( ) ; assertEquals ( 6 , snapshot.findReference ( 1 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 2 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 3 ) . getCompositeSize ( ) ) ; }

Target:
public void testBasicCycle ( ) { com.android.tools.perflib.heap.analysis.Snapshot snapshot = new com.android.tools.perflib.heap.analysis.SnapshotBuilder ( 3 ) . addReferences ( 1 , 2 ) . addReferences ( 2 , 3 ) . addReferences ( 3 , 1 ) . addRoot ( 1 ) . getSnapshot ( ) ; assertEquals ( 6 , snapshot.findReference ( 1 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 2 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 3 ) . getCompositeSize ( ) ) ; }
Source:
private static boolean specifiesLocale ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method ) { for ( int i = 0 , n = method.getArgumentCount ( ) ; i < n ; i ++ ) { com.android.tools.lint.client.api.JavaParser.TypeDescriptor argumentType = method.getArgumentType ( i ) ; if ( argumentType.matchesSignature ( com.android.tools.lint.checks.DateFormatDetector.LOCALE_CLS ) ) { return true ; } } return false ; }

Target:
private static boolean specifiesLocale ( @ com.android.annotations.NonNull com.intellij.psi.PsiMethod method ) { com.intellij.psi.PsiParameterList parameterList = method.getParameterList ( ) ; com.intellij.psi.PsiParameter [ ] parameters = parameterList.getParameters ( ) ; for ( com.intellij.psi.PsiParameter parameter : parameters ) { com.intellij.psi.PsiType type = parameter.getType ( ) ; if ( type.getCanonicalText ( ) . equals ( com.android.tools.lint.checks.DateFormatDetector.LOCALE_CLS ) ) { return true ; } } return false ; }
Source:
public void doImport ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) { for ( com.android.sched.vfs.InputVFS resourceDir : resourceDirs ) { importResourceDirElement ( resourceDir.getRootInputVDir ( ) . list ( ) , session , "" ) ; } }

Target:
public void doImport ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws com.android.jack.resource.ResourceReadingException { try { for ( com.android.sched.vfs.InputVFS resourceDir : resourceDirs ) { importResourceDirElement ( resourceDir.getRootInputVDir ( ) . list ( ) , session , "" ) ; } } catch ( com.android.jack.resource.ResourceImportConflictException e ) { throw new com.android.jack.resource.ResourceReadingException ( e ) ; } }
Source:
public void test57649 ( ) throws java.lang.Exception { java.lang.Thread a = libcore.java.lang.reflect.annotations.Annotations57649Test.runTest ( libcore.java.lang.reflect.annotations.Annotations57649Test.A.class ) ; java.lang.Thread b = libcore.java.lang.reflect.annotations.Annotations57649Test.runTest ( libcore.java.lang.reflect.annotations.Annotations57649Test.B.class ) ; a.join ( ) ; b.join ( ) ; }

Target:
public void test57649 ( ) throws java.lang.Exception { if ( libcore.java.lang.reflect.annotations.Annotations57649Test.isLowRamDevice ( ) ) { return ; } java.lang.Thread a = libcore.java.lang.reflect.annotations.Annotations57649Test.runTest ( libcore.java.lang.reflect.annotations.Annotations57649Test.A.class ) ; java.lang.Thread b = libcore.java.lang.reflect.annotations.Annotations57649Test.runTest ( libcore.java.lang.reflect.annotations.Annotations57649Test.B.class ) ; a.join ( ) ; b.join ( ) ; }
Source:
private synchronized void resetNotification ( ) { mNotificationRepeatTime = 0 ; mNumScansSinceNetworkStateChange = 0 ; setNotificationVisible ( false , 0 , false , 0 ) ; }

Target:
public void start ( ) { if ( ! ( mStarted.compareAndSet ( false , true ) ) ) { return ; } mWifiState = android.net.wifi.WifiManager.WIFI_STATE_UNKNOWN ; mDetailedState = NetworkInfo.DetailedState.IDLE ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( WifiManager.WIFI_STATE_CHANGED_ACTION ) ; filter.addAction ( WifiManager.NETWORK_STATE_CHANGED_ACTION ) ; filter.addAction ( WifiManager.SCAN_RESULTS_AVAILABLE_ACTION ) ; filter.addAction ( com.android.networkrecommendation.WifiNotificationController.ACTION_CONNECT_TO_RECOMMENDED_NETWORK ) ; filter.addAction ( com.android.networkrecommendation.WifiNotificationController.ACTION_NOTIFICATION_DELETED ) ; mContext.registerReceiver ( mBroadcastReceiver , filter , null , mHandler ) ; mNotificationEnabledSettingObserver.register ( ) ; }
Source:
private static void addModuleForAccessingCallDetails ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.canReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.lookupUri ( ) ) ) ; modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createDialerContactFromRow ( row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ) ; }

Target:
private static void addModuleForAccessingCallDetails ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.numberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.numberAttributes ( ) . getLookupUri ( ) ) ) ; modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createDialerContactFromRow ( row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ) ; }
Source:
public void testGetContentType ( ) throws java.io.IOException { assertEquals ( "application/rtf" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.rtf" ) ) ; assertEquals ( "text/plain" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.java" ) ) ; assertEquals ( "application/msword" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.doc" ) ) ; assertEquals ( "text/html" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.htx" ) ) ; assertEquals ( "application/xml" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.xml" ) ) ; assertEquals ( "text/plain" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "." ) ) ; }

Target:
private java.net.URL createTempFileWithContent ( java.lang.String resourceName ) throws java.io.IOException { java.io.InputStream is = null ; java.io.OutputStream os = null ; try { final java.net.URL url = loader.getResource ( resourceName ) ; assertNotNull ( ( "Cannot find test resource " + resourceName ) , url ) ; is = url.openStream ( ) ; java.io.File file = java.io.File.createTempFile ( "FileURLConnectionTest" , resourceName.substring ( resourceName.indexOf ( "." ) ) ) ; os = new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( file ) ) ; libcore.io.Streams.copy ( is , os ) ; return new java.net.URL ( ( "file://" + ( file.getAbsolutePath ( ) ) ) ) ; } finally { if ( is != null ) { is.close ( ) ; } if ( os != null ) { os.close ( ) ; } } }
Source:
protected void visitChildren ( @ javax.annotation.Nonnull com.android.sched.scheduler.ScheduleInstance < ? super com.android.sched.item.Component > schedule ) throws java.lang.Exception { if ( ( jThis ) != null ) { jThis.traverse ( schedule ) ; } for ( com.android.jack.ir.ast.JParameter param : params ) { param.traverse ( schedule ) ; } if ( ( body ) != null ) { body.traverse ( schedule ) ; } annotations.traverse ( schedule ) ; }

Target:
protected void visitChildren ( @ javax.annotation.Nonnull com.android.sched.scheduler.ScheduleInstance < ? super com.android.sched.item.Component > schedule ) throws java.lang.Exception { if ( ( jThis ) != null ) { jThis.traverse ( schedule ) ; } for ( com.android.jack.ir.ast.JParameter param : params ) { param.traverse ( schedule ) ; } if ( ( body ) != null ) { body.traverse ( schedule ) ; } for ( com.android.jack.ir.ast.JAnnotation annotation : annotations ) { annotation.traverse ( schedule ) ; } }
Source:
public void testGetExampleNumber ( ) { assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.DE_NUMBER , phoneUtil.getExampleNumber ( RegionCode.DE ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.DE_NUMBER , phoneUtil.getExampleNumberForType ( RegionCode.DE , PhoneNumberUtil.PhoneNumberType.FIXED_LINE ) ) ; assertEquals ( null , phoneUtil.getExampleNumberForType ( RegionCode.DE , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( RegionCode.US , PhoneNumberUtil.PhoneNumberType.FIXED_LINE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( RegionCode.US , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNull ( phoneUtil.getExampleNumberForType ( RegionCode.CS , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNull ( phoneUtil.getExampleNumber ( RegionCode.UN001 ) ) ; }

Target:
public void testGetExampleNumberWithoutRegion ( ) { assertNotNull ( phoneUtil.getExampleNumberForType ( PhoneNumberType.FIXED_LINE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( PhoneNumberType.MOBILE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( PhoneNumberType.PREMIUM_RATE ) ) ; }