auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static java.io.Serializable getObject ( junit.framework.TestCase test , java.lang.String toAppend ) throws java.lang.Exception { java.lang.StringBuilder path = new java.lang.StringBuilder ( "serialization" ) ; path.append ( java.io.File.separatorChar ) ; path.append ( test.getClass ( ) . getName ( ) . replace ( '.' , java.io.File.separatorChar ) ) ; path.append ( toAppend ) ; java.io.InputStream in = java.lang.ClassLoader.getSystemClassLoader ( ) . getResourceAsStream ( path.toString ( ) ) ; junit.framework.Assert.assertNotNull ( ( "Failed to load serialization resource file: " + path ) , in ) ; return org.apache.harmony.testframework.serialization.SerializationTest.getObjectFromStream ( in ) ; }

Target:
private static java.io.Serializable getObject ( junit.framework.TestCase test , java.lang.String toAppend ) throws java.lang.Exception { java.lang.StringBuilder path = new java.lang.StringBuilder ( "/serialization" ) ; path.append ( java.io.File.separatorChar ) ; path.append ( test.getClass ( ) . getName ( ) . replace ( '.' , java.io.File.separatorChar ) ) ; path.append ( toAppend ) ; java.io.InputStream in = org.apache.harmony.testframework.serialization.SerializationTest.class . getResourceAsStream ( path.toString ( ) ) ; junit.framework.Assert.assertNotNull ( ( "Failed to load serialization resource file: " + path ) , in ) ; return org.apache.harmony.testframework.serialization.SerializationTest.getObjectFromStream ( in ) ; }
Source:
public boolean engineContainsAlias ( java.lang.String alias ) { if ( alias == null ) { throw new java.lang.NullPointerException ( "alias == null" ) ; } return ( ( mKeyStore.contains ( ( ( Credentials.USER_PRIVATE_KEY ) + alias ) ) ) || ( mKeyStore.contains ( ( ( Credentials.USER_CERTIFICATE ) + alias ) ) ) ) || ( mKeyStore.contains ( ( ( Credentials.CA_CERTIFICATE ) + alias ) ) ) ; }

Target:
public boolean engineContainsAlias ( java.lang.String alias ) { if ( alias == null ) { throw new java.lang.NullPointerException ( "alias == null" ) ; } return ( ( ( mKeyStore.contains ( ( ( Credentials.USER_PRIVATE_KEY ) + alias ) ) ) || ( mKeyStore.contains ( ( ( Credentials.USER_SECRET_KEY ) + alias ) ) ) ) || ( mKeyStore.contains ( ( ( Credentials.USER_CERTIFICATE ) + alias ) ) ) ) || ( mKeyStore.contains ( ( ( Credentials.CA_CERTIFICATE ) + alias ) ) ) ; }
Source:
public boolean apply ( android.test.suitebuilder.TestMethod t ) { java.util.Set < android.annotation.cts.Profile > profiles = new java.util.HashSet < android.annotation.cts.Profile > ( ) ; add ( profiles , t.getAnnotation ( android.annotation.cts.SupportedProfiles.class ) ) ; add ( profiles , t.getEnclosingClass ( ) . getAnnotation ( android.annotation.cts.SupportedProfiles.class ) ) ; return ( ( ( ( specifiedProfile == null ) || ( specifiedProfile == ( android.annotation.cts.Profile.ALL ) ) ) || ( profiles.isEmpty ( ) ) ) || ( profiles.contains ( Profile.ALL ) ) ) || ( profiles.contains ( specifiedProfile ) ) ; }

Target:
private boolean isValidTest ( android.test.suitebuilder.TestMethod t ) { java.util.Set < android.annotation.cts.Profile > profiles = new java.util.HashSet < android.annotation.cts.Profile > ( ) ; add ( profiles , t.getAnnotation ( android.annotation.cts.SupportedProfiles.class ) ) ; add ( profiles , t.getEnclosingClass ( ) . getAnnotation ( android.annotation.cts.SupportedProfiles.class ) ) ; return ( ( ( ( specifiedProfile == null ) || ( specifiedProfile == ( android.annotation.cts.Profile.ALL ) ) ) || ( profiles.isEmpty ( ) ) ) || ( profiles.contains ( Profile.ALL ) ) ) || ( profiles.contains ( specifiedProfile ) ) ; }
Source:
public int compareTo ( com.hp.creals.CR x ) { for ( int a = - 20 ; ; a *= 2 ) { com.hp.creals.CR.check_prec ( a ) ; int result = compareTo ( x , a ) ; if ( 0 != result ) return result ; } }

Target:
public int compareTo ( com.hp.creals.CR x ) { for ( int a = - 20 ; ; a *= 2 ) { com.hp.creals.CR.check_prec ( a ) ; int result = compareTo ( x , a ) ; if ( 0 != result ) return result ; if ( ( java.lang.Thread.interrupted ( ) ) || ( com.hp.creals.CR.please_stop ) ) { throw new com.hp.creals.CR.AbortedException ( ) ; } } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { com.android.server.telecom.Log.startSession ( "DM.oR" ) ; try { if ( Intent.ACTION_DOCK_EVENT.equals ( intent.getAction ( ) ) ) { int dockState = intent.getIntExtra ( Intent.EXTRA_DOCK_STATE , Intent.EXTRA_DOCK_STATE_UNDOCKED ) ; onDockChanged ( dockState ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.telecom.Log.startSession ( "DM.oR" ) ; try { if ( Intent.ACTION_DOCK_EVENT.equals ( intent.getAction ( ) ) ) { int dockState = intent.getIntExtra ( Intent.EXTRA_DOCK_STATE , Intent.EXTRA_DOCK_STATE_UNDOCKED ) ; onDockChanged ( dockState ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void verifyCommandSetCaptionEnabled ( ) { mTvView.setCaptionEnabled ( true ) ; mInstrumentation.waitForIdleSync ( ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; return ( session != null ) && ( ( session.mSetCaptionEnabledCount ) > 0 ) ; } } . run ( ) ; }

Target:
public void verifyCommandSetCaptionEnabled ( ) { resetCounts ( ) ; mTvView.setCaptionEnabled ( true ) ; mInstrumentation.waitForIdleSync ( ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; return ( session != null ) && ( ( session.mSetCaptionEnabledCount ) > 0 ) ; } } . run ( ) ; }
Source:
public static com.android.manifmerger.XmlDocument load ( com.android.manifmerger.KeyResolver < java.lang.String > selectors , com.android.manifmerger.XmlLoader.SourceLocation sourceLocation , java.lang.String xml ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { com.android.utils.PositionXmlParser positionXmlParser = new com.android.utils.PositionXmlParser ( ) ; org.w3c.dom.Document domDocument = positionXmlParser.parse ( xml ) ; return domDocument != null ? new com.android.manifmerger.XmlDocument ( positionXmlParser , sourceLocation , selectors , domDocument.getDocumentElement ( ) ) : null ; }

Target:
public static com.android.manifmerger.XmlDocument load ( com.android.manifmerger.KeyResolver < java.lang.String > selectors , com.android.manifmerger.PlaceholderHandler.KeyBasedValueResolver < com.android.manifmerger.ManifestMerger2.SystemProperty > systemPropertyResolver , com.android.manifmerger.XmlLoader.SourceLocation sourceLocation , java.lang.String xml ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { com.android.utils.PositionXmlParser positionXmlParser = new com.android.utils.PositionXmlParser ( ) ; org.w3c.dom.Document domDocument = positionXmlParser.parse ( xml ) ; return domDocument != null ? new com.android.manifmerger.XmlDocument ( positionXmlParser , sourceLocation , selectors , systemPropertyResolver , domDocument.getDocumentElement ( ) ) : null ; }
Source:
public static void notifyShowDialogToReportNotSpam ( android.content.Context context , java.lang.String normalizedNumber , java.lang.String countryIso , int callType , com.android.dialer.logging.ReportingLocation.Type reportingLocation ) { com.android.dialer.common.LogUtil.enterBlock ( "ShowBlockReportSpamDialogNotifier.notifyShowDialogToReportNotSpam" ) ; android.content.Intent intent = new android.content.Intent ( ) ; intent.setAction ( ShowBlockReportSpamDialogReceiver.ACTION_SHOW_DIALOG_TO_REPORT_NOT_SPAM ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER , normalizedNumber ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO , countryIso ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE , callType ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION , reportingLocation ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( context ) . sendBroadcast ( intent ) ; }

Target:
public static void notifyShowDialogToReportNotSpam ( android.content.Context context , com.android.dialer.blockreportspam.BlockReportSpamDialogInfo blockReportSpamDialogInfo ) { com.android.dialer.common.LogUtil.enterBlock ( "ShowBlockReportSpamDialogNotifier.notifyShowDialogToReportNotSpam" ) ; android.content.Intent intent = new android.content.Intent ( ) ; intent.setAction ( ShowBlockReportSpamDialogReceiver.ACTION_SHOW_DIALOG_TO_REPORT_NOT_SPAM ) ; com.android.dialer.protos.ProtoParsers.put ( intent , ShowBlockReportSpamDialogReceiver.EXTRA_DIALOG_INFO , blockReportSpamDialogInfo ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( context ) . sendBroadcast ( intent ) ; }
Source:
public int hashCode ( ) { int result = myGroupId.hashCode ( ) ; result = ( 31 * result ) + ( myArtifactId.hashCode ( ) ) ; for ( java.lang.Integer i : myRevisions ) { result = ( 31 * result ) + i ; } return result ; }

Target:
public int hashCode ( ) { int result = myGroupId.hashCode ( ) ; result = ( 31 * result ) + ( myArtifactId.hashCode ( ) ) ; for ( java.lang.Integer i : myRevisions ) { result = ( 31 * result ) + i ; } if ( ( myArtifactType ) != null ) { result = ( 31 * result ) + ( myArtifactType.hashCode ( ) ) ; } return result ; }
Source:
public java.lang.String getStringValue ( ) { if ( ( mValue ) != null ) { return mValue.getDisplayValue ( ) ; } return "" ; }

Target:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier compareQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier referenceQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ) ( reference ) ) ; if ( ( ( mValue ) == ( referenceQ.mValue ) ) && ( ( compareQ.mValue ) != ( referenceQ.mValue ) ) ) { return true ; } else { return ( mValue.getDpiValue ( ) ) > ( compareQ.mValue.getDpiValue ( ) ) ; } }
Source:
public void testSmsStatus ( ) { mSimulatedCommands.notifySmsStatus ( "0123056789ABCDEF" ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 50 ) ; org.mockito.Mockito.verify ( mSimulatedCommandsVerifier ) . acknowledgeLastIncomingGsmSms ( true , Telephony.Sms.Intents.RESULT_SMS_HANDLED , null ) ; }

Target:
public void testSmsStatus ( ) { mSimulatedCommands.notifySmsStatus ( new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 255 ) ) , ( ( byte ) ( 255 ) ) } ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 50 ) ; org.mockito.Mockito.verify ( mSimulatedCommandsVerifier ) . acknowledgeLastIncomingGsmSms ( true , Telephony.Sms.Intents.RESULT_SMS_HANDLED , null ) ; }
Source:
public void run ( ) { android.os.PowerManager.WakeLock wl = ( ( android.os.PowerManager ) ( this . getSystemService ( "power" ) ) ) . newWakeLock ( PowerManager.PARTIAL_WAKE_LOCK , "crasher" ) ; wl.acquire ( ) ; mHandler.postDelayed ( new java.lang.Runnable ( ) { public void run ( ) { throw new java.lang.RuntimeException ( "Die!" ) ; } } , 10000 ) ; }

Target:
public void run ( ) { android.os.PowerManager.WakeLock wl = ( ( android.os.PowerManager ) ( this . getSystemService ( Context.POWER_SERVICE ) ) ) . newWakeLock ( PowerManager.PARTIAL_WAKE_LOCK , "crasher" ) ; wl.acquire ( ) ; mHandler.postDelayed ( new java.lang.Runnable ( ) { public void run ( ) { throw new java.lang.RuntimeException ( "Die!" ) ; } } , 10000 ) ; }
Source:
private void removeRelativeParams ( com.android.ide.common.api.INode node ) { for ( com.android.ide.common.layout.relative.ConstraintType type : com.android.ide.common.layout.relative.ConstraintType.values ( ) ) { node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , type.name , null ) ; } node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_LEFT , null ) ; node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_RIGHT , null ) ; node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_TOP , null ) ; node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_BOTTOM , null ) ; }

Target:
private void removeRelativeParams ( com.android.ide.common.api.INode node ) { for ( com.android.ide.common.layout.relative.ConstraintType type : com.android.ide.common.layout.relative.ConstraintType.values ( ) ) { node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , type.name , null ) ; } node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_LEFT , null ) ; node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_RIGHT , null ) ; node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_TOP , null ) ; node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_MARGIN_BOTTOM , null ) ; }
Source:
public void testCheckReadPhoneNumber_hasReadPhoneNumbers ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PHONE_NUMBERS , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.mockito.Mockito.when ( mMockAppOps.noteOp ( AppOpsManager.OP_READ_PHONE_NUMBERS , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE ) ) . thenReturn ( AppOpsManager.MODE_ALLOWED ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }

Target:
public void testCheckReadPhoneNumber_hasPrivilegedPhoneStatePermission ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
protected void onActivityResult ( int requestCode , int result , android.content.Intent data ) { if ( ( requestCode == ( com.android.cts.verifier.managedprovisioning.VpnTestActivity.REQUEST_VPN_CODE ) ) && ( result == ( RESULT_OK ) ) ) { establishVpn ( ) ; } else { android.util.Log.w ( com.android.cts.verifier.managedprovisioning.VpnTestActivity.TAG , "Test failed, canceled by user" ) ; populateInfo ( R.string.device_owner_vpn_connection_canceled ) ; } }

Target:
protected void onActivityResult ( int requestCode , int result , android.content.Intent data ) { if ( requestCode == ( com.android.cts.verifier.managedprovisioning.VpnTestActivity.REQUEST_VPN_CODE ) ) { establishVpn ( ) ; } else { android.util.Log.w ( com.android.cts.verifier.managedprovisioning.VpnTestActivity.TAG , ( "Unexpected request code: " + requestCode ) ) ; } }
Source:
public boolean onPrepareOptionsMenu ( com.android.internal.telephony.cat.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean helpVisible = false ; boolean mainVisible = false ; if ( ( mState ) == ( com.android.stk.StkMenuActivity.STATE_SECONDARY ) ) { mainVisible = true ; } if ( ( mStkMenu ) != null ) { helpVisible = mStkMenu.helpAvailable ; } menu.findItem ( StkApp.MENU_ID_END_SESSION ) . setVisible ( mainVisible ) ; menu.findItem ( StkApp.MENU_ID_HELP ) . setVisible ( helpVisible ) ; return true ; }

Target:
public boolean onPrepareOptionsMenu ( com.android.internal.telephony.cat.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean mainVisible = false ; if ( ( ( mState ) == ( com.android.stk.StkMenuActivity.STATE_SECONDARY ) ) && ( mAcceptUsersInput ) ) { mainVisible = true ; } menu.findItem ( StkApp.MENU_ID_END_SESSION ) . setVisible ( mainVisible ) ; return mainVisible ; }
Source:
public boolean delete ( java.lang.String key ) { try { return ( mBinder.del ( key , ( - 1 ) ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean delKey ( java.lang.String key ) { return delKey ( key , ( - 1 ) ) ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , new byte [ 1 ] , 0 , 1 , 0 ) ; fail ( ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , new byte [ 1 ] , 0 , 1 , 0 ) ; org.junit.Assert.fail ( ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
public final void test_setDefaultHostnameVerifier ( ) { try { javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( null ) ; fail ( "No expected IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } javax.net.ssl.HostnameVerifier def = javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier ( ) ; try { tests.api.javax.net.ssl.myHostnameVerifier hnv = new tests.api.javax.net.ssl.myHostnameVerifier ( ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( hnv ) ; assertEquals ( hnv , javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier ( ) ) ; } finally { javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( def ) ; } }

Target:
public final void test_setDefaultHostnameVerifier ( ) { try { javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( null ) ; fail ( "No expected IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } javax.net.ssl.HostnameVerifier def = javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier ( ) ; try { org.apache.harmony.tests.javax.net.ssl.myHostnameVerifier hnv = new org.apache.harmony.tests.javax.net.ssl.myHostnameVerifier ( ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( hnv ) ; assertEquals ( hnv , javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier ( ) ) ; } finally { javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( def ) ; } }
Source:
private void terminateCall ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "terminateCall" ) ; } int action = HeadsetClientHalConstants.CALL_ACTION_CHUP ; android.bluetooth.BluetoothHeadsetClientCall c = getCall ( BluetoothHeadsetClientCall.CALL_STATE_DIALING , BluetoothHeadsetClientCall.CALL_STATE_ALERTING , BluetoothHeadsetClientCall.CALL_STATE_ACTIVE ) ; if ( c != null ) { if ( com.android.bluetooth.hfpclient.NativeInterface.handleCallActionNative ( getByteAddress ( mCurrentDevice ) , action , 0 ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TERMINATE_CALL , action ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't terminate outgoing call" ) ; } } }

Target:
private void terminateCall ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "terminateCall" ) ; } int action = HeadsetClientHalConstants.CALL_ACTION_CHUP ; android.bluetooth.BluetoothHeadsetClientCall c = getCall ( BluetoothHeadsetClientCall.CALL_STATE_DIALING , BluetoothHeadsetClientCall.CALL_STATE_ALERTING , BluetoothHeadsetClientCall.CALL_STATE_ACTIVE ) ; if ( c != null ) { if ( com.android.bluetooth.hfpclient.NativeInterface.handleCallActionNative ( getByteAddress ( mCurrentDevice ) , action , 0 ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TERMINATE_CALL , action ) ; sendMessageDelayed ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DISCONNECT_AUDIO , com.android.bluetooth.hfpclient.HeadsetClientStateMachine.SCO_DISCONNECT_TIMEOUT_MS ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't terminate outgoing call" ) ; } } }
Source:
public void onOpen ( android.database.sqlite.SQLiteDatabase db ) { com.android.providers.tv.TvProvider.initOnOpenIfNeeded ( com.android.providers.tv.TvProvider.DatabaseHelper.mContext , db ) ; }

Target:
public void onOpen ( android.database.sqlite.SQLiteDatabase db ) { if ( ! ( com.android.providers.tv.TvProvider.sInitialized ) ) { buildProjectionMap ( db ) ; com.android.providers.tv.TvProvider.sBlockedPackagesSharedPreference = android.preference.PreferenceManager.getDefaultSharedPreferences ( com.android.providers.tv.TvProvider.DatabaseHelper.mContext ) ; com.android.providers.tv.TvProvider.sBlockedPackages = new java.util.concurrent.ConcurrentHashMap < > ( ) ; for ( java.lang.String packageName : com.android.providers.tv.TvProvider.sBlockedPackagesSharedPreference.getStringSet ( com.android.providers.tv.TvProvider.SHARED_PREF_BLOCKED_PACKAGES_KEY , new java.util.HashSet < > ( ) ) ) { com.android.providers.tv.TvProvider.sBlockedPackages.put ( packageName , true ) ; } com.android.providers.tv.TvProvider.sInitialized = true ; } }
Source:
public boolean switchToNextInputMethod ( android.os.IBinder imeToken , boolean onlyCurrentIme ) { synchronized ( mH ) { try { return mService.switchToNextInputMethod ( imeToken , onlyCurrentIme ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.view.inputmethod.InputMethodManager.TAG , ( "IME died: " + ( mCurId ) ) , e ) ; return false ; } } }

Target:
public int getInputMethodWindowVisibleHeight ( ) { synchronized ( mH ) { try { return mService.getInputMethodWindowVisibleHeight ( ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public java.lang.String wifiNanCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "role" , description = "The role of the device: Initiator (0) or Responder (1)" ) java.lang.Integer role , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.nan.WifiNanDiscoveryBaseSession session ; synchronized ( mLock ) { session = mDiscoverySessions.get ( sessionId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( role , new android.net.wifi.nan.WifiNanManager.OpaquePeerHandle ( peerId ) , bytes ) ; }

Target:
public java.lang.String wifiAwareCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "role" , description = "The role of the device: Initiator (0) or Responder (1)" ) java.lang.Integer role , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.aware.WifiAwareDiscoveryBaseSession session ; synchronized ( mLock ) { session = mDiscoverySessions.get ( sessionId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwareStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( role , new android.net.wifi.aware.WifiAwareManager.OpaquePeerHandle ( peerId ) , bytes ) ; }
Source:
public int getComponentEnabledSetting ( android.content.ComponentName componentName , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ; int uid = android.os.Binder.getCallingUid ( ) ; checkValidCaller ( uid , userId ) ; synchronized ( mPackages ) { return mSettings.getComponentEnabledSettingLPr ( componentName , userId ) ; } }

Target:
public int getComponentEnabledSetting ( android.content.ComponentName componentName , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ; int uid = android.os.Binder.getCallingUid ( ) ; enforceCrossUserPermission ( uid , userId , false , "get component enabled" ) ; synchronized ( mPackages ) { return mSettings.getComponentEnabledSettingLPr ( componentName , userId ) ; } }
Source:
public java.lang.String scriptDisplayNameInContext ( java.lang.String script ) { if ( ( nameLength ) == ( android.icu.text.DisplayContext.LENGTH_SHORT ) ) { java.lang.String scriptName = langData.get ( "Scripts%short" , script ) ; if ( ! ( scriptName.equals ( script ) ) ) { return adjustForUsageAndContext ( android.icu.impl.LocaleDisplayNamesImpl.CapitalizationContextUsage.SCRIPT , scriptName ) ; } } return adjustForUsageAndContext ( android.icu.impl.LocaleDisplayNamesImpl.CapitalizationContextUsage.SCRIPT , langData.get ( "Scripts" , script ) ) ; }

Target:
private java.lang.String scriptDisplayNameInContext ( java.lang.String script , boolean skipAdjust ) { if ( ( nameLength ) == ( android.icu.text.DisplayContext.LENGTH_SHORT ) ) { java.lang.String scriptName = langData.get ( "Scripts%short" , script ) ; if ( ! ( scriptName.equals ( script ) ) ) { return skipAdjust ? scriptName : adjustForUsageAndContext ( android.icu.impl.LocaleDisplayNamesImpl.CapitalizationContextUsage.SCRIPT , scriptName ) ; } } java.lang.String scriptName = langData.get ( "Scripts" , script ) ; return skipAdjust ? scriptName : adjustForUsageAndContext ( android.icu.impl.LocaleDisplayNamesImpl.CapitalizationContextUsage.SCRIPT , scriptName ) ; }
Source:
private void applyMargin ( com.android.ide.common.api.INode n , java.lang.String marginAttribute , int margin ) { if ( margin > 0 ) { int dp = mRulesEngine.pxToDp ( margin ) ; n.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , marginAttribute , java.lang.String.format ( com.android.ide.common.layout.LayoutConstants.VALUE_N_DP , dp ) ) ; } else if ( ( n.getStringAttr ( com.android.util.XmlUtils.ANDROID_URI , marginAttribute ) ) != null ) { n.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , marginAttribute , null ) ; } }

Target:
private void applyMargin ( com.android.ide.common.api.INode n , java.lang.String marginAttribute , int margin ) { if ( margin > 0 ) { int dp = mRulesEngine.pxToDp ( margin ) ; n.setAttribute ( com.android.utils.XmlUtils.ANDROID_URI , marginAttribute , java.lang.String.format ( com.android.ide.common.layout.LayoutConstants.VALUE_N_DP , dp ) ) ; } else if ( ( n.getStringAttr ( com.android.utils.XmlUtils.ANDROID_URI , marginAttribute ) ) != null ) { n.setAttribute ( com.android.utils.XmlUtils.ANDROID_URI , marginAttribute , null ) ; } }
Source:
void handleApplicationCrashInner ( java.lang.String eventType , com.android.server.am.ProcessRecord r , java.lang.String processName , android.app.ApplicationErrorReport.CrashInfo crashInfo ) { android.util.EventLog.writeEvent ( EventLogTags.AM_CRASH , android.os.Binder.getCallingPid ( ) , android.os.UserHandle.getUserId ( android.os.Binder.getCallingUid ( ) ) , processName , ( r == null ? - 1 : r.info.flags ) , crashInfo.exceptionClassName , crashInfo.exceptionMessage , crashInfo.throwFileName , crashInfo.throwLineNumber ) ; addErrorToDropBox ( eventType , r , processName , null , null , null , null , null , crashInfo ) ; crashApplication ( r , crashInfo ) ; }

Target:
void handleApplicationCrashInner ( java.lang.String eventType , com.android.server.am.ProcessRecord r , java.lang.String processName , android.app.ApplicationErrorReport.CrashInfo crashInfo ) { android.util.EventLog.writeEvent ( EventLogTags.AM_CRASH , android.os.Binder.getCallingPid ( ) , android.os.UserHandle.getUserId ( android.os.Binder.getCallingUid ( ) ) , processName , ( r == null ? - 1 : r.info.flags ) , crashInfo.exceptionClassName , crashInfo.exceptionMessage , crashInfo.throwFileName , crashInfo.throwLineNumber ) ; addErrorToDropBox ( eventType , r , processName , null , null , null , null , null , crashInfo ) ; mAppErrors.crashApplication ( r , crashInfo ) ; }
Source:
public void finishPackageInstall ( int token ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system is allowed to finish installs" ) ; if ( com.android.server.pm.PackageManagerService.DEBUG_INSTALL ) { android.util.Slog.v ( com.android.server.pm.PackageManagerService.TAG , ( "BM finishing package install for " + token ) ) ; } final android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.POST_INSTALL , token , 0 ) ; mHandler.sendMessage ( msg ) ; }

Target:
public void finishPackageInstall ( int token , boolean didLaunch ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system is allowed to finish installs" ) ; if ( com.android.server.pm.PackageManagerService.DEBUG_INSTALL ) { android.util.Slog.v ( com.android.server.pm.PackageManagerService.TAG , ( "BM finishing package install for " + token ) ) ; } android.os.Trace.asyncTraceEnd ( android.os.Trace.TRACE_TAG_PACKAGE_MANAGER , "restore" , token ) ; final android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.POST_INSTALL , token , ( didLaunch ? 1 : 0 ) ) ; mHandler.sendMessage ( msg ) ; }
Source:
public void testCompile022 ( ) throws java.lang.Exception { java.lang.String packageName = "com.android.jack.switchstatement.test022.jack" ; java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input = com.google.common.collect.Maps.newHashMap ( ) ; { input.put ( "Switch1" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , true ) ) ; } checkCompiledCode ( packageName , input ) ; }

Target:
public void testCompile020b ( ) throws java.lang.Exception { java.lang.String packageName = "com.android.jack.switchstatement.test020.jack" ; java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input = com.google.common.collect.Maps.newHashMap ( ) ; input.put ( "Switch1" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , true ) ) ; input.put ( "Switch2" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , true ) ) ; compileCodeIncremental ( packageName , input ) ; }
Source:
public java.io.OutputStream openWrite ( ) throws java.io.IOException { zos.putNextEntry ( entry ) ; return new com.android.sched.util.stream.UncloseableOutputStream ( zos ) ; }

Target:
public java.io.OutputStream openWrite ( ) throws java.io.IOException { zos.putNextEntry ( entry ) ; if ( ( vfsRoot ) instanceof com.android.sched.vfs.SequentialOutputVDir ) { if ( ( ( com.android.sched.vfs.SequentialOutputVDir ) ( vfsRoot ) ) . notifyVFileOpenAndReturnPreviousState ( ) ) { throw new java.lang.AssertionError ( ( ( getLocation ( ) . getDescription ( ) ) + " cannot be written to because a previous stream has not been closed." ) ) ; } } return new com.android.sched.vfs.zip.OutputZipVFile.UnclosableVFileOutputStream ( zos , vfsRoot ) ; }
Source:
public java.lang.String getOperatorNumeric ( ) { if ( ( mImsi ) == null ) { log ( "getOperatorNumeric: IMSI == null" ) ; return null ; } if ( ( ( mncLength ) == ( UNINITIALIZED ) ) || ( ( mncLength ) == ( UNKNOWN ) ) ) { log ( "getSIMOperatorNumeric: bad mncLength" ) ; return null ; } return mImsi.substring ( 0 , ( 3 + ( mncLength ) ) ) ; }

Target:
public java.lang.String getOperatorNumeric ( ) { if ( ( mImsi ) == null ) { log ( "getOperatorNumeric: IMSI == null" ) ; return null ; } if ( ( ( mMncLength ) == ( UNINITIALIZED ) ) || ( ( mMncLength ) == ( UNKNOWN ) ) ) { log ( "getSIMOperatorNumeric: bad mncLength" ) ; return null ; } return mImsi.substring ( 0 , ( 3 + ( mMncLength ) ) ) ; }
Source:
public void testOverlay2Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay2" , BasePlugin.GRADLE_MIN_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.build.gradle.BasePlugin.FD_INTERMEDIATES ) ) + "/res/one/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "variant_type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }

Target:
public void testOverlay2Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay2" , BasePlugin.GRADLE_MIN_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/one/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "variant_type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }
Source:
public void testAddSingleEphemeralNetwork ( ) { android.net.wifi.WifiConfiguration openNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; openNetwork.ephemeral = true ; java.util.List < android.net.wifi.WifiConfiguration > networks = new java.util.ArrayList < > ( ) ; networks.add ( openNetwork ) ; verifyAddEphemeralNetworkToWifiConfigManager ( openNetwork ) ; java.util.List < android.net.wifi.WifiConfiguration > retrievedNetworks = mWifiConfigManager.getConfiguredNetworksWithPasswords ( ) ; com.android.server.wifi.WifiConfigurationTestUtil.assertConfigurationsEqualForConfigManagerAddOrUpdate ( networks , retrievedNetworks ) ; assertTrue ( mWifiConfigManager.getSavedNetworks ( ) . isEmpty ( ) ) ; }

Target:
public void testAddMultipleNetworksAndEnsureEphemeralNetworkNotPersisted ( ) { android.net.wifi.WifiConfiguration ephemeralNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; ephemeralNetwork.ephemeral = true ; android.net.wifi.WifiConfiguration openNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; assertTrue ( addNetworkToWifiConfigManager ( ephemeralNetwork ) . isSuccess ( ) ) ; assertTrue ( addNetworkToWifiConfigManager ( openNetwork ) . isSuccess ( ) ) ; com.android.server.wifi.WifiConfigStoreData storeData = captureWriteStoreData ( ) ; assertFalse ( isNetworkInConfigStoreData ( ephemeralNetwork , storeData ) ) ; assertTrue ( isNetworkInConfigStoreData ( openNetwork , storeData ) ) ; }
Source:
public void testDefaultInterfaceMethodVirtualUpRef ( ) { junit.framework.Assert.assertEquals ( 99 , new com.android.jack.java8.gwt.test029.jack.Java8Test.DefaultInterfaceImplVirtualUpRef ( ) . method2 ( ) ) ; junit.framework.Assert.assertEquals ( 99 , new com.android.jack.java8.gwt.test029.jack.Java8Test.DefaultInterfaceImplVirtualUpRefTwoInterfaces ( ) . method2 ( ) ) ; junit.framework.Assert.assertEquals ( "SimpleB" , new com.android.jack.java8.gwt.test029.jack.SimpleC ( ) . m ( ) ) ; junit.framework.Assert.assertEquals ( "SimpleASimpleB" , new com.android.jack.java8.gwt.test029.jack.SimpleD ( ) . m ( ) ) ; }

Target:
public void testDefaultInterfaceMethodVirtualUpRef2 ( ) { junit.framework.Assert.assertEquals ( "SimpleB" , new com.android.jack.java8.gwt.test029.jack.SimpleC ( ) . m ( ) ) ; }
Source:
private static void maybeAdjustApplicationInfo ( android.content.pm.ApplicationInfo info ) { if ( ( ( info.primaryCpuAbi ) != null ) && ( ( info.secondaryCpuAbi ) != null ) ) { final java.lang.String runtimeIsa = dalvik.system.VMRuntime.getRuntime ( ) . vmInstructionSet ( ) ; final java.lang.String secondaryIsa = dalvik.system.VMRuntime.getInstructionSet ( info.secondaryCpuAbi ) ; if ( runtimeIsa.equals ( secondaryIsa ) ) { info.nativeLibraryDir = info.secondaryNativeLibraryDir ; } } }

Target:
private static void maybeAdjustApplicationInfo ( android.content.pm.ApplicationInfo info ) { if ( ( ( info.primaryCpuAbi ) != null ) && ( ( info.secondaryCpuAbi ) != null ) ) { final java.lang.String runtimeIsa = dalvik.system.VMRuntime.getRuntime ( ) . vmInstructionSet ( ) ; java.lang.String secondaryIsa = dalvik.system.VMRuntime.getInstructionSet ( info.secondaryCpuAbi ) ; final java.lang.String secondaryDexCodeIsa = android.os.SystemProperties.get ( ( "ro.dalvik.vm.isa." + secondaryIsa ) ) ; secondaryIsa = ( secondaryDexCodeIsa.isEmpty ( ) ) ? secondaryIsa : secondaryDexCodeIsa ; if ( runtimeIsa.equals ( secondaryIsa ) ) { info.nativeLibraryDir = info.secondaryNativeLibraryDir ; } } }
Source:
private void renderChildren ( java.util.List < com.android.builder.dependency.AndroidDependency > libraries ) { renderer.startChildren ( ) ; for ( int i = 0 ; i < ( libraries.size ( ) ) ; i ++ ) { com.android.builder.dependency.AndroidDependency lib = libraries.get ( i ) ; render ( lib , ( i == ( ( libraries.size ( ) ) - 1 ) ) ) ; } renderer.completeChildren ( ) ; }

Target:
private void renderChildren ( java.util.List < com.android.builder.dependency.LibraryDependency > libraries ) { renderer.startChildren ( ) ; for ( int i = 0 ; i < ( libraries.size ( ) ) ; i ++ ) { com.android.builder.dependency.LibraryDependency lib = libraries.get ( i ) ; render ( lib , ( i == ( ( libraries.size ( ) ) - 1 ) ) ) ; } renderer.completeChildren ( ) ; }
Source:
public com.android.hierarchyviewerlib.device.ViewNode findViewById ( java.lang.String id ) { com.android.hierarchyviewerlib.device.ViewNode rootNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( new com.android.hierarchyviewerlib.device.Window ( mDevice , "" , - 1 ) ) ; if ( rootNode == null ) { throw new java.lang.RuntimeException ( "Could not dump view" ) ; } return findViewById ( id , rootNode ) ; }

Target:
public com.android.hierarchyviewerlib.models.ViewNode findViewById ( java.lang.String id ) { com.android.hierarchyviewerlib.models.ViewNode rootNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( new com.android.hierarchyviewerlib.models.Window ( new com.android.hierarchyviewerlib.device.ViewServerDevice ( mDevice ) , "" , - 1 ) ) ; if ( rootNode == null ) { throw new java.lang.RuntimeException ( "Could not dump view" ) ; } return findViewById ( id , rootNode ) ; }
Source:
public void run ( ) { mTextView.setText ( "hello world" , BufferType.SPANNABLE ) ; mTextView.setSingleLine ( ) ; mSpannable = ( ( android.text.Spannable ) ( mTextView.getText ( ) ) ) ; getActivity ( ) . setContentView ( mTextView , new android.view.ViewGroup.LayoutParams ( android.text.method.cts.ScrollingMovementMethodTest.LITTLE_SPACE , android.view.ViewGroup.LayoutParams.WRAP_CONTENT ) ) ; }

Target:
public void run ( ) { mTextView.setText ( "hello world" , BufferType.SPANNABLE ) ; mTextView.setSingleLine ( ) ; mSpannable = ( ( android.text.Spannable ) ( mTextView.getText ( ) ) ) ; int width = android.widget.cts.WidgetTestUtils.convertDipToPixels ( getActivity ( ) , android.text.method.cts.ScrollingMovementMethodTest.LITTLE_SPACE ) ; getActivity ( ) . setContentView ( mTextView , new android.view.ViewGroup.LayoutParams ( width , android.view.ViewGroup.LayoutParams.WRAP_CONTENT ) ) ; }
Source:
public java.util.ListIterator < E > listIterator ( int index ) { java.lang.Object [ ] elements = getArray ( ) ; int len = elements.length ; if ( ( index < 0 ) || ( index > len ) ) throw new java.lang.IndexOutOfBoundsException ( java.util.concurrent.CopyOnWriteArrayList.outOfBounds ( index , len ) ) ; return new java.util.concurrent.CopyOnWriteArrayList.COWIterator < E > ( elements , index ) ; }

Target:
void checkElementIndex ( int index ) { if ( ( index < 0 ) || ( index >= ( ( to ) - ( from ) ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "index=" + index ) + ", size=" ) + ( ( to ) - ( from ) ) ) ) ; } }
Source:
public void close ( ) throws java.io.IOException { vfs.close ( ) ; if ( dir.exists ( ) ) { com.android.sched.util.file.FileUtils.deleteDir ( dir ) ; } }

Target:
public void close ( ) throws com.android.sched.util.file.CannotCloseOutputException { vfs.close ( ) ; try { if ( dir.exists ( ) ) { com.android.sched.util.file.FileUtils.deleteDir ( dir ) ; } } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseOutputException ( new com.android.sched.util.location.DirectoryLocation ( dir ) , e ) ; } }
Source:
private static void reportTypeDef ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation , @ com.android.annotations.NonNull lombok.ast.Node argument , @ com.android.annotations.Nullable lombok.ast.Node errorNode , @ com.android.annotations.NonNull java.lang.Iterable < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > allAnnotations ) { java.lang.Object allowed = annotation.getValue ( ) ; if ( allowed instanceof java.lang.Object [ ] ) { java.lang.Object [ ] allowedValues = ( ( java.lang.Object [ ] ) ( allowed ) ) ; com.android.tools.lint.checks.SupportAnnotationDetector.reportTypeDef ( context , argument , errorNode , false , allowedValues , allAnnotations ) ; } }

Target:
private static void reportTypeDef ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull com.intellij.psi.PsiAnnotation annotation , @ com.android.annotations.NonNull com.intellij.psi.PsiElement argument , @ com.android.annotations.Nullable com.intellij.psi.PsiElement errorNode , @ com.android.annotations.NonNull com.intellij.psi.PsiAnnotation [ ] allAnnotations ) { com.intellij.psi.PsiAnnotationMemberValue allowed = com.android.tools.lint.checks.SupportAnnotationDetector.getAnnotationValue ( annotation ) ; if ( allowed instanceof com.intellij.psi.PsiArrayInitializerMemberValue ) { com.intellij.psi.PsiArrayInitializerMemberValue initializerExpression = ( ( com.intellij.psi.PsiArrayInitializerMemberValue ) ( allowed ) ) ; com.intellij.psi.PsiAnnotationMemberValue [ ] initializers = initializerExpression.getInitializers ( ) ; com.android.tools.lint.checks.SupportAnnotationDetector.reportTypeDef ( context , argument , errorNode , false , initializers , allAnnotations ) ; } }
Source:
void clear ( ) { synchronized ( mApps ) { java.util.Iterator < com.android.bluetooth.gatt.ContextMap < T > . App > i = mApps.iterator ( ) ; while ( i.hasNext ( ) ) { com.android.bluetooth.gatt.ContextMap < T > . App entry = i.next ( ) ; entry.unlinkToDeath ( ) ; i.remove ( ) ; } } synchronized ( mConnections ) { mConnections.clear ( ) ; } }

Target:
void clear ( ) { synchronized ( mApps ) { java.util.Iterator < com.android.bluetooth.gatt.ContextMap < T > . App > i = mApps.iterator ( ) ; while ( i.hasNext ( ) ) { com.android.bluetooth.gatt.ContextMap < T > . App entry = i.next ( ) ; entry.unlinkToDeath ( ) ; entry.appScanStats.isRegistered = false ; i.remove ( ) ; } } synchronized ( mConnections ) { mConnections.clear ( ) ; } }
Source:
public void actionPerformed ( java.awt.event.ActionEvent event ) { if ( ! ( showBadPatches ) ) { corruptedPatches = com.android.draw9patch.ui.CorruptPatch.findBadPatches ( this . image , patchInfo ) ; checkButton.setText ( "Hide bad patches" ) ; } else { checkButton.setText ( "Show bad patches" ) ; corruptedPatches = null ; } repaint ( ) ; showBadPatches = ! ( showBadPatches ) ; }

Target:
public void eventDispatched ( java.awt.AWTEvent event ) { enableEraseMode ( ( ( java.awt.event.KeyEvent ) ( event ) ) ) ; }
Source:
protected void writeMergedItems ( org.w3c.dom.Document document , org.w3c.dom.Node rootNode ) { }

Target:
protected void writeAdditionalData ( org.w3c.dom.Document document , org.w3c.dom.Node rootNode ) { org.w3c.dom.Element densities = document.createElement ( getAdditionalDataTagName ( ) ) ; for ( com.android.resources.Density density : mDensities ) { org.w3c.dom.Element densityElement = document.createElement ( com.android.ide.common.res2.PreprocessResourcesMerger.NODE_DENSITY ) ; densityElement.setTextContent ( density.getResourceValue ( ) ) ; densities.appendChild ( densityElement ) ; } rootNode.appendChild ( densities ) ; }