auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.Class < ? > c = java.lang.Class.forName ( "NullArray" ) ; java.lang.reflect.Method m = c.getMethod ( "method" ) ; java.lang.Object [ ] arguments = new java.lang.Object [ ] { } ; try { m.invoke ( null , arguments ) ; throw new java.lang.Error ( "Expected an InvocationTargetException" ) ; } catch ( java.lang.reflect.InvocationTargetException e ) { if ( ! ( ( e.getCause ( ) ) instanceof java.lang.NullPointerException ) ) { throw new java.lang.Error ( "Expected a NullPointerException" ) ; } } }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { Main.checkLoad ( "NullArrayFailInt2Object" , true ) ; Main.checkLoad ( "NullArrayFailObject2Int" , true ) ; Main.checkLoad ( "NullArraySuccessInt" , false ) ; Main.checkLoad ( "NullArraySuccessInt2Float" , false ) ; Main.checkLoad ( "NullArraySuccessShort" , false ) ; Main.checkLoad ( "NullArraySuccessRef" , false ) ; }
Source:
public java.util.Set < vogar.tasks.Task > installActionTasks ( vogar.Action action , java.io.File jar ) { java.io.File localDexFile = run.localDexFile ( action.getName ( ) ) ; vogar.tasks.Task createDexJarTask = createCreateDexJarTask ( vogar.Classpath.of ( jar ) , jar , action.getName ( ) , action , localDexFile ) ; return java.util.Collections.singleton ( createDexJarTask ) ; }

Target:
public java.util.Set < vogar.tasks.Task > installActionTasks ( vogar.Action action , java.io.File jar ) { java.io.File localDexFile = run.localDexFile ( action.getName ( ) ) ; java.io.File localTempDir = run.localDir ( action.getName ( ) ) ; vogar.tasks.Task createDexJarTask = createCreateDexJarTask ( vogar.Classpath.of ( jar ) , jar , action.getName ( ) , action , localDexFile , localTempDir ) ; return java.util.Collections.singleton ( createDexJarTask ) ; }
Source:
private com.android.internal.telephony.Phone getPhoneForAccount ( android.telecom.PhoneAccountHandle accountHandle , boolean isEmergency ) { if ( isEmergency ) { return com.android.internal.telephony.PhoneFactory.getDefaultPhone ( ) ; } int subId = com.android.phone.PhoneUtils.getSubIdForPhoneAccountHandle ( accountHandle ) ; if ( subId != ( android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID ) ) { int phoneId = com.android.internal.telephony.SubscriptionController.getInstance ( ) . getPhoneId ( subId ) ; return com.android.internal.telephony.PhoneFactory.getPhone ( phoneId ) ; } return null ; }

Target:
private android.telecom.Connection checkAdditionalOutgoingCallLimits ( com.android.internal.telephony.Phone phone ) { if ( ( phone.getPhoneType ( ) ) == ( android.telephony.TelephonyManager.PHONE_TYPE_CDMA ) ) { for ( android.telecom.Conference conference : getAllConferences ( ) ) { if ( conference instanceof com.android.services.telephony.CdmaConference ) { com.android.services.telephony.CdmaConference cdmaConf = ( ( com.android.services.telephony.CdmaConference ) ( conference ) ) ; if ( cdmaConf.can ( Connection.CAPABILITY_MERGE_CONFERENCE ) ) { return android.telecom.Connection.createFailedConnection ( new android.telecom.DisconnectCause ( android.telecom.DisconnectCause.RESTRICTED , null , getResources ( ) . getString ( R.string.callFailed_cdma_call_limit ) , "merge-capable call exists, prevent flash command." ) ) ; } } } } return null ; }
Source:
private synchronized void ensureNetworkCallbackUnregistered ( ) { if ( ( mNetworkCallback ) == null ) { return ; } final android.net.ConnectivityManager.NetworkCallback networkCallback = mNetworkCallback ; mCm.unregisterNetworkCallback ( networkCallback ) ; mNetworkCallback = null ; }

Target:
private void done ( com.android.captiveportallogin.CaptivePortalLoginActivity.Result result ) { if ( isDone.getAndSet ( true ) ) { return ; } if ( com.android.captiveportallogin.CaptivePortalLoginActivity.DBG ) { android.util.Log.d ( com.android.captiveportallogin.CaptivePortalLoginActivity.TAG , java.lang.String.format ( "Result %s for %s" , result.name ( ) , mUrl.toString ( ) ) ) ; } logMetricsEvent ( result.metricsEvent ) ; switch ( result ) { case DISMISSED : mCaptivePortal.reportCaptivePortalDismissed ( ) ; break ; case UNWANTED : mCaptivePortal.ignoreNetwork ( ) ; break ; case WANTED_AS_IS : mCaptivePortal.useNetwork ( ) ; break ; } finishAndRemoveTask ( ) ; }
Source:
private void handleCopyItemSelected ( ) { com.android.cts.verifier.TestResultsReport report = new com.android.cts.verifier.TestResultsReport ( this , getListAdapter ( ) ) ; android.text.ClipboardManager clipboardManager = ( ( android.text.ClipboardManager ) ( getSystemService ( com.android.cts.verifier.CLIPBOARD_SERVICE ) ) ) ; clipboardManager.setText ( report.getBody ( ) ) ; android.widget.Toast.makeText ( this , R.string.test_results_copied , Toast.LENGTH_SHORT ) . show ( ) ; }

Target:
private void handleShareItemSelected ( ) { android.content.Intent target = new android.content.Intent ( android.content.Intent.ACTION_SEND ) ; target.setType ( "text/plain" ) ; com.android.cts.verifier.TestResultsReport report = new com.android.cts.verifier.TestResultsReport ( this , mAdapter ) ; target.putExtra ( Intent.EXTRA_SUBJECT , report.getSubject ( ) ) ; target.putExtra ( Intent.EXTRA_TEXT , report.getBody ( ) ) ; startActivity ( android.content.Intent.createChooser ( target , getString ( R.string.share_test_results ) ) ) ; }
Source:
public void onClick ( android.view.View v ) { doPauseResume ( ) ; }

Target:
public void onClick ( android.view.View v ) { if ( ( getMediaController ( ) ) != null ) { if ( ( getMediaController ( ) . getPlaybackState ( ) . getState ( ) ) != ( android.media.session.PlaybackState.STATE_PLAYING ) ) { getMediaController ( ) . getTransportControls ( ) . play ( ) ; } else { getMediaController ( ) . getTransportControls ( ) . pause ( ) ; } } }
Source:
private void updateCallProfile ( ) { synchronized ( mLockObj ) { if ( ( mSession ) != null ) { setCallProfile ( mSession.getCallProfile ( ) ) ; } } }

Target:
private void notifySessionTerminatedDuringMerge ( ) { com.android.ims.ImsCall.Listener listener ; boolean notifyFailure = false ; android.telephony.ims.ImsReasonInfo notifyFailureReasonInfo = null ; synchronized ( this ) { listener = mListener ; if ( mSessionEndDuringMerge ) { if ( com.android.ims.ImsCall.CONF_DBG ) { logi ( "notifySessionTerminatedDuringMerge ::reporting terminate during merge" ) ; } notifyFailure = true ; notifyFailureReasonInfo = mSessionEndDuringMergeReasonInfo ; } clearSessionTerminationFlags ( ) ; } if ( ( listener != null ) && notifyFailure ) { try { processCallTerminated ( notifyFailureReasonInfo ) ; } catch ( java.lang.Throwable t ) { loge ( "notifySessionTerminatedDuringMerge :: " , t ) ; } } }
Source:
public void testTypeTextActionPerformWithEnter ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.enter_data_edit_text ) ) . perform ( android.support.test.espresso.action.ViewActions.typeText ( "Hello World!\n" ) ) ; android.support.test.espresso.Espresso.onView ( org.hamcrest.Matchers.allOf ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.enter_data_response_text ) , android.support.test.espresso.matcher.ViewMatchers.withText ( "Hello World!" ) ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ; }

Target:
public void typeTextActionPerformWithEnter ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.enter_data_edit_text ) ) . perform ( android.support.test.espresso.action.ViewActions.typeText ( "Hello World!\n" ) ) ; android.support.test.espresso.Espresso.onView ( org.hamcrest.Matchers.allOf ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.enter_data_response_text ) , android.support.test.espresso.matcher.ViewMatchers.withText ( "Hello World!" ) ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ; }
Source:
public void addU64 ( android.support.v8.renderscript.Long3 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU64 ( new android.support.v8.renderscript.Long3 ( v.x , v.y , v.z ) ) ; return ; } addU64 ( v.x ) ; addU64 ( v.y ) ; addU64 ( v.z ) ; }

Target:
public void addBoolean ( boolean v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addBoolean ( v ) ; return ; } addI8 ( ( ( byte ) ( v ? 1 : 0 ) ) ) ; }
Source:
private void _loadProvidersLocked ( ) { if ( com.android.internal.location.GpsLocationProvider.isSupported ( ) ) { com.android.internal.location.GpsLocationProvider provider = new com.android.internal.location.GpsLocationProvider ( mContext , this ) ; mGpsStatusProvider = provider.getGpsStatusProvider ( ) ; com.android.internal.location.LocationProviderProxy proxy = new com.android.internal.location.LocationProviderProxy ( android.location.LocationManager.GPS_PROVIDER , provider ) ; addProvider ( proxy ) ; } updateProvidersLocked ( ) ; }

Target:
private void _loadProvidersLocked ( ) { if ( com.android.internal.location.GpsLocationProvider.isSupported ( ) ) { com.android.internal.location.GpsLocationProvider provider = new com.android.internal.location.GpsLocationProvider ( mContext , this ) ; mGpsStatusProvider = provider.getGpsStatusProvider ( ) ; com.android.internal.location.LocationProviderProxy proxy = new com.android.internal.location.LocationProviderProxy ( android.location.LocationManager.GPS_PROVIDER , provider ) ; addProvider ( proxy ) ; mGpsLocationProvider = proxy ; } updateProvidersLocked ( ) ; }
Source:
protected java.lang.String getFlavoredName ( boolean capitalized ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( com.android.builder.DefaultProductFlavor flavor : variantConfiguration.getFlavorConfigs ( ) ) { java.lang.String name = flavor.getName ( ) ; builder.append ( ( capitalized ? com.android.build.gradle.internal.StringHelper.capitalize ( name ) : name ) ) ; } return builder.toString ( ) ; }

Target:
java.lang.String getName ( ) { return variantConfiguration.getFullName ( ) ; }
Source:
public void insert ( java.util.List < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; db.beginTransaction ( ) ; try { for ( com.android.dialer.speeddial.database.SpeedDialEntry entry : entries ) { if ( ( db.insert ( com.android.dialer.speeddial.database.SpeedDialEntryDatabaseHelper.TABLE_NAME , null , buildContentValues ( entry ) ) ) == ( - 1L ) ) { throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( "Attempted to insert a row that already exists." ) ; } } db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; db.close ( ) ; } }

Target:
public long insert ( com.android.dialer.speeddial.database.SpeedDialEntry entry ) { long updateRowId ; try ( android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ) { updateRowId = db.insert ( com.android.dialer.speeddial.database.SpeedDialEntryDatabaseHelper.TABLE_NAME , null , buildContentValuesWithoutId ( entry ) ) ; } if ( updateRowId == ( - 1 ) ) { throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( "Attempted to insert a row that already exists." ) ; } return updateRowId ; }
Source:
public void respondToDataPathRequest ( boolean accept , int ndpId , java.lang.String interfaceName , java.lang.String token ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_TYPE_COMMAND ) ; msg.arg1 = com.android.server.wifi.aware.WifiAwareStateManager.COMMAND_TYPE_RESPOND_TO_DATA_PATH_SETUP_REQUEST ; msg.arg2 = ndpId ; msg.obj = accept ; msg.getData ( ) . putString ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_INTERFACE_NAME , interfaceName ) ; msg.getData ( ) . putString ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_MESSAGE , token ) ; mSm.sendMessage ( msg ) ; }

Target:
public void respondToDataPathRequest ( boolean accept , int ndpId , java.lang.String interfaceName , byte [ ] pmk ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_TYPE_COMMAND ) ; msg.arg1 = com.android.server.wifi.aware.WifiAwareStateManager.COMMAND_TYPE_RESPOND_TO_DATA_PATH_SETUP_REQUEST ; msg.arg2 = ndpId ; msg.obj = accept ; msg.getData ( ) . putString ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_INTERFACE_NAME , interfaceName ) ; msg.getData ( ) . putByteArray ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_PMK , pmk ) ; mSm.sendMessage ( msg ) ; }
Source:
public boolean matches ( org.eclipse.jdt.core.dom.BodyDeclaration node ) { if ( ! ( node instanceof org.eclipse.jdt.core.dom.EnumConstantDeclaration ) ) { return false ; } if ( enumTypeLocater.matches ( ( ( org.eclipse.jdt.core.dom.BodyDeclaration ) ( node.getParent ( ) ) ) ) ) { org.eclipse.jdt.core.dom.EnumConstantDeclaration enumConstantDeclaration = ( ( org.eclipse.jdt.core.dom.EnumConstantDeclaration ) ( node ) ) ; if ( enumConstantDeclaration.getName ( ) . getFullyQualifiedName ( ) . equals ( constantName ) ) { return true ; } } return false ; }

Target:
public boolean matches ( org.eclipse.jdt.core.dom.BodyDeclaration node ) { if ( ! ( node instanceof org.eclipse.jdt.core.dom.EnumConstantDeclaration ) ) { return false ; } if ( typeLocator.matches ( ( ( org.eclipse.jdt.core.dom.BodyDeclaration ) ( node.getParent ( ) ) ) ) ) { org.eclipse.jdt.core.dom.EnumConstantDeclaration enumConstantDeclaration = ( ( org.eclipse.jdt.core.dom.EnumConstantDeclaration ) ( node ) ) ; if ( enumConstantDeclaration.getName ( ) . getFullyQualifiedName ( ) . equals ( constantName ) ) { return true ; } } return false ; }
Source:
protected java.lang.String getDebuggeeClassSignature ( ) { java.lang.String debuggeeClassName = getDebuggeeClassName ( ) ; java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( 'L' ) ; builder.append ( debuggeeClassName.replace ( '.' , '/' ) ) ; builder.append ( ';' ) ; return builder.toString ( ) ; }

Target:
protected static java.lang.String getClassSignature ( java.lang.String className ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( 'L' ) ; builder.append ( className.replace ( '.' , '/' ) ) ; builder.append ( ';' ) ; return builder.toString ( ) ; }
Source:
private java.nio.ByteBuffer getNextAvailableByteBuffer ( java.nio.ByteBuffer [ ] buffers , int offset , int length ) { for ( int i = offset ; i < length ; ++ i ) { if ( ( buffers [ i ] . remaining ( ) ) > 0 ) { return buffers [ i ] ; } } return null ; }

Target:
private javax.net.ssl.SSLEngineResult sslReadErrorResult ( int err , int bytesConsumed , int bytesProduced ) throws javax.net.ssl.SSLException { if ( ( pendingOutboundEncryptedBytes ( ) ) > 0 ) { return new javax.net.ssl.SSLEngineResult ( javax.net.ssl.SSLEngineResult.Status.OK , javax.net.ssl.SSLEngineResult.HandshakeStatus.NEED_WRAP , bytesConsumed , bytesProduced ) ; } throw shutdownWithError ( org.conscrypt.NativeCrypto.SSL_get_error_string ( err ) ) ; }
Source:
public void setBackgroundColor ( final int color ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { org.chromium.base.ThreadUtils.postOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setBackgroundColor ( color ) ; } } ) ; return ; } mAwContents.setBackgroundColor ( color ) ; }

Target:
public void setLayerType ( final int layerType , final android.graphics.Paint paint ) { if ( ( mAwContents ) == null ) return ; if ( checkNeedsPost ( ) ) { org.chromium.base.ThreadUtils.postOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setLayerType ( layerType , paint ) ; } } ) ; return ; } mAwContents.setLayerType ( layerType , paint ) ; }
Source:
public void snapshotJackFilesModificationDate ( ) throws com.android.jack.library.LibraryIOException { com.android.jack.library.InputJackLibrary compilerStateLib = null ; try { compilerStateLib = com.android.jack.test.toolchain.AbstractTestTools.getInputJackLibraryFromDir ( compilerStateFolder ) ; java.util.Iterator < com.android.sched.vfs.InputVFile > jayceIter = compilerStateLib.iterator ( FileType.JAYCE ) ; while ( jayceIter.hasNext ( ) ) { com.android.sched.vfs.InputVFile jayceFile = jayceIter.next ( ) ; fileModificationDate.put ( jayceFile.getPathFromRoot ( ) , java.lang.Long.valueOf ( jayceFile.getLastModified ( ) ) ) ; } } finally { if ( compilerStateLib != null ) { compilerStateLib.close ( ) ; } } }

Target:
public void snapshotJackFilesModificationDate ( ) throws com.android.jack.library.LibraryIOException { com.android.jack.library.InputJackLibrary compilerStateLib = null ; try { compilerStateLib = com.android.jack.test.toolchain.AbstractTestTools.getInputJackLibrary ( compilerStateFolder ) ; java.util.Iterator < com.android.sched.vfs.InputVFile > jayceIter = compilerStateLib.iterator ( FileType.JAYCE ) ; while ( jayceIter.hasNext ( ) ) { com.android.sched.vfs.InputVFile jayceFile = jayceIter.next ( ) ; fileModificationDate.put ( jayceFile.getPathFromRoot ( ) , java.lang.Long.valueOf ( jayceFile.getLastModified ( ) ) ) ; } } finally { if ( compilerStateLib != null ) { compilerStateLib.close ( ) ; } } }
Source:
public java.util.List < java.lang.String > getTimeZonesForNumber ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType numberType = com.google.i18n.phonenumbers.PhoneNumberUtil.getInstance ( ) . getNumberType ( number ) ; if ( numberType == ( com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType.UNKNOWN ) ) { return com.google.i18n.phonenumbers.PhoneNumberToTimeZonesMapper.UNKNOWN_TIME_ZONE_LIST ; } else if ( ! ( canBeGeocoded ( numberType ) ) ) { return getCountryLevelTimeZonesforNumber ( number ) ; } return getTimeZonesForGeographicalNumber ( number ) ; }

Target:
public java.util.List < java.lang.String > getTimeZonesForNumber ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType numberType = com.google.i18n.phonenumbers.PhoneNumberUtil.getInstance ( ) . getNumberType ( number ) ; if ( numberType == ( com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType.UNKNOWN ) ) { return com.google.i18n.phonenumbers.PhoneNumberToTimeZonesMapper.UNKNOWN_TIME_ZONE_LIST ; } else if ( ! ( com.google.i18n.phonenumbers.PhoneNumberUtil.getInstance ( ) . isNumberGeographical ( numberType , number.getCountryCode ( ) ) ) ) { return getCountryLevelTimeZonesforNumber ( number ) ; } return getTimeZonesForGeographicalNumber ( number ) ; }
Source:
public void test_JarFile_Integrate_Jar ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Integrate.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) . skip ( java.lang.Long.MAX_VALUE ) ; } }

Target:
public void test_JarFile_InsertEntry_in_Manifest_Jar ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Inserted_Entry_Manifest.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; try ( java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ) { java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; int count = 0 ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; count ++ ; } assertEquals ( 5 , count ) ; } }
Source:
protected boolean validate ( ) { return true ; }

Target:
private static boolean skipFile ( java.lang.String icuVersion , java.lang.String className ) { for ( int skip = 0 ; skip < ( com.ibm.icu.dev.test.serializable.CompatibilityTest.SKIP_CASES.length ) ; skip ++ ) { if ( ( icuVersion.equals ( com.ibm.icu.dev.test.serializable.CompatibilityTest.SKIP_CASES [ skip ] [ 0 ] ) ) && ( className.equals ( com.ibm.icu.dev.test.serializable.CompatibilityTest.SKIP_CASES [ skip ] [ 1 ] ) ) ) { return true ; } } return false ; }
Source:
public void testScrollDown ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.bottom_left ) ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) ) ; }

Target:
public void scrollDown ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.bottom_left ) ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) ) ; }
Source:
private boolean checkFeatures ( java.lang.String [ ] requiredFeatures , java.lang.String [ ] excludedFeatures , java.lang.String [ ] applicableFeatures ) { if ( ( ! ( hasAnyFeature ( excludedFeatures ) ) ) && ( hasAllFeatures ( requiredFeatures ) ) ) { if ( ( applicableFeatures == null ) || ( hasAnyFeature ( applicableFeatures ) ) ) { return true ; } } return false ; }

Target:
java.util.List < com.android.cts.verifier.TestListItem > filterTests ( java.util.List < com.android.cts.verifier.TestListItem > tests ) { java.util.List < com.android.cts.verifier.TestListItem > filteredTests = new java.util.ArrayList < com.android.cts.verifier.TestListItem > ( ) ; for ( com.android.cts.verifier.TestListItem test : tests ) { if ( ( ! ( hasAnyFeature ( test.excludedFeatures ) ) ) && ( hasAllFeatures ( test.requiredFeatures ) ) ) { if ( ( ( test.applicableFeatures ) == null ) || ( hasAnyFeature ( test.applicableFeatures ) ) ) { filteredTests.add ( test ) ; } } } return filteredTests ; }
Source:
boolean isAudioConnected ( android.bluetooth.BluetoothDevice device ) { synchronized ( this ) { if ( ( ( ( getCurrentState ( ) ) == ( mAudioOn ) ) && ( mCurrentDevice.equals ( device ) ) ) && ( ( mAudioState ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ) ) ) { return true ; } } return false ; }

Target:
public void setForceScoAudio ( boolean forced ) { mForceScoAudio = forced ; }
Source:
public void dispose ( ) { mDestroyed.set ( true ) ; auth_rsp = null ; synchronized ( mLock ) { mLock.notifyAll ( ) ; } mParentApp = null ; mFh = null ; mCi = null ; mContext = null ; }

Target:
public void dispose ( ) { mDestroyed.set ( true ) ; auth_rsp = null ; synchronized ( mLock ) { mLock.notifyAll ( ) ; } mCi.unregisterForIccRefresh ( this ) ; mParentApp = null ; mFh = null ; mCi = null ; mContext = null ; if ( ( mAdnCache ) != null ) { mAdnCache.reset ( ) ; } }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.activity_color_selection_config ) ; java.lang.String sharedPrefString = getIntent ( ) . getStringExtra ( com.example.android.wearable.watchface.config.ColorSelectionActivity.EXTRA_SHARED_PREF ) ; mColorSelectionRecyclerViewAdapter = new com.example.android.wearable.watchface.config.ColorSelectionRecyclerViewAdapter ( sharedPrefString , com.example.android.wearable.watchface.model.AnalogComplicationConfigData.getColorOptionsDataSet ( ) ) ; mConfigAppearanceWearableRecyclerView = ( ( android.support.wear.widget.WearableRecyclerView ) ( findViewById ( R.id.wearable_recycler_view ) ) ) ; mConfigAppearanceWearableRecyclerView.setEdgeItemsCenteringEnabled ( true ) ; mConfigAppearanceWearableRecyclerView.setLayoutManager ( new android.support.v7.widget.LinearLayoutManager ( this ) ) ; mConfigAppearanceWearableRecyclerView.setHasFixedSize ( true ) ; mConfigAppearanceWearableRecyclerView.setAdapter ( mColorSelectionRecyclerViewAdapter ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.activity_color_selection_config ) ; java.lang.String sharedPrefString = getIntent ( ) . getStringExtra ( com.example.android.wearable.watchface.config.ColorSelectionActivity.EXTRA_SHARED_PREF ) ; mColorSelectionRecyclerViewAdapter = new com.example.android.wearable.watchface.config.ColorSelectionRecyclerViewAdapter ( sharedPrefString , com.example.android.wearable.watchface.model.AnalogComplicationConfigData.getColorOptionsDataSet ( ) ) ; mConfigAppearanceWearableRecyclerView = ( ( android.support.wearable.view.WearableRecyclerView ) ( findViewById ( R.id.wearable_recycler_view ) ) ) ; mConfigAppearanceWearableRecyclerView.setCenterEdgeItems ( true ) ; mConfigAppearanceWearableRecyclerView.setHasFixedSize ( true ) ; mConfigAppearanceWearableRecyclerView.setAdapter ( mColorSelectionRecyclerViewAdapter ) ; }
Source:
public void systemReady ( ) { if ( com.android.server.IpSecService.DBG ) { final long start = java.lang.System.currentTimeMillis ( ) ; prepareNativeDaemon ( ) ; final long delta = ( java.lang.System.currentTimeMillis ( ) ) - start ; android.util.Log.d ( com.android.server.IpSecService.TAG , ( ( "Prepared in " + delta ) + "ms" ) ) ; return ; } else { prepareNativeDaemon ( ) ; } }

Target:
public void systemReady ( ) { if ( isNetdAlive ( ) ) { android.util.Slog.d ( com.android.server.IpSecService.TAG , "IpSecService is ready" ) ; } else { android.util.Slog.wtf ( com.android.server.IpSecService.TAG , "IpSecService not ready: failed to connect to NetD Native Service!" ) ; } }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "drawable-hdpi: Warning: Missing the following drawables in drawable-hdpi: sample_icon.gif (found in drawable-mdpi)\n" + ( ( ( "drawable/ic_launcher.png: Warning: The ic_launcher.png icon has identical contents in the following configuration folders: drawable-mdpi, drawable\n" + "ic_launcher.png: Warning: Found bitmap drawable res/drawable/ic_launcher.png in densityless folder\n" ) + "res: Warning: Missing density variation folders in res: drawable-xhdpi\n" ) + "sample_icon.gif: Warning: Using the .gif format for bitmaps is discouraged" ) ) , lintProject ( "apicheck/minsdk4.xml=>AndroidManifest.xml" , "res/drawable/ic_launcher.png" , "res/drawable/ic_launcher.png=>res/drawable-mdpi/ic_launcher.png" , "res/drawable-mdpi/sample_icon.gif" , "res/drawable-mdpi/sample_icon.gif=>res/drawable-hdpi/.svn" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "res/drawable-mdpi/sample_icon.gif: Warning: Using the .gif format for bitmaps is discouraged [GifUsage]\n" + ( ( ( ( ( ( "res/drawable/ic_launcher.png: Warning: The ic_launcher.png icon has identical contents in the following configuration folders: drawable-mdpi, drawable [IconDuplicatesConfig]\n" + " res/drawable-mdpi/ic_launcher.png: <No location-specific message\n" ) + "res/drawable/ic_launcher.png: Warning: Found bitmap drawable res/drawable/ic_launcher.png in densityless folder [IconLocation]\n" ) + "res/drawable-hdpi: Warning: Missing the following drawables in drawable-hdpi: sample_icon.gif (found in drawable-mdpi) [IconDensities]\n" ) + "res: Warning: Missing density variation folders in res: drawable-xhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 5 warnings\n" ) + "" ) ) , lintProject ( "apicheck/minsdk4.xml=>AndroidManifest.xml" , "res/drawable/ic_launcher.png" , "res/drawable/ic_launcher.png=>res/drawable-mdpi/ic_launcher.png" , "res/drawable-mdpi/sample_icon.gif" , "res/drawable-mdpi/sample_icon.gif=>res/drawable-hdpi/.svn" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }
Source:
public synchronized java.util.Iterator < java.lang.Object > iterator ( ) { return com.google.common.collect.Iterators.forArray ( java.lang.Integer.valueOf ( getCount ( ) ) , java.lang.Double.valueOf ( getTotal ( ) ) , java.lang.Double.valueOf ( getMin ( ) ) , java.lang.Double.valueOf ( getAverage ( ) ) , java.lang.Double.valueOf ( getMax ( ) ) , getMinObject ( ) , getMaxObject ( ) ) ; }

Target:
public boolean isEnabled ( ) { return true ; }
Source:
public void enter ( ) { super . enter ( ) ; if ( ( mLastError ) != ( android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ) { transitionTo ( mInitialState ) ; } if ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.DBG ) android.util.Log.d ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Local hotspot " + ( mIfaceName ) ) ) ; sendInterfaceState ( IControlsTethering.STATE_LOCAL_HOTSPOT ) ; }

Target:
public void enter ( ) { super . enter ( ) ; if ( ( mLastError ) != ( android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ) { transitionTo ( mInitialState ) ; } if ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.DBG ) android.util.Log.d ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Local hotspot " + ( mIfaceName ) ) ) ; sendInterfaceState ( IControlsTethering.STATE_LOCAL_ONLY ) ; }
Source:
public void testHandle ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } org.junit.Assert.assertThat ( mCall.getDetails ( ) . getHandle ( ) , org.hamcrest.CoreMatchers.is ( android.net.Uri.class ) ) ; assertEquals ( getTestNumber ( ) , mCall.getDetails ( ) . getHandle ( ) ) ; }

Target:
public void testHandle ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } org.junit.Assert.assertThat ( mCall.getDetails ( ) . getHandle ( ) , org.hamcrest.CoreMatchers.instanceOf ( android.net.Uri.class ) ) ; assertEquals ( getTestNumber ( ) , mCall.getDetails ( ) . getHandle ( ) ) ; }
Source:
public final void testPkgTypeSample ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_SAMPLES ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertTrue ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeSample ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_SAMPLES ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasVendorId ( ) ) ; assertTrue ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public com.android.sched.util.file.FileOrDirectory checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull java.lang.String string ) throws com.android.sched.util.codec.ParsingException { java.io.File file = new java.io.File ( string ) ; try { if ( file.isFile ( ) ) { return new com.android.sched.util.file.InputStreamFile ( string ) ; } else { return new com.android.sched.util.file.Directory ( string , context.getRunnableHooks ( ) , existence , permissions , change ) ; } } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.util.file.FileOrDirectory checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull java.lang.String string ) throws com.android.sched.util.codec.ParsingException { java.io.File file = new java.io.File ( string ) ; try { if ( file.isFile ( ) ) { return new com.android.sched.util.file.InputStreamFile ( context.getWorkingDirectory ( ) , string ) ; } else { return new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) ; } } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public static java.util.TimeZone getSystemDefault ( ) { synchronized ( libcore.util.ZoneInfoDB.LOCK ) { org.apache.harmony.luni.internal.util.TimezoneGetter tzGetter = org.apache.harmony.luni.internal.util.TimezoneGetter.getInstance ( ) ; java.lang.String zoneName = ( tzGetter != null ) ? tzGetter.getId ( ) : null ; if ( zoneName != null ) { zoneName = zoneName.trim ( ) ; } if ( ( zoneName == null ) || ( zoneName.isEmpty ( ) ) ) { zoneName = "localtime" ; } return java.util.TimeZone.getTimeZone ( zoneName ) ; } }

Target:
public java.lang.String getVersion ( ) { return version ; }
Source:
public void requestNetwork ( android.net.NetworkRequest request , android.net.ConnectivityManager.NetworkCallback networkCallback , int timeoutMs ) { int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , getDefaultHandler ( ) ) ; }

Target:
public void requestNetwork ( android.net.NetworkRequest request , android.net.ConnectivityManager.NetworkCallback networkCallback , int timeoutMs ) { if ( timeoutMs <= 0 ) { throw new java.lang.IllegalArgumentException ( ( "Non-positive timeoutMs: " + timeoutMs ) ) ; } int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , getDefaultHandler ( ) ) ; }
Source:
private com.android.jack.dx.dex.code.DalvCode createCode ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method , @ javax.annotation.Nonnull com.android.jack.dx.rop.code.RopMethod ropMethod ) { com.android.jack.dx.dex.DexOptions options = new com.android.jack.dx.dex.DexOptions ( ) ; options.forceJumbo = forceJumbo ; int paramSize = getParameterWordCount ( method ) ; int positionListKind ; com.android.jack.dx.rop.code.LocalVariableInfo lvInfo ; if ( emitLocalDebugInfo ) { lvInfo = com.android.jack.dx.rop.code.LocalVariableExtractor.extract ( ropMethod ) ; } else { lvInfo = null ; } if ( emitLineNumberTable ) { positionListKind = com.android.jack.dx.dex.code.PositionList.LINES ; } else { positionListKind = com.android.jack.dx.dex.code.PositionList.NONE ; } return com.android.jack.dx.dex.code.RopTranslator.translate ( ropMethod , positionListKind , lvInfo , paramSize , options ) ; }

Target:
private com.android.jack.dx.dex.code.DalvCode createCode ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method , @ javax.annotation.Nonnull com.android.jack.dx.rop.code.RopMethod ropMethod ) { com.android.jack.dx.dex.DexOptions options = new com.android.jack.dx.dex.DexOptions ( ) ; options.forceJumbo = forceJumbo ; options.targetApiLevel = apiLevel ; int paramSize = getParameterWordCount ( method ) ; int positionListKind ; com.android.jack.dx.rop.code.LocalVariableInfo lvInfo ; if ( emitLocalDebugInfo ) { lvInfo = com.android.jack.dx.rop.code.LocalVariableExtractor.extract ( ropMethod ) ; } else { lvInfo = null ; } if ( emitLineNumberTable ) { positionListKind = com.android.jack.dx.dex.code.PositionList.LINES ; } else { positionListKind = com.android.jack.dx.dex.code.PositionList.NONE ; } return com.android.jack.dx.dex.code.RopTranslator.translate ( ropMethod , positionListKind , lvInfo , paramSize , options ) ; }
Source:
public boolean onHandleForceStop ( android.content.Intent intent , java.lang.String [ ] packages , int uid , boolean doit ) { return doPackagesChanged ( doit ) ; }

Target:
public boolean onHandleForceStop ( android.content.Intent intent , java.lang.String [ ] packages , int uid , boolean doit ) { synchronized ( mLock ) { boolean changed = false ; for ( int i = 0 ; i < ( mWallpaperMap.size ( ) ) ; i ++ ) { com.android.server.WallpaperManagerService.WallpaperData wallpaper = mWallpaperMap.valueAt ( i ) ; boolean res = doPackagesChangedLocked ( doit , wallpaper ) ; changed |= res ; } return changed ; } }
Source:
static void getUsage ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass , java.lang.StringBuilder usage ) { com.google.devtools.common.options.OptionsData data = com.google.devtools.common.options.OptionsParser.getOptionsDataInternal ( optionsClass ) ; java.util.List < java.lang.reflect.Field > optionFields = new java.util.ArrayList ( data.getFieldsForClass ( optionsClass ) ) ; optionFields.sort ( com.google.devtools.common.options.OptionsUsage.BY_NAME ) ; for ( java.lang.reflect.Field optionField : optionFields ) { com.google.devtools.common.options.OptionsUsage.getUsage ( optionField , usage , OptionsParser.HelpVerbosity.LONG , data ) ; } }

Target:
static void getUsage ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass , java.lang.StringBuilder usage ) { com.google.devtools.common.options.OptionsData data = com.google.devtools.common.options.OptionsParser.getOptionsDataInternal ( optionsClass ) ; java.util.List < com.google.devtools.common.options.OptionDefinition > optionDefinitions = new java.util.ArrayList ( data.getOptionDefinitionsFromClass ( optionsClass ) ) ; optionDefinitions.sort ( OptionDefinition.BY_OPTION_NAME ) ; for ( com.google.devtools.common.options.OptionDefinition optionDefinition : optionDefinitions ) { com.google.devtools.common.options.OptionsUsage.getUsage ( optionDefinition , usage , OptionsParser.HelpVerbosity.LONG , data ) ; } }
Source:
public java.lang.String toShortString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( mMajor ) ; if ( ( ( mMinor ) > 0 ) || ( ( mMicro ) > 0 ) ) { sb.append ( '.' ) . append ( mMinor ) ; } if ( ( mMicro ) > 0 ) { sb.append ( '.' ) . append ( mMicro ) ; } if ( ( mPreview ) != ( com.android.sdklib.internal.repository.packages.PreviewVersion.NOT_A_PREVIEW ) ) { sb.append ( " rc" ) . append ( mPreview ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String toShortString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( mMajor ) ; if ( ( ( mMinor ) > 0 ) || ( ( mMicro ) > 0 ) ) { sb.append ( '.' ) . append ( mMinor ) ; } if ( ( mMicro ) > 0 ) { sb.append ( '.' ) . append ( mMicro ) ; } if ( ( mPreview ) != ( com.android.sdklib.internal.repository.packages.FullRevision.NOT_A_PREVIEW ) ) { sb.append ( " rc" ) . append ( mPreview ) ; } return sb.toString ( ) ; }
Source:
public int hashCode ( ) { int h = x ; h ^= ( ( ( y ) > > 8 ) & 16777215 ) | ( ( ( y ) & 255 ) << 24 ) ; h ^= ( ( ( w ) > > 16 ) & 65535 ) | ( ( ( w ) & 65535 ) << 16 ) ; h ^= ( ( h > > 24 ) & 255 ) | ( ( h & 16777215 ) << 8 ) ; return h ; }

Target:
public int hashCode ( ) { int hc = x ; hc ^= ( ( ( y ) > > 8 ) & 16777215 ) | ( ( ( y ) & 255 ) << 24 ) ; hc ^= ( ( ( w ) > > 16 ) & 65535 ) | ( ( ( w ) & 65535 ) << 16 ) ; hc ^= ( ( ( h ) > > 24 ) & 255 ) | ( ( ( h ) & 16777215 ) << 8 ) ; return hc ; }
Source:
public com.android.ahat.DocString render ( com.android.ahat.Site element ) { com.android.ahat.DocString str = new com.android.ahat.DocString ( ) ; if ( ( element.getParent ( ) ) != null ) { str.append ( "→ " ) ; } str.appendLink ( com.android.ahat.DocString.uri ( "site?stack=%d&depth=%d" , element.getStackId ( ) , element.getStackDepth ( ) ) , com.android.ahat.DocString.text ( element.getName ( ) ) ) ; return str ; }

Target:
public com.android.ahat.DocString render ( com.android.ahat.Site element ) { com.android.ahat.DocString str = new com.android.ahat.DocString ( ) ; if ( ( element.getParent ( ) ) != null ) { str.append ( "→ " ) ; } str.appendLink ( com.android.ahat.DocString.formattedUri ( "site?stack=%d&depth=%d" , element.getStackId ( ) , element.getStackDepth ( ) ) , com.android.ahat.DocString.text ( element.getName ( ) ) ) ; return str ; }
Source:
public void onPostDialWait ( java.lang.String callId , java.lang.String remaining ) throws android.os.RemoteException { com.android.server.telecom.Log.startSession ( "CSW.oPDW" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "onPostDialWait %s %s" , callId , remaining ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.onPostDialWait ( remaining ) ; } else { } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void onPostDialWait ( java.lang.String callId , java.lang.String remaining ) throws android.os.RemoteException { android.telecom.Log.startSession ( "CSW.oPDW" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "onPostDialWait %s %s" , callId , remaining ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.onPostDialWait ( remaining ) ; } else { } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public void empty ( ) { com.android.server.wifi.WifiNative.BucketSettings bucketSettings = new com.android.server.wifi.WifiNative.BucketSettings ( ) ; mChannelCollection.fillBucketSettings ( bucketSettings , java.lang.Integer.MAX_VALUE ) ; org.hamcrest.MatcherAssert.assertThat ( bucketSettings , com.android.server.wifi.ScanTestUtil.channelsAre ( ) ) ; org.junit.Assert.assertEquals ( java.util.Collections.< java.lang.Integer > emptySet ( ) , mChannelCollection.getSupplicantScanFreqs ( ) ) ; org.junit.Assert.assertTrue ( mChannelCollection.isEmpty ( ) ) ; org.junit.Assert.assertFalse ( mChannelCollection.containsChannel ( 2400 ) ) ; org.junit.Assert.assertFalse ( mChannelCollection.containsChannel ( 5150 ) ) ; }

Target:
public void empty ( ) { com.android.server.wifi.WifiNative.BucketSettings bucketSettings = new com.android.server.wifi.WifiNative.BucketSettings ( ) ; mChannelCollection.fillBucketSettings ( bucketSettings , java.lang.Integer.MAX_VALUE ) ; org.hamcrest.MatcherAssert.assertThat ( bucketSettings , com.android.server.wifi.ScanTestUtil.channelsAre ( ) ) ; org.junit.Assert.assertEquals ( java.util.Collections.< java.lang.Integer > emptySet ( ) , mChannelCollection.getSupplicantScanFreqs ( ) ) ; org.junit.Assert.assertTrue ( mChannelCollection.isEmpty ( ) ) ; org.junit.Assert.assertFalse ( mChannelCollection.containsChannel ( 2400 ) ) ; org.junit.Assert.assertFalse ( mChannelCollection.containsChannel ( 5150 ) ) ; org.junit.Assert.assertFalse ( mChannelCollection.isAllChannels ( ) ) ; }
Source:
public static boolean isLegal ( int ch ) { if ( ch < ( android.icu.lang.UCharacter.MIN_VALUE ) ) { return false ; } if ( ch < ( android.icu.text.UTF16.SURROGATE_MIN_VALUE ) ) { return true ; } if ( ch <= ( android.icu.text.UTF16.SURROGATE_MAX_VALUE ) ) { return false ; } if ( android.icu.impl.UCharacterUtility.isNonCharacter ( ch ) ) { return false ; } return ch <= ( android.icu.lang.UCharacter.MAX_VALUE ) ; }

Target:
public static boolean isLegal ( int ch ) { if ( ch < ( android.icu.lang.UCharacter.MIN_VALUE ) ) { return false ; } if ( ch < ( java.lang.Character.MIN_SURROGATE ) ) { return true ; } if ( ch <= ( java.lang.Character.MAX_SURROGATE ) ) { return false ; } if ( android.icu.impl.UCharacterUtility.isNonCharacter ( ch ) ) { return false ; } return ch <= ( android.icu.lang.UCharacter.MAX_VALUE ) ; }
Source:
public void testDisabled ( ) throws org.json.JSONException { android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_DE_FAILURE ) ; com.android.server.wifi.aware.WifiAwareHalMock.callDisabled ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onAwareDownNotification ( WifiAwareNative.AWARE_STATUS_DE_FAILURE ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testDisabled ( ) throws org.json.JSONException { android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; com.android.server.wifi.aware.WifiAwareHalMock.callDisabled ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onAwareDownNotification ( WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public java.lang.Object clone ( ) { try { java.text.DecimalFormat other = ( ( java.text.DecimalFormat ) ( super . clone ( ) ) ) ; other.icuDecimalFormat = ( ( java.text.DecimalFormat ) ( icuDecimalFormat.clone ( ) ) ) ; other.symbols = ( ( java.text.DecimalFormatSymbols ) ( symbols.clone ( ) ) ) ; return other ; } catch ( java.lang.Exception e ) { throw new java.lang.InternalError ( ) ; } }

Target:
public java.lang.Object clone ( ) { try { java.text.DecimalFormat other = ( ( java.text.DecimalFormat ) ( super . clone ( ) ) ) ; other.icuDecimalFormat = ( ( java.text.DecimalFormat_ICU58_Android ) ( icuDecimalFormat.clone ( ) ) ) ; other.symbols = ( ( java.text.DecimalFormatSymbols ) ( symbols.clone ( ) ) ) ; return other ; } catch ( java.lang.Exception e ) { throw new java.lang.InternalError ( ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) { if ( Main.triggerReflectionOOM ( ) ) { java.lang.System.out.println ( "Test reflection correctly threw" ) ; } if ( Main.triggerArrayOOM ( ) ) { java.lang.System.out.println ( "NEW_ARRAY correctly threw OOME" ) ; } if ( Main.triggerInstanceOOM ( ) ) { java.lang.System.out.println ( "NEW_INSTANCE correctly threw OOME" ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { if ( Main.triggerReflectionOOM ( ) ) { java.lang.System.out.println ( "Test reflection correctly threw" ) ; } if ( Main.triggerReflectionOOM2 ( ) ) { java.lang.System.out.println ( "Test reflection2 correctly threw" ) ; } if ( Main.triggerArrayOOM ( ) ) { java.lang.System.out.println ( "NEW_ARRAY correctly threw OOME" ) ; } if ( Main.triggerInstanceOOM ( ) ) { java.lang.System.out.println ( "NEW_INSTANCE correctly threw OOME" ) ; } }
Source:
public void addProviderWithInvalidCredential ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FQDN ; config.homeSp.friendlyName = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FRIENDLY_NAME ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.realm = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_REALM ; config.credential.caCertificate = com.android.server.wifi.FakeKeys.CA_CERT0 ; config.credential.userCredential = new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ; config.credential.userCredential.username = "username" ; config.credential.userCredential.password = "password" ; config.credential.userCredential.eapType = android.net.wifi.EAPConstants.EAP_TLS ; config.credential.userCredential.nonEapInnerMethod = "MS-CHAP" ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }

Target:
public void addProviderWithInvalidCredential ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = createTestConfigWithUserCredential ( ) ; config.getCredential ( ) . getUserCredential ( ) . setEapType ( EAPConstants.EAP_TLS ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }