auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void selectDefaultApplication ( ) { try { select ( null ) ; } catch ( java.util.NoSuchElementException e ) { if ( ( getAccessControlEnforcer ( ) ) != null ) { try { select ( mAccessControlEnforcer.getDefaultAccessControlAid ( ) ) ; } catch ( java.lang.Exception ignore ) { } } } catch ( android.os.RemoteException ignore ) { } synchronized ( mLock ) { mDefaultApplicationSelectedOnBasicChannel = true ; } }

Target:
public void onStateChange ( boolean state ) { synchronized ( mLock ) { android.util.Log.i ( mTag , ( "OnStateChange:" + state ) ) ; mIsConnected = state ; if ( ! state ) { if ( ( mAccessControlEnforcer ) != null ) { mAccessControlEnforcer.reset ( ) ; } } else { initializeAccessControl ( ) ; synchronized ( mLock ) { mDefaultApplicationSelectedOnBasicChannel = true ; } } } }
Source:
private void edgeSplitPredecessors ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getBlocksDepthFirst ( true ) ) { if ( ( block != ( cfg.getEntryBlock ( ) ) ) && ( block != ( cfg.getExitBlock ( ) ) ) ) { if ( com.android.jack.transformations.ssa.SsaBasicBlockSplitter.nodeNeedsUniquePredecessor ( block ) ) { block.split ( 0 ) ; } } } }

Target:
private void edgeSplitPredecessors ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getInternalBlocksUnordered ( ) ) { if ( com.android.jack.transformations.ssa.SsaBasicBlockSplitter.nodeNeedsUniquePredecessor ( block ) ) { block.split ( 0 ) ; } } }
Source:
void zoomBy ( double scaleX , double scaleY , java.awt.Point location ) { mTransform.translate ( location.x , location.y ) ; mTransform.scale ( scaleX , scaleY ) ; mTransform.translate ( ( - ( location.x ) ) , ( - ( location.y ) ) ) ; }

Target:
void zoomBy ( double scaleX , double scaleY , java.awt.geom.Point2D location ) { mTransform.translate ( location.getX ( ) , location.getY ( ) ) ; mTransform.scale ( scaleX , scaleY ) ; mTransform.translate ( ( - ( location.getX ( ) ) ) , ( - ( location.getY ( ) ) ) ) ; }
Source:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called post GC on WifiNanManager" ) ; return ; } mgr.startRanging ( mSessionId , params , listener ) ; } }

Target:
public void terminate ( ) { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "terminate: called post GC on WifiNanManager" ) ; return ; } mgr.terminateSession ( mClientId , mSessionId ) ; mTerminated = true ; mMgr.clear ( ) ; mCloseGuard.close ( ) ; }
Source:
private int getBluetoothCallStateForUpdate ( ) { com.android.server.telecom.CallsManager callsManager = mCallsManager ; com.android.server.telecom.Call ringingCall = mCallsManager.getRingingCall ( ) ; com.android.server.telecom.Call dialingCall = mCallsManager.getOutgoingCall ( ) ; int bluetoothCallState = com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_IDLE ; if ( ringingCall != null ) { bluetoothCallState = com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_INCOMING ; } else if ( dialingCall != null ) { bluetoothCallState = com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_ALERTING ; } return bluetoothCallState ; }

Target:
private int getBluetoothCallStateForUpdate ( ) { com.android.server.telecom.CallsManager callsManager = mCallsManager ; com.android.server.telecom.Call ringingCall = mCallsManager.getRingingCall ( ) ; com.android.server.telecom.Call dialingCall = mCallsManager.getOutgoingCall ( ) ; boolean hasOnlyDisconnectedCalls = mCallsManager.hasOnlyDisconnectedCalls ( ) ; int bluetoothCallState = com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_IDLE ; if ( ringingCall != null ) { bluetoothCallState = com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_INCOMING ; } else if ( dialingCall != null ) { bluetoothCallState = com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_ALERTING ; } else if ( hasOnlyDisconnectedCalls || ( mIsDisconnectedTonePlaying ) ) { bluetoothCallState = com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_DISCONNECTED ; } return bluetoothCallState ; }
Source:
public void enter ( ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } try { mConnSocket.close ( ) ; mConnSocket = null ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.android.bluetooth.pbap.PbapStateMachine.TAG , ( "Close Connection Socket error: " + ( e.toString ( ) ) ) ) ; } mServiceHandler.obtainMessage ( BluetoothPbapService.MSG_STATE_MACHINE_DONE , this ) . sendToTarget ( ) ; }

Target:
public void enter ( ) { super . enter ( ) ; if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } try { mConnSocket.close ( ) ; mConnSocket = null ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.android.bluetooth.pbap.PbapStateMachine.TAG , ( "Close Connection Socket error: " + ( e.toString ( ) ) ) ) ; } mServiceHandler.obtainMessage ( BluetoothPbapService.MSG_STATE_MACHINE_DONE , this ) . sendToTarget ( ) ; broadcastStateTransitions ( ) ; }
Source:
public void testNewActivityDuringOccluded ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; gotoKeyguard ( ) ; launchActivity ( "ShowWhenLockedWithDialogActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedWithDialogActivity" } ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_ACTIVITY_OPEN , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }

Target:
public void testNewActivityDuringOccluded ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; gotoKeyguard ( ) ; launchActivity ( "ShowWhenLockedWithDialogActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedWithDialogActivity" } ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_ACTIVITY_OPEN , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }
Source:
private com.android.internal.communication.Msg getCtrlResponse ( ) { com.android.internal.communication.Msg response = null ; try { response = com.android.internal.communication.Msg.recv ( mRilChannel ) ; } catch ( java.io.IOException e ) { android.util.Log.v ( com.android.internal.telephony.mockril.MockRilController.TAG , ( "receive response for getRadioState() error: " + ( e.getStackTrace ( ) ) ) ) ; return null ; } return response ; }

Target:
private com.android.internal.communication.Msg getCtrlResponse ( ) { com.android.internal.communication.Msg response = null ; try { response = com.android.internal.communication.Msg.recv ( mRilChannel ) ; } catch ( java.io.IOException e ) { android.telephony.Rlog.v ( com.android.internal.telephony.mockril.MockRilController.TAG , ( "receive response for getRadioState() error: " + ( e.getStackTrace ( ) ) ) ) ; return null ; } return response ; }
Source:
public void test_removeLast ( ) { ll.removeLast ( ) ; assertTrue ( "Failed to remove last element" , ( ( ll.getLast ( ) ) != ( objArray [ ( ( objArray.length ) - 1 ) ] ) ) ) ; ll.clear ( ) ; try { ll.removeLast ( ) ; fail ( "NoSuchElementException expected" ) ; } catch ( java.util.NoSuchElementException e ) { } }

Target:
public void test_removeFirst ( ) { ll.removeFirst ( ) ; assertTrue ( "Failed to remove first element" , ( ( ll.getFirst ( ) ) != ( objArray [ 0 ] ) ) ) ; java.util.LinkedList list = new java.util.LinkedList ( ) ; try { list.removeFirst ( ) ; fail ( "Should throw NoSuchElementException" ) ; } catch ( java.util.NoSuchElementException e ) { } }
Source:
protected java.lang.String getIconFolder ( com.android.assetstudiolib.GraphicGenerator.Options options ) { return "res/drawable-" + ( options.density.getResourceValue ( ) ) ; }

Target:
protected java.lang.String getIconFolder ( com.android.assetstudiolib.GraphicGenerator.Options options ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( 50 ) ; sb.append ( SdkConstants.FD_RES ) ; sb.append ( '/' ) ; if ( options.mipmap ) { sb.append ( ResourceFolderType.MIPMAP.getName ( ) ) ; } else { sb.append ( ResourceFolderType.DRAWABLE.getName ( ) ) ; } sb.append ( '-' ) ; sb.append ( options.density.getResourceValue ( ) ) ; return sb.toString ( ) ; }
Source:
private void registerService ( ) { com.android.devtools.server.services.ServiceLocator.register ( new com.android.devtools.server.services.TelephonyManagerService ( mContext ) ) ; com.android.devtools.server.services.ServiceLocator.register ( new com.android.devtools.server.services.SmsManagerService ( mContext ) ) ; com.android.devtools.server.services.ServiceLocator.register ( new com.android.devtools.server.services.OrientationManagerService ( mContext , mDevice ) ) ; }

Target:
private void registerService ( ) { com.android.devtools.server.services.ServiceLocator.register ( new com.android.devtools.server.services.TelephonyManagerService ( mContext ) ) ; com.android.devtools.server.services.ServiceLocator.register ( new com.android.devtools.server.services.SmsManagerService ( mContext ) ) ; com.android.devtools.server.services.ServiceLocator.register ( new com.android.devtools.server.services.OrientationManagerService ( mContext , mDevice ) ) ; com.android.devtools.server.services.ServiceLocator.register ( new com.android.devtools.server.services.GeoManagerService ( mContext , mDevice ) ) ; }
Source:
public void nowPlayingChangedRsp ( int type ) { if ( ! ( registerNotificationRspNowPlayingChangedNative ( type ) ) ) { android.util.Log.e ( com.android.bluetooth.avrcp.Avrcp.AvrcpMediaRsp.TAG , "registerNotificationRspNowPlayingChangedNative failed!" ) ; } }

Target:
public void nowPlayingChangedRsp ( int type ) { if ( ( mNowPlayingListChangedNT ) != ( AvrcpConstants.NOTIFICATION_TYPE_INTERIM ) ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) { android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.AvrcpMediaRsp.TAG , "NowPlayingListChanged: Not registered or requesting." ) ; } return ; } if ( ! ( registerNotificationRspNowPlayingChangedNative ( type ) ) ) { android.util.Log.e ( com.android.bluetooth.avrcp.Avrcp.AvrcpMediaRsp.TAG , "registerNotificationRspNowPlayingChangedNative failed!" ) ; } mNowPlayingListChangedNT = AvrcpConstants.NOTIFICATION_TYPE_CHANGED ; }
Source:
private void sendNsdStateChangeBroadcast ( boolean enabled ) { final android.content.Intent intent = new android.content.Intent ( android.net.nsd.NsdManager.ACTION_NSD_STATE_CHANGED ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; if ( enabled ) { intent.putExtra ( NsdManager.EXTRA_NSD_STATE , NsdManager.NSD_STATE_ENABLED ) ; } else { intent.putExtra ( NsdManager.EXTRA_NSD_STATE , NsdManager.NSD_STATE_DISABLED ) ; } mContext.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }

Target:
private void sendNsdStateChangeBroadcast ( boolean isEnabled ) { final android.content.Intent intent = new android.content.Intent ( android.net.nsd.NsdManager.ACTION_NSD_STATE_CHANGED ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; int nsdState = ( isEnabled ) ? android.net.nsd.NsdManager.NSD_STATE_ENABLED : android.net.nsd.NsdManager.NSD_STATE_DISABLED ; intent.putExtra ( NsdManager.EXTRA_NSD_STATE , nsdState ) ; mContext.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }
Source:
public void testKeyStore_GetKey_Certificate_Encrypted_Failure ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertNull ( "Certificate entries should return null" , mKeyStore.getKey ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , null ) ) ; }

Target:
public void testKeyStore_GetKey_Certificate_Encrypted_Failure ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_RSA_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertNull ( "Certificate entries should return null" , mKeyStore.getKey ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , null ) ) ; }
Source:
public void setData ( com.android.hierarchyviewerlib.device.Window window , com.android.hierarchyviewerlib.device.ViewNode viewNode ) { synchronized ( this ) { this . window = window ; tree = new com.android.hierarchyviewerlib.scene.DrawableViewNode ( viewNode ) ; tree.setLeft ( ) ; tree.placeRoot ( ) ; viewport = null ; zoom = 1 ; } notifyTreeChanged ( ) ; }

Target:
public void setData ( com.android.hierarchyviewerlib.device.Window window , com.android.hierarchyviewerlib.device.ViewNode viewNode ) { synchronized ( this ) { this . window = window ; tree = new com.android.hierarchyviewerlib.scene.DrawableViewNode ( viewNode ) ; tree.setLeft ( ) ; tree.placeRoot ( ) ; viewport = null ; zoom = 1 ; selectedNode = null ; } notifyTreeChanged ( ) ; }
Source:
public void getProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }

Target:
public void getProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }
Source:
com.android.internal.telephony.gsm.GsmSmsAddress getAddress ( ) { com.android.internal.telephony.gsm.GsmSmsAddress ret ; int addressLength = ( pdu [ cur ] ) & 255 ; int lengthBytes = 2 + ( ( addressLength + 1 ) / 2 ) ; try { ret = new com.android.internal.telephony.gsm.GsmSmsAddress ( pdu , cur , lengthBytes ) ; } catch ( java.text.ParseException e ) { android.util.Log.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , e.getMessage ( ) ) ; ret = null ; } cur += lengthBytes ; return ret ; }

Target:
com.android.internal.telephony.gsm.GsmSmsAddress getAddress ( ) { com.android.internal.telephony.gsm.GsmSmsAddress ret ; int addressLength = ( pdu [ cur ] ) & 255 ; int lengthBytes = 2 + ( ( addressLength + 1 ) / 2 ) ; try { ret = new com.android.internal.telephony.gsm.GsmSmsAddress ( pdu , cur , lengthBytes ) ; } catch ( java.text.ParseException e ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , e.getMessage ( ) ) ; ret = null ; } cur += lengthBytes ; return ret ; }
Source:
public static int ioctlInt ( java.io.FileDescriptor fd , int cmd , android.system.IoctlIntArg arg ) throws android.system.ErrnoException { android.util.MutableInt internalArg = new android.util.MutableInt ( arg.value ) ; try { return Libcore.os.ioctlInt ( fd , cmd , internalArg ) ; } finally { arg.value = internalArg.value ; } }

Target:
public static int ioctlInt ( java.io.FileDescriptor fd , int cmd , android.system.Int32Ref arg ) throws android.system.ErrnoException { return Libcore.os.ioctlInt ( fd , cmd , arg ) ; }
Source:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) throws android.os.RemoteException { synchronized ( this ) { mDidUpdate = true ; } systemReady ( goingCallback ) ; }

Target:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) { mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.server.am.ActivityManagerService.this ) { mDidUpdate = true ; } com.android.server.am.ActivityManagerService.writeLastDonePreBootReceivers ( doneReceivers ) ; showBootMessage ( mContext.getText ( R.string.android_upgrading_complete ) , false ) ; systemReady ( goingCallback ) ; } } ) ; }
Source:
public void run ( ) { com.intellij.openapi.vfs.VirtualFile rootB = myFixture.findOrCreateDir ( "b" ) ; com.intellij.openapi.vfs.VirtualFile outB = myFixture.findOrCreateDir ( "out" ) ; com.intellij.roots.ModuleRootModificationUtil.addDependency ( moduleA , moduleB , scope , false ) ; com.intellij.testFramework.PsiTestUtil.addSourceRoot ( moduleB , rootB ) ; com.intellij.testFramework.PsiTestUtil.setCompilerOutputPath ( moduleB , outB.getUrl ( ) , false ) ; }

Target:
public void run ( ) { com.intellij.openapi.vfs.VirtualFile rootB = myFixture.findOrCreateDir ( name ) ; com.intellij.openapi.vfs.VirtualFile outB = myFixture.findOrCreateDir ( "out" ) ; com.intellij.openapi.roots.ModuleRootModificationUtil.addDependency ( moduleA , moduleB , scope , exported ) ; com.intellij.testFramework.PsiTestUtil.addSourceRoot ( moduleB , rootB ) ; com.intellij.testFramework.PsiTestUtil.setCompilerOutputPath ( moduleB , outB.getUrl ( ) , false ) ; }
Source:
public void reset ( ) throws java.io.IOException { synchronized ( lock ) { checkNotClosed ( ) ; if ( ( mark ) == ( - 1 ) ) { throw new java.io.IOException ( "Invalid mark" ) ; } pos = mark ; } }

Target:
public void reset ( ) throws java.io.IOException { synchronized ( lock ) { checkNotClosed ( ) ; if ( ( mark ) == ( - 1 ) ) { throw new java.io.IOException ( "Invalid mark" ) ; } this . pos = mark ; this . lastWasCR = this . markedLastWasCR ; } }
Source:
public void testNonHexChunkSize ( ) throws java.io.IOException { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "5\r\nABCDE\r\nG\r\nFGHIJKLMNOPQRSTU\r\n0\r\n\r\n" ) . clearHeaders ( ) . addHeader ( "Transfer-encoding: chunked" ) ) ; server.play ( ) ; java.net.URLConnection connection = server.getUrl ( "/" ) . openConnection ( ) ; try { readAscii ( connection.getInputStream ( ) , java.lang.Integer.MAX_VALUE ) ; fail ( ) ; } catch ( java.io.IOException e ) { } }

Target:
public void testNonHexChunkSize ( ) throws java.io.IOException { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "5\r\nABCDE\r\nG\r\nFGHIJKLMNOPQRSTU\r\n0\r\n\r\n" ) . clearHeaders ( ) . addHeader ( "Transfer-encoding: chunked" ) ) ; server.play ( ) ; java.net.URLConnection connection = server.getUrl ( "/" ) . openConnection ( ) ; try { readAscii ( connection.getInputStream ( ) , java.lang.Integer.MAX_VALUE ) ; org.junit.Assert.fail ( ) ; } catch ( java.io.IOException e ) { } }
Source:
public void test_close ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_SF_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 ( ) ; jarFile.close ( ) ; jarFile.close ( ) ; }

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:
public void onImageAvailable ( android.media.ImageReader reader ) { android.media.Image image = null ; try { image = reader.acquireNextImage ( ) ; } finally { if ( image != null ) { android.hardware.camera2.cts.CameraTestUtils.validateImage ( image , mSize.getWidth ( ) , mSize.getHeight ( ) , mFormat , null ) ; image.close ( ) ; } } }

Target:
public void onImageAvailable ( android.media.ImageReader reader ) { android.media.Image image = null ; try { image = reader.acquireNextImage ( ) ; } finally { if ( image != null ) { android.hardware.camera2.cts.CameraTestUtils.checkImage ( image , mSize.getWidth ( ) , mSize.getHeight ( ) , mFormat ) ; android.hardware.camera2.cts.CameraTestUtils.checkAndroidImageFormat ( image ) ; image.close ( ) ; } } }
Source:
private void copy1DRangeToUnchecked ( int off , int count , java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { final int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( arrayLen * ( dt.mSize ) ) , dataSize ) ; mRS.nAllocationRead1D ( getIDSafe ( ) , off , mSelectedLOD , count , array , dataSize , dt ) ; }

Target:
private void copyTo ( java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { mRS.validate ( ) ; boolean usePadding = false ; if ( ( mAutoPadding ) && ( ( mType.getElement ( ) . getVectorSize ( ) ) == 3 ) ) { usePadding = true ; } mRS.nAllocationRead ( getID ( mRS ) , array , dt , mType.mElement.mType.mSize , usePadding ) ; }
Source:
public void testCanUninstallAllUserCaCerts ( ) throws java.security.cert.CertificateException { assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_RSA_1.caCertificate ) ) ; assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_DSA_1.caCertificate ) ) ; mDevicePolicyManager.uninstallAllUserCaCerts ( getWho ( ) ) ; assertFalse ( hasCaCertInstalled ( FAKE_RSA_1.caCertificate ) ) ; assertFalse ( hasCaCertInstalled ( FAKE_DSA_1.caCertificate ) ) ; }

Target:
public void testCanUninstallAllUserCaCerts ( ) throws java.security.GeneralSecurityException , java.security.cert.CertificateException { assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_RSA_1.caCertificate ) ) ; assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_DSA_1.caCertificate ) ) ; mDevicePolicyManager.uninstallAllUserCaCerts ( getWho ( ) ) ; assertUninstalled ( FAKE_RSA_1.caCertificate ) ; assertUninstalled ( FAKE_DSA_1.caCertificate ) ; }
Source:
public void test_readObject_withPrimitiveClass ( ) throws java.lang.Exception { java.io.File file = new java.io.File ( "test.ser" ) ; file.deleteOnExit ( ) ; org.apache.harmony.luni.tests.java.io.Test test = new org.apache.harmony.luni.tests.java.io.Test ( ) ; java.io.ObjectOutputStream out = new java.io.ObjectOutputStream ( new java.io.FileOutputStream ( file ) ) ; out.writeObject ( test ) ; out.close ( ) ; java.io.ObjectInputStream in = new java.io.ObjectInputStream ( new java.io.FileInputStream ( file ) ) ; org.apache.harmony.luni.tests.java.io.Test another = ( ( org.apache.harmony.luni.tests.java.io.Test ) ( in.readObject ( ) ) ) ; in.close ( ) ; assertEquals ( test , another ) ; }

Target:
public void test_readObject_withPrimitiveClass ( ) throws java.lang.Exception { java.io.File file = java.io.File.createTempFile ( "ObjectInputStreamTest" , ".ser" ) ; org.apache.harmony.luni.tests.java.io.Test test = new org.apache.harmony.luni.tests.java.io.Test ( ) ; java.io.ObjectOutputStream out = new java.io.ObjectOutputStream ( new java.io.FileOutputStream ( file ) ) ; out.writeObject ( test ) ; out.close ( ) ; java.io.ObjectInputStream in = new java.io.ObjectInputStream ( new java.io.FileInputStream ( file ) ) ; org.apache.harmony.luni.tests.java.io.Test another = ( ( org.apache.harmony.luni.tests.java.io.Test ) ( in.readObject ( ) ) ) ; in.close ( ) ; assertEquals ( test , another ) ; }
Source:
public static void requestSync ( android.accounts.Account account , java.lang.String authority , android.os.Bundle extras ) { if ( extras == null ) { throw new java.lang.IllegalArgumentException ( "Must specify extras." ) ; } android.content.SyncRequest request = new android.content.SyncRequest.Builder ( ) . setSyncAdapter ( account , authority ) . setExtras ( extras ) . syncOnce ( ) . build ( ) ; android.content.ContentResolver.requestSync ( request ) ; }

Target:
public static void requestSyncAsUser ( android.accounts.Account account , java.lang.String authority , int userId , android.os.Bundle extras ) { if ( extras == null ) { throw new java.lang.IllegalArgumentException ( "Must specify extras." ) ; } android.content.SyncRequest request = new android.content.SyncRequest.Builder ( ) . setSyncAdapter ( account , authority ) . setExtras ( extras ) . syncOnce ( ) . build ( ) ; try { android.content.ContentResolver.getContentService ( ) . syncAsUser ( request , userId ) ; } catch ( android.os.RemoteException e ) { } }
Source:
public static java.lang.String getXmlString ( org.w3c.dom.Node node , java.lang.String xmlLocalName ) { org.w3c.dom.Node child = com.android.sdklib.internal.repository.packages.PackageParserUtils.findChildElement ( node , xmlLocalName ) ; return child == null ? "" : child.getTextContent ( ) ; }

Target:
public static java.lang.String getXmlString ( org.w3c.dom.Node node , java.lang.String xmlLocalName , java.lang.String defaultValue ) { org.w3c.dom.Node child = com.android.sdklib.internal.repository.packages.PackageParserUtils.findChildElement ( node , xmlLocalName ) ; java.lang.String content = ( child == null ) ? null : child.getTextContent ( ) ; return ( content == null ) || ( content.isEmpty ( ) ) ? defaultValue : content ; }
Source:
public void releaseIfUnreferencedRecursively ( ) throws android.os.RemoteException { if ( ( mRefCount ) > 0 ) { return ; } else if ( ( mRefCount ) < 0 ) { throw new java.lang.IllegalStateException ( "Invalid operation - resource has already been released." ) ; } mResource.releaseKernelResources ( ) ; for ( com.android.server.IpSecService.RefcountedResource < ? extends com.android.server.IpSecService.IResource > child : mChildren ) { ( child.mRefCount ) -- ; child.releaseIfUnreferencedRecursively ( ) ; } ( mRefCount ) -- ; }

Target:
public void userRelease ( ) throws android.os.RemoteException { if ( ( mBinder ) == null ) { return ; } mBinder.unlinkToDeath ( this , 0 ) ; mBinder = null ; mResource.invalidate ( ) ; releaseReference ( ) ; }
Source:
public static void startMethodTracing ( java.lang.String traceFileName , java.io.FileDescriptor fd , int bufferSize , int flags , boolean samplingEnabled , int intervalUs , boolean streamingOutput ) { if ( fd == null ) { throw new java.lang.NullPointerException ( "fd == null" ) ; } dalvik.system.VMDebug.startMethodTracingFd ( traceFileName , fd , dalvik.system.VMDebug.checkBufferSize ( bufferSize ) , flags , samplingEnabled , intervalUs , streamingOutput ) ; }

Target:
public static void startMethodTracing ( java.lang.String traceFileName , java.io.FileDescriptor fd , int bufferSize , int flags , boolean samplingEnabled , int intervalUs , boolean streamingOutput ) { if ( fd == null ) { throw new java.lang.NullPointerException ( "fd == null" ) ; } dalvik.system.VMDebug.startMethodTracingFd ( traceFileName , fd.getInt$ ( ) , dalvik.system.VMDebug.checkBufferSize ( bufferSize ) , flags , samplingEnabled , intervalUs , streamingOutput ) ; }
Source:
public void loadPixelPerfectData ( final com.android.ddmlib.IDevice device ) { executeInBackground ( new java.lang.Runnable ( ) { public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( device ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; com.android.hierarchyviewerlib.ComponentRegistry.getPixelPerfectModel ( ) . setData ( device , screenshotImage , viewNode ) ; } } } ) ; }

Target:
public void loadPixelPerfectData ( final com.android.ddmlib.IDevice device ) { executeInBackground ( "Loading pixel perfect data" , new java.lang.Runnable ( ) { public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( device ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.getModel ( ) . setData ( device , screenshotImage , viewNode ) ; } } } } ) ; }
Source:
public void testSetValues009_Object ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value actualValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , actualValue , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testSetValues005_IntConstant ( ) { org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.INT_CONSTANT_METHOD_SIGNAL ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.INT_PARAM_VALUE ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value newValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.INT_PARAM_VALUE_TO_SET ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointIntConstant" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue , newValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointIntConstant" ) ; methodInfo.addVariable ( "local" , oldValue , newValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public static void setProperty ( @ com.android.annotations.NonNull com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor editor , @ com.android.annotations.NonNull final org.w3c.dom.Node node , @ com.android.annotations.NonNull final java.lang.String name , @ com.android.annotations.Nullable final java.lang.String value ) { org.eclipse.jface.text.IDocument document = editor.getStructuredSourceViewer ( ) . getDocument ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutMetadata.setProperty ( document , node , name , null ) ; if ( ( node.getNodeType ( ) ) == ( org.w3c.dom.Node.ELEMENT_NODE ) ) { org.w3c.dom.Element element = ( ( org.w3c.dom.Element ) ( node ) ) ; com.android.ide.eclipse.adt.AdtUtils.setToolsAttribute ( editor , element , "Bind View" , name , value , false , false ) ; } }

Target:
private static boolean setPropertyInFile ( @ com.android.annotations.NonNull java.lang.String undoLabel , @ com.android.annotations.NonNull org.eclipse.core.resources.IFile variation , @ com.android.annotations.NonNull final org.w3c.dom.Element element , @ com.android.annotations.NonNull final java.lang.String name , @ com.android.annotations.Nullable final java.lang.String value ) { org.w3c.dom.Document doc = com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.getDocument ( variation ) ; if ( ( doc != null ) && ( ( element.getOwnerDocument ( ) ) != doc ) ) { org.w3c.dom.Element other = com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.findCorresponding ( element , doc ) ; if ( other != null ) { com.android.ide.eclipse.adt.AdtUtils.setToolsAttribute ( variation , other , undoLabel , name , value , false ) ; return true ; } } return false ; }
Source:
public void run ( ) { mStatusBarView.getLocationOnScreen ( mAbsPos ) ; android.util.Slog.d ( com.android.systemui.statusbar.phone.PhoneStatusBar.TAG , ( ( ( ( ( ( ( "mStatusBarView: ----- (" + ( mAbsPos [ 0 ] ) ) + "," ) + ( mAbsPos [ 1 ] ) ) + ") " ) + ( mStatusBarView.getWidth ( ) ) ) + "x" ) + ( getStatusBarHeight ( ) ) ) ) ; mStatusBarView.debug ( ) ; }

Target:
public void run ( ) { updateCarrierLabelVisibility ( false ) ; }
Source:
public void finish ( ) { if ( ( mActionMode ) != ( this ) ) { return ; } mCallback.onDestroyActionMode ( this ) ; mCallback = null ; mExtractActionButton.setVisibility ( android.inputmethodservice.VISIBLE ) ; mEditButton.setVisibility ( android.inputmethodservice.INVISIBLE ) ; sendAccessibilityEvent ( AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED ) ; mActionMode = null ; }

Target:
public void finish ( ) { if ( ( mActionMode ) != ( this ) ) { return ; } mCallback.onDestroyActionMode ( this ) ; mCallback = null ; mMenu.close ( ) ; mExtractActionButton.setVisibility ( android.inputmethodservice.VISIBLE ) ; mEditButton.setVisibility ( android.inputmethodservice.INVISIBLE ) ; sendAccessibilityEvent ( AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED ) ; mActionMode = null ; }
Source:
public void pullLceData ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_PULL_LCEDATA , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } send ( rr ) ; }

Target:
public void stopLceService ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_STOP_LCE , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } send ( rr ) ; }
Source:
public void remove ( int index ) { if ( index >= ( mSize ) ) { throw new java.lang.ArrayIndexOutOfBoundsException ( mSize , index ) ; } java.lang.System.arraycopy ( mValues , ( index + 1 ) , mValues , index , ( ( ( mSize ) - index ) - 1 ) ) ; ( mSize ) -- ; }

Target:
public void remove ( int index ) { checkBounds ( index ) ; java.lang.System.arraycopy ( mValues , ( index + 1 ) , mValues , index , ( ( ( mSize ) - index ) - 1 ) ) ; ( mSize ) -- ; }
Source:
protected boolean start ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; filter.addAction ( Intent.ACTION_USER_UNLOCKED ) ; try { registerReceiver ( mPbapBroadcastReceiver , filter ) ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "Unable to register pbapclient receiver" , e ) ; } mPbapClientStateMachine = new com.android.bluetooth.pbapclient.PbapClientStateMachine ( this , this ) ; com.android.bluetooth.pbapclient.PbapClientService.setPbapClientService ( this ) ; mPbapClientStateMachine.start ( ) ; return true ; }

Target:
protected boolean start ( ) { if ( com.android.bluetooth.pbapclient.PbapClientService.DBG ) android.util.Log.d ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "onStart" ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; filter.addAction ( Intent.ACTION_USER_UNLOCKED ) ; try { registerReceiver ( mPbapBroadcastReceiver , filter ) ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "Unable to register pbapclient receiver" , e ) ; } mPbapClientStateMachine = new com.android.bluetooth.pbapclient.PbapClientStateMachine ( this , this ) ; com.android.bluetooth.pbapclient.PbapClientService.setPbapClientService ( this ) ; mPbapClientStateMachine.start ( ) ; return true ; }
Source:
public void wifiNanDestroyDiscoverySession ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The discovery session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId ) throws android.os.RemoteException { synchronized ( mLock ) { android.net.wifi.nan.WifiNanDiscoveryBaseSession session = mDiscoverySessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanTerminateSession before session (session ID " + sessionId ) + ") is ready" ) ) ; } session.destroy ( ) ; mDiscoverySessions.remove ( sessionId ) ; } }

Target:
public void wifiAwareDestroyDiscoverySession ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The discovery session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId ) throws android.os.RemoteException { synchronized ( mLock ) { android.net.wifi.aware.WifiAwareDiscoveryBaseSession session = mDiscoverySessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwareTerminateSession before session (session ID " + sessionId ) + ") is ready" ) ) ; } session.destroy ( ) ; mDiscoverySessions.remove ( sessionId ) ; } }
Source:
public void afterHandshake ( long session , long ssl , long context , java.net.Socket socket , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; super . afterHandshake ( session , ssl , context , socket , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long ssl , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; org.junit.Assert.assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; super . afterHandshake ( session , ssl , c , sock , fd , callback ) ; }
Source:
public int hashCode ( ) { int retval = 0 ; try { byte [ ] certData = sun.security.x509.X509CertImpl.getEncodedInternal ( this ) ; for ( int i = 1 ; i < ( certData.length ) ; i ++ ) { retval += ( certData [ i ] ) * i ; } return retval ; } catch ( java.security.cert.CertificateException e ) { return retval ; } }

Target:
public int hashCode ( ) { int h = hash ; if ( h == ( - 1 ) ) { try { h = java.util.Arrays.hashCode ( sun.security.x509.X509CertImpl.getEncodedInternal ( this ) ) ; } catch ( java.security.cert.CertificateException e ) { h = 0 ; } hash = h ; } return h ; }
Source:
public java.lang.String getBuildGradleContent ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "apply plugin: \'com.android.model.library\'\n" + ( ( ( "\n" + "model {\n" ) + " android {\n" ) + " compileSdkVersion " ) ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_COMPILE_SDK_VERSION ) ) + "\n" ) + " buildToolsVersion '" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_BUILD_TOOL_VERSION ) ) + "\'\n" ) + " defaultConfig {\n" ) + " useJack " ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.CUSTOM_JACK ) ) + "\n" ) + " }\n" ) + " }\n" ) + "}\n" ; }

Target:
public java.lang.String getBuildGradleContent ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "apply plugin: \'com.android.model.library\'\n" + ( ( ( "\n" + "model {\n" ) + " android {\n" ) + " compileSdkVersion = " ) ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_COMPILE_SDK_VERSION ) ) + "\n" ) + " buildToolsVersion = '" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_BUILD_TOOL_VERSION ) ) + "\'\n" ) + " defaultConfig.with {\n" ) + "// useJack " ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.CUSTOM_JACK ) ) + "\n" ) + " }\n" ) + " }\n" ) + "}\n" ; }
Source:
public void test_getContentType ( ) throws java.io.IOException , java.net.MalformedURLException { assertTrue ( ( "getContentType failed: " + ( fileURLCon.getContentType ( ) ) ) , fileURLCon.getContentType ( ) . contains ( "text/plain" ) ) ; java.net.URLConnection htmlFileCon = openHTMLFile ( ) ; java.lang.String contentType = htmlFileCon.getContentType ( ) ; if ( contentType != null ) { assertTrue ( contentType.equalsIgnoreCase ( "text/html" ) ) ; } }

Target:
public void test_getContentType ( ) throws java.lang.Exception { assertTrue ( ( "getContentType failed: " + ( fileURLCon.getContentType ( ) ) ) , fileURLCon.getContentType ( ) . contains ( "text/plain" ) ) ; fileURLCon.getInputStream ( ) . close ( ) ; java.net.URLConnection htmlFileCon = openHTMLFile ( ) ; java.lang.String contentType = htmlFileCon.getContentType ( ) ; if ( contentType != null ) { assertTrue ( contentType.equalsIgnoreCase ( "text/html" ) ) ; } }
Source:
public void testRingAndNoVibrate ( ) { mRingerUnderTest.startCallWaiting ( mockCall1 ) ; ensureRingerIsAudible ( ) ; enableVibrationOnlyWhenNotRinging ( ) ; assertTrue ( mRingerUnderTest.startRinging ( mockCall2 , false ) ) ; org.mockito.Mockito.verify ( mockTonePlayer ) . stopTone ( ) ; org.mockito.Mockito.verify ( mockRingtonePlayer ) . play ( org.mockito.ArgumentMatchers.any ( com.android.server.telecom.RingtoneFactory.class ) , org.mockito.ArgumentMatchers.any ( com.android.server.telecom.Call.class ) ) ; org.mockito.Mockito.verify ( mockVibrator , org.mockito.Mockito.never ( ) ) . vibrate ( org.mockito.ArgumentMatchers.any ( android.os.VibrationEffect.class ) , org.mockito.ArgumentMatchers.any ( android.media.AudioAttributes.class ) ) ; }

Target:
public void testRingAndNoVibrate ( ) { mRingerUnderTest.startCallWaiting ( mockCall1 ) ; ensureRingerIsAudible ( ) ; enableVibrationOnlyWhenNotRinging ( ) ; org.junit.Assert.assertTrue ( mRingerUnderTest.startRinging ( mockCall2 , false ) ) ; org.mockito.Mockito.verify ( mockTonePlayer ) . stopTone ( ) ; org.mockito.Mockito.verify ( mockRingtonePlayer ) . play ( org.mockito.ArgumentMatchers.any ( com.android.server.telecom.RingtoneFactory.class ) , org.mockito.ArgumentMatchers.any ( com.android.server.telecom.Call.class ) ) ; org.mockito.Mockito.verify ( mockVibrator , org.mockito.Mockito.never ( ) ) . vibrate ( org.mockito.ArgumentMatchers.any ( android.os.VibrationEffect.class ) , org.mockito.ArgumentMatchers.any ( android.media.AudioAttributes.class ) ) ; }
Source:
private static java.lang.String getNotificationText ( @ android.support.annotation.NonNull android.content.Context context , android.telecom.PhoneAccountHandle handle , java.lang.String voicemailNumber ) { if ( ( com.android.dialer.calllogutils.PhoneAccountUtils.getSubscriptionPhoneAccounts ( context ) . size ( ) ) > 1 ) { android.telecom.TelecomManager telecomManager = context.getSystemService ( android.telecom.TelecomManager.class ) ; android.telecom.PhoneAccount phoneAccount = telecomManager.getPhoneAccount ( handle ) ; return phoneAccount.getShortDescription ( ) . toString ( ) ; } else { return java.lang.String.format ( context.getString ( R.string.notification_voicemail_text_format ) , android.telephony.PhoneNumberUtils.formatNumber ( voicemailNumber ) ) ; } }

Target:
private static java.lang.String getNotificationText ( @ android.support.annotation.NonNull android.content.Context context , android.telecom.PhoneAccountHandle handle , java.lang.String voicemailNumber ) { if ( ( com.android.dialer.telecom.TelecomUtil.getCallCapablePhoneAccounts ( context ) . size ( ) ) > 1 ) { android.telecom.TelecomManager telecomManager = context.getSystemService ( android.telecom.TelecomManager.class ) ; android.telecom.PhoneAccount phoneAccount = telecomManager.getPhoneAccount ( handle ) ; return phoneAccount.getShortDescription ( ) . toString ( ) ; } else { return java.lang.String.format ( context.getString ( R.string.notification_voicemail_text_format ) , android.telephony.PhoneNumberUtils.formatNumber ( voicemailNumber ) ) ; } }
Source:
private static com.android.builder.model.ApiVersion getApiVersion ( @ com.android.annotations.Nullable java.lang.String value ) { if ( ! ( com.google.common.base.Strings.isNullOrEmpty ( value ) ) ) { if ( java.lang.Character.isDigit ( value.charAt ( 0 ) ) ) { try { int apiLevel = java.lang.Integer.valueOf ( value ) ; return new com.android.builder.core.DefaultApiVersion ( apiLevel ) ; } catch ( java.lang.NumberFormatException e ) { throw new java.lang.RuntimeException ( "'${value}' is not a valid API level. " , e ) ; } } return new com.android.builder.core.DefaultApiVersion ( value ) ; } return null ; }

Target:
private static com.android.builder.model.ApiVersion getApiVersion ( @ com.android.annotations.Nullable java.lang.String value ) { if ( ! ( com.google.common.base.Strings.isNullOrEmpty ( value ) ) ) { if ( java.lang.Character.isDigit ( value.charAt ( 0 ) ) ) { try { int apiLevel = java.lang.Integer.valueOf ( value ) ; return new com.android.builder.core.DefaultApiVersion ( apiLevel ) ; } catch ( java.lang.NumberFormatException e ) { throw new java.lang.RuntimeException ( ( ( "'" + value ) + "' is not a valid API level. " ) , e ) ; } } return new com.android.builder.core.DefaultApiVersion ( value ) ; } return null ; }
Source:
public static void computeDot ( android.renderscript.cts.TestDot.ArgumentsFloatFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 1 , 4 , false ) ; android.renderscript.cts.Target.Floaty a = t.new32 ( args.inLhs ) ; android.renderscript.cts.Target.Floaty b = t.new32 ( args.inRhs ) ; args.out = t.multiply ( a , b ) ; }

Target:
public static void computeDot ( android.renderscript.cts.TestDot.ArgumentsFloatFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 1 , 4 , false ) ; android.renderscript.cts.Target.Floaty a = t.new32 ( args.inLeftVector ) ; android.renderscript.cts.Target.Floaty b = t.new32 ( args.inRightVector ) ; args.out = t.multiply ( a , b ) ; }
Source:
public void testGetNetworkCountryIso ( ) { java.lang.String countryCode = mTelephonyManager.getNetworkCountryIso ( ) ; assertTrue ( ( ( ( "Country code '" + countryCode ) + "' did not match " ) + ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN ) ) , java.util.regex.Pattern.matches ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN , countryCode ) ) ; }

Target:
public void testGetNetworkCountryIso ( ) { android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; java.lang.String countryCode = mTelephonyManager.getNetworkCountryIso ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { assertTrue ( ( ( ( "Country code '" + countryCode ) + "' did not match " ) + ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN ) ) , java.util.regex.Pattern.matches ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN , countryCode ) ) ; } else { assertEquals ( "" , countryCode ) ; } }
Source:
public void onDraw ( final android.graphics.Canvas canvas ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDraw ( canvas ) ; } } ) ; return ; } mAwContents.onDraw ( canvas ) ; }

Target:
public boolean onKeyMultiple ( final int keyCode , final int repeatCount , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyMultiple ( keyCode , repeatCount , event ) ; } } ) ; return ret ; } com.android.webview.chromium.UnimplementedWebViewApi.invoke ( ) ; return false ; }