auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
com.android.server.wifi.WifiConfigManager getWifiConfigManager ( ) { com.android.server.wifi.WifiConfigManager wifiConfigManager = org.mockito.Mockito.mock ( com.android.server.wifi.WifiConfigManager.class ) ; wifiConfigManager.mThresholdSaturatedRssi24 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.RSSI_SATURATION_2G_BAND ) ; wifiConfigManager.mBandAward5Ghz = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.BAND_AWARD_5GHz ) ; wifiConfigManager.mCurrentNetworkBoost = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.SAME_NETWORK_AWARD ) ; wifiConfigManager.mThresholdQualifiedRssi5 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.QUALIFIED_RSSI_5G_BAND ) ; wifiConfigManager.mThresholdMinimumRssi24 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.MINIMUM_2G_ACCEPT_RSSI ) ; wifiConfigManager.mThresholdMinimumRssi5 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.MINIMUM_5G_ACCEPT_RSSI ) ; org.mockito.Mockito.when ( wifiConfigManager.getEnableAutoJoinWhenAssociated ( ) ) . thenReturn ( true ) ; return wifiConfigManager ; }

Target:
com.android.server.wifi.WifiConfigManager getWifiConfigManager ( ) { com.android.server.wifi.WifiConfigManager wifiConfigManager = mock ( com.android.server.wifi.WifiConfigManager.class ) ; when ( wifiConfigManager.getLastSelectedNetwork ( ) ) . thenReturn ( WifiConfiguration.INVALID_NETWORK_ID ) ; return wifiConfigManager ; }
Source:
public final com.android.tools.perflib.heap.ClassObj findClass ( java.lang.String name ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.ClassObj theClass = mHeaps.get ( i ) . getClass ( name ) ; if ( theClass != null ) { return theClass ; } } return null ; }

Target:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( com.android.tools.perflib.heap.Heap mHeap : mHeaps ) { com.android.tools.perflib.heap.ClassObj theClass = mHeap.getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }
Source:
public void restoreconAppData ( java.lang.String uuid , java.lang.String pkgname , int userid , int flags , int appid , java.lang.String seinfo ) throws com.android.internal.os.InstallerConnection.InstallerException { mInstaller.execute ( "restorecon_app_data" , uuid , pkgname , userid , flags , appid , seinfo ) ; }

Target:
public void restoreconAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , int appId , java.lang.String seInfo ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.restoreconAppData ( uuid , packageName , userId , flags , appId , seInfo ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public java.lang.String getOriginalApplicationId ( ) { if ( mType.isForTesting ( ) ) { return getApplicationId ( ) ; } return getPackageFromManifest ( ) ; }

Target:
public java.lang.String getTestedApplicationId ( ) { if ( mType.isForTesting ( ) ) { com.google.common.base.Preconditions.checkState ( ( ( mTestedConfig ) != null ) ) ; if ( ( mTestedConfig.mType ) == ( VariantType.LIBRARY ) ) { return getApplicationId ( ) ; } else { return mTestedConfig.getApplicationId ( ) ; } } return null ; }
Source:
public void initTarget ( java.lang.String targetHash , com.android.sdklib.repository.FullRevision buildToolRevision , @ com.android.annotations.NonNull com.android.builder.AndroidBuilder androidBuilder ) { if ( targetHash == null ) { throw new java.lang.IllegalArgumentException ( "android.compileSdkVersion is missing!" ) ; } if ( buildToolRevision == null ) { throw new java.lang.IllegalArgumentException ( "android.buildToolsVersion is missing!" ) ; } com.android.builder.sdk.SdkLoader sdkLoader = getSdkLoader ( ) ; com.android.builder.sdk.SdkInfo sdkInfo = sdkLoader.getSdkInfo ( logger ) ; com.android.builder.sdk.TargetInfo targetInfo = sdkLoader.getTargetInfo ( targetHash , buildToolRevision , logger ) ; androidBuilder.setTargetInfo ( sdkInfo , targetInfo ) ; }

Target:
public void initTarget ( java.lang.String targetHash , com.android.sdklib.repository.FullRevision buildToolRevision , @ com.android.annotations.NonNull com.android.builder.core.AndroidBuilder androidBuilder ) { if ( targetHash == null ) { throw new java.lang.IllegalArgumentException ( "android.compileSdkVersion is missing!" ) ; } if ( buildToolRevision == null ) { throw new java.lang.IllegalArgumentException ( "android.buildToolsVersion is missing!" ) ; } com.android.builder.sdk.SdkLoader sdkLoader = getSdkLoader ( ) ; com.android.builder.sdk.SdkInfo sdkInfo = sdkLoader.getSdkInfo ( logger ) ; com.android.builder.sdk.TargetInfo targetInfo = sdkLoader.getTargetInfo ( targetHash , buildToolRevision , logger ) ; androidBuilder.setTargetInfo ( sdkInfo , targetInfo ) ; }
Source:
public static java.util.Date getDate ( android.security.keymaster.KeyCharacteristics keyCharacteristics , int tag ) { java.util.Date result = keyCharacteristics.hwEnforced.getDate ( tag , null ) ; if ( result == null ) { result = keyCharacteristics.swEnforced.getDate ( tag , null ) ; } return result ; }

Target:
public static int [ ] getKeymasterBlockModesFromJcaBlockModes ( java.lang.String [ ] jcaBlockModes ) { if ( ( jcaBlockModes == null ) || ( ( jcaBlockModes.length ) == 0 ) ) { return libcore.util.EmptyArray.INT ; } int [ ] result = new int [ jcaBlockModes.length ] ; for ( int i = 0 ; i < ( jcaBlockModes.length ) ; i ++ ) { result [ i ] = android.security.KeymasterUtils.getKeymasterBlockModeFromJcaBlockMode ( jcaBlockModes [ i ] ) ; } return result ; }
Source:
private java.lang.String fileLineInfo ( org.w3c.dom.Node node , java.lang.String defaultName ) { java.lang.String name = xmlFileName ( node , defaultName ) ; int line = com.android.manifmerger.XmlUtils.extractLineNumber ( node ) ; if ( line <= 0 ) { return name ; } else { return ( name + ':' ) + line ; } }

Target:
private java.util.List < org.w3c.dom.Element > findElements ( @ com.android.annotations.NonNull org.w3c.dom.Document doc , @ com.android.annotations.NonNull java.lang.String path , @ com.android.annotations.Nullable java.lang.String attrName , @ com.android.annotations.Nullable java.lang.String attrValue ) { java.util.List < org.w3c.dom.Element > elements = new java.util.ArrayList < org.w3c.dom.Element > ( ) ; if ( attrName != null ) { assert attrValue != null ; path = java.lang.String.format ( "%1$s[@%2$s:%3$s='%4$s']" , path , NS_PREFIX , attrName , attrValue ) ; } try { org.w3c.dom.NodeList results = ( ( org.w3c.dom.NodeList ) ( mXPath.evaluate ( path , doc , javax.xml.xpath.XPathConstants.NODESET ) ) ) ; if ( ( results != null ) && ( ( results.getLength ( ) ) > 0 ) ) { for ( int i = 0 ; i < ( results.getLength ( ) ) ; i ++ ) { org.w3c.dom.Node n = results.item ( i ) ; assert n instanceof org.w3c.dom.Element ; if ( n instanceof org.w3c.dom.Element ) { elements.add ( ( ( org.w3c.dom.Element ) ( n ) ) ) ; } else { mLog.error ( Severity.ERROR , xmlFileAndLine ( doc ) , "Unexpected Node type %s when evaluating %s" , n.getClass ( ) . getName ( ) , path ) ; } } } } catch ( javax.xml.xpath.XPathExpressionException e ) { mLog.error ( Severity.ERROR , xmlFileAndLine ( doc ) , "XPath error on expr %s: %s" , path , e.toString ( ) ) ; } return elements ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mWifiManager = ( ( android.net.wifi.WifiManager ) ( getContext ( ) . getSystemService ( Context.WIFI_SERVICE ) ) ) ; mCm = ( ( android.net.ConnectivityManager ) ( getContext ( ) . getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; android.content.pm.PackageManager packageManager = mContext.getPackageManager ( ) ; mHasWifi = packageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI ) ; mHasTelephony = packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ; mBuilder = new android.app.job.JobInfo.Builder ( android.jobscheduler.cts.ConnectivityConstraintTest.CONNECTIVITY_JOB_ID , kJobServiceComponent ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mWifiManager = ( ( android.net.wifi.WifiManager ) ( getContext ( ) . getSystemService ( Context.WIFI_SERVICE ) ) ) ; mCm = ( ( android.net.ConnectivityManager ) ( getContext ( ) . getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; android.content.pm.PackageManager packageManager = mContext.getPackageManager ( ) ; mHasWifi = packageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI ) ; mHasTelephony = packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ; mBuilder = new android.app.job.JobInfo.Builder ( android.jobscheduler.cts.ConnectivityConstraintTest.CONNECTIVITY_JOB_ID , kJobServiceComponent ) ; mInitialWiFiState = mWifiManager.isWifiEnabled ( ) ; }
Source:
public android.view.View newView ( android.content.Context context , android.database.Cursor cursor , android.view.ViewGroup parent ) { return null ; }

Target:
public android.view.View newView ( android.content.Context context , android.database.Cursor cursor , android.view.ViewGroup parent ) { android.view.View view ; if ( ( cursor.getInt ( cursor.getColumnIndex ( com.android.email.activity.AccountSelectorAdapter.ROW_TYPE ) ) ) == ( com.android.email.activity.AccountSelectorAdapter.ROW_TYPE_HEADER ) ) { view = mInflater.inflate ( R.layout.action_bar_spinner_dropdown_header , parent , false ) ; } else { view = mInflater.inflate ( R.layout.action_bar_spinner_dropdown , parent , false ) ; } return view ; }
Source:
public synchronized void appendMessage ( final com.android.ddmuilib.logcat.LogCatMessage m ) { if ( ( mQ.remainingCapacity ( ) ) == 0 ) { mQ.poll ( ) ; } mQ.offer ( m ) ; }

Target:
public synchronized java.util.List < com.android.ddmuilib.logcat.LogCatMessage > ensureSpace ( int messageCount ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > l = new java.util.ArrayList < com.android.ddmuilib.logcat.LogCatMessage > ( messageCount ) ; while ( ( mQ.remainingCapacity ( ) ) < messageCount ) { l.add ( mQ.poll ( ) ) ; } return l ; }
Source:
public void run ( ) { if ( isDisposed ( ) ) { return ; } org.eclipse.ui.IEditorPart editor = getEditorDelegate ( ) . getEditor ( ) ; org.eclipse.ui.IWorkbenchPage page = editor.getSite ( ) . getPage ( ) ; java.lang.Boolean zoomed = page.isPageZoomed ( ) ; if ( ( mWasZoomed ) != zoomed ) { if ( ( mWasZoomed ) != null ) { setFitScale ( true ) ; } mWasZoomed = zoomed ; } }

Target:
public void run ( ) { if ( isDisposed ( ) ) { return ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator coordinator = com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.get ( ) ; if ( coordinator != null ) { java.lang.Boolean zoomed = coordinator.isEditorMaximized ( ) ; if ( ( mWasZoomed ) != zoomed ) { if ( ( mWasZoomed ) != null ) { setFitScale ( true ) ; } mWasZoomed = zoomed ; } } }
Source:
private org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy getDelegate ( ) { if ( ! ( com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.getPrefs ( ) . getUseCustomXmlFormatter ( ) ) ) { if ( ( mDelegate ) == null ) { mDelegate = new org.eclipse.wst.xml.ui.internal.XMLFormattingStrategy ( ) ; } return mDelegate ; } return null ; }

Target:
private org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy getDelegate ( ) { if ( ( ! ( com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.getPrefs ( ) . getUseCustomXmlFormatter ( ) ) ) || ( ( ( mIsAndroid ) != null ) && ( ! ( mIsAndroid.booleanValue ( ) ) ) ) ) { if ( ( mDelegate ) == null ) { mDelegate = new org.eclipse.wst.xml.ui.internal.XMLFormattingStrategy ( ) ; } return mDelegate ; } return null ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod jmethod ) { com.android.jack.ir.ast.JVariable thisVar = jmethod.getThis ( ) ; if ( thisVar != null ) { if ( ( thisVar.getMarker ( com.android.jack.analysis.DefinitionMarker.class ) ) == null ) { thisVar.addMarker ( new com.android.jack.analysis.DefinitionMarker ( thisVar ) ) ; } } return super . visit ( jmethod ) ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod jmethod ) { com.android.jack.ir.ast.JVariable thisVar = jmethod.getThis ( ) ; if ( thisVar != null ) { if ( ! ( thisVar.containsMarker ( com.android.jack.analysis.DefinitionMarker.class ) ) ) { thisVar.addMarkerIfAbsent ( new com.android.jack.analysis.DefinitionMarker ( thisVar ) ) ; } } return super . visit ( jmethod ) ; }
Source:
public void enable ( ) { if ( ( mSensor ) == null ) { android.util.Log.w ( android.view.WindowOrientationListener.TAG , "Cannot detect sensors. Not enabled" ) ; return ; } if ( ( mEnabled ) == false ) { if ( android.view.WindowOrientationListener.LOG ) { android.util.Log.d ( android.view.WindowOrientationListener.TAG , "WindowOrientationListener enabled" ) ; } mSensorManager.registerListener ( mSensorEventListener , mSensor , mRate ) ; mEnabled = true ; } }

Target:
public void enable ( ) { if ( ( mSensor ) == null ) { android.util.Log.w ( android.view.WindowOrientationListener.TAG , "Cannot detect sensors. Not enabled" ) ; return ; } if ( ( mEnabled ) == false ) { if ( android.view.WindowOrientationListener.LOG ) { android.util.Log.d ( android.view.WindowOrientationListener.TAG , "WindowOrientationListener enabled" ) ; } mSensorEventListener.reset ( ) ; mSensorManager.registerListener ( mSensorEventListener , mSensor , mRate ) ; mEnabled = true ; } }
Source:
private static int [ ] mapToNon2OrderBitColor ( byte [ ] data , int valueIndex , int length , int [ ] colorArray , int bits ) { if ( 0 == ( 8 % bits ) ) { android.util.Log.e ( com.android.internal.telephony.IccUtils.LOG_TAG , "not odd number of color" ) ; return com.android.internal.telephony.IccUtils.mapTo2OrderBitColor ( data , valueIndex , length , colorArray , bits ) ; } int [ ] resultArray = new int [ length ] ; return resultArray ; }

Target:
private static int [ ] mapToNon2OrderBitColor ( byte [ ] data , int valueIndex , int length , int [ ] colorArray , int bits ) { if ( 0 == ( 8 % bits ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.IccUtils.LOG_TAG , "not odd number of color" ) ; return com.android.internal.telephony.IccUtils.mapTo2OrderBitColor ( data , valueIndex , length , colorArray , bits ) ; } int [ ] resultArray = new int [ length ] ; return resultArray ; }
Source:
private static void onSubscribeTerminated ( int subscribeId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onSubscribeTerminated: subscribeId=" + subscribeId ) + ", status=" ) + status ) ) ; } com.android.server.wifi.aware.WifiAwareStateManager.getInstance ( ) . onSessionTerminatedNotification ( subscribeId , com.android.server.wifi.aware.WifiAwareNative.translateHalStatusToAwareSessionCallbackTerminate ( status ) , false ) ; }

Target:
private static void onPublishTerminated ( int publishId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onPublishTerminated: publishId=" + publishId ) + ", status=" ) + status ) ) ; com.android.server.wifi.aware.WifiAwareStateManager.getInstance ( ) . onSessionTerminatedNotification ( publishId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ) , true ) ; }
Source:
static com.android.cts.verifier.TestListAdapter.TestListItem createInteractiveTestItem ( android.app.Activity activity , java.lang.String id , int titleRes , int infoRes , com.android.cts.verifier.IntentDrivenTestActivity.ButtonInfo [ ] buttonInfos ) { return com.android.cts.verifier.TestListAdapter.TestListItem.newTest ( activity , titleRes , id , new android.content.Intent ( activity , com.android.cts.verifier.IntentDrivenTestActivity.class ) . putExtra ( IntentDrivenTestActivity.EXTRA_ID , id ) . putExtra ( IntentDrivenTestActivity.EXTRA_TITLE , titleRes ) . putExtra ( IntentDrivenTestActivity.EXTRA_INFO , infoRes ) . putExtra ( IntentDrivenTestActivity.EXTRA_BUTTONS , buttonInfos ) ) ; }

Target:
static com.android.cts.verifier.TestListAdapter.TestListItem createTestItem ( android.app.Activity activity , java.lang.String id , int titleRes , android.content.Intent intent ) { intent.putExtra ( com.android.cts.verifier.managedprovisioning.DeviceOwnerPositiveTestActivity.EXTRA_TEST_ID , id ) ; return com.android.cts.verifier.TestListAdapter.TestListItem.newTest ( activity , titleRes , id , intent , null ) ; }
Source:
public android.telephony.ims.feature.MMTelFeature onCreateMMTelImsFeature ( int slotId ) { android.util.Log.i ( com.android.phone.testapps.imstestapp.TestImsService.LOG_TAG , "TestImsService: onCreateMMTelImsFeature" ) ; return mTestMmTelFeature ; }

Target:
public void onCreate ( ) { android.util.Log.i ( com.android.phone.testapps.imstestapp.TestImsService.LOG_TAG , "TestImsService: onCreate" ) ; mImsRegistration = com.android.phone.testapps.imstestapp.TestImsRegistrationImpl.getInstance ( ) ; mTestMmTelFeature = com.android.phone.testapps.imstestapp.TestMmTelFeatureImpl.getInstance ( ) ; mTestRcsFeature = new com.android.phone.testapps.imstestapp.TestRcsFeatureImpl ( ) ; mTestImsConfig = com.android.phone.testapps.imstestapp.TestImsConfigImpl.getInstance ( ) ; com.android.phone.testapps.imstestapp.TestImsService.mInstance = this ; }
Source:
private int getErrorType ( int infoType ) { int error = - 1 ; switch ( infoType ) { case DrmInfoRequest.TYPE_REGISTRATION_INFO : error = DrmErrorEvent.TYPE_REGISTRATION_FAILED ; break ; case DrmInfoRequest.TYPE_UNREGISTRATION_INFO : error = DrmErrorEvent.TYPE_UNREGISTRATION_FAILED ; break ; case DrmInfoRequest.TYPE_RIGHTS_ACQUISITION_INFO : error = DrmErrorEvent.TYPE_RIGHTS_ACQUISITION_FAILED ; break ; } return error ; }

Target:
private int getErrorType ( int infoType ) { int error = - 1 ; switch ( infoType ) { case DrmInfoRequest.TYPE_REGISTRATION_INFO : case DrmInfoRequest.TYPE_UNREGISTRATION_INFO : case DrmInfoRequest.TYPE_RIGHTS_ACQUISITION_INFO : error = DrmErrorEvent.TYPE_PROCESS_DRM_INFO_FAILED ; break ; } return error ; }
Source:
public final char getChar ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } char result = ( ( char ) ( this . block.peekShort ( ( ( offset ) + ( position ) ) , order ) ) ) ; position = newPosition ; return result ; }

Target:
public final long getLong ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.LONG ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } long result = this . block.peekLong ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }
Source:
private static void scheduleAlarm ( android.content.Context context , long delayMillis , android.content.Intent intent ) { android.app.PendingIntent alarmIntent = android.app.PendingIntent.getBroadcast ( context , 0 , intent , PendingIntent.FLAG_CANCEL_CURRENT ) ; android.app.AlarmManager alarmMgr = ( ( android.app.AlarmManager ) ( context.getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarmMgr.set ( AlarmManager.ELAPSED_REALTIME_WAKEUP , ( ( android.os.SystemClock.elapsedRealtime ( ) ) + delayMillis ) , alarmIntent ) ; }

Target:
private static void scheduleAlarm ( android.content.Context context , long delayMillis , android.content.Intent intent ) { android.app.PendingIntent alarmIntent = com.android.voicemail.impl.transcribe.GetTranscriptReceiver.getPendingIntent ( context , intent , PendingIntent.FLAG_UPDATE_CURRENT ) ; android.app.AlarmManager alarmMgr = ( ( android.app.AlarmManager ) ( context.getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarmMgr.set ( AlarmManager.ELAPSED_REALTIME_WAKEUP , ( ( android.os.SystemClock.elapsedRealtime ( ) ) + delayMillis ) , alarmIntent ) ; }
Source:
public void testPownF32_2_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_2 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 2 ] ; android.renderscript.cts.RSUtils.genRandom ( 11329265 , 32 , 1 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n2 ( nAlloc ) ; doF32_2_relaxed ( 11329265 , 128 ) ; }

Target:
public void testPownF32_2_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_2 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 2 ] ; android.renderscript.cts.RSUtils.genRandomInts ( 11329265 , 32 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n2 ( nAlloc ) ; doF32_2_relaxed ( 11329265 , 128 ) ; }
Source:
public static java.io.InputStream getEntryInputStream ( java.util.zip.ZipFile zipFile , java.lang.String entryPath ) throws java.io.IOException { java.io.InputStream result = com.intellij.updater.Utils.findEntryInputStream ( zipFile , entryPath ) ; if ( result == null ) throw new java.io.IOException ( ( ( "Entry " + entryPath ) + " not found" ) ) ; Runner.logger.info ( ( "entryPath: " + entryPath ) ) ; return result ; }

Target:
public static java.util.zip.ZipEntry getZipEntry ( java.util.zip.ZipFile zipFile , java.lang.String entryPath ) throws java.io.IOException { java.util.zip.ZipEntry entry = zipFile.getEntry ( entryPath ) ; if ( entry == null ) throw new java.io.IOException ( ( ( "Entry " + entryPath ) + " not found" ) ) ; Runner.logger.info ( ( "entryPath: " + entryPath ) ) ; return entry ; }
Source:
public java.lang.reflect.Type getGenericSuperclass ( ) { java.lang.reflect.Type genericSuperclass = getSuperclass ( ) ; if ( genericSuperclass == null ) { return null ; } java.lang.String annotationSignature = libcore.reflect.AnnotationAccess.getSignature ( this ) ; if ( annotationSignature != null ) { libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( getClassLoader ( ) ) ; parser.parseForClass ( this , annotationSignature ) ; genericSuperclass = parser.superclassType ; } return libcore.reflect.Types.getType ( genericSuperclass ) ; }

Target:
public java.lang.reflect.Type getGenericSuperclass ( ) { java.lang.reflect.Type genericSuperclass = getSuperclass ( ) ; if ( genericSuperclass == null ) { return null ; } java.lang.String annotationSignature = getSignatureAttribute ( ) ; if ( annotationSignature != null ) { libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( getClassLoader ( ) ) ; parser.parseForClass ( this , annotationSignature ) ; genericSuperclass = parser.superclassType ; } return libcore.reflect.Types.getType ( genericSuperclass ) ; }
Source:
public boolean onMenuItemClick ( android.view.MenuItem item ) { openTab ( extra , mTabControl.getCurrentTab ( ) , true , true ) ; return false ; }

Target:
public boolean onMenuItemClick ( android.view.MenuItem item ) { if ( com.android.browser.Controller.isImageViewableUri ( android.net.Uri.parse ( extra ) ) ) { openTab ( extra , mTabControl.getCurrentTab ( ) , true , true ) ; } else { android.util.Log.e ( com.android.browser.Controller.LOGTAG , ( ( "Refusing to view image with invalid URI, \"" + extra ) + "\"" ) ) ; } return false ; }
Source:
public void testCase ( ) { java.lang.String regex = "(" ; try { org.apache.harmony.regex.tests.java.util.regex.Pattern.compile ( regex ) ; fail ( "PatternSyntaxException expected" ) ; } catch ( java.util.regex.PatternSyntaxException e ) { assertEquals ( 1 , e.getIndex ( ) ) ; assertEquals ( regex , e.getPattern ( ) ) ; } }

Target:
public void testCase ( ) { java.lang.String regex = "(" ; try { java.util.regex.Pattern.compile ( regex ) ; fail ( "PatternSyntaxException expected" ) ; } catch ( java.util.regex.PatternSyntaxException e ) { assertEquals ( 1 , e.getIndex ( ) ) ; assertEquals ( regex , e.getPattern ( ) ) ; } }
Source:
public void partDeactivated ( org.eclipse.ui.IWorkbenchPart part ) { if ( part == ( getEditor ( ) ) ) { if ( ( ( mGraphicalEditor ) != null ) && ( ( getEditor ( ) . getActivePage ( ) ) == ( mGraphicalEditorIndex ) ) ) { mGraphicalEditor.deactivated ( ) ; } } }

Target:
public void delegateDeactivated ( ) { if ( ( ( mGraphicalEditor ) != null ) && ( ( getEditor ( ) . getActivePage ( ) ) == ( mGraphicalEditorIndex ) ) ) { mGraphicalEditor.deactivated ( ) ; } }
Source:
public void testInvalidInsertionCarrierInfo ( ) { try { android.content.ContentValues contentValues = new android.content.ContentValues ( ) ; contentValues.put ( CarrierIdentification.GID1 , com.android.providers.telephony.CarrierIdProviderTest.dummy_gid1 ) ; mContentResolver.insert ( CarrierIdentification.CONTENT_URI , contentValues ) ; org.junit.Assert.fail ( "should throw an exception for null mccmnc" ) ; } catch ( java.lang.Exception e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; assertTrue ( ( e instanceof android.database.SQLException ) ) ; assertFalse ( mContentObserver.changed ) ; } }

Target:
public void testInvalidInsertionCarrierInfo ( ) { try { android.content.ContentValues contentValues = new android.content.ContentValues ( ) ; contentValues.put ( CarrierIdentification.All.GID1 , com.android.providers.telephony.CarrierIdProviderTest.dummy_gid1 ) ; mContentResolver.insert ( CarrierIdentification.All.CONTENT_URI , contentValues ) ; org.junit.Assert.fail ( "should throw an exception for null mccmnc" ) ; } catch ( android.database.SQLException e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; assertFalse ( mContentObserver.changed ) ; } }
Source:
public void testSetWifiDisabledSuccess ( ) throws java.lang.Exception { when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( false ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , false ) ) ; verify ( mWifiController ) . obtainMessageAndSend ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }

Target:
public void testSetWifiDisabledSuccess ( ) throws java.lang.Exception { when ( mWifiStateMachine.syncGetWifiApState ( ) ) . thenReturn ( WifiManager.WIFI_AP_STATE_DISABLED ) ; when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( false ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , false ) ) ; verify ( mWifiController ) . sendMessage ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }
Source:
public void setOverScrollMode ( final int mode ) { if ( ( mAwContents ) == null ) return ; if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setOverScrollMode ( mode ) ; } } ) ; return ; } mAwContents.setOverScrollMode ( mode ) ; }

Target:
public void run ( ) { setScrollBarStyle ( style ) ; }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/LayoutInflationTest.java:13: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" + " convertView = mInflater.inflate(R.layout.your_layout, null);\n" ) + " ~~~~\n" ) + "src/test/pkg/LayoutInflationTest.java:14: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" ) + " convertView = mInflater.inflate(R.layout.your_layout, null, true);\n" ) + " ~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( "src/test/pkg/LayoutInflationTest.java.txt=>src/test/pkg/LayoutInflationTest.java" , "res/layout/textsize.xml=>res/layout/your_layout.xml" , "res/layout/listseparator.xml=>res/layout-port/your_layout.xml" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/LayoutInflationTest.java:13: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" + " convertView = mInflater.inflate(R.layout.your_layout, null);\n" ) + " ~~~~\n" ) + "src/test/pkg/LayoutInflationTest.java:14: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" ) + " convertView = mInflater.inflate(R.layout.your_layout, null, true);\n" ) + " ~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( mLayoutInflationTest , copy ( "res/layout/textsize.xml" , "res/layout/your_layout.xml" ) , copy ( "res/layout/listseparator.xml" , "res/layout-port/your_layout.xml" ) ) ) ; }
Source:
private com.android.bubble.BubbleInfo generateBubbleInfo ( ) { return com.android.bubble.BubbleInfo.builder ( ) . setPrimaryColor ( context.getResources ( ) . getColor ( R.color.dialer_theme_color , null ) ) . setPrimaryIcon ( android.graphics.drawable.Icon.createWithResource ( context , R.drawable.on_going_call ) ) . setStartingYPosition ( context.getResources ( ) . getDimensionPixelOffset ( R.dimen.return_to_call_initial_offset_y ) ) . setActions ( generateActions ( ) ) . build ( ) ; }

Target:
private com.android.bubble.BubbleInfo generateBubbleInfo ( ) { return com.android.bubble.BubbleInfo.builder ( ) . setPrimaryColor ( context.getResources ( ) . getColor ( R.color.dialer_theme_color , null ) ) . setPrimaryIcon ( android.graphics.drawable.Icon.createWithResource ( context , R.drawable.on_going_call ) ) . setStartingYPosition ( ( com.android.incallui.InCallPresenter.getInstance ( ) . shouldStartInBubbleMode ( ) ? ( context.getResources ( ) . getDisplayMetrics ( ) . heightPixels ) / 2 : context.getResources ( ) . getDimensionPixelOffset ( R.dimen.return_to_call_initial_offset_y ) ) ) . setActions ( generateActions ( ) ) . build ( ) ; }
Source:
public int getBatteryLevel ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth disabled. Cannot get remote device battery level" ) ; return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; } try { return android.bluetooth.BluetoothDevice.sService.getBatteryLevel ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; }

Target:
public int getBatteryLevel ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth disabled. Cannot get remote device battery level" ) ; return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; } try { return service.getBatteryLevel ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; }
Source:
public void addProximityAlert ( double latitude , double longitude , float radius , long expiration , android.app.PendingIntent intent , java.lang.String packageName ) { validatePendingIntent ( intent ) ; try { synchronized ( mLock ) { addProximityAlertLocked ( latitude , longitude , radius , expiration , intent , packageName ) ; } } catch ( java.lang.SecurityException se ) { throw se ; } catch ( java.lang.IllegalArgumentException iae ) { throw iae ; } catch ( java.lang.Exception e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "addProximityAlert got exception:" , e ) ; } }

Target:
private void handleLocationChanged ( android.location.Location location , boolean passive ) { java.lang.String provider = location.getProvider ( ) ; if ( ! passive ) { mPassiveProvider.updateLocation ( location ) ; } synchronized ( mLock ) { if ( isAllowedBySettingsLocked ( provider , mCurrentUserId ) ) { handleLocationChangedLocked ( location , passive ) ; } } }
Source:
public void leConnectionUpdate ( int clientIf , java.lang.String address , int minConnectionInterval , int maxConnectionInterval , int slaveLatency , int supervisionTimeout ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) { return ; } service.leConnectionUpdate ( clientIf , address , minConnectionInterval , maxConnectionInterval , slaveLatency , supervisionTimeout ) ; }

Target:
public void leConnectionUpdate ( int clientIf , java.lang.String address , int minConnectionInterval , int maxConnectionInterval , int slaveLatency , int supervisionTimeout , int minConnectionEventLen , int maxConnectionEventLen ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) { return ; } service.leConnectionUpdate ( clientIf , address , minConnectionInterval , maxConnectionInterval , slaveLatency , supervisionTimeout , minConnectionEventLen , maxConnectionEventLen ) ; }
Source:
private boolean findMinMat4 ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinMat ( RS , seed , size , 4 , com.android.rs.test.Element.MATRIX_4X4 ( RS ) , ( com.android.rs.test.Allocation input ) -> s.reduce_findMinMat4 ( input ) . get ( ) ) ; }

Target:
private boolean findMinMat4 ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinMat ( RS , seed , size , 4 , android.renderscript.Element.MATRIX_4X4 ( RS ) , ( android.renderscript.Allocation input ) -> s.reduce_findMinMat4 ( input ) . get ( ) ) ; }
Source:
protected boolean isFilterStopped ( android.content.pm.PackageParser.ServiceIntentInfo filter ) { android.content.pm.PackageParser.Package p = filter.service.owner ; if ( p != null ) { com.android.server.pm.PackageSetting ps = ( ( com.android.server.pm.PackageSetting ) ( p.mExtras ) ) ; if ( ps != null ) { return ( ps.stopped ) && ( ( ( ps.pkgFlags ) & ( android.content.pm.ApplicationInfo.FLAG_SYSTEM ) ) == 0 ) ; } } return false ; }

Target:
protected boolean isFilterStopped ( android.content.pm.PackageParser.ServiceIntentInfo filter , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return true ; android.content.pm.PackageParser.Package p = filter.service.owner ; if ( p != null ) { com.android.server.pm.PackageSetting ps = ( ( com.android.server.pm.PackageSetting ) ( p.mExtras ) ) ; if ( ps != null ) { return ( ps.getStopped ( userId ) ) && ( ( ( ps.pkgFlags ) & ( android.content.pm.ApplicationInfo.FLAG_SYSTEM ) ) == 0 ) ; } } return false ; }
Source:
void startScan ( ) { ( this . scansStarted ) ++ ; isScanning = true ; startTime = java.lang.System.currentTimeMillis ( ) ; }

Target:
void startScan ( ) { ( this . scansStarted ) ++ ; isScanning = true ; startTime = java.lang.System.currentTimeMillis ( ) ; com.android.bluetooth.btservice.BluetoothProto.ScanEvent scanEvent = new com.android.bluetooth.btservice.BluetoothProto.ScanEvent ( ) ; scanEvent.setScanEventType ( BluetoothProto.ScanEvent.SCAN_EVENT_START ) ; scanEvent.setScanTechnologyType ( BluetoothProto.ScanEvent.SCAN_TECH_TYPE_LE ) ; scanEvent.setInitiator ( appName ) ; scanEvent.setEventTimeMillis ( java.lang.System.currentTimeMillis ( ) ) ; synchronized ( mScanEvents ) { if ( ( mScanEvents.size ( ) ) == ( com.android.bluetooth.gatt.ContextMap.NUM_SCAN_EVENTS_KEPT ) ) mScanEvents.remove ( 0 ) ; mScanEvents.add ( scanEvent ) ; } }
Source:
public void visitLocalVariableTypeInfo ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , proguard.classfile.editor.LocalVariableTypeInfo localVariableTypeInfo ) { int newStartPC = newInstructionOffset ( localVariableTypeInfo.u2startPC ) ; int newEndPC = newInstructionOffset ( ( ( localVariableTypeInfo.u2startPC ) + ( localVariableTypeInfo.u2length ) ) ) ; localVariableTypeInfo.u2length = newEndPC - newStartPC ; localVariableTypeInfo.u2startPC = newStartPC ; }

Target:
public void visitLocalVariableTypeInfo ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , proguard.classfile.editor.LocalVariableTypeInfo localVariableTypeInfo ) { localVariableTypeInfo.u2length = newBranchOffset ( localVariableTypeInfo.u2startPC , localVariableTypeInfo.u2length ) ; localVariableTypeInfo.u2startPC = newInstructionOffset ( localVariableTypeInfo.u2startPC ) ; }
Source:
public void run ( ) { synchronized ( this ) { viewport = model.getViewport ( ) ; zoom = model.getZoom ( ) ; setTransform ( ) ; } }

Target:
public void run ( ) { synchronized ( this ) { tree = model.getTree ( ) ; selectedNode = model.getSelection ( ) ; if ( ( tree ) == null ) { viewport = null ; } else { viewport = new com.android.hierarchyviewerlib.ui.util.DrawableViewNode.Rectangle ( 0 , ( ( ( tree.top ) + ( ( com.android.hierarchyviewerlib.ui.util.DrawableViewNode.NODE_HEIGHT ) / 2 ) ) - ( ( getBounds ( ) . height ) / 2 ) ) , getBounds ( ) . width , getBounds ( ) . height ) ; } } }
Source:
public void setUiTTYMode ( android.content.Context context , int uiTtyMode , android.os.Message onComplete ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { mMmTelFeatureConnection.setUiTTYMode ( uiTtyMode , onComplete ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "setTTYMode()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public void setUiTTYMode ( android.content.Context context , int uiTtyMode , android.os.Message onComplete ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { mMmTelFeatureConnection.setUiTTYMode ( uiTtyMode , onComplete ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "setTTYMode()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public java.lang.String getDisplayName ( ) { return ( ( ( name ) + " (" ) + ( getDeviceConfigurationCount ( ) ) ) + ")" ; }

Target:
public java.lang.String getDisplayName ( ) { int deviceConfigurationCount = getDeviceConfigurationCount ( ) ; if ( ( kind ) != ( com.android.tools.idea.run.CloudConfiguration.Kind.SINGLE_DEVICE ) ) { return ( ( ( name ) + " (" ) + deviceConfigurationCount ) + ")" ; } if ( deviceConfigurationCount > 0 ) { return name ; } return ( name ) + " (not configured)" ; }
Source:
public void testOnSaveInstanceState ( ) { startDialogActivity ( DialogStubActivity.TEST_ONSTART_AND_ONSTOP ) ; final android.app.stubs.TestDialog d = ( ( android.app.stubs.TestDialog ) ( mActivity.getDialog ( ) ) ) ; assertFalse ( d.isOnSaveInstanceStateCalled ) ; assertFalse ( TestDialog.isOnRestoreInstanceStateCalled ) ; final android.content.pm.PackageManager pm = mContext.getPackageManager ( ) ; if ( ! ( ( pm.hasSystemFeature ( PackageManager.FEATURE_SCREEN_LANDSCAPE ) ) && ( pm.hasSystemFeature ( PackageManager.FEATURE_SCREEN_PORTRAIT ) ) ) ) { return ; } android.app.stubs.OrientationTestUtils.toggleOrientationSync ( mActivity , mInstrumentation ) ; assertTrue ( d.isOnSaveInstanceStateCalled ) ; assertTrue ( TestDialog.isOnRestoreInstanceStateCalled ) ; }

Target:
public void testOnSaveInstanceState ( ) throws java.lang.InterruptedException { startDialogActivity ( DialogStubActivity.TEST_ONSTART_AND_ONSTOP ) ; final android.app.stubs.TestDialog d = ( ( android.app.stubs.TestDialog ) ( mActivity.getDialog ( ) ) ) ; final android.content.pm.PackageManager pm = mContext.getPackageManager ( ) ; if ( ! ( ( pm.hasSystemFeature ( PackageManager.FEATURE_SCREEN_LANDSCAPE ) ) && ( pm.hasSystemFeature ( PackageManager.FEATURE_SCREEN_PORTRAIT ) ) ) ) { return ; } d.onSaveInstanceStateObserver.startObserving ( ) ; TestDialog.onRestoreInstanceStateObserver.startObserving ( ) ; android.app.stubs.OrientationTestUtils.toggleOrientation ( mActivity ) ; d.onSaveInstanceStateObserver.await ( ) ; TestDialog.onRestoreInstanceStateObserver.await ( ) ; }
Source:
public java.lang.String getDeviceUserName ( ) { java.lang.String line = new vogar.commands.Command ( log , "ssh" , "-p" , java.lang.Integer.toString ( port ) , host , "-C" , "id" ) . execute ( ) . get ( 0 ) ; java.util.regex.Matcher m = java.util.regex.Pattern.compile ( "uid=\\d+\\((\\S+)\\) gid=\\d+\\(\\S+\\)" ) . matcher ( line ) ; return m.matches ( ) ? m.group ( 1 ) : "root" ; }

Target:
public java.lang.String getDeviceUserName ( ) { java.lang.String line = new vogar.commands.Command ( log , "ssh" , "-p" , java.lang.Integer.toString ( port ) , host , "-C" , "id" ) . execute ( ) . get ( 0 ) ; java.util.regex.Matcher m = java.util.regex.Pattern.compile ( "^uid=\\d+\\((\\S+)\\) gid=\\d+\\(\\S+\\).*" ) . matcher ( line ) ; return m.matches ( ) ? m.group ( 1 ) : "root" ; }
Source:
protected void setUp ( ) throws java.lang.Exception { mAndroidKeyStore = android.security.android.security.KeyStore.getInstance ( ) ; assertTrue ( mAndroidKeyStore.reset ( ) ) ; assertFalse ( mAndroidKeyStore.isUnlocked ( ) ) ; assertTrue ( mAndroidKeyStore.password ( "1111" ) ) ; assertTrue ( mAndroidKeyStore.isUnlocked ( ) ) ; assertEquals ( 0 , mAndroidKeyStore.saw ( "" ) . length ) ; mKeyStore = java.security.KeyStore.getInstance ( AndroidKeyStore.NAME ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { mAndroidKeyStore = android.security.android.security.KeyStore.getInstance ( ) ; assertTrue ( mAndroidKeyStore.reset ( ) ) ; assertFalse ( mAndroidKeyStore.isUnlocked ( ) ) ; mKeyStore = java.security.KeyStore.getInstance ( "AndroidKeyStore" ) ; }
Source:
public void setCarrierInfoForImsiEncryption ( int subId , java.lang.String callingPackage , android.telephony.ImsiEncryptionInfo imsiEncryptionInfo ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "setCarrierInfoForImsiEncryption" ) ) ) { return ; } phone.setCarrierInfoForImsiEncryption ( imsiEncryptionInfo ) ; } else { loge ( ( "setCarrierInfoForImsiEncryption phone is null for Subscription:" + subId ) ) ; return ; } }

Target:
public void setCarrierInfoForImsiEncryption ( int subId , java.lang.String callingPackage , android.telephony.ImsiEncryptionInfo imsiEncryptionInfo ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , subId , callingPackage , "setCarrierInfoForImsiEncryption" ) ) ) { return ; } enforceModifyPermission ( ) ; phone.setCarrierInfoForImsiEncryption ( imsiEncryptionInfo ) ; } else { loge ( ( "setCarrierInfoForImsiEncryption phone is null for Subscription:" + subId ) ) ; return ; } }
Source:
public static int mapArtVersionToApi ( int artVersion ) { if ( artVersion >= 79 ) { return 24 ; } if ( artVersion >= 64 ) { return 23 ; } if ( artVersion >= 45 ) { return 22 ; } if ( artVersion >= 39 ) { return 21 ; } return 19 ; }

Target:
public static int mapArtVersionToApi ( int artVersion ) { if ( artVersion >= 87 ) { return 26 ; } if ( artVersion >= 79 ) { return 24 ; } if ( artVersion >= 64 ) { return 23 ; } if ( artVersion >= 45 ) { return 22 ; } if ( artVersion >= 39 ) { return 21 ; } return 19 ; }
Source:
public void testSecureRandomImplementationOrder ( ) { java.security.Provider srp = new libcore.java.security.ProviderTest.SRProvider ( ) ; try { int position = java.security.Security.insertProviderAt ( srp , 1 ) ; assertEquals ( 1 , position ) ; java.security.SecureRandom sr = new java.security.SecureRandom ( ) ; if ( ! ( sr.getAlgorithm ( ) . equals ( "SecureRandom1" ) ) ) { throw new java.lang.IllegalStateException ( ( "Expected SecureRandom1 was " + ( sr.getAlgorithm ( ) ) ) ) ; } } finally { java.security.Security.removeProvider ( srp.getName ( ) ) ; } }

Target:
public void setup ( ) { put ( "SecureRandom.SecureRandom1" , libcore.java.security.ProviderTest.SecureRandom1.class . getName ( ) ) ; put ( "SecureRandom.SecureRandom2" , libcore.java.security.ProviderTest.SecureRandom2.class . getName ( ) ) ; put ( "SecureRandom.SecureRandom3" , libcore.java.security.ProviderTest.SecureRandom3.class . getName ( ) ) ; }
Source:
void setGlobal ( android.renderscript.Script.FieldID fieldID , java.lang.Object obj ) { mBindings.put ( fieldID , obj ) ; android.renderscript.ScriptGroup.Closure.ValueAndSize vs = new android.renderscript.ScriptGroup.Closure.ValueAndSize ( mRS , obj ) ; mRS.nClosureSetGlobal ( getID ( mRS ) , fieldID.getID ( mRS ) , vs.value , vs.size ) ; }

Target:
void setGlobal ( android.renderscript.Script.FieldID fieldID , java.lang.Object obj ) { if ( obj instanceof android.renderscript.ScriptGroup.Future ) { obj = ( ( android.renderscript.ScriptGroup.Future ) ( obj ) ) . getValue ( ) ; } mBindings.put ( fieldID , obj ) ; android.renderscript.ScriptGroup.Closure.ValueAndSize vs = new android.renderscript.ScriptGroup.Closure.ValueAndSize ( mRS , obj ) ; mRS.nClosureSetGlobal ( getID ( mRS ) , fieldID.getID ( mRS ) , vs.value , vs.size ) ; }
Source:
public void onShowCustomView ( android.view.View view , android.webkit.WebChromeClient.CustomViewCallback cb ) { org.chromium.content.common.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onShowCustomView" ) ; mWebChromeClient.onShowCustomView ( view , cb ) ; } org.chromium.content.common.TraceEvent.end ( ) ; }

Target:
public void onShowCustomView ( android.view.View view , android.webkit.WebChromeClient.CustomViewCallback cb ) { org.chromium.base.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onShowCustomView" ) ; mWebChromeClient.onShowCustomView ( view , cb ) ; } org.chromium.base.TraceEvent.end ( ) ; }
Source:
private void testTrace ( java.lang.String traceName , java.lang.String threadName , java.lang.String expectedCallSequence ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( traceName ) ; int threadId = findThreadIdFromName ( threadName , traceData.getThreads ( ) ) ; assertTrue ( java.lang.String.format ( "Thread %s was not found in the trace" , threadName ) , ( threadId > 0 ) ) ; com.android.tools.perflib.vmtrace.Call call = traceData.getTopLevelCall ( threadId ) ; assertNotNull ( call ) ; java.lang.String actual = call.format ( new com.android.tools.perflib.vmtrace.VmTraceParserTest.CallFormatter ( traceData.getMethods ( ) ) ) ; assertEquals ( expectedCallSequence , actual ) ; }

Target:
private void testTrace ( java.lang.String traceName , java.lang.String threadName , java.lang.String expectedCallSequence ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( traceName ) ; com.android.tools.perflib.vmtrace.ThreadInfo thread = traceData.getThread ( threadName ) ; assertNotNull ( java.lang.String.format ( "Thread %s was not found in the trace" , threadName ) , thread ) ; com.android.tools.perflib.vmtrace.Call call = thread.getTopLevelCall ( ) ; assertNotNull ( call ) ; java.lang.String actual = call.format ( new com.android.tools.perflib.vmtrace.VmTraceParserTest.CallFormatter ( traceData.getMethods ( ) ) ) ; assertEquals ( expectedCallSequence , actual ) ; }