auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static org.jetbrains.plugins.terminal.ActionToolbar createToolbar ( @ org.jetbrains.annotations.Nullable final org.jetbrains.plugins.terminal.LocalTerminalDirectRunner terminalRunner , final com.jediterm.terminal.ui.TerminalWidget terminal ) { org.jetbrains.plugins.terminal.DefaultActionGroup group = new org.jetbrains.plugins.terminal.DefaultActionGroup ( ) ; if ( terminalRunner != null ) { group.add ( new org.jetbrains.plugins.terminal.TerminalView.NewSession ( terminalRunner , terminal ) ) ; } return org.jetbrains.plugins.terminal.ActionManager.getInstance ( ) . createActionToolbar ( ActionPlaces.UNKNOWN , group , false ) ; }

Target:
private org.jetbrains.plugins.terminal.ActionToolbar createToolbar ( @ org.jetbrains.annotations.Nullable final org.jetbrains.plugins.terminal.LocalTerminalDirectRunner terminalRunner , final org.jetbrains.plugins.terminal.JBTabbedTerminalWidget terminal , com.intellij.openapi.wm.ToolWindow toolWindow ) { org.jetbrains.plugins.terminal.DefaultActionGroup group = new org.jetbrains.plugins.terminal.DefaultActionGroup ( ) ; if ( terminalRunner != null ) { group.add ( new org.jetbrains.plugins.terminal.TerminalView.NewSession ( terminalRunner , terminal ) ) ; group.add ( new org.jetbrains.plugins.terminal.TerminalView.CloseSession ( terminal , toolWindow ) ) ; } return org.jetbrains.plugins.terminal.ActionManager.getInstance ( ) . createActionToolbar ( ActionPlaces.UNKNOWN , group , false ) ; }
Source:
public void testAesCbcHmacMd5Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesGcm96Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.AEAD_KEY , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }
Source:
private void enforceMediaPermissions ( android.content.ComponentName compName , int pid , int uid , int resolvedUserId ) { if ( ( ( getContext ( ) . checkPermission ( android.Manifest.permission.MEDIA_CONTENT_CONTROL , pid , uid ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) && ( ! ( isEnabledNotificationListener ( compName , android.os.UserHandle.getUserId ( uid ) , resolvedUserId ) ) ) ) { throw new java.lang.SecurityException ( "Missing permission to control media." ) ; } }

Target:
private void enforceMediaPermissions ( android.content.ComponentName compName , int pid , int uid , int resolvedUserId ) { if ( isCurrentVolumeController ( uid ) ) return ; if ( ( ( getContext ( ) . checkPermission ( android.Manifest.permission.MEDIA_CONTENT_CONTROL , pid , uid ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) && ( ! ( isEnabledNotificationListener ( compName , android.os.UserHandle.getUserId ( uid ) , resolvedUserId ) ) ) ) { throw new java.lang.SecurityException ( "Missing permission to control media." ) ; } }
Source:
private void addRequest ( com.android.internal.telephony.RILRequest rr ) { acquireWakeLock ( rr , com.android.internal.telephony.RIL.FOR_WAKELOCK ) ; synchronized ( mRequestList ) { rr.mStartTimeMs = android.os.SystemClock.elapsedRealtime ( ) ; mRequestList.append ( rr.mSerial , rr ) ; } }

Target:
public void getIccCardStatus ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_GET_SIM_STATUS , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getIccCardStatus ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getIccCardStatus" , e ) ; } } }
Source:
public void visitMethodInsn ( final int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) { switch ( opcode ) { case org.objectweb.asm.Opcodes.INVOKESPECIAL : invokespecial ( owner , name , desc ) ; break ; case org.objectweb.asm.Opcodes.INVOKEVIRTUAL : invokevirtual ( owner , name , desc ) ; break ; case org.objectweb.asm.Opcodes.INVOKESTATIC : invokestatic ( owner , name , desc ) ; break ; case org.objectweb.asm.Opcodes.INVOKEINTERFACE : invokeinterface ( owner , name , desc ) ; break ; default : throw new java.lang.IllegalArgumentException ( ) ; } }

Target:
public void invokespecial ( final java.lang.String owner , final java.lang.String name , final java.lang.String desc , final boolean itf ) { if ( ( api ) < ( org.objectweb.asm.Opcodes.ASM5 ) ) { if ( itf ) { throw new java.lang.IllegalArgumentException ( "INVOKESPECIAL on interfaces require ASM 5" ) ; } invokespecial ( owner , name , desc ) ; return ; } mv.visitMethodInsn ( Opcodes.INVOKESPECIAL , owner , name , desc , itf ) ; }
Source:
private void invokeCompleteCallback ( ) { if ( ( mCompleteCallback ) != null ) { try { mCompleteCallback.send ( android.os.Message.obtain ( null , BeamManager.MSG_BEAM_COMPLETE ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.nfc.beam.BeamSendService.TAG , "failed to invoke Beam complete callback" , e ) ; } } }

Target:
private void invokeCompleteCallback ( boolean success ) { if ( ( mCompleteCallback ) != null ) { try { android.os.Message msg = android.os.Message.obtain ( null , BeamManager.MSG_BEAM_COMPLETE ) ; msg.arg1 = ( success ) ? 1 : 0 ; mCompleteCallback.send ( msg ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.nfc.beam.BeamSendService.TAG , "failed to invoke Beam complete callback" , e ) ; } } }
Source:
public void testPullNonPullableExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; java.lang.Thread.sleep ( com.android.server.telecom.tests.TEST_TIMEOUT ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.never ( ) ) . pullExternalCall ( ids.mConnectionId ) ; }

Target:
public void testPullExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mCapabilities = android.telecom.Connection.CAPABILITY_CAN_PULL_CALL ; mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . pullExternalCall ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.any ( ) ) ; }
Source:
public void verifyModifyRetrievedConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = "test1" ; mProvider = new com.android.server.wifi.hotspot2.PasspointProvider ( config ) ; verifyInstalledConfig ( config , true ) ; android.net.wifi.hotspot2.PasspointConfiguration retrievedConfig = mProvider.getConfig ( ) ; retrievedConfig.homeSp.fqdn = "test2" ; verifyInstalledConfig ( retrievedConfig , false ) ; }

Target:
public void verifyModifyOriginalConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = "test1" ; mProvider = createProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.homeSp.fqdn = "test2" ; verifyInstalledConfig ( config , false ) ; }
Source:
protected com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode createModel ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode parent , org.w3c.dom.Element element ) { java.util.List < org.w3c.dom.Element > children = com.android.ide.eclipse.adt.internal.editors.layout.refactoring.RelativeLayoutConversionHelper.getChildren ( element ) ; java.lang.String fqcn = ( com.android.ide.common.layout.LayoutConstants.ANDROID_WIDGET_PREFIX ) + ( element.getTagName ( ) ) ; boolean hasChildren = ( children.size ( ) ) > 0 ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode node = createNode ( parent , fqcn , hasChildren ) ; node.setXmlNode ( element ) ; for ( org.w3c.dom.Element child : children ) { createModel ( node , child ) ; } return node ; }

Target:
protected com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode createModel ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode parent , org.w3c.dom.Element element ) { java.util.List < org.w3c.dom.Element > children = com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.getChildren ( element ) ; java.lang.String fqcn = ( com.android.ide.common.layout.LayoutConstants.ANDROID_WIDGET_PREFIX ) + ( element.getTagName ( ) ) ; boolean hasChildren = ( children.size ( ) ) > 0 ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode node = createNode ( parent , fqcn , hasChildren ) ; node.setXmlNode ( element ) ; for ( org.w3c.dom.Element child : children ) { createModel ( node , child ) ; } return node ; }
Source:
private void updateVoicemailNotifications ( ) { android.content.Intent serviceIntent = new android.content.Intent ( getActivity ( ) , com.android.dialer.calllog.CallLogNotificationsService.class ) ; serviceIntent.setAction ( CallLogNotificationsService.ACTION_UPDATE_NOTIFICATIONS ) ; getActivity ( ) . startService ( serviceIntent ) ; }

Target:
private void updateOnTransition ( boolean onEntry ) { if ( ( ( mKeyguardManager ) != null ) && ( ! ( mKeyguardManager.inKeyguardRestrictedInputMode ( ) ) ) ) { mCallLogQueryHandler.markNewCallsAsOld ( ) ; if ( ! onEntry ) { mCallLogQueryHandler.markMissedCallsAsRead ( ) ; } com.android.dialer.calllog.CallLogNotificationsHelper.removeMissedCallNotifications ( ) ; com.android.dialer.calllog.CallLogNotificationsHelper.updateVoicemailNotifications ( getActivity ( ) ) ; } }
Source:
public void dataCallListChanged ( int indicationType , java.util.ArrayList < android.hardware.radio.V1_0.SetupDataCallResult > dcList ) { mRil.processIndication ( indicationType ) ; java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > response = com.android.internal.telephony.RIL.convertHalDcList ( dcList ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED , response ) ; mRil.mDataNetworkStateRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }

Target:
public void dataCallListChanged ( int indicationType , java.util.ArrayList < android.hardware.radio.V1_0.SetupDataCallResult > dcList ) { mRil.processIndication ( indicationType ) ; java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > response = com.android.internal.telephony.RIL.convertHalDcList ( dcList ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED , response ) ; mRil.mDataCallListChangedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public void testCookiesWithoutLeadingPeriod ( ) throws java.lang.Exception { java.net.CookieManager cm = new java.net.CookieManager ( createCookieStore ( ) , null ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > responseHeaders = new java.util.HashMap < > ( ) ; java.util.List < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( ) ; list.add ( "a=b; domain=chargepoint.com" ) ; responseHeaders.put ( "Set-Cookie" , list ) ; java.net.URI uri = new java.net.URI ( "http://services.chargepoint.com" ) ; cm.put ( uri , responseHeaders ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > cookies = cm.get ( new java.net.URI ( "https://webservices.chargepoint.com/foo" ) , responseHeaders ) ; assertEquals ( 0 , cookies.size ( ) ) ; }

Target:
public void testCookiesWithoutLeadingPeriod ( ) throws java.lang.Exception { java.net.CookieManager cm = new java.net.CookieManager ( createCookieStore ( ) , null ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > responseHeaders = java.util.Collections.singletonMap ( "Set-Cookie" , java.util.Collections.singletonList ( "a=b; domain=chargepoint.com" ) ) ; java.net.URI uri = new java.net.URI ( "http://services.chargepoint.com" ) ; cm.put ( uri , responseHeaders ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > cookies = cm.get ( new java.net.URI ( "https://webservices.chargepoint.com/foo" ) , responseHeaders ) ; assertEquals ( 0 , cookies.size ( ) ) ; }
Source:
public void allowLowRssiIfDataIsMoving ( ) throws java.lang.Exception { mWifiInfo.setRssi ( ( - 80 ) ) ; mWifiInfo.setLinkSpeed ( 6 ) ; mWifiInfo.txSuccessRate = 5.1 ; mWifiInfo.rxSuccessRate = 5.1 ; for ( int i = 0 ; i < 10 ; i ++ ) { mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , 0 , mWifiMetrics ) ; } org.junit.Assert.assertTrue ( mWifiScoreReport.isLastReportValid ( ) ) ; int score = fishScoreFromReportString ( mWifiScoreReport.getLastReport ( ) ) ; org.junit.Assert.assertTrue ( ( score > ( com.android.server.wifi.WifiScoreReportTest.CELLULAR_THRESHOLD_SCORE ) ) ) ; }

Target:
public void allowLowRssiIfDataIsMoving ( ) throws java.lang.Exception { mWifiInfo.setRssi ( ( - 80 ) ) ; mWifiInfo.setLinkSpeed ( 6 ) ; mWifiInfo.txSuccessRate = 5.1 ; mWifiInfo.rxSuccessRate = 5.1 ; for ( int i = 0 ; i < 10 ; i ++ ) { mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , 0 , mWifiMetrics ) ; } int score = mWifiInfo.score ; org.junit.Assert.assertTrue ( ( score > ( com.android.server.wifi.WifiScoreReportTest.CELLULAR_THRESHOLD_SCORE ) ) ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { synchronized ( this ) { if ( ( ( mRS ) == null ) || ( ( mOutPixelsAllocation ) == null ) ) { return ; } if ( ( mOutDisplayAllocation ) != ( mOutPixelsAllocation ) ) { mOutDisplayAllocation.copyFrom ( mOutPixelsAllocation ) ; } mOutDisplayAllocation.ioSend ( ) ; mDisplayView.invalidate ( ) ; } }

Target:
public void setSurface ( android.view.Surface s ) { mOutSurface = s ; update ( ) ; }
Source:
public boolean connect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.a2dpsink.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) || ( connectionState == ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mStateMachine.sendMessage ( A2dpSinkStateMachine.CONNECT , device ) ; return true ; }

Target:
public boolean connect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.a2dpsink.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) || ( connectionState == ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } if ( ( getPriority ( device ) ) == ( android.bluetooth.BluetoothProfile.PRIORITY_OFF ) ) { return false ; } mStateMachine.sendMessage ( A2dpSinkStateMachine.CONNECT , device ) ; return true ; }
Source:
public boolean shouldOverrideKeyEvent ( android.view.KeyEvent event ) { if ( event.isSystem ( ) ) return true ; org.chromium.content.common.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "shouldOverrideKeyEvent" ) ; boolean result = mWebViewClient.shouldOverrideKeyEvent ( mWebView , event ) ; org.chromium.content.common.TraceEvent.end ( ) ; return result ; }

Target:
public boolean shouldOverrideKeyEvent ( android.view.KeyEvent event ) { if ( event.isSystem ( ) ) return true ; org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "shouldOverrideKeyEvent" ) ; boolean result = mWebViewClient.shouldOverrideKeyEvent ( mWebView , event ) ; org.chromium.base.TraceEvent.end ( ) ; return result ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "<SdkSourceProperties " ) ; synchronized ( com.android.sdklib.internal.repository.SdkSourceProperties.sSourcesProperties ) { for ( java.util.Map.Entry < java.lang.Object , java.lang.Object > entry : com.android.sdklib.internal.repository.SdkSourceProperties.sSourcesProperties.entrySet ( ) ) { sb.append ( '\n' ) . append ( entry.getKey ( ) ) . append ( " = " ) . append ( entry.getValue ( ) ) ; } } sb.append ( "\n>" ) ; return sb.toString ( ) ; }

Target:
public int compare ( java.lang.Object o1 , java.lang.Object o2 ) { return o1.toString ( ) . compareTo ( o2.toString ( ) ) ; }
Source:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVDir outputVDir , int dexCount ) throws com.android.jack.JackIOException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( DexFileWriter.DEX_FILE_EXTENSION ) ; } try { return outputVDir.createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( java.io.IOException e ) { throw new com.android.jack.JackIOException ( ( ( ( "Cannot create dex file '" + dexName ) + "' in " ) + outputVDir ) , e ) ; } }

Target:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVDir outputVDir , int dexCount ) throws com.android.jack.backend.dex.DexWritingException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( BinaryKind.DEX.getFileExtension ( ) ) ; } try { return outputVDir.createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }
Source:
public void testInstall_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle1 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "002" ) ; assertTrue ( installer.install ( bundle1.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; libcore.tzdata.update2.TimeZoneBundle bundle2 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.OLDER_RULES_VERSION , "001" ) ; assertFalse ( installer.install ( bundle2.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; }

Target:
public void testInstall_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle1 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( bundle1.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; libcore.tzdata.update2.TimeZoneBundle bundle2 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.installWithErrorCode ( bundle2.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; }
Source:
public static void computeDot ( android.renderscript.cts.TestDot.ArgumentsFloatNFloatNFloat args ) { android.renderscript.cts.Floaty sum = new android.renderscript.cts.Floaty ( 0.0F ) ; for ( int i = 0 ; i < ( args.inLhs.length ) ; i ++ ) { android.renderscript.cts.Floaty a = new android.renderscript.cts.Floaty ( args.inLhs [ i ] ) ; android.renderscript.cts.Floaty b = new android.renderscript.cts.Floaty ( args.inRhs [ i ] ) ; sum.add ( android.renderscript.cts.Floaty.multiply ( a , b ) ) ; } args.out = sum ; }

Target:
public static void computeDot ( android.renderscript.cts.TestDot.ArgumentsFloatNFloatNFloat args ) { android.renderscript.cts.Floaty sum = new android.renderscript.cts.Floaty ( 0.0F ) ; for ( int i = 0 ; i < ( args.inLhs.length ) ; i ++ ) { android.renderscript.cts.Floaty a = new android.renderscript.cts.Floaty ( args.inLhs [ i ] ) ; android.renderscript.cts.Floaty b = new android.renderscript.cts.Floaty ( args.inRhs [ i ] ) ; sum.add ( android.renderscript.cts.Floaty.multiply ( a , b ) ) ; } args.out = sum ; args.out.setMinimumError ( 1 , 4 ) ; }
Source:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }

Target:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }
Source:
public void testLibProguard ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libProguard" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.build.gradle.BasePlugin.FD_OUTPUTS ) ) + "/proguard/release" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int proguardInt -> a" } ) ; }

Target:
public void testLibProguard ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libProguard" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/proguard/release" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int proguardInt -> a" } ) ; }
Source:
public void testDeserialize ( ) { java.lang.String json = "{\"startLine\":11,\"startColumn\":22,\"startOffset\":33," + "\"endLine\":66,\"endColumn\":77,\"endOffset\":88}" ; com.android.ide.common.blame.SourcePosition range = mGson.fromJson ( json , com.android.ide.common.blame.SourcePosition.class ) ; org.junit.Assert.assertEquals ( range , new com.android.ide.common.blame.SourcePosition ( 11 , 22 , 33 , 66 , 77 , 88 ) ) ; }

Target:
public void testDeserialize ( ) { java.lang.String json = "{\"startLine\":11,\"startColumn\":22,\"startOffset\":33," + ( "\"endLine\":66,\"endColumn\":77,\"endOffset\":88, " + "\"invalid\":[\"ignored\"]}" ) ; com.android.ide.common.blame.SourcePosition range = mGson.fromJson ( json , com.android.ide.common.blame.SourcePosition.class ) ; org.junit.Assert.assertEquals ( range , new com.android.ide.common.blame.SourcePosition ( 11 , 22 , 33 , 66 , 77 , 88 ) ) ; }
Source:
public int cloneUserData ( int srcUserId , int targetUserId , boolean copyData ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "cloneuserdata" ) ; builder.append ( ' ' ) ; builder.append ( srcUserId ) ; builder.append ( ' ' ) ; builder.append ( targetUserId ) ; builder.append ( ' ' ) ; builder.append ( ( copyData ? '1' : '0' ) ) ; return execute ( builder.toString ( ) ) ; }

Target:
public int idmap ( java.lang.String targetApkPath , java.lang.String overlayApkPath , int uid ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "idmap" ) ; builder.append ( ' ' ) ; builder.append ( targetApkPath ) ; builder.append ( ' ' ) ; builder.append ( overlayApkPath ) ; builder.append ( ' ' ) ; builder.append ( uid ) ; return execute ( builder.toString ( ) ) ; }
Source:
void visit ( java.lang.Package pkg ) { if ( ( ( mFindMaxApi ) && ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformPackage ) ) && ( ! ( pkg.isLocal ( ) ) ) ) { com.android.sdklib.internal.repository.packages.PlatformPackage pp = ( ( com.android.sdklib.internal.repository.packages.PlatformPackage ) ( pkg ) ) ; com.android.sdklib.AndroidVersion v = pp.getVersion ( ) ; if ( ! ( v.isPreview ( ) ) ) { int api = v.getApiLevel ( ) ; if ( api > ( mApiLevel ) ) { mApiLevel = api ; } } } }

Target:
void visit ( java.lang.Package pkg ) { if ( ( ( mFindMaxApi ) && ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformPackage ) ) && ( ! ( pkg.isLocal ( ) ) ) ) { com.android.sdklib.internal.repository.packages.PlatformPackage pp = ( ( com.android.sdklib.internal.repository.packages.PlatformPackage ) ( pkg ) ) ; com.android.sdklib.AndroidVersion v = pp.getAndroidVersion ( ) ; if ( ! ( v.isPreview ( ) ) ) { int api = v.getApiLevel ( ) ; if ( api > ( mApiLevel ) ) { mApiLevel = api ; } } } }
Source:
private static java.io.File getWrittenResources ( ) throws com.android.ide.common.res2.MergingException , java.io.IOException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; com.android.ide.common.res2.MergedResourceWriter writer = new com.android.ide.common.res2.MergedResourceWriter ( folder , null ) ; resourceMerger.mergeData ( writer , false ) ; return folder ; }

Target:
private java.io.File getWrittenResources ( ) throws com.android.ide.common.res2.MergingException , java.io.IOException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; com.android.ide.common.res2.MergedResourceWriter writer = new com.android.ide.common.res2.MergedResourceWriter ( folder , mPngCruncher , false , false ) ; resourceMerger.mergeData ( writer , false ) ; return folder ; }
Source:
static void deadInduction ( ) { int dead = 0 ; for ( int i = 0 ; i < ( Main.a.length ) ; i ++ ) { Main.a [ i ] = 1 ; dead += 5 ; } }

Target:
static void deadInduction ( ) { int dead = 0 ; for ( int i = 0 ; i < ( Main.a.length ) ; i ++ ) { Main.a [ i ] = ( Main.novec [ ( 2 * i ) ] ) + 1 ; dead += 5 ; } }
Source:
public void testEnums ( ) throws java.lang.Exception { org.json.JSONArray a1 = new org.json.JSONArray ( java.lang.annotation.RetentionPolicy.values ( ) ) ; assertEquals ( "[\"SOURCE\",\"CLASS\",\"RUNTIME\"]" , a1.toString ( ) ) ; org.json.JSONArray a2 = new org.json.JSONArray ( org.json.JSONArrayTest.MyEnum.values ( ) ) ; assertEquals ( "[null,null,null]" , a2.toString ( ) ) ; }

Target:
public void testEnums ( ) throws java.lang.Exception { org.json.JSONArray a1 = new org.json.JSONArray ( java.lang.annotation.RetentionPolicy.values ( ) ) ; assertEquals ( "[\"SOURCE\",\"CLASS\",\"RUNTIME\"]" , a1.toString ( ) ) ; org.json.JSONArray a2 = new org.json.JSONArray ( libcore.org.json.JSONArrayTest.MyEnum.values ( ) ) ; assertEquals ( "[null,null,null]" , a2.toString ( ) ) ; }
Source:
public void iccOpenLogicalChannel ( java.lang.String aid , int p2 , android.os.Message response ) { loglocal ( ( ( ( ( ( ( ( "iccOpenLogicalChannel: " + aid ) + " , " ) + p2 ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( aid , p2 , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }

Target:
public void iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String pathID , android.os.Message response ) { mCi.iccIO ( command , fileID , pathID , p1 , p2 , p3 , null , null , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_SIM_IO_DONE , response ) ) ; }
Source:
public void testRegistrationConfigConstructorsEqual ( ) { android.telephony.ims.internal.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.internal.stub.ImsFeatureConfiguration ( new int [ ] { android.telephony.ims.internal.feature.ImsFeature.FEATURE_MMTEL , android.telephony.ims.internal.feature.ImsFeature.FEATURE_RCS } ) ; android.telephony.ims.internal.stub.ImsFeatureConfiguration testConfig2 = new android.telephony.ims.internal.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_RCS ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . build ( ) ; junit.framework.Assert.assertEquals ( testConfig , testConfig2 ) ; }

Target:
public void testRegistrationConfigConstructorsEqual ( ) { android.telephony.ims.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.stub.ImsFeatureConfiguration ( new int [ ] { android.telephony.ims.feature.ImsFeature.FEATURE_MMTEL , android.telephony.ims.feature.ImsFeature.FEATURE_RCS } ) ; android.telephony.ims.stub.ImsFeatureConfiguration testConfig2 = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_RCS ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . build ( ) ; junit.framework.Assert.assertEquals ( testConfig , testConfig2 ) ; }
Source:
public com.google.common.base.Optional < java.lang.String > formatToE164 ( com.android.dialer.DialerPhoneNumber number ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; if ( number.hasDialerInternalPhoneNumber ( ) ) { return com.google.common.base.Optional.of ( phoneNumberUtil.format ( com.android.dialer.phonenumberproto.Converter.protoToPojo ( number.getDialerInternalPhoneNumber ( ) ) , PhoneNumberFormat.E164 ) ) ; } return com.google.common.base.Optional.absent ( ) ; }

Target:
public com.google.common.base.Optional < java.lang.String > formatToE164 ( com.android.dialer.DialerPhoneNumber number ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; if ( number.hasDialerInternalPhoneNumber ( ) ) { com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = com.android.dialer.phonenumberproto.Converter.protoToPojo ( number.getDialerInternalPhoneNumber ( ) ) ; if ( phoneNumberUtil.isValidNumber ( phoneNumber ) ) { return com.google.common.base.Optional.fromNullable ( phoneNumberUtil.format ( phoneNumber , PhoneNumberFormat.E164 ) ) ; } } return com.google.common.base.Optional.absent ( ) ; }
Source:
public void crunchPng ( java.io.File from , java.io.File to ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { java.lang.String [ ] command = new java.lang.String [ ] { mAaptLocation , "s" , "-i" , from.getAbsolutePath ( ) , "-o" , to.getAbsolutePath ( ) } ; mCommandLineRunner.runCmdLine ( command ) ; }

Target:
public void crunchPng ( java.io.File from , java.io.File to , @ com.android.annotations.Nullable java.util.Map < java.lang.String , java.lang.String > envVariableMap ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { java.lang.String [ ] command = new java.lang.String [ ] { mAaptLocation , "s" , "-i" , from.getAbsolutePath ( ) , "-o" , to.getAbsolutePath ( ) } ; mCommandLineRunner.runCmdLine ( command , envVariableMap ) ; }
Source:
private void closeSearch ( boolean animate ) { com.android.dialer.common.Assert.checkArgument ( isSearchVisible ( ) ) ; if ( isDialpadVisible ( ) ) { hideDialpad ( animate , true ) ; } else if ( ! ( fab.isShown ( ) ) ) { fab.show ( ) ; } showBottomNav ( ) ; toolbar.collapse ( animate ) ; mainActivity.getFragmentManager ( ) . beginTransaction ( ) . remove ( getSearchFragment ( ) ) . commit ( ) ; }

Target:
private void closeSearch ( boolean animate ) { com.android.dialer.common.Assert.checkArgument ( isSearchVisible ( ) ) ; if ( isDialpadVisible ( ) ) { hideDialpad ( animate , true ) ; } else if ( ! ( fab.isShown ( ) ) ) { fab.show ( ) ; } showBottomNav ( ) ; toolbar.collapse ( animate ) ; mainActivity.getFragmentManager ( ) . beginTransaction ( ) . remove ( getSearchFragment ( ) ) . commit ( ) ; getDialpadFragment ( ) . clearDialpad ( ) ; }
Source:
public int getState ( ) { if ( android.bluetooth.BluetoothSap.VDBG ) android.bluetooth.BluetoothSap.log ( "getState()" ) ; if ( ( mService ) != null ) { try { return mService.getState ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothSap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothSap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothSap.DBG ) android.bluetooth.BluetoothSap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return android.bluetooth.BluetoothSap.STATE_ERROR ; }

Target:
public int getState ( ) { if ( android.bluetooth.BluetoothSap.VDBG ) android.bluetooth.BluetoothSap.log ( "getState()" ) ; final android.bluetooth.IBluetoothSap service = mService ; if ( service != null ) { try { return service.getState ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothSap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothSap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothSap.DBG ) android.bluetooth.BluetoothSap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return android.bluetooth.BluetoothSap.STATE_ERROR ; }
Source:
public java.lang.String getTestedApplicationId ( ) { if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { assert ( mTestedConfig ) != null ; if ( ( mTestedConfig.mType ) == ( com.android.builder.core.VariantConfiguration.Type.LIBRARY ) ) { return getApplicationId ( ) ; } else { return mTestedConfig.getApplicationId ( ) ; } } return null ; }

Target:
public java.lang.String getOriginalApplicationId ( ) { if ( mType.isForTesting ( ) ) { return getApplicationId ( ) ; } return getPackageFromManifest ( ) ; }
Source:
public void onClick ( android.view.View v ) { com.android.dialer.common.LogUtil.i ( "VoicemailTosMessageCreator.getPromoMessage" , "acknowledge clicked" ) ; recordTosAcceptance ( ) ; recordFeatureAcknowledgement ( ) ; statusReader.refresh ( ) ; }

Target:
public void onClick ( android.view.View v ) { com.android.dialer.common.LogUtil.i ( "VoicemailTosMessageCreator.getPromoMessage" , "acknowledge clicked" ) ; if ( isVoicemailTranscriptionAvailable ( ) ) { com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . setVoicemailTranscriptionEnabled ( context , status.getPhoneAccountHandle ( ) , true ) ; } recordTosAcceptance ( ) ; recordFeatureAcknowledgement ( ) ; statusReader.refresh ( ) ; }
Source:
public java.lang.Object getCategoryKey ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.IAndroidVersionProvider ) { return ( ( com.android.sdklib.internal.repository.packages.IAndroidVersionProvider ) ( pkg ) ) . getAndroidVersion ( ) ; } else if ( ( pkg instanceof com.android.sdklib.internal.repository.packages.ToolPackage ) || ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformToolPackage ) ) { if ( pkg.getRevision ( ) . isPreview ( ) ) { return PkgCategoryApi.KEY_TOOLS_PREVIEW ; } else { return PkgCategoryApi.KEY_TOOLS ; } } else { return PkgCategoryApi.KEY_EXTRA ; } }

Target:
public java.lang.Object getCategoryKey ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.IAndroidVersionProvider ) { return ( ( com.android.sdklib.internal.repository.packages.IAndroidVersionProvider ) ( pkg ) ) . getAndroidVersion ( ) ; } else if ( ( ( pkg instanceof com.android.sdklib.internal.repository.packages.ToolPackage ) || ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformToolPackage ) ) || ( pkg instanceof com.android.sdklib.internal.repository.packages.BuildToolPackage ) ) { if ( pkg.getRevision ( ) . isPreview ( ) ) { return PkgCategoryApi.KEY_TOOLS_PREVIEW ; } else { return PkgCategoryApi.KEY_TOOLS ; } } else { return PkgCategoryApi.KEY_EXTRA ; } }
Source:
private int readHalf ( long offset ) throws java.io.IOException { mFile.seek ( offset ) ; mFile.readFully ( mBuffer , 0 , mWordSize ) ; final int answer ; if ( ( mEndian ) == ( android.security.cts.ReadElf.ELFDATA2LSB ) ) { answer = ( ( mBuffer [ 1 ] ) << 8 ) | ( mBuffer [ 0 ] ) ; } else { answer = ( ( mBuffer [ 0 ] ) << 8 ) | ( mBuffer [ 1 ] ) ; } return answer ; }

Target:
private int readHalf ( long offset ) throws java.io.IOException { mFile.seek ( offset ) ; mFile.readFully ( mBuffer , 0 , mWordSize ) ; final int answer ; if ( ( mEndian ) == ( android.os.cts.ReadElf.ELFDATA2LSB ) ) { answer = ( ( mBuffer [ 1 ] ) << 8 ) | ( mBuffer [ 0 ] ) ; } else { answer = ( ( mBuffer [ 0 ] ) << 8 ) | ( mBuffer [ 1 ] ) ; } return answer ; }
Source:
protected static void loadLinkerJniLibrary ( ) { java.lang.String libName = ( "lib" + ( org.chromium.base.library_loader.Linker.LINKER_JNI_LIBRARY ) ) + ".so" ; if ( org.chromium.base.library_loader.Linker.DEBUG ) { org.chromium.base.Log.i ( org.chromium.base.library_loader.Linker.TAG , ( "Loading " + libName ) ) ; } java.lang.System.loadLibrary ( org.chromium.base.library_loader.Linker.LINKER_JNI_LIBRARY ) ; }

Target:
protected static void loadLinkerJniLibrary ( ) { java.lang.String libName = ( "lib" + ( org.chromium.base.library_loader.Linker.LINKER_JNI_LIBRARY ) ) + ".so" ; if ( org.chromium.base.library_loader.Linker.DEBUG ) { org.chromium.base.Log.i ( org.chromium.base.library_loader.Linker.TAG , ( "Loading " + libName ) ) ; } try { java.lang.System.loadLibrary ( org.chromium.base.library_loader.Linker.LINKER_JNI_LIBRARY ) ; } catch ( java.lang.UnsatisfiedLinkError e ) { org.chromium.base.Log.w ( org.chromium.base.library_loader.Linker.TAG , ( ( ( ( "Couldn't load " + libName ) + ", trying " ) + libName ) + ".cr" ) ) ; java.lang.System.loadLibrary ( ( ( org.chromium.base.library_loader.Linker.LINKER_JNI_LIBRARY ) + ".cr" ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { spf = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; is1 = getClass ( ) . getResourceAsStream ( "/simple.xml" ) ; tests.api.javax.xml.parsers.SAXParserFactoryTest.ns = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; tests.api.javax.xml.parsers.SAXParserFactoryTest.attr = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; tests.api.javax.xml.parsers.SAXParserFactoryTest.el = new java.util.Vector < java.lang.String > ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { spf = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; is1 = getClass ( ) . getResourceAsStream ( "/simple.xml" ) ; org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest.ns = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest.attr = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest.el = new java.util.Vector < java.lang.String > ( ) ; }
Source:
private com.android.builder.core.VariantConfiguration getVariantWithManifestVersion ( final java.lang.String versionName ) { com.android.builder.core.VariantConfiguration variant = new com.android.builder.core.VariantConfiguration ( mDefaultConfig , new com.android.builder.core.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.core.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT , null ) { @ java.lang.Override public java.lang.String getVersionNameFromManifest ( ) { return versionName ; } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.core.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }

Target:
private com.android.builder.core.VariantConfiguration getVariantWithManifestVersion ( final java.lang.String versionName ) { com.android.builder.core.VariantConfiguration variant = new com.android.builder.core.VariantConfiguration ( mDefaultConfig , new com.android.builder.core.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.core.MockSourceProvider ( "debug" ) , VariantType.DEFAULT , null ) { @ java.lang.Override public java.lang.String getVersionNameFromManifest ( ) { return versionName ; } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.core.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }
Source:
void whitelistOppDevice ( android.bluetooth.BluetoothDevice device ) { if ( com.android.nfc.beam.BeamTransferManager.DBG ) android.util.Log.d ( com.android.nfc.beam.BeamTransferManager.TAG , ( ( "Whitelisting " + device ) + " for BT OPP" ) ) ; android.content.Intent intent = new android.content.Intent ( com.android.nfc.beam.BeamTransferManager.ACTION_WHITELIST_DEVICE ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.CURRENT ) ; }

Target:
void whitelistOppDevice ( android.bluetooth.BluetoothDevice device ) { if ( com.android.nfc.beam.BeamTransferManager.DBG ) android.util.Log.d ( com.android.nfc.beam.BeamTransferManager.TAG , ( ( "Whitelisting " + device ) + " for BT OPP" ) ) ; android.content.Intent intent = new android.content.Intent ( com.android.nfc.beam.BeamTransferManager.ACTION_WHITELIST_DEVICE ) ; intent.setPackage ( com.android.nfc.beam.BeamTransferManager.BLUETOOTH_PACKAGE ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.CURRENT ) ; }
Source:
private static java.lang.String getDefaultSignatureAlgorithmForKeyType ( java.lang.String keyType ) { if ( "RSA" . equalsIgnoreCase ( keyType ) ) { return "sha256WithRSA" ; } else if ( "EC" . equalsIgnoreCase ( keyType ) ) { return "sha256WithECDSA" ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported key type " + keyType ) ) ; } }

Target:
private static java.lang.String getDefaultSignatureAlgorithmForKeyAlgorithm ( java.lang.String algorithm ) { if ( "RSA" . equalsIgnoreCase ( algorithm ) ) { return "sha256WithRSA" ; } else if ( "EC" . equalsIgnoreCase ( algorithm ) ) { return "sha256WithECDSA" ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported key type " + algorithm ) ) ; } }
Source:
public void testCallbackFiltering1 ( ) throws java.lang.Exception { android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback callback = new android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback ( android.telephony.mbms.DownloadStateCallback.PROGRESS_UPDATES ) ; android.telephony.mbms.DownloadRequest request = android.telephony.embms.cts.DOWNLOAD_REQUEST_TEMPLATE.build ( ) ; mDownloadSession.registerStateCallback ( request , callback , mCallbackHandler ) ; mMiddlewareControl.fireOnStateUpdated ( null , null , 0 ) ; assertNull ( callback.waitOnStateUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; mMiddlewareControl.fireOnProgressUpdated ( null , null , 0 , 0 , 0 , 0 ) ; assertNotNull ( callback.waitOnProgressUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; }

Target:
public void testCallbackFiltering1 ( ) throws java.lang.Exception { android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback callback = new android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback ( android.telephony.mbms.DownloadStateCallback.PROGRESS_UPDATES ) ; android.telephony.mbms.DownloadRequest request = downloadRequestTemplate.build ( ) ; mDownloadSession.registerStateCallback ( request , mCallbackExecutor , callback ) ; mMiddlewareControl.fireOnStateUpdated ( null , null , 0 ) ; assertNull ( callback.waitOnStateUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; mMiddlewareControl.fireOnProgressUpdated ( null , null , 0 , 0 , 0 , 0 ) ; assertNotNull ( callback.waitOnProgressUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; }
Source:
java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hearingaid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return new java.util.ArrayList < > ( ) ; }

Target:
java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hearingaid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { java.util.List < android.bluetooth.BluetoothDevice > devices = new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; for ( com.android.bluetooth.hearingaid.HearingAidStateMachine sm : mStateMachines.values ( ) ) { if ( sm.isConnected ( ) ) { devices.add ( sm.getDevice ( ) ) ; } } return devices ; } }
Source:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.jack.dx.dex.DexFormat.API_ANDROID_O ) ) { version = com.android.jack.dx.dex.DexFormat.VERSION_FOR_API_26 ; } else if ( targetApiLevel >= ( com.android.jack.dx.dex.DexFormat.API_ANDROID_N ) ) { version = com.android.jack.dx.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.jack.dx.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.jack.dx.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.jack.dx.dex.DexFormat.MAGIC_SUFFIX ) ; }

Target:
public static java.lang.String dexVersionToMagic ( @ javax.annotation.Nonnegative int dexVersion ) { return ( ( ( com.android.jack.dx.dex.DexFormat.MAGIC_PREFIX ) + ( com.android.jack.dx.dex.DexFormat.DEX_VERSION_PREFIX ) ) + dexVersion ) + ( com.android.jack.dx.dex.DexFormat.MAGIC_SUFFIX ) ; }