auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void twoPath ( java.lang.Object obj1 , java.lang.Object obj2 , int x ) { java.lang.Object localObj ; synchronized ( obj1 ) { synchronized ( obj2 ) { if ( x == 0 ) { localObj = obj2 ; } else { localObj = obj1 ; } } } doNothing ( localObj ) ; }

Target:
public static native void disableStackFrameAsserts ( ) ;
Source:
public void validateCopyConstructorWithValidSource ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration sourceConfig = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; sourceConfig.homeSp = android.net.wifi.hotspot2.PasspointConfigurationTest.createHomeSp ( ) ; sourceConfig.credential = android.net.wifi.hotspot2.PasspointConfigurationTest.createCredential ( ) ; android.net.wifi.hotspot2.PasspointConfiguration copyConfig = new android.net.wifi.hotspot2.PasspointConfiguration ( sourceConfig ) ; org.junit.Assert.assertTrue ( copyConfig.equals ( sourceConfig ) ) ; }

Target:
public void validateConfigWithoutHomeSp ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = android.net.wifi.hotspot2.PasspointConfigurationTest.createConfig ( ) ; config.homeSp = null ; org.junit.Assert.assertFalse ( config.validate ( ) ) ; }
Source:
native void rsnAllocationData2D ( long con , long id , int xoff , int yoff , int mip , int face , int w , int h , short [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public void run ( ) { org.eclipse.ui.IWorkbenchWindow window = workbench.getActiveWorkbenchWindow ( ) ; if ( window != null ) { com.android.ide.eclipse.adt.internal.welcome.WelcomeWizard wizard = new com.android.ide.eclipse.adt.internal.welcome.WelcomeWizard ( mStore ) ; org.eclipse.jface.wizard.WizardDialog dialog = new org.eclipse.jface.wizard.WizardDialog ( window.getShell ( ) , wizard ) ; dialog.open ( ) ; } mStore.setAdtUsed ( true ) ; if ( mStore.isPingOptIn ( ) ) { sendUsageStats ( ) ; } }

Target:
protected org.eclipse.core.runtime.IStatus run ( org.eclipse.core.runtime.IProgressMonitor monitor ) { try { pingUsageServer ( ) ; return org.eclipse.core.runtime.Status.OK_STATUS ; } catch ( java.lang.Throwable t ) { com.android.ide.eclipse.adt.AdtPlugin.log ( t , "pingUsageServer failed" ) ; return new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.ERROR , com.android.ide.eclipse.adt.AdtPlugin.PLUGIN_ID , "pingUsageServer failed" , t ) ; } }
Source:
public static int murmur3_32 ( int seed , byte [ ] data ) { return sun.misc.Hashing.murmur3_32 ( seed , data , 0 , data.length ) ; }

Target:
public static int singleWordWangJenkinsHash ( java.lang.Object k ) { int h = k.hashCode ( ) ; h += ( h << 15 ) ^ - 12931 ; h ^= h > > > 10 ; h += h << 3 ; h ^= h > > > 6 ; h += ( h << 2 ) + ( h << 14 ) ; return h ^ ( h > > > 16 ) ; }
Source:
public static com.google.gct.testing.dimension.LanguageDimension.Language getLanguage ( final java.lang.String locale ) { return com.google.common.collect.Iterables.find ( AllLanguages.LANGUAGES , new com.google.common.base.Predicate < com.google.gct.testing.dimension.LanguageDimension.Language > ( ) { @ java.lang.Override public boolean apply ( com.google.gct.testing.dimension.LanguageDimension.Language input ) { return input.getId ( ) . equals ( locale ) ; } } ) ; }

Target:
public static com.google.gct.testing.dimension.LanguageDimension.Language getLanguage ( final java.lang.String locale ) { return com.google.common.collect.Iterables.find ( com.google.gct.testing.dimension.LanguageDimension.getFullDomain ( ) , new com.google.common.base.Predicate < com.google.gct.testing.dimension.LanguageDimension.Language > ( ) { @ java.lang.Override public boolean apply ( com.google.gct.testing.dimension.LanguageDimension.Language input ) { return input.getId ( ) . equals ( locale ) ; } } ) ; }
Source:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . descriptionContains ( testDescription ) ) . exists ( ) ; }

Target:
public boolean isTrue ( ) { boolean hasApplication = ( device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textContains ( appTitle ) . resourceId ( Res.GOOGLE_PLAY_LIST_TITLE_RES ) ) . exists ( ) ) || ( device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . descriptionContains ( appTitle ) . resourceId ( Res.GOOGLE_PLAY_LIST_TITLE_RES ) ) . exists ( ) ) ; return hasApplication ; }
Source:
private static java.lang.Integer getIntField ( com.android.tools.perflib.heap.Instance inst , java.lang.String fieldName ) { java.lang.Object value = com.android.ahat.InstanceUtils.getField ( inst , fieldName ) ; if ( ! ( value instanceof java.lang.Integer ) ) { return null ; } return ( ( java.lang.Integer ) ( value ) ) ; }

Target:
private static java.lang.Integer getIntField ( com.android.tools.perflib.heap.Instance inst , java.lang.String fieldName , java.lang.Integer def ) { java.lang.Object value = com.android.ahat.InstanceUtils.getField ( inst , fieldName ) ; if ( ! ( value instanceof java.lang.Integer ) ) { return def ; } return ( ( java.lang.Integer ) ( value ) ) ; }
Source:
public void testGetDownloadStatus ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = downloadRequestTemplate.build ( ) ; mDownloadSession.requestDownloadState ( request , CtsDownloadService.FILE_INFO ) ; java.util.List < android.os.Bundle > getDownloadStatusCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_GET_DOWNLOAD_STATUS ) ; assertEquals ( 1 , getDownloadStatusCalls.size ( ) ) ; assertEquals ( request , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; assertEquals ( CtsDownloadService.FILE_INFO , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_FILE_INFO ) ) ; }

Target:
public void testGetDownloadStatus ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = downloadRequestTemplate.build ( ) ; mDownloadSession.requestDownloadState ( request , CtsDownloadService.FILE_INFO_1 ) ; java.util.List < android.os.Bundle > getDownloadStatusCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_GET_DOWNLOAD_STATUS ) ; assertEquals ( 1 , getDownloadStatusCalls.size ( ) ) ; assertEquals ( request , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; assertEquals ( CtsDownloadService.FILE_INFO_1 , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_FILE_INFO ) ) ; }
Source:
public void testPreHistoricOffsets ( ) throws java.lang.Exception { java.util.TimeZone tz = java.util.TimeZone.getTimeZone ( "Africa/Bissau" ) ; libcore.java.util.TimeZoneTest.assertNonDaylightOffset ( ( - 3600 ) , libcore.java.util.TimeZoneTest.parseIsoTime ( "1911-01-01T00:00:00.0+0000" ) , tz ) ; libcore.java.util.TimeZoneTest.assertNonDaylightOffset ( ( - 3600 ) , libcore.java.util.TimeZoneTest.parseIsoTime ( "1912-01-01T12:00:00.0-0100" ) , tz ) ; libcore.java.util.TimeZoneTest.assertNonDaylightOffset ( 0 , libcore.java.util.TimeZoneTest.parseIsoTime ( "1980-01-01T00:00:00.0+0000" ) , tz ) ; }

Target:
public void testPreHistoricOffsets ( ) throws java.lang.Exception { java.util.TimeZone tz = java.util.TimeZone.getTimeZone ( "Africa/Bissau" ) ; libcore.java.util.TimeZoneTest.assertNonDaylightOffset ( ( - 3740 ) , libcore.java.util.TimeZoneTest.parseIsoTime ( "1901-12-13T00:00:00.0+0000" ) , tz ) ; libcore.java.util.TimeZoneTest.assertNonDaylightOffset ( ( - 3740 ) , libcore.java.util.TimeZoneTest.parseIsoTime ( "1902-12-13T20:45:53.0+0000" ) , tz ) ; libcore.java.util.TimeZoneTest.assertNonDaylightOffset ( 0 , libcore.java.util.TimeZoneTest.parseIsoTime ( "1980-01-01T00:00:00.0+0000" ) , tz ) ; }
Source:
private static void applyInvokeWithSecurityPolicy ( com.android.internal.os.ZygoteConnection.Arguments args , android.net.Credentials peer ) throws com.android.internal.os.ZygoteSecurityException { int peerUid = peer.getUid ( ) ; if ( ( ( args.invokeWith ) != null ) && ( peerUid != 0 ) ) { throw new com.android.internal.os.ZygoteSecurityException ( ( "Peer is not permitted to specify " + "an explicit invoke-with wrapper command" ) ) ; } }

Target:
private static void applyInvokeWithSecurityPolicy ( com.android.internal.os.ZygoteConnection.Arguments args , android.net.Credentials peer ) throws com.android.internal.os.ZygoteSecurityException { int peerUid = peer.getUid ( ) ; if ( ( ( ( args.invokeWith ) != null ) && ( peerUid != 0 ) ) && ( ( ( args.debugFlags ) & ( Zygote.DEBUG_ENABLE_DEBUGGER ) ) == 0 ) ) { throw new com.android.internal.os.ZygoteSecurityException ( ( "Peer is permitted to specify an" + ( "explicit invoke-with wrapper command only for debuggable" + "applications." ) ) ) ; } }
Source:
void finishRunningVoiceLocked ( ) { if ( mRunningVoice ) { mRunningVoice = false ; goToSleepIfNeededLocked ( ) ; } }

Target:
void updateSleepIfNeededLocked ( ) { if ( ( mSleeping ) && ( ! ( shouldSleepLocked ( ) ) ) ) { mSleeping = false ; mStackSupervisor.comeOutOfSleepIfNeededLocked ( ) ; } else if ( ( ! ( mSleeping ) ) && ( shouldSleepLocked ( ) ) ) { mSleeping = true ; mStackSupervisor.goingToSleepLocked ( ) ; checkExcessivePowerUsageLocked ( false ) ; mHandler.removeMessages ( com.android.server.am.ActivityManagerService.CHECK_EXCESSIVE_WAKE_LOCKS_MSG ) ; android.os.Message nmsg = mHandler.obtainMessage ( com.android.server.am.ActivityManagerService.CHECK_EXCESSIVE_WAKE_LOCKS_MSG ) ; mHandler.sendMessageDelayed ( nmsg , com.android.server.am.ActivityManagerService.POWER_CHECK_DELAY ) ; } }
Source:
protected int getContainer16Resource ( com.ibm.icu.impl.ICUResourceBundleReader reader , int index ) { if ( ( index < 0 ) || ( ( size ) <= index ) ) { return ICUResourceBundle.RES_BOGUS ; } return ( ( ICUResourceBundle.STRING_V2 ) << 28 ) | ( reader.b16BitUnits.charAt ( ( ( itemsOffset ) + index ) ) ) ; }

Target:
protected int getContainer16Resource ( com.ibm.icu.impl.ICUResourceBundleReader reader , int index ) { if ( ( index < 0 ) || ( ( size ) <= index ) ) { return ICUResourceBundle.RES_BOGUS ; } int res16 = reader.b16BitUnits.charAt ( ( ( itemsOffset ) + index ) ) ; if ( res16 < ( reader.poolStringIndex16Limit ) ) { } else { res16 = ( res16 - ( reader.poolStringIndex16Limit ) ) + ( reader.poolStringIndexLimit ) ; } return ( ( ICUResourceBundle.STRING_V2 ) << 28 ) | res16 ; }
Source:
public static void main ( java.lang.String [ ] args ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { new com.android.hierarchyviewer.HierarchyViewerApplication ( ) . run ( ) ; } } ) ; java.lang.System.exit ( 0 ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { java.lang.Thread.setDefaultUncaughtExceptionHandler ( new com.android.hierarchyviewer.HierarchyViewerApplication.UncaughtHandler ( ) ) ; org.eclipse.swt.widgets.Display.setAppName ( "HierarchyViewer" ) ; new com.android.hierarchyviewer.HierarchyViewerApplication ( ) . run ( ) ; }
Source:
public boolean removeAll ( java.util.Collection < ? > c ) { try { return super . removeAll ( com.google.common.base.Preconditions.checkNotNull ( c ) ) ; } catch ( java.lang.UnsupportedOperationException e ) { boolean changed = true ; for ( java.lang.Object o : c ) { changed |= remove ( o ) ; } return changed ; } }

Target:
public boolean removeAll ( java.util.Collection < ? > c ) { try { return super . removeAll ( com.google.common.base.Preconditions.checkNotNull ( c ) ) ; } catch ( java.lang.UnsupportedOperationException e ) { return com.google.common.collect.Sets.removeAllImpl ( this , c.iterator ( ) ) ; } }
Source:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called post GC on WifiNanManager" ) ; return ; } mgr.startRanging ( mSessionId , params , listener ) ; } }

Target:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called post GC on WifiNanManager" ) ; return ; } mgr.startRanging ( mClientId , mSessionId , params , listener ) ; } }
Source:
public T createOutput ( @ com.android.annotations.Nullable java.lang.String densityFilter , @ com.android.annotations.Nullable java.lang.String abiFilter ) { T data = doCreateOutput ( densityFilter , abiFilter ) ; outputs.add ( data ) ; return data ; }

Target:
public T createOutput ( @ com.android.annotations.Nullable java.lang.String densityFilter , @ com.android.annotations.Nullable java.lang.String abiFilter ) { T data = doCreateOutput ( densityFilter , abiFilter ) ; if ( ( outputs.size ( ) ) == 1 ) { outputs.get ( 0 ) . setMultiOutput ( true ) ; data.setMultiOutput ( true ) ; } else if ( ( outputs.size ( ) ) > 1 ) { data.setMultiOutput ( true ) ; } outputs.add ( data ) ; return data ; }
Source:
public void run ( ) { try { mNwService.startAccessPoint ( config , mInterfaceName ) ; } catch ( java.lang.Exception e ) { loge ( ( "Exception in softap start " + e ) ) ; try { mNwService.stopAccessPoint ( mInterfaceName ) ; mNwService.startAccessPoint ( config , mInterfaceName ) ; } catch ( java.lang.Exception e1 ) { loge ( ( "Exception in softap re-start " + e1 ) ) ; sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_START_AP_FAILURE , WifiManager.SAP_START_FAILURE_GENERAL ) ; return ; } } if ( com.android.server.wifi.WifiStateMachine.DBG ) log ( "Soft AP start successful" ) ; sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_START_AP_SUCCESS ) ; }

Target:
public void onStateChanged ( int state , int reason ) { if ( state == ( android.net.wifi.WifiManager.WIFI_AP_STATE_DISABLED ) ) { sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_AP_STOPPED ) ; } else if ( state == ( android.net.wifi.WifiManager.WIFI_AP_STATE_FAILED ) ) { sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_START_AP_FAILURE ) ; } setWifiApState ( state , reason ) ; }
Source:
private ApkVerifier.Result verify ( java.lang.String apkFilenameInResources , java.lang.Integer minSdkVersionOverride ) throws com.android.apksig.apk.ApkFormatException , java.io.IOException , java.security.NoSuchAlgorithmException { byte [ ] apkBytes = getResourceContents ( apkFilenameInResources ) ; com.android.apksig.ApkVerifier.Builder builder = new com.android.apksig.ApkVerifier.Builder ( com.android.apksig.util.DataSources.asDataSource ( java.nio.ByteBuffer.wrap ( apkBytes ) ) ) ; if ( minSdkVersionOverride != null ) { builder.setMinCheckedPlatformVersion ( minSdkVersionOverride ) ; } return builder.build ( ) . verify ( ) ; }

Target:
public void testTargetSandboxVersion2AndHigher ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerified ( verify ( "targetSandboxVersion-2.apk" ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "v2-only-targetSandboxVersion-2.apk" ) , Issue.JAR_SIG_NO_MANIFEST ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( "v2-only-targetSandboxVersion-2.apk" , 24 ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "v1-only-targetSandboxVersion-2.apk" ) , Issue.NO_SIG_FOR_TARGET_SANDBOX_VERSION ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "unsigned-targetSandboxVersion-2.apk" ) , Issue.NO_SIG_FOR_TARGET_SANDBOX_VERSION ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verify ( "v2-only-targetSandboxVersion-3.apk" ) ) ; }
Source:
public void testStageInstallWithErrorCode_missingIcuFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_missingTzDataFile ( ) throws java.lang.Exception { byte [ ] stagedDistroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( stagedDistroBytes ) ) ) ; assertInstallDistroStaged ( stagedDistroBytes ) ; byte [ ] incompleteDistroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . clearTzDataForTests ( ) . buildUnvalidatedBytes ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( incompleteDistroBytes ) ) ) ; assertInstallDistroStaged ( stagedDistroBytes ) ; assertNoInstalledDistro ( ) ; }
Source:
public boolean sameItemAs ( java.lang.Package pkg ) { return pkg instanceof com.android.sdklib.internal.repository.packages.ToolPackage ; }

Target:
public boolean sameItemAs ( java.lang.Package pkg , boolean ignorePreviews ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.ToolPackage ) { if ( ignorePreviews ) { return true ; } else { return ( ( ( com.android.sdklib.internal.repository.packages.ToolPackage ) ( pkg ) ) . getRevision ( ) . isPreview ( ) ) == ( getRevision ( ) . isPreview ( ) ) ; } } return false ; }
Source:
public void setConnectionCapabilities ( java.lang.String callId , int connectionCapabilities ) { if ( mConnectionById.containsKey ( callId ) ) { findConnectionForAction ( callId , "setConnectionCapabilities" ) . setConnectionCapabilities ( connectionCapabilities ) ; } else { findConferenceForAction ( callId , "setConnectionCapabilities" ) . setConnectionCapabilities ( connectionCapabilities ) ; } }

Target:
public void setConnectionCapabilities ( java.lang.String callId , int connectionCapabilities , android.telecom.Logging.Session.Info sessionInfo ) { if ( mConnectionById.containsKey ( callId ) ) { findConnectionForAction ( callId , "setConnectionCapabilities" ) . setConnectionCapabilities ( connectionCapabilities ) ; } else { findConferenceForAction ( callId , "setConnectionCapabilities" ) . setConnectionCapabilities ( connectionCapabilities ) ; } }
Source:
private static android.net.wifi.WifiConfiguration buildSIMConfig ( com.android.server.wifi.hotspot2.pps.HomeSP homeSP , android.content.Context context ) throws java.io.IOException { com.android.server.wifi.hotspot2.pps.Credential credential = homeSP.getCredential ( ) ; com.android.server.wifi.IMSIParameter credImsi = credential.getImsi ( ) ; android.net.wifi.WifiConfiguration config = com.android.server.wifi.configparse.ConfigBuilder.buildBaseConfiguration ( homeSP ) ; config.enterpriseConfig.setPlmn ( credImsi.toString ( ) ) ; return config ; }

Target:
private static android.net.wifi.WifiConfiguration buildSIMConfig ( com.android.server.wifi.hotspot2.pps.HomeSP homeSP , android.content.Context context ) throws java.io.IOException { com.android.server.wifi.hotspot2.pps.Credential credential = homeSP.getCredential ( ) ; com.android.server.wifi.IMSIParameter credImsi = credential.getImsi ( ) ; android.net.wifi.WifiConfiguration config = com.android.server.wifi.configparse.ConfigBuilder.buildBaseConfiguration ( homeSP ) ; config.enterpriseConfig.setPlmn ( ( credImsi != null ? credImsi.toString ( ) : "" ) ) ; return config ; }
Source:
public java.lang.String getPlatformToolsVersion ( ) { com.android.sdklib.repository.local.LocalPkgInfo info = mLocalSdk.getPkgInfo ( LocalSdk.PKG_PLATFORM_TOOLS ) ; if ( ( info != null ) && ( info.hasFullRevision ( ) ) ) { return info.getFullRevision ( ) . toShortString ( ) ; } return null ; }

Target:
public java.lang.String getPlatformToolsVersion ( ) { com.android.sdklib.repository.local.LocalPkgInfo info = mLocalSdk.getPkgInfo ( PkgType.PKG_PLATFORM_TOOLS ) ; com.android.sdklib.repository.descriptors.IPkgDesc d = ( info == null ) ? null : info.getDesc ( ) ; if ( ( d != null ) && ( d.hasFullRevision ( ) ) ) { return d.getFullRevision ( ) . toShortString ( ) ; } return null ; }
Source:
public com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult isPossibleNumberWithReason ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.lang.String nationalNumber = getNationalSignificantNumber ( number ) ; int countryCode = number.getCountryCode ( ) ; if ( ! ( hasValidCountryCallingCode ( countryCode ) ) ) { return com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_COUNTRY_CODE ; } java.lang.String regionCode = getRegionCodeForCountryCode ( countryCode ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; java.util.regex.Pattern possibleNumberPattern = regexCache.getPatternForRegex ( metadata.getGeneralDesc ( ) . getPossibleNumberPattern ( ) ) ; return testNumberLengthAgainstPattern ( possibleNumberPattern , nationalNumber ) ; }

Target:
public com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult isPossibleNumberWithReason ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.lang.String nationalNumber = getNationalSignificantNumber ( number ) ; int countryCode = number.getCountryCode ( ) ; if ( ! ( hasValidCountryCallingCode ( countryCode ) ) ) { return com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_COUNTRY_CODE ; } java.lang.String regionCode = getRegionCodeForCountryCode ( countryCode ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; return testNumberLength ( nationalNumber , metadata.getGeneralDesc ( ) ) ; }
Source:
public void getOutgoingCallerIdDisplay ( android.os.Message onComplete ) { if ( isPhoneTypeGsm ( ) ) { com.android.internal.telephony.Phone imsPhone = mImsPhone ; if ( ( imsPhone != null ) && ( ( imsPhone.getServiceState ( ) . getState ( ) ) == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) ) { imsPhone.getOutgoingCallerIdDisplay ( onComplete ) ; return ; } mCi.getCLIR ( onComplete ) ; } else { loge ( "getOutgoingCallerIdDisplay: not possible in CDMA" ) ; } }

Target:
public void setOutgoingCallerIdDisplay ( int commandInterfaceCLIRMode , android.os.Message onComplete ) { if ( isPhoneTypeGsm ( ) ) { com.android.internal.telephony.Phone imsPhone = mImsPhone ; if ( ( imsPhone != null ) && ( ( ( imsPhone.getServiceState ( ) . getState ( ) ) == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) || ( imsPhone.isUtEnabled ( ) ) ) ) { imsPhone.setOutgoingCallerIdDisplay ( commandInterfaceCLIRMode , onComplete ) ; return ; } mCi.setCLIR ( commandInterfaceCLIRMode , obtainMessage ( com.android.internal.telephony.EVENT_SET_CLIR_COMPLETE , commandInterfaceCLIRMode , 0 , onComplete ) ) ; } else { loge ( "setOutgoingCallerIdDisplay: not possible in CDMA" ) ; } }
Source:
private static int getClassFileVersion ( org.jetbrains.asm4.ClassReader reader ) { final int [ ] classfileVersion = new int [ 1 ] ; reader.accept ( new org.jetbrains.asm4.ClassVisitor ( org.jetbrains.asm4.Opcodes.ASM4 ) { public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { classfileVersion [ 0 ] = version ; } } , 0 ) ; return classfileVersion [ 0 ] ; }

Target:
private static int getClassFileVersion ( org.jetbrains.org.objectweb.asm.ClassReader reader ) { final int [ ] classfileVersion = new int [ 1 ] ; reader.accept ( new org.jetbrains.org.objectweb.asm.ClassVisitor ( org.jetbrains.org.objectweb.asm.Opcodes.ASM5 ) { public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { classfileVersion [ 0 ] = version ; } } , 0 ) ; return classfileVersion [ 0 ] ; }
Source:
public void testBaseResourceSetByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceSet resourceSet = com.android.ide.common.res2.ResourceSetTest.getBaseResourceSet ( ) ; verifyResourceExists ( resourceSet , "drawable/icon" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen-sw600dp-v13/offset" , "id/item_id" , "integer/integer" , "plurals/plurals" ) ; }

Target:
public void testBaseResourceSetWithNormalizationByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceSet resourceSet = com.android.ide.common.res2.ResourceSetTest.getBaseResourceSet ( true ) ; verifyResourceExists ( resourceSet , "drawable/icon" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen-sw600dp-v13/offset" , "id/item_id" , "integer/integer" , "plurals/plurals" ) ; }
Source:
public byte [ ] getEncoded ( ) throws java.security.cert.CertificateEncodingException { if ( ( pkiPathEncoding ) == null ) { pkiPathEncoding = org.apache.harmony.security.provider.cert.X509CertPathImpl.ASN1.encode ( this ) ; } byte [ ] result = new byte [ pkiPathEncoding.length ] ; java.lang.System.arraycopy ( pkiPathEncoding , 0 , result , 0 , pkiPathEncoding.length ) ; return result ; }

Target:
public byte [ ] getEncoded ( ) throws java.security.cert.CertificateEncodingException { return getEncoded ( org.apache.harmony.security.provider.cert.X509CertPathImpl.Encoding.PKI_PATH ) ; }
Source:
public void testStateTransition_DisconnectingToDisconnected_Timeout ( ) { int numBroadcastsSent = setUpDisconnectingState ( ) ; numBroadcastsSent ++ ; verify ( mHeadsetService , timeout ( com.android.bluetooth.hfp.HeadsetStateMachineTest.CONNECT_TIMEOUT_TEST_WAIT_MILLIS ) . times ( numBroadcastsSent ) ) . sendBroadcastAsUser ( mIntentArgument.capture ( ) , eq ( UserHandle.ALL ) , eq ( HeadsetService.BLUETOOTH_PERM ) ) ; com.android.bluetooth.hfp.HeadsetStateMachineTest.verifyConnectionStateBroadcast ( mTestDevice , BluetoothProfile.STATE_DISCONNECTED , BluetoothProfile.STATE_DISCONNECTING , mIntentArgument.getValue ( ) ) ; org.junit.Assert.assertThat ( mHeadsetStateMachine.getCurrentState ( ) , org.hamcrest.core.IsInstanceOf.instanceOf ( HeadsetStateMachine.Disconnected.class ) ) ; }

Target:
public void testStateTransition_DisconnectingToDisconnected_Timeout ( ) { int numBroadcastsSent = setUpDisconnectingState ( ) ; numBroadcastsSent ++ ; verify ( mHeadsetService , timeout ( com.android.bluetooth.hfp.HeadsetStateMachineTest.CONNECT_TIMEOUT_TEST_WAIT_MILLIS ) . times ( numBroadcastsSent ) ) . sendBroadcastAsUser ( mIntentArgument.capture ( ) , eq ( UserHandle.ALL ) , eq ( HeadsetService.BLUETOOTH_PERM ) ) ; com.android.bluetooth.hfp.HeadsetTestUtils.verifyConnectionStateBroadcast ( mTestDevice , BluetoothProfile.STATE_DISCONNECTED , BluetoothProfile.STATE_DISCONNECTING , mIntentArgument.getValue ( ) ) ; org.junit.Assert.assertThat ( mHeadsetStateMachine.getCurrentState ( ) , org.hamcrest.core.IsInstanceOf.instanceOf ( HeadsetStateMachine.Disconnected.class ) ) ; }
Source:
protected void resetRecords ( ) { mMncLength = UNINITIALIZED ; log ( ( "setting0 mMncLength" + ( mMncLength ) ) ) ; mIccId = null ; mFullIccId = null ; mAdnCache.reset ( ) ; mRecordsRequested = false ; mLockedRecordsRequested = false ; }

Target:
protected void resetRecords ( ) { mMncLength = UNINITIALIZED ; log ( ( "setting0 mMncLength" + ( mMncLength ) ) ) ; mIccId = null ; mFullIccId = null ; mAdnCache.reset ( ) ; mRecordsRequested = false ; mLockedRecordsReqReason = LOCKED_RECORDS_REQ_REASON_NONE ; mLoaded.set ( false ) ; }
Source:
public void onDataPathEnd ( int ndpId ) { if ( com.android.server.wifi.nan.WifiNanDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.nan.WifiNanDataPathStateManager.TAG , ( "onDataPathEnd: ndpId=" + ndpId ) ) ; java.util.Map.Entry < java.lang.String , com.android.server.wifi.nan.WifiNanDataPathStateManager.NanNetworkRequestInformation > nnriE = getNetworkRequestByNdpId ( ndpId ) ; if ( nnriE == null ) { if ( com.android.server.wifi.nan.WifiNanDataPathStateManager.DBG ) { android.util.Log.d ( com.android.server.wifi.nan.WifiNanDataPathStateManager.TAG , ( "onDataPathEnd: network request not found for ndpId=" + ndpId ) ) ; } return ; } tearDownInterface ( nnriE.getValue ( ) ) ; mNetworkRequestsCache.remove ( nnriE.getKey ( ) ) ; }

Target:
public void onDataPathEnd ( int ndpId ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "onDataPathEnd: ndpId=" + ndpId ) ) ; java.util.Map.Entry < java.lang.String , com.android.server.wifi.aware.WifiAwareDataPathStateManager.AwareNetworkRequestInformation > nnriE = getNetworkRequestByNdpId ( ndpId ) ; if ( nnriE == null ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.DBG ) { android.util.Log.d ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "onDataPathEnd: network request not found for ndpId=" + ndpId ) ) ; } return ; } tearDownInterface ( nnriE.getValue ( ) ) ; mNetworkRequestsCache.remove ( nnriE.getKey ( ) ) ; }
Source:
public void testDirectory_setAndGet ( ) { java.io.File directory = new java.io.File ( ( "/tmp/fake/directory/for/" + ( libcore.java.lang.ProcessBuilderTest.TAG ) ) ) ; assertEquals ( directory , new java.lang.ProcessBuilder ( ) . directory ( directory ) . directory ( ) ) ; }

Target:
public void testDirectory_setAndGet ( ) { java.io.File directory = new java.io.File ( ( "/tmp/fake/directory/for/" + ( libcore.java.lang.ProcessBuilderTest.TAG ) ) ) ; assertEquals ( directory , new java.lang.ProcessBuilder ( ) . directory ( directory ) . directory ( ) ) ; assertNull ( new java.lang.ProcessBuilder ( ) . directory ( ) ) ; assertNull ( new java.lang.ProcessBuilder ( ) . directory ( directory ) . directory ( null ) . directory ( ) ) ; }
Source:
public void testDismissKeyguardActivity ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; assertTrue ( mAmWmState.getAmState ( ) . getKeyguardControllerState ( ) . keyguardShowing ) ; launchActivity ( "DismissKeyguardActivity" ) ; mAmWmState.waitForKeyguardShowingAndOccluded ( mDevice ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "DismissKeyguardActivity" } ) ; mAmWmState.assertVisibility ( "DismissKeyguardActivity" , true ) ; assertShowingAndOccluded ( ) ; }

Target:
public void testDismissKeyguardActivity ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; assertTrue ( mAmWmState.getAmState ( ) . getKeyguardControllerState ( ) . keyguardShowing ) ; launchActivity ( "DismissKeyguardActivity" ) ; mAmWmState.waitForKeyguardShowingAndOccluded ( mDevice ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "DismissKeyguardActivity" } ) ; mAmWmState.assertVisibility ( "DismissKeyguardActivity" , true ) ; assertShowingAndOccluded ( ) ; }
Source:
public void testBaseResourceSetByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceSet resourceSet = com.android.ide.common.res2.ResourceSetTest.getBaseResourceSet ( ) ; verifyResourceExists ( resourceSet , "drawable/icon" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" , "plurals/plurals" ) ; }

Target:
public void testBaseResourceSetByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceSet resourceSet = com.android.ide.common.res2.ResourceSetTest.getBaseResourceSet ( ) ; verifyResourceExists ( resourceSet , "drawable/icon" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" , "plurals/plurals" ) ; }
Source:
public void test_parse_h_z_4DigitOffsetFromGMT ( ) throws java.lang.Exception { assertParse ( "h z" , "14 GMT-0100 " , new java.util.Date ( 54000000 ) , 0 , 11 ) ; assertParse ( "h z" , "14 GMT+0100 " , new java.util.Date ( 46800000 ) , 0 , 11 ) ; }

Target:
public void test_parse_h_z_4DigitOffsetFromGMT ( ) throws java.lang.Exception { assertParse ( "h z" , "14 GMT-0100 " , new java.util.Date ( 54000000 ) , 0 , 11 ) ; assertParse ( "h z" , "14 GMT+0100 " , new java.util.Date ( 46800000 ) , 0 , 11 ) ; pFormat.applyPattern ( "h z" ) ; try { pFormat.parse ( "14 GMT+24:00" ) ; fail ( ) ; } catch ( java.text.ParseException expected ) { } try { pFormat.parse ( "14 GMT-24:00" ) ; fail ( ) ; } catch ( java.text.ParseException expected ) { } }
Source:
public static java.lang.String asString ( com.android.tools.perflib.heap.Instance inst ) { if ( ! ( com.android.ahat.InstanceUtils.isInstanceOfClass ( inst , "java.lang.String" ) ) ) { return null ; } char [ ] value = com.android.ahat.InstanceUtils.getCharArrayField ( inst , "value" ) ; return value == null ? null : new java.lang.String ( value ) ; }

Target:
private static int getIntField ( com.android.tools.perflib.heap.Instance inst , java.lang.String fieldName , int def ) { java.lang.Integer value = com.android.ahat.InstanceUtils.getIntField ( inst , fieldName ) ; return value == null ? def : value ; }
Source:
public void unregisterMediaButtonEventReceiver ( android.content.ComponentName eventReceiver ) { if ( eventReceiver == null ) { return ; } android.content.Intent mediaButtonIntent = new android.content.Intent ( android.content.Intent.ACTION_MEDIA_BUTTON ) ; mediaButtonIntent.setComponent ( eventReceiver ) ; android.app.PendingIntent pi = android.app.PendingIntent.getBroadcast ( getContext ( ) , 0 , mediaButtonIntent , 0 ) ; unregisterMediaButtonIntent ( pi ) ; }

Target:
public void unregisterMediaButtonEventReceiver ( android.content.ComponentName eventReceiver ) { if ( eventReceiver == null ) { return ; } android.content.Intent mediaButtonIntent = new android.content.Intent ( android.content.Intent.ACTION_MEDIA_BUTTON ) ; mediaButtonIntent.setComponent ( eventReceiver ) ; android.app.PendingIntent pi = android.app.PendingIntent.getBroadcast ( mApplicationContext , 0 , mediaButtonIntent , 0 ) ; unregisterMediaButtonIntent ( pi ) ; }
Source:
public java.lang.String ipSecAllocateSecurityParameterIndex ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "addr" ) java.lang.String addr , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "requestedSpi" ) java.lang.Integer requestedSpi ) { java.net.InetAddress inetAddr = android.net.NetworkUtils.numericToInetAddress ( addr ) ; android.net.IpSecManager.SecurityParameterIndex spi = null ; if ( requestedSpi == null ) { spi = ipSecAllocateSpi ( inetAddr ) ; } else { spi = ipSecAllocateSpi ( inetAddr , requestedSpi.intValue ( ) ) ; } if ( spi == null ) return null ; java.lang.String id = getSpiId ( spi ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.mSpiHashMap.put ( id , spi ) ; return id ; }

Target:
public java.lang.String ipSecAllocateSecurityParameterIndex ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "addr" ) java.lang.String addr , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "requestedSpi" ) java.lang.Integer requestedSpi ) { java.net.InetAddress inetAddr = android.net.NetworkUtils.numericToInetAddress ( addr ) ; android.net.IpSecManager.SecurityParameterIndex spi = null ; if ( requestedSpi == null ) { spi = ipSecAllocateSpi ( inetAddr ) ; } else { spi = ipSecAllocateSpi ( inetAddr , requestedSpi.intValue ( ) ) ; } if ( spi == null ) return null ; java.lang.String id = getSpiId ( spi ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.sSpiHashMap.put ( id , spi ) ; return id ; }
Source:
final void put ( char [ ] src , int srcOffset , int charCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.CHAR , src.length , srcOffset , charCount ) ; this . block.pokeCharArray ( ( ( offset ) + ( position ) ) , src , srcOffset , charCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( char [ ] src , int srcOffset , int charCount ) { checkIsAccessible ( ) ; int byteCount = checkPutBounds ( SizeOf.CHAR , src.length , srcOffset , charCount ) ; this . block.pokeCharArray ( ( ( offset ) + ( position ) ) , src , srcOffset , charCount , order.needsSwap ) ; position += byteCount ; }
Source:
public boolean unplug ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "unplug(): device=" + device ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.unplug ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }

Target:
public boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; boolean result = false ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { result = service.reportError ( device , error ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }
Source:
private static byte [ ] getExpectedPlainText ( java.lang.String algorithm ) { if ( algorithm.equals ( "RSA/ECB/NOPADDING" ) ) { return libcore.javax.crypto.CipherTest.PKCS1_BLOCK_TYPE_00_PADDED_PLAIN_TEXT ; } return libcore.javax.crypto.CipherTest.ORIGINAL_PLAIN_TEXT ; }

Target:
private static boolean isUnsupportedForWrapping ( java.lang.String algorithm ) { if ( libcore.javax.crypto.CipherTest.isOnlyWrappingAlgorithm ( algorithm ) ) { return false ; } if ( algorithm.equals ( "RSA/ECB/NOPADDING" ) ) { return true ; } if ( algorithm.startsWith ( "AES" ) ) { return true ; } return false ; }
Source:
public static com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo create ( com.android.ide.common.rendering.api.ViewInfo root ) { if ( ( root.getCookie ( ) ) == null ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo rootView = com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo.createView ( null , root , 0 , 0 ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo.addKeyedSubtrees ( rootView , root , 0 , 0 ) ; return rootView ; } else { return com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo.addKeyedSubtrees ( null , root , 0 , 0 ) ; } }

Target:
public static com.android.util.Pair < com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo , java.util.List < org.eclipse.swt.graphics.Rectangle > > create ( com.android.ide.common.rendering.api.ViewInfo root ) { return new com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo.Builder ( ) . create ( root ) ; }
Source:
public java.lang.String getGroupIdLevel1 ( ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getGroupIdLevel1 ( mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getGroupIdLevel1 ( ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getGroupIdLevel1ForSubscriber ( getSubId ( ) , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
protected void onResume ( ) { super . onResume ( ) ; if ( mHasIntentLaunched ) { mHasIntentLaunched = false ; populateContactAndAboutCard ( mCachedCp2DataCardModel , false ) ; } if ( ( mCachedCp2DataCardModel ) != null ) { destroyInteractionLoaders ( ) ; startInteractionLoaders ( mCachedCp2DataCardModel ) ; } }

Target:
protected void onResume ( ) { super . onResume ( ) ; if ( mHasIntentLaunched ) { mHasIntentLaunched = false ; populateContactAndAboutCard ( mCachedCp2DataCardModel , false ) ; } if ( ( mCachedCp2DataCardModel ) != null ) { destroyInteractionLoaders ( ) ; startInteractionLoaders ( mCachedCp2DataCardModel ) ; } maybeShowProgressDialog ( ) ; }
Source:
private void makeOptionsObjects ( ) { cfOptions = new com.android.dx.dex.cf.CfOptions ( ) ; cfOptions.positionInfo = positionInfo ; cfOptions.localInfo = localInfo ; cfOptions.strictNameCheck = strictNameCheck ; cfOptions.optimize = optimize ; cfOptions.optimizeListFile = optimizeListFile ; cfOptions.dontOptimizeListFile = dontOptimizeListFile ; cfOptions.statistics = statistics ; if ( warnings ) { cfOptions.warn = com.android.dx.command.DxConsole.err ; } else { cfOptions.warn = com.android.dx.command.DxConsole.noop ; } dexOptions = new com.android.dx.dex.DexOptions ( ) ; dexOptions.forceJumbo = forceJumbo ; }

Target:
private void makeOptionsObjects ( com.android.dx.command.dexer.DxContext context ) { cfOptions = new com.android.dx.dex.cf.CfOptions ( ) ; cfOptions.positionInfo = positionInfo ; cfOptions.localInfo = localInfo ; cfOptions.strictNameCheck = strictNameCheck ; cfOptions.optimize = optimize ; cfOptions.optimizeListFile = optimizeListFile ; cfOptions.dontOptimizeListFile = dontOptimizeListFile ; cfOptions.statistics = statistics ; if ( warnings ) { cfOptions.warn = context.err ; } else { cfOptions.warn = context.noop ; } dexOptions = new com.android.dx.dex.DexOptions ( ) ; dexOptions.forceJumbo = forceJumbo ; }
Source:
public void testRunNormalInputOnWindows ( ) throws com.android.tradefed.device.DeviceNotAvailableException , java.lang.IllegalArgumentException { java.lang.String originalName = java.lang.System.getProperty ( VtsMultiDeviceTest.OS_NAME ) ; java.lang.System.setProperty ( VtsMultiDeviceTest.OS_NAME , VtsMultiDeviceTest.WINDOWS ) ; mTest.setDevice ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockDevice ( ) ) ; mTest.setRunUtil ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockRunUtil ( "where" , "python.exe" , CommandStatus.SUCCESS ) ) ; try { mTest.run ( mMockInvocationListener ) ; } finally { java.lang.System.setProperty ( VtsMultiDeviceTest.OS_NAME , originalName ) ; } }

Target:
public void testRunNormalInputOnWindows ( ) throws com.android.tradefed.device.DeviceNotAvailableException , java.lang.IllegalArgumentException { mProcessHelper = com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockProcessHelper ( CommandStatus.SUCCESS ) ; mPython = "python.exe" ; java.lang.String originalName = java.lang.System.getProperty ( VtsMultiDeviceTest.OS_NAME ) ; java.lang.System.setProperty ( VtsMultiDeviceTest.OS_NAME , VtsMultiDeviceTest.WINDOWS ) ; mTest.setDevice ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockDevice ( ) ) ; mTest.setRunUtil ( createMockRunUtil ( "where" ) ) ; try { mTest.run ( mMockInvocationListener ) ; } finally { java.lang.System.setProperty ( VtsMultiDeviceTest.OS_NAME , originalName ) ; } }
Source:
private libcore.util.ZoneInfo createZoneInfo ( java.lang.String name , int [ ] [ ] transitions , int [ ] [ ] types , long currentTimeMillis ) throws java.lang.Exception { libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder builder = new libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) ; builder.setTransitionsAndTypes ( transitions , types ) ; return createZoneInfo ( name , currentTimeMillis , builder.build ( ) ) ; }

Target:
private libcore.util.ZoneInfo createZoneInfo ( java.lang.String name , int [ ] [ ] transitions , int [ ] [ ] types , long currentTimeMillis ) throws java.lang.Exception { libcore.tzdata.testing.ZoneInfoTestHelper.ZoneInfoDataBuilder builder = new libcore.tzdata.testing.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) ; builder.setTransitionsAndTypes ( transitions , types ) ; return createZoneInfo ( name , currentTimeMillis , builder.build ( ) ) ; }
Source:
public void resetApplicationPreferences ( int userId ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.SET_PREFERRED_APPLICATIONS , null ) ; synchronized ( mPackages ) { final long identity = android.os.Binder.clearCallingIdentity ( ) ; try { clearPackagePreferredActivitiesLPw ( null , userId ) ; mSettings.applyDefaultPreferredAppsLPw ( this , userId ) ; applyFactoryDefaultBrowserLPw ( userId ) ; clearIntentFilterVerificationsLPw ( userId ) ; primeDomainVerificationsLPw ( userId ) ; resetUserChangesToRuntimePermissionsAndFlagsLPw ( userId ) ; scheduleWritePackageRestrictionsLocked ( userId ) ; } finally { android.os.Binder.restoreCallingIdentity ( identity ) ; } } }

Target:
public void resetApplicationPreferences ( int userId ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.SET_PREFERRED_APPLICATIONS , null ) ; final long identity = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mPackages ) { clearPackagePreferredActivitiesLPw ( null , userId ) ; mSettings.applyDefaultPreferredAppsLPw ( this , userId ) ; applyFactoryDefaultBrowserLPw ( userId ) ; clearIntentFilterVerificationsLPw ( userId ) ; primeDomainVerificationsLPw ( userId ) ; resetUserChangesToRuntimePermissionsAndFlagsLPw ( userId ) ; scheduleWritePackageRestrictionsLocked ( userId ) ; } resetNetworkPolicies ( userId ) ; } finally { android.os.Binder.restoreCallingIdentity ( identity ) ; } }