auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final void testGetTargetHashString ( ) { com.android.sdklib.internal.repository.MockPlatformTarget t = new com.android.sdklib.internal.repository.MockPlatformTarget ( 10 , 1 ) ; assertEquals ( "android-10" , com.android.sdklib.AndroidTargetHash.getTargetHashString ( t ) ) ; com.android.sdklib.internal.repository.MockAddonTarget a = new com.android.sdklib.internal.repository.MockAddonTarget ( "My Addon" , t , 2 ) ; assertEquals ( "vendor 10:My Addon:10" , com.android.sdklib.AndroidTargetHash.getTargetHashString ( a ) ) ; }

Target:
public final void testGetTargetHashString ( ) { com.android.sdklib.internal.androidTarget.MockPlatformTarget t = new com.android.sdklib.internal.androidTarget.MockPlatformTarget ( 10 , 1 ) ; assertEquals ( "android-10" , com.android.sdklib.AndroidTargetHash.getTargetHashString ( t ) ) ; com.android.sdklib.internal.androidTarget.MockAddonTarget a = new com.android.sdklib.internal.androidTarget.MockAddonTarget ( "My Addon" , t , 2 ) ; assertEquals ( "vendor 10:My Addon:10" , com.android.sdklib.AndroidTargetHash.getTargetHashString ( a ) ) ; }
Source:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.nan.WifiNanManager.DataPathRole int role , int peerId , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiNanManager" ) ; return null ; } return mgr.createNetworkSpecifier ( role , mSessionId , peerId , token ) ; } }

Target:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called post GC on WifiNanManager" ) ; return ; } mgr.startRanging ( mClientId , mSessionId , params , listener ) ; } }
Source:
public void freeCache ( java.lang.String uuid , long freeStorageSize ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.freeCache ( uuid , freeStorageSize ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void freeCache ( java.lang.String uuid , long freeStorageSize ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.freeCache ( uuid , freeStorageSize ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public synchronized com.android.internal.net.LegacyVpnInfo getLegacyVpnInfo ( ) { enforceControlPermission ( ) ; if ( ( mLegacyVpnRunner ) == null ) return null ; final com.android.internal.net.LegacyVpnInfo info = new com.android.internal.net.LegacyVpnInfo ( ) ; info.key = mConfig.user ; info.state = com.android.internal.net.LegacyVpnInfo.stateFromNetworkInfo ( mNetworkInfo ) ; if ( mNetworkInfo.isConnected ( ) ) { info.intent = mStatusIntent ; } return info ; }

Target:
public synchronized com.android.internal.net.LegacyVpnInfo getLegacyVpnInfoPrivileged ( ) { if ( ( mLegacyVpnRunner ) == null ) return null ; final com.android.internal.net.LegacyVpnInfo info = new com.android.internal.net.LegacyVpnInfo ( ) ; info.key = mConfig.user ; info.state = com.android.internal.net.LegacyVpnInfo.stateFromNetworkInfo ( mNetworkInfo ) ; if ( mNetworkInfo.isConnected ( ) ) { info.intent = mStatusIntent ; } return info ; }
Source:
private java.util.concurrent.Future < java.lang.Void > expectClearNotifications ( ) throws java.lang.Exception { final com.android.server.NetworkPolicyManagerServiceTest.FutureAnswer future = new com.android.server.NetworkPolicyManagerServiceTest.FutureAnswer ( ) ; mNotifManager.cancelNotificationWithTag ( org.easymock.EasyMock.isA ( java.lang.String.class ) , org.easymock.EasyMock.isA ( java.lang.String.class ) , org.easymock.EasyMock.anyInt ( ) , org.easymock.EasyMock.anyInt ( ) ) ; org.easymock.EasyMock.expectLastCall ( ) . andAnswer ( future ) . anyTimes ( ) ; return future ; }

Target:
private java.util.concurrent.Future < java.lang.String > expectEnqueueNotification ( ) throws java.lang.Exception { final com.android.server.NetworkPolicyManagerServiceTest.FutureAnswer < java.lang.String > futureAnswer = new com.android.server.NetworkPolicyManagerServiceTest.FutureAnswer < java.lang.String > ( 2 ) ; org.mockito.Mockito.doAnswer ( futureAnswer ) . when ( mNotifManager ) . enqueueNotificationWithTag ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.isA ( android.app.Notification.class ) , org.mockito.Matchers.isA ( int [ ] . class ) , org.mockito.Matchers.anyInt ( ) ) ; return futureAnswer ; }
Source:
public static void computeAtanh ( android.renderscript.cts.TestAtanh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 128 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( ( ( java.lang.StrictMath.log ( ( 1 + x ) ) ) - ( java.lang.StrictMath.log ( ( 1 - x ) ) ) ) / 2 ) ) ; }

Target:
private static float distance ( float [ ] lhs , float [ ] rhs ) { float sum = 0.0F ; for ( int i = 0 ; i < ( lhs.length ) ; i ++ ) { float diff = ( lhs [ i ] ) - ( rhs [ i ] ) ; sum += diff * diff ; } return ( ( float ) ( java.lang.StrictMath.sqrt ( sum ) ) ) ; }
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 , org.conscrypt.NativeCryptoTest.INVALID_FD , org.conscrypt.NativeCryptoTest.DUMMY_CB ) ; fail ( ) ; } catch ( java.net.SocketException expected ) { } }
Source:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CURRENT ) ) { version = com.android.dex.DexFormat.VERSION_CURRENT ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_INVOKE_POLYMORPHIC ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_26 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_DEFAULT_INTERFACE_METHODS ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.dex.DexFormat.MAGIC_SUFFIX ) ; }

Target:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CURRENT ) ) { version = com.android.dex.DexFormat.VERSION_CURRENT ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CONST_METHOD_HANDLE ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_27 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_METHOD_HANDLES ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_26 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_DEFAULT_INTERFACE_METHODS ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.dex.DexFormat.MAGIC_SUFFIX ) ; }
Source:
public com.android.dialer.voicemail.listui.NewVoicemailCallLogViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View v = inflater.inflate ( R.layout.voicemail_call_log_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailCallLogViewHolder newVoicemailCallLogViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailCallLogViewHolder ( v ) ; return newVoicemailCallLogViewHolder ; }

Target:
public com.android.dialer.voicemail.listui.NewVoicemailCallLogViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View v = inflater.inflate ( R.layout.new_voicemail_call_log_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailCallLogViewHolder newVoicemailCallLogViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailCallLogViewHolder ( v ) ; return newVoicemailCallLogViewHolder ; }
Source:
public static com.google.common.io.InputSupplier < java.io.Reader > join ( final java.lang.Iterable < ? extends com.google.common.io.InputSupplier < ? extends java.io.Reader > > suppliers ) { return new com.google.common.io.InputSupplier < java.io.Reader > ( ) { @ java.lang.Override public java.io.Reader getInput ( ) throws java.io.IOException { return new com.google.common.io.MultiReader ( suppliers.iterator ( ) ) ; } } ; }

Target:
public int read ( java.nio.CharBuffer target ) throws java.io.IOException { return readable.read ( target ) ; }
Source:
public void testNoPackageSubstitution ( ) { org.mockito.Mockito.when ( mAttr.getValue ( ) ) . thenReturn ( "com.foo.foo2.ActivityOne" ) ; assertNotNull ( new com.android.manifmerger.XmlAttribute ( mXmlElement , mAttr , new com.android.manifmerger.AttributeModel ( "ActivityOne" , true , null , null ) ) ) ; org.mockito.Mockito.verify ( mAttr ) . getValue ( ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAttr ) ; }

Target:
public void testNoPackageSubstitution ( ) { org.mockito.Mockito.when ( mAttr.getValue ( ) ) . thenReturn ( "com.foo.foo2.ActivityOne" ) ; assertNotNull ( new com.android.manifmerger.XmlAttribute ( mXmlElement , mAttr , com.android.manifmerger.AttributeModel.newModel ( "ActivityOne" ) . setIsPackageDependent ( ) . build ( ) ) ) ; org.mockito.Mockito.verify ( mAttr ) . getValue ( ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAttr ) ; }
Source:
void cleanup ( ) { mRegularScanClients.clear ( ) ; mBatchClients.clear ( ) ; mScanNative.cleanup ( ) ; }

Target:
void cleanup ( ) { mRegularScanClients.clear ( ) ; mBatchClients.clear ( ) ; mScanNative.cleanup ( ) ; if ( ( mHandler ) != null ) { mHandler.removeCallbacksAndMessages ( null ) ; android.os.Looper looper = mHandler.getLooper ( ) ; if ( looper != null ) { looper.quit ( ) ; } mHandler = null ; } }
Source:
void validatePendingIntent ( android.app.PendingIntent intent ) { if ( intent.isTargetedToPackage ( ) ) { return ; } android.util.Slog.i ( com.android.server.LocationManagerService.TAG , ( "Given Intent does not require a specific package: " + intent ) ) ; }

Target:
void disposeLocked ( boolean removeReceiver ) { java.util.ArrayList < com.android.server.LocationManagerService.UpdateRecord > globalRecords = mRecordsByProvider.get ( this . mProvider ) ; if ( globalRecords != null ) { globalRecords.remove ( this ) ; } if ( ! removeReceiver ) return ; java.util.HashMap < java.lang.String , com.android.server.LocationManagerService.UpdateRecord > receiverRecords = mReceiver.mUpdateRecords ; if ( receiverRecords != null ) { receiverRecords.remove ( this . mProvider ) ; if ( removeReceiver && ( ( receiverRecords.size ( ) ) == 0 ) ) { removeUpdatesLocked ( mReceiver ) ; } } }
Source:
public final void init ( java.security.Key key ) throws java.security.InvalidKeyException { if ( key == null ) { throw new java.security.InvalidKeyException ( "key == null" ) ; } try { spiImpl.engineInit ( key , null ) ; isInitMac = true ; } catch ( java.security.InvalidAlgorithmParameterException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public final void init ( java.security.Key key ) throws java.security.InvalidKeyException { if ( key == null ) { throw new java.security.InvalidKeyException ( "key == null" ) ; } try { getSpi ( key ) . engineInit ( key , null ) ; isInitMac = true ; } catch ( java.security.InvalidAlgorithmParameterException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public int initialize ( int subscriptionId , android.telephony.mbms.IMbmsDownloadManagerCallback listener ) throws android.os.RemoteException { return 0 ; }

Target:
public int initialize ( int subscriptionId , android.telephony.mbms.IMbmsDownloadManagerCallback callback ) throws android.os.RemoteException { return initialize ( subscriptionId , new android.telephony.mbms.MbmsDownloadManagerCallback ( ) { @ java.lang.Override public void error ( int errorCode , java.lang.String message ) throws android.os.RemoteException { callback.error ( errorCode , message ) ; } @ java.lang.Override public void fileServicesUpdated ( java.util.List < android.telephony.mbms.FileServiceInfo > services ) throws android.os.RemoteException { callback.fileServicesUpdated ( services ) ; } @ java.lang.Override public void middlewareReady ( ) throws android.os.RemoteException { callback.middlewareReady ( ) ; } } ) ; }
Source:
protected void addPage ( org.eclipse.swt.widgets.Composite page , java.lang.String title ) { page.setData ( title ) ; mPages.add ( page ) ; if ( ( mPageList ) != null ) { mPageList.add ( title ) ; } }

Target:
protected void addPage ( org.eclipse.swt.widgets.Composite page , java.lang.String title ) { assert title != null ; if ( title == null ) { title = "Unknown" ; } page.setData ( title ) ; mPages.add ( page ) ; if ( ( mPageList ) != null ) { mPageList.add ( title ) ; } }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.main ) ; com.android.tests.basicjar.Foo foo = new com.android.tests.basicjar.Foo ( ) ; int a = foo.getRandomFoo ( ) ; android.widget.TextView tv = ( ( android.widget.TextView ) ( findViewById ( R.id.text ) ) ) ; tv.setText ( ( "Random number from Jar: " + a ) ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.main ) ; com.android.tests.basicjar.Foo foo = new com.android.tests.basicjar.Foo ( ) ; int a = foo.getRandomFoo ( ) ; android.widget.TextView tv = ( ( android.widget.TextView ) ( findViewById ( R.id.text ) ) ) ; tv.setText ( ( "BasicProjectWithJar: Value from Jar: " + a ) ) ; }
Source:
void output ( int num ) { synchronized ( CpuThread.mSyncable ) { int i ; int count ; count = CpuThread.mCount ; java.lang.System.out.print ( "going: " ) ; java.lang.System.out.println ( num ) ; for ( int j = 0 ; j < 5000 ; j ++ ) ; count ++ ; CpuThread.mCount = count ; } }

Target:
public void run ( ) { synchronized ( CpuThread.mSyncable ) { for ( int i = 0 ; i < 10 ; i ++ ) { output ( mNumber ) ; } java.lang.System.out.print ( "Final result: " ) ; java.lang.System.out.println ( CpuThread.mCount ) ; } }
Source:
public void installPackage ( @ com.android.annotations.NonNull java.io.File apkFile , @ com.android.annotations.NonNull java.util.Collection < java.lang.String > options , int timeout , com.android.utils.ILogger logger ) throws com.android.builder.testing.api.DeviceException { try { iDevice.installPackage ( apkFile.getAbsolutePath ( ) , true , options ) ; } catch ( java.lang.Exception e ) { logger.error ( e , ( "Unable to install " + ( apkFile.getAbsolutePath ( ) ) ) ) ; throw new com.android.builder.testing.api.DeviceException ( e ) ; } }

Target:
public void installPackage ( @ com.android.annotations.NonNull java.io.File apkFile , @ com.android.annotations.NonNull java.util.Collection < java.lang.String > options , int timeout , com.android.utils.ILogger logger ) throws com.android.builder.testing.api.DeviceException { try { iDevice.installPackage ( apkFile.getAbsolutePath ( ) , true , ( options.isEmpty ( ) ? null : options.toArray ( new java.lang.String [ options.size ( ) ] ) ) ) ; } catch ( java.lang.Exception e ) { logger.error ( e , ( "Unable to install " + ( apkFile.getAbsolutePath ( ) ) ) ) ; throw new com.android.builder.testing.api.DeviceException ( e ) ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( obj == null ) { return false ; } if ( getClass ( ) . equals ( obj.getClass ( ) ) ) { return java.util.Arrays.equals ( mData , ( ( com.android.ide.eclipse.adt.internal.resources.manager.IntArrayWrapper ) ( obj ) ) . mData ) ; } return super . equals ( obj ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( obj == null ) { return false ; } if ( getClass ( ) . equals ( obj.getClass ( ) ) ) { return java.util.Arrays.equals ( mData , ( ( com.android.ide.common.resources.IntArrayWrapper ) ( obj ) ) . mData ) ; } return super . equals ( obj ) ; }
Source:
public void testJackArchiveToDexArchive ( ) throws java.lang.Exception { java.io.File jackAr = createJackArchiveWithResources ( ) ; java.io.File dexAr = com.android.jack.TestTools.createTempFile ( "resourcetestdex" , ".zip" ) ; com.android.jack.TestTools.compileJackToDex ( new com.android.jack.Options ( ) , jackAr , dexAr , true ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( dexAr ) ; checkResourceContent ( zipFile , com.android.jack.ResourceTest.RESOURCE1_LONGPATH , "Res1" ) ; checkResourceContent ( zipFile , com.android.jack.ResourceTest.RESOURCE2_LONGPATH , "Res2" ) ; checkResourceContent ( zipFile , com.android.jack.ResourceTest.RESOURCE3_LONGPATH , "Res3" ) ; checkResourceContent ( zipFile , com.android.jack.ResourceTest.RESOURCE4_LONGPATH , "Res4" ) ; }

Target:
public void testJackArchiveToDexDir ( ) throws java.lang.Exception { java.io.File jackAr = createJackArchiveWithResources ( ) ; java.io.File dexDir = com.android.jack.TestTools.createTempDir ( "resourcetestdex" , "dir" ) ; com.android.jack.TestTools.compileJackToDex ( new com.android.jack.Options ( ) , jackAr , dexDir , false ) ; checkResourceContentFromDir ( dexDir , com.android.jack.ResourceTest.RESOURCE1_SHORTPATH , "Res1" , false ) ; checkResourceContentFromDir ( dexDir , com.android.jack.ResourceTest.RESOURCE2_SHORTPATH , "Res2" , false ) ; checkResourceContentFromDir ( dexDir , com.android.jack.ResourceTest.RESOURCE3_SHORTPATH , "Res3" , false ) ; checkResourceContentFromDir ( dexDir , com.android.jack.ResourceTest.RESOURCE4_SHORTPATH , "Res4" , false ) ; }
Source:
public com.google.common.collect.ImmutableList < java.io.File > getTestedApks ( int density , @ com.android.annotations.Nullable java.lang.String language , @ com.android.annotations.Nullable java.lang.String region , @ com.android.annotations.NonNull java.util.List < java.lang.String > abis ) { com.google.common.collect.ImmutableList.Builder < java.io.File > testedApks = com.google.common.collect.ImmutableList.builder ( ) ; testedApks.addAll ( testedConfiguration.getFiles ( ) ) ; return testedApks.build ( ) ; }

Target:
public com.google.common.collect.ImmutableList < java.io.File > getTestedApks ( @ com.android.annotations.NonNull com.android.ide.common.process.ProcessExecutor processExecutor , @ com.android.annotations.Nullable java.io.File splitSelectExe , @ com.android.annotations.NonNull com.android.builder.testing.api.DeviceConfigProvider deviceConfigProvider ) throws com.android.ide.common.process.ProcessException { com.google.common.collect.ImmutableList.Builder < java.io.File > testedApks = com.google.common.collect.ImmutableList.builder ( ) ; testedApks.addAll ( testedConfiguration.getFiles ( ) ) ; return testedApks.build ( ) ; }
Source:
public android.bluetooth.BluetoothClass getBluetoothClass ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Bluetooth Class" ) ; return null ; } try { int classInt = android.bluetooth.BluetoothDevice.sService.getRemoteClass ( this ) ; if ( classInt == ( BluetoothClass.ERROR ) ) return null ; return new android.bluetooth.BluetoothClass ( classInt ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }

Target:
public boolean isEncrypted ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return ( service.getConnectionState ( this ) ) > ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_CONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }
Source:
public boolean isValidShortNumberForRegion ( java.lang.String shortNumber , java.lang.String regionDialingFrom ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc generalDesc = phoneMetadata.getGeneralDesc ( ) ; if ( ! ( matchesPossibleNumberAndNationalNumber ( shortNumber , generalDesc ) ) ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc shortNumberDesc = phoneMetadata.getShortCode ( ) ; return matchesPossibleNumberAndNationalNumber ( shortNumber , shortNumberDesc ) ; }

Target:
public boolean isCarrierSpecificForRegion ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , java.lang.String regionDialingFrom ) { if ( ! ( regionDialingFromMatchesNumber ( number , regionDialingFrom ) ) ) { return false ; } java.lang.String nationalNumber = com.google.i18n.phonenumbers.ShortNumberInfo.getNationalSignificantNumber ( number ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; return ( phoneMetadata != null ) && ( matchesPossibleNumberAndNationalNumber ( nationalNumber , phoneMetadata.getCarrierSpecific ( ) ) ) ; }
Source:
private android.graphics.drawable.Drawable getCallTypeDrawable ( int callType ) { com.android.dialer.calllogutils.CallTypeIconsView.Resources resources = ( useLargeIcons ) ? com.android.dialer.calllogutils.CallTypeIconsView.sLargeResouces : com.android.dialer.calllogutils.CallTypeIconsView.sResources ; switch ( callType ) { case com.android.dialer.compat.AppCompatConstants.CALLS_INCOMING_TYPE : case com.android.dialer.compat.AppCompatConstants.CALLS_ANSWERED_EXTERNALLY_TYPE : return resources.incoming ; case com.android.dialer.compat.AppCompatConstants.CALLS_OUTGOING_TYPE : return resources.outgoing ; case com.android.dialer.compat.AppCompatConstants.CALLS_MISSED_TYPE : return resources.missed ; case com.android.dialer.compat.AppCompatConstants.CALLS_VOICEMAIL_TYPE : return resources.voicemail ; case com.android.dialer.compat.AppCompatConstants.CALLS_BLOCKED_TYPE : return resources.blocked ; default : return resources.missed ; } }

Target:
private android.graphics.drawable.Drawable getCallTypeDrawable ( int callType ) { com.android.dialer.calllogutils.CallTypeIconsView.Resources resources = ( useLargeIcons ) ? com.android.dialer.calllogutils.CallTypeIconsView.largeResouces : com.android.dialer.calllogutils.CallTypeIconsView.resources ; switch ( callType ) { case com.android.dialer.compat.AppCompatConstants.CALLS_INCOMING_TYPE : case com.android.dialer.compat.AppCompatConstants.CALLS_ANSWERED_EXTERNALLY_TYPE : return resources.incoming ; case com.android.dialer.compat.AppCompatConstants.CALLS_OUTGOING_TYPE : return resources.outgoing ; case com.android.dialer.compat.AppCompatConstants.CALLS_MISSED_TYPE : return resources.missed ; case com.android.dialer.compat.AppCompatConstants.CALLS_VOICEMAIL_TYPE : return resources.voicemail ; case com.android.dialer.compat.AppCompatConstants.CALLS_BLOCKED_TYPE : return resources.blocked ; default : return resources.missed ; } }
Source:
public static < T extends android.icu.dev.test.TestFmwk > T newTestFmwkInstance ( java.lang.Class < ? extends T > testFmwkClass ) throws java.lang.IllegalAccessException , java.lang.InstantiationException { T testFmwk = testFmwkClass.newInstance ( ) ; android.icu.dev.test.TestFmwk.TestParams testParams = TestFmwk.TestParams.create ( new java.lang.String [ 0 ] , null ) ; android.icu.junit.TestFmwkUtils.paramsField.set ( testFmwk , testParams ) ; return testFmwk ; }

Target:
public static < T extends android.icu.dev.test.TestFmwk > T newTestFmwkInstance ( java.lang.Class < ? extends T > testFmwkClass ) throws java.lang.IllegalAccessException , java.lang.InstantiationException { T testFmwk = testFmwkClass.newInstance ( ) ; android.icu.dev.test.TestFmwk.TestParams testParams = TestFmwk.TestParams.create ( new java.lang.String [ 0 ] , null ) ; if ( testParams == null ) { throw new java.lang.IllegalStateException ( "Could not create TestParams" ) ; } testParams.stack = testParams.new android.icu.junit.State ( null , "DUMMY" , false ) ; android.icu.junit.TestFmwkUtils.paramsField.set ( testFmwk , testParams ) ; return testFmwk ; }
Source:
public void add ( int index , int value ) { if ( ( index < 0 ) || ( index > ( mSize ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ) ; } ensureCapacity ( 1 ) ; if ( ( ( mSize ) - index ) != 0 ) { java.lang.System.arraycopy ( mValues , index , mValues , ( index + 1 ) , ( ( mSize ) - index ) ) ; } mValues [ index ] = value ; ( mSize ) ++ ; }

Target:
private void checkBounds ( int index ) { if ( ( index < 0 ) || ( ( mSize ) <= index ) ) { throw new java.lang.ArrayIndexOutOfBoundsException ( mSize , index ) ; } }
Source:
public void nvReadItem ( int itemID , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_NV_READ_ITEM , response ) ; rr.mParcel.writeInt ( itemID ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ' ' ) + itemID ) ) ; send ( rr ) ; }

Target:
void writeMetricsSrvcc ( int state ) { mMetrics.writeRilSrvcc ( mPhoneId , state ) ; }
Source:
public java.lang.String getToolTipText ( java.awt.event.MouseEvent event ) { mTmpPoint.setLocation ( event.getPoint ( ) ) ; mViewPortInverseTransform.transform ( mTmpPoint , mTmpPoint ) ; return mCallHierarchyRenderer.getToolTipFor ( mTmpPoint.x , mTmpPoint.y ) ; }

Target:
public java.lang.String getToolTipText ( java.awt.event.MouseEvent event ) { if ( ( ( mTraceData ) == null ) || ( ( mCallHierarchyRenderer ) == null ) ) { return null ; } mTmpPoint.setLocation ( event.getPoint ( ) ) ; mViewPortInverseTransform.transform ( mTmpPoint , mTmpPoint ) ; return mCallHierarchyRenderer.getToolTipFor ( mTmpPoint.x , mTmpPoint.y ) ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { selectContext ( ( ( mContextSwitchCombo.getSelectionIndex ( ) ) - 1 ) ) ; }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { if ( ( e.getSource ( ) ) == ( mCollapseAllToolItem ) ) { setTreeItemsExpanded ( false ) ; } else if ( ( e.getSource ( ) ) == ( mExpandAllToolItem ) ) { setTreeItemsExpanded ( true ) ; } else if ( ( e.getSource ( ) ) == ( mSaveAsToolItem ) ) { exportTrace ( ) ; } }
Source:
protected void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getSystemService ( Context.SENSOR_SERVICE ) ) ) ; mView = new com.example.android.apis.graphics.Compass.SampleView ( this ) ; setContentView ( mView ) ; }

Target:
protected void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getSystemService ( Context.SENSOR_SERVICE ) ) ) ; mSensor = mSensorManager.getDefaultSensor ( Sensor.TYPE_ORIENTATION ) ; mView = new com.example.android.apis.graphics.Compass.SampleView ( this ) ; setContentView ( mView ) ; }
Source:
public static java.lang.String selectName ( com.android.dialer.phonelookup.PhoneLookupInfo phoneLookupInfo ) { if ( ( phoneLookupInfo.getCp2Info ( ) . getCp2ContactInfoCount ( ) ) > 0 ) { return phoneLookupInfo.getCp2Info ( ) . getCp2ContactInfo ( 0 ) . getName ( ) ; } return "" ; }

Target:
public static java.lang.String selectName ( com.android.dialer.phonelookup.PhoneLookupInfo phoneLookupInfo ) { com.android.dialer.phonelookup.PhoneLookupInfo.Cp2Info.Cp2ContactInfo firstLocalContact = com.android.dialer.phonelookup.PhoneLookupSelector.firstLocalContact ( phoneLookupInfo ) ; if ( firstLocalContact != null ) { java.lang.String name = firstLocalContact.getName ( ) ; if ( ! ( name.isEmpty ( ) ) ) { return firstLocalContact.getName ( ) ; } } return "" ; }
Source:
private void sortPackages ( ) { if ( ( ( ( mCheckSortApi ) != null ) && ( ! ( mCheckSortApi.isDisposed ( ) ) ) ) && ( mCheckSortApi.getSelection ( ) ) ) { sortByAPI ( ) ; } else { sortBySource ( ) ; } }

Target:
private void sortPackages ( ) { if ( ( ( ( mCheckSortApi ) != null ) && ( ! ( mCheckSortApi.isDisposed ( ) ) ) ) && ( mCheckSortApi.getSelection ( ) ) ) { sortByAPI ( ) ; } else { sortBySource ( ) ; } updateButtonsState ( ) ; }
Source:
private boolean isPackageInstalled ( java.lang.String pkgName ) { android.content.pm.PackageManager pm = mContext.getPackageManager ( ) ; try { pm.getPackageInfo ( pkgName , PackageManager.GET_ACTIVITIES ) ; if ( com.android.internal.telephony.uicc.UiccCard.DBG ) log ( ( pkgName + " is installed." ) ) ; return true ; } catch ( android.content.pm.PackageManager e ) { if ( com.android.internal.telephony.uicc.UiccCard.DBG ) log ( ( pkgName + " is not installed." ) ) ; return false ; } }

Target:
public boolean isApplicationOnIcc ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType type ) { synchronized ( mLock ) { if ( ( mUiccProfile ) != null ) { return mUiccProfile.isApplicationOnIcc ( type ) ; } else { return false ; } } }
Source:
public void testValidateLocalRepositoryFile1 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/repository_sample_1.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( 1 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }

Target:
public void testValidateLocalRepositoryFile1 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/repository_sample_1.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getRepoValidator ( 1 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }
Source:
public void testAesCbcHmacSha512Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testAuthTcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , false , 1 , true ) ; }
Source:
protected native void datagramSocketCreate ( ) throws java.net.SocketException ;

Target:
protected void datagramSocketCreate ( ) throws java.net.SocketException { fd = libcore.io.IoBridge.socket ( android.system.OsConstants.AF_INET6 , android.system.OsConstants.SOCK_DGRAM , 0 ) ; libcore.io.IoBridge.setSocketOption ( fd , java.net.SocketOptions.SO_BROADCAST , true ) ; try { Libcore.os.setsockoptInt ( fd , android.system.OsConstants.IPPROTO_IP , android.system.OsConstants.IP_MULTICAST_ALL , 0 ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
static boolean hasPrebuilt ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface clOrI ) { com.android.sched.util.location.Location location = clOrI.getLocation ( ) ; if ( location instanceof com.android.jack.library.TypeInInputLibraryLocation ) { com.android.jack.library.InputLibrary inputLibrary = ( ( com.android.jack.library.TypeInInputLibraryLocation ) ( location ) ) . getInputLibrary ( ) ; if ( inputLibrary.containsFileType ( FileType.PREBUILT ) ) { return true ; } } return false ; }

Target:
public boolean accept ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface clOrI ) { com.android.sched.util.location.Location location = clOrI.getLocation ( ) ; if ( location instanceof com.android.jack.library.TypeInInputLibraryLocation ) { com.android.jack.library.InputLibrary inputLibrary = ( ( com.android.jack.library.TypeInInputLibraryLocation ) ( location ) ) . getInputLibrary ( ) ; if ( inputLibrary.containsFileType ( FileType.PREBUILT ) ) { return false ; } } return true ; }
Source:
protected void finishMerge ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFile out ) throws com.android.jack.backend.dex.DexWritingException { try ( com.android.sched.util.log.Event event = tracer.open ( JackEventType.DEX_MERGER_FINISH ) ) { java.io.OutputStream os = null ; try { try { os = new java.io.BufferedOutputStream ( out.getOutputStream ( ) ) ; merger.finish ( os ) ; } finally { if ( os != null ) { os.close ( ) ; } } } catch ( java.io.IOException | com.android.sched.util.file.WrongPermissionException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } } }

Target:
protected void finishMerge ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFile out ) throws com.android.jack.backend.dex.DexWritingException { try ( com.android.sched.util.log.Event event = tracer.open ( JackEventType.DEX_MERGER_FINISH ) ) { try { try ( java.io.OutputStream os = new java.io.BufferedOutputStream ( out.getOutputStream ( ) ) ) { merger.finish ( os , out ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseException ( out , e ) ; } } catch ( com.android.sched.util.file.CannotWriteException | com.android.sched.util.file.CannotCloseException | com.android.sched.util.file.WrongPermissionException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } } }
Source:
public void onProxySessionTerminated ( int reason ) { if ( android.net.wifi.nan.WifiNanManager.VDBG ) android.util.Log.v ( android.net.wifi.nan.WifiNanManager.TAG , ( "Proxy: onSessionTerminated: reason=" + reason ) ) ; if ( ( mSession ) != null ) { mSession.setTerminated ( ) ; mSession = null ; } else { android.util.Log.w ( android.net.wifi.nan.WifiNanManager.TAG , "Proxy: onSessionTerminated called but mSession is null!?" ) ; } mNanManager.clear ( ) ; mOriginalCallback.onSessionTerminated ( reason ) ; }

Target:
public void onProxySessionTerminated ( int reason ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) android.util.Log.v ( android.net.wifi.aware.WifiAwareManager.TAG , ( "Proxy: onSessionTerminated: reason=" + reason ) ) ; if ( ( mSession ) != null ) { mSession.setTerminated ( ) ; mSession = null ; } else { android.util.Log.w ( android.net.wifi.aware.WifiAwareManager.TAG , "Proxy: onSessionTerminated called but mSession is null!?" ) ; } mAwareManager.clear ( ) ; mOriginalCallback.onSessionTerminated ( reason ) ; }
Source:
private static java.util.Map < java.lang.String , java.lang.String > convertHeaders ( org.apache.http.Header [ ] headers ) { java.util.Map < java.lang.String , java.lang.String > result = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; for ( int i = 0 ; i < ( headers.length ) ; i ++ ) { result.put ( headers [ i ] . getName ( ) , headers [ i ] . getValue ( ) ) ; } return result ; }

Target:
protected static java.util.Map < java.lang.String , java.lang.String > convertHeaders ( org.apache.http.Header [ ] headers ) { java.util.Map < java.lang.String , java.lang.String > result = new java.util.TreeMap < java.lang.String , java.lang.String > ( java.lang.String.CASE_INSENSITIVE_ORDER ) ; for ( int i = 0 ; i < ( headers.length ) ; i ++ ) { result.put ( headers [ i ] . getName ( ) , headers [ i ] . getValue ( ) ) ; } return result ; }
Source:
public void iccOpenLogicalChannel ( java.lang.String aid , int p2 , android.os.Message response ) { loglocal ( ( ( ( ( ( ( ( "Open Logical Channel: " + aid ) + " , " ) + p2 ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( aid , p2 , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }

Target:
public void iccOpenLogicalChannel ( java.lang.String aid , int p2 , android.os.Message response ) { loglocal ( ( ( ( ( ( ( ( "iccOpenLogicalChannel: " + aid ) + " , " ) + p2 ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( aid , p2 , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }
Source:
public static float scalarProjection ( float [ ] a , float [ ] b ) { float length = ( ( float ) ( java.lang.Math.sqrt ( ( ( ( b [ 0 ] ) * ( b [ 0 ] ) ) + ( ( b [ 1 ] ) * ( b [ 1 ] ) ) ) ) ) ) ; return ( com.android.gallery3d.filtershow.imageshow.GeometryMathUtils.dotProduct ( a , b ) ) / length ; }

Target:
public static float scalarProjection ( float [ ] a , float [ ] b ) { float length = ( ( float ) ( java.lang.Math.hypot ( b [ 0 ] , b [ 1 ] ) ) ) ; return ( com.android.gallery3d.filtershow.imageshow.GeometryMathUtils.dotProduct ( a , b ) ) / length ; }
Source:
private java.lang.String getElement ( org.w3c.dom.Element element , java.lang.String tag ) { return element.getElementsByTagName ( tag ) . item ( 0 ) . getTextContent ( ) ; }

Target:
private java.lang.String getElement ( org.w3c.dom.Element element , java.lang.String tag , java.lang.String defaultValue ) { org.w3c.dom.NodeList elements = element.getElementsByTagName ( tag ) ; if ( ( elements.getLength ( ) ) > 0 ) { return elements.item ( 0 ) . getTextContent ( ) ; } else { return defaultValue ; } }
Source:
boolean setProtocolMode ( android.bluetooth.BluetoothDevice device , int protocolMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "setProtocolMode: " + ( device.getAddress ( ) ) ) ) ; } int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothHidHost.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_SET_PROTOCOL_MODE ) ; msg.obj = device ; msg.arg1 = protocolMode ; mHandler.sendMessage ( msg ) ; return true ; }

Target:
boolean setProtocolMode ( android.bluetooth.BluetoothDevice device , int protocolMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidHostService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , ( "setProtocolMode: " + ( device.getAddress ( ) ) ) ) ; } int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothHidHost.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidHostService.MESSAGE_SET_PROTOCOL_MODE ) ; msg.obj = device ; msg.arg1 = protocolMode ; mHandler.sendMessage ( msg ) ; return true ; }
Source:
public static void maybeAddModuleForSendingTextMessage ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , java.lang.String originalNumber ) { if ( ! ( android.text.TextUtils.isEmpty ( originalNumber ) ) ) { modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.util.IntentUtil.getSendSmsIntent ( originalNumber ) , R.string.send_a_message , R.drawable.quantum_ic_message_vd_theme_24 ) ) ; } }

Target:
public static void maybeAddModuleForSendingTextMessage ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , java.lang.String normalizedNumber , boolean isBlocked ) { if ( isBlocked ) { return ; } if ( ! ( android.text.TextUtils.isEmpty ( normalizedNumber ) ) ) { modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.util.IntentUtil.getSendSmsIntent ( normalizedNumber ) , R.string.send_a_message , R.drawable.quantum_ic_message_vd_theme_24 ) ) ; } }
Source:
public static void d ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.DEBUG ) { android.util.Log.d ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } }

Target:
public static void d ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.sIsUserExtendedLoggingEnabled ) { android.telecom.Log.maybeDisableLogging ( ) ; android.util.Slog.i ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } else if ( android.telecom.Log.DEBUG ) { android.util.Slog.d ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } }
Source:
public void testProviderService_supportsParameter_SupportedKeyClasses_Failure ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Signature.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; put ( "Signature.FOO SupportedKeyClasses" , java.security.interfaces.RSAPrivateKey.class . getName ( ) ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Signature" , "FOO" ) ; assertFalse ( service.supportsParameter ( new libcore.javax.crypto.MockKey ( ) ) ) ; } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }

Target:
public void testProviderService_supportsParameter_SupportedKeyClasses_Success ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Signature.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; put ( "Signature.FOO SupportedKeyClasses" , libcore.javax.crypto.MockKey.class . getName ( ) ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Signature" , "FOO" ) ; assertTrue ( service.supportsParameter ( new libcore.javax.crypto.MockKey ( ) ) ) ; } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }
Source:
private boolean isInBlackList ( java.lang.String inputId ) { if ( ! ( Features.USE_PARTNER_INPUT_BLACKLIST.isEnabled ( mContext ) ) ) { return false ; } for ( java.lang.String disabledTunerInputPrefix : com.android.tv.util.TvInputManagerHelper.PARTNER_TUNER_INPUT_PREFIX_BLACKLIST ) { if ( inputId.contains ( disabledTunerInputPrefix ) ) { return true ; } } return false ; }

Target:
private boolean isInBlackList ( java.lang.String inputId ) { if ( Features.USE_PARTNER_INPUT_BLACKLIST.isEnabled ( mContext ) ) { for ( java.lang.String disabledTunerInputPrefix : com.android.tv.util.TvInputManagerHelper.PARTNER_TUNER_INPUT_PREFIX_BLACKLIST ) { if ( inputId.contains ( disabledTunerInputPrefix ) ) { return true ; } } } if ( com.android.tv.common.TvCommonUtils.isRunningInTest ( ) ) { for ( java.lang.String testableInput : com.android.tv.util.TvInputManagerHelper.TESTABLE_INPUTS ) { if ( testableInput.equals ( inputId ) ) { return false ; } } return true ; } return false ; }
Source:
private boolean isImportantMessage ( com.android.ddmuilib.logcat.LogCatMessage m ) { if ( ( m.getLogLevel ( ) . getPriority ( ) ) < ( LogLevel.ERROR.getPriority ( ) ) ) { return false ; } java.lang.String app = m.getAppName ( ) ; for ( com.android.ide.eclipse.ddms.IDebuggerConnector c : mConnectors ) { if ( c.isWorkspaceApp ( app ) ) { return true ; } } return false ; }

Target:
private boolean isImportantMessage ( com.android.ddmuilib.logcat.LogCatMessage m ) { if ( ( m.getLogLevel ( ) . getPriority ( ) ) < ( mMinMessagePriority ) ) { return false ; } java.lang.String app = m.getAppName ( ) ; for ( com.android.ide.eclipse.ddms.IDebuggerConnector c : mConnectors ) { if ( c.isWorkspaceApp ( app ) ) { return true ; } } return false ; }
Source:
public void testStageInstallWithErrorCode_missingTzLookupFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( null ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_missingTzLookupFile ( ) throws java.lang.Exception { byte [ ] stagedDistroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( stagedDistroBytes ) ) ) ; assertInstallDistroStaged ( stagedDistroBytes ) ; byte [ ] incompleteDistroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( null ) . buildUnvalidatedBytes ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( incompleteDistroBytes ) ) ) ; assertInstallDistroStaged ( stagedDistroBytes ) ; assertNoInstalledDistro ( ) ; }