auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testPublishTerminatedDone ( ) throws org.json.JSONException { final int publishId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "publish_id" , publishId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_SUCCESS ) ; com.android.server.wifi.aware.WifiAwareHalMock.callPublishTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( publishId , DiscoverySessionCallback.TERMINATE_REASON_DONE , true ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testPublishTerminatedDone ( ) throws org.json.JSONException { final int publishId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "publish_id" , publishId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_SUCCESS ) ; com.android.server.wifi.aware.WifiAwareHalMock.callPublishTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( publishId , WifiAwareNative.AWARE_STATUS_SUCCESS , true ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
private java.util.List < com.android.bluetooth.avrcp.MediaController > getMediaControllers ( ) { java.util.List < com.android.bluetooth.avrcp.MediaController > controllers = new java.util.ArrayList < com.android.bluetooth.avrcp.MediaController > ( ) ; for ( com.android.bluetooth.avrcp.MediaPlayerInfo info : mMediaPlayerInfoList.values ( ) ) { if ( ( info.getMediaController ( ) ) != null ) { controllers.add ( info.getMediaController ( ) . getWrappedInstance ( ) ) ; } } return controllers ; }

Target:
private java.util.List < com.android.bluetooth.avrcp.MediaController > getMediaControllers ( ) { java.util.List < com.android.bluetooth.avrcp.MediaController > controllers = new java.util.ArrayList < com.android.bluetooth.avrcp.MediaController > ( ) ; synchronized ( mMediaPlayerInfoList ) { for ( com.android.bluetooth.avrcp.MediaPlayerInfo info : mMediaPlayerInfoList.values ( ) ) { if ( ( info.getMediaController ( ) ) != null ) { controllers.add ( info.getMediaController ( ) . getWrappedInstance ( ) ) ; } } } return controllers ; }
Source:
public void testIdletimerDirectoryExistsAndSane ( ) throws java.lang.Exception { java.io.File dir = new java.io.File ( "/sys/class/xt_idletimer" ) ; assertTrue ( dir.isDirectory ( ) ) ; assertTrue ( dir.canRead ( ) ) ; assertFalse ( dir.canWrite ( ) ) ; assertTrue ( dir.canExecute ( ) ) ; android.permission.cts.FileSystemPermissionTest.assertFileOwnedBy ( dir , "root" ) ; android.permission.cts.FileSystemPermissionTest.assertFileOwnedByGroup ( dir , "root" ) ; }

Target:
public void testIdletimerDirectoryExistsAndSane ( ) throws java.lang.Exception { java.io.File dir = new java.io.File ( "/sys/class/xt_idletimer" ) ; assertTrue ( dir.isDirectory ( ) ) ; assertFalse ( dir.canWrite ( ) ) ; assertTrue ( dir.canExecute ( ) ) ; android.permission.cts.FileSystemPermissionTest.assertFileOwnedBy ( dir , "root" ) ; android.permission.cts.FileSystemPermissionTest.assertFileOwnedByGroup ( dir , "root" ) ; }
Source:
public final android.content.IContentProvider acquireExistingProvider ( android.net.Uri uri ) { if ( ! ( android.content.ContentResolver.SCHEME_CONTENT.equals ( uri.getScheme ( ) ) ) ) { return null ; } java.lang.String auth = uri.getAuthority ( ) ; if ( auth != null ) { return acquireExistingProvider ( mContext , uri.getAuthority ( ) ) ; } return null ; }

Target:
public final android.content.IContentProvider acquireExistingProvider ( android.net.Uri uri ) { if ( ! ( android.content.ContentResolver.SCHEME_CONTENT.equals ( uri.getScheme ( ) ) ) ) { return null ; } final java.lang.String auth = uri.getAuthority ( ) ; if ( auth != null ) { return acquireExistingProvider ( mContext , auth ) ; } return null ; }
Source:
private static void removeUser ( java.util.prefs.Preferences prefs , java.lang.String user ) { java.lang.String allUsersString = prefs.get ( com.google.gct.login.GoogleLoginPrefs.USERS , "" ) ; java.util.List < java.lang.String > allUsers = com.google.common.collect.Lists.newArrayList ( ) ; for ( java.lang.String scope : allUsersString.split ( com.google.gct.login.GoogleLoginPrefs.DELIMITER ) ) { allUsers.add ( scope ) ; } allUsers.remove ( user ) ; com.google.common.base.Joiner joiner = com.google.common.base.Joiner.on ( com.google.gct.login.GoogleLoginPrefs.DELIMITER ) ; prefs.put ( com.google.gct.login.GoogleLoginPrefs.USERS , joiner.join ( allUsers ) ) ; }

Target:
private static void removeUser ( java.util.prefs.Preferences prefs , java.lang.String user ) { java.lang.String allUsersString = prefs.get ( com.google.gct.login.GoogleLoginPrefs.USERS , "" ) ; java.util.List < java.lang.String > allUsers = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String scope : allUsersString.split ( com.google.gct.login.GoogleLoginPrefs.DELIMITER ) ) { allUsers.add ( scope ) ; } allUsers.remove ( user ) ; com.google.common.base.Joiner joiner = com.google.common.base.Joiner.on ( com.google.gct.login.GoogleLoginPrefs.DELIMITER ) ; prefs.put ( com.google.gct.login.GoogleLoginPrefs.USERS , joiner.join ( allUsers ) ) ; }
Source:
private void testOutputPKCS1Padding ( java.lang.String provider ) throws java.lang.Exception { testOutputPKCS1Padding ( provider , ( ( byte ) ( 1 ) ) , libcore.javax.crypto.CipherTest.getEncryptKey ( "RSA" ) , libcore.javax.crypto.CipherTest.getDecryptKey ( "RSA" ) ) ; testOutputPKCS1Padding ( provider , ( ( byte ) ( 2 ) ) , libcore.javax.crypto.CipherTest.getDecryptKey ( "RSA" ) , libcore.javax.crypto.CipherTest.getEncryptKey ( "RSA" ) ) ; }

Target:
private void testOutputPKCS1Padding ( java.lang.String provider ) throws java.lang.Exception { testOutputPKCS1Padding ( provider , ( ( byte ) ( 1 ) ) , libcore.javax.crypto.CipherTest.getDecryptKey ( "RSA" ) , libcore.javax.crypto.CipherTest.getEncryptKey ( "RSA" ) ) ; testOutputPKCS1Padding ( provider , ( ( byte ) ( 2 ) ) , libcore.javax.crypto.CipherTest.getEncryptKey ( "RSA" ) , libcore.javax.crypto.CipherTest.getDecryptKey ( "RSA" ) ) ; }
Source:
public static byte [ ] readFileAsByteArray ( java.io.File file ) throws java.io.IOException { byte [ ] buffer = new byte [ 8192 ] ; java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; try ( java.io.FileInputStream fis = new java.io.FileInputStream ( file ) ) { int count ; while ( ( count = fis.read ( buffer ) ) != ( - 1 ) ) { baos.write ( buffer , 0 , count ) ; } } return baos.toByteArray ( ) ; }

Target:
private static byte [ ] readFileAsByteArray ( java.io.File file ) throws java.io.IOException { byte [ ] buffer = new byte [ 8192 ] ; java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; try ( java.io.FileInputStream fis = new java.io.FileInputStream ( file ) ) { int count ; while ( ( count = fis.read ( buffer ) ) != ( - 1 ) ) { baos.write ( buffer , 0 , count ) ; } } return baos.toByteArray ( ) ; }
Source:
public void onRttModifyResponseReceived ( com.android.ims.ImsCall imsCall , int status ) { com.android.internal.telephony.imsphone.ImsPhoneConnection conn = findConnection ( imsCall ) ; if ( conn != null ) { conn.onRttModifyResponseReceived ( status ) ; if ( status == ( android.telecom.Connection.RttModifyStatus.SESSION_MODIFY_REQUEST_SUCCESS ) ) { conn.startRttTextProcessing ( ) ; } } }

Target:
public void onRttModifyResponseReceived ( com.android.ims.ImsCall imsCall , int status ) { com.android.internal.telephony.imsphone.ImsPhoneConnection conn = findConnection ( imsCall ) ; if ( conn != null ) { conn.onRttModifyResponseReceived ( status ) ; } }
Source:
public void test_getInstanceLjava_lang_StringLjava_security_Provider01 ( ) throws java.lang.Exception { for ( java.lang.String validValue : org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.getValidValues ( ) ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( validValue , ( ( java.security.Provider ) ( null ) ) ) ; } catch ( java.lang.IllegalArgumentException expected ) { } } }

Target:
public void test_getInstanceLjava_lang_StringLjava_security_Provider01 ( ) throws java.lang.Exception { for ( java.lang.String validValue : org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.getValidValues ( ) ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( validValue , ( ( java.security.Provider ) ( null ) ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } } }
Source:
static int getKeyTypeForAlgorithm ( java.lang.String keyType ) throws java.lang.IllegalArgumentException { if ( "RSA" . equalsIgnoreCase ( keyType ) ) { return com.android.org.conscrypt.NativeCrypto.EVP_PKEY_RSA ; } else if ( "DSA" . equalsIgnoreCase ( keyType ) ) { return com.android.org.conscrypt.NativeCrypto.EVP_PKEY_DSA ; } else if ( "EC" . equalsIgnoreCase ( keyType ) ) { return com.android.org.conscrypt.NativeCrypto.EVP_PKEY_EC ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported key type: " + keyType ) ) ; } }

Target:
static int getKeyTypeForAlgorithm ( java.lang.String keyType ) throws java.lang.IllegalArgumentException { if ( "RSA" . equalsIgnoreCase ( keyType ) ) { return com.android.org.conscrypt.NativeCrypto.EVP_PKEY_RSA ; } else if ( "EC" . equalsIgnoreCase ( keyType ) ) { return com.android.org.conscrypt.NativeCrypto.EVP_PKEY_EC ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported key type: " + keyType ) ) ; } }
Source:
public static com.android.server.WindowManagerService main ( android.content.Context context , com.android.server.PowerManagerService pm , boolean haveInputMethods ) { com.android.server.WindowManagerService.WMThread thr = new com.android.server.WindowManagerService.WMThread ( context , pm , haveInputMethods ) ; thr.start ( ) ; synchronized ( thr ) { while ( ( thr.mService ) == null ) { try { thr.wait ( ) ; } catch ( java.lang.InterruptedException e ) { } } } return thr.mService ; }

Target:
public static com.android.server.WindowManagerService main ( android.content.Context context , com.android.server.PowerManagerService pm , boolean haveInputMethods ) { com.android.server.WindowManagerService.WMThread thr = new com.android.server.WindowManagerService.WMThread ( context , pm , haveInputMethods ) ; thr.start ( ) ; synchronized ( thr ) { while ( ( thr.mService ) == null ) { try { thr.wait ( ) ; } catch ( java.lang.InterruptedException e ) { } } return thr.mService ; } }
Source:
private static void waitToDie ( java.lang.Thread thread ) { assertFalse ( java.lang.Thread.currentThread ( ) . isInterrupted ( ) ) ; try { thread.join ( 5000 ) ; } catch ( java.lang.InterruptedException ignored ) { ignored.printStackTrace ( ) ; } if ( thread.isAlive ( ) ) { fail ( ( ( "Thread \"" + ( thread.getName ( ) ) ) + "\" did not exit." ) ) ; } }

Target:
private static void waitToDie ( java.lang.Thread thread ) { assertFalse ( java.lang.Thread.currentThread ( ) . isInterrupted ( ) ) ; try { thread.join ( 5000 ) ; } catch ( java.lang.InterruptedException ignored ) { } if ( thread.isAlive ( ) ) { fail ( ( ( "Thread \"" + ( thread.getName ( ) ) ) + "\" did not exit." ) ) ; } }
Source:
private void ensureTagsAtIndex ( @ javax.annotation.Nonnegative int atIdx ) { assert atIdx <= ( plan.size ( ) ) ; for ( int idx = ( currentTagValidityIdx ) + 1 ; idx <= atIdx ; idx ++ ) { ( ( com.android.sched.scheduler.PlanConstructor < ? > . DecoratedRunner ) ( plan.get ( idx ) ) ) . updateBeforeTags ( plan.get ( ( idx - 1 ) ) . getAfterTags ( ) ) ; } currentTagValidityIdx = atIdx ; }

Target:
private void ensureTagsAtIndex ( @ javax.annotation.Nonnegative int atIdx ) { assert atIdx >= 0 ; assert atIdx < ( plan.size ( ) ) ; if ( atIdx > ( currentTagValidityIdx ) ) { for ( int idx = ( currentTagValidityIdx ) + 1 ; idx <= atIdx ; idx ++ ) { ( ( com.android.sched.scheduler.PlanConstructor < ? > . DecoratedRunner ) ( plan.get ( idx ) ) ) . updateBeforeTags ( plan.get ( ( idx - 1 ) ) . getAfterTags ( ) ) ; } currentTagValidityIdx = atIdx ; } }
Source:
public static org.conscrypt.OpenSSLX509Certificate fromX509PemInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { @ java.lang.SuppressWarnings ( value = "resource" ) final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is ) ; try { final long certCtx = org.conscrypt.NativeCrypto.PEM_read_bio_X509 ( bis.getBioContext ( ) ) ; if ( certCtx == 0L ) { return null ; } return new org.conscrypt.OpenSSLX509Certificate ( certCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { bis.release ( ) ; } }

Target:
public static org.conscrypt.OpenSSLX509Certificate fromX509PemInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { @ java.lang.SuppressWarnings ( value = "resource" ) final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is , true ) ; try { final long certCtx = org.conscrypt.NativeCrypto.PEM_read_bio_X509 ( bis.getBioContext ( ) ) ; if ( certCtx == 0L ) { return null ; } return new org.conscrypt.OpenSSLX509Certificate ( certCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { bis.release ( ) ; } }
Source:
protected void tearDown ( ) throws java.lang.Exception { if ( mHasFeature ) { if ( mRemoveOwnerInTearDown ) { assertTrue ( "Failed to clear owner" , removeAdmin ( ( ( ( com.android.cts.devicepolicy.UserRestrictionsTest.DEVICE_ADMIN_PKG ) + "/" ) + ( com.android.cts.devicepolicy.UserRestrictionsTest.ADMIN_RECEIVER_TEST_CLASS ) ) , mDeviceOwnerUserId ) ) ; } assertTrue ( "Some user restrictions are still set" , runTests ( "userrestrictions.CheckNoOwnerRestrictionsTest" , mDeviceOwnerUserId ) ) ; removeTestUsers ( ) ; } super . tearDown ( ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( mHasFeature ) { if ( mRemoveOwnerInTearDown ) { assertTrue ( "Failed to clear owner" , removeAdmin ( ( ( ( com.android.cts.devicepolicy.UserRestrictionsTest.DEVICE_ADMIN_PKG ) + "/" ) + ( com.android.cts.devicepolicy.UserRestrictionsTest.ADMIN_RECEIVER_TEST_CLASS ) ) , mDeviceOwnerUserId ) ) ; assertTrue ( "Some user restrictions are still set" , runTests ( "userrestrictions.CheckNoOwnerRestrictionsTest" , mDeviceOwnerUserId ) ) ; } removeTestUsers ( ) ; } super . tearDown ( ) ; }
Source:
public void testLineEndings ( ) throws java.lang.Exception { java.lang.String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" + ( ( ( "<LinearLayout>\r\n" + "\r" ) + "<LinearLayout></LinearLayout>\r\n" ) + "</LinearLayout>\r\n" ) ; com.android.utils.PositionXmlParser parser = new com.android.utils.PositionXmlParser ( ) ; java.io.File file = java.io.File.createTempFile ( "parsertest2" , ".xml" ) ; java.io.Writer fw = new java.io.BufferedWriter ( new java.io.FileWriter ( file ) ) ; fw.write ( xml ) ; fw.close ( ) ; org.w3c.dom.Document document = parser.parse ( new java.io.FileInputStream ( file ) ) ; assertNotNull ( document ) ; file.delete ( ) ; }

Target:
public void testLineEndings ( ) throws java.lang.Exception { java.lang.String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" + ( ( ( "<LinearLayout>\r\n" + "\r" ) + "<LinearLayout></LinearLayout>\r\n" ) + "</LinearLayout>\r\n" ) ; java.io.File file = java.io.File.createTempFile ( "parsertest2" , ".xml" ) ; java.io.Writer fw = new java.io.BufferedWriter ( new java.io.FileWriter ( file ) ) ; fw.write ( xml ) ; fw.close ( ) ; org.w3c.dom.Document document = com.android.utils.PositionXmlParser.parse ( new java.io.FileInputStream ( file ) ) ; assertNotNull ( document ) ; file.delete ( ) ; }
Source:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }

Target:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false , null ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }
Source:
public java.nio.ByteBuffer putFloat ( int i , float x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putFloat ( ix ( checkIndex ( i , SizeOf.FLOAT ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putFloat ( int i , float x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putFloat ( ix ( checkIndex ( i , SizeOf.FLOAT ) ) , x ) ; return this ; }
Source:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { com.android.jack.ir.ast.JDefinedClassOrInterface declaringClass = method.getEnclosingType ( ) ; if ( declaringClass.isExternal ( ) ) { return ; } com.android.jack.scheduling.marker.ClassDefItemMarker classDefItemMarker = declaringClass.getMarker ( com.android.jack.scheduling.marker.ClassDefItemMarker.class ) ; assert classDefItemMarker != null ; com.android.jack.dx.dex.file.ClassDefItem classDefItem = classDefItemMarker.getClassDefItem ( ) ; assert classDefItem != null ; com.android.jack.dx.dex.file.EncodedMethod encodedMethod = createEncodedMethod ( method ) ; if ( com.android.jack.backend.dex.EncodedMethodBuilder.isDirectMethod ( method ) ) { classDefItem.addDirectMethod ( encodedMethod ) ; } else { classDefItem.addVirtualMethod ( encodedMethod ) ; } }

Target:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { com.android.jack.ir.ast.JDefinedClassOrInterface declaringClass = method.getEnclosingType ( ) ; com.android.jack.scheduling.marker.ClassDefItemMarker classDefItemMarker = declaringClass.getMarker ( com.android.jack.scheduling.marker.ClassDefItemMarker.class ) ; assert classDefItemMarker != null ; com.android.jack.dx.dex.file.ClassDefItem classDefItem = classDefItemMarker.getClassDefItem ( ) ; assert classDefItem != null ; com.android.jack.dx.dex.file.EncodedMethod encodedMethod = createEncodedMethod ( method ) ; if ( com.android.jack.backend.dex.EncodedMethodBuilder.isDirectMethod ( method ) ) { classDefItem.addDirectMethod ( encodedMethod ) ; } else { classDefItem.addVirtualMethod ( encodedMethod ) ; } }
Source:
boolean onDisconnect ( com.android.internal.telephony.cdma.DisconnectCause cause ) { boolean changed = false ; mCause = cause ; if ( ! ( mDisconnected ) ) { doDisconnect ( ) ; if ( com.android.internal.telephony.cdma.CdmaConnection.VDBG ) android.telephony.Rlog.d ( com.android.internal.telephony.cdma.CdmaConnection.LOG_TAG , ( "onDisconnect: cause=" + cause ) ) ; mOwner.mPhone.notifyDisconnect ( this ) ; if ( ( mParent ) != null ) { changed = mParent.connectionDisconnected ( this ) ; } } releaseWakeLock ( ) ; return changed ; }

Target:
boolean onDisconnect ( int cause ) { boolean changed = false ; mCause = cause ; if ( ! ( mDisconnected ) ) { doDisconnect ( ) ; if ( com.android.internal.telephony.cdma.CdmaConnection.VDBG ) android.telephony.Rlog.d ( com.android.internal.telephony.cdma.CdmaConnection.LOG_TAG , ( "onDisconnect: cause=" + cause ) ) ; mOwner.mPhone.notifyDisconnect ( this ) ; if ( ( mParent ) != null ) { changed = mParent.connectionDisconnected ( this ) ; } } releaseWakeLock ( ) ; return changed ; }
Source:
public vogar.target.Runner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile , java.lang.String [ ] args ) { if ( benchmarkClassChecker.isBenchmark ( klass ) ) { return new vogar.target.CaliperRunner ( monitor , profile , klass , args ) ; } else { return null ; } }

Target:
public vogar.target.Runner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile , java.lang.String [ ] args ) { if ( ( ( benchmarkClassChecker ) != null ) && ( benchmarkClassChecker.isBenchmark ( klass ) ) ) { return new vogar.target.CaliperRunner ( monitor , profile , klass , args ) ; } else { return null ; } }
Source:
public void start ( ) { switch ( getToneSetting ( ) ) { case com.android.services.telephony.EmergencyTonePlayer.EMERGENCY_TONE_VIBRATE : startVibrate ( ) ; break ; case com.android.services.telephony.EmergencyTonePlayer.EMERGENCY_TONE_ALERT : int ringerMode = mAudioManager.getRingerMode ( ) ; if ( ringerMode == ( android.media.AudioManager.RINGER_MODE_NORMAL ) ) { startAlert ( ) ; } break ; case com.android.services.telephony.EmergencyTonePlayer.EMERGENCY_TONE_OFF : break ; } }

Target:
public void start ( ) { switch ( getToneSetting ( ) ) { case com.android.services.telephony.EmergencyTonePlayer.EMERGENCY_TONE_VIBRATE : startVibrate ( ) ; break ; case com.android.services.telephony.EmergencyTonePlayer.EMERGENCY_TONE_ALERT : startAlert ( ) ; break ; case com.android.services.telephony.EmergencyTonePlayer.EMERGENCY_TONE_OFF : break ; } }
Source:
protected void onDetachedFromWindow ( ) { if ( mIndeterminate ) { stopAnimation ( ) ; } if ( ( mRefreshProgressRunnable ) != null ) { removeCallbacks ( mRefreshProgressRunnable ) ; } if ( ( ( mRefreshProgressRunnable ) != null ) && ( mRefreshIsPosted ) ) { removeCallbacks ( mRefreshProgressRunnable ) ; } if ( ( mAccessibilityEventSender ) != null ) { removeCallbacks ( mAccessibilityEventSender ) ; } super . onDetachedFromWindow ( ) ; mAttached = false ; }

Target:
protected void onDetachedFromWindow ( ) { if ( mIndeterminate ) { stopAnimation ( ) ; } if ( ( mRefreshProgressRunnable ) != null ) { removeCallbacks ( mRefreshProgressRunnable ) ; mRefreshIsPosted = false ; } if ( ( mAccessibilityEventSender ) != null ) { removeCallbacks ( mAccessibilityEventSender ) ; } super . onDetachedFromWindow ( ) ; mAttached = false ; }
Source:
public void showInputMethodPickerFromClient ( com.android.internal.view.IInputMethodClient client ) { synchronized ( mMethodMap ) { if ( ( ( ( mCurClient ) == null ) || ( client == null ) ) || ( ( mCurClient.client.asBinder ( ) ) != ( client.asBinder ( ) ) ) ) { android.util.Slog.w ( com.android.server.InputMethodManagerService.TAG , ( "Ignoring showInputMethodDialogFromClient of: " + client ) ) ; } mHandler.sendEmptyMessage ( com.android.server.InputMethodManagerService.MSG_SHOW_IM_PICKER ) ; } }

Target:
public void showInputMethodPickerFromClient ( com.android.internal.view.IInputMethodClient client ) { synchronized ( mMethodMap ) { if ( ( ( ( mCurClient ) == null ) || ( client == null ) ) || ( ( mCurClient.client.asBinder ( ) ) != ( client.asBinder ( ) ) ) ) { android.util.Slog.w ( com.android.server.InputMethodManagerService.TAG , ( "Ignoring showInputMethodDialogFromClient of: " + client ) ) ; return ; } mHandler.sendEmptyMessage ( com.android.server.InputMethodManagerService.MSG_SHOW_IM_PICKER ) ; } }
Source:
public void traverse ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVisitor visitor ) { assert ( ( enclosingPackage ) == null ) || ( ! ( enclosingPackage.deletedItems.contains ( getName ( ) ) ) ) ; if ( visitor.visit ( this ) ) { if ( visitor.needLoading ( ) ) { loadSubPackages ( ) ; loadClassesAndInterfaces ( ) ; } visitor.accept ( subPackages ) ; visitor.accept ( declaredTypes ) ; } visitor.endVisit ( this ) ; }

Target:
public void traverse ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVisitor visitor ) { if ( visitor.visit ( this ) ) { if ( visitor.needLoading ( ) ) { loadSubPackages ( ) ; loadClassesAndInterfaces ( ) ; } visitor.accept ( subPackages ) ; visitor.accept ( declaredTypes ) ; } visitor.endVisit ( this ) ; }
Source:
private void runInBatchModeImpl ( java.lang.String javaPkgName , android.annotation.cts.Profile profile ) throws com.android.cts.DeviceDisconnectedException { mDevice.runInBatchMode ( this , javaPkgName , profile ) ; synchronized ( mTimeOutTimer ) { if ( ! ( mTestStop ) ) { try { mTimeOutTimer.waitOn ( ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.d ( "time out object interrupted" ) ; } } mProgressObserver.stop ( ) ; if ( mTimeOutTimer.isTimeOut ( ) ) { return ; } else { mTimeOutTimer.cancel ( false ) ; } } }

Target:
private void runInBatchModeImpl ( java.lang.String javaPkgName ) throws com.android.cts.DeviceDisconnectedException { mDevice.runInBatchMode ( this , javaPkgName ) ; synchronized ( mTimeOutTimer ) { if ( ! ( mTestStop ) ) { try { mTimeOutTimer.waitOn ( ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.d ( "time out object interrupted" ) ; } } mProgressObserver.stop ( ) ; if ( mTimeOutTimer.isTimeOut ( ) ) { return ; } else { mTimeOutTimer.cancel ( false ) ; } } }
Source:
public static java.lang.String parseMmsAddress ( java.lang.String address ) { if ( android.provider.Telephony.Mms.isEmailAddress ( address ) ) { return address ; } java.lang.String retVal = com.android.mms.ui.MessageUtils.parsePhoneNumberForMms ( address ) ; if ( retVal != null ) { return retVal ; } if ( com.android.mms.ui.MessageUtils.isAlias ( address ) ) { return address ; } return null ; }

Target:
public static java.lang.String parseMmsAddress ( java.lang.String address ) { if ( android.provider.Telephony.Mms.isEmailAddress ( address ) ) { return address ; } java.lang.String retVal = com.android.mms.ui.MessageUtils.parsePhoneNumberForMms ( address ) ; if ( ( retVal != null ) && ( ( retVal.length ( ) ) != 0 ) ) { return retVal ; } if ( com.android.mms.ui.MessageUtils.isAlias ( address ) ) { return address ; } return null ; }
Source:
public com.android.ide.common.resources.ResourceRepository loadFrameworkResources ( com.android.sdklib.IAndroidTarget androidTarget ) { java.lang.String osResourcesPath = androidTarget.getPath ( IAndroidTarget.RESOURCES ) ; com.android.io.FolderWrapper frameworkRes = new com.android.io.FolderWrapper ( osResourcesPath ) ; if ( frameworkRes.exists ( ) ) { com.android.ide.common.resources.FrameworkResources resources = new com.android.ide.common.resources.FrameworkResources ( ) ; try { resources.loadResources ( frameworkRes ) ; resources.loadPublicResources ( frameworkRes , com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) ; return resources ; } catch ( java.io.IOException e ) { } } return null ; }

Target:
public com.android.ide.common.resources.ResourceRepository loadFrameworkResources ( com.android.sdklib.IAndroidTarget androidTarget ) { java.lang.String osResourcesPath = androidTarget.getPath ( IAndroidTarget.RESOURCES ) ; com.android.io.FolderWrapper frameworkRes = new com.android.io.FolderWrapper ( osResourcesPath ) ; if ( frameworkRes.exists ( ) ) { com.android.ide.common.resources.FrameworkResources resources = new com.android.ide.common.resources.FrameworkResources ( frameworkRes ) ; resources.loadResources ( ) ; resources.loadPublicResources ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) ; return resources ; } return null ; }
Source:
private static boolean loadProfileDataRecursive ( com.android.hierarchyviewerlib.models.ViewNode node , java.io.BufferedReader in ) throws java.io.IOException { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileData ( node , in ) ) ) { return false ; } for ( int i = 0 ; i < ( node.children.size ( ) ) ; i ++ ) { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileDataRecursive ( node.children.get ( i ) , in ) ) ) { return false ; } } return true ; }

Target:
public static boolean loadProfileDataRecursive ( com.android.hierarchyviewerlib.models.ViewNode node , java.io.BufferedReader in ) throws java.io.IOException { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileData ( node , in ) ) ) { return false ; } for ( int i = 0 ; i < ( node.children.size ( ) ) ; i ++ ) { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileDataRecursive ( node.children.get ( i ) , in ) ) ) { return false ; } } return true ; }
Source:
public void testNewInstanceString_StringBuilderConstructor ( ) { runTestNewInstanceString ( "(Ljava/lang/StringBuilder;)V" , "my test string" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringBuilderValue = getStaticFieldValue ( debuggeeClassId , "STRING_BUILDER" ) ; constructorArguments.add ( stringBuilderValue ) ; } } ) ; }

Target:
public void testNewInstanceString_StringBuilderConstructor ( ) { runTestNewInstanceString ( "(Ljava/lang/StringBuilder;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringBuilderValue = getStaticFieldValue ( debuggeeClassId , "STRING_BUILDER" ) ; constructorArguments.add ( stringBuilderValue ) ; } } ) ; }
Source:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , boolean isConnected , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setReceivedLength ( byteCount ) ; if ( ! isConnected ) { packet.setAddress ( srcAddress.getAddress ( ) ) ; packet.setPort ( srcAddress.getPort ( ) ) ; } } return byteCount ; }

Target:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setReceivedLength ( byteCount ) ; packet.setAddress ( srcAddress.getAddress ( ) ) ; packet.setPort ( srcAddress.getPort ( ) ) ; } return byteCount ; }
Source:
private void dispatchChange ( boolean selfChange , android.net.Uri uri , int userId ) { if ( ( mHandler ) == null ) { synchronized ( mLock ) { if ( ( mTransport ) == null ) { return ; } } onChange ( selfChange , uri , userId ) ; } else { mHandler.post ( new android.database.ContentObserver.NotificationRunnable ( selfChange , uri , userId ) ) ; } }

Target:
private void dispatchChange ( boolean selfChange , android.net.Uri uri , int userId ) { if ( ( mHandler ) == null ) { onChange ( selfChange , uri , userId ) ; } else { mHandler.post ( new android.database.ContentObserver.NotificationRunnable ( selfChange , uri , userId ) ) ; } }
Source:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.lookup.JMethodLookupException { if ( ( forNameMethodId ) == null ) { forNameMethodId = javaLangClass.getMethodIdWide ( com.android.jack.transformations.ast.string.parameterrefiners.ForNameParameterRefiner.FORNAME_METHOD_NAME , java.util.Collections.singletonList ( ( ( com.android.jack.ir.ast.JType ) ( javaLangString ) ) ) , MethodKind.STATIC ) ; } if ( ( call.getReceiverType ( ) . isSameType ( javaLangClass ) ) && ( call.getMethodId ( ) . equals ( forNameMethodId ) ) ) { assert call.getType ( ) . isSameType ( javaLangClass ) ; return true ; } return false ; }

Target:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.lookup.JMethodLookupException { if ( ( call.getReceiverType ( ) . isSameType ( javaLangClass ) ) && ( call.getMethodId ( ) . equals ( forNameMethodId ) ) ) { assert call.getType ( ) . isSameType ( javaLangClass ) ; return true ; } return false ; }
Source:
static void native_addOval ( int nPath , android.graphics.RectF oval , int dir ) { android.graphics.Path_Delegate pathDelegate = android.graphics.Path_Delegate.sManager.getDelegate ( nPath ) ; if ( pathDelegate == null ) { return ; } pathDelegate.mPath.append ( new java.awt.geom.Ellipse2D.Float ( oval.left , oval.top , oval.width ( ) , oval.height ( ) ) , false ) ; }

Target:
static void native_addOval ( long nPath , android.graphics.RectF oval , int dir ) { android.graphics.Path_Delegate pathDelegate = android.graphics.Path_Delegate.sManager.getDelegate ( nPath ) ; if ( pathDelegate == null ) { return ; } pathDelegate.mPath.append ( new java.awt.geom.Ellipse2D.Float ( oval.left , oval.top , oval.width ( ) , oval.height ( ) ) , false ) ; }
Source:
protected void loadUrlDataIn ( com.android.browser.Tab t , com.android.browser.IntentHandler.UrlData data ) { if ( data != null ) { if ( ( data.mVoiceIntent ) != null ) { t.activateVoiceSearchMode ( data.mVoiceIntent ) ; } else if ( data.isPreloaded ( ) ) { } else { loadUrl ( t , data.mUrl , data.mHeaders ) ; } } }

Target:
protected void loadUrlDataIn ( com.android.browser.Tab t , com.android.browser.IntentHandler.UrlData data ) { if ( data != null ) { if ( data.isPreloaded ( ) ) { } else { loadUrl ( t , data.mUrl , data.mHeaders ) ; } } }
Source:
void handleReturnCode ( ) { if ( ( mArgs ) != null ) { processPendingInstall ( mArgs , mRet ) ; } if ( ( mTempPackage ) != null ) { if ( ! ( mTempPackage.delete ( ) ) ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( "Couldn't delete temporary file: " + ( mTempPackage.getAbsolutePath ( ) ) ) ) ; } } }

Target:
void handleReturnCode ( ) { if ( ( mArgs ) != null ) { processPendingInstall ( mArgs , mRet ) ; if ( ( mTempPackage ) != null ) { if ( ! ( mTempPackage.delete ( ) ) ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( "Couldn't delete temporary file: " + ( mTempPackage.getAbsolutePath ( ) ) ) ) ; } } } }
Source:
public void testSinglePreDexLibrary ( ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { java.lang.String content = "Some Content" ; java.io.File input = com.android.builder.internal.compiler.PreDexCacheTest.createInputFile ( content ) ; java.io.File output = java.io.File.createTempFile ( "predex" , ".jar" ) ; output.deleteOnExit ( ) ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( input , output , new com.android.builder.internal.compiler.PreDexCacheTest.FakeDexOptions ( ) , mBuildToolInfo , false , new com.android.builder.internal.compiler.PreDexCacheTest.FakeCommandLineRunner ( new com.android.utils.StdLogger ( StdLogger.Level.INFO ) ) ) ; com.android.builder.internal.compiler.PreDexCacheTest.checkOutputFile ( content , output ) ; }

Target:
public void testSinglePreDexLibrary ( ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { java.lang.String content = "Some Content" ; java.io.File input = com.android.builder.internal.compiler.PreDexCacheTest.createInputFile ( content ) ; java.io.File output = java.io.File.createTempFile ( "predex" , ".jar" ) ; output.deleteOnExit ( ) ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( input , output , false , new com.android.builder.internal.compiler.PreDexCacheTest.FakeDexOptions ( ) , mBuildToolInfo , false , new com.android.builder.internal.compiler.PreDexCacheTest.FakeCommandLineRunner ( new com.android.utils.StdLogger ( StdLogger.Level.INFO ) ) ) ; com.android.builder.internal.compiler.PreDexCacheTest.checkOutputFile ( content , output ) ; }
Source:
public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setView ( view , viewSpacingLeft , viewSpacingTop , viewSpacingRight , viewSpacingBottom ) ; mDialog = mBuilder.show ( ) ; mFrameLayout = ( ( android.widget.FrameLayout ) ( mDialog.getWindow ( ) . findViewById ( R.id.custom ) ) ) ; mView = mFrameLayout.getChildAt ( 0 ) ; }

Target:
public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setView ( view , viewSpacingLeft , viewSpacingTop , viewSpacingRight , viewSpacingBottom ) ; mDialog = mBuilder.show ( ) ; mView = mDialog.getWindow ( ) . findViewById ( 100 ) ; }
Source:
public void copyTo ( float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsFloat32 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.FLOAT_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyTo ( float [ ] d ) { validateIsFloat32 ( ) ; copyTo ( d , Element.DataType.FLOAT_32 , d.length ) ; }
Source:
public void setUiTTYMode ( android.content.Context context , int sessionId , int uiTtyMode , android.os.Message onComplete ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { mImsServiceProxy.setUiTTYMode ( sessionId , uiTtyMode , onComplete ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "setTTYMode()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } if ( ! ( com.android.ims.ImsManager.getBooleanCarrierConfig ( context , CarrierConfigManager.KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL ) ) ) { setAdvanced4GMode ( ( ( uiTtyMode == ( android.telecom.TelecomManager.TTY_MODE_OFF ) ) && ( com.android.ims.ImsManager.isEnhanced4gLteModeSettingEnabledByUser ( context ) ) ) ) ; } }

Target:
public void setUiTTYMode ( android.content.Context context , int uiTtyMode , android.os.Message onComplete ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { mImsServiceProxy.setUiTTYMode ( uiTtyMode , onComplete ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "setTTYMode()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } if ( ! ( com.android.ims.ImsManager.getBooleanCarrierConfig ( context , CarrierConfigManager.KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL ) ) ) { setAdvanced4GMode ( ( ( uiTtyMode == ( android.telecom.TelecomManager.TTY_MODE_OFF ) ) && ( com.android.ims.ImsManager.isEnhanced4gLteModeSettingEnabledByUser ( context ) ) ) ) ; } }
Source:
public com.android.sdklib.internal.repository.SdkSource [ ] getAllSources ( ) { int n = 0 ; for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { n += list.size ( ) ; } com.android.sdklib.internal.repository.SdkSource [ ] sources = new com.android.sdklib.internal.repository.SdkSource [ n ] ; int i = 0 ; for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { for ( com.android.sdklib.internal.repository.SdkSource source : list ) { sources [ ( i ++ ) ] = source ; } } return sources ; }

Target:
public com.android.sdklib.internal.repository.SdkSource [ ] getAllSources ( ) { synchronized ( mSources ) { int n = 0 ; for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { n += list.size ( ) ; } com.android.sdklib.internal.repository.SdkSource [ ] sources = new com.android.sdklib.internal.repository.SdkSource [ n ] ; int i = 0 ; for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { for ( com.android.sdklib.internal.repository.SdkSource source : list ) { sources [ ( i ++ ) ] = source ; } } return sources ; } }
Source:
public void test_markI ( ) { java.io.InputStream is = new java.io.ByteArrayInputStream ( new byte [ 10 ] ) ; java.util.zip.InflaterInputStream iis = new java.util.zip.InflaterInputStream ( is ) ; iis.mark ( 0 ) ; iis.mark ( ( - 1 ) ) ; iis.mark ( 10000000 ) ; }

Target:
public void test_markI ( ) throws java.io.IOException { java.io.InputStream is = new java.io.ByteArrayInputStream ( new byte [ 10 ] ) ; try ( java.util.zip.InflaterInputStream iis = new java.util.zip.InflaterInputStream ( is ) ) { iis.mark ( 0 ) ; iis.mark ( ( - 1 ) ) ; iis.mark ( 10000000 ) ; } }
Source:
public void dragFinished ( org.eclipse.swt.dnd.DragSourceEvent e ) { if ( ( e.detail ) == ( org.eclipse.swt.dnd.DND.DROP_MOVE ) ) { mLayoutEditor.wrapUndoEditXmlModel ( "Remove drag'n'drop source elements" , new java.lang.Runnable ( ) { public void run ( ) { deleteSelection ( "Remove" , mDragSelection ) ; } } ) ; } mDragSelection.clear ( ) ; mDragElements = null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.GlobalCanvasDragInfo.getInstance ( ) . stopDrag ( ) ; }

Target:
public void dragFinished ( org.eclipse.swt.dnd.DragSourceEvent e ) { mDragSelection.clear ( ) ; mDragElements = null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.GlobalCanvasDragInfo.getInstance ( ) . stopDrag ( ) ; }
Source:
public void continueOperation ( android.content.Intent resolutionIntent , android.os.Bundle resolutionExtras ) { if ( ! ( isEnabled ( ) ) ) { android.app.PendingIntent callbackIntent = resolutionIntent.getParcelableExtra ( android.telephony.euicc.EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_RESOLUTION_CALLBACK_INTENT ) ; if ( callbackIntent != null ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; } return ; } try { getIEuiccController ( ) . continueOperation ( resolutionIntent , resolutionExtras ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void continueOperation ( android.content.Intent resolutionIntent , android.os.Bundle resolutionExtras ) { if ( ! ( isEnabled ( ) ) ) { android.app.PendingIntent callbackIntent = resolutionIntent.getParcelableExtra ( android.telephony.euicc.EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_RESOLUTION_CALLBACK_INTENT ) ; if ( callbackIntent != null ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; } return ; } try { android.telephony.euicc.EuiccManager.getIEuiccController ( ) . continueOperation ( resolutionIntent , resolutionExtras ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public boolean isConnected ( int sessionId , int serviceType , int callType ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { return mImsServiceProxy.isConnected ( sessionId , serviceType , callType ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "isServiceConnected()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public boolean isConnected ( int serviceType , int callType ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { return mImsServiceProxy.isConnected ( serviceType , callType ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "isServiceConnected()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public void testAccessInstanceState ( ) { android.widget.CompoundButton compoundButton = new android.widget.cts.CompoundButtonTest.MockCompoundButton ( mContext ) ; android.os.Parcelable state ; assertFalse ( compoundButton.isChecked ( ) ) ; assertFalse ( compoundButton.getFreezesText ( ) ) ; state = compoundButton.onSaveInstanceState ( ) ; assertNotNull ( state ) ; assertTrue ( compoundButton.getFreezesText ( ) ) ; compoundButton.setChecked ( true ) ; compoundButton.onRestoreInstanceState ( state ) ; assertFalse ( compoundButton.isChecked ( ) ) ; assertTrue ( compoundButton.isLayoutRequested ( ) ) ; }

Target:
public void testAccessInstanceState ( ) { android.widget.CompoundButton compoundButton = new android.widget.cts.CompoundButtonTest.MockCompoundButton ( mContext ) ; android.os.Parcelable state ; assertFalse ( compoundButton.isChecked ( ) ) ; assertFalse ( compoundButton.getFreezesText ( ) ) ; state = compoundButton.onSaveInstanceState ( ) ; assertNotNull ( state ) ; assertFalse ( compoundButton.getFreezesText ( ) ) ; compoundButton.setChecked ( true ) ; compoundButton.onRestoreInstanceState ( state ) ; assertFalse ( compoundButton.isChecked ( ) ) ; assertTrue ( compoundButton.isLayoutRequested ( ) ) ; }
Source:
public void showSidePanel ( boolean withAnimation ) { com.android.tv.ui.sidepanel.SideFragment.preloadRecycledViews ( mActivity ) ; if ( ( mFragmentCount ) == 0 ) { return ; } mPanel.setVisibility ( View.VISIBLE ) ; if ( withAnimation ) { mShowAnimator.start ( ) ; } scheduleHideAll ( ) ; }

Target:
public void showSidePanel ( boolean withAnimation ) { if ( ( mFragmentCount ) == 0 ) { return ; } mPanel.setVisibility ( View.VISIBLE ) ; if ( withAnimation ) { mShowAnimator.start ( ) ; } scheduleHideAll ( ) ; }
Source:
private void setConvoRead ( com.android.bluetooth.map.BluetoothMapConvoListingElement e , android.database.Cursor c , com.android.bluetooth.map.BluetoothMapContent.FilterInfo fi , com.android.bluetooth.map.BluetoothMapAppParams ap ) { java.lang.String setread = null ; int read = 0 ; read = c.getInt ( fi.mConvoColRead ) ; if ( com.android.bluetooth.map.BluetoothMapContent.V ) android.util.Log.d ( com.android.bluetooth.map.BluetoothMapContent.TAG , ( "setRead: " + setread ) ) ; e.setRead ( ( read == 1 ? true : false ) , ( ( ( ap.getParameterMask ( ) ) & ( com.android.bluetooth.map.BluetoothMapContent.MASK_READ ) ) != 0 ) ) ; }

Target:
private void setConvoRead ( com.android.bluetooth.map.BluetoothMapConvoListingElement e , android.database.Cursor c , com.android.bluetooth.map.BluetoothMapContent.FilterInfo fi , com.android.bluetooth.map.BluetoothMapAppParams ap ) { java.lang.String setread = null ; int read = 0 ; read = c.getInt ( fi.mConvoColRead ) ; if ( com.android.bluetooth.map.BluetoothMapContent.V ) android.util.Log.d ( com.android.bluetooth.map.BluetoothMapContent.TAG , ( "setRead: " + setread ) ) ; e.setRead ( ( read == 1 ) , ( ( ( ap.getParameterMask ( ) ) & ( com.android.bluetooth.map.BluetoothMapContent.MASK_READ ) ) != 0 ) ) ; }
Source:
public void testCasts ( ) throws java.lang.Exception { com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( 1 , "(int)1" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( 1L , "(long)1" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( 1 , "(int)1.1f" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( ( ( short ) ( 65537 ) ) , "(short)65537" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( ( ( byte ) ( 1023 ) ) , "(byte)1023" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( 1.5 , "(double)1.5f" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( ( - 5.0 ) , "(double)-5" ) ; }

Target:
public void testCasts ( ) throws java.lang.Exception { checkExpression ( 1 , "(int)1" ) ; checkExpression ( 1L , "(long)1" ) ; checkExpression ( 1 , "(int)1.1f" ) ; checkExpression ( ( ( short ) ( 65537 ) ) , "(short)65537" ) ; checkExpression ( ( ( byte ) ( 1023 ) ) , "(byte)1023" ) ; checkExpression ( 1.5 , "(double)1.5f" ) ; checkExpression ( ( - 5.0 ) , "(double)-5" ) ; }