auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void tearDown ( ) throws java.lang.Exception { if ( testSystemTzDataDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( testInstallDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( tempDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( tempDir ) ; } super . tearDown ( ) ; }

Target:
private static void assertFileCount ( int expectedFiles , java.io.File rootDir ) throws java.lang.Exception { final java.util.List < java.nio.file.Path > paths = new java.util.ArrayList < > ( ) ; java.nio.file.FileVisitor < java.nio.file.Path > visitor = new java.nio.file.SimpleFileVisitor < java.nio.file.Path > ( ) { @ java.lang.Override public java.nio.file.FileVisitResult visitFile ( java.nio.file.Path filePath , java.nio.file.attribute.BasicFileAttributes attrs ) throws java.io.IOException { paths.add ( filePath ) ; return java.nio.file.FileVisitResult.CONTINUE ; } } ; java.nio.file.Files.walkFileTree ( rootDir.toPath ( ) , visitor ) ; assertEquals ( ( "Found: " + paths ) , expectedFiles , paths.size ( ) ) ; }
Source:
private static android.support.test.espresso.ViewAction actionOpenDrawer ( ) { return new android.support.test.espresso.ViewAction ( ) { @ java.lang.Override public org.hamcrest.Matcher < android.view.View > getConstraints ( ) { return android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom ( android.support.v4.widget.DrawerLayout.class ) ; } @ java.lang.Override public java.lang.String getDescription ( ) { return "open drawer" ; } @ java.lang.Override public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { ( ( android.support.v4.widget.DrawerLayout ) ( view ) ) . openDrawer ( GravityCompat.START ) ; } } ; }

Target:
private static android.support.test.espresso.ViewAction actionOpenDrawer ( final int gravity ) { return new android.support.test.espresso.ViewAction ( ) { @ java.lang.Override public org.hamcrest.Matcher < android.view.View > getConstraints ( ) { return android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom ( android.support.v4.widget.DrawerLayout.class ) ; } @ java.lang.Override public java.lang.String getDescription ( ) { return "open drawer with gravity " + gravity ; } @ java.lang.Override public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { ( ( android.support.v4.widget.DrawerLayout ) ( view ) ) . openDrawer ( gravity ) ; } } ; }
Source:
public boolean onKeyUp ( int keyCode , android.view.KeyEvent event ) { return doMovementKey ( keyCode , event , android.inputmethodservice.InputMethodService.MOVEMENT_UP ) ; }

Target:
public boolean onKeyUp ( int keyCode , android.view.KeyEvent event ) { if ( ( ( ( event.getKeyCode ( ) ) == ( android.view.KeyEvent.KEYCODE_BACK ) ) && ( event.isTracking ( ) ) ) && ( ! ( event.isCanceled ( ) ) ) ) { return handleBack ( true ) ; } return doMovementKey ( keyCode , event , android.inputmethodservice.InputMethodService.MOVEMENT_UP ) ; }
Source:
public void sendSingleScanChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( WifiScanner.WIFI_BAND_BOTH , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , 2400 , 5150 , 5175 ) ) ; }

Target:
public void sendSingleScanChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( channelsToSpec ( 2400 , 5150 , 5175 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , 2400 , 5150 , 5175 ) ) ; }
Source:
public void onMessageWaitingIndicatorChanged ( boolean visible ) { if ( com.android.phone.CallNotifier.VDBG ) log ( ( ( ( "onMessageWaitingIndicatorChanged(): " + ( this . mSubId ) ) + " " ) + visible ) ) ; mMWIStatus.put ( this . mSubId , visible ) ; updatePhoneStateListeners ( false ) ; }

Target:
public void onMessageWaitingIndicatorChanged ( boolean visible ) { if ( com.android.phone.CallNotifier.VDBG ) log ( ( ( ( "onMessageWaitingIndicatorChanged(): " + ( this . mSubId ) ) + " " ) + visible ) ) ; mMWIStatus.put ( this . mSubId , visible ) ; updatePhoneStateListeners ( false , com.android.phone.CallNotifier.UPDATE_TYPE_MWI , this . mSubId ) ; }
Source:
void needGlobalAttributesUpdate ( boolean force ) { android.view.View.AttachInfo ai = mAttachInfo ; if ( ai != null ) { if ( ( ai.mKeepScreenOn ) || force ) { ai.mRecomputeGlobalAttributes = true ; } } }

Target:
public boolean post ( java.lang.Runnable action ) { android.os.Handler handler ; android.view.View.AttachInfo attachInfo = mAttachInfo ; if ( attachInfo != null ) { handler = attachInfo.mHandler ; } else { android.view.ViewRootImpl.getRunQueue ( ) . post ( action ) ; return true ; } return handler.post ( action ) ; }
Source:
protected void setValue ( java.lang.Object element , java.lang.Object value ) { com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject project = ( ( com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject ) ( element ) ) ; project.setProjectName ( value.toString ( ) ) ; mCheckboxTableViewer.update ( element , null ) ; validatePage ( ) ; }

Target:
protected void setValue ( java.lang.Object element , java.lang.Object value ) { com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject project = ( ( com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject ) ( element ) ) ; project.setProjectName ( value.toString ( ) ) ; mCheckboxTableViewer.update ( element , null ) ; updateValidity ( ) ; validatePage ( ) ; }
Source:
public void testE3 ( ) { dot.junit.opcodes.aput_wide.d.T_aput_wide_1 t = new dot.junit.opcodes.aput_wide.d.T_aput_wide_1 ( ) ; long [ ] arr = new long [ 2 ] ; try { t.run ( arr , ( - 1 ) , 100000000000L ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE3 ( ) { loadAndRun ( "dot.junit.opcodes.aput_wide.d.T_aput_wide_1" , java.lang.ArrayIndexOutOfBoundsException.class , new long [ 2 ] , ( - 1 ) , 100000000000L ) ; }
Source:
public void focusChanged ( ) { synchronized ( this ) { loadImage ( ) ; selectedNode = model.getSelected ( ) ; } doRedraw ( ) ; }

Target:
public void focusChanged ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { loadImage ( ) ; selectedNode = model.getSelected ( ) ; } } } ) ; doRedraw ( ) ; }
Source:
public void writeCharacteristic ( int clientIf , java.lang.String address , int srvcType , int srvcInstanceId , android.os.ParcelUuid srvcId , int charInstanceId , android.os.ParcelUuid charId , int writeType , int authReq , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.writeCharacteristic ( clientIf , address , srvcType , srvcInstanceId , srvcId.getUuid ( ) , charInstanceId , charId.getUuid ( ) , writeType , authReq , value ) ; }

Target:
public void readDescriptor ( int clientIf , java.lang.String address , int handle , int authReq ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.readDescriptor ( clientIf , address , handle , authReq ) ; }
Source:
private double getRevisionRank ( com.android.sdklib.internal.repository.packages.FullRevision rev ) { int p = ( rev.isPreview ( ) ) ? 999 : 999 - ( rev.getPreview ( ) ) ; return ( ( ( rev.getMajor ( ) ) + ( ( rev.getMinor ( ) ) / 1000.0 ) ) + ( ( rev.getMicro ( ) ) / 1000000.0 ) ) + ( p / 1.0E9 ) ; }

Target:
private double getRevisionRank ( com.android.sdklib.repository.FullRevision rev ) { int p = ( rev.isPreview ( ) ) ? 999 : 999 - ( rev.getPreview ( ) ) ; return ( ( ( rev.getMajor ( ) ) + ( ( rev.getMinor ( ) ) / 1000.0 ) ) + ( ( rev.getMicro ( ) ) / 1000000.0 ) ) + ( p / 1.0E9 ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder strBuilder = new java.lang.StringBuilder ( ) ; strBuilder.append ( "{super=" ) . append ( super . toString ( ) ) . append ( ", mSocket=" ) . append ( mSocket ) . append ( ", mSpis[OUT].mResourceId=" ) . append ( mSpis [ android.net.IpSecTransform.DIRECTION_OUT ] . mResourceId ) . append ( ", mSpis[IN].mResourceId=" ) . append ( mSpis [ android.net.IpSecTransform.DIRECTION_IN ] . mResourceId ) . append ( ", mConfig=" ) . append ( mConfig ) . append ( "}" ) ; return strBuilder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder strBuilder = new java.lang.StringBuilder ( ) ; strBuilder.append ( "{super=" ) . append ( super . toString ( ) ) . append ( ", mSpi=" ) . append ( mSpi ) . append ( ", mDirection=" ) . append ( mDirection ) . append ( ", mLocalAddress=" ) . append ( mLocalAddress ) . append ( ", mRemoteAddress=" ) . append ( mRemoteAddress ) . append ( ", mOwnedByTransform=" ) . append ( mOwnedByTransform ) . append ( "}" ) ; return strBuilder.toString ( ) ; }
Source:
public void realRun ( ) throws java.lang.InterruptedException { long startTime = java.lang.System.nanoTime ( ) ; assertFalse ( q.tryTransfer ( new java.lang.Object ( ) , timeoutMillis ( ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ; assertTrue ( ( ( millisElapsedSince ( startTime ) ) >= ( timeoutMillis ( ) ) ) ) ; checkEmpty ( q ) ; }

Target:
public void realRun ( ) { while ( ! ( q.hasWaitingConsumer ( ) ) ) java.lang.Thread.yield ( ) ; assertTrue ( q.hasWaitingConsumer ( ) ) ; checkEmpty ( q ) ; assertTrue ( q.tryTransfer ( hotPotato ) ) ; }
Source:
public void onClick ( android.view.View v ) { toggleShuffle ( ) ; }

Target:
public void onClick ( android.view.View v ) { if ( ( getMediaController ( ) ) == null ) return ; if ( ( getMediaController ( ) . getPlaybackState ( ) . getPosition ( ) ) < 2000 ) { getMediaController ( ) . getTransportControls ( ) . skipToPrevious ( ) ; } else { getMediaController ( ) . getTransportControls ( ) . seekTo ( 0 ) ; getMediaController ( ) . getTransportControls ( ) . play ( ) ; } }
Source:
public void requireVersion ( int version ) { if ( ( mVersion ) >= version ) { return ; } mVersion = version ; org.chromium.mojo.bindings.interfacecontrol.RunOrClosePipeMessageParams message = new org.chromium.mojo.bindings.interfacecontrol.RunOrClosePipeMessageParams ( ) ; message.input = new org.chromium.mojo.bindings.interfacecontrol.RunOrClosePipeInput ( ) ; message.input.setRequireVersion ( new org.chromium.mojo.bindings.interfacecontrol.RequireVersion ( ) ) ; message.input.getRequireVersion ( ) . version = version ; org.chromium.mojo.bindings.InterfaceControlMessagesHelper.sendRunOrClosePipeMessage ( getCore ( ) , mMessageReceiver , message ) ; }

Target:
public void requireVersion ( int version ) { if ( ( mVersion ) >= version ) { return ; } mVersion = version ; org.chromium.mojo.bindings.RunOrClosePipeMessageParams message = new org.chromium.mojo.bindings.RunOrClosePipeMessageParams ( ) ; message.reserved0 = 16 ; message.reserved1 = 0 ; message.requireVersion = new org.chromium.mojo.bindings.RequireVersion ( ) ; message.requireVersion.version = version ; org.chromium.mojo.bindings.InterfaceControlMessagesHelper.sendRunOrClosePipeMessage ( getCore ( ) , mMessageReceiver , message ) ; }
Source:
public void writeOnImsCallStart ( int phoneId , com.android.ims.internal.ImsCallSession session ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = startNewCallSessionIfNeeded ( phoneId ) ; callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.RilCall.Type.IMS_COMMAND ) . setCallIndex ( getCallId ( session ) ) . setImsCommand ( TelephonyCallSession.Event.ImsCommand.IMS_CMD_START ) ) ; }

Target:
public void writeOnImsCallHandoverEvent ( int phoneId , int eventType , android.telephony.ims.ImsCallSession session , int srcAccessTech , int targetAccessTech , android.telephony.ims.ImsReasonInfo reasonInfo ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( eventType ) . setCallIndex ( getCallId ( session ) ) . setSrcAccessTech ( srcAccessTech ) . setTargetAccessTech ( targetAccessTech ) . setImsReasonInfo ( toImsReasonInfoProto ( reasonInfo ) ) ) ; } }
Source:
public static java.lang.reflect.InvocationHandler getInvocationHandler ( java.lang.Object proxy ) throws java.lang.IllegalArgumentException { if ( ! ( proxy instanceof java.lang.reflect.Proxy ) ) { throw new java.lang.IllegalArgumentException ( "not a proxy instance" ) ; } return ( ( java.lang.reflect.Proxy ) ( proxy ) ) . h ; }

Target:
public static java.lang.reflect.InvocationHandler getInvocationHandler ( java.lang.Object proxy ) throws java.lang.IllegalArgumentException { if ( ! ( java.lang.reflect.Proxy.isProxyClass ( proxy.getClass ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "not a proxy instance" ) ; } final java.lang.reflect.Proxy p = ( ( java.lang.reflect.Proxy ) ( proxy ) ) ; final java.lang.reflect.InvocationHandler ih = p.h ; return ih ; }
Source:
private org.gradle.api.Task createAssembleTask ( com.android.build.gradle.internal.ProductFlavorData [ ] flavorDataList ) { java.lang.String name = com.android.build.gradle.internal.ProductFlavorData.getFlavoredName ( flavorDataList , true ) ; org.gradle.api.Task assembleTask = project.getTasks ( ) . create ( ( "assemble" + name ) ) ; assembleTask.setDescription ( ( "Assembles all builds for flavor " + name ) ) ; assembleTask.setGroup ( "Build" ) ; return assembleTask ; }

Target:
private org.gradle.api.Task createAssembleTask ( com.android.build.gradle.internal.ProductFlavorData [ ] flavorDataList ) { java.lang.String name = com.android.build.gradle.internal.ProductFlavorData.getFlavoredName ( flavorDataList , true ) ; org.gradle.api.Task assembleTask = project.getTasks ( ) . create ( ( "assemble" + name ) ) ; assembleTask.setDescription ( ( "Assembles all builds for flavor combination: " + name ) ) ; assembleTask.setGroup ( "Build" ) ; return assembleTask ; }
Source:
public void test_d2i_SSL_SESSION ( ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( null ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( new byte [ 0 ] ) ; org.junit.Assert.fail ( "Should throw IOException with invalid SSL_SESSION data" ) ; } catch ( java.io.IOException expected ) { } try { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( new byte [ 1 ] ) ; org.junit.Assert.fail ( "Should throw IOException with invalid SSL_SESSION data" ) ; } catch ( java.io.IOException expected ) { } }

Target:
public void d2i_SSL_SESSION_EmptyArgument ( ) throws java.lang.Exception { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( new byte [ 0 ] ) ; }
Source:
private static void onPublishTerminated ( int publishId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onPublishTerminated: publishId=" + publishId ) + ", status=" ) + status ) ) ; com.android.server.wifi.aware.WifiAwareStateManager.getInstance ( ) . onSessionTerminatedNotification ( publishId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ) , true ) ; }

Target:
private static void onPublishTerminated ( int publishId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onPublishTerminated: publishId=" + publishId ) + ", status=" ) + status ) ) ; com.android.server.wifi.aware.WifiAwareNative.sWifiAwareStateManager.onSessionTerminatedNotification ( publishId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ) , true ) ; }
Source:
public static libcore.javax.net.ssl.TestSSLEnginePair create ( libcore.javax.net.ssl.TestSSLContext c , libcore.javax.net.ssl.TestSSLEnginePair.Hooks hooks ) throws java.io.IOException { javax.net.ssl.SSLEngine [ ] engines = libcore.javax.net.ssl.TestSSLEnginePair.connect ( c , hooks ) ; return new libcore.javax.net.ssl.TestSSLEnginePair ( c , engines [ 0 ] , engines [ 1 ] ) ; }

Target:
public static libcore.javax.net.ssl.TestSSLEnginePair create ( libcore.javax.net.ssl.TestSSLContext c , libcore.javax.net.ssl.TestSSLEnginePair.Hooks hooks , boolean [ ] finished ) throws java.io.IOException { javax.net.ssl.SSLEngine [ ] engines = libcore.javax.net.ssl.TestSSLEnginePair.connect ( c , hooks , finished ) ; return new libcore.javax.net.ssl.TestSSLEnginePair ( c , engines [ 0 ] , engines [ 1 ] ) ; }
Source:
private byte getPlayStateBytes ( android.media.session.PlaybackState pbState ) { byte playStateBytes = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_STOPPED ; if ( pbState != null ) { playStateBytes = ( ( byte ) ( convertPlayStateToBytes ( pbState.getState ( ) ) ) ) ; android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "getPlayBackState: playStateBytes = " + playStateBytes ) ) ; } else { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "playState object null, sending playStateBytes = " + playStateBytes ) ) ; } return playStateBytes ; }

Target:
private void scheduleMediaUpdate ( ) { android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_UPDATE_MEDIA ) ; mHandler.sendMessageDelayed ( msg , com.android.bluetooth.avrcp.Avrcp.MEDIA_DWELL_TIME ) ; }
Source:
static java.lang.String getTimeZoneText ( java.util.TimeZone tz ) { java.util.Date now = new java.util.Date ( ) ; return com.android.settings.DateTimeSettings.formatOffset ( new java.lang.StringBuilder ( ) , tz , now ) . append ( ", " ) . append ( tz.getDisplayName ( tz.inDaylightTime ( now ) , java.util.TimeZone.LONG ) ) . toString ( ) ; }

Target:
private static java.lang.String getTimeZoneText ( java.util.TimeZone tz ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( "ZZZZ, zzzz" ) ; sdf.setTimeZone ( tz ) ; return sdf.format ( new java.util.Date ( ) ) ; }
Source:
private static android.net.NetworkState buildMobile3gState ( java.lang.String subscriberId , boolean isRoaming ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_MOBILE , android.telephony.TelephonyManager.NETWORK_TYPE_UMTS , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; info.setRoaming ( isRoaming ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( com.android.server.net.NetworkStatsServiceTest.TEST_IFACE ) ; return new android.net.NetworkState ( info , prop , null , null , subscriberId , null ) ; }

Target:
private static android.net.NetworkState buildMobile3gState ( java.lang.String subscriberId , boolean isRoaming ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_MOBILE , android.telephony.TelephonyManager.NETWORK_TYPE_UMTS , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; info.setRoaming ( isRoaming ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( com.android.server.net.NetworkStatsServiceTest.TEST_IFACE ) ; final android.net.NetworkCapabilities capabilities = new android.net.NetworkCapabilities ( ) ; return new android.net.NetworkState ( info , prop , capabilities , null , subscriberId , null ) ; }
Source:
public void copyFrom ( int [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFromUnchecked ( java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFromUnchecked" ) ; copyFromUnchecked ( array , validateObjectIsPrimitiveArray ( array , false ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private void updateNodeProxies ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi ) { if ( vi == null ) { return ; } com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode key = vi.getUiViewKey ( ) ; if ( key != null ) { mNodeFactory.create ( vi ) ; } for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo child : vi.getChildren ( ) ) { updateNodeProxies ( child ) ; } }

Target:
void updateMenuActions ( boolean hasSelection ) { mCutAction.setEnabled ( hasSelection ) ; mCopyAction.setEnabled ( hasSelection ) ; mDeleteAction.setEnabled ( hasSelection ) ; mSelectAllAction.setEnabled ( hasSelection ) ; boolean hasSxt = mClipboardSupport.hasSxtOnClipboard ( ) ; mPasteAction.setEnabled ( hasSxt ) ; }
Source:
public void addMethodAnnotations ( com.android.dx.rop.cst.CstMethodRef method , com.android.dx.rop.annotation.Annotations annotations ) { if ( ( methodAnnotations ) == null ) { methodAnnotations = new java.util.ArrayList < com.android.dx.dex.file.MethodAnnotationStruct > ( ) ; } methodAnnotations.add ( new com.android.dx.dex.file.MethodAnnotationStruct ( method , new com.android.dx.dex.file.AnnotationSetItem ( annotations ) ) ) ; }

Target:
public void addMethodAnnotations ( com.android.dx.rop.cst.CstMethodRef method , com.android.dx.rop.annotation.Annotations annotations , com.android.dx.dex.file.DexFile dexFile ) { if ( ( methodAnnotations ) == null ) { methodAnnotations = new java.util.ArrayList < com.android.dx.dex.file.MethodAnnotationStruct > ( ) ; } methodAnnotations.add ( new com.android.dx.dex.file.MethodAnnotationStruct ( method , new com.android.dx.dex.file.AnnotationSetItem ( annotations , dexFile ) ) ) ; }
Source:
public java.util.List < java.lang.String > getApplicableMethodNames ( ) { java.util.List < java.lang.String > values = new java.util.ArrayList < java.lang.String > ( 3 ) ; values.add ( "openFileOutput" ) ; values.add ( "getSharedPreferences" ) ; values.add ( "getDir" ) ; return values ; }

Target:
public java.util.List < java.lang.String > getApplicableMethodNames ( ) { java.util.List < java.lang.String > values = new java.util.ArrayList < java.lang.String > ( 3 ) ; values.add ( "openFileOutput" ) ; values.add ( "getSharedPreferences" ) ; values.add ( "getDir" ) ; values.add ( "setReadable" ) ; values.add ( "setWritable" ) ; return values ; }
Source:
private boolean isTemplateRelevant ( android.net.NetworkTemplate template ) { final android.telephony.TelephonyManager tele = android.telephony.TelephonyManager.from ( mContext ) ; switch ( template.getMatchRule ( ) ) { case android.net.NetworkTemplate.MATCH_MOBILE_3G_LOWER : case android.net.NetworkTemplate.MATCH_MOBILE_4G : case android.net.NetworkTemplate.MATCH_MOBILE_ALL : if ( ( tele.getSimState ( ) ) == ( android.telephony.TelephonyManager.SIM_STATE_READY ) ) { return com.android.internal.util.Objects.equal ( tele.getSubscriberId ( ) , template.getSubscriberId ( ) ) ; } else { return false ; } } return true ; }

Target:
private boolean isTemplateRelevant ( android.net.NetworkTemplate template ) { final android.telephony.TelephonyManager tele = android.telephony.TelephonyManager.from ( mContext ) ; switch ( template.getMatchRule ( ) ) { case android.net.NetworkTemplate.MATCH_MOBILE_3G_LOWER : case android.net.NetworkTemplate.MATCH_MOBILE_4G : case android.net.NetworkTemplate.MATCH_MOBILE_ALL : if ( ( tele.getSimState ( ) ) == ( android.telephony.TelephonyManager.SIM_STATE_READY ) ) { return java.util.Objects.equals ( tele.getSubscriberId ( ) , template.getSubscriberId ( ) ) ; } else { return false ; } } return true ; }
Source:
public void selectionChanged ( org.eclipse.jface.viewers.SelectionChangedEvent event ) { org.eclipse.jface.viewers.ISelection selection = event.getSelection ( ) ; if ( selection instanceof org.eclipse.jface.viewers.IStructuredSelection ) { org.eclipse.jface.viewers.IStructuredSelection structSelection = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( selection ) ) ; java.lang.Object first = structSelection.getFirstElement ( ) ; if ( first instanceof com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier ) { mAddButton.setEnabled ( true ) ; return ; } } mAddButton.setEnabled ( false ) ; }

Target:
public void selectionChanged ( org.eclipse.jface.viewers.SelectionChangedEvent event ) { org.eclipse.jface.viewers.ISelection selection = event.getSelection ( ) ; if ( selection instanceof org.eclipse.jface.viewers.IStructuredSelection ) { org.eclipse.jface.viewers.IStructuredSelection structSelection = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( selection ) ) ; java.lang.Object first = structSelection.getFirstElement ( ) ; if ( first instanceof com.android.ide.common.resources.configuration.ResourceQualifier ) { mAddButton.setEnabled ( true ) ; return ; } } mAddButton.setEnabled ( false ) ; }
Source:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . description ( "Email or phone" ) ) . exists ( ) ; }

Target:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { if ( ( com.android.devtools.systemimage.uitest.utils.SystemUtil.getApiLevel ( ) ) <= 24 ) { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . description ( "Email or phone" ) ) . exists ( ) ; } else { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( "Email or phone" ) ) . exists ( ) ; } }
Source:
public void preDexLibrary ( @ com.android.annotations.NonNull java.io.File inputFile , @ com.android.annotations.NonNull java.io.File outFile , @ com.android.annotations.NonNull com.android.builder.core.DexOptions dexOptions ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { com.google.common.base.Preconditions.checkState ( ( ( mTargetInfo ) != null ) , "Cannot call preDexLibrary() before setTargetInfo() is called." ) ; com.android.sdklib.BuildToolInfo buildToolInfo = mTargetInfo.getBuildTools ( ) ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( inputFile , outFile , dexOptions , buildToolInfo , mVerboseExec , mCmdLineRunner ) ; }

Target:
public void preDexLibrary ( @ com.android.annotations.NonNull java.io.File inputFile , @ com.android.annotations.NonNull java.io.File outFile , boolean multiDex , @ com.android.annotations.NonNull com.android.builder.core.DexOptions dexOptions ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { com.google.common.base.Preconditions.checkState ( ( ( mTargetInfo ) != null ) , "Cannot call preDexLibrary() before setTargetInfo() is called." ) ; com.android.sdklib.BuildToolInfo buildToolInfo = mTargetInfo.getBuildTools ( ) ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( inputFile , outFile , multiDex , dexOptions , buildToolInfo , mVerboseExec , mCmdLineRunner ) ; }
Source:
synchronized void nScriptForEach ( long id , int slot , long [ ] ains , long aout , byte [ ] params , int [ ] limits ) { validate ( ) ; rsnScriptForEach ( mContext , id , slot , ains , aout , params , limits ) ; }

Target:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , id , slot , ain , aout ) ; } else { rsnScriptForEach ( mContext , id , slot , ain , aout , params ) ; } }
Source:
public void clearMatches ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearMatches ( ) ; } } ) ; return ; } mAwContents.clearMatches ( ) ; }

Target:
public void documentHasImages ( final android.os.Message response ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { documentHasImages ( response ) ; } } ) ; return ; } mAwContents.documentHasImages ( response ) ; }
Source:
public void testKeyStore_GetCertificateAlias_NonExist_Encrypted_Failure ( ) 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 userCert = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_USER_1 ) ) ; assertNull ( "Stored certificate alias should be found" , mKeyStore.getCertificateAlias ( userCert ) ) ; }

Target:
public void testKeyStore_GetCertificateAlias_NonExist_Encrypted_Failure ( ) 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 userCert = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_RSA_USER_1 ) ) ; assertNull ( "Stored certificate alias should be found" , mKeyStore.getCertificateAlias ( userCert ) ) ; }
Source:
public void terminateSession ( int sessionId ) { com.android.server.wifi.nan.WifiNanDiscoverySessionState session = mSessions.get ( sessionId ) ; if ( session == null ) { android.util.Log.e ( com.android.server.wifi.nan.WifiNanClientState.TAG , ( "terminateSession: sessionId doesn't exist - " + sessionId ) ) ; return ; } session.terminate ( ) ; mSessions.delete ( sessionId ) ; }

Target:
public void terminateSession ( int sessionId ) { com.android.server.wifi.aware.WifiAwareDiscoverySessionState session = mSessions.get ( sessionId ) ; if ( session == null ) { android.util.Log.e ( com.android.server.wifi.aware.WifiAwareClientState.TAG , ( "terminateSession: sessionId doesn't exist - " + sessionId ) ) ; return ; } session.terminate ( ) ; mSessions.delete ( sessionId ) ; }
Source:
public com.android.ims.internal.IImsServiceController getImsServiceControllerAndListen ( int slotIndex , @ android.telephony.TelephonyManager.Feature int feature , com.android.ims.internal.IImsServiceFeatureListener callback ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getImsServiceControllerAndListen ( slotIndex , feature , callback ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsServiceControllerAndListen, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }

Target:
public android.telephony.ims.aidl.IImsMmTelFeature getImsMmTelFeatureAndListen ( int slotIndex , com.android.ims.internal.IImsServiceFeatureCallback callback ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getMmTelFeatureAndListen ( slotIndex , callback ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsMmTelFeatureAndListen, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public static int getCallTypeFromVideoState ( int videoState ) { boolean videoTx = com.android.ims.ImsCallProfile.isVideoStateSet ( videoState , VideoProfile.STATE_TX_ENABLED ) ; boolean videoRx = com.android.ims.ImsCallProfile.isVideoStateSet ( videoState , VideoProfile.STATE_RX_ENABLED ) ; boolean isPaused = com.android.ims.ImsCallProfile.isVideoStateSet ( videoState , VideoProfile.STATE_PAUSED ) ; if ( isPaused ) { return com.android.ims.ImsCallProfile.CALL_TYPE_VT_NODIR ; } else if ( videoTx && ( ! videoRx ) ) { return com.android.ims.ImsCallProfile.CALL_TYPE_VT_TX ; } else if ( ( ! videoTx ) && videoRx ) { return com.android.ims.ImsCallProfile.CALL_TYPE_VT_RX ; } else if ( videoTx && videoRx ) { return com.android.ims.ImsCallProfile.CALL_TYPE_VT ; } return com.android.ims.ImsCallProfile.CALL_TYPE_VOICE ; }

Target:
public static int getCallTypeFromVideoState ( int videoState ) { boolean videoTx = android.telephony.ims.ImsCallProfile.isVideoStateSet ( videoState , VideoProfile.STATE_TX_ENABLED ) ; boolean videoRx = android.telephony.ims.ImsCallProfile.isVideoStateSet ( videoState , VideoProfile.STATE_RX_ENABLED ) ; boolean isPaused = android.telephony.ims.ImsCallProfile.isVideoStateSet ( videoState , VideoProfile.STATE_PAUSED ) ; if ( isPaused ) { return android.telephony.ims.ImsCallProfile.CALL_TYPE_VT_NODIR ; } else if ( videoTx && ( ! videoRx ) ) { return android.telephony.ims.ImsCallProfile.CALL_TYPE_VT_TX ; } else if ( ( ! videoTx ) && videoRx ) { return android.telephony.ims.ImsCallProfile.CALL_TYPE_VT_RX ; } else if ( videoTx && videoRx ) { return android.telephony.ims.ImsCallProfile.CALL_TYPE_VT ; } return android.telephony.ims.ImsCallProfile.CALL_TYPE_VOICE ; }
Source:
public android.net.Uri insert ( android.net.Uri uri , android.content.ContentValues values ) { final long row = getWritableDatabase ( ) . insertOrThrow ( com.android.providers.telephony.CarrierIdProvider.CARRIER_ID_TABLE , null , values ) ; if ( row > 0 ) { final android.net.Uri newUri = android.content.ContentUris.withAppendedId ( com.android.providers.telephony.CarrierIdProvider.CONTENT_URI , row ) ; getContext ( ) . getContentResolver ( ) . notifyChange ( newUri , null ) ; return newUri ; } return null ; }

Target:
public android.net.Uri insert ( android.net.Uri uri , android.content.ContentValues values ) { final long row = getWritableDatabase ( ) . insertOrThrow ( com.android.providers.telephony.CarrierIdProvider.CARRIER_ID_TABLE , null , values ) ; if ( row > 0 ) { final android.net.Uri newUri = android.content.ContentUris.withAppendedId ( CarrierIdentification.CONTENT_URI , row ) ; getContext ( ) . getContentResolver ( ) . notifyChange ( newUri , null ) ; return newUri ; } return null ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JLambda x ) { expression = new com.android.jack.ir.ast.JLambda ( x.getSourceInfo ( ) , x.getMethodIdToImplement ( ) , x.getMethod ( ) , x.getType ( ) , x.needToCaptureInstance ( ) , x.getInterfaceBounds ( ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JLambda lambda ) { com.android.jack.ir.ast.JLambda clonedLambda = new com.android.jack.ir.ast.JLambda ( lambda.getSourceInfo ( ) , lambda.getMethodIdWithErasure ( ) , lambda.getMethodIdRef ( ) , lambda.getType ( ) , lambda.getInterfaceBounds ( ) , lambda.getMethodIdWithoutErasure ( ) ) ; for ( com.android.jack.ir.ast.JExpression capturedVar : lambda.getCapturedVariables ( ) ) { clonedLambda.addCapturedVariable ( cloneExpression ( capturedVar ) ) ; } expression = clonedLambda ; return false ; }
Source:
public void onAnimationEnd ( android.animation.Animator animation ) { mPrimaryCallCardContainer.setTag ( R.id.view_tag_callcard_actual_height , null ) ; setViewStatePostAnimation ( listener ) ; mIsAnimating = false ; com.android.incallui.InCallPresenter.getInstance ( ) . onShrinkAnimationComplete ( ) ; }

Target:
public void onAnimationEnd ( android.animation.Animator animation ) { mPrimaryCallCardContainer.setTag ( R.id.view_tag_callcard_actual_height , null ) ; setViewStatePostAnimation ( listener ) ; mIsAnimating = false ; com.android.incallui.InCallPresenter.getInstance ( ) . onShrinkAnimationComplete ( ) ; if ( animator != null ) { animator.removeListener ( this ) ; } }
Source:
protected void setupTests ( com.android.cts.verifier.ArrayTestListAdapter adapter ) { setupFingerprintTests ( adapter ) ; setupDisableTrustAgentsTest ( adapter ) ; adapter.add ( new com.android.cts.verifier.admin.DialogTestListItem ( this , R.string.device_admin_keyguard_disable_camera , ( ( getTestIdPrefix ( ) ) + "KeyguardDisableCamera" ) , R.string.device_admin_keyguard_disable_camera_instruction , new android.content.Intent ( com.android.cts.verifier.managedprovisioning.ByodHelperActivity.ACTION_LOCKNOW ) ) ) ; adapter.add ( new com.android.cts.verifier.admin.DialogTestListItem ( this , R.string.device_admin_disable_notifications , "DeviceAdmin_DisableNotifications" , R.string.device_admin_disable_notifications_instruction , new android.content.Intent ( com.android.cts.verifier.managedprovisioning.ByodHelperActivity.ACTION_NOTIFICATION_ON_LOCKSCREEN ) ) ) ; }

Target:
protected void setupTests ( com.android.cts.verifier.ArrayTestListAdapter adapter ) { setupFingerprintTests ( adapter ) ; if ( hasTrustAgents ( ) ) { setupDisableTrustAgentsTest ( adapter ) ; } adapter.add ( new com.android.cts.verifier.admin.DialogTestListItem ( this , R.string.device_admin_keyguard_disable_camera , ( ( getTestIdPrefix ( ) ) + "KeyguardDisableCamera" ) , R.string.device_admin_keyguard_disable_camera_instruction , new android.content.Intent ( com.android.cts.verifier.managedprovisioning.ByodHelperActivity.ACTION_LOCKNOW ) ) ) ; adapter.add ( new com.android.cts.verifier.admin.DialogTestListItem ( this , R.string.device_admin_disable_notifications , "DeviceAdmin_DisableNotifications" , R.string.device_admin_disable_notifications_instruction , new android.content.Intent ( com.android.cts.verifier.managedprovisioning.ByodHelperActivity.ACTION_NOTIFICATION_ON_LOCKSCREEN ) ) ) ; }
Source:
void disconnect ( com.android.server.telecom.Call call ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "disconnect" ) ) ) { try { logOutgoing ( "disconnect %s" , callId ) ; mServiceInterface.disconnect ( callId ) ; } catch ( android.os.RemoteException e ) { } } }

Target:
public void onCallAudioStateChanged ( com.android.server.telecom.Call activeCall , android.telecom.CallAudioState audioState ) { final java.lang.String callId = mCallIdMapper.getCallId ( activeCall ) ; if ( ( callId != null ) && ( isServiceValid ( "onCallAudioStateChanged" ) ) ) { try { logOutgoing ( "onCallAudioStateChanged %s %s" , callId , audioState ) ; mServiceInterface.onCallAudioStateChanged ( callId , audioState , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException e ) { } } }
Source:
public boolean zoomIn ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return zoomIn ( ) ; } } ) ; return ret ; } return mAwContents.zoomIn ( ) ; }

Target:
public void flingScroll ( final int vx , final int vy ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { flingScroll ( vx , vy ) ; } } ) ; return ; } mAwContents.flingScroll ( vx , vy ) ; }
Source:
public static java.lang.String getPackageLabel ( android.content.Context context ) { android.os.StrictMode.ThreadPolicy oldPolicy = android.os.StrictMode.allowThreadDiskReads ( ) ; try { android.content.pm.PackageManager packageManager = context.getPackageManager ( ) ; android.content.pm.ApplicationInfo appInfo = packageManager.getApplicationInfo ( context.getPackageName ( ) , PackageManager.GET_META_DATA ) ; java.lang.CharSequence label = packageManager.getApplicationLabel ( appInfo ) ; return label != null ? label.toString ( ) : "" ; } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { return "" ; } finally { android.os.StrictMode.setThreadPolicy ( oldPolicy ) ; } }

Target:
public static java.lang.String getPackageLabel ( ) { android.os.StrictMode.ThreadPolicy oldPolicy = android.os.StrictMode.allowThreadDiskReads ( ) ; try { android.content.pm.PackageManager packageManager = org.chromium.base.ContextUtils.getApplicationContext ( ) . getPackageManager ( ) ; android.content.pm.ApplicationInfo appInfo = packageManager.getApplicationInfo ( org.chromium.base.BuildInfo.getPackageName ( ) , PackageManager.GET_META_DATA ) ; java.lang.CharSequence label = packageManager.getApplicationLabel ( appInfo ) ; return label != null ? label.toString ( ) : "" ; } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { return "" ; } finally { android.os.StrictMode.setThreadPolicy ( oldPolicy ) ; } }
Source:
public void testBatteryStatsNotUpdated ( ) throws java.lang.Exception { int [ ] irrelevantStates = new int [ ] { ( WifiStateTracker.SCAN_MODE ) - 1 , ( WifiStateTracker.SOFT_AP ) + 1 } ; for ( int i = 0 ; i < ( irrelevantStates.length ) ; i ++ ) { mWifiStateTracker.updateState ( irrelevantStates [ i ] ) ; } org.mockito.Mockito.verify ( mBatteryStats , org.mockito.Mockito.times ( 0 ) ) . noteWifiState ( org.mockito.Mockito.anyInt ( ) , org.mockito.Mockito.anyString ( ) ) ; }

Target:
public void testBatteryStatsNotUpdated ( ) throws java.lang.Exception { int [ ] irrelevantStates = new int [ ] { ( WifiStateTracker.SCAN_MODE ) - 1 , ( WifiStateTracker.SOFT_AP ) + 1 } ; for ( int i = 0 ; i < ( irrelevantStates.length ) ; i ++ ) { mWifiStateTracker.updateState ( irrelevantStates [ i ] ) ; } org.mockito.Mockito.verify ( mBatteryStats , org.mockito.Mockito.times ( 0 ) ) . noteWifiState ( org.mockito.Mockito.anyInt ( ) , org.mockito.Mockito.any ( ) ) ; }
Source:
public void testDefault ( ) throws java.lang.Exception { if ( ! ( supportedHardware ( ) ) ) return ; startVpn ( new java.lang.String [ ] { "192.0.2.2/32" , "2001:db8:1:2::ffe/128" } , new java.lang.String [ ] { "192.0.2.0/24" , "2001:db8::/32" } , "" , "" ) ; checkTrafficOnVpn ( ) ; }

Target:
public void testAppAllowed ( ) throws java.lang.Exception { if ( ! ( supportedHardware ( ) ) ) return ; startVpn ( new java.lang.String [ ] { "192.0.2.2/32" , "2001:db8:1:2::ffe/128" } , new java.lang.String [ ] { "192.0.2.0/24" , "2001:db8::/32" } , mPackageName , "" ) ; checkTrafficOnVpn ( ) ; }
Source:
public android.content.pm.ResolveInfo resolveService ( android.content.Intent intent , java.lang.String resolvedType , int flags , int userId ) { java.util.List < android.content.pm.ResolveInfo > query = queryIntentServices ( intent , resolvedType , flags , userId ) ; if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return null ; if ( query != null ) { if ( ( query.size ( ) ) >= 1 ) { return query.get ( 0 ) ; } } return null ; }

Target:
public android.content.pm.ResolveInfo resolveService ( android.content.Intent intent , java.lang.String resolvedType , int flags , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return null ; flags = updateFlagsForResolve ( flags , userId , intent ) ; java.util.List < android.content.pm.ResolveInfo > query = queryIntentServicesInternal ( intent , resolvedType , flags , userId ) ; if ( query != null ) { if ( ( query.size ( ) ) >= 1 ) { return query.get ( 0 ) ; } } return null ; }
Source:
public void onClick ( android.view.View v ) { java.lang.String input = null ; switch ( v.getId ( ) ) { case com.android.stk.StkDialogActivity.OK_BUTTON : com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , ( "OK Clicked!, mSlotId: " + ( mSlotId ) ) ) ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_CONFIRM , true ) ; break ; case com.android.stk.StkDialogActivity.CANCEL_BUTTON : com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , ( "Cancel Clicked!, mSlotId: " + ( mSlotId ) ) ) ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_CONFIRM , false ) ; break ; } finish ( ) ; }

Target:
public void onClick ( android.content.DialogInterface dialog , int id ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , ( "OK Clicked!, mSlotId: " + ( mSlotId ) ) ) ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_CONFIRM , true ) ; finish ( ) ; }
Source:
public int getDataNetworkTypeForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getDataNetworkTypeForSubscriber" ) ) ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getServiceState ( ) . getDataNetworkType ( ) ; } else { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }

Target:
public int getVoiceNetworkTypeForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getDataNetworkTypeForSubscriber" ) ) ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getServiceState ( ) . getVoiceNetworkType ( ) ; } else { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }
Source:
public static com.android.managedprovisioning.UserConsentDialog newInstance ( int ownerType ) { com.android.managedprovisioning.UserConsentDialog dialog = new com.android.managedprovisioning.UserConsentDialog ( ) ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( com.android.managedprovisioning.UserConsentDialog.KEY_OWNER_TYPE , ownerType ) ; dialog.setArguments ( args ) ; return dialog ; }

Target:
public static com.android.managedprovisioning.UserConsentDialog newInstance ( int ownerType , boolean showFrpWarning ) { com.android.managedprovisioning.UserConsentDialog dialog = new com.android.managedprovisioning.UserConsentDialog ( ) ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( com.android.managedprovisioning.UserConsentDialog.KEY_OWNER_TYPE , ownerType ) ; args.putBoolean ( com.android.managedprovisioning.UserConsentDialog.KEY_SHOW_FRP_WARNING , showFrpWarning ) ; dialog.setArguments ( args ) ; return dialog ; }
Source:
com.ibm.icu.text.PluralRules.StandardPluralCategories endSame ( com.ibm.icu.text.PluralRules.StandardPluralCategories end ) { com.ibm.icu.text.PluralRules.StandardPluralCategories first = null ; for ( com.ibm.icu.text.PluralRules.StandardPluralCategories start : com.ibm.icu.text.PluralRules.StandardPluralCategories.VALUES ) { com.ibm.icu.text.PluralRules.StandardPluralCategories item = get ( start , end ) ; if ( item == null ) { continue ; } if ( first == null ) { first = item ; continue ; } if ( first != item ) { return null ; } } return first ; }

Target:
com.ibm.icu.impl.StandardPlural endSame ( com.ibm.icu.impl.StandardPlural end ) { com.ibm.icu.impl.StandardPlural first = null ; for ( com.ibm.icu.impl.StandardPlural start : com.ibm.icu.impl.StandardPlural.VALUES ) { com.ibm.icu.impl.StandardPlural item = get ( start , end ) ; if ( item == null ) { continue ; } if ( first == null ) { first = item ; continue ; } if ( first != item ) { return null ; } } return first ; }