auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.android.ide.common.rendering.api.ResourceValue resolveResValue ( com.android.ide.common.rendering.api.ResourceValue value ) { if ( value == null ) { return null ; } if ( value instanceof com.android.ide.common.rendering.api.StyleResourceValue ) { return value ; } com.android.ide.common.rendering.api.ResourceValue resolvedValue = findResValue ( value.getValue ( ) , value.isFramework ( ) ) ; if ( resolvedValue == null ) { return value ; } return resolveResValue ( resolvedValue ) ; }

Target:
public com.android.ide.common.rendering.api.ResourceValue resolveResValue ( com.android.ide.common.rendering.api.ResourceValue resValue ) { if ( resValue == null ) { return null ; } java.lang.String value = resValue.getValue ( ) ; if ( value == null ) { return resValue ; } com.android.ide.common.rendering.api.ResourceValue resolvedResValue = findResValue ( value , resValue.isFramework ( ) ) ; if ( resolvedResValue == null ) { return resValue ; } return resolveResValue ( resolvedResValue ) ; }
Source:
public boolean equals ( java.lang.Object qualifier ) { if ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.RegionQualifier ) { if ( ( mValue ) == null ) { return ( ( ( com.android.ide.eclipse.adt.internal.resources.configurations.RegionQualifier ) ( qualifier ) ) . mValue ) == null ; } return mValue.equals ( ( ( com.android.ide.eclipse.adt.internal.resources.configurations.RegionQualifier ) ( qualifier ) ) . mValue ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object qualifier ) { if ( qualifier instanceof com.android.ide.common.resources.configuration.RegionQualifier ) { if ( ( mValue ) == null ) { return ( ( ( com.android.ide.common.resources.configuration.RegionQualifier ) ( qualifier ) ) . mValue ) == null ; } return mValue.equals ( ( ( com.android.ide.common.resources.configuration.RegionQualifier ) ( qualifier ) ) . mValue ) ; } return false ; }
Source:
private void toggleRecentApps ( ) { mPreloadedRecentApps = false ; sendCloseSystemWindows ( com.android.internal.policy.impl.PhoneWindowManager.SYSTEM_DIALOG_REASON_RECENT_APPS ) ; try { com.android.internal.statusbar.IStatusBarService statusbar = getStatusBarService ( ) ; if ( statusbar != null ) { statusbar.toggleRecentApps ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Slog.e ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "RemoteException when showing recent apps" , e ) ; mStatusBarService = null ; } }

Target:
public void showRecentApps ( ) { mHandler.removeMessages ( com.android.internal.policy.impl.PhoneWindowManager.MSG_DISPATCH_SHOW_RECENTS ) ; mHandler.sendEmptyMessage ( com.android.internal.policy.impl.PhoneWindowManager.MSG_DISPATCH_SHOW_RECENTS ) ; }
Source:
private void answerIncomingCall ( int videoState ) { com.android.incallui.call.CallList callList = com.android.incallui.InCallPresenter.getInstance ( ) . getCallList ( ) ; if ( callList == null ) { com.android.incallui.StatusBarNotifier.clearAllCallNotifications ( ) ; com.android.dialer.common.LogUtil.e ( "NotificationBroadcastReceiver.answerIncomingCall" , "call list is empty" ) ; } else { com.android.incallui.call.DialerCall call = callList.getIncomingCall ( ) ; if ( call != null ) { call.answer ( videoState ) ; com.android.incallui.InCallPresenter.getInstance ( ) . showInCall ( false , false ) ; } } }

Target:
public void onFailure ( java.lang.Throwable t ) { answerIncomingCallCallback ( call , videoState ) ; throw new java.lang.RuntimeException ( "Failed to successfully complete pre call tasks." , t ) ; }
Source:
private static android.view.MotionEvent newTouchDownEvent ( int x , int y ) { long downTime = android.os.SystemClock.uptimeMillis ( ) ; android.view.MotionEvent event = android.view.MotionEvent.obtain ( downTime , downTime , MotionEvent.ACTION_DOWN , x , y , 1 ) ; event.setSource ( InputDevice.SOURCE_TOUCHSCREEN ) ; return event ; }

Target:
private static android.view.MotionEvent newTouchDownEvent ( int x , int y ) { long downTime = android.os.SystemClock.uptimeMillis ( ) ; android.view.MotionEvent event = android.view.MotionEvent.obtain ( downTime , downTime , MotionEvent.ACTION_DOWN , x , y , 1 ) ; if ( ( Build.VERSION.SDK_INT ) >= ( Build.VERSION_CODES.HONEYCOMB_MR1 ) ) { event.setSource ( InputDevice.SOURCE_TOUCHSCREEN ) ; } return event ; }
Source:
public boolean registerRemoteController ( android.media.IRemoteControlDisplay rcd , int w , int h , android.content.ComponentName listenerComp ) { return mMediaFocusControl.registerRemoteController ( rcd , w , h , listenerComp ) ; }

Target:
private boolean wouldToggleZenMode ( int newMode ) { if ( ( ( getRingerModeExternal ( ) ) == ( android.media.AudioManager.RINGER_MODE_SILENT ) ) && ( newMode != ( android.media.AudioManager.RINGER_MODE_SILENT ) ) ) { return true ; } else if ( ( ( getRingerModeExternal ( ) ) != ( android.media.AudioManager.RINGER_MODE_SILENT ) ) && ( newMode == ( android.media.AudioManager.RINGER_MODE_SILENT ) ) ) { return true ; } return false ; }
Source:
private boolean allowMute ( com.android.internal.telephony.Phone phone ) { if ( ( phone.getPhoneType ( ) ) == ( android.telephony.TelephonyManager.PHONE_TYPE_CDMA ) ) { com.android.internal.telephony.PhoneProxy phoneProxy = ( ( com.android.internal.telephony.PhoneProxy ) ( phone ) ) ; com.android.internal.telephony.cdma.CDMAPhone cdmaPhone = ( ( com.android.internal.telephony.cdma.CDMAPhone ) ( phoneProxy.getActivePhone ( ) ) ) ; if ( cdmaPhone != null ) { if ( cdmaPhone.isInEcm ( ) ) { return false ; } } } return true ; }

Target:
private boolean canAddCall ( ) { java.util.Collection < android.telecom.Connection > connections = getAllConnections ( ) ; for ( android.telecom.Connection connection : connections ) { if ( ( ( connection.getExtras ( ) ) != null ) && ( connection.getExtras ( ) . getBoolean ( Connection.EXTRA_DISABLE_ADD_CALL , false ) ) ) { return false ; } } return true ; }
Source:
final void get ( float [ ] dst , int dstOffset , int floatCount ) { int byteCount = checkGetBounds ( SizeOf.FLOAT , dst.length , dstOffset , floatCount ) ; this . block.peekFloatArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , floatCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( double [ ] src , int srcOffset , int doubleCount ) { int byteCount = checkPutBounds ( SizeOf.DOUBLE , src.length , srcOffset , doubleCount ) ; this . block.pokeDoubleArray ( ( ( offset ) + ( position ) ) , src , srcOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }
Source:
boolean protectedHasArray ( ) { return ( this . block.array ( ) ) != null ; }

Target:
public java.nio.ByteBuffer putShort ( int index , short value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.SHORT ) ; this . block.pokeShort ( ( ( offset ) + index ) , value , order ) ; return this ; }
Source:
private static boolean isAttributeValueLink ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( attribute == null ) { return false ; } if ( ( ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isClassAttribute ( context ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isOnClickAttribute ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isActivity ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isService ( context ) ) ) { return true ; } java.lang.String value = attribute.getValue ( ) ; if ( value.startsWith ( "@+" ) ) { return false ; } com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resource = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.parseResource ( value ) ; if ( resource != null ) { com.android.resources.ResourceType type = resource.getFirst ( ) ; if ( type != null ) { return true ; } } return false ; }

Target:
private static boolean isAttributeValueLink ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( attribute == null ) { return false ; } if ( ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isClassAttribute ( context ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isOnClickAttribute ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isManifestName ( context ) ) ) { return true ; } java.lang.String value = attribute.getValue ( ) ; if ( value.startsWith ( "@+" ) ) { return false ; } com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resource = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.parseResource ( value ) ; if ( resource != null ) { com.android.resources.ResourceType type = resource.getFirst ( ) ; if ( type != null ) { return true ; } } return false ; }
Source:
private void processSlcConnected ( ) { mSlcConnected = true ; if ( ( mPhoneProxy ) != null ) { try { mPhoneProxy.queryPhoneState ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.bluetooth.hfp.HeadsetStateMachine.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } } else { android.util.Log.e ( com.android.bluetooth.hfp.HeadsetStateMachine.TAG , "Handsfree phone proxy null for query phone state" ) ; } }

Target:
private void processSlcConnected ( ) { mSlcConnected = true ; if ( ( mPhoneProxy ) != null ) { try { mPhoneProxy.queryPhoneState ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.bluetooth.hfp.HeadsetStateMachine.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } } else { android.util.Log.e ( com.android.bluetooth.hfp.HeadsetStateMachine.TAG , "MultiPending: Handsfree phone proxy null for query phone state" ) ; } }
Source:
public boolean run ( ) { synchronized ( mLock ) { mExecutionThread = java.lang.Thread.currentThread ( ) ; if ( mCancelled ) { com.android.tradefed.log.LogUtil.CLog.i ( "Process was cancelled before being awaited." ) ; return false ; } } boolean success ; try { success = ( mProcess.waitFor ( ) ) == 0 ; com.android.tradefed.log.LogUtil.CLog.i ( "Process terminates normally." ) ; } catch ( java.lang.InterruptedException e ) { success = false ; com.android.tradefed.log.LogUtil.CLog.i ( "Process is interrupted." ) ; } return success ; }

Target:
public boolean run ( ) { synchronized ( mLock ) { mExecutionThread = java.lang.Thread.currentThread ( ) ; if ( mCancelled ) { com.android.tradefed.log.LogUtil.CLog.w ( "Process was cancelled before being awaited." ) ; return false ; } } boolean success ; try { success = ( mProcess.waitFor ( ) ) == 0 ; com.android.tradefed.log.LogUtil.CLog.d ( "Process terminates normally." ) ; } catch ( java.lang.InterruptedException e ) { success = false ; com.android.tradefed.log.LogUtil.CLog.e ( "Process is interrupted." ) ; } return success ; }
Source:
public void testSubjectAltNameWithIpAddress ( ) { assertTrue ( verifyWithServerCertificate ( "1.2.3.4" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "1.2.3.4" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "1.2.3.5" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "1.2.3.4" ) ) ) ; assertTrue ( verifyWithServerCertificate ( "192.168.100.1" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "1.2.3.4" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "192.168.100.1" ) ) ) ; }

Target:
public static libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ipa ( java.lang.String ... ipaNames ) { return libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate.of ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , ipaNames ) ; }
Source:
private boolean isForegroundApp ( java.lang.String pkgName ) { android.app.ActivityManager am = ( ( android.app.ActivityManager ) ( mContext.getSystemService ( Context.ACTIVITY_SERVICE ) ) ) ; java.util.List < android.app.ActivityManager.RunningTaskInfo > tasks = am.getRunningTasks ( 1 ) ; return ( ! ( tasks.isEmpty ( ) ) ) && ( pkgName.equals ( tasks.get ( 0 ) . topActivity.getPackageName ( ) ) ) ; }

Target:
public java.util.List < android.net.wifi.hotspot2.PasspointConfiguration > getPasspointConfigurations ( ) { return null ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long dstAlloc , int dstXoff , int dstYoff , int dstZoff , int dstMip , int width , int height , int depth , long srcAlloc , int srcXoff , int srcYoff , int srcZoff , int srcMip ) { validate ( ) ; rsnAllocationData3D ( mContext , dstAlloc , dstXoff , dstYoff , dstZoff , dstMip , width , height , depth , srcAlloc , srcXoff , srcYoff , srcZoff , srcMip ) ; }
Source:
private java.io.File getTool ( java.lang.String filename ) { java.io.File f = mToolsMap.get ( filename ) ; if ( f == null ) { java.io.File platformTools = getPlatformTools ( ) ; if ( ! ( platformTools.isDirectory ( ) ) ) { return null ; } f = new java.io.File ( platformTools , filename ) ; mToolsMap.put ( filename , f ) ; } return f ; }

Target:
private java.io.File getPlatformTool ( java.lang.String filename ) { java.io.File f = mToolsMap.get ( filename ) ; if ( f == null ) { java.io.File platformTools = getPlatformToolsFolder ( ) ; if ( ! ( platformTools.isDirectory ( ) ) ) { return null ; } f = new java.io.File ( platformTools , filename ) ; mToolsMap.put ( filename , f ) ; } return f ; }
Source:
private java.lang.reflect.Field getDeclaredFieldInternal ( java.lang.String name ) { if ( ( iFields ) != null ) { for ( java.lang.reflect.ArtField f : iFields ) { if ( f.getName ( ) . equals ( name ) ) { return new java.lang.reflect.Field ( f ) ; } } } if ( ( sFields ) != null ) { for ( java.lang.reflect.ArtField f : sFields ) { if ( f.getName ( ) . equals ( name ) ) { return new java.lang.reflect.Field ( f ) ; } } } return null ; }

Target:
private java.lang.reflect.Field getDeclaredFieldInternal ( java.lang.String name ) { if ( ( iFields ) != null ) { final java.lang.reflect.ArtField matched = java.lang.Class.findByName ( name , iFields ) ; if ( matched != null ) { return new java.lang.reflect.Field ( matched ) ; } } if ( ( sFields ) != null ) { final java.lang.reflect.ArtField matched = java.lang.Class.findByName ( name , sFields ) ; if ( matched != null ) { return new java.lang.reflect.Field ( matched ) ; } } return null ; }
Source:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.AssetMerger merger = com.android.ide.common.res2.AssetMergerTest.getAssetMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder ) ; com.android.ide.common.res2.AssetMerger loadedMerger = new com.android.ide.common.res2.AssetMerger ( ) ; loadedMerger.loadFromBlob ( folder , true ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }

Target:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.AssetMerger merger = com.android.ide.common.res2.AssetMergerTest.getAssetMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedAssetWriter ( com.google.common.io.Files.createTempDir ( ) ) ) ; com.android.ide.common.res2.AssetMerger loadedMerger = new com.android.ide.common.res2.AssetMerger ( ) ; loadedMerger.loadFromBlob ( folder , true ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }
Source:
protected void fillRtTestInfos ( ) { rtTestInfos.add ( TEST001 ) ; rtTestInfos.add ( TEST002 ) ; rtTestInfos.add ( TEST003 ) ; rtTestInfos.add ( TEST004 ) ; rtTestInfos.add ( TEST005 ) ; rtTestInfos.add ( TEST006 ) ; rtTestInfos.add ( TEST007 ) ; }

Target:
protected void fillRtTestInfos ( ) { rtTestInfos.add ( TEST001 ) ; rtTestInfos.add ( TEST002 ) ; rtTestInfos.add ( TEST003 ) ; rtTestInfos.add ( TEST004 ) ; rtTestInfos.add ( TEST005 ) ; rtTestInfos.add ( TEST006 ) ; rtTestInfos.add ( TEST007 ) ; rtTestInfos.add ( TEST008 ) ; }
Source:
void assertNumConnections ( final android.telecom.cts.MockConnectionService connService , final int numConnections ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return numConnections ; } @ java.lang.Override public java.lang.Object actual ( ) { return connService.getAllConnections ( ) . size ( ) ; } } , android.telecom.cts.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( ( "ConnectionService should contain " + numConnections ) + " connections." ) ) ; }

Target:
void assertNumConnections ( final android.telecom.cts.MockConnectionService connService , final int numConnections ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return numConnections ; } @ java.lang.Override public java.lang.Object actual ( ) { return connService.getAllConnections ( ) . size ( ) ; } } , android.telecom.cts.TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( ( "ConnectionService should contain " + numConnections ) + " connections." ) ) ; }
Source:
public static java.io.File createSubFile ( java.io.File parentDir , java.lang.String name ) throws java.io.IOException { java.io.File subFile = libcore.tzdata.update.FileUtils.canonicalizeDirPath ( new java.io.File ( parentDir , name ) ) ; if ( ! ( subFile.getPath ( ) . startsWith ( parentDir.getCanonicalPath ( ) ) ) ) { throw new java.io.IOException ( ( ( name + " must exist beneath " ) + parentDir ) ) ; } return subFile ; }

Target:
public static java.io.File createSubFile ( java.io.File parentDir , java.lang.String name ) throws java.io.IOException { java.io.File subFile = new java.io.File ( parentDir , name ) . getCanonicalFile ( ) ; if ( ! ( subFile.getPath ( ) . startsWith ( parentDir.getCanonicalPath ( ) ) ) ) { throw new java.io.IOException ( ( ( ( ( name + " must exist beneath " ) + parentDir ) + ". Canonicalized subpath: " ) + subFile ) ) ; } return subFile ; }
Source:
public void testReset ( ) { try { spf = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; parser = spf.newSAXParser ( ) ; parser.setProperty ( tests.api.javax.xml.parsers.SAXParserTest.LEXICAL_HANDLER_PROPERTY , new tests.api.org.xml.sax.support.MockHandler ( new tests.api.org.xml.sax.support.MethodLogger ( ) ) ) ; parser.reset ( ) ; assertEquals ( null , parser.getProperty ( tests.api.javax.xml.parsers.SAXParserTest.LEXICAL_HANDLER_PROPERTY ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }

Target:
public void testReset ( ) { try { spf = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; parser = spf.newSAXParser ( ) ; parser.setProperty ( org.apache.harmony.tests.javax.xml.parsers.SAXParserTest.LEXICAL_HANDLER_PROPERTY , new org.apache.harmony.tests.org.xml.sax.support.MockHandler ( new org.apache.harmony.tests.org.xml.sax.support.MethodLogger ( ) ) ) ; parser.reset ( ) ; assertEquals ( null , parser.getProperty ( org.apache.harmony.tests.javax.xml.parsers.SAXParserTest.LEXICAL_HANDLER_PROPERTY ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }
Source:
public void onClick ( android.view.View v ) { if ( ! ( mDpm.isAdminActive ( com.android.cts.verifier.managedprovisioning.DeviceAdminTestReceiver.getReceiverComponentName ( ) ) ) ) { android.widget.Toast.makeText ( this , R.string.provisioning_byod_keyguard_disabled_features_not_admin , Toast.LENGTH_SHORT ) . show ( ) ; return ; } mDpm.resetPassword ( "testpassword" , 0 ) ; setKeyguardDisabledFeatures ( ( ( ( android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_TRUST_AGENTS ) | ( android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT ) ) | ( android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS ) ) ) ; }

Target:
protected android.content.ComponentName getAdminComponent ( ) { return com.android.cts.verifier.managedprovisioning.DeviceAdminTestReceiver.getReceiverComponentName ( ) ; }
Source:
public void testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent ( ) throws java.lang.InterruptedException { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI ) ) ) { android.util.Log.i ( android.net.cts.ConnectivityManagerTest.TAG , "testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent cannot execute unless device supports WiFi" ) ; return ; } android.content.Intent startIntent = new android.content.Intent ( ) ; startIntent.setComponent ( new android.content.ComponentName ( "android.net.cts.appForApi23" , "android.net.cts.appForApi23.ConnectivityListeningActivity" ) ) ; mContext.startActivity ( startIntent ) ; toggleWifi ( ) ; android.content.Intent getConnectivityCount = new android.content.Intent ( android.net.cts.ConnectivityManagerTest.GET_WIFI_CONNECTIVITY_ACTION_COUNT ) ; assertEquals ( 2 , sendOrderedBroadcastAndReturnResultCode ( getConnectivityCount , android.net.cts.ConnectivityManagerTest.SEND_BROADCAST_TIMEOUT ) ) ; }

Target:
public void testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent ( ) throws java.lang.InterruptedException { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI ) ) ) { android.util.Log.i ( android.net.cts.ConnectivityManagerTest.TAG , "testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent cannot execute unless device supports WiFi" ) ; return ; } android.content.Intent startIntent = new android.content.Intent ( ) ; startIntent.setComponent ( new android.content.ComponentName ( "android.net.cts.appForApi23" , "android.net.cts.appForApi23.ConnectivityListeningActivity" ) ) ; mContext.startActivity ( startIntent ) ; java.lang.Thread.sleep ( 200 ) ; toggleWifi ( ) ; android.content.Intent getConnectivityCount = new android.content.Intent ( android.net.cts.ConnectivityManagerTest.GET_WIFI_CONNECTIVITY_ACTION_COUNT ) ; assertEquals ( 2 , sendOrderedBroadcastAndReturnResultCode ( getConnectivityCount , android.net.cts.ConnectivityManagerTest.SEND_BROADCAST_TIMEOUT ) ) ; }
Source:
public void startRanging ( int clientId , int sessionId , android.net.wifi.RttManager [ ] params , int rangingId ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_TYPE_COMMAND ) ; msg.arg1 = com.android.server.wifi.nan.WifiNanStateManager.COMMAND_TYPE_START_RANGING ; msg.arg2 = clientId ; msg.obj = params ; msg.getData ( ) . putInt ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_BUNDLE_KEY_SESSION_ID , sessionId ) ; msg.getData ( ) . putInt ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_BUNDLE_KEY_RANGING_ID , rangingId ) ; mSm.sendMessage ( msg ) ; }

Target:
public void startRanging ( int clientId , int sessionId , android.net.wifi.RttManager [ ] params , int rangingId ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_TYPE_COMMAND ) ; msg.arg1 = com.android.server.wifi.aware.WifiAwareStateManager.COMMAND_TYPE_START_RANGING ; msg.arg2 = clientId ; msg.obj = params ; msg.getData ( ) . putInt ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_SESSION_ID , sessionId ) ; msg.getData ( ) . putInt ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_RANGING_ID , rangingId ) ; mSm.sendMessage ( msg ) ; }
Source:
static com.android.internal.telephony.gsm.stk.IconLoader getInstance ( android.os.Handler caller , com.android.internal.telephony.IccFileHandler fh ) { if ( ( com.android.internal.telephony.gsm.stk.IconLoader.sLoader ) != null ) { return com.android.internal.telephony.gsm.stk.IconLoader.sLoader ; } if ( fh != null ) { android.os.HandlerThread thread = new android.os.HandlerThread ( "Stk Icon Loader" ) ; thread.start ( ) ; return new com.android.internal.telephony.gsm.stk.IconLoader ( thread.getLooper ( ) , fh ) ; } return null ; }

Target:
static com.android.internal.telephony.cat.IconLoader getInstance ( android.os.Handler caller , com.android.internal.telephony.IccFileHandler fh ) { if ( ( com.android.internal.telephony.cat.IconLoader.sLoader ) != null ) { return com.android.internal.telephony.cat.IconLoader.sLoader ; } if ( fh != null ) { android.os.HandlerThread thread = new android.os.HandlerThread ( "Cat Icon Loader" ) ; thread.start ( ) ; return new com.android.internal.telephony.cat.IconLoader ( thread.getLooper ( ) , fh ) ; } return null ; }
Source:
public void finish ( @ javax.annotation.Nonnull java.io.OutputStream out ) throws java.io.IOException { dexResult.prepare ( cstManager.getCstStrings ( ) , cstManager.getCstFieldRefs ( ) , cstManager.getCstMethodRefs ( ) , cstManager.getCstTypes ( ) , cstManager.getCstPrototypeRefs ( ) ) ; if ( ! ( cstManager.validate ( dexResult ) ) ) { throw new java.lang.AssertionError ( ) ; } dexResult.writeTo ( out , null , false ) ; finished = true ; }

Target:
public void finish ( @ javax.annotation.Nonnull java.io.OutputStream out ) throws java.io.IOException { dexResult.prepare ( cstManager.getCstStrings ( ) , cstManager.getCstFieldRefs ( ) , cstManager.getCstMethodRefs ( ) , cstManager.getTypes ( ) , cstManager.getCstPrototypeRefs ( ) ) ; if ( ! ( cstManager.validate ( dexResult ) ) ) { throw new java.lang.AssertionError ( ) ; } dexResult.writeTo ( out , null , false ) ; finished = true ; }
Source:
protected void createTestItems ( ) { mGoToSetupItem = createUserItem ( R.string.tv_input_discover_test_go_to_setup , R.string.tv_launch_tv_app , this ) ; setButtonEnabled ( mGoToSetupItem , true ) ; mVerifySetupItem = createAutoItem ( R.string.tv_input_discover_test_verify_setup ) ; mTuneToChannelItem = createUserItem ( R.string.tv_input_discover_test_tune_to_channel , R.string.tv_launch_tv_app , this ) ; mVerifyTuneItem = createAutoItem ( R.string.tv_input_discover_test_verify_tune ) ; mVerifyOverlayViewItem = createAutoItem ( R.string.tv_input_discover_test_verify_overlay_view ) ; }

Target:
protected void createTestItems ( ) { mGoToSetupItem = createUserItem ( R.string.tv_input_discover_test_go_to_setup , R.string.tv_launch_tv_app , this ) ; setButtonEnabled ( mGoToSetupItem , true ) ; mVerifySetupItem = createAutoItem ( R.string.tv_input_discover_test_verify_setup ) ; mTuneToChannelItem = createUserItem ( R.string.tv_input_discover_test_tune_to_channel , R.string.tv_launch_tv_app , this ) ; mVerifyTuneItem = createAutoItem ( R.string.tv_input_discover_test_verify_tune ) ; mVerifyOverlayViewItem = createAutoItem ( R.string.tv_input_discover_test_verify_overlay_view ) ; mGoToEpgItem = createUserItem ( R.string.tv_input_discover_test_go_to_epg , R.string.tv_launch_epg , this ) ; mVerifyEpgItem = createUserItem ( R.string.tv_input_discover_test_verify_epg , R.string.tv_input_discover_test_yes , this ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.io.IOException { java.lang.String dexFile = args [ 0 ] ; java.lang.String declaredBy = args [ 1 ] ; java.lang.String memberName = args [ 2 ] ; com.android.dx.io.DexBuffer dex = new com.android.dx.io.DexBuffer ( new java.io.File ( dexFile ) ) ; java.io.PrintWriter out = new java.io.PrintWriter ( java.lang.System.out ) ; new com.android.dx.command.findusages.FindUsages ( dex , declaredBy , memberName , out ) . findUsages ( ) ; out.flush ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.io.IOException { java.lang.String dexFile = args [ 0 ] ; java.lang.String declaredBy = args [ 1 ] ; java.lang.String memberName = args [ 2 ] ; com.android.dex.Dex dex = new com.android.dex.Dex ( new java.io.File ( dexFile ) ) ; java.io.PrintWriter out = new java.io.PrintWriter ( java.lang.System.out ) ; new com.android.dx.command.findusages.FindUsages ( dex , declaredBy , memberName , out ) . findUsages ( ) ; out.flush ( ) ; }
Source:
public void testNoAutoBindBeforeTimeout ( ) throws android.os.RemoteException { java.util.HashSet < android.util.Pair < java.lang.Integer , java.lang.Integer > > testFeatures = new java.util.HashSet < > ( ) ; testFeatures.add ( new android.util.Pair ( 1 , 1 ) ) ; testFeatures.add ( new android.util.Pair ( 1 , 2 ) ) ; bindAndConnectService ( testFeatures ) ; getDeathRecipient ( ) . binderDied ( ) ; org.mockito.Mockito.verify ( mMockContext , org.mockito.Mockito.times ( 1 ) ) . bindService ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.any ( ) , org.mockito.Matchers.anyInt ( ) ) ; }

Target:
public void testNoAutoBindBeforeTimeout ( ) throws android.os.RemoteException { java.util.HashSet < android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair > testFeatures = new java.util.HashSet < > ( ) ; testFeatures.add ( new android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair ( 1 , 1 ) ) ; testFeatures.add ( new android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair ( 1 , 2 ) ) ; bindAndConnectService ( testFeatures ) ; getDeathRecipient ( ) . binderDied ( ) ; org.mockito.Mockito.verify ( mMockContext , org.mockito.Mockito.times ( 1 ) ) . bindService ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.any ( ) , org.mockito.Matchers.anyInt ( ) ) ; }
Source:
public static boolean isSyntheticSwitchMapClass ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass cls ) { java.lang.String shortName = cls.getName ( ) ; return shortName.contains ( com.android.jack.transformations.enums.opt.SyntheticClassManager.SyntheticSwitchmapClassNamePrefix ) ; }

Target:
private com.android.jack.ir.ast.JDefinedClass getSyntheticClassUnderPackage ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage syntheticClassPackage ) { for ( com.android.jack.ir.ast.JDefinedClassOrInterface classOrInterface : syntheticClassPackage.getTypes ( ) ) { java.lang.String className = classOrInterface.getName ( ) ; if ( className.startsWith ( com.android.jack.transformations.enums.opt.SyntheticClassManager.SyntheticSwitchmapClassNamePrefix ) ) { assert classOrInterface instanceof com.android.jack.ir.ast.JDefinedClass ; if ( ! ( ( classOrInterface.getLocation ( ) ) instanceof com.android.jack.library.TypeInInputLibraryLocation ) ) { return ( ( com.android.jack.ir.ast.JDefinedClass ) ( classOrInterface ) ) ; } } } return null ; }
Source:
public void read ( dexfuzz.rawdex.DexRandomAccessFile file ) throws java.io.IOException { file.getOffsetTracker ( ) . getNewOffsettable ( file , this ) ; data = new byte [ size ] ; file.read ( data ) ; }

Target:
public void read ( dexfuzz.rawdex.DexRandomAccessFile file ) throws java.io.IOException { file.getOffsetTracker ( ) . getNewOffsettable ( file , this ) ; data = new byte [ size ] ; file.read ( data ) ; if ( ( data [ ( ( size ) - 1 ) ] ) != 0 ) { dexfuzz.Log.errorAndQuit ( "Error reading debug_info_item. The last byte is not DBG_END_SEQUENCE." ) ; } }
Source:
boolean dial ( android.bluetooth.BluetoothDevice device , java.lang.String number ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfpclient.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } android.os.Message msg = mStateMachine.obtainMessage ( HeadsetClientStateMachine.DIAL_NUMBER ) ; msg.obj = number ; mStateMachine.sendMessage ( msg ) ; return true ; }

Target:
android.bluetooth.BluetoothHeadsetClientCall dial ( android.bluetooth.BluetoothDevice device , java.lang.String number ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfpclient.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return null ; } android.bluetooth.BluetoothHeadsetClientCall call = new android.bluetooth.BluetoothHeadsetClientCall ( device , HeadsetClientStateMachine.HF_ORIGINATED_CALL_ID , android.bluetooth.BluetoothHeadsetClientCall.CALL_STATE_DIALING , number , false , true ) ; android.os.Message msg = mStateMachine.obtainMessage ( HeadsetClientStateMachine.DIAL_NUMBER ) ; msg.obj = call ; mStateMachine.sendMessage ( msg ) ; return call ; }
Source:
private com.android.ide.common.api.IViewRule initializeRule ( com.android.ide.common.api.IViewRule rule , java.lang.String targetFqcn ) { try { if ( rule.onInitialize ( targetFqcn , new com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine.ClientRulesEngineImpl ( targetFqcn ) ) ) { mRulesCache.put ( targetFqcn , rule ) ; return rule ; } else { rule.onDispose ( ) ; } } catch ( java.lang.Exception e ) { logError ( "%s.onInit() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } return null ; }

Target:
private com.android.ide.common.api.IViewRule initializeRule ( com.android.ide.common.api.IViewRule rule , java.lang.String targetFqcn ) { try { if ( rule.onInitialize ( targetFqcn , new com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine.ClientRulesEngineImpl ( targetFqcn ) ) ) { mRulesCache.put ( targetFqcn , rule ) ; return rule ; } else { rule.onDispose ( ) ; } } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onInit() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } return null ; }
Source:
private static void recordCustomTimesHistogramMilliseconds ( java.lang.String name , long duration , long min , long max , int numBuckets ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordCustomTimesHistogramMilliseconds ( name , key , org.chromium.base.metrics.RecordHistogram.clampToInt ( duration ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( min ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( max ) , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void initialize ( ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; org.chromium.base.metrics.RecordHistogram.nativeInitialize ( ) ; }
Source:
public native void setToNow ( ) ;

Target:
public java.lang.String toStringInternal ( ) { return java.lang.String.format ( "%04d%02d%02dT%02d%02d%02d%s(%d,%d,%d,%d,%d)" , wallTime.getYear ( ) , ( ( wallTime.getMonth ( ) ) + 1 ) , wallTime.getMonthDay ( ) , wallTime.getHour ( ) , wallTime.getMinute ( ) , wallTime.getSecond ( ) , timezone , wallTime.getWeekDay ( ) , wallTime.getYearDay ( ) , wallTime.getGmtOffset ( ) , wallTime.getIsDst ( ) , ( ( toMillis ( false ) ) / 1000 ) ) ; }
Source:
protected void checkPoints ( org.bouncycastle.math.ec.ECPoint [ ] points ) { if ( points == null ) { throw new java.lang.IllegalArgumentException ( "'points' cannot be null" ) ; } for ( int i = 0 ; i < ( points.length ) ; ++ i ) { org.bouncycastle.math.ec.ECPoint point = points [ i ] ; if ( ( null != point ) && ( ( this ) != ( point.getCurve ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "'points' entries must be null or on this curve" ) ; } } }

Target:
public void normalizeAll ( org.bouncycastle.math.ec.ECPoint [ ] points ) { normalizeAll ( points , 0 , points.length , null ) ; }
Source:
protected void onReceiveResult ( int resultCode , android.os.Bundle ussdResponse ) { android.telephony.Rlog.d ( android.telephony.TelephonyManager.TAG , ( "USSD:" + resultCode ) ) ; com.android.internal.util.Preconditions.checkNotNull ( ussdResponse , "ussdResponse cannot be null." ) ; android.telephony.UssdResponse response = ussdResponse.getParcelable ( android.telephony.TelephonyManager.USSD_RESPONSE ) ; if ( resultCode == ( android.telephony.TelephonyManager.USSD_RETURN_SUCCESS ) ) { callback.onReceiveUssdResponse ( response.getUssdRequest ( ) , response.getReturnMessage ( ) ) ; } else { callback.onReceiveUssdResponseFailed ( response.getUssdRequest ( ) , resultCode ) ; } }

Target:
protected void onReceiveResult ( int resultCode , android.os.Bundle ussdResponse ) { android.telephony.Rlog.d ( android.telephony.TelephonyManager.TAG , ( "USSD:" + resultCode ) ) ; com.android.internal.util.Preconditions.checkNotNull ( ussdResponse , "ussdResponse cannot be null." ) ; android.telephony.UssdResponse response = ussdResponse.getParcelable ( android.telephony.TelephonyManager.USSD_RESPONSE ) ; if ( resultCode == ( android.telephony.TelephonyManager.USSD_RETURN_SUCCESS ) ) { callback.onReceiveUssdResponse ( telephonyManager , response.getUssdRequest ( ) , response.getReturnMessage ( ) ) ; } else { callback.onReceiveUssdResponseFailed ( telephonyManager , response.getUssdRequest ( ) , resultCode ) ; } }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.transformations.lambda.DefaultBridgeInLambdaAdder.Visitor visitor = new com.android.jack.transformations.lambda.DefaultBridgeInLambdaAdder.Visitor ( ) ; visitor.accept ( method ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( ( ( androidMinApiLevel ) >= ( com.android.jack.backend.dex.compatibility.AndroidCompatibilityChecker.N_API_LEVEL ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.transformations.lambda.DefaultBridgeInLambdaAdder.Visitor visitor = new com.android.jack.transformations.lambda.DefaultBridgeInLambdaAdder.Visitor ( ) ; visitor.accept ( method ) ; }
Source:
private void deleteNonRequiredApps ( android.content.Context context , java.lang.String mdmPackageName , int userId , int requiredAppsList , int vendorRequiredAppsList , boolean disableInstallShortcutListeners ) { new com.android.managedprovisioning.task.DeleteNonRequiredAppsTask ( context , mdmPackageName , userId , requiredAppsList , vendorRequiredAppsList , false , disableInstallShortcutListeners , new com.android.managedprovisioning.task.DeleteNonRequiredAppsTask.Callback ( ) { @ java.lang.Override public void onSuccess ( ) { } @ java.lang.Override public void onError ( ) { com.android.managedprovisioning.ProvisionLogger.loge ( ( "Error while checking if there are new system " + "apps that need to be deleted" ) ) ; } } ) . run ( ) ; }

Target:
private void deleteNonRequiredApps ( android.content.Context context , java.lang.String mdmPackageName , int userId , int requiredAppsList , int vendorRequiredAppsList , int disallowedAppsList , int vendorDisallowedAppsList , boolean disableInstallShortcutListeners ) { new com.android.managedprovisioning.task.DeleteNonRequiredAppsTask ( context , mdmPackageName , userId , requiredAppsList , vendorRequiredAppsList , disallowedAppsList , vendorDisallowedAppsList , false , disableInstallShortcutListeners , new com.android.managedprovisioning.task.DeleteNonRequiredAppsTask.Callback ( ) { @ java.lang.Override public void onSuccess ( ) { } @ java.lang.Override public void onError ( ) { com.android.managedprovisioning.ProvisionLogger.loge ( ( "Error while checking if there are new system " + "apps that need to be deleted" ) ) ; } } ) . run ( ) ; }
Source:
private boolean deleteInstalledPackageLI ( com.android.server.pm.PackageSetting ps , boolean deleteCodeAndResources , int flags , com.android.server.pm.PackageManagerService.PackageRemovedInfo outInfo , boolean writeSettings ) { if ( outInfo != null ) { outInfo.uid = ps.appId ; } removePackageDataLI ( ps , outInfo , flags , writeSettings ) ; if ( deleteCodeAndResources && ( outInfo != null ) ) { outInfo.args = createInstallArgs ( packageFlagsToInstallFlags ( ps ) , ps.codePathString , ps.resourcePathString , ps.nativeLibraryPathString ) ; } return true ; }

Target:
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 ; }
Source:
public final void testSetRect ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 1 , 2 , 3 , 4 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r2 = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r3 = r.set ( r2 ) ; assertSame ( r3 , r ) ; assertNotSame ( r3 , r2 ) ; assertEquals ( 3 , r.x ) ; assertEquals ( 4 , r.y ) ; assertEquals ( 20 , r.w ) ; assertEquals ( 30 , r.h ) ; }

Target:
public final void testSetRect ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 1 , 2 , 3 , 4 ) ; com.android.ide.common.api.Rect r2 = new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.common.api.Rect r3 = r.set ( r2 ) ; assertSame ( r3 , r ) ; assertNotSame ( r3 , r2 ) ; assertEquals ( 3 , r.x ) ; assertEquals ( 4 , r.y ) ; assertEquals ( 20 , r.w ) ; assertEquals ( 30 , r.h ) ; }
Source:
public void publish ( int clientId , android.os.Looper looper , android.net.wifi.aware.PublishConfig publishConfig , android.net.wifi.aware.WifiAwareDiscoverySessionCallback callback ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) android.util.Log.v ( android.net.wifi.aware.WifiAwareManager.TAG , ( ( ( "publish(): clientId=" + clientId ) + ", config=" ) + publishConfig ) ) ; try { mService.publish ( clientId , publishConfig , new android.net.wifi.aware.WifiAwareManager.WifiAwareDiscoverySessionCallbackProxy ( this , looper , true , callback , clientId ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void publish ( int clientId , android.os.Looper looper , android.net.wifi.aware.PublishConfig publishConfig , android.net.wifi.aware.DiscoverySessionCallback callback ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) android.util.Log.v ( android.net.wifi.aware.WifiAwareManager.TAG , ( ( ( "publish(): clientId=" + clientId ) + ", config=" ) + publishConfig ) ) ; try { mService.publish ( clientId , publishConfig , new android.net.wifi.aware.WifiAwareManager.WifiAwareDiscoverySessionCallbackProxy ( this , looper , true , callback , clientId ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void testLibraries ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "bytecode/GetterTest.java.txt=>src/test/bytecode/GetterTest.java" , "bytecode/GetterTest.jar.data=>bin/classes.jar" ) ; checkDriver ( ( "\n" + ( ( "Scanning MainTest_testLibraries: \n" + "\n" ) + "No issues found.\n" ) ) , "" , new java.lang.String [ ] { "--check" , "FieldGetter" , "--libraries" , new java.io.File ( project , "bin/classes.jar" ) . getPath ( ) , "--disable" , "LintError" , project.getPath ( ) } ) ; }

Target:
public void testLibraries ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "bytecode/GetterTest.java.txt=>src/test/bytecode/GetterTest.java" , "bytecode/GetterTest.jar.data=>bin/classes.jar" ) ; checkDriver ( ( "\n" + ( ( "Scanning MainTest_testLibraries: \n" + "\n" ) + "No issues found.\n" ) ) , "" , com.android.tools.lint.LintCliFlags.ERRNO_SUCCESS , new java.lang.String [ ] { "--check" , "FieldGetter" , "--libraries" , new java.io.File ( project , "bin/classes.jar" ) . getPath ( ) , "--disable" , "LintError" , project.getPath ( ) } ) ; }
Source:
public void mouseDown ( org.eclipse.swt.events.MouseEvent e ) { }

Target:
public void mouseScrolled ( org.eclipse.swt.events.MouseEvent e ) { int newZoom = - 1 ; synchronized ( this ) { if ( ( ( image ) != null ) && ( ( crosshairLocation ) != null ) ) { if ( ( e.count ) > 0 ) { newZoom = ( zoom ) + 1 ; } else { newZoom = ( zoom ) - 1 ; } } } if ( newZoom != ( - 1 ) ) { model.setZoom ( newZoom ) ; } }
Source:
private int findEndIndexOfInlineTag ( java.lang.String text , int fromIndex , int toIndex ) { for ( int i = fromIndex ; i < toIndex ; i ++ ) { if ( ( text.charAt ( i ) ) == '}' ) { return i ; } } return - 1 ; }

Target:
private int findEndIndexOfInlineTag ( java.lang.String text , int fromIndex , int toIndex ) { int braceDepth = 0 ; for ( int i = fromIndex ; i < toIndex ; i ++ ) { if ( ( text.charAt ( i ) ) == '{' ) { braceDepth ++ ; } else if ( ( text.charAt ( i ) ) == '}' ) { braceDepth -- ; if ( braceDepth == 0 ) { return i ; } } } return - 1 ; }
Source:
private void decodeImageBounds ( ) throws android.drm.mobile1.DrmException { com.android.mms.ui.UriImage uriImage = new com.android.mms.ui.UriImage ( mContext , getUriWithDrmCheck ( ) ) ; mWidth = uriImage.getWidth ( ) ; mHeight = uriImage.getHeight ( ) ; if ( com.android.mms.model.ImageModel.LOCAL_LOGV ) { android.util.Log.v ( com.android.mms.model.ImageModel.TAG , ( ( ( "Image bounds: " + ( mWidth ) ) + "x" ) + ( mHeight ) ) ) ; } }

Target:
public android.graphics.Bitmap getBitmap ( int width , int height ) { android.graphics.Bitmap bm = mFullSizeBitmapCache.get ( ) ; if ( bm == null ) { try { bm = createBitmap ( java.lang.Math.max ( width , height ) , getUri ( ) ) ; if ( bm != null ) { mFullSizeBitmapCache = new java.lang.ref.SoftReference < android.graphics.Bitmap > ( bm ) ; } } catch ( java.lang.OutOfMemoryError ex ) { } } return bm ; }
Source:
private void clearServerSocket ( ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; cleanUpSdpRecord ( ) ; if ( ( mServerSockets ) != null ) { mServerSockets.shutdown ( false ) ; mServerSockets = null ; } }

Target:
private void cleanUpServerSocket ( ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; cleanUpSdpRecord ( ) ; if ( ( mServerSockets ) != null ) { mServerSockets.shutdown ( false ) ; mServerSockets = null ; } }
Source:
public void testNetworkTypes ( ) { assertTrue ( mCm.isNetworkSupported ( android.net.ConnectivityManager.TYPE_WIFI ) ) ; assertTrue ( mCm.isNetworkSupported ( android.net.ConnectivityManager.TYPE_MOBILE ) ) ; }

Target:
public void testNetworkTypes ( ) { assertTrue ( mCm.isNetworkSupported ( android.net.ConnectivityManager.TYPE_WIFI ) ) ; assertTrue ( mCm.isNetworkSupported ( android.net.ConnectivityManager.TYPE_MOBILE ) ) ; assertTrue ( mCm.isNetworkSupported ( android.net.ConnectivityManager.TYPE_MOBILE_MMS ) ) ; assertFalse ( mCm.isNetworkSupported ( android.net.ConnectivityManager.TYPE_MOBILE_FOTA ) ) ; assertTrue ( mCm.isNetworkSupported ( android.net.ConnectivityManager.TYPE_ETHERNET ) ) ; }