auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testParsingUncommonTimeZoneAbbreviations ( ) { java.lang.String fmt = "yyyy-MM-dd HH:mm:ss.SSS z" ; java.lang.String date = "2010-12-23 12:44:57.0 CET" ; assertEquals ( 1293104697000L , parseDate ( java.util.Locale.UK , fmt , date ) . getTimeInMillis ( ) ) ; assertEquals ( 1293104697000L , parseDate ( java.util.Locale.US , fmt , date ) . getTimeInMillis ( ) ) ; }

Target:
public void testFiveCount_E ( ) throws java.lang.Exception { java.util.TimeZone.setDefault ( java.util.TimeZone.getTimeZone ( "GMT" ) ) ; assertEquals ( "Thu" , formatDate ( java.util.Locale.ENGLISH , "E" ) ) ; assertEquals ( "Thu" , formatDate ( java.util.Locale.ENGLISH , "EE" ) ) ; assertEquals ( "Thu" , formatDate ( java.util.Locale.ENGLISH , "EEE" ) ) ; assertEquals ( "Thursday" , formatDate ( java.util.Locale.ENGLISH , "EEEE" ) ) ; assertEquals ( "T" , formatDate ( java.util.Locale.ENGLISH , "EEEEE" ) ) ; }
Source:
public rs.example.android.com.healingbrush.Region getRegion ( android.graphics.Bitmap img ) { rs.example.android.com.healingbrush.Region ret = new rs.example.android.com.healingbrush.Region ( java.util.Arrays.copyOf ( path , len ) , img ) ; invalidate ( ) ; return ret ; }

Target:
public rs.example.android.com.healingbrush.Region getRegion ( android.graphics.Bitmap img ) { rs.example.android.com.healingbrush.Region ret ; if ( mUseDefaultRegion ) { float [ ] defaultPath = new float [ ] { 10.0F , 110.0F , 110.0F , 10.0F , 210.0F , 110.0F , 110.0F , 210.0F } ; ret = new rs.example.android.com.healingbrush.Region ( java.util.Arrays.copyOf ( defaultPath , defaultPath.length ) , img ) ; } else { ret = new rs.example.android.com.healingbrush.Region ( java.util.Arrays.copyOf ( path , len ) , img ) ; } invalidate ( ) ; return ret ; }
Source:
public boolean isProvisioningAllowed ( java.lang.String action ) { throwIfParentInstance ( "isProvisioningAllowed" ) ; try { return mService.isProvisioningAllowed ( action ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } }

Target:
public void setUninstallBlocked ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName , boolean uninstallBlocked ) { throwIfParentInstance ( "setUninstallBlocked" ) ; if ( ( mService ) != null ) { try { mService.setUninstallBlocked ( admin , mContext.getPackageName ( ) , packageName , uninstallBlocked ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } } }
Source:
private void performDexOptLibsLI ( java.util.ArrayList < java.lang.String > libs , java.lang.String [ ] instructionSets , boolean forceDex , boolean defer , boolean bootComplete , android.util.ArraySet < java.lang.String > done ) { for ( java.lang.String libName : libs ) { android.content.pm.PackageParser.Package libPkg = mPackageManagerService.findSharedNonSystemLibrary ( libName ) ; if ( ( libPkg != null ) && ( ! ( done.contains ( libName ) ) ) ) { performDexOptLI ( libPkg , instructionSets , forceDex , defer , bootComplete , done ) ; } } }

Target:
private void performDexOptLibsLI ( java.util.ArrayList < java.lang.String > libs , java.lang.String [ ] instructionSets , boolean forceDex , boolean defer , boolean bootComplete , boolean useJit , android.util.ArraySet < java.lang.String > done ) { for ( java.lang.String libName : libs ) { android.content.pm.PackageParser.Package libPkg = mPackageManagerService.findSharedNonSystemLibrary ( libName ) ; if ( ( libPkg != null ) && ( ! ( done.contains ( libName ) ) ) ) { performDexOptLI ( libPkg , instructionSets , forceDex , defer , bootComplete , useJit , done ) ; } } }
Source:
public void testEndCallWithNoForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) ) ) . thenReturn ( call ) ; assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }

Target:
public void testEndCallWithNoForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.argThat ( new com.android.server.telecom.tests.TelecomServiceImplTest.IntVarArgMatcher ( ) ) ) ) . thenReturn ( call ) ; assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }
Source:
public java.lang.String ipSecOpenUdpEncapsulationSocket ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "port" ) java.lang.Integer port ) { android.net.IpSecManager.UdpEncapsulationSocket udpEncapSocket = null ; if ( port == null ) { udpEncapSocket = ipSecOpenUdpEncapSocket ( ) ; } else { udpEncapSocket = ipSecOpenUdpEncapSocket ( port.intValue ( ) ) ; } if ( udpEncapSocket == null ) return null ; java.lang.String id = getUdpEncapSockId ( udpEncapSocket ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.mUdpEncapMap.put ( id , udpEncapSocket ) ; return id ; }

Target:
public java.lang.String ipSecOpenUdpEncapsulationSocket ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "port" ) java.lang.Integer port ) { android.net.IpSecManager.UdpEncapsulationSocket udpEncapSocket = null ; if ( port == null ) { udpEncapSocket = ipSecOpenUdpEncapSocket ( ) ; } else { udpEncapSocket = ipSecOpenUdpEncapSocket ( port.intValue ( ) ) ; } if ( udpEncapSocket == null ) return null ; java.lang.String id = getUdpEncapSockId ( udpEncapSocket ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.sUdpEncapHashMap.put ( id , udpEncapSocket ) ; return id ; }
Source:
public void testGetContentLengthConnects ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "ABC" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; assertEquals ( 3 , connection.getContentLength ( ) ) ; connection.disconnect ( ) ; }

Target:
public void testGetOutputStreamOnGetFails ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; try { connection.getOutputStream ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }
Source:
public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel ( int subId , java.lang.String AID ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "iccOpenLogicalChannel: subId=" + subId ) + " aid=" ) + AID ) ) ; android.telephony.IccOpenLogicalChannelResponse response = ( ( android.telephony.IccOpenLogicalChannelResponse ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_OPEN_CHANNEL , AID , subId ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "iccOpenLogicalChannel: " + response ) ) ; return response ; }

Target:
public void setVisualVoicemailEnabled ( java.lang.String callingPackage , android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( android.text.TextUtils.equals ( callingPackage , android.telecom.TelecomManager.from ( mPhone.getContext ( ) ) . getDefaultDialerPackage ( ) ) ) ) { enforceModifyPermissionOrCarrierPrivilege ( com.android.phone.PhoneUtils.getSubIdForPhoneAccountHandle ( phoneAccountHandle ) ) ; } com.android.phone.settings.VisualVoicemailSettingsUtil.setEnabled ( mPhone.getContext ( ) , phoneAccountHandle , enabled ) ; }
Source:
public final byte [ ] doFinal ( byte [ ] input , int inputOffset , int inputLen ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } javax.crypto.Cipher.checkInputOffsetAndCount ( input.length , inputOffset , inputLen ) ; return spiImpl.engineDoFinal ( input , inputOffset , inputLen ) ; }

Target:
public final byte [ ] doFinal ( byte [ ] input , int inputOffset , int inputLen ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } javax.crypto.Cipher.checkInputOffsetAndCount ( input.length , inputOffset , inputLen ) ; return getSpi ( ) . engineDoFinal ( input , inputOffset , inputLen ) ; }
Source:
public void testCanAccessScanResults_UserOrProfileNotCurrent ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mPermissionsList.put ( mInteractAcrossUsersFullPermission , mUid ) ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testCanAccessScanResults_UserOrProfileNotCurrent ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mPermissionsList.put ( mInteractAcrossUsersFullPermission , mUid ) ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
public void finishAndRemoveTask ( ) { checkCaller ( ) ; synchronized ( this ) { long origId = android.os.Binder.clearCallingIdentity ( ) ; try { if ( ! ( removeTaskByIdLocked ( mTaskId , false ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Unable to find task ID " + ( mTaskId ) ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } } }

Target:
public void moveToFront ( ) { checkCaller ( ) ; final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { mStackSupervisor.startActivityFromRecentsInner ( mTaskId , null ) ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeByte ( ( ( byte ) ( mIsActive ? 1 : 0 ) ) ) ; dest.writeByte ( ( ( byte ) ( mIsEuicc ? 1 : 0 ) ) ) ; dest.writeString ( mCardId ) ; dest.writeInt ( mCardStateInfo ) ; dest.writeInt ( mLogicalSlotIdx ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeByte ( ( ( byte ) ( mIsActive ? 1 : 0 ) ) ) ; dest.writeByte ( ( ( byte ) ( mIsEuicc ? 1 : 0 ) ) ) ; dest.writeString ( mCardId ) ; dest.writeInt ( mCardStateInfo ) ; dest.writeInt ( mLogicalSlotIdx ) ; dest.writeByte ( ( ( byte ) ( mIsExtendedApduSupported ? 1 : 0 ) ) ) ; }
Source:
private void checkFailure ( java.lang.String resource , java.lang.String regex ) throws java.lang.Exception { java.io.InputStream xml = com.android.dvlib.DeviceSchemaTest.class . getResourceAsStream ( resource ) ; java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; assertFalse ( "Validation Assertion Failed, XML validated when it was expected to fail\n" , com.android.dvlib.DeviceSchema.validate ( xml , baos , null ) ) ; assertTrue ( java.lang.String.format ( "Regex Assertion Failed:\nExpected: %s\nActual: %s\n" , regex , baos.toString ( ) . trim ( ) ) , baos.toString ( ) . trim ( ) . matches ( regex ) ) ; }

Target:
private void checkFailure ( java.util.Map < java.lang.String , java.lang.String > replacements , java.lang.String regex ) throws java.lang.Exception { java.io.InputStream xmlStream = com.android.dvlib.DeviceSchemaTest.getReplacedStream ( replacements ) ; java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; assertFalse ( "Validation Assertion Failed, XML failed to validate when it was expected to pass\n" , com.android.dvlib.DeviceSchema.validate ( xmlStream , baos , null ) ) ; java.lang.String actual = baos.toString ( ) . trim ( ) ; actual = actual.replace ( "\r\n" , "\n" ) ; assertTrue ( java.lang.String.format ( "Regex Assertion Failed:\nExpected: %s\nActual: %s\n" , regex , actual ) , actual.matches ( regex ) ) ; }
Source:
public void update ( ) { sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_UPDATE_LINKPROPERTIES ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( action.equals ( Intent.ACTION_SCREEN_ON ) ) { sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_SCREEN_STATE_CHANGED , 1 ) ; } else if ( action.equals ( Intent.ACTION_SCREEN_OFF ) ) { sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_SCREEN_STATE_CHANGED , 0 ) ; } }
Source:
public void stopTethering ( int type ) { try { mService.stopTethering ( type ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public int setUsbTethering ( boolean enable ) { try { java.lang.String pkgName = mContext.getOpPackageName ( ) ; android.util.Log.i ( android.net.ConnectivityManager.TAG , ( "setUsbTethering caller:" + pkgName ) ) ; return mService.setUsbTethering ( enable , pkgName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
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 { 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_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 void testSubList2_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.subList ( 1 , 100 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testSubList2_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.subList ( 0 , ( ( list.size ( ) ) + 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public void setMsisdnNumber ( java.lang.String alphaTag , java.lang.String number , android.os.Message onComplete ) { mNewMsisdn = number ; mNewMsisdnTag = alphaTag ; if ( DBG ) log ( ( ( ( "Set MSISDN: " + ( mNewMsisdnTag ) ) + " " ) + "xxxxxxx" ) ) ; com.android.internal.telephony.uicc.AdnRecord adn = new com.android.internal.telephony.uicc.AdnRecord ( mNewMsisdnTag , mNewMsisdn ) ; new com.android.internal.telephony.uicc.AdnRecordLoader ( mFh ) . updateEF ( adn , com.android.internal.telephony.uicc.EF_MSISDN , getExtFromEf ( com.android.internal.telephony.uicc.EF_MSISDN ) , 1 , null , obtainMessage ( com.android.internal.telephony.uicc.SIMRecords.EVENT_SET_MSISDN_DONE , onComplete ) ) ; }

Target:
public void setMsisdnNumber ( java.lang.String alphaTag , java.lang.String number , android.os.Message onComplete ) { mNewMsisdn = number ; mNewMsisdnTag = alphaTag ; if ( DBG ) log ( ( ( ( "Set MSISDN: " + ( mNewMsisdnTag ) ) + " " ) + ( android.telephony.Rlog.pii ( com.android.internal.telephony.uicc.SIMRecords.LOG_TAG , mNewMsisdn ) ) ) ) ; com.android.internal.telephony.uicc.AdnRecord adn = new com.android.internal.telephony.uicc.AdnRecord ( mNewMsisdnTag , mNewMsisdn ) ; new com.android.internal.telephony.uicc.AdnRecordLoader ( mFh ) . updateEF ( adn , com.android.internal.telephony.uicc.EF_MSISDN , getExtFromEf ( com.android.internal.telephony.uicc.EF_MSISDN ) , 1 , null , obtainMessage ( com.android.internal.telephony.uicc.SIMRecords.EVENT_SET_MSISDN_DONE , onComplete ) ) ; }
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 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 ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { return com.android.jack.dx.io.instructions.InstructionCodec.decodeRegisterRange ( this , opcodeUnit , in ) ; }
Source:
public void onFeatureRemoved ( ) { mContext.unregisterReceiver ( mReceiver ) ; try { mCompatFeature.endSession ( mSessionId ) ; mCompatFeature.removeRegistrationListener ( mListener ) ; if ( ( mRegCompatAdapter ) != null ) { mCompatFeature.removeRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "onFeatureRemoved: Couldn't end session: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public void onFeatureReady ( ) { android.util.Log.i ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , "onFeatureReady called!" ) ; android.content.IntentFilter intentFilter = new android.content.IntentFilter ( com.android.ims.ImsManager.ACTION_IMS_INCOMING_CALL ) ; mContext.registerReceiver ( mReceiver , intentFilter ) ; try { mSessionId = mCompatFeature.startSession ( createIncomingCallPendingIntent ( ) , new com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.ImsRegistrationListenerBase ( ) ) ; mCompatFeature.addRegistrationListener ( mListener ) ; mCompatFeature.addRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "Couldn't start compat feature: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public void test_handshake_failsWithMissingSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { cert , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; connection.doHandshake ( ) ; assertTrue ( ( ( connection.clientException ) instanceof javax.net.ssl.SSLHandshakeException ) ) ; assertTrue ( ( ( connection.clientException.getCause ( ) ) instanceof java.security.cert.CertificateException ) ) ; }

Target:
public void test_handshake_failsWithMissingSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { cert , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; connection.doHandshake ( ) ; org.junit.Assert.assertThat ( connection.clientException , org.hamcrest.CoreMatchers.instanceOf ( javax.net.ssl.SSLHandshakeException.class ) ) ; org.junit.Assert.assertThat ( connection.clientException.getCause ( ) , org.hamcrest.CoreMatchers.instanceOf ( java.security.cert.CertificateException.class ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { com.android.monkeyrunner.MonkeyRunnerOptions options = com.android.monkeyrunner.MonkeyRunnerOptions.processOptions ( args ) ; com.android.monkeyrunner.MonkeyRunnerStarter.replaceAllLogFormatters ( MonkeyFormatter.DEFAULT_INSTANCE ) ; if ( options == null ) { return ; } com.android.monkeyrunner.MonkeyRunnerStarter runner = new com.android.monkeyrunner.MonkeyRunnerStarter ( options ) ; int error = runner.run ( ) ; java.lang.System.exit ( error ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { com.android.monkeyrunner.MonkeyRunnerOptions options = com.android.monkeyrunner.MonkeyRunnerOptions.processOptions ( args ) ; com.android.monkeyrunner.MonkeyRunnerStarter.replaceAllLogFormatters ( MonkeyFormatter.DEFAULT_INSTANCE , options.getLogLevel ( ) ) ; if ( options == null ) { return ; } com.android.monkeyrunner.MonkeyRunnerStarter runner = new com.android.monkeyrunner.MonkeyRunnerStarter ( options ) ; int error = runner.run ( ) ; java.lang.System.exit ( error ) ; }
Source:
public void failTest ( ) { result = - 1 ; updateUI ( ) ; }

Target:
public void run ( ) { if ( ( result ) == 0 ) { switch ( mID ) { case com.android.rs.test.UnitTest.RS_MSG_TEST_PASSED : result = com.android.rs.test.UnitTest.TEST_PASSED ; break ; case com.android.rs.test.UnitTest.RS_MSG_TEST_FAILED : result = com.android.rs.test.UnitTest.TEST_FAILED ; break ; default : com.android.rs.test.RSTest.log ( "Unit test got unexpected message" ) ; return ; } } updateUI ( ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { synchronized ( mLock ) { int state = intent.getIntExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.ERROR ) ; com.android.server.telecom.Log.d ( com.android.server.telecom.BluetoothPhoneServiceImpl.TAG , "Bluetooth Adapter state: %d" , state ) ; if ( state == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { try { mBinder.queryPhoneState ( ) ; } catch ( android.os.RemoteException e ) { } } } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { synchronized ( mLock ) { int state = intent.getIntExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.ERROR ) ; android.telecom.Log.d ( com.android.server.telecom.BluetoothPhoneServiceImpl.TAG , "Bluetooth Adapter state: %d" , state ) ; if ( state == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { try { mBinder.queryPhoneState ( ) ; } catch ( android.os.RemoteException e ) { } } } }
Source:
public final void testPkgTypeBuildTool ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_BUILD_TOOLS ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeBuildTool ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_BUILD_TOOLS ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
private void adjustAttemptsForConnectionManager ( ) { if ( shouldSetConnectionManager ( ) ) { com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord record = new com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord ( mPhoneAccountRegistrar.getSimCallManagerFromCall ( mCall ) , mAttemptRecords.get ( 0 ) . targetPhoneAccount ) ; com.android.server.telecom.Log.v ( this , "setConnectionManager, changing %s -> %s" , mAttemptRecords.get ( 0 ) , record ) ; mAttemptRecords.add ( 0 , record ) ; } else { com.android.server.telecom.Log.v ( this , "setConnectionManager, not changing" ) ; } }

Target:
private void adjustAttemptsForConnectionManager ( ) { if ( shouldSetConnectionManager ( ) ) { com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord record = new com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord ( mPhoneAccountRegistrar.getSimCallManagerFromCall ( mCall ) , mAttemptRecords.get ( 0 ) . targetPhoneAccount ) ; android.telecom.Log.v ( this , "setConnectionManager, changing %s -> %s" , mAttemptRecords.get ( 0 ) , record ) ; mAttemptRecords.add ( 0 , record ) ; } else { android.telecom.Log.v ( this , "setConnectionManager, not changing" ) ; } }
Source:
static boolean handleIMEIDisplay ( android.content.Context context , java.lang.String input , boolean useSystemWindow ) { if ( input.equals ( com.android.contacts.SpecialCharSequenceMgr.MMI_IMEI_DISPLAY ) ) { com.android.contacts.SpecialCharSequenceMgr.showIMEIPanel ( context , useSystemWindow ) ; return true ; } return false ; }

Target:
static boolean handleIMEIDisplay ( android.content.Context context , java.lang.String input , boolean useSystemWindow ) { if ( input.equals ( com.android.contacts.SpecialCharSequenceMgr.MMI_IMEI_DISPLAY ) ) { int networkType = ( ( android.telephony.TelephonyManager ) ( context.getSystemService ( Context.TELEPHONY_SERVICE ) ) ) . getNetworkType ( ) ; if ( ( ( networkType == ( android.telephony.TelephonyManager.NETWORK_TYPE_GPRS ) ) || ( networkType == ( android.telephony.TelephonyManager.NETWORK_TYPE_EDGE ) ) ) || ( networkType == ( android.telephony.TelephonyManager.NETWORK_TYPE_UMTS ) ) ) { com.android.contacts.SpecialCharSequenceMgr.showIMEIPanel ( context , useSystemWindow ) ; return true ; } } return false ; }
Source:
public void test_putAllLjava_util_Map ( ) { java.util.IdentityHashMap hm2 = new java.util.IdentityHashMap ( ) ; hm2.putAll ( hm ) ; for ( int i = 0 ; i < 1000 ; i ++ ) assertTrue ( "Failed to clear all elements" , hm2.get ( tests.api.java.util.IdentityHashMap2Test.objArray2 [ i ] ) . equals ( new java.lang.Integer ( i ) ) ) ; hm2 = new java.util.IdentityHashMap ( ) ; java.util.Map mockMap = new tests.api.java.util.IdentityHashMap2Test.MockMap ( ) ; hm2.putAll ( mockMap ) ; assertEquals ( "Size should be 0" , 0 , hm2.size ( ) ) ; }

Target:
public void test_putAllLjava_util_Map ( ) { java.util.IdentityHashMap hm2 = new java.util.IdentityHashMap ( ) ; hm2.putAll ( hm ) ; for ( int i = 0 ; i < ( tests.api.java.util.IdentityHashMap2Test.hmSize ) ; i ++ ) { assertTrue ( "Failed to clear all elements" , hm2.get ( objArray2 [ i ] ) . equals ( new java.lang.Integer ( i ) ) ) ; } hm2 = new java.util.IdentityHashMap ( ) ; java.util.Map mockMap = new tests.api.java.util.IdentityHashMap2Test.MockMap ( ) ; hm2.putAll ( mockMap ) ; assertEquals ( "Size should be 0" , 0 , hm2.size ( ) ) ; }
Source:
public boolean hasSideEffect ( ) { com.android.dx.ssa.Rop opcode = getOpcode ( ) ; if ( ( opcode.getBranchingness ( ) ) != ( Rop.BRANCH_NONE ) ) { return true ; } boolean hasLocalSideEffect = ( com.android.dx.ssa.Optimizer.getPreserveLocals ( ) ) && ( ( getLocalAssignment ( ) ) != null ) ; switch ( opcode.getOpcode ( ) ) { case RegOps.MOVE_RESULT : case RegOps.MOVE : case RegOps.CONST : return hasLocalSideEffect ; default : return true ; } }

Target:
public boolean hasSideEffect ( ) { com.android.dx.rop.code.Rop opcode = getOpcode ( ) ; if ( ( opcode.getBranchingness ( ) ) != ( com.android.dx.rop.code.Rop.BRANCH_NONE ) ) { return true ; } boolean hasLocalSideEffect = ( com.android.dx.ssa.Optimizer.getPreserveLocals ( ) ) && ( ( getLocalAssignment ( ) ) != null ) ; switch ( opcode.getOpcode ( ) ) { case com.android.dx.rop.code.RegOps.MOVE_RESULT : case com.android.dx.rop.code.RegOps.MOVE : case com.android.dx.rop.code.RegOps.CONST : return hasLocalSideEffect ; default : return true ; } }
Source:
private void sendFinalFocus ( int frame , int node , int x , int y ) { android.webkit.WebViewCore.FocusData focusData = new android.webkit.WebViewCore.FocusData ( ) ; focusData.mFrame = frame ; focusData.mNode = node ; focusData.mX = x ; focusData.mY = y ; mWebViewCore.sendMessage ( EventHub.SET_FINAL_FOCUS , EventHub.NO_FOCUS_CHANGE_BLOCK , 0 , focusData ) ; }

Target:
private void sendMoveMouse ( int frame , int node , int x , int y ) { mWebViewCore.sendMessage ( EventHub.SET_MOVE_MOUSE , new android.webkit.WebViewCore.CursorData ( frame , node , x , y ) ) ; }
Source:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > successfulAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return new com.google.common.util.concurrent.Futures.ListFuture < V > ( com.google.common.collect.ImmutableList.copyOf ( futures ) , false , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > successfulAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return com.google.common.util.concurrent.Futures.listFuture ( com.google.common.collect.ImmutableList.copyOf ( futures ) , false , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( "actionType: " + ( getActionType ( ) ) ) + " location:" ) + ( getActionLocation ( ) ) ) + " opType:" ) + ( mNodeOperationType ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( "Id=" + ( mTargetId.toString ( ) ) ) + " actionType=" ) + ( getActionType ( ) ) ) + " location=" ) + ( getActionLocation ( ) ) ) + " opType=" ) + ( mNodeOperationType ) ; }
Source:
public int processBytes ( byte [ ] in , int inOff , int inLen , byte [ ] out , int outOff ) throws java.lang.IllegalStateException , org.bouncycastle.crypto.DataLengthException { data.write ( in , inOff , inLen ) ; return 0 ; }

Target:
public int processBytes ( byte [ ] in , int inOff , int inLen , byte [ ] out , int outOff ) throws java.lang.IllegalStateException , org.bouncycastle.crypto.DataLengthException { if ( ( in.length ) < ( inOff + inLen ) ) { throw new org.bouncycastle.crypto.DataLengthException ( "Input buffer too short" ) ; } data.write ( in , inOff , inLen ) ; return 0 ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
native void rsnAllocationData2D ( long con , long id , int xoff , int yoff , int mip , int face , int w , int h , int [ ] d , int sizeBytes ) ;
Source:
public void sync ( ) throws java.io.SyncFailedException { try { Libcore.os.fsync ( this ) ; } catch ( libcore.io.ErrnoException errnoException ) { java.io.SyncFailedException sfe = new java.io.SyncFailedException ( errnoException.getMessage ( ) ) ; sfe.initCause ( errnoException ) ; throw sfe ; } }

Target:
public void sync ( ) throws java.io.SyncFailedException { try { if ( Libcore.os.isatty ( this ) ) { Libcore.os.tcdrain ( this ) ; } else { Libcore.os.fsync ( this ) ; } } catch ( libcore.io.ErrnoException errnoException ) { java.io.SyncFailedException sfe = new java.io.SyncFailedException ( errnoException.getMessage ( ) ) ; sfe.initCause ( errnoException ) ; throw sfe ; } }
Source:
private android.os.Message obtainCompleteMessage ( int what ) { ( pendingOperations ) ++ ; lastRelevantPoll = null ; needsPoll = true ; if ( com.android.internal.telephony.gsm.GsmCallTracker.DBG_POLL ) log ( ( ( ( "obtainCompleteMessage: pendingOperations=" + ( pendingOperations ) ) + ", needsPoll=" ) + ( needsPoll ) ) ) ; return obtainMessage ( what ) ; }

Target:
private android.os.Message obtainCompleteMessage ( int what ) { ( mPendingOperations ) ++ ; mLastRelevantPoll = null ; mNeedsPoll = true ; if ( com.android.internal.telephony.gsm.GsmCallTracker.DBG_POLL ) log ( ( ( ( "obtainCompleteMessage: pendingOperations=" + ( mPendingOperations ) ) + ", needsPoll=" ) + ( mNeedsPoll ) ) ) ; return obtainMessage ( what ) ; }
Source:
public void testCloseBehavior ( ) throws java.io.IOException { java.io.InputStream is = loadResource ( ) ; try { java.io.InputStream ncis = new com.android.io.NonClosingInputStream ( is ) ; assertEquals ( '1' , parseAndClose ( ncis ) ) ; try { assertEquals ( '2' , parse ( ncis ) ) ; fail ( "Expected: IOException 'stream closed'; Actual: no error." ) ; } catch ( java.io.IOException e ) { assertEquals ( "Stream closed" , e.getMessage ( ) ) ; } } finally { is.close ( ) ; } }

Target:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; if ( ! ( mFile.delete ( ) ) ) { mFile.deleteOnExit ( ) ; } }
Source:
public void dragLeave ( org.eclipse.swt.dnd.DropTargetEvent event ) { if ( ( mCurrentGesture ) instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture dropGesture = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) ( mCurrentGesture ) ) ; dropGesture.dragLeave ( event ) ; finishGesture ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( mCanvas , event ) , true ) ; mZombieGesture = dropGesture ; } }

Target:
public void dragLeave ( org.eclipse.swt.dnd.DropTargetEvent event ) { if ( ( mCurrentGesture ) instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture dropGesture = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) ( mCurrentGesture ) ) ; dropGesture.dragLeave ( event ) ; finishGesture ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( mCanvas , event ) , true ) ; mZombieGesture = dropGesture ; } mCanvas.showInvisibleViews ( false ) ; }
Source:
public void waitForUninterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } if ( ! ( lock.isHeldByCurrentThread ( ) ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } waitUninterruptibly ( guard , true ) ; }

Target:
public void waitForUninterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ! ( ( ( guard.monitor ) == ( this ) ) & ( lock.isHeldByCurrentThread ( ) ) ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } if ( ! ( guard.isSatisfied ( ) ) ) { awaitUninterruptibly ( guard , true ) ; } }
Source:
public static void appendFile ( java.lang.String filename , java.lang.String encoding , java.io.PrintWriter output , java.lang.String [ ] replacementList ) throws java.io.IOException { java.io.BufferedReader br = com.ibm.icu.dev.util.BagFormatter.openReader ( "" , filename , encoding ) ; com.ibm.icu.dev.util.FileUtilities.appendBufferedReader ( br , output , replacementList ) ; }

Target:
public static void appendFile ( java.lang.String filename , java.lang.String encoding , java.io.PrintWriter output , java.lang.String [ ] replacementList ) throws java.io.IOException { java.io.BufferedReader br = com.ibm.icu.dev.util.BagFormatter.openReader ( "" , filename , encoding ) ; try { com.ibm.icu.dev.util.FileUtilities.appendBufferedReader ( br , output , replacementList ) ; } finally { br.close ( ) ; } }
Source:
public void testDistanceRecorder_distanceKnownAfterChildrenCall ( ) { final android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > distanceRecorder = new android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > ( android.support.test.espresso.util.TreeIterablesTest.complexTree , new android.support.test.espresso.util.TreeIterablesTest.TestElementTreeViewer ( ) ) ; @ java.lang.SuppressWarnings ( value = "unused" ) java.util.List < android.support.test.espresso.util.TreeIterablesTest.TestElement > createdForSideEffect = com.google.common.collect.Lists.newArrayList ( distanceRecorder.children ( android.support.test.espresso.util.TreeIterablesTest.complexTree ) ) ; org.hamcrest.MatcherAssert.assertThat ( distanceRecorder.getDistance ( android.support.test.espresso.util.TreeIterablesTest.complexTree ) , org.hamcrest.Matchers.is ( 0 ) ) ; org.hamcrest.MatcherAssert.assertThat ( distanceRecorder.getDistance ( android.support.test.espresso.util.TreeIterablesTest.complexTree.children.iterator ( ) . next ( ) ) , org.hamcrest.Matchers.is ( 1 ) ) ; }

Target:
public void distanceRecorder_distanceKnownAfterChildrenCall ( ) { final android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > distanceRecorder = new android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > ( android.support.test.espresso.util.TreeIterablesTest.complexTree , new android.support.test.espresso.util.TreeIterablesTest.TestElementTreeViewer ( ) ) ; @ java.lang.SuppressWarnings ( value = "unused" ) java.util.List < android.support.test.espresso.util.TreeIterablesTest.TestElement > createdForSideEffect = com.google.common.collect.Lists.newArrayList ( distanceRecorder.children ( android.support.test.espresso.util.TreeIterablesTest.complexTree ) ) ; org.hamcrest.MatcherAssert.assertThat ( distanceRecorder.getDistance ( android.support.test.espresso.util.TreeIterablesTest.complexTree ) , org.hamcrest.Matchers.is ( 0 ) ) ; org.hamcrest.MatcherAssert.assertThat ( distanceRecorder.getDistance ( android.support.test.espresso.util.TreeIterablesTest.complexTree.children.iterator ( ) . next ( ) ) , org.hamcrest.Matchers.is ( 1 ) ) ; }
Source:
public java.util.Map < java.io.File , com.android.builder.resources.FileStatus > getChangedFiles ( ) { for ( java.io.File f : mLoadedFiles.keySet ( ) ) { mResults.put ( f , FileStatus.REMOVED ) ; } return mResults ; }

Target:
public java.util.Map < java.io.File , com.android.builder.resources.FileStatus > getChangedFiles ( ) { if ( ( mReturnedMap ) == null ) { mReturnedMap = com.google.common.collect.Maps.newHashMap ( mResults ) ; for ( java.io.File f : mLoadedFiles.keySet ( ) ) { mReturnedMap.put ( f , FileStatus.REMOVED ) ; } mReturnedMap = java.util.Collections.unmodifiableMap ( mReturnedMap ) ; } return mReturnedMap ; }
Source:
public void startTrackingBssids ( android.net.wifi.WifiScanner.BssidInfo [ ] bssidInfos , int apLostThreshold , android.net.wifi.WifiScanner.BssidListener listener ) { com.android.internal.util.Preconditions.checkNotNull ( listener , "listener cannot be null" ) ; int key = addListener ( listener ) ; if ( key == ( android.net.wifi.WifiScanner.INVALID_KEY ) ) return ; validateChannel ( ) ; android.net.wifi.WifiScanner.HotlistSettings settings = new android.net.wifi.WifiScanner.HotlistSettings ( ) ; settings.bssidInfos = bssidInfos ; settings.apLostThreshold = apLostThreshold ; mAsyncChannel.sendMessage ( android.net.wifi.WifiScanner.CMD_SET_HOTLIST , 0 , key , settings ) ; }

Target:
public void startTrackingBssids ( android.net.wifi.WifiScanner.BssidInfo [ ] bssidInfos , int apLostThreshold , android.net.wifi.WifiScanner.BssidListener listener ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
public void setEncodingContent ( org.apache.harmony.security.asn1.BerOutputStream out ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( org.apache.harmony.security.asn1.ASN1UTCTime.UTC_PATTERN ) ; sdf.setTimeZone ( java.util.TimeZone.getTimeZone ( "UTC" ) ) ; out.content = sdf.format ( out.content ) . getBytes ( Charsets.UTF_8 ) ; out.length = ( ( byte [ ] ) ( out.content ) ) . length ; }

Target:
public void setEncodingContent ( org.apache.harmony.security.asn1.BerOutputStream out ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( org.apache.harmony.security.asn1.ASN1UTCTime.UTC_PATTERN , java.util.Locale.US ) ; sdf.setTimeZone ( java.util.TimeZone.getTimeZone ( "UTC" ) ) ; out.content = sdf.format ( out.content ) . getBytes ( Charsets.UTF_8 ) ; out.length = ( ( byte [ ] ) ( out.content ) ) . length ; }
Source:
public void test_SSLEngine_setUseClientMode_afterHandshake ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLEnginePair pair = libcore.javax.net.ssl.TestSSLEnginePair.create ( null ) ; try { pair.server.setUseClientMode ( false ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { pair.client.setUseClientMode ( false ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void test_SSLEngine_setUseClientMode_afterHandshake ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLEnginePair pair = libcore.javax.net.ssl.TestSSLEnginePair.create ( null ) ; try { pair.server.setUseClientMode ( false ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { pair.client.setUseClientMode ( false ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } pair.close ( ) ; }
Source:
public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( device ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; com.android.hierarchyviewerlib.ComponentRegistry.getPixelPerfectModel ( ) . setData ( device , screenshotImage , viewNode ) ; } }

Target:
public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( device ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.getModel ( ) . setData ( device , screenshotImage , viewNode ) ; } } }
Source:
public final java.nio.CharBuffer asCharBuffer ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 1 ; return new java.nio.ByteBufferAsCharBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }

Target:
public final java.nio.CharBuffer asCharBuffer ( ) { if ( memoryRef.isFreed ) { throw new java.lang.IllegalStateException ( "buffer has been freed" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 1 ; return new java.nio.ByteBufferAsCharBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }
Source:
private void removeConferenceParticipant ( com.android.services.telephony.ConferenceParticipantConnection participant ) { android.telecom.Log.i ( this , "removeConferenceParticipant: %s" , participant ) ; participant.removeConnectionListener ( mParticipantListener ) ; synchronized ( mUpdateSyncRoot ) { mConferenceParticipantConnections.remove ( participant.getUserEntity ( ) ) ; } mTelephonyConnectionService.removeConnection ( participant ) ; }

Target:
private void removeConferenceParticipant ( com.android.services.telephony.ConferenceParticipantConnection participant ) { android.telecom.Log.i ( this , "removeConferenceParticipant: %s" , participant ) ; participant.removeConnectionListener ( mParticipantListener ) ; synchronized ( mUpdateSyncRoot ) { mConferenceParticipantConnections.remove ( new android.util.Pair ( participant.getUserEntity ( ) , participant.getEndpoint ( ) ) ) ; } mTelephonyConnectionService.removeConnection ( participant ) ; }
Source:
public void terminate ( ) { mCallback = null ; if ( mIsPublishSession ) { com.android.server.wifi.nan.WifiNanNative.getInstance ( ) . stopPublish ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } else { com.android.server.wifi.nan.WifiNanNative.getInstance ( ) . stopSubscribe ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } }

Target:
public void terminate ( ) { mCallback = null ; if ( mIsPublishSession ) { com.android.server.wifi.aware.WifiAwareNative.getInstance ( ) . stopPublish ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } else { com.android.server.wifi.aware.WifiAwareNative.getInstance ( ) . stopSubscribe ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } }
Source:
public void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { super . onRestoreInstanceState ( savedInstanceState ) ; mTextMsg = savedInstanceState.getParcelable ( com.android.stk.StkDialogActivity.TEXT ) ; com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , ( ( "onRestoreInstanceState - [" + ( mTextMsg ) ) + "]" ) ) ; }

Target:
public void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { super . onRestoreInstanceState ( savedInstanceState ) ; mTextMsg = savedInstanceState.getParcelable ( com.android.stk.StkDialogActivity.TEXT_KEY ) ; mTimeoutIntent = savedInstanceState.getParcelable ( com.android.stk.StkDialogActivity.TIMEOUT_INTENT_KEY ) ; mSlotId = savedInstanceState.getInt ( com.android.stk.StkDialogActivity.SLOT_ID_KEY ) ; appService.getStkContext ( mSlotId ) . setPendingDialogInstance ( this ) ; com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , ( ( "onRestoreInstanceState - [" + ( mTextMsg ) ) + "]" ) ) ; }