auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testMultipleProjects ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "bytecode/classes.jar=>libs/classes.jar" ) ; checkDriver ( "" , "The --sources, --classpath, --libraries and --resources arguments can only be used with a single project\n" , new java.lang.String [ ] { "--libraries" , new java.io.File ( project , "libs/classes.jar" ) . getPath ( ) , "--disable" , "LintError" , project.getPath ( ) , project.getPath ( ) } ) ; }

Target:
public void testMultipleProjects ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "bytecode/classes.jar=>libs/classes.jar" ) ; checkDriver ( "" , "The --sources, --classpath, --libraries and --resources arguments can only be used with a single project\n" , com.android.tools.lint.LintCliFlags.ERRNO_INVALID_ARGS , new java.lang.String [ ] { "--libraries" , new java.io.File ( project , "libs/classes.jar" ) . getPath ( ) , "--disable" , "LintError" , project.getPath ( ) , project.getPath ( ) } ) ; }
Source:
protected void onRecordLoaded ( ) { mRecordsToLoad -= 1 ; if ( DBG ) log ( ( ( ( "onRecordLoaded " + ( mRecordsToLoad ) ) + " requested: " ) + ( mRecordsRequested ) ) ) ; if ( ( ( mRecordsToLoad ) == 0 ) && ( ( mRecordsRequested ) == true ) ) { onAllRecordsLoaded ( ) ; } else if ( ( mRecordsToLoad ) < 0 ) { loge ( "recordsToLoad <0, programmer error suspected" ) ; mRecordsToLoad = 0 ; } }

Target:
protected void onRecordLoaded ( ) { mRecordsToLoad -= 1 ; if ( DBG ) log ( ( ( ( "onRecordLoaded " + ( mRecordsToLoad ) ) + " requested: " ) + ( mRecordsRequested ) ) ) ; if ( getRecordsLoaded ( ) ) { onAllRecordsLoaded ( ) ; } else if ( getLockedRecordsLoaded ( ) ) { onLockedAllRecordsLoaded ( ) ; } else if ( ( mRecordsToLoad ) < 0 ) { loge ( "recordsToLoad <0, programmer error suspected" ) ; mRecordsToLoad = 0 ; } }
Source:
public boolean isConnected ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return false ; } try { return ( android.bluetooth.BluetoothDevice.sService.getConnectionState ( this ) ) != ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_DISCONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }

Target:
public boolean isConnected ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return ( service.getConnectionState ( this ) ) != ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_DISCONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }
Source:
public static org.eclipse.ui.IEditorPart getActiveEditor ( ) { org.eclipse.ui.IWorkbenchWindow window = org.eclipse.ui.PlatformUI.getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; if ( window != null ) { org.eclipse.ui.IWorkbenchPage page = window.getActivePage ( ) ; if ( page != null ) { return page.getActiveEditor ( ) ; } } return null ; }

Target:
public static org.eclipse.ui.IEditorPart getActiveEditor ( ) { org.eclipse.ui.IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench ( ) ; org.eclipse.ui.IWorkbenchWindow window = workbench.getActiveWorkbenchWindow ( ) ; if ( window == null ) { org.eclipse.ui.IWorkbenchWindow [ ] windows = workbench.getWorkbenchWindows ( ) ; if ( ( windows.length ) > 0 ) { window = windows [ 0 ] ; } } if ( window != null ) { org.eclipse.ui.IWorkbenchPage page = window.getActivePage ( ) ; if ( page != null ) { return page.getActiveEditor ( ) ; } } return null ; }
Source:
private void responseSms ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SendSmsResult sms ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.SmsResponse ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = new com.android.internal.telephony.SmsResponse ( sms.messageRef , sms.ackPDU , sms.errorCode ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseIccIo ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.IccIoResult result ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.uicc.IccIoResult ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = new com.android.internal.telephony.uicc.IccIoResult ( result.sw1 , result.sw2 , result.simResponse ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
public android.os.ParcelUuid [ ] getUuids ( ) { if ( ( ( android.bluetooth.BluetoothDevice.sService ) == null ) || ( ( isBluetoothEnabled ( ) ) == false ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get remote device Uuids" ) ; return null ; } try { return android.bluetooth.BluetoothDevice.sService.getRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }

Target:
public android.os.ParcelUuid [ ] getUuids ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ! ( isBluetoothEnabled ( ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get remote device Uuids" ) ; return null ; } try { return service.getRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }
Source:
private void test_leaveGroupLjava_net_InetAddress ( java.net.InetAddress group ) throws java.lang.Exception { java.lang.String msg = "Hello World" ; java.net.MulticastSocket mss = new java.net.MulticastSocket ( 0 ) ; java.net.DatagramPacket sdp = new java.net.DatagramPacket ( msg.getBytes ( ) , msg.length ( ) , group , mss.getLocalPort ( ) ) ; mss.send ( sdp , ( ( byte ) ( 10 ) ) ) ; try { mss.leaveGroup ( group ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } mss.close ( ) ; }

Target:
private void test_leaveGroupLjava_net_InetAddress ( java.net.InetAddress group ) throws java.lang.Exception { java.lang.String msg = "Hello World" ; java.net.MulticastSocket mss = new java.net.MulticastSocket ( 0 ) ; java.net.InetSocketAddress groupAddress = new java.net.InetSocketAddress ( group , mss.getLocalPort ( ) ) ; java.net.DatagramPacket sdp = org.apache.harmony.tests.java.net.MulticastSocketTest.createSendDatagramPacket ( groupAddress , msg ) ; mss.send ( sdp , ( ( byte ) ( 10 ) ) ) ; try { mss.leaveGroup ( group ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } mss.close ( ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , short [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 2 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copyFrom ( int [ ] d ) { validateIsInt32 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_32 , d.length ) ; }
Source:
public static final android.os.Process.ProcessStartResult start ( final java.lang.String processClass , final java.lang.String niceName , int uid , int gid , int [ ] gids , int debugFlags , int mountExternal , int targetSdkVersion , java.lang.String seInfo , java.lang.String abi , java.lang.String instructionSet , java.lang.String appDataDir , java.lang.String [ ] zygoteArgs ) { return android.os.Process.zygoteProcess.start ( processClass , niceName , uid , gid , gids , debugFlags , mountExternal , targetSdkVersion , seInfo , abi , instructionSet , appDataDir , zygoteArgs ) ; }

Target:
public static final android.os.Process.ProcessStartResult start ( final java.lang.String processClass , final java.lang.String niceName , int uid , int gid , int [ ] gids , int debugFlags , int mountExternal , int targetSdkVersion , java.lang.String seInfo , java.lang.String abi , java.lang.String instructionSet , java.lang.String appDataDir , java.lang.String invokeWith , java.lang.String [ ] zygoteArgs ) { return android.os.Process.zygoteProcess.start ( processClass , niceName , uid , gid , gids , debugFlags , mountExternal , targetSdkVersion , seInfo , abi , instructionSet , appDataDir , invokeWith , zygoteArgs ) ; }
Source:
public void testSingleIncomingCallRemoteDisconnect ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; mConnectionServiceFixtureA.sendSetDisconnected ( ids.mConnectionId , DisconnectCause.LOCAL ) ; assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureY.getCall ( ids.mCallId ) . getState ( ) ) ; }

Target:
public void testSingleIncomingCallRemoteDisconnect ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.mockito.Mockito.when ( mClockProxy.currentTimeMillis ( ) ) . thenReturn ( com.android.server.telecom.tests.TEST_DISCONNECT_TIME ) ; org.mockito.Mockito.when ( mClockProxy.elapsedRealtime ( ) ) . thenReturn ( com.android.server.telecom.tests.TEST_DISCONNECT_ELAPSED_TIME ) ; mConnectionServiceFixtureA.sendSetDisconnected ( ids.mConnectionId , DisconnectCause.LOCAL ) ; assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureY.getCall ( ids.mCallId ) . getState ( ) ) ; }
Source:
public boolean isPackageSuspended ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) throws android.content.pm.PackageManager.NameNotFoundException { throwIfParentInstance ( "isPackageSuspended" ) ; if ( ( mService ) != null ) { try { return mService.isPackageSuspended ( admin , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } catch ( java.lang.IllegalArgumentException ex ) { throw new android.content.pm.PackageManager.NameNotFoundException ( packageName ) ; } } return false ; }

Target:
public boolean isPackageSuspended ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) throws android.content.pm.PackageManager.NameNotFoundException { throwIfParentInstance ( "isPackageSuspended" ) ; if ( ( mService ) != null ) { try { return mService.isPackageSuspended ( admin , mContext.getPackageName ( ) , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } catch ( java.lang.IllegalArgumentException ex ) { throw new android.content.pm.PackageManager.NameNotFoundException ( packageName ) ; } } return false ; }
Source:
public void dropAccept ( org.eclipse.swt.dnd.DropTargetEvent event ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( "DEBUG" , "drop accept" ) ; checkDataType ( event ) ; if ( ( mLeaveTargetNode ) != null ) { mTargetNode = mLeaveTargetNode ; mFeedback = mLeaveFeedback ; mCurrentView = mLeaveView ; } if ( ( ( mLeaveTargetNode ) == null ) || ( ( event.detail ) == ( org.eclipse.swt.dnd.DND.DROP_NONE ) ) ) { clearDropInfo ( ) ; } mLeaveTargetNode = null ; mLeaveFeedback = null ; mLeaveView = null ; }

Target:
public void dropAccept ( org.eclipse.swt.dnd.DropTargetEvent event ) { if ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasDropListener.DEBUG ) com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( "DEBUG" , "drop accept" ) ; checkDataType ( event ) ; if ( ( mLeaveTargetNode ) != null ) { mTargetNode = mLeaveTargetNode ; mFeedback = mLeaveFeedback ; mCurrentView = mLeaveView ; } if ( ( ( mLeaveTargetNode ) == null ) || ( ( event.detail ) == ( org.eclipse.swt.dnd.DND.DROP_NONE ) ) ) { clearDropInfo ( ) ; } mLeaveTargetNode = null ; mLeaveFeedback = null ; mLeaveView = null ; }
Source:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 150 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent , timeoutMs ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 150 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectAvailableCallbacks ( mWiFiNetworkAgent , false , timeoutMs ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public void migrateAppData ( java.lang.String uuid , java.lang.String pkgname , int userid , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { mInstaller.execute ( "migrate_app_data" , uuid , pkgname , userid , flags ) ; }

Target:
public void migrateAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.migrateAppData ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
private void searchRequestFromNative ( byte [ ] address , int charsetId , byte [ ] searchStr ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , "searchRequestFromNative" ) ; if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "search is not supported" ) ; searchRspNative ( address , AvrcpConstants.RSP_SRCH_NOT_SPRTD , 0 , 0 ) ; }

Target:
private void searchRequestFromNative ( byte [ ] address , int charsetId , byte [ ] searchStr ) { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , "searchRequestFromNative: search is not supported" ) ; searchRspNative ( address , AvrcpConstants.RSP_SRCH_NOT_SPRTD , 0 , 0 ) ; }
Source:
public void onSimStateChanged ( int subId , int slotId , com.android.internal.telephony.IccCardConstants.State simState ) { if ( com.android.keyguard.KeyguardSimPukView.DEBUG ) android.util.Log.v ( com.android.keyguard.KeyguardSimPukView.TAG , ( ( ( ( "onSimStateChanged(subId=" + subId ) + ",state=" ) + simState ) + ")" ) ) ; resetState ( ) ; }

Target:
public void onSimStateChanged ( int subId , int slotId , com.android.internal.telephony.IccCardConstants.State simState ) { if ( com.android.keyguard.KeyguardSimPukView.DEBUG ) android.util.Log.v ( com.android.keyguard.KeyguardSimPukView.TAG , ( ( ( ( "onSimStateChanged(subId=" + subId ) + ",state=" ) + simState ) + ")" ) ) ; switch ( simState ) { case ABSENT : case READY : { com.android.keyguard.KeyguardUpdateMonitor.getInstance ( getContext ( ) ) . reportSimUnlocked ( mSubId ) ; mCallback.dismiss ( true , com.android.keyguard.KeyguardUpdateMonitor.getCurrentUser ( ) ) ; break ; } default : resetState ( ) ; } }
Source:
public byte [ ] sign ( java.lang.String key , byte [ ] data ) { return sign ( android.security.KeyStore.getKeyBytes ( key ) , data ) ; }

Target:
public boolean verify ( java.lang.String key , byte [ ] data , byte [ ] signature ) { try { return ( mBinder.verify ( key , data , signature ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public void onIdentityChanged ( byte [ ] mac ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putString ( "mac" , java.lang.String.valueOf ( libcore.util.HexEncoding.encode ( mac ) ) ) ; mEventFacade.postEvent ( "WifiNanOnIdentityChanged" , mResults ) ; }

Target:
public void onIdentityChanged ( byte [ ] mac ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putString ( "mac" , java.lang.String.valueOf ( libcore.util.HexEncoding.encode ( mac ) ) ) ; mEventFacade.postEvent ( "WifiNanOnIdentityChanged" , mResults ) ; }
Source:
private static java.lang.ClassLoader createClassLoaderForDexResource ( java.io.File dexDir , java.lang.String resourceName ) throws java.lang.Exception { java.io.File dexFile = new java.io.File ( dexDir , resourceName ) ; libcore.java.lang.reflect.ParameterTest.copyResource ( resourceName , dexFile ) ; return new dalvik.system.PathClassLoader ( dexFile.getAbsolutePath ( ) , java.lang.ClassLoader.getSystemClassLoader ( ) ) ; }

Target:
private static java.lang.ClassLoader createClassLoaderForResource ( java.io.File destDir , java.lang.String resourcePath ) throws java.lang.Exception { java.lang.String fileName = new java.io.File ( resourcePath ) . getName ( ) ; java.io.File dexOrJarFile = new java.io.File ( destDir , fileName ) ; libcore.java.lang.reflect.ParameterTest.copyResource ( resourcePath , dexOrJarFile ) ; return new dalvik.system.PathClassLoader ( dexOrJarFile.getAbsolutePath ( ) , java.lang.ClassLoader.getSystemClassLoader ( ) ) ; }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newPlatform ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision minToolsRev ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_PLATFORMS ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getMinToolsRev ( ) { return minToolsRev ; } @ java.lang.Override public java.lang.String getPath ( ) { return com.android.sdklib.AndroidTargetHash.getPlatformHashString ( getAndroidVersion ( ) ) ; } } ; }

Target:
public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; }
Source:
public com.android.layoutlib.api.ILayoutResult render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData.LayoutBridge bridge = getReadyBridge ( ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , bridge , width , height , explodeNodes ) ; }

Target:
public com.android.layoutlib.api.LayoutScene render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.layoutlib.LayoutLibrary layoutLib = getReadyLayoutLib ( ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes ) ; }
Source:
public boolean waitForConnection ( ) { boolean ret ; mConnectLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; try { ret = mConnectLatch.await ( com.android.cts.verifier.sensors.DynamicSensorDiscoveryTestActivity.CONNECTION_TIMEOUT_SEC , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { ret = false ; java.lang.Thread.currentThread ( ) . interrupt ( ) ; } finally { mConnectLatch = null ; } return ret ; }

Target:
public boolean waitForConnection ( java.lang.Integer sensorId ) { boolean ret ; mExpectSensorId = sensorId ; mConnectLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; try { ret = mConnectLatch.await ( com.android.cts.verifier.sensors.DynamicSensorDiscoveryTestActivity.CONNECTION_TIMEOUT_SEC , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { ret = false ; java.lang.Thread.currentThread ( ) . interrupt ( ) ; } finally { mConnectLatch = null ; } return ret ; }
Source:
public void dispose ( ) { android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , "dispose" ) ; mPendingMMIs.clear ( ) ; mExternalCallTracker.tearDown ( ) ; mCT.unregisterPhoneStateListener ( mExternalCallTracker ) ; mCT.unregisterForVoiceCallEnded ( this ) ; mCT.dispose ( ) ; if ( ( ( mDefaultPhone ) != null ) && ( ( mDefaultPhone.getServiceStateTracker ( ) ) != null ) ) { mDefaultPhone.getServiceStateTracker ( ) . unregisterForDataRegStateOrRatChanged ( this ) ; mDefaultPhone.unregisterForServiceStateChanged ( this ) ; } }

Target:
public void dispose ( ) { logd ( "dispose" ) ; mPendingMMIs.clear ( ) ; mExternalCallTracker.tearDown ( ) ; mCT.unregisterPhoneStateListener ( mExternalCallTracker ) ; mCT.unregisterForVoiceCallEnded ( this ) ; mCT.dispose ( ) ; if ( ( ( mDefaultPhone ) != null ) && ( ( mDefaultPhone.getServiceStateTracker ( ) ) != null ) ) { mDefaultPhone.getServiceStateTracker ( ) . unregisterForDataRegStateOrRatChanged ( this ) ; mDefaultPhone.unregisterForServiceStateChanged ( this ) ; } }
Source:
static < K , V > java.util.Iterator < K > keyIterator ( java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ) { return new com.google.common.collect.TransformedIterator < java.util.Map.Entry < K , V > , K > ( entryIterator ) { @ java.lang.Override K transform ( java.util.Map.Entry < K , V > entry ) { return entry.getKey ( ) ; } } ; }

Target:
static < K , V > java.util.Iterator < V > valueIterator ( java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ) { return com.google.common.collect.Iterators.transform ( entryIterator , com.google.common.collect.Maps.< V > valueFunction ( ) ) ; }
Source:
public void testAesCbcHmacSha384Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1000 , false ) ; }
Source:
private android.content.Intent waitForIntent ( int timeoutMs , java.util.concurrent.BlockingQueue < android.content.Intent > queue ) { try { android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNotNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( "Cannot obtain an Intent from the queue: " + ( e.getMessage ( ) ) ) ) ; } return null ; }

Target:
private android.content.Intent waitForNoIntent ( int timeoutMs , java.util.concurrent.LinkedBlockingQueue < android.content.Intent > queue ) { try { org.junit.Assert.assertNotNull ( queue ) ; android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( "Cannot obtain an Intent from the queue: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public java.lang.String getLine1AlphaTagForDisplay ( int subId , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getLine1AlphaTagForDisplay" ) ) ) { return null ; } java.lang.String iccId = getIccId ( subId ) ; if ( iccId != null ) { java.lang.String alphaTagPrefKey = ( com.android.phone.PhoneInterfaceManager.PREF_CARRIERS_ALPHATAG_PREFIX ) + iccId ; return mTelephonySharedPreferences.getString ( alphaTagPrefKey , null ) ; } return null ; }

Target:
public java.util.List < android.telephony.ClientRequestStats > getClientRequestStats ( java.lang.String callingPackage , int subId ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getClientRequestStats" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getClientRequestStats ( ) ; } return null ; }
Source:
public java.lang.Boolean bluetoothA2dpConnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "deviceID" , description = "Name or MAC address of a bluetooth device." ) java.lang.String deviceID ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile ) == null ) { return false ; } android.bluetooth.BluetoothDevice mDevice = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( BluetoothFacade.DiscoveredDevices , deviceID ) ; com.googlecode.android_scripting.Log.d ( ( "Connecting to device " + ( mDevice.getAliasName ( ) ) ) ) ; return a2dpConnect ( mDevice ) ; }

Target:
public java.lang.Boolean bluetoothA2dpConnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "deviceID" , description = "Name or MAC address of a bluetooth device." ) java.lang.String deviceID ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile ) == null ) { return false ; } android.bluetooth.BluetoothDevice mDevice = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( mBluetoothAdapter.getBondedDevices ( ) , deviceID ) ; com.googlecode.android_scripting.Log.d ( ( "Connecting to device " + ( mDevice.getAliasName ( ) ) ) ) ; return a2dpConnect ( mDevice ) ; }
Source:
public void test_JarFile_Modified_Manifest_EntryAttributes ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_Manifest_EntryAttributes.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; try { jarFile.getInputStream ( zipEntry ) ; fail ( "should throw Security Exception" ) ; } catch ( java.lang.SecurityException e ) { } } }

Target:
public void test_close ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_SF_EntryAttributes.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; jarFile.close ( ) ; jarFile.close ( ) ; }
Source:
private static com.android.dialer.glidephotomanager.PhotoInfo createPhotoInfoFromRow ( com.android.dialer.calllog.model.CoalescedRow row ) { com.android.dialer.glidephotomanager.PhotoInfo.Builder photoInfoBuilder = com.android.dialer.calllogutils.NumberAttributesConverter.toPhotoInfoBuilder ( row.numberAttributes ( ) ) . setIsVideo ( ( ( ( row.features ( ) ) & ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) == ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) ) . setIsVoicemail ( row.isVoicemailCall ( ) ) ; if ( ! ( android.text.TextUtils.isEmpty ( row.formattedNumber ( ) ) ) ) { photoInfoBuilder.setFormattedNumber ( row.formattedNumber ( ) ) ; } return photoInfoBuilder.build ( ) ; }

Target:
private static com.android.dialer.glidephotomanager.PhotoInfo createPhotoInfoFromRow ( com.android.dialer.calllog.model.CoalescedRow row ) { return com.android.dialer.calllogutils.NumberAttributesConverter.toPhotoInfoBuilder ( row.getNumberAttributes ( ) ) . setFormattedNumber ( row.getFormattedNumber ( ) ) . setIsVideo ( ( ( ( row.getFeatures ( ) ) & ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) == ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) ) . setIsVoicemail ( row.getIsVoicemailCall ( ) ) . build ( ) ; }
Source:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) { return ; } com.android.jack.ir.ast.JSession session = method.getEnclosingType ( ) . getSession ( ) ; com.android.jack.statistics.BlockCountMarker bcm = session.getMarker ( com.android.jack.statistics.BlockCountMarker.class ) ; if ( bcm == null ) { bcm = new com.android.jack.statistics.BlockCountMarker ( ) ; session.addMarker ( bcm ) ; } com.android.jack.statistics.BlockStatistics.BlockStatisticsVisitor statistics = new com.android.jack.statistics.BlockStatistics.BlockStatisticsVisitor ( bcm ) ; statistics.accept ( method ) ; }

Target:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) { return ; } com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; com.android.jack.statistics.BlockCountMarker bcm = session.getMarker ( com.android.jack.statistics.BlockCountMarker.class ) ; if ( bcm == null ) { bcm = new com.android.jack.statistics.BlockCountMarker ( ) ; session.addMarker ( bcm ) ; } com.android.jack.statistics.BlockStatistics.BlockStatisticsVisitor statistics = new com.android.jack.statistics.BlockStatistics.BlockStatisticsVisitor ( bcm ) ; statistics.accept ( method ) ; }
Source:
private static java.lang.String normalizeInterfaceMethodName ( java.lang.String name , boolean isLambda , boolean isStatic ) { java.lang.String suffix ; if ( isLambda ) { suffix = com.google.devtools.build.android.desugar.InterfaceDesugaring.COMPANION_SUFFIX ; } else if ( isStatic ) { suffix = com.google.devtools.build.android.desugar.InterfaceDesugaring.INTERFACE_STATIC_COMPANION_METHOD_SUFFIX ; } else { return name ; } return name + suffix ; }

Target:
private static java.lang.String normalizeInterfaceMethodName ( java.lang.String name , boolean isLambda , boolean isStatic ) { java.lang.String suffix ; if ( isLambda ) { suffix = DependencyCollector.INTERFACE_COMPANION_SUFFIX ; } else if ( isStatic ) { suffix = com.google.devtools.build.android.desugar.InterfaceDesugaring.INTERFACE_STATIC_COMPANION_METHOD_SUFFIX ; } else { return name ; } return name + suffix ; }
Source:
void waitForQueuedThread ( java.util.concurrent.locks.AbstractQueuedLongSynchronizer sync , java.lang.Thread t ) { long startTime = java.lang.System.nanoTime ( ) ; while ( ! ( sync.isQueued ( t ) ) ) { if ( ( millisElapsedSince ( startTime ) ) > ( LONG_DELAY_MS ) ) throw new jsr166.AssertionFailedError ( "timed out" ) ; java.lang.Thread.yield ( ) ; } assertTrue ( t.isAlive ( ) ) ; }

Target:
void waitForQueuedThread ( java.util.concurrent.locks.AbstractQueuedLongSynchronizer sync , java.lang.Thread t ) { long startTime = java.lang.System.nanoTime ( ) ; while ( ! ( sync.isQueued ( t ) ) ) { if ( ( millisElapsedSince ( startTime ) ) > ( LONG_DELAY_MS ) ) throw new junit.framework.AssertionFailedError ( "timed out" ) ; java.lang.Thread.yield ( ) ; } assertTrue ( t.isAlive ( ) ) ; }
Source:
public java.nio.ByteBuffer putShort ( short value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.SHORT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , value , order ) ; position = newPosition ; return this ; }

Target:
public java.nio.ByteBuffer putShort ( short value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.SHORT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , value , order ) ; position = newPosition ; return this ; }
Source:
public void testAddAll2 ( ) { try { java.util.concurrent.ConcurrentSkipListSet q = new java.util.concurrent.ConcurrentSkipListSet ( ) ; java.lang.Integer [ ] ints = new java.lang.Integer [ SIZE ] ; q.addAll ( java.util.Arrays.asList ( ints ) ) ; shouldThrow ( ) ; } catch ( java.lang.NullPointerException success ) { } }

Target:
public void testAddNonComparable ( ) { java.util.concurrent.ConcurrentSkipListSet q = new java.util.concurrent.ConcurrentSkipListSet ( ) ; try { q.add ( new java.lang.Object ( ) ) ; q.add ( new java.lang.Object ( ) ) ; shouldThrow ( ) ; } catch ( java.lang.ClassCastException success ) { } }
Source:
public void createControl ( org.eclipse.swt.widgets.Composite parent ) { org.eclipse.swt.widgets.Composite content = new org.eclipse.swt.widgets.Composite ( parent , org.eclipse.swt.SWT.NONE ) ; org.eclipse.swt.layout.GridLayout layout = new org.eclipse.swt.layout.GridLayout ( ) ; layout.numColumns = 1 ; content.setLayout ( layout ) ; createStringGroup ( content ) ; createResFileGroup ( content ) ; validatePage ( ) ; setControl ( content ) ; }

Target:
private void initUi ( ) { java.lang.String projPath = mProject.getFullPath ( ) . toPortableString ( ) ; java.lang.String filePath = com.android.ide.eclipse.adt.internal.refactorings.extractstring.ExtractStringInputPage.sLastResFilePath.get ( projPath ) ; mResFileCombo.setText ( ( filePath != null ? filePath : com.android.ide.eclipse.adt.internal.refactorings.extractstring.ExtractStringInputPage.DEFAULT_RES_FILE_PATH ) ) ; mOnConfigSelectorUpdated.run ( ) ; validatePage ( ) ; }
Source:
private boolean isRequired ( ) { int first_api_level = android.os.SystemProperties.getInt ( "ro.product.first_api_level" , 0 ) ; if ( ( first_api_level > 0 ) && ( first_api_level < ( android.security.cts.EncryptionTest.min_api_level ) ) ) { return false ; } else { return ! ( hasLowRAM ( ) ) ; } }

Target:
private boolean isRequired ( ) { return ( ( com.android.compatibility.common.util.PropertyUtil.getFirstApiLevel ( ) ) >= ( android.security.cts.EncryptionTest.MIN_API_LEVEL ) ) && ( ! ( hasLowRAM ( ) ) ) ; }
Source:
public java.lang.String iccTransmitApduBasicChannel ( int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccTransmitApduBasicChannel ( cla , instruction , p1 , p2 , p3 , data ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return "" ; }

Target:
public java.lang.String iccTransmitApduBasicChannel ( int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data ) { return iccTransmitApduBasicChannel ( getSubId ( ) , cla , instruction , p1 , p2 , p3 , data ) ; }
Source:
public java.lang.String isValid ( java.lang.String newText ) { if ( ( newText == null ) || ( ( newText.length ( ) ) == 0 ) ) { return "Error: URL field is empty. Please enter a URL." ; } if ( ( ( ( ! ( newText.startsWith ( "file://" ) ) ) && ( ! ( newText.startsWith ( "ftp://" ) ) ) ) && ( ! ( newText.startsWith ( "http://" ) ) ) ) && ( ! ( newText.startsWith ( "https://" ) ) ) ) { return "Error: The URL must start by one of file://, ftp://, http:// or https://" ; } for ( com.android.sdklib.internal.repository.RepoSource s : knowSources ) { if ( newText.equalsIgnoreCase ( s.getUrl ( ) ) ) { return "Error : This site is already listed." ; } } return null ; }

Target:
public java.lang.String isValid ( java.lang.String newText ) { if ( ( newText == null ) || ( ( newText.length ( ) ) == 0 ) ) { return "Error: URL field is empty. Please enter a URL." ; } if ( ( ( ( ! ( newText.startsWith ( "file://" ) ) ) && ( ! ( newText.startsWith ( "ftp://" ) ) ) ) && ( ! ( newText.startsWith ( "http://" ) ) ) ) && ( ! ( newText.startsWith ( "https://" ) ) ) ) { return "Error: The URL must start by one of file://, ftp://, http:// or https://" ; } for ( com.android.sdklib.internal.repository.SdkSource s : knowSources ) { if ( newText.equalsIgnoreCase ( s.getUrl ( ) ) ) { return "Error : This site is already listed." ; } } return null ; }
Source:
public void getAllProfiles ( android.telephony.euicc.EuiccCardManager.ResultCallback < android.service.euicc.EuiccProfileInfo [ ] > callback ) { try { getIEuiccCardController ( ) . getAllProfiles ( mContext.getOpPackageName ( ) , new com.android.internal.telephony.euicc.IGetAllProfilesCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , android.service.euicc.EuiccProfileInfo [ ] profiles ) { callback.onComplete ( resultCode , profiles ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getAllProfiles" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void getAllProfiles ( java.lang.String cardId , android.telephony.euicc.EuiccCardManager.ResultCallback < android.service.euicc.EuiccProfileInfo [ ] > callback ) { try { getIEuiccCardController ( ) . getAllProfiles ( mContext.getOpPackageName ( ) , cardId , new com.android.internal.telephony.euicc.IGetAllProfilesCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , android.service.euicc.EuiccProfileInfo [ ] profiles ) { callback.onComplete ( resultCode , profiles ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getAllProfiles" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
private static void setTimezoneFromMccIfNeeded ( android.content.Context context , int mcc ) { com.android.internal.telephony.TimeServiceHelper timeServiceHelper = com.android.internal.telephony.TelephonyComponentFactory.getInstance ( ) . makeTimeServiceHelper ( context ) ; if ( ! ( timeServiceHelper.isTimeZoneSettingInitialized ( ) ) ) { java.lang.String zoneId = com.android.internal.telephony.MccTable.defaultTimeZoneForMcc ( mcc ) ; if ( ( zoneId != null ) && ( ( zoneId.length ( ) ) > 0 ) ) { timeServiceHelper.setDeviceTimeZone ( zoneId ) ; android.util.Slog.d ( com.android.internal.telephony.MccTable.LOG_TAG , ( "timezone set to " + zoneId ) ) ; } } }

Target:
private static void setTimezoneFromMccIfNeeded ( android.content.Context context , int mcc ) { if ( ! ( com.android.internal.telephony.TimeServiceHelper.isTimeZoneSettingInitializedStatic ( ) ) ) { java.lang.String zoneId = com.android.internal.telephony.MccTable.defaultTimeZoneForMcc ( mcc ) ; if ( ( zoneId != null ) && ( ( zoneId.length ( ) ) > 0 ) ) { com.android.internal.telephony.TimeServiceHelper.setDeviceTimeZoneStatic ( context , zoneId ) ; android.util.Slog.d ( com.android.internal.telephony.MccTable.LOG_TAG , ( "timezone set to " + zoneId ) ) ; } } }
Source:
public void testRoamToDifferentNetwork ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; executeAndValidateRoamSequence ( false ) ; }

Target:
public void testRoamFailureDueToBssidSet ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; int connectedNetworkId = 5 ; executeAndValidateConnectSequence ( connectedNetworkId , false , false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( false ) ; android.net.wifi.WifiConfiguration roamingConfig = new android.net.wifi.WifiConfiguration ( ) ; roamingConfig.networkId = connectedNetworkId ; roamingConfig.getNetworkSelectionStatus ( ) . setNetworkSelectionBSSID ( "45:34:23:23:ab:ed" ) ; assertFalse ( mDut.roamToNetwork ( roamingConfig ) ) ; }
Source:
public void leave ( ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( lock.isHeldByCurrentThread ( ) ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } try { signalConditionsOfSatisfiedGuards ( null ) ; } finally { lock.unlock ( ) ; } }

Target:
public void leave ( ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; try { if ( ( lock.getHoldCount ( ) ) == 1 ) { signalNextWaiter ( ) ; } } finally { lock.unlock ( ) ; } }
Source:
public final void testRect ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( ) ; assertEquals ( 0 , r.x ) ; assertEquals ( 0 , r.y ) ; assertEquals ( 0 , r.w ) ; assertEquals ( 0 , r.h ) ; }

Target:
public final void testRect ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( ) ; assertEquals ( 0 , r.x ) ; assertEquals ( 0 , r.y ) ; assertEquals ( 0 , r.w ) ; assertEquals ( 0 , r.h ) ; }
Source:
protected void clearRemainingState ( final com.android.cts.verifier.managedprovisioning.DialogTestListItem test ) { super . clearRemainingState ( test ) ; if ( WorkNotificationTestActivity.ACTION_WORK_NOTIFICATION_ON_LOCKSCREEN.equals ( test.getManualTestIntent ( ) . getAction ( ) ) ) { try { startActivity ( new android.content.Intent ( WorkNotificationTestActivity.ACTION_CLEAR_WORK_NOTIFICATION ) ) ; } catch ( android.content.ActivityNotFoundException e ) { } } }

Target:
protected void clearRemainingState ( final com.android.cts.verifier.managedprovisioning.DialogTestListItem test ) { super . clearRemainingState ( test ) ; if ( ByodHelperActivity.ACTION_NOTIFICATION_ON_LOCKSCREEN.equals ( test.getManualTestIntent ( ) . getAction ( ) ) ) { try { startActivity ( new android.content.Intent ( ByodHelperActivity.ACTION_CLEAR_NOTIFICATION ) ) ; } catch ( android.content.ActivityNotFoundException e ) { } } }
Source:
public boolean factoryReset ( ) { try { if ( ( mService ) != null ) { return mService.factoryReset ( ) ; } else { android.os.SystemProperties.set ( "persist.bluetooth.factoryreset" , "true" ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public boolean factoryReset ( ) { try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) { return mService.factoryReset ( ) ; } android.os.SystemProperties.set ( "persist.bluetooth.factoryreset" , "true" ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return false ; }
Source:
public java.lang.String deriveValue ( @ org.jetbrains.annotations.NotNull com.google.gct.idea.samples.ScopedStateStore state , com.android.tools.idea.wizard.ScopedStateStore.Key changedKey , @ org.jetbrains.annotations.Nullable java.lang.String currentValue ) { com.appspot.gsamplesindex.samplesindex.model.Sample sample = state.get ( com.google.gct.idea.samples.SampleImportWizardPath.SAMPLE_KEY ) ; if ( sample == null ) { return "" ; } java.lang.String sampleName = sample.getTitle ( ) ; return com.google.gct.idea.samples.SampleSetupStep.getUniqueName ( ( com.intellij.openapi.util.text.StringUtil.isEmpty ( sampleName ) ? com.google.gct.idea.samples.SampleSetupStep.DEFAULT_SAMPLE_NAME : sampleName ) ) ; }

Target:
public java.lang.String deriveValue ( @ org.jetbrains.annotations.NotNull com.android.tools.idea.wizard.dynamic.ScopedStateStore state , com.android.tools.idea.wizard.dynamic.ScopedStateStore.Key changedKey , @ org.jetbrains.annotations.Nullable java.lang.String currentValue ) { com.appspot.gsamplesindex.samplesindex.model.Sample sample = state.get ( com.google.gct.idea.samples.SampleImportWizardPath.SAMPLE_KEY ) ; if ( sample == null ) { return "" ; } java.lang.String sampleName = sample.getTitle ( ) ; return com.google.gct.idea.samples.SampleSetupStep.getUniqueName ( ( com.intellij.openapi.util.text.StringUtil.isEmpty ( sampleName ) ? com.google.gct.idea.samples.SampleSetupStep.DEFAULT_SAMPLE_NAME : sampleName ) ) ; }
Source:
public boolean hasChildren ( java.lang.Object element ) { if ( element instanceof com.android.resources.ResourceType ) { return mResources.hasResourcesOfType ( ( ( com.android.resources.ResourceType ) ( element ) ) ) ; } else if ( ( mFullLevels ) && ( element instanceof com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem ) ) { return ( ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem ) ( element ) ) . hasAlternates ( ) ; } return false ; }

Target:
public boolean hasChildren ( java.lang.Object element ) { if ( element instanceof com.android.resources.ResourceType ) { return mResources.hasResourcesOfType ( ( ( com.android.resources.ResourceType ) ( element ) ) ) ; } else if ( ( mFullLevels ) && ( element instanceof com.android.ide.common.resources.ResourceItem ) ) { return ( ( com.android.ide.common.resources.ResourceItem ) ( element ) ) . hasAlternates ( ) ; } return false ; }
Source:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToUnicode ( input , result , info ) ; if ( info.hasErrors ( ) ) { return input ; } return result.toString ( ) ; }

Target:
public static java.lang.String toUnicode ( java.lang.String input ) { return libcore.icu.NativeIDN.toUnicode ( input , 0 ) ; }
Source:
public static java.security.Provider getExternalProvider ( java.lang.String algorithm ) { java.security.Provider selectedProvider = null ; for ( java.security.Provider p : java.security.Security.getProviders ( algorithm ) ) { if ( ! ( p.getClass ( ) . getClassLoader ( ) . equals ( org.conscrypt.CryptoUpcalls.class . getClassLoader ( ) ) ) ) { selectedProvider = p ; break ; } } if ( selectedProvider == null ) { java.lang.System.err.println ( ( "Could not find external provider for algorithm: " + algorithm ) ) ; } return selectedProvider ; }

Target:
private static boolean isOurProvider ( java.security.Provider p ) { return p.getClass ( ) . getPackage ( ) . equals ( org.conscrypt.CryptoUpcalls.class . getPackage ( ) ) ; }
Source:
public static long $noinline$returnLong ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 1000000 ; for ( ; i < 400000000 ; ++ i ) { } while ( ! ( Main.ensureInOsrCode ( ) ) ) { } java.lang.System.out.println ( i ) ; return - 281474976706287L ; }

Target:
public static long $noinline$returnLong ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 400000 ; ++ i ) { } while ( ! ( Main.ensureInOsrCode ( ) ) ) { } java.lang.System.out.println ( i ) ; return - 281474976706287L ; }