auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public WebView.HitTestResult getHitTestResult ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebView.HitTestResult ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebView.HitTestResult > ( ) { @ java.lang.Override public WebView.HitTestResult call ( ) { return getHitTestResult ( ) ; } } ) ; return ret ; } org.chromium.android_webview.AwContents.HitTestData data = mAwContents.getLastHitTestResult ( ) ; mHitTestResult.setType ( data.hitTestResultType ) ; mHitTestResult.setExtra ( data.hitTestResultExtraData ) ; return mHitTestResult ; }

Target:
public java.lang.String getUrl ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getUrl ( ) ; } } ) ; return ret ; } java.lang.String url = mAwContents.getUrl ( ) ; if ( ( url == null ) || ( url.trim ( ) . isEmpty ( ) ) ) return null ; return url ; }
Source:
public java.lang.Object run ( ) { try { java.lang.reflect.Field f = sun.misc.Unsafe.class . getDeclaredField ( "theUnsafe" ) ; f.setAccessible ( true ) ; return f.get ( null ) ; } catch ( java.lang.NoSuchFieldException e ) { throw new java.lang.Error ( ) ; } catch ( java.lang.IllegalAccessException e ) { throw new java.lang.Error ( ) ; } }

Target:
public sun.misc.Unsafe run ( ) throws java.lang.Exception { java.lang.Class < sun.misc.Unsafe > k = sun.misc.Unsafe.class ; for ( java.lang.reflect.Field f : k.getDeclaredFields ( ) ) { f.setAccessible ( true ) ; java.lang.Object x = f.get ( null ) ; if ( k.isInstance ( x ) ) return k.cast ( x ) ; } throw new java.lang.NoSuchFieldError ( "the Unsafe" ) ; }
Source:
public final char getChar ( int index ) { checkIndex ( index , SizeOf.CHAR ) ; return ( ( char ) ( this . block.peekShort ( ( ( offset ) + index ) , order ) ) ) ; }

Target:
final void get ( double [ ] dst , int dstOffset , int doubleCount ) { int byteCount = checkGetBounds ( SizeOf.DOUBLE , dst.length , dstOffset , doubleCount ) ; this . block.peekDoubleArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }
Source:
com.android.bluetooth.btservice.RemoteDevices.DeviceProperties addDeviceProperties ( byte [ ] address ) { synchronized ( mDevices ) { com.android.bluetooth.btservice.RemoteDevices.DeviceProperties prop = new com.android.bluetooth.btservice.RemoteDevices.DeviceProperties ( ) ; android.bluetooth.BluetoothDevice device = com.android.bluetooth.btservice.RemoteDevices.mAdapter.getRemoteDevice ( com.android.bluetooth.Utils.getAddressStringFromByte ( address ) ) ; prop.mAddress = address ; mDevices.put ( device , prop ) ; return prop ; } }

Target:
com.android.bluetooth.btservice.RemoteDevices.DeviceProperties addDeviceProperties ( byte [ ] address ) { synchronized ( mDevices ) { com.android.bluetooth.btservice.RemoteDevices.DeviceProperties prop = new com.android.bluetooth.btservice.RemoteDevices.DeviceProperties ( ) ; prop.mDevice = com.android.bluetooth.btservice.RemoteDevices.mAdapter.getRemoteDevice ( com.android.bluetooth.Utils.getAddressStringFromByte ( address ) ) ; prop.mAddress = address ; mDevices.put ( com.android.bluetooth.Utils.getAddressStringFromByte ( address ) , prop ) ; return prop ; } }
Source:
public void tearDown ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { long startTime = java.lang.System.currentTimeMillis ( ) ; device.waitForDeviceOnline ( com.android.tradefed.targetprep.VtsDeviceInfoCollector.REBOOT_TIMEOUT ) ; device.executeShellCommand ( "start" ) ; if ( ! ( device.waitForBootComplete ( ( ( ( com.android.tradefed.targetprep.VtsDeviceInfoCollector.REBOOT_TIMEOUT ) + startTime ) - ( java.lang.System.currentTimeMillis ( ) ) ) ) ) ) { throw new com.android.tradefed.device.DeviceNotAvailableException ( "Framework irrecoverable after testing." ) ; } }

Target:
public void tearDown ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { if ( mDisableFramework ) { long startTime = java.lang.System.currentTimeMillis ( ) ; device.waitForDeviceOnline ( com.android.tradefed.targetprep.VtsDeviceInfoCollector.REBOOT_TIMEOUT ) ; device.executeShellCommand ( "start" ) ; if ( ! ( device.waitForBootComplete ( ( ( ( com.android.tradefed.targetprep.VtsDeviceInfoCollector.REBOOT_TIMEOUT ) + startTime ) - ( java.lang.System.currentTimeMillis ( ) ) ) ) ) ) { throw new com.android.tradefed.device.DeviceNotAvailableException ( "Framework irrecoverable after testing." ) ; } } }
Source:
public final void testHashCode ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Point p = new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( 1 , 2 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Point p1 = new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( 1 , 2 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Point p2 = new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( ( - 3 ) , ( - 4 ) ) ; assertNotSame ( p1 , p ) ; assertEquals ( p1.hashCode ( ) , p.hashCode ( ) ) ; assertFalse ( ( ( p2.hashCode ( ) ) == ( p.hashCode ( ) ) ) ) ; }

Target:
public final void testHashCode ( ) { com.android.ide.common.api.Point p = new com.android.ide.common.api.Point ( 1 , 2 ) ; com.android.ide.common.api.Point p1 = new com.android.ide.common.api.Point ( 1 , 2 ) ; com.android.ide.common.api.Point p2 = new com.android.ide.common.api.Point ( ( - 3 ) , ( - 4 ) ) ; assertNotSame ( p1 , p ) ; assertEquals ( p1.hashCode ( ) , p.hashCode ( ) ) ; assertFalse ( ( ( p2.hashCode ( ) ) == ( p.hashCode ( ) ) ) ) ; }
Source:
private java.util.List < com.android.jack.ir.ast.JExpression > getAllExpressionsInPostOrder ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node ) { final java.util.List < com.android.jack.ir.ast.JExpression > result = new java.util.ArrayList < > ( ) ; new com.android.jack.ir.ast.JVisitor ( ) { @ java.lang.Override public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression e ) { result.add ( e ) ; } } . accept ( node ) ; return result ; }

Target:
private java.util.List < com.android.jack.ir.ast.JNode > getAllNodesInPostOrder ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JBasicBlock block ) { final java.util.List < com.android.jack.ir.ast.JNode > result = new java.util.ArrayList < > ( ) ; new com.android.jack.ir.ast.JVisitor ( ) { @ java.lang.Override public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode e ) { result.add ( e ) ; } } . accept ( block ) ; return result ; }
Source:
static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.gsm.GSMPhone phone , com.android.internal.telephony.gsm.UiccCardApplication app ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone , app ) ; ret.message = ussdMessage ; ret.isUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.isPendingUSSD = true ; ret.state = State.PENDING ; } else { ret.state = State.COMPLETE ; } return ret ; }

Target:
static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.gsm.GSMPhone phone , com.android.internal.telephony.uicc.UiccCardApplication app ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone , app ) ; ret.message = ussdMessage ; ret.isUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.isPendingUSSD = true ; ret.state = State.PENDING ; } else { ret.state = State.COMPLETE ; } return ret ; }
Source:
void found ( ) { mLastSeenTime = java.lang.System.currentTimeMillis ( ) ; mFound = true ; android.net.Uri printerUri = mDiscoveredPrinter.getUri ( ) ; com.android.bips.jni.LocalPrinterCapabilities capabilities = mPrintService.getCapabilitiesCache ( ) . get ( printerUri ) ; if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( ( ( "Printer " + ( mDiscoveredPrinter ) ) + " has caps=" ) + capabilities ) ) ; if ( capabilities != null ) { onCapabilities ( mDiscoveredPrinter , capabilities ) ; } else { mSession.handlePrinter ( this ) ; requestCapabilities ( ) ; } }

Target:
public void track ( ) { if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( "track " + ( mDiscoveredPrinter ) ) ) ; startTracking ( ) ; }
Source:
public void test_parkFor_3 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 1 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; parkerThread.join ( ) ; }

Target:
public void test_parkFor_3 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 1 ) ; org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; parkerThread.join ( ) ; }
Source:
static void writeXml ( com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneIdentifier timeZoneId , javax.xml.stream.XMLStreamWriter writer ) throws javax.xml.stream.XMLStreamException { writer.writeStartElement ( com.android.libcore.timezone.tzlookup.TzLookupFile.ID_ELEMENT ) ; writer.writeCharacters ( timeZoneId.olsonId ) ; writer.writeEndElement ( ) ; }

Target:
static void writeXml ( com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneMapping timeZoneId , javax.xml.stream.XMLStreamWriter writer ) throws javax.xml.stream.XMLStreamException { writer.writeStartElement ( com.android.libcore.timezone.tzlookup.TzLookupFile.ZONE_ID_ELEMENT ) ; if ( ! ( timeZoneId.showInPicker ) ) { writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.ZONE_SHOW_IN_PICKER_ATTRIBUTE , com.android.libcore.timezone.tzlookup.TzLookupFile.encodeBooleanAttribute ( false ) ) ; } writer.writeCharacters ( timeZoneId.olsonId ) ; writer.writeEndElement ( ) ; }
Source:
public void testV1SignedAttrsMissingContentType ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "v1-only-with-signed-attrs-missing-content-type.apk" ) , Issue.JAR_SIG_VERIFY_EXCEPTION ) ; }

Target:
public void testV1SignedAttrsMissingContentType ( ) throws java.lang.Exception { java.lang.String apk = "v1-only-with-signed-attrs-missing-content-type.apk" ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMaxSdkVersion ( apk , ( ( com.android.apksig.internal.util.AndroidSdkVersion.N ) - 1 ) ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( apk ) , Issue.JAR_SIG_VERIFY_EXCEPTION ) ; apk = "v1-only-with-signed-attrs-signerInfo1-missing-content-type-signerInfo2-good.apk" ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMaxSdkVersion ( apk , ( ( com.android.apksig.internal.util.AndroidSdkVersion.N ) - 1 ) ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( apk ) , Issue.JAR_SIG_VERIFY_EXCEPTION ) ; }
Source:
public void aggregateContact ( android.database.sqlite.SQLiteDatabase db , long rawContactId , java.lang.String accountType , java.lang.String accountName , long currentContactId ) { if ( ! ( mEnabled ) ) { return ; } com.android.providers.contacts.ContactAggregator.MatchCandidateList candidates = new com.android.providers.contacts.ContactAggregator.MatchCandidateList ( ) ; com.android.providers.contacts.ContactMatcher matcher = new com.android.providers.contacts.ContactMatcher ( ) ; android.content.ContentValues values = new android.content.ContentValues ( ) ; aggregateContact ( db , rawContactId , accountType , accountName , currentContactId , candidates , matcher , values ) ; }

Target:
protected void insertNameLookup ( long rawContactId , long dataId , int lookupType , java.lang.String string ) { mNameLookupCandidates.add ( string , lookupType ) ; android.database.DatabaseUtils.appendEscapedSQLString ( mSelection , string ) ; mSelection.append ( ',' ) ; }
Source:
private void p2pConnectWithPinDisplay ( android.net.wifi.p2p.WifiP2pConfig config , boolean join ) { java.lang.String pin = mWifiNative.p2pConnect ( config , join ) ; try { java.lang.Integer.parseInt ( pin ) ; if ( ! ( sendShowPinReqToFrontApp ( pin ) ) ) { notifyInvitationSent ( pin , config.deviceAddress ) ; } } catch ( java.lang.NumberFormatException ignore ) { } }

Target:
private void p2pConnectWithPinDisplay ( android.net.wifi.p2p.WifiP2pConfig config ) { android.net.wifi.p2p.WifiP2pDevice dev = mPeers.get ( config.deviceAddress ) ; if ( dev == null ) { loge ( ( "target device is not found " + ( config.deviceAddress ) ) ) ; return ; } java.lang.String pin = mWifiNative.p2pConnect ( config , dev.isGroupOwner ( ) ) ; try { java.lang.Integer.parseInt ( pin ) ; if ( ! ( sendShowPinReqToFrontApp ( pin ) ) ) { notifyInvitationSent ( pin , config.deviceAddress ) ; } } catch ( java.lang.NumberFormatException ignore ) { } }
Source:
void finishInstrumentationLocked ( com.android.server.am.ProcessRecord app , int resultCode , android.os.Bundle results ) { if ( ( app.instrumentationWatcher ) != null ) { try { app.instrumentationWatcher.instrumentationFinished ( app.instrumentationClass , resultCode , results ) ; } catch ( android.os.RemoteException e ) { } } app.instrumentationWatcher = null ; app.instrumentationClass = null ; app.instrumentationProfileFile = null ; app.instrumentationArguments = null ; uninstallPackageLocked ( app.processName , ( - 1 ) , false ) ; }

Target:
void finishInstrumentationLocked ( com.android.server.am.ProcessRecord app , int resultCode , android.os.Bundle results ) { if ( ( app.instrumentationWatcher ) != null ) { try { app.instrumentationWatcher.instrumentationFinished ( app.instrumentationClass , resultCode , results ) ; } catch ( android.os.RemoteException e ) { } } app.instrumentationWatcher = null ; app.instrumentationClass = null ; app.instrumentationInfo = null ; app.instrumentationProfileFile = null ; app.instrumentationArguments = null ; uninstallPackageLocked ( app.processName , ( - 1 ) , false ) ; }
Source:
public java.lang.String getCallExtra ( java.lang.String name ) throws com.android.ims.ImsException { synchronized ( mLockObj ) { if ( ( mSession ) == null ) { throw new com.android.ims.ImsException ( "No call session" , ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } try { return mSession.getProperty ( name ) ; } catch ( java.lang.Throwable t ) { loge ( "getCallExtra :: " , t ) ; throw new com.android.ims.ImsException ( "getCallExtra()" , t , 0 ) ; } } }

Target:
public java.lang.String getCallExtra ( java.lang.String name ) throws com.android.ims.ImsException { synchronized ( mLockObj ) { if ( ( mSession ) == null ) { throw new com.android.ims.ImsException ( "No call session" , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } try { return mSession.getProperty ( name ) ; } catch ( java.lang.Throwable t ) { loge ( "getCallExtra :: " , t ) ; throw new com.android.ims.ImsException ( "getCallExtra()" , t , 0 ) ; } } }
Source:
public void testSetWifiEnabledNoToggle ( ) throws java.lang.Exception { when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( true ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , true ) ) ; verify ( mWifiController , never ( ) ) . obtainMessageAndSend ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }

Target:
public void testSetWifiEnabledFromSettingsWhenApEnabled ( ) throws java.lang.Exception { when ( mWifiStateMachine.syncGetWifiApState ( ) ) . thenReturn ( WifiManager.WIFI_AP_STATE_ENABLED ) ; when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( true ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.SETTINGS_PACKAGE_NAME , true ) ) ; verify ( mWifiController ) . sendMessage ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }
Source:
private int compare2 ( java.lang.Object o1 , java.lang.Object o2 ) { if ( o1 == o2 ) return 0 ; if ( o1 == null ) return - 1 ; if ( o2 == null ) return 1 ; return ( ( java.lang.Comparable ) ( o1 ) ) . compareTo ( o2 ) ; }

Target:
private < T extends java.lang.Comparable > int compare2 ( T o1 , T o2 ) { if ( o1 == o2 ) return 0 ; if ( o1 == null ) return - 1 ; if ( o2 == null ) return 1 ; return o1.compareTo ( o2 ) ; }
Source:
public java.util.List < java.lang.String > getNames ( ) { java.util.List < java.lang.String > names = new java.util.ArrayList < java.lang.String > ( ) ; for ( com.android.util.Pair < java.lang.String , java.lang.Boolean > item : mItems.keySet ( ) ) { names.add ( item.getFirst ( ) ) ; } return names ; }

Target:
public java.util.List < java.lang.String > getNames ( ) { java.util.List < java.lang.String > names = new java.util.ArrayList < java.lang.String > ( ) ; for ( com.android.ide.common.rendering.api.ItemResourceValue.Attribute item : mItems.keySet ( ) ) { java.lang.String name = item.mName ; if ( item.mIsFrameworkAttr ) { name = "android:" + name ; } names.add ( name ) ; } return names ; }
Source:
public void testSetAddressOnOutgoing ( ) { java.lang.String inputAddress = "12345" ; java.lang.String updateAddress = "6789" ; mConnectionUT = new com.android.internal.telephony.imsphone.ImsPhoneConnection ( mImsPhone , inputAddress , mImsCT , mForeGroundCall , false ) ; mConnectionUT.setIsIncoming ( false ) ; org.mockito.Mockito.doReturn ( updateAddress ) . when ( mImsCallProfile ) . getCallExtra ( org.mockito.Mockito.eq ( ImsCallProfile.EXTRA_OI ) ) ; mConnectionUT.updateAddressDisplay ( mImsCall ) ; org.junit.Assert.assertEquals ( inputAddress , mConnectionUT.getAddress ( ) ) ; }

Target:
public void testSetAddressOnOutgoing ( ) { java.lang.String inputAddress = "12345" ; java.lang.String updateAddress = "6789" ; mConnectionUT = new com.android.internal.telephony.imsphone.ImsPhoneConnection ( mImsPhone , inputAddress , mImsCT , mForeGroundCall , false ) ; mConnectionUT.setIsIncoming ( false ) ; mImsCallProfile.setCallExtra ( ImsCallProfile.EXTRA_OI , updateAddress ) ; mConnectionUT.updateAddressDisplay ( mImsCall ) ; org.junit.Assert.assertEquals ( inputAddress , mConnectionUT.getAddress ( ) ) ; }
Source:
public void copyTo ( float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsFloat32 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.FLOAT_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.FLOAT_32 , data.length ) ; }
Source:
public void testAesGcm96Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.getKey ( 288 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha512Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }
Source:
private boolean removeTaskByIdLocked ( int taskId , boolean killProcess ) { com.android.server.am.TaskRecord tr = mStackSupervisor.anyTaskForIdLocked ( taskId , false ) ; if ( tr != null ) { tr.removeTaskActivitiesLocked ( ) ; cleanUpRemovedTaskLocked ( tr , killProcess ) ; if ( tr.isPersistable ) { notifyTaskPersisterLocked ( null , true ) ; } return true ; } android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , ( "Request to remove task ignored for non-existent task " + taskId ) ) ; return false ; }

Target:
private boolean removeTaskByIdLocked ( int taskId , boolean killProcess , boolean removeFromRecents ) { final com.android.server.am.TaskRecord tr = mStackSupervisor.anyTaskForIdLocked ( taskId , ( ! ( com.android.server.am.ActivityStackSupervisor.RESTORE_FROM_RECENTS ) ) , StackId.INVALID_STACK_ID ) ; if ( tr != null ) { tr.removeTaskActivitiesLocked ( ) ; cleanUpRemovedTaskLocked ( tr , killProcess , removeFromRecents ) ; if ( tr.isPersistable ) { notifyTaskPersisterLocked ( null , true ) ; } return true ; } android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , ( "Request to remove task ignored for non-existent task " + taskId ) ) ; return false ; }
Source:
public boolean logOut ( boolean showPrompt ) { com.google.gct.login.CredentialedUser activeUser = users.getActiveUser ( ) ; if ( activeUser == null ) { return false ; } return activeUser.getGoogleLoginState ( ) . logOut ( showPrompt ) ; }

Target:
public boolean logOut ( boolean showPrompt ) { com.google.gct.login.CredentialedUser activeUser = users.getActiveUser ( ) ; if ( activeUser == null ) { return false ; } boolean loggedOut = activeUser.getGoogleLoginState ( ) . logOut ( showPrompt ) ; if ( loggedOut ) { logOutAllUsers ( ) ; } return loggedOut ; }
Source:
public int selectPreferredUpstreamType ( java.lang.Iterable < java.lang.Integer > preferredTypes ) { final com.android.server.connectivity.tethering.UpstreamNetworkMonitor.TypeStatePair typeStatePair = com.android.server.connectivity.tethering.UpstreamNetworkMonitor.findFirstAvailableUpstreamByType ( mNetworkMap.values ( ) , preferredTypes ) ; mLog.log ( ( "preferred upstream type: " + ( android.net.ConnectivityManager.getNetworkTypeName ( typeStatePair.type ) ) ) ) ; switch ( typeStatePair.type ) { case android.net.ConnectivityManager.TYPE_MOBILE_DUN : case android.net.ConnectivityManager.TYPE_MOBILE_HIPRI : registerMobileNetworkRequest ( ) ; break ; case android.net.ConnectivityManager.TYPE_NONE : break ; default : releaseMobileNetworkRequest ( ) ; break ; } return typeStatePair.type ; }

Target:
public android.net.NetworkState selectPreferredUpstreamType ( java.lang.Iterable < java.lang.Integer > preferredTypes ) { final com.android.server.connectivity.tethering.UpstreamNetworkMonitor.TypeStatePair typeStatePair = com.android.server.connectivity.tethering.UpstreamNetworkMonitor.findFirstAvailableUpstreamByType ( mNetworkMap.values ( ) , preferredTypes ) ; mLog.log ( ( "preferred upstream type: " + ( android.net.ConnectivityManager.getNetworkTypeName ( typeStatePair.type ) ) ) ) ; switch ( typeStatePair.type ) { case android.net.ConnectivityManager.TYPE_MOBILE_DUN : case android.net.ConnectivityManager.TYPE_MOBILE_HIPRI : registerMobileNetworkRequest ( ) ; break ; case android.net.ConnectivityManager.TYPE_NONE : break ; default : releaseMobileNetworkRequest ( ) ; break ; } return typeStatePair.ns ; }
Source:
public void onPause ( ) { super . onPause ( ) ; if ( ( mBluetoothEnabler ) != null ) { mBluetoothEnabler.pause ( ) ; } mLocalAdapter.setScanMode ( BluetoothAdapter.SCAN_MODE_CONNECTABLE ) ; if ( isUiRestricted ( ) ) { return ; } getActivity ( ) . unregisterReceiver ( mReceiver ) ; }

Target:
public void onStop ( ) { super . onStop ( ) ; if ( ( mBluetoothEnabler ) != null ) { mBluetoothEnabler.pause ( ) ; } mLocalAdapter.setScanMode ( BluetoothAdapter.SCAN_MODE_CONNECTABLE ) ; if ( isUiRestricted ( ) ) { return ; } getActivity ( ) . unregisterReceiver ( mReceiver ) ; }
Source:
public boolean onStopJob ( android.app.job.JobParameters params ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.LogUtil.enterBlock ( "TranscriptionService.onStopJob" ) ; cleanup ( ) ; return true ; }

Target:
public boolean onStopJob ( android.app.job.JobParameters params ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.LogUtil.i ( "TranscriptionService.onStopJob" , ( "params: " + params ) ) ; stopped = true ; com.android.dialer.logging.Logger.get ( this ) . logImpression ( DialerImpression.Type.VVM_TRANSCRIPTION_JOB_STOPPED ) ; if ( ( activeTask ) != null ) { com.android.dialer.common.LogUtil.i ( "TranscriptionService.onStopJob" , "cancelling active task" ) ; activeTask.cancel ( ) ; com.android.dialer.logging.Logger.get ( this ) . logImpression ( DialerImpression.Type.VVM_TRANSCRIPTION_TASK_CANCELLED ) ; } return true ; }
Source:
public android.telephony.ModemActivityInfo getModemActivityInfo ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getModemActivityInfo ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getModemActivityInfo" , e ) ; } return null ; }

Target:
private int getSubIdForPhoneAccountHandle ( android.telecom.PhoneAccountHandle phoneAccountHandle ) { int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID ; try { com.android.internal.telecom.ITelecomService service = getTelecomService ( ) ; if ( service != null ) { retval = getSubIdForPhoneAccount ( service.getPhoneAccount ( phoneAccountHandle ) ) ; } } catch ( android.os.RemoteException e ) { } return retval ; }
Source:
public boolean handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.server.wifi.WifiMonitor.SCAN_FAILED_EVENT : android.util.Log.w ( com.android.server.wifi.scanner.WificondScannerImpl.TAG , "Scan failed" ) ; mAlarmManager.cancel ( mScanTimeoutListener ) ; reportScanFailure ( ) ; processPendingScans ( ) ; break ; case com.android.server.wifi.WifiMonitor.SCAN_RESULTS_EVENT : mAlarmManager.cancel ( mScanTimeoutListener ) ; pollLatestScanData ( ) ; processPendingScans ( ) ; break ; default : } return true ; }

Target:
public boolean handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.server.wifi.WifiMonitor.SCAN_FAILED_EVENT : android.util.Log.w ( com.android.server.wifi.scanner.WificondScannerImpl.TAG , "Scan failed" ) ; mAlarmManager.cancel ( mScanTimeoutListener ) ; reportScanFailure ( ) ; processPendingScans ( ) ; break ; case com.android.server.wifi.WifiMonitor.SCAN_RESULTS_EVENT : mAlarmManager.cancel ( mScanTimeoutListener ) ; pollLatestScanData ( ) ; android.util.Log.d ( com.android.server.wifi.scanner.WificondScannerImpl.TAG , "processPendingScans in request of SCAN_RESULTS_EVENT" ) ; processPendingScans ( ) ; break ; default : } return true ; }
Source:
public static void init ( android.content.Context context ) { android.content.IntentFilter intentFilter = new android.content.IntentFilter ( ) ; intentFilter.addAction ( com.android.mms.transaction.MessagingNotification.NOTIFICATION_DELETED_ACTION ) ; context.registerReceiver ( com.android.mms.transaction.MessagingNotification.sNotificationDeletedReceiver , intentFilter ) ; com.android.mms.transaction.MessagingNotification.sNotificationOnDeleteIntent = new android.content.Intent ( com.android.mms.transaction.MessagingNotification.NOTIFICATION_DELETED_ACTION ) ; }

Target:
public static void init ( android.content.Context context ) { android.content.IntentFilter intentFilter = new android.content.IntentFilter ( ) ; intentFilter.addAction ( com.android.mms.transaction.MessagingNotification.NOTIFICATION_DELETED_ACTION ) ; context.registerReceiver ( com.android.mms.transaction.MessagingNotification.sNotificationDeletedReceiver , intentFilter ) ; com.android.mms.transaction.MessagingNotification.sPduPersister = com.google.android.mms.pdu.PduPersister.getPduPersister ( context ) ; com.android.mms.transaction.MessagingNotification.sNotificationOnDeleteIntent = new android.content.Intent ( com.android.mms.transaction.MessagingNotification.NOTIFICATION_DELETED_ACTION ) ; com.android.mms.transaction.MessagingNotification.sScreenDensity = context.getResources ( ) . getDisplayMetrics ( ) . density ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; }

Target:
public void copy3DRangeFrom ( int xoff , int yoff , int zoff , int w , int h , int d , java.lang.Object array ) { copy3DRangeFromUnchecked ( xoff , yoff , zoff , w , h , d , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public java.security.spec.ECPoint getECPoint ( ) { final byte [ ] [ ] generatorCoords = org.conscrypt.NativeCrypto.EC_POINT_get_affine_coordinates ( group.getContext ( ) , pointCtx ) ; final java.math.BigInteger x = new java.math.BigInteger ( generatorCoords [ 0 ] ) ; final java.math.BigInteger y = new java.math.BigInteger ( generatorCoords [ 1 ] ) ; return new java.security.spec.ECPoint ( x , y ) ; }

Target:
public java.security.spec.ECPoint getECPoint ( ) { final byte [ ] [ ] generatorCoords = org.conscrypt.NativeCrypto.EC_POINT_get_affine_coordinates ( group.getNativeRef ( ) , pointCtx ) ; final java.math.BigInteger x = new java.math.BigInteger ( generatorCoords [ 0 ] ) ; final java.math.BigInteger y = new java.math.BigInteger ( generatorCoords [ 1 ] ) ; return new java.security.spec.ECPoint ( x , y ) ; }
Source:
public void setAudioRoute ( int route ) { try { com.android.server.telecom.Log.startSession ( "ICA.sAR" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { mCallsManager.setAudioRoute ( route ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void setAudioRoute ( int route ) { try { android.telecom.Log.startSession ( "ICA.sAR" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { mCallsManager.setAudioRoute ( route ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "CellIdentityCdma:{" ) ; sb.append ( " mNetworkId=" ) ; sb.append ( mNetworkId ) ; sb.append ( " mSystemId=" ) ; sb.append ( mSystemId ) ; sb.append ( " mBasestationId=" ) ; sb.append ( mBasestationId ) ; sb.append ( " mLongitude=" ) ; sb.append ( mLongitude ) ; sb.append ( " mLatitude=" ) ; sb.append ( mLatitude ) ; sb.append ( "}" ) ; return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "CellIdentityCdma:{" ) ; sb.append ( " mNetworkId=" ) ; sb.append ( mNetworkId ) ; sb.append ( " mSystemId=" ) ; sb.append ( mSystemId ) ; sb.append ( " mBasestationId=" ) ; sb.append ( mBasestationId ) ; sb.append ( " mLongitude=" ) ; sb.append ( mLongitude ) ; sb.append ( " mLatitude=" ) ; sb.append ( mLatitude ) ; sb.append ( " mAlphaLong=" ) ; sb.append ( mAlphaLong ) ; sb.append ( " mAlphaShort=" ) ; sb.append ( mAlphaShort ) ; sb.append ( "}" ) ; return sb.toString ( ) ; }
Source:
protected boolean stop ( ) { if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , "stop()" ) ; mScannerMap.clear ( ) ; mClientMap.clear ( ) ; mServerMap.clear ( ) ; mHandleMap.clear ( ) ; mReliableQueue.clear ( ) ; if ( ( mAdvertiseManager ) != null ) mAdvertiseManager.cleanup ( ) ; if ( ( mScanManager ) != null ) mScanManager.cleanup ( ) ; return true ; }

Target:
protected boolean stop ( ) { if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , "stop()" ) ; mScannerMap.clear ( ) ; mClientMap.clear ( ) ; mServerMap.clear ( ) ; mHandleMap.clear ( ) ; mReliableQueue.clear ( ) ; if ( ( mAdvertiseManager ) != null ) mAdvertiseManager.cleanup ( ) ; if ( ( mScanManager ) != null ) mScanManager.cleanup ( ) ; if ( ( mPeriodicScanManager ) != null ) mPeriodicScanManager.cleanup ( ) ; return true ; }
Source:
public void removeReferences ( ) { this . mRuimPhoneBookInterfaceManager = null ; this . mRuimSmsInterfaceManager = null ; this . mSMS = null ; this . mSubInfo = null ; this . mRuimRecords = null ; this . mIccFileHandler = null ; this . mRuimCard = null ; this . mDataConnection = null ; this . mCT = null ; this . mSST = null ; this . mEriManager = null ; this . mStkService = null ; }

Target:
public void removeReferences ( ) { this . mRuimPhoneBookInterfaceManager = null ; this . mRuimSmsInterfaceManager = null ; this . mSMS = null ; this . mSubInfo = null ; this . mRuimRecords = null ; this . mIccFileHandler = null ; this . mRuimCard = null ; this . mDataConnection = null ; this . mCT = null ; this . mSST = null ; this . mEriManager = null ; this . mCcatService = null ; }
Source:
public static long mod ( long x , long m ) { if ( m <= 0 ) { throw new java.lang.ArithmeticException ( ( ( "Modulus " + m ) + " must be > 0" ) ) ; } long result = x % m ; return result >= 0 ? result : result + m ; }

Target:
public static long mod ( long x , long m ) { if ( m <= 0 ) { throw new java.lang.ArithmeticException ( "Modulus must be positive" ) ; } long result = x % m ; return result >= 0 ? result : result + m ; }
Source:
void scheduleWritePackageRestrictionsLocked ( int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; mDirtyUsers.add ( userId ) ; if ( ! ( mHandler.hasMessages ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS ) ) ) { mHandler.sendEmptyMessageDelayed ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS , com.android.server.pm.PackageManagerService.WRITE_SETTINGS_DELAY ) ; } }

Target:
void scheduleWritePackageRestrictionsLocked ( int userId ) { final int [ ] userIds = ( userId == ( android.os.UserHandle.USER_ALL ) ) ? com.android.server.pm.PackageManagerService.sUserManager.getUserIds ( ) : new int [ ] { userId } ; for ( int nextUserId : userIds ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( nextUserId ) ) ) return ; mDirtyUsers.add ( nextUserId ) ; if ( ! ( mHandler.hasMessages ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS ) ) ) { mHandler.sendEmptyMessageDelayed ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS , com.android.server.pm.PackageManagerService.WRITE_SETTINGS_DELAY ) ; } } }
Source:
public android.net.NetworkCapabilities addTransportType ( int transportType ) { if ( ( transportType < ( android.net.NetworkCapabilities.MIN_TRANSPORT ) ) || ( transportType > ( android.net.NetworkCapabilities.MAX_TRANSPORT ) ) ) { throw new java.lang.IllegalArgumentException ( "TransportType out of range" ) ; } mTransportTypes |= 1 << transportType ; setNetworkSpecifier ( mNetworkSpecifier ) ; return this ; }

Target:
public static boolean isValidTransport ( int transportType ) { return ( ( android.net.NetworkCapabilities.MIN_TRANSPORT ) <= transportType ) && ( transportType <= ( android.net.NetworkCapabilities.MAX_TRANSPORT ) ) ; }
Source:
public void testGetTxPacketCounters ( ) 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 ) ; mWificondControl.setupDriverForClientMode ( ) ; mWificondControl.getTxPacketCounters ( ) ; org.mockito.Mockito.verify ( clientInterface ) . getPacketCounters ( ) ; }

Target:
public void testGetTxPacketCounters ( ) 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 ) ; mWificondControl.setupDriverForClientMode ( ) ; mWificondControl.getTxPacketCounters ( ) ; org.mockito.Mockito.verify ( clientInterface ) . getPacketCounters ( ) ; }
Source:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "libapp/build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/bundles/release/AndroidManifest.xml" ) ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }

Target:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( regularDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "libapp/build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/bundles/release/AndroidManifest.xml" ) ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }
Source:
private synchronized void onApplicationStateChanged ( byte [ ] address , boolean registered ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onApplicationStateChanged(): registered=" + registered ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_APPLICATION_STATE_CHANGED ) ; msg.obj = address ; msg.arg1 = ( registered ) ? 1 : 0 ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onIntrDataFromNative ( byte reportId , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onIntrData(): reportId=" + reportId ) ) ; } java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( data ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_INTR_DATA ) ; msg.arg1 = reportId ; msg.obj = bb ; mHandler.sendMessage ( msg ) ; }
Source:
public boolean perform ( ) { synchronized ( lock ) { try { java.lang.Thread.sleep ( ( ( int ) ( ( java.lang.Math.random ( ) ) * 10 ) ) ) ; } catch ( java.lang.InterruptedException ignored ) { } } return true ; }

Target:
public boolean perform ( ) { synchronized ( lock ) { try { java.lang.Thread.sleep ( ( ( int ) ( ( ( java.lang.Math.random ( ) ) * 50 ) + 50 ) ) ) ; } catch ( java.lang.InterruptedException ignored ) { } } return true ; }
Source:
public void testWrongSeparator2 ( ) throws java.lang.Exception { mScopes = null ; mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING , com.android.tools.lint.checks.MissingClassDetector.INSTANTIATABLE , com.android.tools.lint.checks.MissingClassDetector.INNERCLASS ) ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:15: Warning: Use \'$\' instead of \'.\' for inner classes (or use only lowercase letters in package names) [InnerclassSeparator]\n" ) + " android:name=\".Foo.Bar\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong2.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }

Target:
public void testWrongSeparator2 ( ) throws java.lang.Exception { mScopes = null ; mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING , com.android.tools.lint.checks.MissingClassDetector.INSTANTIATABLE , com.android.tools.lint.checks.MissingClassDetector.INNERCLASS ) ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:15: Warning: Use \'$\' instead of \'.\' for inner classes (or use only lowercase letters in package names); replace \".Foo.Bar\" with \".Foo$Bar\" [InnerclassSeparator]\n" ) + " android:name=\".Foo.Bar\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong2.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }
Source:
public java.lang.String getDisplayVariant ( java.util.Locale locale ) { if ( ( variantCode.length ( ) ) == 0 ) { return variantCode ; } java.lang.String result = libcore.icu.ICU.getDisplayVariantNative ( toString ( ) , locale.toString ( ) ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayVariantNative ( toString ( ) , java.util.Locale.getDefault ( ) . toString ( ) ) ; } return result ; }

Target:
public java.lang.String getDisplayScript ( java.util.Locale locale ) { if ( scriptCode.isEmpty ( ) ) { return "" ; } java.lang.String result = libcore.icu.ICU.getDisplayScriptNative ( getIcuLocaleId ( ) , locale.getIcuLocaleId ( ) ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayScriptNative ( getIcuLocaleId ( ) , java.util.Locale.getDefault ( ) . getIcuLocaleId ( ) ) ; } return result ; }
Source:
public void queryTTYMode ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_QUERY_TTY_MODE , response ) ; send ( rr ) ; }

Target:
public void queryTTYMode ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_QUERY_TTY_MODE , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public android.net.wifi.nan.TlvBufferUtils.TlvConstructor putByteArray ( int type , @ android.annotation.Nullable byte [ ] array , int offset , int length ) { checkLength ( length ) ; addHeader ( type , length ) ; if ( length != 0 ) { java.lang.System.arraycopy ( array , offset , mArray , mPosition , length ) ; } mPosition += length ; return this ; }

Target:
public android.net.wifi.aware.TlvBufferUtils.TlvConstructor putByteArray ( int type , @ android.annotation.Nullable byte [ ] array , int offset , int length ) { checkLength ( length ) ; addHeader ( type , length ) ; if ( length != 0 ) { java.lang.System.arraycopy ( array , offset , mArray , mPosition , length ) ; } mPosition += length ; return this ; }
Source:
private void updateControls ( ) { updateTime ( ) ; updateProgress ( ) ; updateRecTimeText ( ) ; updateButtons ( ) ; updateRecordButton ( ) ; updateButtonMargin ( ) ; }

Target:
private void initializeTimeline ( ) { com.android.tv.data.Program program = mTimeShiftManager.getProgramAt ( mTimeShiftManager.getCurrentPositionMs ( ) ) ; mProgramStartTimeMs = program.getStartTimeUtcMillis ( ) ; mProgramEndTimeMs = program.getEndTimeUtcMillis ( ) ; mProgress.setMax ( ( ( mProgramEndTimeMs ) - ( mProgramStartTimeMs ) ) ) ; updateRecTimeText ( ) ; com.android.tv.common.SoftPreconditions.checkArgument ( ( ( mProgramStartTimeMs ) <= ( mProgramEndTimeMs ) ) ) ; }
Source:
public boolean performAccessibilityAction ( final int action , final android.os.Bundle arguments ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return performAccessibilityAction ( action , arguments ) ; } } ) ; return ret ; } if ( mAwContents.supportsAccessibilityAction ( action ) ) { return mAwContents.performAccessibilityAction ( action , arguments ) ; } return mWebViewPrivate.super_performAccessibilityAction ( action , arguments ) ; }

Target:
public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { android.view.accessibility.AccessibilityNodeProvider ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.view.accessibility.AccessibilityNodeProvider > ( ) { @ java.lang.Override public android.view.accessibility.AccessibilityNodeProvider call ( ) { return getAccessibilityNodeProvider ( ) ; } } ) ; return ret ; } return mAwContents.getAccessibilityNodeProvider ( ) ; }
Source:
public void testTextAlignment ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( RtlDetector.COMPAT ) ; assertEquals ( ( "" + ( ( ( ( "res/layout/spinner.xml:49: Error: Inconsistent alignment specification between textAlignment and gravity attributes: was end, expected start [RtlCompat]\n" + " android:textAlignment=\"textStart\"/> <!-- ERROR -->\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/layout/spinner.xml:46: Incompatible direction here\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( "rtl/project-api17.properties=>project.properties" , "rtl/minsdk5targetsdk17.xml=>AndroidManifest.xml" , "rtl/spinner.xml=>res/layout/spinner.xml" ) ) ; }

Target:
public void testTextAlignment ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( RtlDetector.COMPAT ) ; assertEquals ( ( "" + ( ( ( ( "res/layout/spinner.xml:49: Error: Inconsistent alignment specification between textAlignment and gravity attributes: was end, expected start [RtlCompat]\n" + " android:textAlignment=\"textStart\"/> <!-- ERROR -->\n" ) + " ~~~~~~~~~\n" ) + " res/layout/spinner.xml:46: Incompatible direction here\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( "rtl/project-api17.properties=>project.properties" , "rtl/minsdk5targetsdk17.xml=>AndroidManifest.xml" , "rtl/spinner.xml=>res/layout/spinner.xml" ) ) ; }
Source:
private int newBranchOffset ( int newInstructionOffset , int oldBranchOffset ) { if ( ( newInstructionOffset < 0 ) || ( newInstructionOffset > ( codeLength ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( ( "Invalid instruction offset [" + newInstructionOffset ) + "] in code with length [" ) + ( codeLength ) ) + "]" ) ) ; } int oldInstructionOffset = oldInstructionOffsets [ newInstructionOffset ] ; return ( newInstructionOffset ( ( oldInstructionOffset + oldBranchOffset ) ) ) - ( newInstructionOffset ( oldInstructionOffset ) ) ; }

Target:
public void visitAnySwitchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.SwitchInstruction switchInstruction ) { try { switchInstruction.defaultOffset = newBranchOffset ( offset , switchInstruction.defaultOffset ) ; updateJumpOffsets ( offset , switchInstruction.jumpOffsets ) ; oldInstructionOffsets [ offset ] = - 1 ; } catch ( java.lang.IllegalArgumentException e ) { if ( ( ( level ) == 0 ) || ( ! ( allowExternalBranchTargets ) ) ) { throw e ; } } }