auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.io.OutputStream openWrite ( ) throws java.io.IOException { assert ! ( closed ) ; return new java.security.DigestOutputStream ( file.openWrite ( ) , this . mdFactory.create ( ) ) { @ java.lang.Override public void close ( ) throws java.io.IOException { super . close ( ) ; com.android.sched.vfs.MessageDigestInputOutputVFS.MessageDigestOutputVFile.this . digest = getMessageDigest ( ) . digest ( ) ; } } ; }

Target:
public java.io.OutputStream openWrite ( ) throws java.io.IOException { assert ! ( isClosed ( ) ) ; return new java.security.DigestOutputStream ( file.openWrite ( ) , this . mdFactory.create ( ) ) { @ java.lang.Override public void close ( ) throws java.io.IOException { super . close ( ) ; com.android.sched.vfs.MessageDigestInputOutputVFS.MessageDigestOutputVFile.this . digest = getMessageDigest ( ) . digest ( ) ; } } ; }
Source:
public void listen ( android.telephony.PhoneStateListener listener , int events ) { if ( ( mContext ) == null ) return ; try { boolean notifyNow = ( getITelephony ( ) ) != null ; if ( ( listener.mSubId ) == null ) { listener.mSubId = mSubId ; } android.telephony.TelephonyManager.sRegistry.listenForSubscriber ( listener.mSubId , getOpPackageName ( ) , listener.callback , events , notifyNow ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }

Target:
public android.os.Bundle getVisualVoicemailSettings ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getVisualVoicemailSettings ( mContext.getOpPackageName ( ) , mSubId ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }
Source:
public void test_read$B ( ) throws java.io.IOException { byte [ ] buf1 = new byte [ 100 ] ; is.read ( buf1 ) ; assertTrue ( "Test 1: Failed to read correct data." , new java.lang.String ( buf1 , 0 , buf1.length ) . equals ( libcore.java.io.OldFilterInputStreamTest.testString.substring ( 0 , 100 ) ) ) ; is.close ( ) ; try { is.read ( buf1 ) ; fail ( "Test 2: IOException expected." ) ; } catch ( java.io.IOException e ) { } }

Target:
public void test_read$B ( ) throws java.io.IOException { byte [ ] buf1 = new byte [ 100 ] ; is.read ( buf1 ) ; assertTrue ( "Test 1: Failed to read correct data." , new java.lang.String ( buf1 , 0 , buf1.length ) . equals ( libcore.java.io.OldFilterInputStreamTest.INPUT.substring ( 0 , 100 ) ) ) ; is.close ( ) ; try { is.read ( buf1 ) ; fail ( "Test 2: IOException expected." ) ; } catch ( java.io.IOException e ) { } }
Source:
public com.android.jack.ir.sourceinfo.SourceInfo create ( @ javax.annotation.Nonnegative int startLine , @ javax.annotation.Nonnegative int endLine , @ javax.annotation.Nonnull java.lang.String fileName ) { com.android.jack.ir.sourceinfo.FileSourceInfo fileSourceInfo = create ( fileName ) ; return create ( startLine , endLine , fileSourceInfo ) ; }

Target:
public com.android.jack.ir.sourceinfo.SourceInfo create ( @ javax.annotation.Nonnegative int startLine , @ javax.annotation.Nonnegative int endLine , @ javax.annotation.Nonnull java.lang.String fileName ) { com.android.jack.ir.sourceinfo.FileSourceInfo fileSourceInfo = create ( fileName ) ; if ( startLine == ( SourceInfo.UNKNOWN_LINE_NUMBER ) ) { assert endLine == ( SourceInfo.UNKNOWN_LINE_NUMBER ) ; return fileSourceInfo ; } return create ( startLine , endLine , fileSourceInfo ) ; }
Source:
public void testSerialization ( ) throws java.lang.Exception { java.util.Currency usd = java.util.Currency.getInstance ( "USD" ) ; java.lang.String actual = libcore.util.SerializationTester.serializeHex ( usd ) ; java.lang.String expected = "aced0005737200126a6176612e7574696c2e43757272656e6379fdcd934a5911a91f02" + ( "00014c000c63757272656e6379436f64657400124c6a6176612f6c616e672f537472696e673b7870" + "740003555344" ) ; assertEquals ( expected , actual ) ; java.util.Currency deserializedUsd = ( ( java.util.Currency ) ( libcore.util.SerializationTester.deserializeHex ( expected ) ) ) ; assertSame ( "Currency objects should be singletons" , usd , deserializedUsd ) ; }

Target:
public void testSerialization ( ) throws java.lang.Exception { java.util.Currency usd = java.util.Currency.getInstance ( "USD" ) ; java.lang.String actual = libcore.util.SerializationTester.serializeHex ( usd ) ; java.lang.String expected = "ACED0005737200126A6176612E7574696C2E43757272656E6379FDCD934A5911A91F02" + ( "00014C000C63757272656E6379436F64657400124C6A6176612F6C616E672F537472696E673B7870" + "740003555344" ) ; assertEquals ( expected , actual ) ; java.util.Currency deserializedUsd = ( ( java.util.Currency ) ( libcore.util.SerializationTester.deserializeHex ( expected ) ) ) ; assertSame ( "Currency objects should be singletons" , usd , deserializedUsd ) ; }
Source:
public int answer ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configs , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { for ( java.util.Map.Entry < java.lang.String , android.net.wifi.WifiConfiguration > entry : createWpaSupplicantLoadData ( networks ) . entrySet ( ) ) { configs.put ( entry.getKey ( ) , entry.getValue ( ) ) ; } return 0 ; }

Target:
public boolean answer ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configs , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { for ( java.util.Map.Entry < java.lang.String , android.net.wifi.WifiConfiguration > entry : createWpaSupplicantLoadData ( networks ) . entrySet ( ) ) { configs.put ( entry.getKey ( ) , entry.getValue ( ) ) ; } networkExtras.put ( passpointNetworkId , createNetworkExtrasForPasspointConfig ( fqdn ) ) ; return true ; }
Source:
public boolean isBondingInitiatedLocally ( ) { try { return android.bluetooth.BluetoothDevice.sService.isBondingInitiatedLocally ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean createBondOutOfBand ( int transport , android.bluetooth.OobData oobData ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.w ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled, createBondOutOfBand failed" ) ; return false ; } try { return service.createBondOutOfBand ( this , transport , oobData ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public void testRemove1_IndexOutOfBounds ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.remove ( ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testSet1_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.set ( ( - 1 ) , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.project.Project project = PlatformDataKeys.PROJECT.getData ( e.getDataContext ( ) ) ; if ( project == null ) { project = com.intellij.openapi.project.ProjectManager.getInstance ( ) . getDefaultProject ( ) ; } com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( project , OptionsEditorDialog.DIMENSION_KEY , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( project ) ) ; }

Target:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.project.Project project = PlatformDataKeys.PROJECT.getData ( e.getDataContext ( ) ) ; if ( project == null ) { project = com.intellij.openapi.project.ProjectManager.getInstance ( ) . getDefaultProject ( ) ; } if ( com.intellij.ide.actions.ShowStructureSettingsAction.isGradleProject ( project ) ) { com.intellij.ide.actions.ShowStructureSettingsAction.showDisabledProjectStructureDialogMessage ( ) ; } com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( project , OptionsEditorDialog.DIMENSION_KEY , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( project ) ) ; }
Source:
private android.os.Bundle maybeCleanseExtras ( android.os.Bundle extras ) { if ( extras == null ) { return null ; } int startSize = extras.size ( ) ; android.os.Bundle filtered = extras.filterValues ( ) ; int endSize = filtered.size ( ) ; if ( startSize != endSize ) { android.util.Log.i ( com.android.ims.ImsCallProfile.TAG , ( ( ( "maybeCleanseExtras: " + ( startSize - endSize ) ) + " extra values were " ) + "removed - only primitive types and system parcelables are permitted." ) ) ; } return filtered ; }

Target:
private android.os.Bundle maybeCleanseExtras ( android.os.Bundle extras ) { if ( extras == null ) { return null ; } int startSize = extras.size ( ) ; android.os.Bundle filtered = extras.filterValues ( ) ; int endSize = filtered.size ( ) ; if ( startSize != endSize ) { android.util.Log.i ( android.telephony.ims.ImsCallProfile.TAG , ( ( ( "maybeCleanseExtras: " + ( startSize - endSize ) ) + " extra values were " ) + "removed - only primitive types and system parcelables are permitted." ) ) ; } return filtered ; }
Source:
public void test_getBucketLabel_invalid ( ) throws java.lang.Exception { libcore.icu.AlphabeticIndex ai = new libcore.icu.AlphabeticIndex ( java.util.Locale.US ) ; try { ai.getBucketLabel ( ( - 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { ai.getBucketLabel ( 123456 ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void test_getBucketLabel_invalid ( ) throws java.lang.Exception { libcore.icu.ImmutableIndex ii = libcore.icu.AlphabeticIndexTest.createIndex ( java.util.Locale.US ) ; try { ii.getBucketLabel ( ( - 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { ii.getBucketLabel ( 123456 ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
private void onCallLeavingState ( com.android.server.telecom.Call call , int state ) { switch ( state ) { case CallState.ACTIVE : case CallState.CONNECTING : onCallLeavingActiveDialingOrConnecting ( ) ; break ; case CallState.RINGING : onCallLeavingRinging ( ) ; break ; case CallState.ON_HOLD : onCallLeavingHold ( ) ; break ; case CallState.DIALING : stopRingbackForCall ( call ) ; onCallLeavingActiveDialingOrConnecting ( ) ; } }

Target:
private void onCallLeavingState ( com.android.server.telecom.Call call , int state ) { switch ( state ) { case CallState.ACTIVE : case CallState.CONNECTING : onCallLeavingActiveDialingOrConnecting ( ) ; break ; case CallState.RINGING : onCallLeavingRinging ( ) ; break ; case CallState.ON_HOLD : onCallLeavingHold ( ) ; break ; case CallState.PULLING : onCallLeavingActiveDialingOrConnecting ( ) ; break ; case CallState.DIALING : stopRingbackForCall ( call ) ; onCallLeavingActiveDialingOrConnecting ( ) ; break ; } }
Source:
private void sendExpireMsgForFeature ( android.net.NetworkCapabilities netCap , int seqNum , int delay ) { if ( delay >= 0 ) { android.util.Log.d ( android.net.ConnectivityManager.TAG , ( ( ( "sending expire msg with seqNum " + seqNum ) + " and delay " ) + delay ) ) ; android.net.ConnectivityManager.CallbackHandler handler = getHandler ( ) ; android.os.Message msg = handler.obtainMessage ( android.net.ConnectivityManager.EXPIRE_LEGACY_REQUEST , seqNum , 0 , netCap ) ; handler.sendMessageDelayed ( msg , delay ) ; } }

Target:
private void sendExpireMsgForFeature ( android.net.NetworkCapabilities netCap , int seqNum , int delay ) { if ( delay >= 0 ) { android.util.Log.d ( android.net.ConnectivityManager.TAG , ( ( ( "sending expire msg with seqNum " + seqNum ) + " and delay " ) + delay ) ) ; android.net.ConnectivityManager.CallbackHandler handler = getDefaultHandler ( ) ; android.os.Message msg = handler.obtainMessage ( android.net.ConnectivityManager.EXPIRE_LEGACY_REQUEST , seqNum , 0 , netCap ) ; handler.sendMessageDelayed ( msg , delay ) ; } }
Source:
public boolean onPreferenceChange ( android.support.v7.preference.Preference preference , java.lang.Object newValue ) { android.content.ComponentName name = new android.content.ComponentName ( getContext ( ) , com.android.traceur.QsService.class ) ; getContext ( ) . getPackageManager ( ) . setComponentEnabledSetting ( name , ( ( ( java.lang.Boolean ) ( newValue ) ) ? android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED : android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ) , PackageManager.DONT_KILL_APP ) ; return true ; }

Target:
public void onClick ( android.content.DialogInterface dialog , int which ) { dialog.dismiss ( ) ; }
Source:
private static void assertValues ( android.net.NetworkStats stats , int index , java.lang.String iface , int uid , int set , int tag , int metered , int roaming , long rxBytes , long rxPackets , long txBytes , long txPackets , long operations ) { final android.net.NetworkStats.Entry entry = stats.getValues ( index , null ) ; android.net.NetworkStatsTest.assertValues ( entry , iface , uid , set , tag , metered , roaming ) ; android.net.NetworkStatsTest.assertValues ( entry , rxBytes , rxPackets , txBytes , txPackets , operations ) ; }

Target:
private static void assertValues ( android.net.NetworkStats stats , int index , java.lang.String iface , int uid , int set , int tag , int metered , int roaming , int defaultNetwork , long rxBytes , long rxPackets , long txBytes , long txPackets , long operations ) { final android.net.NetworkStats.Entry entry = stats.getValues ( index , null ) ; android.net.NetworkStatsTest.assertValues ( entry , iface , uid , set , tag , metered , roaming , defaultNetwork ) ; android.net.NetworkStatsTest.assertValues ( entry , rxBytes , rxPackets , txBytes , txPackets , operations ) ; }
Source:
public com.android.sdklib.SdkManager getNewSdkManager ( @ com.android.annotations.NonNull com.android.utils.ILogger log ) { return com.android.sdklib.SdkManager.createManager ( getSdkLocation ( ) , log ) ; }

Target:
public java.lang.String getSdkOsLocation ( ) { java.lang.String path = ( ( mManager ) == null ) ? null : mManager.getLocation ( ) ; if ( path != null ) { if ( ( ( path.length ( ) ) > 0 ) && ( ! ( path.endsWith ( java.io.File.separator ) ) ) ) { path = path + ( java.io.File.separator ) ; } } return path ; }
Source:
public void test_tryLockJJZ_Shared ( ) throws java.lang.Exception { final long POSITION = 100 ; final long SIZE = 200 ; fileLock = readOnlyFileChannel.tryLock ( POSITION , SIZE , true ) ; assertTrue ( fileLock.isValid ( ) ) ; assertTrue ( fileLock.isShared ( ) ) ; assertSame ( readOnlyFileChannel , fileLock.channel ( ) ) ; assertEquals ( POSITION , fileLock.position ( ) ) ; assertEquals ( SIZE , fileLock.size ( ) ) ; }

Target:
public void test_tryLockJJZ_Shared ( ) throws java.lang.Exception { final long POSITION = 100 ; final long SIZE = 200 ; fileLock = readOnlyFileChannel.tryLock ( POSITION , SIZE , true ) ; assertTrue ( fileLock.isValid ( ) ) ; assertTrue ( fileLock.isShared ( ) ) ; assertSame ( readOnlyFileChannel , fileLock.channel ( ) ) ; assertSame ( readOnlyFileChannel , fileLock.acquiredBy ( ) ) ; assertEquals ( POSITION , fileLock.position ( ) ) ; assertEquals ( SIZE , fileLock.size ( ) ) ; }
Source:
public void run ( ) { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.isViewServerRunning ( device ) ) ) { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.startViewServer ( device ) ) ) { com.android.ddmlib.Log.e ( com.android.hierarchyviewerlib.HierarchyViewerDirector.TAG , ( "Unable to debug device " + device ) ) ; return ; } } com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . updateDevice ( device , windows ) ; }

Target:
public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( device ) ; hvDevice.reloadWindows ( ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . updateDevice ( hvDevice ) ; }
Source:
public boolean getMasterSyncAutomatically ( ) { synchronized ( mAuthorities ) { return mMasterSyncAutomatically ; } }

Target:
public void setMasterSyncAutomatically ( boolean flag , int userId ) { synchronized ( mAuthorities ) { java.lang.Boolean auto = mMasterSyncAutomatically.get ( userId ) ; if ( ( auto != null ) && ( ( ( boolean ) ( auto ) ) == flag ) ) { return ; } mMasterSyncAutomatically.put ( userId , flag ) ; writeAccountInfoLocked ( ) ; } if ( flag ) { requestSync ( null , userId , null , new android.os.Bundle ( ) ) ; } reportChange ( ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS ) ; mContext.sendBroadcast ( android.content.SyncStorageEngine.SYNC_CONNECTION_SETTING_CHANGED_INTENT ) ; }
Source:
public void string ( @ org.jetbrains.annotations.Nullable java.lang.String v ) throws java.io.IOException { try { if ( v == null ) { int32 ( 0 ) ; return ; } byte [ ] bytes = v.getBytes ( "UTF-8" ) ; int32 ( ( ( short ) ( bytes.length ) ) ) ; for ( byte b : bytes ) { int8 ( b ) ; } } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void string ( @ org.jetbrains.annotations.Nullable java.lang.String v ) throws java.io.IOException { try { if ( v == null ) { uint32 ( 0 ) ; return ; } byte [ ] bytes = v.getBytes ( "UTF-8" ) ; uint32 ( bytes.length ) ; for ( byte b : bytes ) { int8 ( b ) ; } } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
protected void fillFiles ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVDir vDir , @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull java.util.List < com.android.sched.vfs.InputVFile > files ) { for ( com.android.sched.vfs.InputVElement subFile : vDir.list ( ) ) { if ( subFile.isVDir ( ) ) { fillFiles ( ( ( com.android.sched.vfs.InputVDir ) ( subFile ) ) , fileType , files ) ; } else { com.android.sched.vfs.InputVFile vFile = ( ( com.android.sched.vfs.InputVFile ) ( subFile ) ) ; if ( fileType.isOfType ( vFile ) ) { files.add ( vFile ) ; } } } }

Target:
protected void fillFileTypes ( ) { for ( com.android.jack.library.FileType ft : com.android.jack.library.FileType.values ( ) ) { try { java.lang.String propertyName = buildPropertyName ( ft , null ) ; if ( ( containsProperty ( propertyName ) ) && ( java.lang.Boolean.parseBoolean ( getProperty ( propertyName ) ) ) ) { fileTypes.add ( ft ) ; } } catch ( com.android.jack.library.LibraryFormatException e ) { throw new java.lang.AssertionError ( ) ; } } }
Source:
protected void setLoadingStatus ( int newStatus ) { }

Target:
private static boolean localeIDStartsWithLangSubtag ( java.lang.String localeID , java.lang.String lang ) { return ( localeID.startsWith ( lang ) ) && ( ( ( localeID.length ( ) ) == ( lang.length ( ) ) ) || ( ( localeID.charAt ( lang.length ( ) ) ) == '_' ) ) ; }
Source:
void removeExtras ( java.lang.String callId , java.util.List < java.lang.String > keys ) { android.telecom.Log.v ( this , "removeExtras: %s %s" , callId , keys ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.removeExtras ( callId , keys ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void onConnectionEvent ( java.lang.String callId , java.lang.String event , android.os.Bundle extras ) { android.telecom.Log.v ( this , "onConnectionEvent: %s" , event ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.onConnectionEvent ( callId , event , extras , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public void testNetworkFactoryRequests ( ) throws java.lang.Exception { tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_MMS ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_SUPL ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_DUN ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_FOTA ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_IMS ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_CBS ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_WIFI_P2P ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_IA ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_RCS ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_XCAP ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_EIMS ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_NOT_METERED ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_INTERNET ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_TRUSTED ) ; tryNetworkFactoryRequests ( com.android.server.NET_CAPABILITY_NOT_VPN ) ; }

Target:
public void testNetworkFactoryRequests ( ) throws java.lang.Exception { tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_MMS ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_SUPL ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_DUN ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_FOTA ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_IMS ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_CBS ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_WIFI_P2P ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_IA ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_RCS ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_XCAP ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_EIMS ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED ) ; tryNetworkFactoryRequests ( android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN ) ; }
Source:
public void testAesGcm128Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.getKey ( 288 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }

Target:
public void testAuthUdp4 ( ) 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_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , false , 1 , true ) ; }
Source:
private static com.android.sdklib.util.Pair < com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode , java.lang.Integer > getPositionAfter ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode node ) { if ( node != null ) { com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent = node.getUiParent ( ) ; if ( ( parent != null ) && ( parent instanceof com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ) { return com.android.sdklib.util.Pair.of ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent ) ) , ( ( node.getUiSiblingIndex ( ) ) + 1 ) ) ; } } return null ; }

Target:
private static com.android.util.Pair < com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode , java.lang.Integer > getPositionAfter ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode node ) { if ( node != null ) { com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent = node.getUiParent ( ) ; if ( ( parent != null ) && ( parent instanceof com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ) { return com.android.util.Pair.of ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent ) ) , ( ( node.getUiSiblingIndex ( ) ) + 1 ) ) ; } } return null ; }
Source:
private static org.apache.harmony.security.x509.AuthorityKeyIdentifier getAuthorityKeyIdentifier ( java.security.cert.X509Certificate cert ) { final byte [ ] akidBytes = cert.getExtensionValue ( "2.5.29.35" ) ; if ( akidBytes == null ) { return null ; } try { return org.apache.harmony.security.x509.AuthorityKeyIdentifier.decode ( akidBytes ) ; } catch ( java.io.IOException e ) { return null ; } }

Target:
private static boolean isSelfIssuedCertificate ( org.conscrypt.OpenSSLX509Certificate cert ) { final long ctx = cert.getContext ( ) ; return ( org.conscrypt.NativeCrypto.X509_check_issued ( ctx , ctx ) ) == 0 ; }
Source:
public static com.android.manifmerger.XmlDocument load ( com.android.manifmerger.KeyResolver < java.lang.String > selectors , java.lang.String displayName , 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 ) ) ; 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 ( displayName , xmlFile ) , selectors , domDocument.getDocumentElement ( ) ) : null ; }

Target:
public static com.android.manifmerger.XmlDocument load ( com.android.manifmerger.KeyResolver < java.lang.String > selectors , com.android.manifmerger.PlaceholderHandler.KeyBasedValueResolver < com.android.manifmerger.ManifestMerger2.SystemProperty > systemPropertyResolver , java.lang.String displayName , 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 ) ) ; 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 ( displayName , xmlFile ) , selectors , systemPropertyResolver , domDocument.getDocumentElement ( ) ) : null ; }
Source:
public void addU64 ( android.support.v8.renderscript.Long2 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU64 ( new android.support.v8.renderscript.Long2 ( v.x , v.y ) ) ; return ; } addU64 ( v.x ) ; addU64 ( v.y ) ; }

Target:
public void addMatrix ( android.support.v8.renderscript.Matrix2f v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addMatrix ( v ) ; return ; } for ( int i = 0 ; i < ( v.mMat.length ) ; i ++ ) { addF32 ( v.mMat [ i ] ) ; } }
Source:
public synchronized void close ( ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { if ( ! ( closed ) ) { printDigest ( vfs.getRootDir ( ) . createVFile ( com.android.sched.vfs.MessageDigestFS.DIGEST_FILE_NAME ) . getOutputStream ( ) ) ; vfs.close ( ) ; closed = true ; } }

Target:
public synchronized void close ( ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { if ( ! ( closed ) ) { if ( vfs.getCapabilities ( ) . contains ( Capabilities.WRITE ) ) { printDigest ( vfs.getRootDir ( ) . createVFile ( com.android.sched.vfs.MessageDigestFS.DIGEST_FILE_NAME ) . getOutputStream ( ) ) ; } vfs.close ( ) ; closed = true ; } }
Source:
public static double getAverageTimestampDelayWithValues ( android.hardware.cts.helpers.TestSensorEvent [ ] events , java.util.Collection < java.lang.Long > timestampDelayValues ) { for ( int i = 1 ; i < ( events.length ) ; ++ i ) { long previousTimestamp = events [ ( i - 1 ) ] . timestamp ; long timestamp = events [ i ] . timestamp ; timestampDelayValues.add ( ( timestamp - previousTimestamp ) ) ; } double timestampDelayMean = android.hardware.cts.helpers.SensorCtsHelper.getMean ( timestampDelayValues ) ; return timestampDelayMean ; }

Target:
public static java.util.List < java.lang.Double > getJitterValues ( android.hardware.cts.helpers.TestSensorEvent [ ] events ) { java.util.List < java.lang.Long > timestampDelayValues = android.hardware.cts.helpers.SensorCtsHelper.getTimestampDelayValues ( events ) ; double averageTimestampDelay = android.hardware.cts.helpers.SensorCtsHelper.getMean ( timestampDelayValues ) ; java.util.List < java.lang.Double > jitterValues = new java.util.ArrayList < java.lang.Double > ( timestampDelayValues.size ( ) ) ; for ( long timestampDelay : timestampDelayValues ) { jitterValues.add ( java.lang.Math.abs ( ( timestampDelay - averageTimestampDelay ) ) ) ; } return jitterValues ; }
Source:
public void testNoLintWarningOnGetSignaturesWithNoFlag ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( ( "src/test/pkg/GetSignaturesNoFlagTest.java.txt" + "=>src/test/pkg/GetSignaturesNoFlagTest.java" ) ) ) ; }

Target:
public void testLintWarningOnFlagsInStaticField ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/GetSignaturesStaticFieldTest.java:9: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + ( ( " getPackageManager().getPackageInfo(\"some.pkg\", FLAGS);\n" + " ~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( java ( "src/test/pkg/GetSignaturesStaticFieldTest.java" , ( "" + ( ( ( ( ( ( ( ( ( ( "package test.pkg;\n" + "\n" ) + "import android.app.Activity;\n" ) + "import android.content.pm.PackageManager;\n" ) + "\n" ) + "public class GetSignaturesStaticFieldTest extends Activity {\n" ) + " private static final int FLAGS = PackageManager.GET_SIGNATURES;\n" ) + " public void failLintCheck() throws Exception {\n" ) + " getPackageManager().getPackageInfo(\"some.pkg\", FLAGS);\n" ) + " }\n" ) + "}" ) ) ) ) ) ; }
Source:
public void moveTaskBackwards ( int task ) { enforceCallingPermission ( android.Manifest.permission.REORDER_TASKS , "moveTaskBackwards()" ) ; synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; moveTaskBackwardsLocked ( task ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; } }

Target:
public void moveTaskBackwards ( int task ) { enforceCallingPermission ( android.Manifest.permission.REORDER_TASKS , "moveTaskBackwards()" ) ; synchronized ( this ) { if ( ! ( checkAppSwitchAllowedLocked ( android.os.Binder.getCallingPid ( ) , android.os.Binder.getCallingUid ( ) , "Task backwards" ) ) ) { return ; } final long origId = android.os.Binder.clearCallingIdentity ( ) ; moveTaskBackwardsLocked ( task ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
private < T extends android.telephony.ims.feature.ImsFeature > T resolveImsFeature ( android.util.SparseArray < android.telephony.ims.feature.ImsFeature > set , int featureType , java.lang.Class < T > className ) { android.telephony.ims.feature.ImsFeature feature = getImsFeatureFromType ( set , featureType ) ; if ( feature == null ) { return null ; } try { return className.cast ( feature ) ; } catch ( java.lang.ClassCastException e ) { android.util.Log.e ( android.telephony.ims.ImsService.LOG_TAG , ( "Can not cast ImsFeature! Exception: " + ( e.getMessage ( ) ) ) ) ; } return null ; }

Target:
public android.telephony.ims.feature.RcsFeature onCreateRcsFeature ( int slotId ) { return null ; }
Source:
private static com.android.jack.test.toolchain.JackBasedToolchain getIncrementalToolchain ( ) { java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 3 ) ; excludeList.add ( com.android.jack.test.toolchain.LegacyJillToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.IncrementalToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.TwoStepsToolchain.class ) ; com.android.jack.test.toolchain.JackBasedToolchain jackToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class , excludeList ) ; return jackToolchain ; }

Target:
private static com.android.jack.test.toolchain.JackBasedToolchain getIncrementalToolchain ( ) { java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 3 ) ; excludeList.add ( com.android.jack.test.toolchain.JillBasedToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.IncrementalToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.TwoStepsToolchain.class ) ; com.android.jack.test.toolchain.JackBasedToolchain jackToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class , excludeList ) ; return jackToolchain ; }
Source:
public static void sendBroadcast ( android.content.Context context , java.lang.String updaterAppPackageName , byte [ ] checkTokenBytes ) { android.content.Intent intent = android.app.timezone.RulesUpdaterContract.createUpdaterIntent ( updaterAppPackageName ) ; intent.putExtra ( android.app.timezone.RulesUpdaterContract.EXTRA_CHECK_TOKEN , checkTokenBytes ) ; context.sendBroadcast ( intent , android.app.timezone.RulesUpdaterContract.UPDATE_TIME_ZONE_RULES_PERMISSION ) ; }

Target:
public static void sendBroadcast ( android.content.Context context , java.lang.String updaterAppPackageName , byte [ ] checkTokenBytes ) { android.content.Intent intent = android.app.timezone.RulesUpdaterContract.createUpdaterIntent ( updaterAppPackageName ) ; intent.putExtra ( android.app.timezone.RulesUpdaterContract.EXTRA_CHECK_TOKEN , checkTokenBytes ) ; context.sendBroadcastAsUser ( intent , android.os.UserHandle.of ( android.os.UserHandle.myUserId ( ) ) , android.app.timezone.RulesUpdaterContract.UPDATE_TIME_ZONE_RULES_PERMISSION ) ; }
Source:
public void dump ( java.lang.StringBuilder sb ) { super . dump ( sb ) ; com.android.bluetooth.btservice.ProfileService.println ( sb , ( "mActiveDevice: " + ( mActiveDevice ) ) ) ; }

Target:
public void dump ( java.lang.StringBuilder sb ) { super . dump ( sb ) ; com.android.bluetooth.btservice.ProfileService.println ( sb , ( "mActiveDevice: " + ( mActiveDevice ) ) ) ; for ( com.android.bluetooth.hearingaid.HearingAidStateMachine sm : mStateMachines.values ( ) ) { sm.dump ( sb ) ; } }
Source:
public com.android.jack.ir.ast.JSsaVariableRef canPropagatePhi ( com.android.jack.ir.ast.cfg.JPhiBlockElement e ) { com.android.jack.ir.ast.JSsaVariableRef first = e.getRhs ( e.getBasicBlock ( ) . getPredecessors ( ) . get ( 0 ) ) ; assert first != null ; for ( com.android.jack.ir.ast.JSsaVariableRef operand : e.getRhs ( ) ) { if ( ( first.getDef ( ) ) != ( operand.getDef ( ) ) ) { return null ; } } return first ; }

Target:
public com.android.jack.ir.ast.JSsaVariableUseRef canPropagatePhi ( com.android.jack.ir.ast.cfg.JPhiBlockElement e ) { com.android.jack.ir.ast.JSsaVariableUseRef first = e.getRhs ( e.getBasicBlock ( ) . getPredecessors ( ) . get ( 0 ) ) ; assert first != null ; for ( com.android.jack.ir.ast.JSsaVariableUseRef operand : e.getRhs ( ) ) { if ( ( first.getDef ( ) ) != ( operand.getDef ( ) ) ) { return null ; } } return first ; }
Source:
public void test_socket_accept_Blocking_NotBound ( ) throws java.io.IOException { java.net.ServerSocket gotSocket = serverChannel.socket ( ) ; serverChannel.configureBlocking ( true ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } serverChannel.close ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } }

Target:
public void test_socket_accept_Nonblocking_Bound ( ) throws java.io.IOException { serverChannel.configureBlocking ( false ) ; serverChannel.bind ( null ) ; java.net.ServerSocket gotSocket = serverChannel.socket ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException expected ) { } serverChannel.close ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw a ClosedChannelException" ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }
Source:
private boolean next ( ) { if ( ( url ) != null ) { return true ; } else { sun.misc.URLClassPath.Loader loader ; while ( ( loader = getLoader ( ( ( index ) ++ ) ) ) != null ) { url = loader.findResource ( name , check ) ; if ( ( url ) != null ) { return true ; } } return false ; } }

Target:
private boolean next ( ) { if ( ( url ) != null ) { return true ; } else { sun.misc.URLClassPath.Loader loader ; while ( ( loader = getNextLoader ( cache , ( ( index ) ++ ) ) ) != null ) { url = loader.findResource ( name , check ) ; if ( ( url ) != null ) { return true ; } } return false ; } }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int size = in.read ( ) ; int firstKey = in.readInt ( ) ; int [ ] targets = new int [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { targets [ i ] = in.readInt ( ) ; } return new com.android.jack.dx.io.instructions.PackedSwitchPayloadDecodedInstruction ( this , opcodeUnit , firstKey , targets ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; long literal = in.readLong ( ) ; return new com.android.jack.dx.io.instructions.OneRegisterDecodedInstruction ( this , opcode , 0 , null , 0 , literal , a ) ; }
Source:
private static boolean containsCertificate ( java.util.List < byte [ ] > certificates , byte [ ] toMatch ) throws java.security.cert.CertificateException { java.security.cert.Certificate certificateToMatch = com.android.cts.deviceowner.CaCertManagementTest.readCertificate ( toMatch ) ; for ( byte [ ] certBuffer : certificates ) { java.security.cert.Certificate cert = com.android.cts.deviceowner.CaCertManagementTest.readCertificate ( certBuffer ) ; if ( certificateToMatch.equals ( cert ) ) { return true ; } } return false ; }

Target:
private void assertUninstalled ( byte [ ] caBytes ) throws java.security.GeneralSecurityException , java.security.cert.CertificateException { java.security.cert.Certificate caCert = com.android.cts.deviceowner.CaCertManagementTest.readCertificate ( caBytes ) ; assertFalse ( isCaCertInstalledAndTrusted ( caCert ) ) ; }
Source:
private boolean hasAppsAccessingStorage ( ) throws android.os.RemoteException { android.os.storage.IMountService mountService = getMountService ( ) ; int [ ] stUsers = mountService.getStorageUsers ( mClickedMountPoint ) ; if ( ( stUsers != null ) && ( ( stUsers.length ) > 0 ) ) { return true ; } return true ; }

Target:
private boolean hasAppsAccessingStorage ( ) throws android.os.RemoteException { android.os.storage.IMountService mountService = getMountService ( ) ; int [ ] stUsers = mountService.getStorageUsers ( com.android.settings.deviceinfo.Memory.mClickedMountPoint ) ; if ( ( stUsers != null ) && ( ( stUsers.length ) > 0 ) ) { return true ; } return true ; }
Source:
private void addToSpanNotSet ( int c ) { if ( ( ( spanNotSet ) == null ) || ( ( spanNotSet ) == ( spanSet ) ) ) { if ( spanSet.contains ( c ) ) { return ; } spanNotSet = spanSet.cloneAsThawed ( ) ; } spanNotSet.add ( c ) ; }

Target:
private void addToSpanNotSet ( int c ) { if ( ( com.ibm.icu.impl.Utility.sameObjects ( spanNotSet , null ) ) || ( com.ibm.icu.impl.Utility.sameObjects ( spanNotSet , spanSet ) ) ) { if ( spanSet.contains ( c ) ) { return ; } spanNotSet = spanSet.cloneAsThawed ( ) ; } spanNotSet.add ( c ) ; }
Source:
public com.android.ims.internal.IImsServiceController getImsServiceControllerAndListen ( int slotIndex , @ android.telephony.TelephonyManager.Feature int feature , com.android.ims.internal.IImsServiceFeatureListener callback ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getImsServiceControllerAndListen ( slotIndex , feature , callback ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsServiceControllerAndListen, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }

Target:
public static void setTelephonyProperty ( java.lang.String property , java.lang.String value ) { if ( value == null ) { value = "" ; } android.telephony.Rlog.d ( android.telephony.TelephonyManager.TAG , ( ( ( ( "setTelephonyProperty: success" + " property=" ) + property ) + " value: " ) + value ) ) ; android.os.SystemProperties.set ( property , value ) ; }
Source:
public void testUngrant_NoGrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertFalse ( "Should not be able to revoke not existent grant" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_NoGrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertFalse ( "Should not be able to revoke not existent grant" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
private ClassData.Method [ ] readMethods ( int count ) { com.android.dx.io.ClassData [ ] result = new com.android.dx.io.ClassData.Method [ count ] ; int methodIndex = 0 ; for ( int i = 0 ; i < count ; i ++ ) { methodIndex += readUleb128 ( ) ; int accessFlags = readUleb128 ( ) ; int codeOff = readUleb128 ( ) ; result [ i ] = new com.android.dx.io.ClassData.Method ( methodIndex , accessFlags , codeOff ) ; } return result ; }

Target:
private ClassData.Method [ ] readMethods ( int count ) { com.android.dex.ClassData [ ] result = new com.android.dex.ClassData.Method [ count ] ; int methodIndex = 0 ; for ( int i = 0 ; i < count ; i ++ ) { methodIndex += readUleb128 ( ) ; int accessFlags = readUleb128 ( ) ; int codeOff = readUleb128 ( ) ; result [ i ] = new com.android.dex.ClassData.Method ( methodIndex , accessFlags , codeOff ) ; } return result ; }
Source:
public void testGrantPreviouslyRevokedWithPrejudiceShowsPrompt23 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.Throwable expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part2" ) ; }

Target:
public void testGrantPreviouslyRevokedWithPrejudiceShowsPrompt23 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.Throwable expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part2" ) ; }
Source:
public java.util.List < java.nio.file.Path > convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { java.util.List < java.nio.file.Path > list = new java.util.ArrayList < > ( ) ; for ( java.lang.String piece : input.split ( ":" ) ) { if ( ! ( piece.isEmpty ( ) ) ) { list.add ( baseConverter.convert ( piece ) ) ; } } return java.util.Collections.unmodifiableList ( list ) ; }

Target:
public java.util.List < java.nio.file.Path > convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { java.util.List < java.nio.file.Path > list = new java.util.ArrayList < > ( ) ; for ( java.lang.String piece : input.split ( java.io.File.pathSeparator ) ) { if ( ! ( piece.isEmpty ( ) ) ) { list.add ( baseConverter.convert ( piece ) ) ; } } return java.util.Collections.unmodifiableList ( list ) ; }
Source:
public static java.lang.Integer getInt ( android.security.keymaster.KeyCharacteristics keyCharacteristics , int tag ) { if ( keyCharacteristics.hwEnforced.containsTag ( tag ) ) { return keyCharacteristics.hwEnforced.getInt ( tag , ( - 1 ) ) ; } else if ( keyCharacteristics.swEnforced.containsTag ( tag ) ) { return keyCharacteristics.swEnforced.getInt ( tag , ( - 1 ) ) ; } else { return null ; } }

Target:
public static java.lang.String getJcaKeyPairAlgorithmFromKeymasterAlgorithm ( int keymasterAlgorithm ) { switch ( keymasterAlgorithm ) { case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_RSA : return "RSA" ; case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_EC : return "EC" ; default : throw new java.lang.IllegalArgumentException ( ( "Unsupported algorithm: " + keymasterAlgorithm ) ) ; } }