auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean deleteInstalledPackageLI ( com.android.server.pm.PackageSetting ps , boolean deleteCodeAndResources , int flags , int [ ] allUserHandles , boolean [ ] perUserInstalled , com.android.server.pm.PackageManagerService.PackageRemovedInfo outInfo , boolean writeSettings ) { if ( outInfo != null ) { outInfo.uid = ps.appId ; } removePackageDataLI ( ps , allUserHandles , perUserInstalled , outInfo , flags , writeSettings ) ; if ( deleteCodeAndResources && ( outInfo != null ) ) { outInfo.args = createInstallArgs ( packageFlagsToInstallFlags ( ps ) , ps.codePathString , ps.resourcePathString , ps.nativeLibraryPathString ) ; } return true ; }

Target:
private int moveDexFilesLI ( android.content.pm.PackageParser.Package newPackage ) { if ( ( ( newPackage.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_HAS_CODE ) ) != 0 ) { final java.lang.String instructionSet = getAppInstructionSet ( newPackage.applicationInfo ) ; int retCode = mInstaller.movedex ( newPackage.mScanPath , newPackage.mPath , instructionSet ) ; if ( retCode != 0 ) { newPackage.mDexOptNeeded = true ; mInstaller.rmdex ( newPackage.mScanPath , instructionSet ) ; mInstaller.rmdex ( newPackage.mPath , instructionSet ) ; } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }
Source:
public final void mapSourceRegisters ( com.android.dx.ssa.RegisterMapper mapper ) { for ( com.android.dx.ssa.PhiInsn.Operand o : operands ) { com.android.dx.ssa.RegisterSpec old = o.regSpec ; o.regSpec = mapper.map ( old ) ; if ( old != ( o.regSpec ) ) { getBlock ( ) . getParent ( ) . onSourceChanged ( this , old , o.regSpec ) ; } } sources = null ; }

Target:
public final void mapSourceRegisters ( com.android.dx.ssa.RegisterMapper mapper ) { for ( com.android.dx.ssa.PhiInsn.Operand o : operands ) { com.android.dx.rop.code.RegisterSpec old = o.regSpec ; o.regSpec = mapper.map ( old ) ; if ( old != ( o.regSpec ) ) { getBlock ( ) . getParent ( ) . onSourceChanged ( this , old , o.regSpec ) ; } } sources = null ; }
Source:
private void verifyHierarchy ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass t ) { com.android.jack.ir.ast.JClass superClass = t.getSuperClass ( ) ; if ( superClass instanceof com.android.jack.ir.ast.JPhantomClass ) { t.addMarker ( new com.android.jack.shrob.shrink.PartialTypeHierarchy ( ( ( com.android.jack.ir.ast.JPhantomClass ) ( superClass ) ) ) ) ; } else if ( superClass != null ) { verifyHierarchy ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( superClass ) ) ) ; } verifyImplementedInterfaces ( t ) ; }

Target:
private void findUnknownTypes ( @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JInterface > interfaces , @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JPhantomClassOrInterface > unknownTypes ) { for ( com.android.jack.ir.ast.JInterface jInterface : interfaces ) { if ( jInterface instanceof com.android.jack.ir.ast.JPhantomInterface ) { unknownTypes.add ( ( ( com.android.jack.ir.ast.JPhantomInterface ) ( jInterface ) ) ) ; } else { assert jInterface instanceof com.android.jack.ir.ast.JDefinedInterface ; findUnknownTypes ( ( ( com.android.jack.ir.ast.JDefinedInterface ) ( jInterface ) ) . getImplements ( ) , unknownTypes ) ; } } }
Source:
public static com.android.incallui.call.TelecomAdapter getInstance ( ) { if ( ! ( android.os.Looper.getMainLooper ( ) . isCurrentThread ( ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( ( com.android.incallui.call.TelecomAdapter.sInstance ) == null ) { com.android.incallui.call.TelecomAdapter.sInstance = new com.android.incallui.call.TelecomAdapter ( ) ; } return com.android.incallui.call.TelecomAdapter.sInstance ; }

Target:
public static com.android.incallui.call.TelecomAdapter getInstance ( ) { if ( ! ( android.os.Looper.getMainLooper ( ) . isCurrentThread ( ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( ( com.android.incallui.call.TelecomAdapter.instance ) == null ) { com.android.incallui.call.TelecomAdapter.instance = new com.android.incallui.call.TelecomAdapter ( ) ; } return com.android.incallui.call.TelecomAdapter.instance ; }
Source:
protected android.view.View findViewWithTagTraversal ( java.lang.Object tag ) { android.view.View v ; v = super . findViewWithTagTraversal ( tag ) ; if ( v == null ) { v = findViewTagInHeadersOrFooters ( mHeaderViewInfos , tag ) ; if ( v != null ) { return v ; } v = findViewTagInHeadersOrFooters ( mFooterViewInfos , tag ) ; if ( v != null ) { return v ; } } return v ; }

Target:
protected android.view.View findViewWithTagTraversal ( java.lang.Object tag ) { android.view.View v ; v = super . findViewWithTagTraversal ( tag ) ; if ( v == null ) { v = findViewWithTagInHeadersOrFooters ( mHeaderViewInfos , tag ) ; if ( v != null ) { return v ; } v = findViewWithTagInHeadersOrFooters ( mFooterViewInfos , tag ) ; if ( v != null ) { return v ; } } return v ; }
Source:
private void resetMatcher ( ) { if ( ( matcher ) == null ) { matcher = delimiter.matcher ( buffer ) ; } else { matcher.reset ( buffer ) ; } matcher.region ( findStartIndex , bufferLength ) ; }

Target:
private void resetMatcher ( ) { if ( ( matcher ) == null ) { matcher = delimiter.matcher ( buffer ) ; } else { matcher.reset ( buffer ) ; } matcher.useTransparentBounds ( true ) ; matcher.useAnchoringBounds ( false ) ; matcher.region ( findStartIndex , bufferLength ) ; }
Source:
public void sealApk ( ) throws com.android.sdklib.build.ApkBuilder.ApkCreationException , com.android.sdklib.build.ApkBuilder.SealedApkException { if ( mIsSealed ) { throw new com.android.sdklib.build.ApkBuilder.SealedApkException ( "APK is already sealed" ) ; } try { mBuilder.close ( ) ; mIsSealed = true ; } catch ( java.lang.Exception e ) { throw new com.android.sdklib.build.ApkBuilder.ApkCreationException ( e , "Failed to seal APK" ) ; } }

Target:
public void addFile ( java.io.File file , java.lang.String archivePath ) throws com.android.sdklib.build.ApkCreationException , com.android.sdklib.build.DuplicateFileException , com.android.sdklib.build.SealedApkException { if ( mIsSealed ) { throw new com.android.sdklib.build.SealedApkException ( "APK is already sealed" ) ; } try { doAddFile ( file , archivePath ) ; } catch ( com.android.sdklib.build.DuplicateFileException e ) { throw e ; } catch ( java.lang.Exception e ) { throw new com.android.sdklib.build.ApkCreationException ( e , "Failed to add %s" , file ) ; } }
Source:
public void cdmaNewSms ( int indicationType , android.hardware.radio.V1_0.CdmaSmsMessage msg ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLog ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CDMA_NEW_SMS ) ; mRil.writeMetricsNewSms ( SmsSession.Event.Tech.SMS_CDMA , SmsSession.Event.Format.SMS_FORMAT_3GPP2 ) ; android.telephony.SmsMessage sms = android.telephony.SmsMessage.newCdmaSmsFromRil ( msg ) ; if ( ( mRil.mCdmaSmsRegistrant ) != null ) { mRil.mCdmaSmsRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , sms , null ) ) ; } }

Target:
public void cdmaNewSms ( int indicationType , android.hardware.radio.V1_0.CdmaSmsMessage msg ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLog ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CDMA_NEW_SMS ) ; mRil.writeMetricsNewSms ( SmsSession.Event.Tech.SMS_CDMA , SmsSession.Event.Format.SMS_FORMAT_3GPP2 ) ; android.telephony.SmsMessage sms = com.android.internal.telephony.cdma.SmsMessageConverter.newSmsMessageFromCdmaSmsMessage ( msg ) ; if ( ( mRil.mCdmaSmsRegistrant ) != null ) { mRil.mCdmaSmsRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , sms , null ) ) ; } }
Source:
static final java.util.List < java.security.Provider.Service > getServices ( java.util.List < javax.crypto.Cipher.Transform > transforms ) { java.util.List < sun.security.jca.ServiceId > cipherServices = new java.util.ArrayList < sun.security.jca.ServiceId > ( transforms.size ( ) ) ; for ( javax.crypto.Cipher.Transform transform : transforms ) { cipherServices.add ( new sun.security.jca.ServiceId ( "Cipher" , transform.transform ) ) ; } return sun.security.jca.GetInstance.getServices ( cipherServices ) ; }

Target:
javax.crypto.CipherSpi getCurrentSpi ( javax.crypto.CipherSpi spiImpl ) { if ( ( specifiedSpi ) != null ) { return specifiedSpi ; } synchronized ( initSpiLock ) { return spiImpl ; } }
Source:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , "libapp/build/bundles/release/AndroidManifest.xml" ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }

Target:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "libapp/build/" + ( com.android.build.gradle.BasePlugin.FD_INTERMEDIATES ) ) + "/bundles/release/AndroidManifest.xml" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }
Source:
public void moveToFront ( ) { checkCaller ( ) ; final com.android.server.am.TaskRecord tr ; synchronized ( this ) { tr = recentTaskForIdLocked ( mTaskId ) ; if ( tr == null ) { throw new java.lang.IllegalArgumentException ( ( "Unable to find task ID " + ( mTaskId ) ) ) ; } if ( ( tr.getRootActivity ( ) ) != null ) { moveTaskToFrontLocked ( tr.taskId , 0 , null ) ; return ; } } startActivityFromRecentsInner ( tr.taskId , null ) ; }

Target:
public void finishAndRemoveTask ( ) { checkCaller ( ) ; synchronized ( this ) { long origId = android.os.Binder.clearCallingIdentity ( ) ; try { if ( ! ( removeTaskByIdLocked ( mTaskId , false ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Unable to find task ID " + ( mTaskId ) ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } } }
Source:
protected abstract void onRadioOffOrNotAvailable ( ) ;

Target:
public void registerForImsiReady ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mImsiReadyRegistrants.add ( r ) ; if ( ( mImsi ) != null ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }
Source:
public void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { results.add ( line ) ; if ( ( com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.BuildVerbosity.VERBOSE ) == ( com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.getPrefs ( ) . getBuildVerbosity ( ) ) ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( project , line ) ; } } }

Target:
public void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { stderr.add ( line ) ; if ( ( com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.BuildVerbosity.VERBOSE ) == ( com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.getPrefs ( ) . getBuildVerbosity ( ) ) ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( project , line ) ; } } }
Source:
public static void addDelayedShutdownHook ( final java.util.concurrent.ExecutorService service , final long terminationTimeout , final java.util.concurrent.TimeUnit timeUnit ) { java.lang.Runtime.getRuntime ( ) . addShutdownHook ( new java.lang.Thread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { try { service.shutdown ( ) ; service.awaitTermination ( terminationTimeout , timeUnit ) ; } catch ( java.lang.InterruptedException ignored ) { } } } , ( "DelayedShutdownHook-for-" + service ) ) ) ; }

Target:
final void addDelayedShutdownHook ( final java.util.concurrent.ExecutorService service , final long terminationTimeout , final java.util.concurrent.TimeUnit timeUnit ) { com.google.common.base.Preconditions.checkNotNull ( service ) ; com.google.common.base.Preconditions.checkNotNull ( timeUnit ) ; addShutdownHook ( com.google.common.util.concurrent.MoreExecutors.newThread ( ( "DelayedShutdownHook-for-" + service ) , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { try { service.shutdown ( ) ; service.awaitTermination ( terminationTimeout , timeUnit ) ; } catch ( java.lang.InterruptedException ignored ) { } } } ) ) ; }
Source:
public com.android.ims.ImsConfig getConfigInterface ( ) throws com.android.ims.ImsException { if ( ( ( mConfig ) != null ) && ( mConfig.isBinderAlive ( ) ) ) { return mConfig ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { android.telephony.ims.aidl.IImsConfig config = mMmTelFeatureConnection.getConfigInterface ( ) ; if ( config == null ) { throw new com.android.ims.ImsException ( "getConfigInterface()" , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } mConfig = new com.android.ims.ImsConfig ( config , mContext ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getConfigInterface()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } return mConfig ; }

Target:
public android.telephony.ims.ImsCallProfile createCallProfile ( int serviceType , int callType ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { return mMmTelFeatureConnection.createCallProfile ( serviceType , callType ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "createCallProfile()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public java.lang.String describeFirstNonRequestableCapability ( ) { if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED ) ) return "NET_CAPABILITY_VALIDATED" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL ) ) return "NET_CAPABILITY_CAPTIVE_PORTAL" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_FOREGROUND ) ) return "NET_CAPABILITY_FOREGROUND" ; if ( ( ( mNetworkCapabilities ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ) != 0 ) { return "unknown non-requestable capabilities " + ( java.lang.Long.toHexString ( mNetworkCapabilities ) ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }

Target:
private void combineUids ( android.net.NetworkCapabilities nc ) { if ( ( null == ( nc.mUids ) ) || ( null == ( mUids ) ) ) { mUids = null ; return ; } mUids.addAll ( nc.mUids ) ; }
Source:
public void openModuleDependenciesSettings ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.module.Module module , @ org.jetbrains.annotations.Nullable final com.intellij.openapi.roots.OrderEntry orderEntry ) { com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( myProject , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( myProject ) , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( myProject ) . selectOrderEntry ( module , orderEntry ) ; } } ) ; }

Target:
public void openModuleDependenciesSettings ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.module.Module module , @ org.jetbrains.annotations.Nullable final com.intellij.openapi.roots.OrderEntry orderEntry ) { warnIfGradleProject ( ) ; com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( myProject , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( myProject ) , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( myProject ) . selectOrderEntry ( module , orderEntry ) ; } } ) ; }
Source:
static android.app.PendingIntent createIncomingCallPendingIntent ( android.content.Context context , java.lang.String sipProfileName ) { android.content.Intent intent = new android.content.Intent ( context , com.android.services.telephony.sip.SipBroadcastReceiver.class ) ; intent.setAction ( SipManager.ACTION_SIP_INCOMING_CALL ) ; intent.putExtra ( com.android.services.telephony.sip.SipUtil.EXTRA_PHONE_ACCOUNT , com.android.services.telephony.sip.SipUtil.createAccountHandle ( context , sipProfileName ) ) ; return android.app.PendingIntent.getBroadcast ( context , 0 , intent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }

Target:
static android.app.PendingIntent createIncomingCallPendingIntent ( android.content.Context context , java.lang.String sipProfileName ) { android.content.Intent intent = new android.content.Intent ( context , com.android.services.telephony.sip.SipIncomingCallReceiver.class ) ; intent.setAction ( SipManager.ACTION_SIP_INCOMING_CALL ) ; intent.putExtra ( com.android.services.telephony.sip.SipUtil.EXTRA_PHONE_ACCOUNT , com.android.services.telephony.sip.SipUtil.createAccountHandle ( context , sipProfileName ) ) ; return android.app.PendingIntent.getBroadcast ( context , 0 , intent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }
Source:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet , int dexoptNeeded ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , instructionSet , dexoptNeeded ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , boolean vmSafeMode , boolean debuggable , @ android.annotation.Nullable java.lang.String outputPath , boolean bootComplete ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , pkgName , instructionSet , dexoptNeeded , vmSafeMode , debuggable , outputPath , bootComplete ) ; }
Source:
public void testSetNetworkExtra ( ) { org.mockito.Mockito.when ( mWifiNative.setNetworkVariable ( org.mockito.Mockito.anyInt ( ) , org.mockito.Mockito.anyString ( ) , org.mockito.Mockito.anyString ( ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiNative.setNetworkExtra ( com.android.server.wifi.WifiNativeTest.NETWORK_ID , com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_VARIABLE , com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_VALUES ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . setNetworkVariable ( com.android.server.wifi.WifiNativeTest.NETWORK_ID , com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_VARIABLE , com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_SERIALIZED ) ; }

Target:
public void testSetupDriverForClientModeError ( ) { org.mockito.Mockito.when ( mWificondControl.setupDriverForClientMode ( ) ) . thenReturn ( null ) ; android.net.wifi.IClientInterface returnedClientInterface = mWifiNative.setupForClientMode ( ) ; org.junit.Assert.assertEquals ( null , returnedClientInterface ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . startVendorHal ( org.mockito.Mockito.eq ( true ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . setupDriverForClientMode ( ) ; }
Source:
public java.lang.String getLine1AlphaTagForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getLine1AlphaTag" ) ) ) { return null ; } return phone.getLine1AlphaTag ( ) ; } else { loge ( ( "getLine1AlphaTag phone is null for Subscription:" + subId ) ) ; return null ; } }

Target:
public java.lang.String getLine1NumberForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneNumber ( mContext , subId , callingPackage , "getLine1Number" ) ) ) { return null ; } return phone.getLine1Number ( ) ; } else { loge ( ( "getLine1Number phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
private void setupMocksForRoamSequence ( java.lang.String roamBssid ) throws java.lang.Exception { org.mockito.Mockito.doAnswer ( new android.app.test.MockAnswerUtil.AnswerWithArguments ( ) { public android.hardware.wifi.supplicant.V1_0.SupplicantStatus answer ( ) throws android.os.RemoteException { return mStatusSuccess ; } } ) . when ( mISupplicantStaIfaceMock ) . reassociate ( ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.eq ( roamBssid ) ) ) . thenReturn ( true ) ; }

Target:
public void answer ( final int networkId , ISupplicantStaIface.getNetworkCallback cb ) { cb.onValues ( mStatusSuccess , org.mockito.Mockito.mock ( android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork.class ) ) ; return ; }
Source:
public void onScaleChangedScaled ( float oldScale , float newScale ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , " onScaleChangedScaled" ) ; mWebViewClient.onScaleChanged ( mWebView , oldScale , newScale ) ; org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onScaleChangedScaled ( float oldScale , float newScale ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onScaleChangedScaled" ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , " onScaleChangedScaled" ) ; mWebViewClient.onScaleChanged ( mWebView , oldScale , newScale ) ; } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onScaleChangedScaled" ) ; } }
Source:
public void loadViewTreeData ( final com.android.hierarchyviewerlib.device.Window window ) { executeInBackground ( "Loading view hierarchy" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mFilterText = "" ; com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( window ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileData ( window , viewNode ) ; viewNode.setViewCount ( ) ; com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . setData ( window , viewNode ) ; } } } ) ; }

Target:
public void loadViewTreeData ( final com.android.hierarchyviewerlib.models.Window window ) { executeInBackground ( "Loading view hierarchy" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mFilterText = "" ; com.android.hierarchyviewerlib.device.IHvDevice hvDevice = window.getHvDevice ( ) ; com.android.hierarchyviewerlib.models.ViewNode viewNode = hvDevice.loadWindowData ( window ) ; if ( viewNode != null ) { hvDevice.loadProfileData ( window , viewNode ) ; viewNode.setViewCount ( ) ; com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . setData ( window , viewNode ) ; } } } ) ; }
Source:
private java.awt.Color getFontColor ( com.android.tools.perflib.vmtrace.Call c ) { com.android.tools.perflib.vmtrace.MethodInfo info = mTraceData.getMethod ( c.getMethodId ( ) ) ; int percent = quantize ( info.getInclusiveThreadPercent ( ) ) ; return getFontColor ( percent ) ; }

Target:
private double getDurationPercentage ( com.android.tools.perflib.vmtrace.Call call , com.android.tools.perflib.vmtrace.viz.CallHierarchyRenderer.TimeSelector selector ) { com.android.tools.perflib.vmtrace.MethodInfo info = mTraceData.getMethod ( call.getMethodId ( ) ) ; long methodTime = selector.get ( info , mThreadName ) ; long topLevelTime = getMethodInfo ( mTopCall ) . getInclusiveTime ( mThreadName , com.android.tools.perflib.vmtrace.ClockType.THREAD ) ; return ( ( ( double ) ( methodTime ) ) / topLevelTime ) * 100 ; }
Source:
public void keepScreenOnStoppedLw ( ) { if ( ( ( mKeyguardDelegate ) != null ) && ( ! ( mKeyguardDelegate.isShowingAndNotHidden ( ) ) ) ) { long curTime = android.os.SystemClock.uptimeMillis ( ) ; mPowerManager.userActivity ( android.os.SystemClock.uptimeMillis ( ) , false ) ; } }

Target:
public void notifyActivityDrawnForKeyguardLw ( ) { if ( ( mKeyguardDelegate ) != null ) { mHandler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mKeyguardDelegate.onActivityDrawn ( ) ; } } ) ; } }
Source:
public void test_plus_Period ( ) { test.java.time.MockSimplePeriod period = test.java.time.MockSimplePeriod.of ( 7 , java.time.temporal.ChronoUnit.MONTHS ) ; java.time.OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus ( period ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2009 , 1 , 30 , 11 , 30 , 59 , 500 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }

Target:
public void test_plus_Period ( ) { test.java.time.MockSimplePeriod period = test.java.time.MockSimplePeriod.of ( 7 , java.time.temporal.ChronoUnit.MONTHS ) ; java.time.OffsetDateTime t = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.plus ( period ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2009 , 1 , 30 , 11 , 30 , 59 , 500 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }
Source:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.contacts.RecentCallsListActivity.MENU_ITEM_DELETE_ALL : { getContentResolver ( ) . delete ( Calls.CONTENT_URI , null , null ) ; startQuery ( ) ; return true ; } case com.android.contacts.RecentCallsListActivity.MENU_ITEM_VIEW_CONTACTS : { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW , android.provider.ContactsContract.Contacts.CONTENT_URI ) ; intent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; startActivity ( intent ) ; return true ; } } return super . onOptionsItemSelected ( item ) ; }

Target:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.contacts.RecentCallsListActivity.MENU_ITEM_DELETE_ALL : { showDialog ( R.id.dialog_clear_log ) ; return true ; } case com.android.contacts.RecentCallsListActivity.MENU_ITEM_VIEW_CONTACTS : { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW , android.provider.ContactsContract.Contacts.CONTENT_URI ) ; intent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; startActivity ( intent ) ; return true ; } } return super . onOptionsItemSelected ( item ) ; }
Source:
private static java.lang.String getDexCodeInstructionSet ( java.lang.String sharedLibraryIsa ) { java.lang.String dexCodeIsa = android.os.SystemProperties.get ( ( "ro.dalvik.vm.isa." + sharedLibraryIsa ) ) ; return dexCodeIsa.isEmpty ( ) ? sharedLibraryIsa : dexCodeIsa ; }

Target:
PackageParser.Package findSharedNonSystemLibrary ( java.lang.String libName ) { synchronized ( mPackages ) { com.android.server.pm.PackageManagerService.SharedLibraryEntry lib = mSharedLibraries.get ( libName ) ; if ( ( lib != null ) && ( ( lib.apk ) != null ) ) { return mPackages.get ( lib.apk ) ; } } return null ; }
Source:
private void testInterruptWriter ( final java.io.PipedWriter writer ) throws java.lang.Exception { interruptMeLater ( ) ; try { while ( true ) { writer.write ( new char [ libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ] ) ; } } catch ( java.io.InterruptedIOException expected ) { } }

Target:
private void testInterruptOutputStream ( final java.io.OutputStream out ) throws java.lang.Exception { java.lang.Thread thread = interruptMeLater ( ) ; try { while ( true ) { out.write ( new byte [ libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ] ) ; } } catch ( java.io.InterruptedIOException expected ) { } finally { libcore.java.io.InterruptedStreamTest.confirmInterrupted ( thread ) ; } }
Source:
public void testKeyStore_GetCertificateAlias_CAEntry_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; java.security.cert.Certificate actual = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertEquals ( "Stored certificate alias should be found" , android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , mKeyStore.getCertificateAlias ( actual ) ) ; }

Target:
public void testKeyStore_GetCertificateAlias_CAEntry_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_RSA_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; java.security.cert.Certificate actual = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_RSA_CA_1 ) ) ; assertEquals ( "Stored certificate alias should be found" , android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , mKeyStore.getCertificateAlias ( actual ) ) ; }
Source:
private java.lang.String findTaskInfo ( java.lang.String name ) throws java.lang.Exception { com.android.tradefed.device.CollectingOutputReceiver outputReceiver = new com.android.tradefed.device.CollectingOutputReceiver ( ) ; mDevice.executeShellCommand ( android.wm.cts.CrossAppDragAndDropTests.AM_STACK_LIST , outputReceiver ) ; final java.lang.String output = outputReceiver.getOutput ( ) ; final java.util.regex.Pattern pattern = java.util.regex.Pattern.compile ( java.lang.String.format ( android.wm.cts.CrossAppDragAndDropTests.TASK_REGEX_PATTERN_STRING , name ) ) ; for ( java.lang.String line : output.split ( "\\n" ) ) { if ( pattern.matcher ( line ) . find ( ) ) { return line ; } } return "" ; }

Target:
private java.lang.String findTaskInfo ( java.lang.String name ) throws java.lang.Exception { com.android.tradefed.device.CollectingOutputReceiver outputReceiver = new com.android.tradefed.device.CollectingOutputReceiver ( ) ; mDevice.executeShellCommand ( android.wm.cts.CrossAppDragAndDropTests.AM_STACK_LIST , outputReceiver ) ; final java.lang.String output = outputReceiver.getOutput ( ) ; for ( java.lang.String line : output.split ( "\\n" ) ) { if ( line.contains ( name ) ) { return line ; } } return "" ; }
Source:
public void schedule ( java.util.TimerTask task , java.util.Date when , long period ) { if ( ( period <= 0 ) || ( ( when.getTime ( ) ) < 0 ) ) { throw new java.lang.IllegalArgumentException ( ) ; } long delay = ( when.getTime ( ) ) - ( java.lang.System.currentTimeMillis ( ) ) ; scheduleImpl ( task , ( delay < 0 ? 0 : delay ) , period , false ) ; }

Target:
private static java.lang.Long computeDelayUntilNextTask ( java.util.Timer.ScheduledTask scheduledTask ) { if ( scheduledTask == null ) { return null ; } long currentTimeMillis = java.lang.System.currentTimeMillis ( ) ; if ( ( scheduledTask.nextExecution ) < currentTimeMillis ) { return 0L ; } else { return ( scheduledTask.nextExecution ) - currentTimeMillis ; } }
Source:
public void testConnectivityConstraintExecutes_metered ( ) throws java.lang.Exception { if ( ! ( checkDeviceSupportsMobileData ( ) ) ) { return ; } disconnectWifiToConnectToMobile ( ) ; kTestEnvironment.setExpectedExecutions ( 1 ) ; mJobScheduler.schedule ( mBuilder.setRequiredNetworkType ( JobInfo.NETWORK_TYPE_METERED ) . build ( ) ) ; sendExpediteStableChargingBroadcast ( ) ; assertTrue ( "Job with metered connectivity constraint did not fire on mobile." , kTestEnvironment.awaitExecution ( ) ) ; }

Target:
public void testConnectivityConstraintExecutes_metered ( ) throws java.lang.Exception { if ( ! ( checkDeviceSupportsMobileData ( ) ) ) { return ; } ensureRestrictBackgroundPolicyOff ( ) ; disconnectWifiToConnectToMobile ( ) ; kTestEnvironment.setExpectedExecutions ( 1 ) ; mJobScheduler.schedule ( mBuilder.setRequiredNetworkType ( JobInfo.NETWORK_TYPE_METERED ) . build ( ) ) ; sendExpediteStableChargingBroadcast ( ) ; assertTrue ( "Job with metered connectivity constraint did not fire on mobile." , kTestEnvironment.awaitExecution ( ) ) ; }
Source:
private void indexInput ( final com.google.devtools.build.android.desugar.InputFileProvider inputFileProvider ) throws java.io.IOException { for ( java.lang.String relativePath : inputFileProvider ) { if ( ( relativePath.endsWith ( ".class" ) ) && ( ! ( inputFiles.containsKey ( relativePath ) ) ) ) { inputFiles.put ( relativePath , inputFileProvider ) ; } } }

Target:
public com.google.devtools.build.android.desugar.InputFileProvider getInputFileProvider ( java.lang.String filename ) { com.google.common.base.Preconditions.checkArgument ( filename.endsWith ( ".class" ) ) ; if ( ( parent ) != null ) { com.google.devtools.build.android.desugar.InputFileProvider inputFileProvider = parent.getInputFileProvider ( filename ) ; if ( inputFileProvider != null ) { return inputFileProvider ; } } return inputFiles.get ( filename ) ; }
Source:
public final V setValue ( V value ) { if ( value == null ) { throw new java.lang.NullPointerException ( ) ; } V oldValue = this . value ; this . value = value ; return oldValue ; }

Target:
public final V setValue ( V value ) { if ( value == null ) { throw new java.lang.NullPointerException ( ( ( ( "key=" + ( key ) ) + " value=" ) + value ) ) ; } V oldValue = this . value ; this . value = value ; return oldValue ; }
Source:
public void add ( int index , long value ) { if ( ( index < 0 ) || ( index > ( mSize ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ) ; } ensureCapacity ( 1 ) ; if ( ( ( mSize ) - index ) != 0 ) { java.lang.System.arraycopy ( mValues , index , mValues , ( index + 1 ) , ( ( mSize ) - index ) ) ; } mValues [ index ] = value ; ( mSize ) ++ ; }

Target:
private void checkBounds ( int index ) { if ( ( index < 0 ) || ( ( mSize ) <= index ) ) { throw new java.lang.ArrayIndexOutOfBoundsException ( mSize , index ) ; } }
Source:
public java.lang.String getName ( ) { if ( ( ( mParsingState ) == ( START_TAG ) ) || ( ( mParsingState ) == ( END_TAG ) ) ) { return getCurrentNode ( ) . getDescriptor ( ) . getXmlLocalName ( ) ; } return null ; }

Target:
public java.lang.String getName ( ) { if ( ( ( mParsingState ) == ( START_TAG ) ) || ( ( mParsingState ) == ( END_TAG ) ) ) { java.lang.String name = getCurrentNode ( ) . getDescriptor ( ) . getXmlLocalName ( ) ; if ( name.equals ( com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors.VIEW_FRAGMENT ) ) { java.lang.String layout = com.android.ide.eclipse.adt.internal.editors.layout.gle2.FragmentMenu.getFragmentLayout ( getCurrentNode ( ) . getXmlNode ( ) ) ; if ( layout != null ) { return com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors.VIEW_INCLUDE ; } } return name ; } return null ; }
Source:
private static java.io.File getLintBinDir ( ) { java.lang.String path = java.lang.System.getProperty ( com.android.tools.lint.client.api.LintClient.PROP_BIN_DIR ) ; if ( ( path == null ) || ( path.isEmpty ( ) ) ) { path = java.lang.System.getenv ( com.android.tools.lint.client.api.LintClient.PROP_BIN_DIR ) ; } if ( ( path != null ) && ( ! ( path.isEmpty ( ) ) ) ) { return new java.io.File ( path ) ; } return null ; }

Target:
private static java.io.File getLintBinDir ( ) { java.lang.String path = java.lang.System.getProperty ( com.android.tools.lint.client.api.LintClient.PROP_BIN_DIR ) ; if ( ( path == null ) || ( path.isEmpty ( ) ) ) { path = java.lang.System.getenv ( com.android.tools.lint.client.api.LintClient.PROP_BIN_DIR ) ; } if ( ( path != null ) && ( ! ( path.isEmpty ( ) ) ) ) { java.io.File file = new java.io.File ( path ) ; if ( file.exists ( ) ) { return file ; } } return null ; }
Source:
public void testHidden ( ) { assertEquals ( true , ksq.checkAndSet ( "keyshidden" , config ) ) ; assertTrue ( ( ( config.getKeyboardStateQualifier ( ) ) != null ) ) ; assertEquals ( KeyboardStateQualifier.KeyboardState.HIDDEN , config.getKeyboardStateQualifier ( ) . getValue ( ) ) ; assertEquals ( "keyshidden" , config.getKeyboardStateQualifier ( ) . toString ( ) ) ; }

Target:
public void testHidden ( ) { assertEquals ( true , ksq.checkAndSet ( "keyshidden" , config ) ) ; assertTrue ( ( ( config.getKeyboardStateQualifier ( ) ) != null ) ) ; assertEquals ( KeyboardState.HIDDEN , config.getKeyboardStateQualifier ( ) . getValue ( ) ) ; assertEquals ( "keyshidden" , config.getKeyboardStateQualifier ( ) . toString ( ) ) ; }
Source:
public java.nio.ByteBuffer putInt ( int value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeInt ( ( ( offset ) + ( position ) ) , value , order ) ; position = newPosition ; return this ; }

Target:
public java.nio.ByteBuffer putInt ( int value ) { checkIsAccessible ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeInt ( ( ( offset ) + ( position ) ) , value , order ) ; position = newPosition ; return this ; }
Source:
public void testNotifyResponseConfigSuccess ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiNanNative.NAN_STATUS_SUCCESS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiNanNative.NAN_RESPONSE_ENABLED ) ; com.android.server.wifi.nan.WifiNanHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onConfigSuccessResponse ( transactionId ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testNotifyResponseConfigSuccess ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiAwareNative.AWARE_STATUS_SUCCESS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiAwareNative.AWARE_RESPONSE_ENABLED ) ; com.android.server.wifi.aware.WifiAwareHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onConfigSuccessResponse ( transactionId ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public void getSmdsAddress ( android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.String > callback ) { try { getIEuiccCardController ( ) . getSmdsAddress ( mContext.getOpPackageName ( ) , new com.android.internal.telephony.euicc.IGetSmdsAddressCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , java.lang.String address ) { callback.onComplete ( resultCode , address ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getSmdsAddress" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void getSmdsAddress ( java.lang.String cardId , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.String > callback ) { try { getIEuiccCardController ( ) . getSmdsAddress ( mContext.getOpPackageName ( ) , cardId , new com.android.internal.telephony.euicc.IGetSmdsAddressCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , java.lang.String address ) { callback.onComplete ( resultCode , address ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getSmdsAddress" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void printFilteredProblemTest_defaultReporter ( ) throws java.io.IOException { java.io.File refFile = new java.io.File ( com.android.jack.test.TestsProperties.getJackRootDir ( ) , "jack/tests/com/android/jack/reporting/defaultreporter-ref.txt" ) ; com.android.jack.reporting.DefaultReporter reporter = new com.android.jack.reporting.DefaultReporter ( ) ; checkPrintFilteredProblem ( reporter , refFile ) ; }

Target:
public void printFilteredProblemTest_sdkReporter ( ) throws java.io.IOException { java.io.File refFile = new java.io.File ( com.android.jack.test.TestsProperties.getJackRootDir ( ) , "jack/tests/com/android/jack/reporting/sdkreporter-ref.txt" ) ; com.android.jack.reporting.SdkReporter reporter = new com.android.jack.reporting.SdkReporter ( ) ; java.lang.String expectedFileString = new java.io.File ( com.android.jack.reporting.ReporterFormatTest.FILE_PATH ) . getAbsolutePath ( ) . replace ( "\\" , "\\\\" ) . replace ( "/" , "\\/" ) ; checkPrintFilteredProblem ( reporter , refFile , com.android.jack.reporting.ReporterFormatTest.ESCAPED_FILE_PATH , expectedFileString ) ; }
Source:
public void testVerify_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; assertTrue ( "Signature should verify with same data" , mKeyStore.verify ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA , signature ) ) ; }

Target:
public void testVerify_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , 1024 , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; assertTrue ( "Signature should verify with same data" , mKeyStore.verify ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA , signature ) ) ; }
Source:
private void addCreateDexJarAndPushTasks ( java.util.Set < vogar.tasks.Task > tasks , java.lang.String name , java.io.File jar , vogar.Action action ) { java.io.File localDex = run.localDexFile ( name ) ; java.io.File deviceDex = run.targetDexFile ( name ) ; vogar.tasks.Task createDexJarTask = newCreateDexJarTask ( run.classpath , jar , name , action , localDex ) ; tasks.add ( createDexJarTask ) ; tasks.add ( run.target.pushTask ( localDex , deviceDex ) . afterSuccess ( createDexJarTask ) ) ; }

Target:
private void addCreateDexJarAndPushTasks ( java.util.Set < vogar.tasks.Task > tasks , java.lang.String name , java.io.File jar , vogar.Action action ) { java.io.File localDex = run.localDexFile ( name ) ; java.io.File localTempDir = run.localDir ( name ) ; java.io.File deviceDex = run.targetDexFile ( name ) ; vogar.tasks.Task createDexJarTask = newCreateDexJarTask ( run.classpath , jar , name , action , localDex , localTempDir ) ; tasks.add ( createDexJarTask ) ; tasks.add ( run.target.pushTask ( localDex , deviceDex ) . afterSuccess ( createDexJarTask ) ) ; }
Source:
private boolean isScoAcceptable ( ) { if ( mService.getForceScoAudio ( ) ) { return true ; } return ( mAudioRouteAllowed ) && ( ( ( mVoiceRecognitionStarted ) || ( isInCall ( ) ) ) || ( ( android.bluetooth.BluetoothHeadset.isInbandRingingSupported ( mService ) ) && ( isRinging ( ) ) ) ) ; }

Target:
boolean getAudioRouteAllowed ( ) { return mAudioRouteAllowed ; }
Source:
private void viewInvalidateDelayed ( long delay , int l , int t , int r , int b ) { postInvalidateDelayed ( delay , contentToView ( l ) , contentToView ( t ) , contentToView ( r ) , contentToView ( b ) ) ; }

Target:
public void requestFocusNodeHref ( android.os.Message hrefMsg ) { if ( ( hrefMsg == null ) || ( ( mNativeClass ) == 0 ) ) { return ; } if ( nativeCursorIsAnchor ( ) ) { mWebViewCore.sendMessage ( EventHub.REQUEST_CURSOR_HREF , nativeCursorFramePointer ( ) , nativeCursorNodePointer ( ) , hrefMsg ) ; } }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws java.lang.Exception { com.android.jack.backend.dex.DexWritingTool writingTool = com.android.sched.util.config.ThreadConfig.get ( com.android.jack.backend.dex.DexFileWriter.DEX_WRITING_POLICY ) ; writingTool.write ( outputVDir ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) { com.android.jack.backend.dex.DexWritingTool writingTool = com.android.sched.util.config.ThreadConfig.get ( com.android.jack.backend.dex.DexFileWriter.DEX_WRITING_POLICY ) ; try { writingTool.write ( outputVDir ) ; } catch ( com.android.jack.backend.dex.DexWritingException e ) { session.getReporter ( ) . report ( Severity.FATAL , e ) ; throw new com.android.jack.JackAbortException ( e ) ; } }
Source:
private static native long nativeGetIfaceStat ( java.lang.String iface , int type ) ;

Target:
public static long getUidTxPackets ( int uid ) { final int callingUid = android.net.android.os.Process.myUid ( ) ; if ( ( callingUid == android.net.android.os.Process ) || ( callingUid == uid ) ) { try { return android.net.TrafficStats.getStatsService ( ) . getUidStats ( uid , android.net.TrafficStats.TYPE_TX_PACKETS ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } else { return android.net.TrafficStats.UNSUPPORTED ; } }
Source:
void cleanUpResourcesLI ( ) { java.lang.String sourceDir = getCodePath ( ) ; if ( cleanUp ( ) ) { if ( ( instructionSet ) == null ) { throw new java.lang.IllegalStateException ( "instructionSet == null" ) ; } int retCode = mInstaller.rmdex ( sourceDir , instructionSet ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( "Couldn't remove dex file for package: " + " at location " ) + sourceDir ) + ", retcode=" ) + retCode ) ) ; } } }

Target:
void cleanUpResourcesLI ( ) { java.lang.String sourceDir = getCodePath ( ) ; if ( cleanUp ( ) ) { if ( ( instructionSet ) == null ) { throw new java.lang.IllegalStateException ( "instructionSet == null" ) ; } final java.lang.String dexCodeInstructionSet = com.android.server.pm.PackageManagerService.getDexCodeInstructionSet ( instructionSet ) ; int retCode = mInstaller.rmdex ( sourceDir , dexCodeInstructionSet ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( "Couldn't remove dex file for package: " + " at location " ) + sourceDir ) + ", retcode=" ) + retCode ) ) ; } } }