auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void setOperatorIdd ( java.lang.String operatorNumeric ) { java.lang.String idd = mHbpcdUtils.getIddByMcc ( java.lang.Integer.parseInt ( operatorNumeric.substring ( 0 , 3 ) ) ) ; if ( ( idd != null ) && ( ! ( idd.isEmpty ( ) ) ) ) { mPhone.setSystemProperty ( TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING , idd ) ; } else { mPhone.setSystemProperty ( TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING , "+" ) ; } }

Target:
protected void setOperatorIdd ( java.lang.String operatorNumeric ) { java.lang.String idd = mHbpcdUtils.getIddByMcc ( java.lang.Integer.parseInt ( operatorNumeric.substring ( 0 , 3 ) ) ) ; if ( ( idd != null ) && ( ! ( idd.isEmpty ( ) ) ) ) { mPhone.setGlobalSystemProperty ( TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING , idd ) ; } else { mPhone.setGlobalSystemProperty ( TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING , "+" ) ; } }
Source:
public boolean matchesCriteria ( java.lang.String vendor , android.net.nsd.NsdServiceInfo nsdServiceInfo ) { if ( ! ( android.text.TextUtils.equals ( vendor , mVendorInfo.mVendorID ) ) ) return false ; java.lang.String modelName = getModelName ( nsdServiceInfo ) ; if ( modelName != null ) { return com.android.printservice.recommendation.plugin.samsung.SamsungRecommendationPlugin.isSupportedModel ( modelName ) ; } return false ; }

Target:
public int getName ( ) { return R.string.plugin_vendor_samsung ; }
Source:
public java.lang.String getNamespace ( ) { if ( ( mNamespace ) == null ) { org.eclipse.core.resources.IFile manifestFile = com.android.ide.eclipse.adt.internal.project.AndroidManifestParser.getManifest ( mProject ) ; try { com.android.ide.eclipse.adt.internal.project.AndroidManifestParser data = com.android.ide.eclipse.adt.internal.project.AndroidManifestParser.parseForData ( manifestFile ) ; java.lang.String javaPackage = data.getPackage ( ) ; mNamespace = java.lang.String.format ( AndroidConstants.NS_CUSTOM_RESOURCES , javaPackage ) ; } catch ( org.eclipse.core.runtime.CoreException e ) { } } return mNamespace ; }

Target:
public java.lang.String getNamespace ( ) { if ( ( mNamespace ) == null ) { com.android.sdklib.xml.AndroidManifestParser.ManifestData manifestData = com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper.parseForData ( mProject ) ; if ( manifestData != null ) { java.lang.String javaPackage = manifestData.getPackage ( ) ; mNamespace = java.lang.String.format ( AndroidConstants.NS_CUSTOM_RESOURCES , javaPackage ) ; } } return mNamespace ; }
Source:
public int size ( ) { return tableOfContents.fieldIds.size ; }

Target:
private java.util.List < java.lang.String > readTypeNames ( java.util.List < java.lang.String > strings , java.util.List < java.lang.Integer > typeIds ) { java.lang.String [ ] result = new java.lang.String [ tableOfContents.typeIds.size ] ; for ( int i = 0 ; i < ( tableOfContents.typeIds.size ) ; ++ i ) { result [ i ] = strings.get ( typeIds.get ( i ) . intValue ( ) ) ; } return java.util.Arrays.asList ( result ) ; }
Source:
public android.net.NetworkCapabilities setNetworkSpecifier ( java.lang.String networkSpecifier ) { if ( ( ( android.text.TextUtils.isEmpty ( networkSpecifier ) ) == false ) && ( ( java.lang.Long.bitCount ( mTransportTypes ) ) != 1 ) ) { throw new java.lang.IllegalStateException ( ( "Must have a single transport specified to use " + "setNetworkSpecifier" ) ) ; } mNetworkSpecifier = networkSpecifier ; return this ; }

Target:
public android.net.NetworkCapabilities setNetworkSpecifier ( android.net.NetworkSpecifier networkSpecifier ) { if ( ( networkSpecifier != null ) && ( ( java.lang.Long.bitCount ( mTransportTypes ) ) != 1 ) ) { throw new java.lang.IllegalStateException ( ( "Must have a single transport specified to use " + "setNetworkSpecifier" ) ) ; } mNetworkSpecifier = networkSpecifier ; return this ; }
Source:
protected void onVoiceCallEnded ( ) { if ( ( mState ) == ( DctConstants.State.CONNECTED ) ) { if ( ! ( mCdmaPhone.mSST.isConcurrentVoiceAndDataAllowed ( ) ) ) { startNetStatPoll ( ) ; notifyDataConnection ( Phone.REASON_VOICE_CALL_ENDED ) ; } else { resetPollStats ( ) ; } notifyOffApnsOfAvailability ( Phone.REASON_VOICE_CALL_ENDED ) ; } else { mDataConnections.get ( 0 ) . resetRetryCount ( ) ; trySetupData ( Phone.REASON_VOICE_CALL_ENDED ) ; } }

Target:
protected void onVoiceCallEnded ( ) { if ( ( mState ) == ( DctConstants.State.CONNECTED ) ) { if ( ! ( mCdmaPhone.mSST.isConcurrentVoiceAndDataAllowed ( ) ) ) { startNetStatPoll ( ) ; startDataStallAlarm ( com.android.internal.telephony.cdma.DATA_STALL_NOT_SUSPECTED ) ; notifyDataConnection ( Phone.REASON_VOICE_CALL_ENDED ) ; } else { resetPollStats ( ) ; } notifyOffApnsOfAvailability ( Phone.REASON_VOICE_CALL_ENDED ) ; } else { mDataConnections.get ( 0 ) . resetRetryCount ( ) ; trySetupData ( Phone.REASON_VOICE_CALL_ENDED ) ; } }
Source:
void collectSuccessors ( @ javax.annotation.Nonnull java.util.ArrayList < com.android.jack.ir.ast.cfg.JBasicBlock > successors ) { super . collectSuccessors ( successors ) ; successors.add ( unhandledBlock ) ; successors.addAll ( catchBlocks ) ; }

Target:
public java.util.List < com.android.jack.ir.ast.cfg.JBasicBlock > getSuccessors ( ) { java.util.ArrayList < com.android.jack.ir.ast.cfg.JBasicBlock > successors = new java.util.ArrayList < > ( ) ; if ( hasPrimarySuccessor ( ) ) { successors.add ( getPrimarySuccessor ( ) ) ; } successors.add ( unhandledBlock ) ; successors.addAll ( catchBlocks ) ; return successors ; }
Source:
int findOffsetIndexForTimeInSeconds ( long seconds ) { int transition = java.util.Arrays.binarySearch ( mTransitions , seconds ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return - 1 ; } } return ( mTypes [ transition ] ) & 255 ; }

Target:
public int findTransitionIndex ( long seconds ) { int transition = java.util.Arrays.binarySearch ( mTransitions , seconds ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return - 1 ; } } return transition ; }
Source:
public static java.util.Map < java.lang.String , java.lang.Integer > retrieveJavaTimeFieldValueNames ( java.lang.String id , int field , int style , java.util.Locale locale ) { return null ; }

Target:
public static java.util.Map < java.lang.String , java.lang.Integer > retrieveFieldValueNames ( java.lang.String id , int field , int style , java.util.Locale locale ) { java.lang.String [ ] names = sun.util.locale.provider.CalendarDataUtility.getNames ( id , field , style , locale ) ; java.util.Map < java.lang.String , java.lang.Integer > result = new java.util.LinkedHashMap < > ( ) ; for ( int i = 0 ; i < ( names.length ) ; i ++ ) { result.put ( names [ i ] , i ) ; } return result ; }
Source:
public void reportSmsMemoryStatus ( boolean available , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_REPORT_SMS_MEMORY_STATUS , result ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( available ? 1 : 0 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ": " ) + available ) ) ; send ( rr ) ; }

Target:
public void reportSmsMemoryStatus ( boolean available , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_REPORT_SMS_MEMORY_STATUS , result , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( available ? 1 : 0 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ": " ) + available ) ) ; send ( rr ) ; }
Source:
public void notifyPendingSystemUpdate ( long updateReceivedTime ) { throwIfParentInstance ( "notifyPendingSystemUpdate" ) ; if ( ( mService ) != null ) { try { mService.notifyPendingSystemUpdate ( updateReceivedTime ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } } }

Target:
public boolean isApplicationHidden ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "isApplicationHidden" ) ; if ( ( mService ) != null ) { try { return mService.isApplicationHidden ( admin , mContext.getPackageName ( ) , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
public void mouseMoved ( java.awt.event.MouseEvent event ) { checkLockedRegion ( event.getX ( ) , event.getY ( ) ) ; updateHoverRegion ( event.getX ( ) , event.getY ( ) ) ; repaint ( ) ; }

Target:
public void mouseMoved ( java.awt.event.MouseEvent event ) { int x = imageXCoordinate ( event.getX ( ) ) ; int y = imageYCoordinate ( event.getY ( ) ) ; checkLockedRegion ( x , y ) ; updateHoverRegion ( x , y ) ; repaint ( ) ; }
Source:
private static void applyInvokeWithSecurityPolicy ( com.android.internal.os.ZygoteConnection.Arguments args , android.net.Credentials peer ) throws com.android.internal.os.ZygoteSecurityException { int peerUid = peer.getUid ( ) ; if ( ( ( ( args.invokeWith ) != null ) && ( peerUid != 0 ) ) && ( ( ( args.debugFlags ) & ( Zygote.DEBUG_ENABLE_JDWP ) ) == 0 ) ) { throw new com.android.internal.os.ZygoteSecurityException ( ( "Peer is permitted to specify an" + ( "explicit invoke-with wrapper command only for debuggable" + "applications." ) ) ) ; } }

Target:
private static void applyInvokeWithSecurityPolicy ( com.android.internal.os.ZygoteConnection.Arguments args , android.net.Credentials peer ) throws com.android.internal.os.ZygoteSecurityException { int peerUid = peer.getUid ( ) ; if ( ( ( ( args.invokeWith ) != null ) && ( peerUid != 0 ) ) && ( ( ( args.runtimeFlags ) & ( Zygote.DEBUG_ENABLE_JDWP ) ) == 0 ) ) { throw new com.android.internal.os.ZygoteSecurityException ( ( "Peer is permitted to specify an" + ( "explicit invoke-with wrapper command only for debuggable" + "applications." ) ) ) ; } }
Source:
public static void runUI ( ) { org.eclipse.swt.widgets.Display display = new org.eclipse.swt.widgets.Display ( ) ; org.eclipse.swt.widgets.Shell shell = new org.eclipse.swt.widgets.Shell ( display ) ; shell.setLayout ( new org.eclipse.swt.layout.FillLayout ( ) ) ; com.android.hierarchyvieweruilib.DeviceSelector deviceSelector = new com.android.hierarchyvieweruilib.DeviceSelector ( shell ) ; shell.open ( ) ; while ( ! ( shell.isDisposed ( ) ) ) { if ( ! ( display.readAndDispatch ( ) ) ) { display.sleep ( ) ; } } deviceSelector.terminate ( ) ; com.android.ddmuilib.ImageLoader.dispose ( ) ; display.dispose ( ) ; }

Target:
public void widgetDefaultSelected ( org.eclipse.swt.events.SelectionEvent arg0 ) { }
Source:
private java.lang.String getPrefixForNs ( org.w3c.dom.NamedNodeMap attributes , java.lang.String ns ) { if ( attributes != null ) { for ( int i = 0 , n = attributes.getLength ( ) ; i < n ; i ++ ) { org.w3c.dom.Attr attribute = ( ( org.w3c.dom.Attr ) ( attributes.item ( i ) ) ) ; if ( ( ns.equals ( attribute.getValue ( ) ) ) && ( ns.startsWith ( "xmlns:" ) ) ) { return attribute.getName ( ) ; } } } return null ; }

Target:
private java.lang.String getPrefixForNs ( org.w3c.dom.NamedNodeMap attributes , java.lang.String ns ) { if ( attributes != null ) { for ( int i = 0 , n = attributes.getLength ( ) ; i < n ; i ++ ) { org.w3c.dom.Attr attribute = ( ( org.w3c.dom.Attr ) ( attributes.item ( i ) ) ) ; if ( ( ns.equals ( attribute.getValue ( ) ) ) && ( ns.startsWith ( SdkConstants.XMLNS_PREFIX ) ) ) { return attribute.getName ( ) ; } } } return null ; }
Source:
private void setHighPerfModeEnabledNative ( boolean enable ) { if ( ! ( android.net.wifi.WifiNative.setSuspendOptimizationsCommand ( ( ! enable ) ) ) ) { loge ( "set suspend optimizations failed!" ) ; } if ( enable ) { if ( ! ( android.net.wifi.WifiNative.setPowerModeCommand ( android.net.wifi.WifiStateMachine.POWER_MODE_ACTIVE ) ) ) { loge ( "set power mode active failed!" ) ; } } else { if ( ! ( android.net.wifi.WifiNative.setPowerModeCommand ( android.net.wifi.WifiStateMachine.POWER_MODE_AUTO ) ) ) { loge ( "set power mode auto failed!" ) ; } } }

Target:
void handlePreDhcpSetup ( ) { if ( ! ( mBluetoothConnectionActive ) ) { mWifiNative.setBluetoothCoexistenceMode ( mWifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED ) ; } if ( mPowerSaveEnabled ) { mPowerSaveEnabled = false ; mWifiNative.setPowerSave ( mPowerSaveEnabled ) ; } }
Source:
public void testSetupDriverForClientMode ( ) throws java.lang.Exception { android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; android.net.wifi.IClientInterface clientInterface = org.mockito.Mockito.mock ( android.net.wifi.IClientInterface.class ) ; org.mockito.Mockito.when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( wificond ) ; org.mockito.Mockito.when ( wificond.createClientInterface ( ) ) . thenReturn ( clientInterface ) ; android.net.wifi.IClientInterface returnedClientInterface = mWificondControl.setupDriverForClientMode ( ) ; org.junit.Assert.assertEquals ( clientInterface , returnedClientInterface ) ; org.mockito.Mockito.verify ( wificond ) . createClientInterface ( ) ; }

Target:
public void testSetupDriverForClientMode ( ) throws java.lang.Exception { android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; android.net.wifi.IClientInterface clientInterface = getMockClientInterface ( ) ; org.mockito.Mockito.when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( wificond ) ; org.mockito.Mockito.when ( wificond.createClientInterface ( ) ) . thenReturn ( clientInterface ) ; android.net.wifi.IClientInterface returnedClientInterface = mWificondControl.setupDriverForClientMode ( ) ; org.junit.Assert.assertEquals ( clientInterface , returnedClientInterface ) ; org.mockito.Mockito.verify ( wificond ) . createClientInterface ( ) ; }
Source:
private void responseSignalStrength ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.SignalStrength sigStrength ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { android.telephony.SignalStrength ret = com.android.internal.telephony.RIL.convertHalSignalStrength ( sigStrength ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseIccCardStatus_1_2 ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_2.CardStatus cardStatus ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.uicc.IccCardStatus iccCardStatus = convertHalCardStatus ( cardStatus.base ) ; iccCardStatus.physicalSlotIndex = cardStatus.physicalSlotId ; iccCardStatus.atr = cardStatus.atr ; iccCardStatus.iccid = cardStatus.iccid ; mRil.riljLog ( ( "responseIccCardStatus: from HIDL: " + iccCardStatus ) ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , iccCardStatus ) ; } mRil.processResponseDone ( rr , responseInfo , iccCardStatus ) ; } }
Source:
public void registerListener ( ) { mPhone.listen ( mPhoneStateListener , ( ( ( ( ( ( android.telephony.PhoneStateListener.LISTEN_SERVICE_STATE ) | ( android.telephony.PhoneStateListener.LISTEN_SIGNAL_STRENGTHS ) ) | ( android.telephony.PhoneStateListener.LISTEN_CALL_STATE ) ) | ( android.telephony.PhoneStateListener.LISTEN_DATA_CONNECTION_STATE ) ) | ( android.telephony.PhoneStateListener.LISTEN_DATA_ACTIVITY ) ) | ( android.telephony.PhoneStateListener.LISTEN_CARRIER_NETWORK_CHANGE ) ) ) ; }

Target:
public void registerListener ( ) { mPhone.listen ( mPhoneStateListener , ( ( ( ( ( ( android.telephony.PhoneStateListener.LISTEN_SERVICE_STATE ) | ( android.telephony.PhoneStateListener.LISTEN_SIGNAL_STRENGTHS ) ) | ( android.telephony.PhoneStateListener.LISTEN_CALL_STATE ) ) | ( android.telephony.PhoneStateListener.LISTEN_DATA_CONNECTION_STATE ) ) | ( android.telephony.PhoneStateListener.LISTEN_DATA_ACTIVITY ) ) | ( android.telephony.PhoneStateListener.LISTEN_CARRIER_NETWORK_CHANGE ) ) ) ; mContext.getContentResolver ( ) . registerContentObserver ( android.provider.Settings.Global.getUriFor ( Global.MOBILE_DATA ) , true , mObserver ) ; mContext.getContentResolver ( ) . registerContentObserver ( android.provider.Settings.Global.getUriFor ( ( ( android.provider.Settings.Global.MOBILE_DATA ) + ( mSubscriptionInfo.getSubscriptionId ( ) ) ) ) , true , mObserver ) ; }
Source:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { if ( ( ( ! ( supportsScreenRotation ( ) ) ) || ( ! ( supportsSplitScreenMultiWindow ( ) ) ) ) || ( ! ( supportsMultiWindowMode ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation nor multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME ) ; launchActivity ( false , false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; rotateAndCheckSizes ( initialSizes ) ; }

Target:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME ) ; launchActivity ( false , false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; rotateAndCheckSizes ( initialSizes ) ; }
Source:
private static java.lang.String getStringValue ( @ com.android.annotations.NonNull com.android.io.IAbstractFile file , @ com.android.annotations.NonNull java.lang.String xPath ) throws com.android.io.StreamException , javax.xml.xpath.XPathExpressionException { javax.xml.xpath.XPath xpath = com.android.xml.AndroidXPathFactory.newXPath ( ) ; java.io.InputStream is = null ; try { is = file.getContents ( ) ; return xpath.evaluate ( xPath , new org.xml.sax.InputSource ( is ) ) ; } finally { com.google.common.io.Closeables.closeQuietly ( is ) ; } }

Target:
private static java.lang.String getStringValue ( @ com.android.annotations.NonNull com.android.io.IAbstractFile file , @ com.android.annotations.NonNull java.lang.String xPath ) throws com.android.io.StreamException , javax.xml.xpath.XPathExpressionException { javax.xml.xpath.XPath xpath = com.android.xml.AndroidXPathFactory.newXPath ( ) ; java.io.InputStream is = null ; try { is = file.getContents ( ) ; return xpath.evaluate ( xPath , new org.xml.sax.InputSource ( is ) ) ; } finally { try { com.google.common.io.Closeables.close ( is , true ) ; } catch ( java.io.IOException e ) { } } }
Source:
public boolean setAttribute ( java.lang.String uri , java.lang.String localName , java.lang.String value ) { mElement.setAttributeNS ( uri , localName , value ) ; return super . setAttribute ( uri , localName , value ) ; }

Target:
public boolean setAttribute ( java.lang.String uri , java.lang.String localName , java.lang.String value ) { if ( value == null ) { mElement.removeAttributeNS ( uri , localName ) ; } else { mElement.setAttributeNS ( uri , localName , value ) ; } return super . setAttribute ( uri , localName , value ) ; }
Source:
public static void addTasks ( java.util.List < com.google.appengine.api.datastore.Key > profilingPointKeys ) { com.google.appengine.api.taskqueue.Queue queue = com.google.appengine.api.taskqueue.QueueFactory.getQueue ( com.android.vts.servlet.VtsProfilingStatsJobServlet.QUEUE ) ; java.util.List < com.google.appengine.api.taskqueue.TaskOptions > tasks = new java.util.ArrayList < > ( ) ; for ( com.google.appengine.api.datastore.Key key : profilingPointKeys ) { java.lang.String keyString = com.google.appengine.api.datastore.KeyFactory.keyToString ( key ) ; tasks.add ( TaskOptions.Builder.withUrl ( com.android.vts.servlet.VtsProfilingStatsJobServlet.PROFILING_STATS_JOB_URL ) . param ( com.android.vts.servlet.VtsProfilingStatsJobServlet.PROFILING_POINT_KEY , keyString ) . method ( TaskOptions.Method.POST ) ) ; } com.android.vts.util.TaskQueueHelper.addToQueue ( queue , tasks ) ; }

Target:
public static void addTasks ( java.util.List < com.google.appengine.api.datastore.Key > profilingPointKeys ) { com.google.appengine.api.taskqueue.Queue queue = com.google.appengine.api.taskqueue.QueueFactory.getQueue ( com.android.vts.job.VtsProfilingStatsJobServlet.QUEUE ) ; java.util.List < com.google.appengine.api.taskqueue.TaskOptions > tasks = new java.util.ArrayList < > ( ) ; for ( com.google.appengine.api.datastore.Key key : profilingPointKeys ) { java.lang.String keyString = com.google.appengine.api.datastore.KeyFactory.keyToString ( key ) ; tasks.add ( TaskOptions.Builder.withUrl ( com.android.vts.job.VtsProfilingStatsJobServlet.PROFILING_STATS_JOB_URL ) . param ( com.android.vts.job.VtsProfilingStatsJobServlet.PROFILING_POINT_KEY , keyString ) . method ( TaskOptions.Method.POST ) ) ; } com.android.vts.util.TaskQueueHelper.addToQueue ( queue , tasks ) ; }
Source:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByOid ( org.bouncycastle.asn1.ASN1ObjectIdentifier oid ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.asn1.x9.X962NamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByOID ( oid ) ; } if ( params == null ) { params = org.bouncycastle.asn1.teletrust.TeleTrusTNamedCurves.getByOID ( oid ) ; } } return params ; }

Target:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByOid ( org.bouncycastle.asn1.ASN1ObjectIdentifier oid ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.crypto.ec.CustomNamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.x9.X962NamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByOID ( oid ) ; } if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByOID ( oid ) ; } if ( params == null ) { params = org.bouncycastle.asn1.teletrust.TeleTrusTNamedCurves.getByOID ( oid ) ; } } return params ; }
Source:
public void tearDown ( ) throws java.lang.Exception { for ( java.io.File file : mPolicyDir.listFiles ( ) ) { file.delete ( ) ; } mServiceContext = null ; mPolicyDir = null ; mActivityManager = null ; mStatsService = null ; mTime = null ; mService = null ; removeLocalServiceMocks ( ) ; com.android.server.LocalServices.removeServiceForTest ( com.android.server.net.NetworkPolicyManagerInternal.class ) ; super . tearDown ( ) ; }

Target:
public void removeFiles ( ) throws java.lang.Exception { for ( java.io.File file : mPolicyDir.listFiles ( ) ) { file.delete ( ) ; } }
Source:
public void mouseDragged ( java.awt.event.MouseEvent event ) { if ( ! ( checkLockedRegion ( event.getX ( ) , event.getY ( ) ) ) ) { moveLine ( event.getX ( ) , event.getY ( ) ) ; } }

Target:
public void mousePressed ( java.awt.event.MouseEvent event ) { updateDrawMode ( event ) ; int x = imageXCoordinate ( event.getX ( ) ) ; int y = imageYCoordinate ( event.getY ( ) ) ; startDrawingLine ( x , y ) ; if ( ( currentMode ) == ( com.android.draw9patch.ui.ImageViewer.DrawMode.PATCH ) ) { startEditingRegion ( x , y ) ; } else { hoverHighlightRegions.clear ( ) ; setCursor ( java.awt.Cursor.getDefaultCursor ( ) ) ; repaint ( ) ; } }
Source:
public void testValidateLocalRepositoryFile3 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/repository_sample_3.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( 3 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }

Target:
public void testValidateLocalRepositoryFile3 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/repository_sample_3.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getRepoValidator ( 3 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }
Source:
private static int getExpectedOutputSize ( java.lang.String algorithm ) { java.lang.Integer expected = libcore.javax.crypto.CipherTest.EXPECTED_OUTPUT_SIZE.get ( algorithm ) ; assertNotNull ( algorithm , expected ) ; return expected ; }

Target:
private static int getExpectedOutputSize ( java.lang.String algorithm , java.security.Key key ) { final int firstSlash = algorithm.indexOf ( '/' ) ; if ( firstSlash != ( - 1 ) ) { algorithm = algorithm.substring ( 0 , firstSlash ) ; } if ( "RSA" . equals ( libcore.javax.crypto.CipherTest.getBaseAlgorithm ( algorithm ) ) ) { return libcore.javax.crypto.CipherTest.getRSAModulusSize ( key ) ; } java.lang.Integer expected = libcore.javax.crypto.CipherTest.EXPECTED_OUTPUT_SIZE.get ( algorithm ) ; assertNotNull ( algorithm , expected ) ; return expected ; }
Source:
protected boolean start ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; try { registerReceiver ( mPbapBroadcastReceiver , filter ) ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "Unable to register pbapclient receiver" , e ) ; } mPbapClientStateMachine = new com.android.bluetooth.pbapclient.PbapClientStateMachine ( this ) ; com.android.bluetooth.pbapclient.PbapClientService.setPbapClientService ( this ) ; mPbapClientStateMachine.start ( ) ; return true ; }

Target:
protected boolean start ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; filter.addAction ( Intent.ACTION_USER_UNLOCKED ) ; try { registerReceiver ( mPbapBroadcastReceiver , filter ) ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "Unable to register pbapclient receiver" , e ) ; } mPbapClientStateMachine = new com.android.bluetooth.pbapclient.PbapClientStateMachine ( this ) ; com.android.bluetooth.pbapclient.PbapClientService.setPbapClientService ( this ) ; mPbapClientStateMachine.start ( ) ; return true ; }
Source:
public void testInitWith ( ) throws java.lang.Exception { com.android.build.gradle.internal.dsl.SigningConfigDsl debug = new com.android.build.gradle.internal.dsl.SigningConfigDsl ( com.android.builder.BuilderConstants.DEBUG ) ; com.android.build.gradle.internal.dsl.SigningConfigDsl foo = new com.android.build.gradle.internal.dsl.SigningConfigDsl ( "foo" ) . initWith ( debug ) ; assertEquals ( debug.getStoreLocation ( ) , foo.getStoreLocation ( ) ) ; assertEquals ( debug.getStorePassword ( ) , foo.getStorePassword ( ) ) ; assertEquals ( debug.getKeyAlias ( ) , foo.getKeyAlias ( ) ) ; assertEquals ( debug.getKeyPassword ( ) , foo.getKeyPassword ( ) ) ; }

Target:
public void testInitWith ( ) throws java.lang.Exception { com.android.build.gradle.internal.dsl.SigningConfigDsl debug = new com.android.build.gradle.internal.dsl.SigningConfigDsl ( com.android.builder.BuilderConstants.DEBUG ) ; com.android.build.gradle.internal.dsl.SigningConfigDsl foo = new com.android.build.gradle.internal.dsl.SigningConfigDsl ( "foo" ) . initWith ( debug ) ; assertEquals ( debug.getStoreFile ( ) , foo.getStoreFile ( ) ) ; assertEquals ( debug.getStorePassword ( ) , foo.getStorePassword ( ) ) ; assertEquals ( debug.getKeyAlias ( ) , foo.getKeyAlias ( ) ) ; assertEquals ( debug.getKeyPassword ( ) , foo.getKeyPassword ( ) ) ; }
Source:
final void setFrontOfTask ( ) { boolean foundFront = false ; final int numActivities = mActivities.size ( ) ; for ( int activityNdx = 0 ; activityNdx < numActivities ; ++ activityNdx ) { final com.android.server.am.ActivityRecord r = mActivities.get ( activityNdx ) ; if ( foundFront || ( r.finishing ) ) { r.frontOfTask = false ; } else { r.frontOfTask = true ; foundFront = true ; } } }

Target:
final void setFrontOfTask ( ) { boolean foundFront = false ; final int numActivities = mActivities.size ( ) ; for ( int activityNdx = 0 ; activityNdx < numActivities ; ++ activityNdx ) { final com.android.server.am.ActivityRecord r = mActivities.get ( activityNdx ) ; if ( foundFront || ( r.finishing ) ) { r.frontOfTask = false ; } else { r.frontOfTask = true ; foundFront = true ; } } if ( ( ! foundFront ) && ( numActivities > 0 ) ) { mActivities.get ( 0 ) . frontOfTask = true ; } }
Source:
private com.android.jack.ir.ast.JMethod findMethod ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface enclosingType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType ) { for ( com.android.jack.ir.ast.JMethod m : methodId.getMethods ( ) ) { if ( ( ( m.getEnclosingType ( ) ) == enclosingType ) && ( ( m.getType ( ) ) == returnType ) ) { return m ; } } return null ; }

Target:
private com.android.jack.ir.ast.JMethod findMethod ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface enclosingType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType ) { for ( com.android.jack.ir.ast.JMethod m : methodId.getMethods ( ) ) { if ( ( m.getEnclosingType ( ) . isSameType ( enclosingType ) ) && ( m.getType ( ) . isSameType ( returnType ) ) ) { return m ; } } return null ; }
Source:
public void testLogging ( ) { com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . addInfo ( "merging info" ) . addWarning ( "something weird happened" ) . addError ( "something bad happened" ) . build ( ) ; mergingReport.log ( mLoggerMock ) ; org.mockito.Mockito.verify ( mLoggerMock ) . info ( "merging info" ) ; org.mockito.Mockito.verify ( mLoggerMock ) . warning ( "something weird happened" ) ; org.mockito.Mockito.verify ( mLoggerMock ) . error ( null , "something bad happened" ) ; org.mockito.Mockito.verify ( mLoggerMock ) . info ( ActionRecorder.HEADER ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mLoggerMock ) ; }

Target:
public void testLogging ( ) { com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . addInfo ( "merging info" ) . addWarning ( "something weird happened" ) . addError ( "something bad happened" ) . build ( ) ; mergingReport.log ( mLoggerMock ) ; org.mockito.Mockito.verify ( mLoggerMock ) . info ( "merging info" ) ; org.mockito.Mockito.verify ( mLoggerMock ) . warning ( "something weird happened" ) ; org.mockito.Mockito.verify ( mLoggerMock ) . error ( null , "something bad happened" ) ; org.mockito.Mockito.verify ( mLoggerMock ) . info ( Actions.HEADER ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mLoggerMock ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; kernelStartTime = ( ( java.lang.System.currentTimeMillis ( ) ) / 1000 ) - ( java.lang.Integer.parseInt ( getDevice ( ) . executeShellCommand ( "cut -f1 -d. /proc/uptime" ) . trim ( ) ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.String uptime = getDevice ( ) . executeShellCommand ( "cat /proc/uptime" ) ; kernelStartTime = ( ( java.lang.System.currentTimeMillis ( ) ) / 1000 ) - ( java.lang.Integer.parseInt ( uptime.substring ( 0 , uptime.indexOf ( '.' ) ) ) ) ; }
Source:
public static int throwOnError ( int errorFlag ) throws android.hardware.camera2.legacy.LegacyExceptionUtils.BufferQueueAbandonedException { switch ( errorFlag ) { case android.hardware.camera2.utils.CameraBinderDecorator.NO_ERROR : { return android.hardware.camera2.utils.CameraBinderDecorator.NO_ERROR ; } case android.hardware.camera2.utils.CameraBinderDecorator.ENODEV : { throw new android.hardware.camera2.legacy.LegacyExceptionUtils.BufferQueueAbandonedException ( ) ; } } if ( errorFlag < 0 ) { throw new java.lang.UnsupportedOperationException ( ( "Unknown error " + errorFlag ) ) ; } return errorFlag ; }

Target:
public static int throwOnError ( int errorFlag ) throws android.hardware.camera2.legacy.LegacyExceptionUtils.BufferQueueAbandonedException { if ( errorFlag == ( android.hardware.camera2.utils.CameraBinderDecorator.NO_ERROR ) ) { return android.hardware.camera2.utils.CameraBinderDecorator.NO_ERROR ; } else if ( errorFlag == ( - ( android.system.OsConstants.ENODEV ) ) ) { throw new android.hardware.camera2.legacy.LegacyExceptionUtils.BufferQueueAbandonedException ( ) ; } if ( errorFlag < 0 ) { throw new java.lang.UnsupportedOperationException ( ( "Unknown error " + errorFlag ) ) ; } return errorFlag ; }
Source:
public void setModel ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo rootViewInfo ) { mRootWrapper.setRoot ( rootViewInfo ) ; org.eclipse.jface.viewers.TreeViewer tv = getTreeViewer ( ) ; if ( tv != null ) { java.lang.Object [ ] expanded = tv.getExpandedElements ( ) ; tv.refresh ( ) ; tv.setExpandedElements ( expanded ) ; tv.expandToLevel ( rootViewInfo , 2 ) ; } }

Target:
public void setModel ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo rootViewInfo ) { if ( ! ( mActive ) ) { return ; } mRootWrapper.setRoot ( rootViewInfo ) ; org.eclipse.jface.viewers.TreeViewer tv = getTreeViewer ( ) ; if ( tv != null ) { java.lang.Object [ ] expanded = tv.getExpandedElements ( ) ; tv.refresh ( ) ; tv.setExpandedElements ( expanded ) ; tv.expandToLevel ( rootViewInfo , 2 ) ; } }
Source:
private void writeDescriptor ( java.lang.String writeValue ) { android.bluetooth.BluetoothGattDescriptor descriptor = getDescriptor ( ) ; if ( descriptor == null ) return ; descriptor.setValue ( writeValue.getBytes ( ) ) ; mBluetoothGatt.writeDescriptor ( descriptor ) ; }

Target:
public int onStartCommand ( final android.content.Intent intent , int flags , int startId ) { if ( ! ( mBluetoothAdapter.isEnabled ( ) ) ) { notifyBluetoothDisabled ( ) ; } else { mTaskQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onTestFinish ( intent.getAction ( ) ) ; } } , 1500 ) ; } return START_NOT_STICKY ; }
Source:
private static org.eclipse.debug.core.ILaunchConfiguration findConfig ( org.eclipse.debug.core.ILaunchManager manager , org.eclipse.debug.core.ILaunchConfigurationType type , java.lang.String projectName ) { try { org.eclipse.debug.core.ILaunchConfiguration [ ] configs = manager.getLaunchConfigurations ( type ) ; for ( org.eclipse.debug.core.ILaunchConfiguration config : configs ) { if ( config.getAttribute ( IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME , "" ) . equals ( projectName ) ) { return config ; } } } catch ( org.eclipse.core.runtime.CoreException e ) { org.eclipse.jface.dialogs.MessageDialog.openError ( com.android.ide.eclipse.adt.AdtPlugin.getDisplay ( ) . getActiveShell ( ) , "Launch Error" , e.getStatus ( ) . getMessage ( ) ) ; } return null ; }

Target:
private static org.eclipse.debug.core.ILaunchConfiguration findConfig ( org.eclipse.debug.core.ILaunchManager manager , org.eclipse.debug.core.ILaunchConfigurationType type , java.lang.String projectName ) { try { org.eclipse.debug.core.ILaunchConfiguration [ ] configs = manager.getLaunchConfigurations ( type ) ; for ( org.eclipse.debug.core.ILaunchConfiguration config : configs ) { if ( config.getAttribute ( IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME , "" ) . equals ( projectName ) ) { return config ; } } } catch ( org.eclipse.core.runtime.CoreException e ) { org.eclipse.jface.dialogs.MessageDialog.openError ( com.android.ide.eclipse.adt.AdtPlugin.getShell ( ) , "Launch Error" , e.getStatus ( ) . getMessage ( ) ) ; } return null ; }
Source:
public boolean moveActivityTaskToBack ( android.os.IBinder token , boolean nonRoot ) { synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; int taskId = getTaskForActivityLocked ( token , ( ! nonRoot ) ) ; if ( taskId >= 0 ) { return moveTaskToBackLocked ( taskId , null ) ; } android.os.Binder.restoreCallingIdentity ( origId ) ; } return false ; }

Target:
public boolean moveActivityTaskToBack ( android.os.IBinder token , boolean nonRoot ) { synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; int taskId = getTaskForActivityLocked ( token , ( ! nonRoot ) ) ; if ( taskId >= 0 ) { return mMainStack.moveTaskToBackLocked ( taskId , null ) ; } android.os.Binder.restoreCallingIdentity ( origId ) ; } return false ; }
Source:
private com.android.bluetooth.hfpclient.connserv.HfpClientConnection buildConnection ( android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothHeadsetClientCall call , android.net.Uri number ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( ( ( ( ( "Creating connection on " + device ) + " for " ) + call ) + "/" ) + number ) ) ; com.android.bluetooth.hfpclient.connserv.HfpClientConnection connection = new com.android.bluetooth.hfpclient.connserv.HfpClientConnection ( this , device , mHeadsetProfile , call , number ) ; mConnections.put ( number , connection ) ; return connection ; }

Target:
private synchronized com.android.bluetooth.hfpclient.connserv.HfpClientConnection buildConnection ( android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothHeadsetClientCall call , android.net.Uri number ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( ( ( ( ( "Creating connection on " + device ) + " for " ) + call ) + "/" ) + number ) ) ; com.android.bluetooth.hfpclient.connserv.HfpClientConnection connection = new com.android.bluetooth.hfpclient.connserv.HfpClientConnection ( this , device , mHeadsetProfile , call , number ) ; mConnections.put ( new com.android.bluetooth.hfpclient.connserv.ConnectionKey ( ConnectionKey.INVALID_ID , number ) , connection ) ; return connection ; }
Source:
public long getLong ( long addr ) { if ( myValuesAreBufferAligned ) { long page = addr / ( myPageSize ) ; int page_offset = ( ( int ) ( addr % ( myPageSize ) ) ) ; return getBuffer ( page , false ) . getLong ( page_offset ) ; } else { get ( addr , myTypedIOBuffer , 0 , 8 ) ; return com.intellij.util.io.Bits.getLong ( myTypedIOBuffer , 0 ) ; } }

Target:
public long getLong ( long addr ) { if ( myValuesAreBufferAligned ) { long page = addr / ( myPageSize ) ; int page_offset = ( ( int ) ( addr % ( myPageSize ) ) ) ; return getReadOnlyBuffer ( page ) . getLong ( page_offset ) ; } else { get ( addr , myTypedIOBuffer , 0 , 8 ) ; return com.intellij.util.io.Bits.getLong ( myTypedIOBuffer , 0 ) ; } }
Source:
public void testLoadTzDataWithFallback_emptyOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = ZoneInfoDB.TzData.loadTzData ( libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; java.lang.String emptyFilePath = libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) . getPath ( ) ; libcore.util.ZoneInfoDB.TzData dataWithEmptyOverride = ZoneInfoDB.TzData.loadTzDataWithFallback ( emptyFilePath , libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; assertEquals ( data.getVersion ( ) , dataWithEmptyOverride.getVersion ( ) ) ; assertEquals ( data.getAvailableIDs ( ) . length , dataWithEmptyOverride.getAvailableIDs ( ) . length ) ; }

Target:
public void testLoadTzDataWithFallback_emptyOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = ZoneInfoDB.TzData.loadTzData ( libcore.util.ZoneInfoDBTest.SYSTEM_TZDATA_FILE ) ; java.lang.String emptyFilePath = libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) . getPath ( ) ; libcore.util.ZoneInfoDB.TzData dataWithEmptyOverride = ZoneInfoDB.TzData.loadTzDataWithFallback ( emptyFilePath , libcore.util.ZoneInfoDBTest.SYSTEM_TZDATA_FILE ) ; assertEquals ( data.getVersion ( ) , dataWithEmptyOverride.getVersion ( ) ) ; assertEquals ( data.getAvailableIDs ( ) . length , dataWithEmptyOverride.getAvailableIDs ( ) . length ) ; }
Source:
public int getNetworkType ( ) { int radiotech = mPhone.getServiceState ( ) . getRadioTechnology ( ) ; switch ( radiotech ) { case android.telephony.ServiceState.RADIO_TECHNOLOGY_GPRS : return android.telephony.TelephonyManager.NETWORK_TYPE_GPRS ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_EDGE : return android.telephony.TelephonyManager.NETWORK_TYPE_EDGE ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_UMTS : return android.telephony.TelephonyManager.NETWORK_TYPE_UMTS ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_HSDPA : return android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_HSUPA : return android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_HSPA : return android.telephony.TelephonyManager.NETWORK_TYPE_HSPA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_IS95A : case android.telephony.ServiceState.RADIO_TECHNOLOGY_IS95B : return android.telephony.TelephonyManager.NETWORK_TYPE_CDMA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_1xRTT : return android.telephony.TelephonyManager.NETWORK_TYPE_1xRTT ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_0 : return android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_0 ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_A : return android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_A ; default : return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }

Target:
public int getNetworkType ( ) { int radiotech = mPhone.getServiceState ( ) . getRadioTechnology ( ) ; switch ( radiotech ) { case android.telephony.ServiceState.RADIO_TECHNOLOGY_GPRS : return android.telephony.TelephonyManager.NETWORK_TYPE_GPRS ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_EDGE : return android.telephony.TelephonyManager.NETWORK_TYPE_EDGE ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_UMTS : return android.telephony.TelephonyManager.NETWORK_TYPE_UMTS ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_HSDPA : return android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_HSUPA : return android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_HSPA : return android.telephony.TelephonyManager.NETWORK_TYPE_HSPA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_IS95A : case android.telephony.ServiceState.RADIO_TECHNOLOGY_IS95B : return android.telephony.TelephonyManager.NETWORK_TYPE_CDMA ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_1xRTT : return android.telephony.TelephonyManager.NETWORK_TYPE_1xRTT ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_0 : return android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_0 ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_A : return android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_A ; case android.telephony.ServiceState.RADIO_TECHNOLOGY_EVDO_B : return android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_B ; default : return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }
Source:
public void testSign_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; }

Target:
public void testSign_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; }
Source:
public ScriptGroup2.Closure asyncLaunch ( android.renderscript.ScriptGroup2.Builder builder , java.lang.Object in , android.renderscript.Type outputType ) { java.util.HashMap < android.renderscript.Script.FieldID , java.lang.Object > globals = new java.util.HashMap < android.renderscript.Script.FieldID , java.lang.Object > ( ) ; globals.put ( s.getFieldID_in_alloc ( ) , in ) ; return builder.addKernel ( getKernelID ( ) , outputType , new java.lang.Object [ 0 ] , globals ) ; }

Target:
public ScriptGroup2.Closure asyncLaunch ( android.renderscript.ScriptGroup2.Builder builder , java.lang.Object in , android.renderscript.Type outputType ) { return builder.addKernel ( getKernelID ( ) , outputType , new android.renderscript.ScriptGroup2.Binding ( s.getFieldID_in_alloc ( ) , in ) ) ; }
Source:
private org.apache.harmony.dalvik.ddmc.Chunk handleMPRQ ( org.apache.harmony.dalvik.ddmc.Chunk request ) { int result = ( android.os.Debug.isMethodTracingActive ( ) ) ? 1 : 0 ; byte [ ] reply = new byte [ ] { ( ( byte ) ( result ) ) } ; return new org.apache.harmony.dalvik.ddmc.Chunk ( android.ddm.DdmHandleProfiling.CHUNK_MPRQ , reply , 0 , reply.length ) ; }

Target:
private org.apache.harmony.dalvik.ddmc.Chunk handleMPRQ ( org.apache.harmony.dalvik.ddmc.Chunk request ) { int result = android.os.Debug.getMethodTracingMode ( ) ; byte [ ] reply = new byte [ ] { ( ( byte ) ( result ) ) } ; return new org.apache.harmony.dalvik.ddmc.Chunk ( android.ddm.DdmHandleProfiling.CHUNK_MPRQ , reply , 0 , reply.length ) ; }
Source:
private void enableUninstalledApp ( ) { final java.util.List < java.lang.String > currentEnabledApps = getPackageNameList ( ) ; final java.util.List < java.lang.String > disabledApps = new java.util.ArrayList < java.lang.String > ( mEnabledAppsBeforeTest ) ; disabledApps.removeAll ( currentEnabledApps ) ; for ( java.lang.String disabledSystemApp : disabledApps ) { android.util.Log.i ( com.android.cts.deviceowner.DeviceOwnerProvisioningTest.TAG , ( "enable app : " + disabledSystemApp ) ) ; mDevicePolicyManager.enableSystemApp ( com.android.cts.deviceowner.BasicAdminReceiver.getComponentName ( getContext ( ) ) , disabledSystemApp ) ; } }

Target:
private void enableUninstalledApp ( ) { final java.util.List < java.lang.String > currentEnabledApps = getSystemPackageNameList ( ) ; final java.util.List < java.lang.String > disabledApps = new java.util.ArrayList < java.lang.String > ( mEnabledAppsBeforeTest ) ; disabledApps.removeAll ( currentEnabledApps ) ; for ( java.lang.String disabledSystemApp : disabledApps ) { android.util.Log.i ( com.android.cts.deviceowner.DeviceOwnerProvisioningTest.TAG , ( "enable app : " + disabledSystemApp ) ) ; mDevicePolicyManager.enableSystemApp ( com.android.cts.deviceowner.BasicAdminReceiver.getComponentName ( getContext ( ) ) , disabledSystemApp ) ; } }