auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static void checkTypeDefConstant ( @ 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 , boolean flag , java.lang.Object value ) { java.lang.Object allowed = annotation.getValue ( ) ; if ( allowed instanceof java.lang.Object [ ] ) { java.lang.Object [ ] allowedValues = ( ( java.lang.Object [ ] ) ( allowed ) ) ; for ( java.lang.Object o : allowedValues ) { if ( o.equals ( value ) ) { return ; } } com.android.tools.lint.checks.SupportAnnotationDetector.reportTypeDef ( context , argument , flag , allowedValues ) ; } }

Target:
private static void checkTypeDefConstant ( @ 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 , boolean flag , java.lang.Object value ) { java.lang.Object allowed = annotation.getValue ( ) ; if ( allowed instanceof java.lang.Object [ ] ) { java.lang.Object [ ] allowedValues = ( ( java.lang.Object [ ] ) ( allowed ) ) ; for ( java.lang.Object o : allowedValues ) { if ( o.equals ( value ) ) { return ; } } com.android.tools.lint.checks.SupportAnnotationDetector.reportTypeDef ( context , argument , errorNode , flag , allowedValues ) ; } }
Source:
public void testNonGeographicalRegionMetadataLoadsCorrectly ( ) { java.util.concurrent.ConcurrentHashMap < java.lang.Integer , com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata > map = new java.util.concurrent.ConcurrentHashMap < java.lang.Integer , com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata > ( ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = com.google.i18n.phonenumbers.MultiFileMetadataSourceImpl.loadMetadataFromFile ( 800 , map , "/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting" , PhoneNumberUtil.DEFAULT_METADATA_LOADER ) ; assertEquals ( metadata , map.get ( 800 ) ) ; }

Target:
public void testGeoPhoneNumberMetadataLoadCorrectly ( ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata uaeMetadata = com.google.i18n.phonenumbers.MultiFileMetadataSourceImplTest.SOURCE.getMetadataForRegion ( "AE" ) ; assertEquals ( uaeMetadata.getCountryCode ( ) , 971 ) ; assertTrue ( uaeMetadata.hasGeneralDesc ( ) ) ; }
Source:
private void logStateAndMessage ( android.os.Message message , com.android.internal.util.State state ) { messageHandlingStatus = 0 ; if ( com.android.server.wifi.WifiStateMachine.mLogMessages ) { logd ( ( ( ( " " + ( state.getClass ( ) . getSimpleName ( ) ) ) + " " ) + ( getLogRecString ( message ) ) ) ) ; } }

Target:
private void logStateAndMessage ( android.os.Message message , com.android.internal.util.State state ) { messageHandlingStatus = 0 ; if ( mVerboseLoggingEnabled ) { logd ( ( ( ( " " + ( state.getClass ( ) . getSimpleName ( ) ) ) + " " ) + ( getLogRecString ( message ) ) ) ) ; } }
Source:
public void testCallMethodWithNoCreatedFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsServiceBinder.isConnected ( android.telephony.ims.ImsServiceTest.TEST_SLOT_1 , ImsFeature.MMTEL , 0 , 0 ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature , org.mockito.Mockito.never ( ) ) . isConnected ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) ) ; }

Target:
public void testImsServiceUpSentCompat ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsService.mSpyMMTelFeature.sendSetFeatureState ( ImsFeature.STATE_READY ) ; org.mockito.ArgumentCaptor < android.content.Intent > intentCaptor = org.mockito.ArgumentCaptor.forClass ( android.content.Intent.class ) ; org.mockito.Mockito.verify ( mMockContext ) . sendBroadcast ( intentCaptor.capture ( ) ) ; try { junit.framework.Assert.assertNotNull ( intentCaptor.getValue ( ) ) ; verifyServiceUpSent ( intentCaptor.getValue ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { junit.framework.Assert.fail ( "Did not receive all intents" ) ; } }
Source:
private javax.xml.validation.Validator getValidator ( int version , com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler ) throws org.xml.sax.SAXException { java.io.InputStream xsdStream = com.android.sdklib.repository.SdkRepoConstants.getXsdStream ( version ) ; javax.xml.validation.SchemaFactory factory = javax.xml.validation.SchemaFactory.newInstance ( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ) ; javax.xml.validation.Schema schema = factory.newSchema ( new javax.xml.transform.stream.StreamSource ( xsdStream ) ) ; javax.xml.validation.Validator validator = schema.newValidator ( ) ; if ( handler != null ) { validator.setErrorHandler ( handler ) ; } return validator ; }

Target:
private javax.xml.validation.Validator getRepoValidator ( int version , com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler ) throws org.xml.sax.SAXException { java.io.InputStream xsdStream = com.android.sdklib.repository.SdkRepoConstants.getXsdStream ( version ) ; javax.xml.validation.SchemaFactory factory = javax.xml.validation.SchemaFactory.newInstance ( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ) ; javax.xml.validation.Schema schema = factory.newSchema ( new javax.xml.transform.stream.StreamSource ( xsdStream ) ) ; javax.xml.validation.Validator validator = schema.newValidator ( ) ; if ( handler != null ) { validator.setErrorHandler ( handler ) ; } return validator ; }
Source:
private static com.android.sdklib.devices.ButtonType getButtonType ( @ com.android.annotations.NonNull com.android.ide.eclipse.adt.internal.editors.layout.configuration.Configuration configuration ) { com.android.sdklib.devices.Device device = configuration.getDevice ( ) ; if ( device != null ) { com.android.sdklib.devices.Hardware hardware = device.getDefaultHardware ( ) ; if ( hardware != null ) { return hardware.getButtonType ( ) ; } } return com.android.sdklib.devices.ButtonType.SOFT ; }

Target:
public static com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService create ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart editor , com.android.ide.eclipse.adt.internal.editors.layout.configuration.Configuration configuration , com.android.ide.common.resources.ResourceResolver resolver ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService renderService = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService ( editor , configuration , resolver ) ; return renderService ; }
Source:
public void testSubjectAltNameWithIpAddress ( ) { assertTrue ( verifyWithServerCertificate ( "1.2.3.4" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "1.2.3.4" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "1.2.3.5" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "1.2.3.4" ) ) ) ; assertTrue ( verifyWithServerCertificate ( "192.168.100.1" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "1.2.3.4" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "192.168.100.1" ) ) ) ; }

Target:
public void testSubjectAltNameWithIpAddress ( ) { assertTrue ( verifyWithServerCertificate ( "1.2.3.4" , libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate.ipa ( "1.2.3.4" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "1.2.3.5" , libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate.ipa ( "1.2.3.4" ) ) ) ; assertTrue ( verifyWithServerCertificate ( "192.168.100.1" , libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate.ipa ( "1.2.3.4" , "192.168.100.1" ) ) ) ; }
Source:
public void test_parkUntil_3 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 1 ) ; 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 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; parkerThread.join ( ) ; }

Target:
public void test_parkUntil_3 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 1 ) ; org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; parkerThread.join ( ) ; }
Source:
public void testEmptyRootXml ( ) throws java.lang.Exception { java.lang.String document = ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }

Target:
public void testValidateLocalAddonFile1 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/addon_sample_1.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getAddonValidator ( 1 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; getFragmentManager ( ) . beginTransaction ( ) . replace ( android.R.id.content , new com.android.bips.ui.ManualPrintersFragment ( ) ) . commit ( ) ; android.app.ActionBar actionBar = getActionBar ( ) ; if ( actionBar != null ) { actionBar.setDisplayHomeAsUpEnabled ( true ) ; } }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; getFragmentManager ( ) . beginTransaction ( ) . replace ( android.R.id.content , new com.android.bips.ui.AddPrintersFragment ( ) ) . commit ( ) ; android.app.ActionBar actionBar = getActionBar ( ) ; if ( actionBar != null ) { actionBar.setDisplayHomeAsUpEnabled ( true ) ; } }
Source:
private static com.android.dialer.historyitemactions.HistoryItemActionModule createModuleForAccessingCallDetails ( android.content.Context context , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.numberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.numberAttributes ( ) . getLookupUri ( ) ) ) ; return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createCallDetailsHeaderInfoFromRow ( context , row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ; }

Target:
private static com.android.dialer.historyitemactions.HistoryItemActionModule createModuleForAccessingCallDetails ( android.content.Context context , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.getNumberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.getNumberAttributes ( ) . getLookupUri ( ) ) ) ; return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.getCoalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createCallDetailsHeaderInfoFromRow ( context , row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ; }
Source:
public void test_getPrivateExponent ( ) throws java.lang.Exception { for ( java.security.Provider p : java.security.Security.getProviders ( "KeyFactory.RSA" ) ) { java.security.interfaces.RSAPrivateKey key = tests.security.interfaces.RSAPrivateKeyTest.getNonCRTKey ( p ) ; assertEquals ( "invalid private exponent" , tests.security.interfaces.RSAPrivateKeyTest.SIMPLE_D , key.getPrivateExponent ( ) ) ; } }

Target:
public void test_getPrivateExponent ( ) throws java.lang.Exception { java.security.KeyFactory gen = java.security.KeyFactory.getInstance ( "RSA" ) ; final java.math.BigInteger n = java.math.BigInteger.valueOf ( 3233 ) ; final java.math.BigInteger d = java.math.BigInteger.valueOf ( 2753 ) ; java.security.interfaces.RSAPrivateKey key = ( ( java.security.interfaces.RSAPrivateKey ) ( gen.generatePrivate ( new java.security.spec.RSAPrivateKeySpec ( n , d ) ) ) ) ; assertEquals ( "invalid private exponent" , d , key.getPrivateExponent ( ) ) ; }
Source:
public void sendDtmf ( char c , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_DTMF , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( java.lang.Character.toString ( c ) ) ; send ( rr ) ; }

Target:
public void getCdmaBroadcastConfig ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getCdmaBroadcastConfig ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getCdmaBroadcastConfig" , e ) ; } } }
Source:
public com.android.jack.library.OutputJackLibrary getOutputJackLibrary ( ) { if ( ( incrementalInputLibrary ) == null ) { return getOutputJackLibraryFromVfs ( ) ; } return com.android.jack.library.JackLibraryFactory.getOutputLibrary ( com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_DIR ) , com.android.jack.Jack.getEmitterId ( ) , com.android.jack.Jack.getVersionString ( ) ) ; }

Target:
public com.android.jack.library.OutputJackLibrary getOutputJackLibrary ( ) { if ( ( incrementalInputLibrary ) == null ) { return getOutputJackLibraryFromVfs ( ) ; } return com.android.jack.library.JackLibraryFactory.getOutputLibrary ( com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_DIR ) , com.android.jack.Jack.getEmitterId ( ) , com.android.jack.Jack.getVersion ( ) . getVerboseVersion ( ) ) ; }
Source:
public synchronized com.android.ide.common.layoutlib.LayoutLibrary getLayoutLibrary ( ) { if ( ( ( mLayoutBridgeInit ) == false ) && ( ( mLayoutLibrary.getStatus ( ) ) == ( com.android.ide.common.sdk.LoadStatus.LOADED ) ) ) { mLayoutLibrary.init ( mTarget.getPath ( IAndroidTarget.FONTS ) , getEnumValueMap ( ) ) ; mLayoutBridgeInit = true ; } return mLayoutLibrary ; }

Target:
public synchronized com.android.ide.common.rendering.LayoutLibrary getLayoutLibrary ( ) { if ( ( ( mLayoutBridgeInit ) == false ) && ( ( mLayoutLibrary.getStatus ( ) ) == ( com.android.ide.common.sdk.LoadStatus.LOADED ) ) ) { mLayoutLibrary.init ( new java.io.File ( mTarget.getPath ( IAndroidTarget.FONTS ) ) , getEnumValueMap ( ) ) ; mLayoutBridgeInit = true ; } return mLayoutLibrary ; }
Source:
private void loadPreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; mActivityToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APPNAME , "" ) ; mTraceFilePath = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , "" ) ; }

Target:
private void loadPreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; mActivityToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APPNAME , "" ) ; mTraceFilePath = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , "" ) ; mLastUsedDevice = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , "" ) ; }
Source:
public void testNewInstance ( ) throws java.lang.Exception { java.security.Provider p = new org.apache.harmony.security.tests.java.security.ProviderServiceTest.MyProvider ( ) ; java.security.Provider.Service s = new java.security.Provider.Service ( p , "SecureRandom" , "algorithm" , "org.apache.harmony.security.tests.support.RandomImpl" , null , null ) ; java.lang.Object o = s.newInstance ( null ) ; assertTrue ( "incorrect instance" , ( o instanceof org.apache.harmony.security.tests.support.RandomImpl ) ) ; }

Target:
public void testNewInstance ( ) throws java.lang.Exception { java.lang.String type = "SecureRandom" ; java.lang.String algorithm = "algorithm" ; org.apache.harmony.security.tests.java.security.ProviderServiceTest.MyProvider p = new org.apache.harmony.security.tests.java.security.ProviderServiceTest.MyProvider ( ) ; java.security.Provider.Service s = new java.security.Provider.Service ( p , type , algorithm , "org.apache.harmony.security.tests.support.RandomImpl" , null , null ) ; p.putService ( s ) ; java.lang.Object o = s.newInstance ( null ) ; assertTrue ( ( "new service instance is of incorrect class " + ( o.getClass ( ) . getName ( ) ) ) , ( o instanceof org.apache.harmony.security.tests.support.RandomImpl ) ) ; }
Source:
public void testInstall_missingTzDataFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneDistro installedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( installedDistro.getBytes ( ) ) ) ; assertDistroInstalled ( installedDistro ) ; libcore.tzdata.update2.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . clearTzDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertDistroInstalled ( installedDistro ) ; }

Target:
public void testInstall_missingTzDataFile ( ) throws java.lang.Exception { libcore.tzdata.shared2.TimeZoneDistro installedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( installedDistro.getBytes ( ) ) ) ; assertDistroInstalled ( installedDistro ) ; libcore.tzdata.shared2.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . clearTzDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertDistroInstalled ( installedDistro ) ; }
Source:
public void applySettings ( ) { java.util.Properties props = java.lang.System.getProperties ( ) ; props.setProperty ( ISettingsPage.KEY_HTTP_PROXY_HOST , mProperties.getProperty ( ISettingsPage.KEY_HTTP_PROXY_HOST , "" ) ) ; props.setProperty ( ISettingsPage.KEY_HTTP_PROXY_PORT , mProperties.getProperty ( ISettingsPage.KEY_HTTP_PROXY_PORT , "" ) ) ; }

Target:
public void applySettings ( ) { java.util.Properties props = java.lang.System.getProperties ( ) ; java.lang.String proxyHost = mProperties.getProperty ( ISettingsPage.KEY_HTTP_PROXY_HOST , "" ) ; java.lang.String proxyPort = mProperties.getProperty ( ISettingsPage.KEY_HTTP_PROXY_PORT , "" ) ; props.setProperty ( ISettingsPage.KEY_HTTP_PROXY_HOST , proxyHost ) ; props.setProperty ( ISettingsPage.KEY_HTTP_PROXY_PORT , proxyPort ) ; props.setProperty ( "https.proxyHost" , proxyHost ) ; props.setProperty ( "https.proxyPort" , proxyPort ) ; }
Source:
public void run ( ) { java.util.ArrayList < java.lang.String > pastEntries = mDatabase.getFormData ( mUrl , mName ) ; if ( ( pastEntries.size ( ) ) > 0 ) { android.widget.ArrayAdapter < java.lang.String > adapter = new android.widget.ArrayAdapter < java.lang.String > ( mContext , com.android.internal.R.layout.search_dropdown_item_1line , pastEntries ) ; ( ( java.util.HashMap ) ( mUpdateMessage.obj ) ) . put ( "adapter" , adapter ) ; mUpdateMessage.sendToTarget ( ) ; } }

Target:
public void run ( ) { java.util.ArrayList < java.lang.String > pastEntries = mDatabase.getFormData ( mUrl , mName ) ; if ( ( pastEntries.size ( ) ) > 0 ) { android.webkit.TextDialog.AutoCompleteAdapter adapter = new android.webkit.TextDialog.AutoCompleteAdapter ( mContext , pastEntries ) ; ( ( java.util.HashMap ) ( mUpdateMessage.obj ) ) . put ( "adapter" , adapter ) ; mUpdateMessage.sendToTarget ( ) ; } }
Source:
public boolean setP2pPowerSave ( java.lang.String iface , boolean enabled ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.setPowerSave ( iface , enabled ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( enabled ) { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 1" ) ) ; } else { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 0" ) ) ; } } } }

Target:
public boolean requestIcon ( java.lang.String bssid , java.lang.String fileName ) { if ( ( bssid == null ) || ( fileName == null ) ) { android.util.Log.e ( mTAG , "Invalid arguments for Icon request." ) ; return false ; } return mSupplicantStaIfaceHal.initiateHs20IconQuery ( bssid , fileName ) ; }
Source:
private void upgradeDatabaseToVersion65 ( android.database.sqlite.SQLiteDatabase db ) { db.execSQL ( ( ( "ALTER TABLE " + ( SmsProvider.TABLE_RAW ) ) + " ADD COLUMN message_body TEXT" ) ) ; }

Target:
private void upgradeDatabaseToVersion65 ( android.database.sqlite.SQLiteDatabase db ) { try { db.execSQL ( ( ( "ALTER TABLE " + ( SmsProvider.TABLE_RAW ) ) + " ADD COLUMN message_body TEXT" ) ) ; } catch ( android.database.sqlite.SQLiteException e ) { android.util.Log.w ( com.android.providers.telephony.MmsSmsDatabaseHelper.TAG , ( ( "[upgradeDatabaseToVersion65] Exception adding column message_body; " + "trying createThreadIdDateIndex() instead: " ) + e ) ) ; createThreadIdDateIndex ( db ) ; } }
Source:
public void test_getByName_cloning ( ) throws java.lang.Exception { java.net.InetAddress [ ] addresses = java.net.InetAddress.getAllByName ( null ) ; java.net.InetAddress [ ] addresses2 = java.net.InetAddress.getAllByName ( null ) ; assertNotNull ( addresses [ 0 ] ) ; assertNotNull ( addresses [ 1 ] ) ; assertNotSame ( addresses , addresses2 ) ; addresses [ 0 ] = null ; addresses2 = java.net.InetAddress.getAllByName ( null ) ; assertNotNull ( addresses2 [ 0 ] ) ; assertNotNull ( addresses2 [ 1 ] ) ; }

Target:
public void test_getByName_cloning ( ) throws java.lang.Exception { java.net.InetAddress [ ] addresses = java.net.InetAddress.getAllByName ( null ) ; java.net.InetAddress [ ] addresses2 = java.net.InetAddress.getAllByName ( null ) ; org.junit.Assert.assertNotNull ( addresses [ 0 ] ) ; org.junit.Assert.assertNotNull ( addresses [ 1 ] ) ; org.junit.Assert.assertNotSame ( addresses , addresses2 ) ; addresses [ 0 ] = null ; addresses2 = java.net.InetAddress.getAllByName ( null ) ; org.junit.Assert.assertNotNull ( addresses2 [ 0 ] ) ; org.junit.Assert.assertNotNull ( addresses2 [ 1 ] ) ; }
Source:
< P_IN > java.util.Spliterator < java.lang.Double > opEvaluateParallelLazy ( java.util.stream.PipelineHelper < java.lang.Double > helper , java.util.Spliterator < P_IN > spliterator ) { return op.opEvaluateParallelLazy ( helper , spliterator ) ; }

Target:
public < P_IN > java.util.stream.Node < java.lang.Double > opEvaluateParallel ( java.util.stream.PipelineHelper < java.lang.Double > helper , java.util.Spliterator < P_IN > spliterator , java.util.function.IntFunction < java.lang.Double [ ] > generator ) { return ( ( java.util.stream.Node < java.lang.Double > ) ( op.opEvaluateParallel ( helper , spliterator , generator ) ) ) ; }
Source:
public static com.intellij.history.core.tree.Entry readEntry ( java.io.DataInput in ) throws java.io.IOException { int type = com.intellij.util.io.DataInputOutputUtil.readINT ( in ) ; switch ( type ) { case 0 : return new com.intellij.history.core.tree.FileEntry ( in , true ) ; case 1 : return new com.intellij.history.core.tree.DirectoryEntry ( in , true ) ; } throw new java.io.IOException ( ( "unexpected entry type: " + type ) ) ; }

Target:
public static com.intellij.history.core.tree.Entry readEntry ( java.io.DataInput in ) throws java.io.IOException { int type = in.readInt ( ) ; switch ( type ) { case 0 : return new com.intellij.history.core.tree.FileEntry ( in , true ) ; case 1 : return new com.intellij.history.core.tree.DirectoryEntry ( in , true ) ; } throw new java.io.IOException ( ( "unexpected entry type: " + type ) ) ; }
Source:
private void startAndroidTask ( com.android.ide.eclipse.adt.internal.sdk.ProjectState projectState ) { int buildApi = projectState.getTarget ( ) . getVersion ( ) . getApiLevel ( ) ; buildfile.append ( "android {\n" ) ; buildfile.append ( ( ( " compileSdkVersion " + buildApi ) + "\n" ) ) ; buildfile.append ( ( ( " buildToolsVersion \"" + buildApi ) + "\"\n" ) ) ; buildfile.append ( "\n" ) ; }

Target:
private void startAndroidTask ( com.android.ide.eclipse.adt.internal.sdk.ProjectState projectState ) { int buildApi = projectState.getTarget ( ) . getVersion ( ) . getApiLevel ( ) ; java.lang.String toolsVersion = projectState.getTarget ( ) . getBuildToolInfo ( ) . getRevision ( ) . toString ( ) ; buildfile.append ( "android {\n" ) ; buildfile.append ( ( ( " compileSdkVersion " + buildApi ) + "\n" ) ) ; buildfile.append ( ( ( " buildToolsVersion \"" + toolsVersion ) + "\"\n" ) ) ; buildfile.append ( "\n" ) ; }
Source:
public void exit ( ) { stopDhcpAction ( ) ; if ( ( mIpReachabilityMonitor ) != null ) { mIpReachabilityMonitor.stop ( ) ; mIpReachabilityMonitor = null ; } if ( ( mDhcpClient ) != null ) { mDhcpClient.sendMessage ( DhcpClient.CMD_STOP_DHCP ) ; mDhcpClient.doQuit ( ) ; } if ( ( mApfFilter ) != null ) { mApfFilter.shutdown ( ) ; mApfFilter = null ; } resetLinkProperties ( ) ; }

Target:
public void exit ( ) { stopDhcpAction ( ) ; if ( ( mIpReachabilityMonitor ) != null ) { mIpReachabilityMonitor.stop ( ) ; mIpReachabilityMonitor = null ; } if ( ( mDhcpClient ) != null ) { mDhcpClient.sendMessage ( DhcpClient.CMD_STOP_DHCP ) ; mDhcpClient.doQuit ( ) ; } if ( ( mPacketTracker ) != null ) { mPacketTracker.stop ( ) ; mPacketTracker = null ; } if ( ( mApfFilter ) != null ) { mApfFilter.shutdown ( ) ; mApfFilter = null ; } resetLinkProperties ( ) ; }
Source:
public void update ( org.jetbrains.plugins.github.AnActionEvent e ) { final com.intellij.openapi.project.Project project = e.getData ( PlatformDataKeys.PROJECT ) ; if ( ( project == null ) || ( project.isDefault ( ) ) ) { org.jetbrains.plugins.github.GithubUtil.setVisibleEnabled ( e , false , false ) ; return ; } org.jetbrains.plugins.github.GithubUtil.setVisibleEnabled ( e , true , true ) ; }

Target:
public void update ( org.jetbrains.plugins.github.AnActionEvent e ) { final com.intellij.openapi.project.Project project = e.getData ( PlatformDataKeys.PROJECT ) ; if ( ( project == null ) || ( project.isDefault ( ) ) ) { org.jetbrains.plugins.github.util.GithubUtil.setVisibleEnabled ( e , false , false ) ; return ; } org.jetbrains.plugins.github.util.GithubUtil.setVisibleEnabled ( e , true , true ) ; }
Source:
public void testValidateLocalRepositoryFile2 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/repository_sample_2.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( 2 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }

Target:
public void testValidateLocalRepositoryFile1 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/repository_sample_1.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getRepoValidator ( 1 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }
Source:
public void test_lastElement ( ) { assertEquals ( "Incorrect last element returned" , "Test 99" , tVector.lastElement ( ) ) ; tVector.addElement ( null ) ; assertNull ( "Incorrect last element returned--wanted null" , tVector.lastElement ( ) ) ; tVector = new java.util.Vector ( 10 ) ; try { tVector.lastElement ( ) ; fail ( "NoSuchElementException expected" ) ; } catch ( java.util.NoSuchElementException e ) { } }

Target:
public void test_lastElement ( ) { assertEquals ( "Incorrect last element returned" , "Test 99" , tVector.lastElement ( ) ) ; tVector.addElement ( null ) ; assertNull ( "Incorrect last element returned--wanted null" , tVector.lastElement ( ) ) ; java.util.Vector vector = new java.util.Vector ( ) ; try { vector.lastElement ( ) ; fail ( "Should throw NoSuchElementException" ) ; } catch ( java.util.NoSuchElementException e ) { } }
Source:
public void clearView ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearView ( ) ; } } ) ; return ; } mAwContents.clearView ( ) ; }

Target:
public android.graphics.Picture capturePicture ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.graphics.Picture ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.graphics.Picture > ( ) { @ java.lang.Override public android.graphics.Picture call ( ) { return capturePicture ( ) ; } } ) ; return ret ; } return mAwContents.capturePicture ( ) ; }
Source:
public boolean hasChanged ( int filters ) { int minf = java.lang.Integer.lowestOneBit ( filters ) ; for ( int filter = minf ; ( filters != 0 ) && ( filter <= ( com.android.sdklib.repository.local.LocalSdk.PKG_ALL ) ) ; filter <<= 1 ) { if ( ( filters & filter ) == 0 ) { continue ; } filters ^= filter ; for ( com.android.sdklib.repository.local.LocalSdk.DirInfo dirInfo : mVisitedDirs.get ( filter ) ) { if ( dirInfo.hasChanged ( ) ) { return true ; } } } return false ; }

Target:
public boolean hasChanged ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.sdklib.repository.descriptors.PkgType > filters ) { for ( com.android.sdklib.repository.descriptors.PkgType filter : filters ) { for ( com.android.sdklib.repository.local.LocalSdk.DirInfo dirInfo : mVisitedDirs.get ( filter ) ) { if ( dirInfo.hasChanged ( ) ) { return true ; } } } return false ; }
Source:
public byte [ ] getFwMemoryDump ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( com.android.server.wifi.WifiNative.getFwMemoryDumpNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ) { byte [ ] fwMemoryDump = com.android.server.wifi.WifiNative.mFwMemoryDump ; com.android.server.wifi.WifiNative.mFwMemoryDump = null ; return fwMemoryDump ; } else { return null ; } } return null ; } }

Target:
public byte [ ] getFwMemoryDump ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getFwMemoryDump ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( com.android.server.wifi.WifiNative.getFwMemoryDumpNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ) { byte [ ] fwMemoryDump = com.android.server.wifi.WifiNative.mFwMemoryDump ; com.android.server.wifi.WifiNative.mFwMemoryDump = null ; return fwMemoryDump ; } else { return null ; } } return null ; } } }
Source:
public int getMaxTransceiveLength ( int technology ) { switch ( technology ) { case android.nfc.tech.TagTechnology.NFC_A : case android.nfc.tech.TagTechnology.MIFARE_CLASSIC : case android.nfc.tech.TagTechnology.MIFARE_ULTRALIGHT : return 253 ; case android.nfc.tech.TagTechnology.NFC_B : return 253 ; case android.nfc.tech.TagTechnology.NFC_V : return 253 ; case android.nfc.tech.TagTechnology.ISO_DEP : return 261 ; case android.nfc.tech.TagTechnology.NFC_F : return 252 ; default : return 0 ; } }

Target:
public int getMaxTransceiveLength ( int technology ) { switch ( technology ) { case android.nfc.tech.TagTechnology.NFC_A : case android.nfc.tech.TagTechnology.MIFARE_CLASSIC : case android.nfc.tech.TagTechnology.MIFARE_ULTRALIGHT : return 253 ; case android.nfc.tech.TagTechnology.NFC_B : return 253 ; case android.nfc.tech.TagTechnology.NFC_V : return 253 ; case android.nfc.tech.TagTechnology.ISO_DEP : return mIsoDepMaxTransceiveLength ; case android.nfc.tech.TagTechnology.NFC_F : return 252 ; default : return 0 ; } }
Source:
public void respondToRttRequest ( int id , boolean accept ) { try { android.telecom.Log.startSession ( "ICA.rTRR" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }

Target:
public void stopRtt ( java.lang.String callId ) { try { android.telecom.Log.startSession ( "ICA.sRTT" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.stopRtt ( ) ; } else { android.telecom.Log.w ( this , "stopRtt(): call %s not found" , callId ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc ) { super . visitMethodInsn ( opcode , owner , name , desc ) ; if ( ( ( owner.equals ( "android/content/res/Resources" ) ) && ( name.equals ( "getIdentifier" ) ) ) && ( desc.equals ( "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I" ) ) ) { mFoundGetIdentifier = true ; } }

Target:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc ) { super . visitMethodInsn ( opcode , owner , name , desc ) ; if ( ( ( owner.equals ( "android/content/res/Resources" ) ) && ( name.equals ( "getIdentifier" ) ) ) && ( desc.equals ( "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I" ) ) ) { mFoundGetIdentifier = true ; } if ( ( owner.equals ( "android/webkit/WebView" ) ) && ( name.startsWith ( "load" ) ) ) { mFoundWebContent = true ; } }
Source:
void requestPairConfirmation ( ) { android.content.Intent dialogIntent = new android.content.Intent ( mContext , com.android.nfc.handover.ConfirmConnectActivity.class ) ; dialogIntent.setFlags ( ( ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK ) ) ) ; dialogIntent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mDevice ) ; mContext.startActivity ( dialogIntent ) ; }

Target:
void requestPairConfirmation ( ) { android.content.Intent dialogIntent = new android.content.Intent ( mContext , com.android.nfc.handover.ConfirmConnectActivity.class ) ; dialogIntent.setFlags ( ( ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK ) ) ) ; dialogIntent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mDevice ) ; dialogIntent.putExtra ( BluetoothDevice.EXTRA_NAME , mName ) ; mContext.startActivity ( dialogIntent ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , short [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 2 ) , Element.DataType.SIGNED_16 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , short [ ] data ) { validateIsInt16 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_16 , data.length ) ; }
Source:
public static void setup ( com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor monitor ) { monitor.addProjectListener ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.sThis.mProjectListener ) ; int mask = ( ( org.eclipse.core.resources.IResourceDelta.ADDED ) | ( org.eclipse.core.resources.IResourceDelta.REMOVED ) ) | ( org.eclipse.core.resources.IResourceDelta.CHANGED ) ; monitor.addFolderListener ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.sThis.mFolderListener , mask ) ; monitor.addFileListener ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.sThis.mFileListener , mask ) ; com.android.ide.eclipse.adt.internal.resources.manager.CompiledResourcesMonitor.setupMonitor ( monitor ) ; }

Target:
public static void setup ( com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor monitor ) { monitor.addResourceEventListener ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.sThis.mResourceEventListener ) ; monitor.addProjectListener ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.sThis.mProjectListener ) ; int mask = ( ( org.eclipse.core.resources.IResourceDelta.ADDED ) | ( org.eclipse.core.resources.IResourceDelta.REMOVED ) ) | ( org.eclipse.core.resources.IResourceDelta.CHANGED ) ; monitor.addFolderListener ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.sThis.mFolderListener , mask ) ; monitor.addFileListener ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.sThis.mFileListener , mask ) ; com.android.ide.eclipse.adt.internal.resources.manager.CompiledResourcesMonitor.setupMonitor ( monitor ) ; }
Source:
public com.google.devtools.build.android.UnvalidatedAndroidDirectories convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { try { return com.google.devtools.build.android.UnvalidatedAndroidDirectories.valueOf ( input ) ; } catch ( java.lang.IllegalArgumentException e ) { throw new com.google.devtools.common.options.OptionsParsingException ( java.lang.String.format ( "invalid UnvalidatedAndroidDirectories: %s" , e.getMessage ( ) ) , e ) ; } }

Target:
public java.nio.file.Path convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { try { java.nio.file.Path path = java.nio.file.FileSystems.getDefault ( ) . getPath ( input ) ; if ( ( mustExist ) && ( ! ( java.nio.file.Files.exists ( path ) ) ) ) { throw new com.google.devtools.common.options.OptionsParsingException ( java.lang.String.format ( "%s is not a valid path: it does not exist." , input ) ) ; } return path ; } catch ( java.nio.file.InvalidPathException e ) { throw new com.google.devtools.common.options.OptionsParsingException ( java.lang.String.format ( "%s is not a valid path: %s." , input , e.getMessage ( ) ) , e ) ; } }
Source:
public void setTTYMode ( int ttyMode , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_SET_TTY_MODE , response ) ; rr.mp.writeInt ( 1 ) ; rr.mp.writeInt ( ttyMode ) ; send ( rr ) ; }

Target:
public void setTTYMode ( int ttyMode , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_SET_TTY_MODE , response ) ; rr.mp.writeInt ( 1 ) ; rr.mp.writeInt ( ttyMode ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + ttyMode ) ) ; send ( rr ) ; }
Source:
private java.lang.String doLoad ( java.lang.String name , java.lang.ClassLoader loader ) { java.lang.String ldLibraryPath = null ; java.lang.String dexPath = null ; if ( ( loader != null ) && ( loader instanceof dalvik.system.BaseDexClassLoader ) ) { dalvik.system.BaseDexClassLoader dexClassLoader = ( ( dalvik.system.BaseDexClassLoader ) ( loader ) ) ; ldLibraryPath = dexClassLoader.getLdLibraryPath ( ) ; dexPath = dexClassLoader.getDexPath ( ) ; } synchronized ( this ) { return java.lang.Runtime.nativeLoad ( name , loader , ldLibraryPath , dexPath ) ; } }

Target:
private java.lang.String doLoad ( java.lang.String name , java.lang.ClassLoader loader ) { java.lang.String ldLibraryPath = null ; java.lang.String dexPath = null ; if ( loader == null ) { ldLibraryPath = java.lang.System.getProperty ( "java.library.path" ) ; } else if ( loader instanceof dalvik.system.BaseDexClassLoader ) { dalvik.system.BaseDexClassLoader dexClassLoader = ( ( dalvik.system.BaseDexClassLoader ) ( loader ) ) ; ldLibraryPath = dexClassLoader.getLdLibraryPath ( ) ; dexPath = dexClassLoader.getDexPath ( ) ; } synchronized ( this ) { return java.lang.Runtime.nativeLoad ( name , loader , ldLibraryPath , dexPath ) ; } }
Source:
private void readVtsTradeFedVendorConfig ( ) throws java.lang.RuntimeException { com.android.tradefed.util.VtsVendorConfigFileUtil configReader = new com.android.tradefed.util.VtsVendorConfigFileUtil ( ) ; if ( configReader.LoadVendorConfig ( null ) ) { try { java.lang.String tracePath = configReader.GetVendorConfigVariable ( com.android.compatibility.common.tradefed.targetprep.HidlProfilerPreparer.HOST_PROFILING_TRACE_PATH_KEY ) ; if ( ( tracePath.length ( ) ) > 0 ) { mHostProfilingTracePath = tracePath ; } } catch ( java.util.NoSuchElementException e ) { } } }

Target:
private void readVtsTradeFedVendorConfig ( ) throws java.lang.RuntimeException { com.android.tradefed.util.VtsVendorConfigFileUtil configReader = new com.android.tradefed.util.VtsVendorConfigFileUtil ( ) ; if ( configReader.LoadVendorConfig ( mBuildInfo ) ) { try { java.lang.String tracePath = configReader.GetVendorConfigVariable ( com.android.compatibility.common.tradefed.targetprep.HidlProfilerPreparer.HOST_PROFILING_TRACE_PATH_KEY ) ; if ( ( tracePath.length ( ) ) > 0 ) { mHostProfilingTracePath = tracePath ; } } catch ( java.util.NoSuchElementException e ) { } } }
Source:
private boolean isEvdo ( ) { return ( ( mServiceState ) != null ) && ( ( ( mServiceState.getRadioTechnology ( ) ) == ( android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_0 ) ) || ( ( mServiceState.getRadioTechnology ( ) ) == ( android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_A ) ) ) ; }

Target:
private boolean isEvdo ( ) { return ( ( mServiceState ) != null ) && ( ( ( ( mServiceState.getRadioTechnology ( ) ) == ( android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_0 ) ) || ( ( mServiceState.getRadioTechnology ( ) ) == ( android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_A ) ) ) || ( ( mServiceState.getRadioTechnology ( ) ) == ( android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_B ) ) ) ; }
Source:
public void enter ( ) { super . enter ( ) ; mConnectingTimestampMs = java.lang.Long.MIN_VALUE ; mPhonebook.resetAtState ( ) ; updateAgIndicatorEnableState ( null ) ; mVoiceRecognitionStarted = false ; mWaitingForVoiceRecognition = false ; mAudioParams.clear ( ) ; broadcastStateTransitions ( ) ; if ( ( ( mPrevState ) != null ) && ( ( mAdapterService.getBondState ( mDevice ) ) == ( android.bluetooth.BluetoothDevice.BOND_NONE ) ) ) { getHandler ( ) . post ( ( ) -> com.android.bluetooth.hfp.mHeadsetService.removeStateMachine ( com.android.bluetooth.hfp.mDevice ) ) ; } }

Target:
public void enter ( ) { super . enter ( ) ; mConnectingTimestampMs = java.lang.Long.MIN_VALUE ; mPhonebook.resetAtState ( ) ; updateAgIndicatorEnableState ( null ) ; mVoiceRecognitionStarted = false ; mWaitingForVoiceRecognition = false ; mNeedDialingOutReply = false ; mAudioParams.clear ( ) ; broadcastStateTransitions ( ) ; if ( ( ( mPrevState ) != null ) && ( ( mAdapterService.getBondState ( mDevice ) ) == ( android.bluetooth.BluetoothDevice.BOND_NONE ) ) ) { getHandler ( ) . post ( ( ) -> com.android.bluetooth.hfp.mHeadsetService.removeStateMachine ( com.android.bluetooth.hfp.mDevice ) ) ; } }
Source:
public void testNotifyResponseSubscribeCancel ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiAwareNative.AWARE_STATUS_DE_FAILURE ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiAwareNative.AWARE_RESPONSE_SUBSCRIBE_CANCEL ) ; com.android.server.wifi.aware.WifiAwareHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testNotifyResponseSubscribeCancel ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; args.putInt ( "response_type" , WifiAwareNative.AWARE_RESPONSE_SUBSCRIBE_CANCEL ) ; com.android.server.wifi.aware.WifiAwareHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public boolean isDefect ( ) { return false ; }

Target:
public boolean isDefect ( ) { if ( myDefectFound ) { return true ; } final java.util.List < ? extends com.google.gct.testing.results.GoogleCloudTestProxy > children = myTestProxy.getChildren ( ) ; for ( com.google.gct.testing.results.GoogleCloudTestProxy child : children ) { if ( child.isDefect ( ) ) { myDefectFound = true ; return true ; } } return false ; }