auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onUnhold ( ) { if ( ( getConnectionService ( ) . getAllConnections ( ) . size ( ) ) > 1 ) { android.util.Log.w ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , "Ignoring unhold; call hold on the foreground call" ) ; return ; } android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "onUnhold " + ( mCurrentCall ) ) ) ; if ( ( ! ( mClosed ) ) && ( ( mHeadsetProfile ) != null ) ) { mHeadsetProfile.acceptCall ( mDevice , BluetoothHeadsetClient.CALL_ACCEPT_HOLD ) ; } }

Target:
public void onUnhold ( ) { if ( ( getConnectionService ( ) . getAllConnections ( ) . size ( ) ) > 1 ) { android.util.Log.w ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , "Ignoring unhold; call hold on the foreground call" ) ; return ; } if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "onUnhold " + ( mCurrentCall ) ) ) ; } if ( ! ( mClosed ) ) { mHeadsetProfile.acceptCall ( mDevice , BluetoothHeadsetClient.CALL_ACCEPT_HOLD ) ; } }
Source:
private void assertPnoNetworkFoundMessage ( int listenerId , android.net.wifi.ScanResult [ ] expected , android.os.Message networkFoundMessage ) { assertEquals ( "what" , WifiScanner.CMD_PNO_NETWORK_FOUND , networkFoundMessage.what ) ; assertEquals ( "listenerId" , listenerId , networkFoundMessage.arg2 ) ; assertScanResultsEquals ( expected , ( ( android.net.wifi.WifiScanner.ParcelableScanResults ) ( networkFoundMessage.obj ) ) . getResults ( ) ) ; }

Target:
private void assertPnoNetworkFoundMessage ( int listenerId , android.net.wifi.ScanResult [ ] expected , android.os.Message networkFoundMessage ) { org.junit.Assert.assertEquals ( "what" , WifiScanner.CMD_PNO_NETWORK_FOUND , networkFoundMessage.what ) ; org.junit.Assert.assertEquals ( "listenerId" , listenerId , networkFoundMessage.arg2 ) ; com.android.server.wifi.ScanTestUtil.assertScanResultsEquals ( expected , ( ( android.net.wifi.WifiScanner.ParcelableScanResults ) ( networkFoundMessage.obj ) ) . getResults ( ) ) ; }
Source:
public void displaySanityCheckError ( java.lang.String errorMessage , final com.intellij.openapi.project.Project project ) { new com.intellij.notification.Notification ( "Cloud Test Configuration Invalid" , "" , java.lang.String.format ( "<b>%s</b> <a href=''>Fix it.</a>" , errorMessage ) , com.intellij.notification.NotificationType.ERROR , new com.intellij.notification.NotificationListener.Adapter ( ) { @ java.lang.Override protected void hyperlinkActivated ( @ org.jetbrains.annotations.NotNull com.intellij.notification.Notification notification , @ org.jetbrains.annotations.NotNull javax.swing.event.HyperlinkEvent event ) { com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . showSettingsDialog ( project , "Google Cloud Testing" ) ; } } ) . notify ( ( project.isDefault ( ) ? null : project ) ) ; }

Target:
public void displaySanityCheckError ( java.lang.String errorMessage , final com.intellij.openapi.project.Project project ) { com.google.gct.testing.GoogleCloudTestingUtils.showErrorMessage ( project , "Cloud test configuration is invalid" , errorMessage ) ; }
Source:
public void test_plus_Duration ( ) { java.time.Duration dur = java.time.Duration.ofSeconds ( 62 , 3 ) ; java.time.OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus ( dur ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2008 , 6 , 30 , 11 , 32 , 1 , 503 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }

Target:
public void test_plus_Duration ( ) { java.time.Duration dur = java.time.Duration.ofSeconds ( 62 , 3 ) ; java.time.OffsetDateTime t = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.plus ( dur ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2008 , 6 , 30 , 11 , 32 , 1 , 503 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }
Source:
public void testCancelServiceDiscovery_failure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; org.mockito.Mockito.when ( mISupplicantP2pIfaceMock.cancelServiceDiscovery ( anyInt ( ) ) ) . thenReturn ( mStatusFailure ) ; assertFalse ( mDut.cancelServiceDiscovery ( "1234" ) ) ; assertTrue ( mDut.isInitializationComplete ( ) ) ; }

Target:
public void testCancelServiceDiscovery_failure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; org.mockito.Mockito.when ( mISupplicantP2pIfaceMock.cancelServiceDiscovery ( anyLong ( ) ) ) . thenReturn ( mStatusFailure ) ; assertFalse ( mDut.cancelServiceDiscovery ( "1234" ) ) ; assertTrue ( mDut.isInitializationComplete ( ) ) ; }
Source:
public boolean updateSubscribe ( short transactionId , android.net.wifi.nan.SubscribeConfig config ) { if ( mIsPublishSession ) { android.util.Log.e ( com.android.server.wifi.nan.WifiNanDiscoverySessionState.TAG , "A PUBLISH session is being used to subscribe" ) ; try { mCallback.onSessionConfigFail ( WifiNanDiscoverySessionCallback.REASON_OTHER ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.nan.WifiNanDiscoverySessionState.TAG , ( "updateSubscribe: RemoteException=" + e ) ) ; } return false ; } return com.android.server.wifi.nan.WifiNanNative.getInstance ( ) . subscribe ( transactionId , mPubSubId , config ) ; }

Target:
public boolean updateSubscribe ( short transactionId , android.net.wifi.nan.SubscribeConfig config ) { if ( mIsPublishSession ) { android.util.Log.e ( com.android.server.wifi.nan.WifiNanDiscoverySessionState.TAG , "A PUBLISH session is being used to subscribe" ) ; try { mCallback.onSessionConfigFail ( WifiNanNative.NAN_STATUS_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.nan.WifiNanDiscoverySessionState.TAG , ( "updateSubscribe: RemoteException=" + e ) ) ; } return false ; } return com.android.server.wifi.nan.WifiNanNative.getInstance ( ) . subscribe ( transactionId , mPubSubId , config ) ; }
Source:
public void copy1DRangeFrom ( int off , int count , android.support.v8.renderscript.Allocation data , int dataOff ) { mRS.nAllocationData2D ( getIDSafe ( ) , off , 0 , mSelectedLOD , mSelectedFace.mID , count , 1 , data.getID ( mRS ) , dataOff , 0 , data.mSelectedLOD , data.mSelectedFace.mID ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , android.support.v8.renderscript.Allocation data , int dataXoff , int dataYoff ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data.getID ( mRS ) , dataXoff , dataYoff , data.mSelectedLOD , data.mSelectedFace.mID ) ; }
Source:
public void testFlagEExistingI ( ) { int iFlags = PackageManager.INSTALL_INTERNAL ; int rFlags = ( PackageManager.INSTALL_EXTERNAL ) | ( PackageManager.INSTALL_REPLACE_EXISTING ) ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install , rFlags , true , false , ( - 1 ) , ( - 1 ) ) ; }

Target:
public void testFlagFExistingI ( ) { int iFlags = android.content.pm.PackageManager.INSTALL_INTERNAL ; int rFlags = ( android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ) | ( android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ) ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install , rFlags , true , false , ( - 1 ) , ( - 1 ) ) ; }
Source:
public boolean removeAll ( final java.util.Collection < ? > collection ) { com.google.common.base.Preconditions.checkNotNull ( collection ) ; com.google.common.base.Predicate < E > combinedPredicate = new com.google.common.base.Predicate < E > ( ) { @ java.lang.Override public boolean apply ( E input ) { return ( predicate.apply ( input ) ) && ( collection.contains ( input ) ) ; } } ; return com.google.common.collect.Iterables.removeIf ( unfiltered , combinedPredicate ) ; }

Target:
public boolean removeAll ( final java.util.Collection < ? > collection ) { return com.google.common.collect.Iterables.removeIf ( unfiltered , com.google.common.base.Predicates.and ( predicate , com.google.common.base.Predicates.in ( collection ) ) ) ; }
Source:
private void onConnectionStateChanged ( int state , byte [ ] address ) { com.android.bluetooth.hfp.HeadsetStateMachine.StackEvent event = new com.android.bluetooth.hfp.HeadsetStateMachine.StackEvent ( com.android.bluetooth.hfp.HeadsetStateMachine.EVENT_TYPE_CONNECTION_STATE_CHANGED ) ; event.valueInt = state ; event.device = getDevice ( address ) ; sendMessage ( com.android.bluetooth.hfp.HeadsetStateMachine.STACK_EVENT , event ) ; }

Target:
private void processSendClccResponse ( com.android.bluetooth.hfp.HeadsetClccResponse clcc ) { android.bluetooth.BluetoothDevice device = getDeviceForMessage ( com.android.bluetooth.hfp.HeadsetStateMachine.CLCC_RSP_TIMEOUT ) ; if ( device == null ) { return ; } if ( ( clcc.mIndex ) == 0 ) { removeMessages ( com.android.bluetooth.hfp.HeadsetStateMachine.CLCC_RSP_TIMEOUT ) ; } mNativeInterface.clccResponse ( device , clcc.mIndex , clcc.mDirection , clcc.mStatus , clcc.mMode , clcc.mMpty , clcc.mNumber , clcc.mType ) ; }
Source:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; libcore.javax.net.ssl.TestSSLContext testSSLContext = libcore.javax.net.ssl.TestSSLContext.create ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; try { connection.connect ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; assertEquals ( "Connect line failure on proxy" , "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com" ) ; }

Target:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; libcore.javax.net.ssl.TestSSLContext testSSLContext = libcore.javax.net.ssl.TestSSLContext.create ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; com.google.mockwebserver.MockResponse badProxyResponse = new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ; server.enqueue ( badProxyResponse ) ; server.enqueue ( badProxyResponse ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; try { connection.connect ( ) ; fail ( ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; assertEquals ( "Connect line failure on proxy" , "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com" ) ; }
Source:
public void testSystemTzDataFileCorrupt ( ) throws java.lang.Exception { byte [ ] invalidTzDataBytes = new byte [ 20 ] ; java.nio.file.Files.write ( mSystemDir.hostPath.resolve ( com.android.cts.tzdata.TzDataCheckTest.SYSTEM_TZDATA_FILE_NAME ) , invalidTzDataBytes ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; libcore.tzdata.shared2.TimeZoneDistro validDistro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , validDistro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 7 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , validDistro ) ; }

Target:
public void testSystemTzDataFileCorrupt ( ) throws java.lang.Exception { byte [ ] invalidTzDataBytes = new byte [ 20 ] ; java.nio.file.Files.write ( mSystemDir.hostPath.resolve ( com.android.cts.tzdata.TzDataCheckTest.SYSTEM_TZDATA_FILE_NAME ) , invalidTzDataBytes ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro validDistro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , validDistro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 7 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , validDistro ) ; }
Source:
public void inviteParticipants ( java.lang.String [ ] participants ) throws com.android.ims.ImsException { logi ( "inviteParticipants ::" ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "inviteParticipants :: " ) ; throw new com.android.ims.ImsException ( "No call session" , ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } mSession.inviteParticipants ( participants ) ; } }

Target:
public void inviteParticipants ( java.lang.String [ ] participants ) throws com.android.ims.ImsException { logi ( "inviteParticipants ::" ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "inviteParticipants :: " ) ; throw new com.android.ims.ImsException ( "No call session" , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } mSession.inviteParticipants ( participants ) ; } }
Source:
public void enter ( ) { super . enter ( ) ; android.telecom.Log.addEvent ( mCallsManager.getForegroundCall ( ) , LogUtils.Events.AUDIO_ROUTE , ( "Entering state " + ( getName ( ) ) ) ) ; if ( isActive ( ) ) { android.telecom.Log.addEvent ( mCallsManager.getForegroundCall ( ) , com.android.server.telecom.CallAudioRouteStateMachine.AUDIO_ROUTE_TO_LOG_EVENT.get ( getRouteCode ( ) , LogUtils.Events.AUDIO_ROUTE ) ) ; } }

Target:
public void enter ( ) { super . enter ( ) ; android.telecom.Log.addEvent ( mCallsManager.getForegroundCall ( ) , LogUtils.Events.AUDIO_ROUTE , ( "Entering state " + ( getName ( ) ) ) ) ; if ( isActive ( ) ) { android.telecom.Log.addEvent ( mCallsManager.getForegroundCall ( ) , com.android.server.telecom.CallAudioRouteStateMachine.AUDIO_ROUTE_TO_LOG_EVENT.get ( getRouteCode ( ) , LogUtils.Events.AUDIO_ROUTE ) , getVolumeString ( ) ) ; } }
Source:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext testSSLContext = libcore.javax.net.ssl.TestSSLContext.create ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; com.google.mockwebserver.MockResponse badProxyResponse = new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ; server.enqueue ( badProxyResponse ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "response" ) ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; connection.setHostnameVerifier ( new libcore.java.net.URLConnectionTest.RecordingHostnameVerifier ( ) ) ; assertContent ( "response" , connection ) ; com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; assertEquals ( "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com" ) ; }

Target:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; libcore.javax.net.ssl.TestSSLContext testSSLContext = libcore.javax.net.ssl.TestSSLContext.create ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; com.google.mockwebserver.MockResponse badProxyResponse = new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ; server.enqueue ( badProxyResponse ) ; server.enqueue ( badProxyResponse ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; try { connection.connect ( ) ; fail ( ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; assertEquals ( "Connect line failure on proxy" , "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com" ) ; }
Source:
public void tearDown ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { if ( ( ( mEnforcingState ) != null ) && ( ! ( mEnforcingState.equals ( com.android.tradefed.targetprep.VtsCoveragePreparer.SELINUX_DISABLED ) ) ) ) { device.executeShellCommand ( ( "setenforce " + ( mEnforcingState ) ) ) ; } if ( ( mDeviceInfoPath ) != null ) { com.android.tradefed.util.FileUtil.recursiveDelete ( mDeviceInfoPath ) ; device.executeShellCommand ( ( "rm -r " + ( com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_CONFIGURE_DST ) ) ) ; } device.executeShellCommand ( java.lang.String.format ( "rm -rf %s/*" , com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_DATA_PATH ) ) ; }

Target:
private void cleanupCoverageData ( com.android.tradefed.device.ITestDevice device ) throws com.android.tradefed.device.DeviceNotAvailableException { if ( ( mDeviceInfoPath ) != null ) { com.android.tradefed.util.FileUtil.recursiveDelete ( mDeviceInfoPath ) ; } device.executeShellCommand ( ( "rm -r " + ( com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_CONFIGURE_DST ) ) ) ; device.executeShellCommand ( java.lang.String.format ( "rm -rf %s/*" , com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_DATA_PATH ) ) ; }
Source:
public void run ( ) { drawBottomPanel ( ) ; updateSendButtonState ( ) ; drawTopPanel ( isSubjectEditorVisible ( ) ) ; }

Target:
public void run ( ) { if ( ( mRecipientsEditor.getRecipientCount ( ) ) == 1 ) { final android.view.inputmethod.InputMethodManager inputManager = ( ( android.view.inputmethod.InputMethodManager ) ( getSystemService ( Context.INPUT_METHOD_SERVICE ) ) ) ; if ( ( inputManager == null ) || ( ! ( inputManager.isFullscreenMode ( ) ) ) ) { mTextEditor.requestFocus ( ) ; } } }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setListAdapter ( new com.android.cts.verifier.TestListActivity.TestListAdapter ( this ) ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; com.android.cts.verifier.TestListAdapter adapter = new com.android.cts.verifier.TestListAdapter ( this ) ; setListAdapter ( adapter ) ; com.android.cts.verifier.TestListActivity.TestResultContentObserver observer = new com.android.cts.verifier.TestListActivity.TestResultContentObserver ( adapter ) ; android.content.ContentResolver resolver = getContentResolver ( ) ; resolver.registerContentObserver ( TestResultsProvider.CONTENT_URI , true , observer ) ; }
Source:
public com.android.ims.internal.IImsConfig getOldConfigInterface ( ) { try { return mCompatFeature.getConfigInterface ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "getOldConfigInterface(): " + ( e.getMessage ( ) ) ) ) ; return null ; } }

Target:
public void onFeatureReady ( ) { android.util.Log.i ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , "onFeatureReady called!" ) ; android.content.IntentFilter intentFilter = new android.content.IntentFilter ( com.android.ims.ImsManager.ACTION_IMS_INCOMING_CALL ) ; mContext.registerReceiver ( mReceiver , intentFilter ) ; try { mSessionId = mCompatFeature.startSession ( createIncomingCallPendingIntent ( ) , new com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.ImsRegistrationListenerBase ( ) ) ; mCompatFeature.addRegistrationListener ( mListener ) ; mCompatFeature.addRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "Couldn't start compat feature: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
protected void doBuildPatchFile ( java.io.File toFile , com.intellij.updater.MultiZipFile.OutputStream patchOutput ) throws java.io.IOException { if ( ! ( myIsMove ) ) { java.io.File source = getSource ( myOlderDir ) ; patchOutput.putNextEntry ( myPath ) ; writeExecutableFlag ( patchOutput , toFile ) ; writeDiff ( source , toFile , patchOutput ) ; patchOutput.closeEntry ( ) ; } }

Target:
protected void doBuildPatchFile ( java.io.File olderFile , java.io.File newerFile , java.util.zip.ZipOutputStream patchOutput ) throws java.io.IOException { if ( ! ( myIsMove ) ) { patchOutput.putNextEntry ( new java.util.zip.ZipEntry ( myPath ) ) ; writeExecutableFlag ( patchOutput , newerFile ) ; writeDiff ( olderFile , newerFile , patchOutput ) ; patchOutput.closeEntry ( ) ; } }
Source:
protected boolean removeEldestEntry ( libcore.java.util.Entry eldest ) { removeEldestEntryCallCount.incrementAndGet ( ) ; return removeEldestEntryReturnValue.get ( ) ; }

Target:
protected boolean removeEldestEntry ( libcore.java.util.Entry eldest ) { int size = size ( ) ; assertEquals ( size , libcore.java.util.LinkedHashMapTest.iterableSize ( entrySet ( ) ) ) ; assertEquals ( size , libcore.java.util.LinkedHashMapTest.iterableSize ( keySet ( ) ) ) ; assertEquals ( size , libcore.java.util.LinkedHashMapTest.iterableSize ( values ( ) ) ) ; assertEquals ( size , ( ( removeEldestEntryCallCount.get ( ) ) + 1 ) ) ; removeEldestEntryCallCount.incrementAndGet ( ) ; return removeEldestEntryReturnValue.get ( ) ; }
Source:
public void removeRegistrationListener ( int slotId , int featureType , com.android.ims.internal.IImsRegistrationListener listener ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.removeRegistrationListener ( listener ) ; } } }

Target:
public void removeRegistrationListener ( int slotId , int featureType , com.android.ims.internal.IImsRegistrationListener listener ) throws android.os.RemoteException { enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , "removeRegistrationListener" ) ; synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.removeRegistrationListener ( listener ) ; } } }
Source:
android.net.NetworkScoreManager getScoreManager ( ) { android.net.NetworkScoreManager scoreManager = mock ( android.net.NetworkScoreManager.class ) ; doAnswer ( new android.app.test.MockAnswerUtil.AnswerWithArguments ( ) { public void answer ( int networkType , android.net.INetworkScoreCache scoreCache ) { mScoreCache = ( ( com.android.server.wifi.WifiNetworkScoreCache ) ( scoreCache ) ) ; } } ) . when ( scoreManager ) . registerNetworkScoreCache ( anyInt ( ) , anyObject ( ) ) ; return scoreManager ; }

Target:
public void setUp ( ) throws java.lang.Exception { mResource = getResource ( ) ; mScoreManager = mock ( android.net.NetworkScoreManager.class ) ; mContext = getContext ( ) ; mScoreCache = new com.android.server.wifi.WifiNetworkScoreCache ( mContext ) ; mWifiConfigManager = getWifiConfigManager ( ) ; when ( mClock.getElapsedSinceBootMillis ( ) ) . thenReturn ( android.os.SystemClock.elapsedRealtime ( ) ) ; mThresholdQualifiedRssi2G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz ) ; mThresholdQualifiedRssi5G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz ) ; mExternalScoreEvaluator = new com.android.server.wifi.ExternalScoreEvaluator ( mContext , mWifiConfigManager , mScoreCache , mClock , null ) ; }
Source:
public void test_parkUntil_1 ( ) { tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( true , 500 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( 1000 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 500 ) ; }

Target:
public void test_parkUntil_2 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; result.append ( optionDefinition ) ; result.append ( "set to '" ) . append ( unconvertedValue ) . append ( "' " ) ; result.append ( "with priority " ) . append ( origin.getPriority ( ) ) ; if ( ( origin.getSource ( ) ) != null ) { result.append ( " and source '" ) . append ( origin.getSource ( ) ) . append ( "'" ) ; } return result.toString ( ) ; }

Target:
public java.lang.String toString ( ) { if ( ( commandLineForm ) == null ) { return optionDefinition.toString ( ) ; } java.lang.String source = origin.getSource ( ) ; return java.lang.String.format ( "option '%s'%s" , commandLineForm , ( source == null ? "" : java.lang.String.format ( " (source %s)" , source ) ) ) ; }
Source:
public static byte [ ] toByteArray ( com.google.common.io.InputSupplier < ? extends java.io.InputStream > supplier ) throws java.io.IOException { boolean threw = true ; java.io.InputStream in = supplier.getInput ( ) ; try { byte [ ] result = com.google.common.io.ByteStreams.toByteArray ( in ) ; threw = false ; return result ; } finally { com.google.common.io.Closeables.close ( in , threw ) ; } }

Target:
public void write ( byte [ ] b , int off , int len ) { com.google.common.base.Preconditions.checkNotNull ( b ) ; }
Source:
private byte [ ] getEncoded ( org.bouncycastle.asn1.ASN1Encodable obj ) { java.io.ByteArrayOutputStream bOut = new java.io.ByteArrayOutputStream ( ) ; org.bouncycastle.asn1.ASN1OutputStream aOut = new org.bouncycastle.asn1.ASN1OutputStream ( bOut ) ; try { aOut.writeObject ( obj ) ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalArgumentException ( "cannot encode object added to SET" ) ; } return bOut.toByteArray ( ) ; }

Target:
private byte [ ] getDEREncoded ( org.bouncycastle.asn1.ASN1Encodable obj ) { try { return obj.toASN1Primitive ( ) . getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalArgumentException ( "cannot encode object added to SET" ) ; } }
Source:
public void testGetValues012_ClassLoader ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "CLASS_LOADER_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointClassLoader" , StackTrace002Debuggee.CLASS_LOADER_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointClassLoader" ) ; methodInfo.addVariable ( "param" , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testGetValues012_ClassLoaderAsObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = getStaticFieldValue ( classID , "CLASS_LOADER_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.CLASS_LOADER_AS_OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointObject" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , oldValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
protected byte [ ] engineDoFinal ( ) { if ( ( mChunkedStreamer ) == null ) { throw new java.lang.IllegalStateException ( "Not initialized" ) ; } byte [ ] result ; try { result = mChunkedStreamer.doFinal ( null , 0 , 0 ) ; } catch ( android.security.KeymasterException e ) { throw new android.security.CryptoOperationException ( "Keystore operation failed" , e ) ; } engineReset ( ) ; return result ; }

Target:
protected byte [ ] engineDoFinal ( ) { if ( ( mChunkedStreamer ) == null ) { throw new java.lang.IllegalStateException ( "Not initialized" ) ; } byte [ ] result ; try { result = mChunkedStreamer.doFinal ( null , 0 , 0 ) ; } catch ( android.security.KeymasterException e ) { throw android.security.KeymasterUtils.getCryptoOperationException ( e ) ; } engineReset ( ) ; return result ; }
Source:
public void testStateTransition_ConnectedToAudioConnecting_ConnectAudio ( ) { int numBroadcastsSent = setUpConnectedState ( ) ; numBroadcastsSent ++ ; mHeadsetStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO , mTestDevice ) ; verify ( mHeadsetService , timeout ( com.android.bluetooth.hfp.HeadsetStateMachineTest.ASYNC_CALL_TIMEOUT_MILLIS ) . times ( numBroadcastsSent ) ) . sendBroadcastAsUser ( mIntentArgument.capture ( ) , eq ( UserHandle.ALL ) , eq ( HeadsetService.BLUETOOTH_PERM ) ) ; com.android.bluetooth.hfp.HeadsetStateMachineTest.verifyAudioStateBroadcast ( mTestDevice , BluetoothHeadset.STATE_AUDIO_CONNECTING , BluetoothHeadset.STATE_AUDIO_DISCONNECTED , mIntentArgument.getValue ( ) ) ; org.junit.Assert.assertThat ( mHeadsetStateMachine.getCurrentState ( ) , org.hamcrest.core.IsInstanceOf.instanceOf ( HeadsetStateMachine.AudioConnecting.class ) ) ; }

Target:
public void testStateTransition_ConnectedToAudioConnecting_ConnectAudio ( ) { int numBroadcastsSent = setUpConnectedState ( ) ; numBroadcastsSent ++ ; mHeadsetStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO , mTestDevice ) ; verify ( mHeadsetService , timeout ( com.android.bluetooth.hfp.HeadsetStateMachineTest.ASYNC_CALL_TIMEOUT_MILLIS ) . times ( numBroadcastsSent ) ) . sendBroadcastAsUser ( mIntentArgument.capture ( ) , eq ( UserHandle.ALL ) , eq ( HeadsetService.BLUETOOTH_PERM ) ) ; com.android.bluetooth.hfp.HeadsetTestUtils.verifyAudioStateBroadcast ( mTestDevice , BluetoothHeadset.STATE_AUDIO_CONNECTING , BluetoothHeadset.STATE_AUDIO_DISCONNECTED , mIntentArgument.getValue ( ) ) ; org.junit.Assert.assertThat ( mHeadsetStateMachine.getCurrentState ( ) , org.hamcrest.core.IsInstanceOf.instanceOf ( HeadsetStateMachine.AudioConnecting.class ) ) ; }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput_wide.d.T_aput_wide_1 t = new dot.junit.opcodes.aput_wide.d.T_aput_wide_1 ( ) ; long [ ] arr = new long [ 2 ] ; try { t.run ( arr , 2 , 100000000000L ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aput_wide.d.T_aput_wide_1" , java.lang.NullPointerException.class , null , 2 , 100000000000L ) ; }
Source:
public void testAdd1_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( ( - 1 ) , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testListIterator1_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.listIterator ( ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public final com.android.server.am.WaitResult startActivityAndWait ( android.app.IApplicationThread caller , android.content.Intent intent , java.lang.String resolvedType , android.os.IBinder resultTo , java.lang.String resultWho , int requestCode , int startFlags , java.lang.String profileFile , android.os.ParcelFileDescriptor profileFd , android.os.Bundle options ) { enforceNotIsolatedCaller ( "startActivityAndWait" ) ; com.android.server.am.WaitResult res = new com.android.server.am.WaitResult ( ) ; int userId = android.os.Binder.getOrigCallingUser ( ) ; mMainStack.startActivityMayWait ( caller , ( - 1 ) , intent , resolvedType , resultTo , resultWho , requestCode , startFlags , profileFile , profileFd , res , null , options , userId ) ; return res ; }

Target:
public android.graphics.Bitmap getTaskTopThumbnail ( int id ) { synchronized ( this ) { enforceCallingPermission ( android.Manifest.permission.READ_FRAME_BUFFER , "getTaskTopThumbnail()" ) ; com.android.server.am.TaskRecord tr = taskForIdLocked ( id ) ; if ( tr != null ) { return mMainStack.getTaskTopThumbnailLocked ( tr ) ; } } return null ; }
Source:
public void test_writeI ( ) throws java.io.IOException { f = new java.io.File ( java.lang.System.getProperty ( "user.home" ) , "output.tst" ) ; fos = new java.io.FileOutputStream ( f.getPath ( ) ) ; fos.write ( 't' ) ; fis = new java.io.FileInputStream ( f.getPath ( ) ) ; assertEquals ( "Incorrect char written" , 't' , fis.read ( ) ) ; }

Target:
public void test_writeI ( ) throws java.io.IOException { f = java.io.File.createTempFile ( "FileOutputStreamTest" , "tst" ) ; fos = new java.io.FileOutputStream ( f.getPath ( ) ) ; fos.write ( 't' ) ; fis = new java.io.FileInputStream ( f.getPath ( ) ) ; assertEquals ( "Incorrect char written" , 't' , fis.read ( ) ) ; }
Source:
private java.lang.String getFeatures ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; for ( java.lang.String feature : android.tests.getinfo.DeviceInfoInstrument.FEATURES_TO_CHECK ) { boolean hasFeature = packageManager.hasSystemFeature ( feature ) ; builder.append ( feature ) . append ( ':' ) . append ( hasFeature ) . append ( ';' ) ; } return builder.toString ( ) ; }

Target:
private static void addFeature ( java.lang.StringBuilder features , java.lang.String name , java.lang.String type , boolean available ) { features.append ( name ) . append ( ':' ) . append ( type ) . append ( ':' ) . append ( available ) . append ( ';' ) ; }
Source:
public void testNewInstanceString_ByteArrayIntIntStringConstructor ( ) { runTestNewInstanceString ( "([BIILjava/lang/String;)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 byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringCharsetValue = getStaticFieldValue ( debuggeeClassId , "STRING_CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; constructorArguments.add ( stringCharsetValue ) ; } } ) ; }

Target:
public void testNewInstanceString_ByteArrayIntIntStringConstructor ( ) { runTestNewInstanceString ( "([BIILjava/lang/String;)V" , "m" , 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 byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringCharsetValue = getStaticFieldValue ( debuggeeClassId , "STRING_CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; constructorArguments.add ( stringCharsetValue ) ; } } ) ; }
Source:
public java.util.Iterator < com.android.sched.vfs.InputVFile > iterator ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType ) { if ( ! ( containsFileType ( fileType ) ) ) { return com.google.common.collect.Iterators.emptyIterator ( ) ; } java.util.List < com.android.sched.vfs.InputVFile > inputVFiles = new java.util.ArrayList < com.android.sched.vfs.InputVFile > ( ) ; fillFiles ( inputVFS.getRootInputVDir ( ) , fileType , inputVFiles ) ; return inputVFiles.iterator ( ) ; }

Target:
public java.util.Iterator < com.android.sched.vfs.InputVFile > iterator ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType ) { if ( ! ( containsFileType ( fileType ) ) ) { return com.google.common.collect.Iterators.emptyIterator ( ) ; } if ( fileType == ( com.android.jack.library.FileType.RSC ) ) { return resources.iterator ( ) ; } java.util.List < com.android.sched.vfs.InputVFile > inputVFiles = new java.util.ArrayList < com.android.sched.vfs.InputVFile > ( ) ; fillFiles ( inputVFS.getRootInputVDir ( ) , fileType , inputVFiles ) ; return inputVFiles.iterator ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { if ( ( args.length ) != 2 ) { java.lang.System.err.println ( "usage: java ZoneCompactor <setup> <data dir>" ) ; java.lang.System.exit ( 0 ) ; } new ZoneCompactor ( args [ 0 ] , args [ 1 ] ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { if ( ( args.length ) != 4 ) { java.lang.System.err.println ( "usage: java ZoneCompactor <setup file> <data directory> <output directory> <tzdata version>" ) ; java.lang.System.exit ( 0 ) ; } new ZoneCompactor ( args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] ) ; }
Source:
public void run ( ) { try { try { wrapping.startHandshake ( ) ; wrapping.getOutputStream ( ) . write ( 42 ) ; underlying.close ( ) ; wrapping.close ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } } catch ( java.lang.RuntimeException e ) { throw e ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { wrapping.startHandshake ( ) ; wrapping.getOutputStream ( ) . write ( 42 ) ; underlying.close ( ) ; wrapping.close ( ) ; return null ; }
Source:
public void copyElementTo ( int xoff , int yoff , int component_number , java.lang.Object array ) { copyElementTo ( xoff , yoff , 0 , component_number , array ) ; }

Target:
private void copyTo ( java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; mRS.validate ( ) ; boolean usePadding = false ; if ( ( mAutoPadding ) && ( ( mType.getElement ( ) . getVectorSize ( ) ) == 3 ) ) { usePadding = true ; } mRS.nAllocationRead ( getID ( mRS ) , array , dt , mType.mElement.mType.mSize , usePadding ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.DiffFieldsTest" , "com.android.ahat.DiffTest" , "com.android.ahat.DominatorsTest" , "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" , "com.android.ahat.SiteTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.DiffFieldsTest" , "com.android.ahat.DiffTest" , "com.android.ahat.DominatorsTest" , "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.ProguardMapTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" , "com.android.ahat.SiteTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }
Source:
private void applyTransportModeTransform ( android.os.ParcelFileDescriptor pfd , int direction , android.net.IpSecTransform transform ) throws java.io.IOException { try { mService.applyTransportModeTransform ( pfd , direction , transform.getResourceId ( ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void applyTransportModeTransform ( java.io.FileDescriptor socket , int direction , android.net.IpSecTransform transform ) throws java.io.IOException { try ( android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.dup ( socket ) ) { mService.applyTransportModeTransform ( pfd , direction , transform.getResourceId ( ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public java.util.Set < ? extends javax.lang.model.element.Element > process ( com.google.common.collect.SetMultimap < java.lang.Class < ? extends java.lang.annotation.Annotation > , javax.lang.model.element.Element > elementsByAnnotation ) { for ( javax.lang.model.element.Element element : elementsByAnnotation.get ( com.android.dialer.rootcomponentgenerator.annotation.DialerComponent.class ) ) { generateMetadataFor ( com.android.dialer.rootcomponentgenerator.annotation.DialerComponent.class , element ) ; } for ( javax.lang.model.element.Element element : elementsByAnnotation.get ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class ) ) { if ( ( element.getAnnotation ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class ) . variants ( ) . length ) == 0 ) { processingEnv.getMessager ( ) . printMessage ( javax.tools.Diagnostic.Kind.ERROR , java.lang.String.format ( "@InstallIn %s must have at least one variant" , element ) ) ; continue ; } generateMetadataFor ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class , element ) ; } return java.util.Collections.emptySet ( ) ; }

Target:
public java.util.Set < ? extends javax.lang.model.element.Element > process ( com.google.common.collect.SetMultimap < java.lang.Class < ? extends java.lang.annotation.Annotation > , javax.lang.model.element.Element > elementsByAnnotation ) { for ( javax.lang.model.element.Element element : elementsByAnnotation.get ( dagger.Subcomponent.class ) ) { generateMetadataFor ( dagger.Subcomponent.class , element ) ; } for ( javax.lang.model.element.Element element : elementsByAnnotation.get ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class ) ) { if ( ( element.getAnnotation ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class ) . variants ( ) . length ) == 0 ) { processingEnv.getMessager ( ) . printMessage ( javax.tools.Diagnostic.Kind.ERROR , java.lang.String.format ( "@InstallIn %s must have at least one variant" , element ) ) ; continue ; } generateMetadataFor ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class , element ) ; } return java.util.Collections.emptySet ( ) ; }
Source:
public boolean isValidShortNumberForRegion ( java.lang.String shortNumber , java.lang.String regionDialingFrom ) { com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc generalDesc = phoneMetadata.generalDesc ; if ( ! ( matchesPossibleNumberAndNationalNumber ( shortNumber , generalDesc ) ) ) { return false ; } com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc shortNumberDesc = phoneMetadata.shortCode ; return matchesPossibleNumberAndNationalNumber ( shortNumber , shortNumberDesc ) ; }

Target:
public boolean isValidShortNumberForRegion ( java.lang.String shortNumber , java.lang.String regionDialingFrom ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc generalDesc = phoneMetadata.getGeneralDesc ( ) ; if ( ! ( matchesPossibleNumberAndNationalNumber ( shortNumber , generalDesc ) ) ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc shortNumberDesc = phoneMetadata.getShortCode ( ) ; return matchesPossibleNumberAndNationalNumber ( shortNumber , shortNumberDesc ) ; }
Source:
protected void applyEditorTo ( com.google.gct.idea.appengine.run.AppEngineRunConfiguration configuration ) throws com.intellij.openapi.options.ConfigurationException { moduleSelector.applyTo ( configuration ) ; configuration.setWarPath ( myWarPathField.getText ( ) ) ; configuration.setSdkPath ( myAppEngineSdkField.getText ( ) ) ; configuration.setServerPort ( myServerPortField.getText ( ) ) ; configuration.setVmArgs ( myVmArgsField.getText ( ) ) ; }

Target:
protected void applyEditorTo ( com.google.gct.idea.appengine.run.AppEngineRunConfiguration configuration ) throws com.intellij.openapi.options.ConfigurationException { moduleSelector.applyTo ( configuration ) ; configuration.setSdkPath ( myAppEngineSdkField.getText ( ) ) ; configuration.setServerAddress ( myServerAddressField.getText ( ) ) ; configuration.setServerPort ( myServerPortField.getText ( ) ) ; configuration.setVmArgs ( myVmArgsField.getText ( ) ) ; configuration.setWarPath ( myWarPathField.getText ( ) ) ; }