auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { java.lang.String matchParent = getFillParentValueName ( ) ; node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , matchParent ) ; node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , matchParent ) ; } }

Target:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { java.lang.String matchParent = getFillParentValueName ( ) ; node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , matchParent ) ; node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , matchParent ) ; } }
Source:
public void onUnavailable ( ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onUnavailable" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_UNAVAILABLE ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_UNAVAILABLE ) ) { mEventFacade.postEvent ( TelephonyConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.telephony.TelephonyEvents.NetworkCallbackEvent ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_UNAVAILABLE ) , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE ) ) ; } }

Target:
public void onUnavailable ( ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onUnavailable" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_UNAVAILABLE ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_UNAVAILABLE ) ) { mEventFacade.postEvent ( ConnectivityConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.ConnectivityEvents.NetworkCallbackEventBase ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_UNAVAILABLE ) ) ) ; } }
Source:
void baseStop ( ) { if ( android.media.PlayerBase.DEBUG ) { android.util.Log.v ( android.media.PlayerBase.TAG , ( "baseStop() piid=" + ( mPlayerIId ) ) ) ; } try { synchronized ( mLock ) { mState = AudioPlaybackConfiguration.PLAYER_STATE_STOPPED ; android.media.PlayerBase.getService ( ) . playerEvent ( mPlayerIId , mState ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.PlayerBase.TAG , "Error talking to audio service, STOPPED state will not be tracked" , e ) ; } }

Target:
void basePause ( ) { if ( android.media.PlayerBase.DEBUG ) { android.util.Log.v ( android.media.PlayerBase.TAG , ( "basePause() piid=" + ( mPlayerIId ) ) ) ; } updateState ( AudioPlaybackConfiguration.PLAYER_STATE_PAUSED ) ; }
Source:
protected synchronized void implCloseSelectableChannel ( ) throws java.io.IOException { if ( ( status ) != ( java.nio.SocketChannelImpl.SOCKET_STATUS_CLOSED ) ) { status = java.nio.SocketChannelImpl.SOCKET_STATUS_CLOSED ; libcore.io.IoBridge.closeSocket ( fd ) ; if ( ( ( socket ) != null ) && ( ! ( socket.isClosed ( ) ) ) ) { socket.onClose ( ) ; } } }

Target:
protected synchronized void implCloseSelectableChannel ( ) throws java.io.IOException { if ( ( status ) != ( java.nio.SocketChannelImpl.SOCKET_STATUS_CLOSED ) ) { status = java.nio.SocketChannelImpl.SOCKET_STATUS_CLOSED ; libcore.io.IoBridge.closeAndSignalBlockedThreads ( fd ) ; if ( ( ( socket ) != null ) && ( ! ( socket.isClosed ( ) ) ) ) { socket.onClose ( ) ; } } }
Source:
private void dumpMethodStats ( ) { java.lang.System.out.print ( "\nMethod Stats\n" ) ; java.lang.System.out.print ( "Excl Cpu Incl Cpu Excl Real Incl Real Calls Method\n" ) ; for ( com.android.traceview.MethodData md : mSortedMethods ) { java.lang.System.out.format ( "%9d %9d %9s %s\n" , md.getElapsedExclusiveCpuTime ( ) , md.getElapsedInclusiveCpuTime ( ) , md.getElapsedExclusiveRealTime ( ) , md.getElapsedInclusiveRealTime ( ) , md.getCalls ( ) , md.getProfileName ( ) ) ; } }

Target:
private void dumpMethodStats ( ) { java.lang.System.out.print ( "\nMethod Stats\n" ) ; java.lang.System.out.print ( "Excl Cpu Incl Cpu Excl Real Incl Real Calls Method\n" ) ; for ( com.android.traceview.MethodData md : mSortedMethods ) { java.lang.System.out.format ( "%9d %9d %9d %9d %9s %s\n" , md.getElapsedExclusiveCpuTime ( ) , md.getElapsedInclusiveCpuTime ( ) , md.getElapsedExclusiveRealTime ( ) , md.getElapsedInclusiveRealTime ( ) , md.getCalls ( ) , md.getProfileName ( ) ) ; } }
Source:
public void restoreconAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , int appId , java.lang.String seInfo ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.restoreconAppData ( uuid , packageName , userId , flags , appId , seInfo ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void createAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , int appId , java.lang.String seInfo , int targetSdkVersion ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createAppData ( uuid , packageName , userId , flags , appId , seInfo , targetSdkVersion ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void setDebugFlags ( int flags , int mask ) { enforcePermission ( android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS ) ; waitForReady ( ) ; synchronized ( mLock ) { if ( ( mask & ( android.os.storage.StorageManager.DEBUG_FORCE_ADOPTABLE ) ) != 0 ) { mForceAdoptable = ( flags & ( android.os.storage.StorageManager.DEBUG_FORCE_ADOPTABLE ) ) != 0 ; } writeSettingsLocked ( ) ; resetIfReadyAndConnectedLocked ( ) ; } }

Target:
private void handleSystemReady ( ) { initIfReadyAndConnected ( ) ; resetIfReadyAndConnected ( ) ; com.android.server.MountServiceIdler.scheduleIdlePass ( mContext ) ; }
Source:
private char getChar ( int offset ) { return bytes.getChar ( offset ) ; }

Target:
private java.lang.String makeStringFromBytes ( int offset , int length ) { if ( length <= 16 ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( length ) ; for ( int i = 0 ; i < length ; offset += 2 , ++ i ) { sb.append ( bytes.getChar ( offset ) ) ; } return sb.toString ( ) ; } else { java.lang.CharSequence cs = bytes.asCharBuffer ( ) ; offset /= 2 ; return cs.subSequence ( offset , ( offset + length ) ) . toString ( ) ; } }
Source:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.cellbroadcastreceiver.CellBroadcastListActivity.MENU_DELETE_ALL : confirmDeleteThread ( ( - 1 ) ) ; break ; case com.android.cellbroadcastreceiver.CellBroadcastListActivity.MENU_PREFERENCES : android.content.Intent intent = new android.content.Intent ( this , com.android.cellbroadcastreceiver.CellBroadcastSettings.class ) ; startActivityIfNeeded ( intent , ( - 1 ) ) ; break ; default : return true ; } return false ; }

Target:
public void onPrepareOptionsMenu ( android.view.Menu menu ) { menu.findItem ( com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_DELETE_ALL ) . setVisible ( ( ! ( mAdapter.isEmpty ( ) ) ) ) ; }
Source:
public void iccIO ( int command , int fileid , java.lang.String path , int p1 , int p2 , int p3 , java.lang.String data , java.lang.String pin2 , android.os.Message result ) { iccIOForApp ( command , fileid , path , p1 , p2 , p3 , data , pin2 , null , result ) ; }

Target:
public void iccIO ( int command , int fileId , java.lang.String path , int p1 , int p2 , int p3 , java.lang.String data , java.lang.String pin2 , android.os.Message result ) { iccIOForApp ( command , fileId , path , p1 , p2 , p3 , data , pin2 , null , result ) ; }
Source:
public void requestNetwork ( android.net.NetworkRequest request , android.app.PendingIntent operation ) { checkPendingIntent ( operation ) ; try { mService.pendingRequestForNetwork ( request.networkCapabilities , operation ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void requestNetwork ( android.net.NetworkRequest request , android.app.PendingIntent operation ) { android.net.ConnectivityManager.checkPendingIntentNotNull ( operation ) ; try { mService.pendingRequestForNetwork ( request.networkCapabilities , operation ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } catch ( android.os.ServiceSpecificException e ) { throw android.net.ConnectivityManager.convertServiceException ( e ) ; } }
Source:
public android.telephony.ims.feature.RcsFeature onCreateRcsFeature ( int slotId ) { return null ; }

Target:
private com.android.ims.internal.IImsMMTelFeature createEmergencyMMTelFeatureInternal ( int slotId , com.android.ims.internal.IImsFeatureStatusCallback c ) { android.telephony.ims.feature.MMTelFeature f = onCreateEmergencyMMTelImsFeature ( slotId ) ; if ( f != null ) { setupFeature ( f , slotId , ImsFeature.EMERGENCY_MMTEL , c ) ; return f.getBinder ( ) ; } else { return null ; } }
Source:
public void testBaseStyledStringValue ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = getResourceRepository ( ) ; java.util.List < com.android.ide.common.res2.ResourceItem > itemList = repo.getResourceItem ( ResourceType.STRING , "styled_string" ) ; assertNotNull ( itemList ) ; assertEquals ( 1 , itemList.size ( ) ) ; com.android.ide.common.rendering.api.ResourceValue value = itemList.get ( 0 ) . getResourceValue ( false ) ; assertNotNull ( value ) ; assertEquals ( "Forgot your username or password?\nVisit google.com/accounts/recovery." , value.getValue ( ) ) ; }

Target:
public void testBaseStyledStringValue ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = com.android.ide.common.res2.ResourceRepositoryTest.getResourceRepository ( ) ; java.util.List < com.android.ide.common.res2.ResourceItem > itemList = repo.getResourceItem ( ResourceType.STRING , "styled_string" ) ; assertNotNull ( itemList ) ; assertEquals ( 1 , itemList.size ( ) ) ; com.android.ide.common.rendering.api.ResourceValue value = itemList.get ( 0 ) . getResourceValue ( false ) ; assertNotNull ( value ) ; assertEquals ( "Forgot your username or password?\nVisit google.com/accounts/recovery." , value.getValue ( ) ) ; }
Source:
synchronized void nAllocationData1D ( long id , int off , int mip , int count , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData1D ( mContext , id , off , mip , count , d , sizeBytes , dt.mID ) ; }

Target:
synchronized void nAllocationData1D ( long id , int off , int mip , int count , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData1D ( mContext , id , off , mip , count , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVFile file ) throws com.android.sched.util.file.WrongPermissionException { assert ! ( isClosed ( ) ) ; assert capabilities.contains ( Capabilities.READ ) ; VFSStatCategory.DIR_READ.getCounterStat ( getTracer ( ) , infoString ) . incValue ( ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileInputStream ( path ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.util.file.FileOrDirectory.checkPermissions ( path , file.getLocation ( ) , Permission.READ ) ; throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVFile file ) throws com.android.sched.util.file.WrongPermissionException { assert ! ( isClosed ( ) ) ; assert capabilities.contains ( Capabilities.READ ) ; VFSStatCategory.DIR_READ.getCounterStat ( getTracer ( ) , infoString ) . incValue ( ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileInputStream ( path ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.vfs.DirectFS.checkPermissionsIfExists ( path , file.getLocation ( ) , Permission.READ ) ; throw new java.lang.AssertionError ( e ) ; } }
Source:
public boolean testInBand ( int b ) { if ( ( ( b >= 0 ) && ( b < ( mBands ) ) ) && ( ( mPointsPerBand [ b ] ) > 0 ) ) { if ( ( ( ( double ) ( mInBoundPointsPerBand [ b ] ) ) / ( mPointsPerBand [ b ] ) ) > ( com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.MIN_FRACTION_POINTS_IN_BAND ) ) { return true ; } } return false ; }

Target:
public boolean testInBand ( int b ) { if ( ( ( b >= 0 ) && ( b < ( mBandCount ) ) ) && ( ( mPointsPerBand [ b ] ) > 0 ) ) { if ( ( ( ( double ) ( mInBoundPointsPerBand [ b ] ) ) / ( mPointsPerBand [ b ] ) ) > ( com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.MIN_FRACTION_POINTS_IN_BAND ) ) { return true ; } } return false ; }
Source:
public void testUngrant_DoubleUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_DoubleUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
private int getSkipMultiplier ( ) { long currentTime = android.os.SystemClock.elapsedRealtime ( ) ; long multi = ( ( long ) ( java.lang.Math.pow ( 2 , ( ( currentTime - ( mSkipStartTime ) ) / ( com.android.bluetooth.avrcp.Avrcp.SKIP_DOUBLE_INTERVAL ) ) ) ) ) ; return ( ( int ) ( java.lang.Math.min ( com.android.bluetooth.avrcp.Avrcp.MAX_MULTIPLIER_VALUE , multi ) ) ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( android.text.format.DateFormat.format ( "MM-dd HH:mm:ss" , mTimeSent ) ) ; sb.append ( ( " " + ( mEvent.toString ( ) ) ) ) ; if ( ( mPackage ) == null ) { sb.append ( " (undispatched)" ) ; } else { sb.append ( ( " to " + ( mPackage ) ) ) ; sb.append ( ( ( " in " + ( ( mTimeProcessed ) - ( mTimeSent ) ) ) + "ms" ) ) ; } return sb.toString ( ) ; }
Source:
public void testMissingBackupWithGcmPreTarget23 ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestDetector.ALLOW_BACKUP ) ; assertEquals ( ( "" + ( ( ( "AndroidManifest.xml:5: Warning: Should explicitly set android:fullBackupContent to avoid backing up the GCM device specific regId. [AllowBackup]\n" + " <application\n" ) + " ^\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + " <uses-sdk android:targetSdkVersion=\"21\" />" ) + "\n" ) + " <application\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >" ) + " <receiver\n" ) + " android:name=\".GcmBroadcastReceiver\"\n" ) + " android:permission=\"com.google.android.c2dm.permission.SEND\" >\n" ) + " <intent-filter>\n" ) + " <action android:name=\"com.google.android.c2dm.intent.RECEIVE\" />\n" ) + " <category android:name=\"com.example.gcm\" />\n" ) + " </intent-filter>\n" ) + " </receiver>\n" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }

Target:
public void testMissingBackupWithGcmPreTarget23 ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestDetector.ALLOW_BACKUP ) ; assertEquals ( "No warnings." , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + " <uses-sdk android:targetSdkVersion=\"21\" />" ) + "\n" ) + " <application\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >" ) + " <receiver\n" ) + " android:name=\".GcmBroadcastReceiver\"\n" ) + " android:permission=\"com.google.android.c2dm.permission.SEND\" >\n" ) + " <intent-filter>\n" ) + " <action android:name=\"com.google.android.c2dm.intent.RECEIVE\" />\n" ) + " <category android:name=\"com.example.gcm\" />\n" ) + " </intent-filter>\n" ) + " </receiver>\n" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copyFrom ( short [ ] d ) { validateIsInt16 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
public void initialize ( int strength , java.security.SecureRandom random ) { if ( ( ( strength < 512 ) || ( strength > 1024 ) ) || ( ( strength % 64 ) != 0 ) ) { throw new java.security.InvalidParameterException ( "strength must be from 512 - 1024 and a multiple of 64" ) ; } this . strength = strength ; this . random = random ; }

Target:
public void initialize ( int strength , java.security.SecureRandom random ) { if ( ( ( ( strength < 512 ) || ( strength > 4096 ) ) || ( ( strength < 1024 ) && ( ( strength % 64 ) != 0 ) ) ) || ( ( strength >= 1024 ) && ( ( strength % 1024 ) != 0 ) ) ) { throw new java.security.InvalidParameterException ( "strength must be from 512 - 4096 and a multiple of 1024 above 1024" ) ; } this . strength = strength ; this . random = random ; }
Source:
public static boolean fuzzyEquals ( double a , double b , double tolerance ) { com.google.common.math.MathPreconditions.checkNonNegative ( "tolerance" , tolerance ) ; return ( ( ( java.lang.Math.copySign ( ( a - b ) , 1.0 ) ) <= tolerance ) || ( a == b ) ) || ( ( a != a ) && ( b != b ) ) ; }

Target:
public static boolean fuzzyEquals ( double a , double b , double tolerance ) { com.google.common.math.MathPreconditions.checkNonNegative ( "tolerance" , tolerance ) ; return ( ( ( java.lang.Math.copySign ( ( a - b ) , 1.0 ) ) <= tolerance ) || ( a == b ) ) || ( ( java.lang.Double.isNaN ( a ) ) && ( java.lang.Double.isNaN ( b ) ) ) ; }
Source:
public com.android.server.wifi.hotspot2.pps.DomainMatcher.Match isSubDomain ( java.util.List < java.lang.String > domain ) { com.android.server.wifi.hotspot2.pps.DomainMatcher.Label label = mRoot ; for ( java.lang.String labelString : domain ) { label = label.getSubLabel ( labelString ) ; if ( label == null ) { return com.android.server.wifi.hotspot2.pps.DomainMatcher.Match.None ; } else if ( ( label.getMatch ( ) ) != ( com.android.server.wifi.hotspot2.pps.DomainMatcher.Match.None ) ) { return label.getMatch ( ) ; } } return com.android.server.wifi.hotspot2.pps.DomainMatcher.Match.None ; }

Target:
public com.android.server.wifi.hotspot2.DomainMatcher.Match isSubDomain ( java.util.List < java.lang.String > domain ) { com.android.server.wifi.hotspot2.DomainMatcher.Label label = mRoot ; for ( java.lang.String labelString : domain ) { label = label.getSubLabel ( labelString ) ; if ( label == null ) { return com.android.server.wifi.hotspot2.DomainMatcher.Match.None ; } else if ( ( label.getMatch ( ) ) != ( com.android.server.wifi.hotspot2.DomainMatcher.Match.None ) ) { return label.getMatch ( ) ; } } return com.android.server.wifi.hotspot2.DomainMatcher.Match.None ; }
Source:
public void testMergeWrite ( ) throws java.lang.Exception { com.android.builder.resources.ResourceSet mergedSet = com.android.builder.resources.ResourceMergerTest.getMergedSet ( ) ; java.io.File folder = com.android.builder.resources.ResourceMergerTest.getWrittenSet ( ) ; com.android.builder.resources.ResourceSet writtenSet = new com.android.builder.resources.ResourceSet ( ) ; writtenSet.addSource ( folder ) ; assertEquals ( mergedSet.getSize ( ) , writtenSet.getSize ( ) ) ; java.util.Map < java.lang.String , com.android.builder.resources.Resource > map = writtenSet.getResourceMap ( ) ; for ( com.android.builder.resources.Resource item : mergedSet.getResources ( ) ) { assertNotNull ( map.get ( item.getKey ( ) ) ) ; } }

Target:
public void testReplacedAlias ( ) throws java.lang.Exception { com.android.builder.resources.ResourceMerger merger = com.android.builder.resources.ResourceMergerTest.getResourceMerger ( ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.builder.resources.Resource > mergedMap = merger.getResourceMap ( ) ; java.util.List < com.android.builder.resources.Resource > values = mergedMap.get ( "layout/alias_replaced_by_file" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.builder.resources.Resource layout = values.get ( 1 ) ; assertNull ( layout.getValue ( ) ) ; }
Source:
public void testIterator ( boolean fair ) { final java.util.concurrent.SynchronousQueue q = new java.util.concurrent.SynchronousQueue ( fair ) ; java.util.Iterator it = q.iterator ( ) ; assertFalse ( it.hasNext ( ) ) ; try { java.lang.Object x = it.next ( ) ; shouldThrow ( ) ; } catch ( java.util.NoSuchElementException success ) { } }

Target:
public void testNeverContainsNull ( ) { java.util.Collection < ? > q = new java.util.concurrent.SynchronousQueue ( ) ; assertFalse ( q.contains ( null ) ) ; assertFalse ( q.remove ( null ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 1 ] ) ; SameThread.doTest ( ) ; java.lang.System.out.println ( ) ; OtherThread.doTestOtherThreadWait ( ) ; java.lang.System.out.println ( ) ; OtherThread.doTestOtherThreadBusyLoop ( ) ; java.lang.System.out.println ( ) ; AllTraces.doTest ( ) ; java.lang.System.out.println ( ) ; ThreadListTraces.doTest ( ) ; java.lang.System.out.println ( "Done" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 1 ] ) ; SameThread.doTest ( ) ; java.lang.System.out.println ( ) ; OtherThread.doTestOtherThreadWait ( ) ; java.lang.System.out.println ( ) ; OtherThread.doTestOtherThreadBusyLoop ( ) ; java.lang.System.out.println ( ) ; AllTraces.doTest ( ) ; java.lang.System.out.println ( ) ; ThreadListTraces.doTest ( ) ; java.lang.System.out.println ( ) ; Frames.doTest ( ) ; java.lang.System.out.println ( "Done" ) ; }
Source:
public void test_getGregorianChange ( ) { java.util.GregorianCalendar gc = new java.util.GregorianCalendar ( ) ; java.util.GregorianCalendar returnedChange = new java.util.GregorianCalendar ( java.util.TimeZone.getTimeZone ( "EST" ) ) ; returnedChange.setTime ( gc.getGregorianChange ( ) ) ; assertEquals ( "Returned incorrect year" , 1582 , returnedChange.get ( java.util.Calendar.YEAR ) ) ; assertTrue ( "Returned incorrect month" , ( ( returnedChange.get ( java.util.Calendar.MONTH ) ) == ( java.util.Calendar.OCTOBER ) ) ) ; assertEquals ( "Returned incorrect day of month" , 4 , returnedChange.get ( java.util.Calendar.DAY_OF_MONTH ) ) ; }

Target:
public void test_getGregorianChange ( ) { java.util.GregorianCalendar gc = new java.util.GregorianCalendar ( ) ; java.util.GregorianCalendar returnedChange = new java.util.GregorianCalendar ( org.apache.harmony.luni.tests.java.util.GregorianCalendarTest.AMERICA_NEW_YORK ) ; returnedChange.setTime ( gc.getGregorianChange ( ) ) ; assertEquals ( "Returned incorrect year" , 1582 , returnedChange.get ( java.util.Calendar.YEAR ) ) ; assertTrue ( "Returned incorrect month" , ( ( returnedChange.get ( java.util.Calendar.MONTH ) ) == ( java.util.Calendar.OCTOBER ) ) ) ; assertEquals ( "Returned incorrect day of month" , 4 , returnedChange.get ( java.util.Calendar.DAY_OF_MONTH ) ) ; }
Source:
public void generatePushValue ( final org.jetbrains.asm4.commons.GeneratorAdapter generator , final java.lang.Object value ) { com.intellij.uiDesigner.lw.IconDescriptor descriptor = ( ( com.intellij.uiDesigner.lw.IconDescriptor ) ( value ) ) ; generator.newInstance ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourImageIconType ) ; generator.dup ( ) ; generator.loadThis ( ) ; generator.invokeVirtual ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourObjectType , com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourGetClassMethod ) ; generator.push ( ( "/" + ( descriptor.getIconPath ( ) ) ) ) ; generator.invokeVirtual ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourClassType , com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourGetResourceMethod ) ; generator.invokeConstructor ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourImageIconType , com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourInitMethod ) ; }

Target:
public void generatePushValue ( final org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter generator , final java.lang.Object value ) { com.intellij.uiDesigner.lw.IconDescriptor descriptor = ( ( com.intellij.uiDesigner.lw.IconDescriptor ) ( value ) ) ; generator.newInstance ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourImageIconType ) ; generator.dup ( ) ; generator.loadThis ( ) ; generator.invokeVirtual ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourObjectType , com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourGetClassMethod ) ; generator.push ( ( "/" + ( descriptor.getIconPath ( ) ) ) ) ; generator.invokeVirtual ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourClassType , com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourGetResourceMethod ) ; generator.invokeConstructor ( com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourImageIconType , com.intellij.uiDesigner.compiler.IconPropertyCodeGenerator.ourInitMethod ) ; }
Source:
private byte [ ] getPBPrimaryFolderVersion ( ) { long primaryVcMsb = 0 ; java.nio.ByteBuffer pvc = java.nio.ByteBuffer.allocate ( 16 ) ; pvc.putLong ( primaryVcMsb ) ; android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapObexServer.TAG , ( "primaryVersionCounter is " + ( BluetoothPbapUtils.sPrimaryVersionCounter ) ) ) ; pvc.putLong ( BluetoothPbapUtils.sPrimaryVersionCounter ) ; return pvc.array ( ) ; }

Target:
private byte [ ] getPBPrimaryFolderVersion ( ) { long primaryVcMsb = 0 ; java.nio.ByteBuffer pvc = java.nio.ByteBuffer.allocate ( 16 ) ; pvc.putLong ( primaryVcMsb ) ; android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapObexServer.TAG , ( "primaryVersionCounter is " + ( BluetoothPbapUtils.primaryVersionCounter ) ) ) ; pvc.putLong ( BluetoothPbapUtils.primaryVersionCounter ) ; return pvc.array ( ) ; }
Source:
public void subData2D ( int xoff , int yoff , int w , int h , int [ ] d ) { super . copy2DRangeFrom ( xoff , yoff , w , h , d ) ; }

Target:
public static android.renderscript.AllocationAdapter create2D ( android.renderscript.RenderScript rs , android.renderscript.Allocation a ) { rs.validate ( ) ; android.renderscript.Type t = android.renderscript.Type.createXY ( rs , a.getElement ( ) , a.getType ( ) . getX ( ) , a.getType ( ) . getY ( ) ) ; return android.renderscript.AllocationAdapter.createTyped ( rs , a , t ) ; }
Source:
public void TestInlineSet ( ) { expect ( "{ [:Ll:] } x > y; [:Ll:] > z;" , "aAbxq" , "zAyzz" ) ; expect ( "a[0-9]b > qrs" , "1a7b9" , "1qrs9" ) ; expect ( ( "$digit = [0-9];" + ( ( ( ( "$alpha = [a-zA-Z];" + "$alphanumeric = [$digit $alpha];" ) + "$special = [^$alphanumeric];" ) + "$alphanumeric > '-';" ) + "$special > '*';" ) ) , "thx-1138" , "---*----" ) ; }

Target:
public void TestInlineSet ( ) { android.icu.dev.test.translit.TransliteratorTest.expect ( "{ [:Ll:] } x > y; [:Ll:] > z;" , "aAbxq" , "zAyzz" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( "a[0-9]b > qrs" , "1a7b9" , "1qrs9" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( ( "$digit = [0-9];" + ( ( ( ( "$alpha = [a-zA-Z];" + "$alphanumeric = [$digit $alpha];" ) + "$special = [^$alphanumeric];" ) + "$alphanumeric > '-';" ) + "$special > '*';" ) ) , "thx-1138" , "---*----" ) ; }
Source:
private void notifyDownloadCompleted ( int status , boolean countRetry , int retryAfter , int redirectCount , boolean gotData , java.lang.String filename , java.lang.String uri , java.lang.String mimeType ) { notifyThroughDatabase ( status , countRetry , retryAfter , redirectCount , gotData , filename , uri , mimeType ) ; if ( android.provider.Downloads.isStatusCompleted ( status ) ) { notifyThroughIntent ( ) ; } }

Target:
private void notifyDownloadCompleted ( int status , boolean countRetry , int retryAfter , int redirectCount , boolean gotData , java.lang.String filename , java.lang.String uri , java.lang.String mimeType ) { notifyThroughDatabase ( status , countRetry , retryAfter , redirectCount , gotData , filename , uri , mimeType ) ; if ( Downloads.Impl.isStatusCompleted ( status ) ) { notifyThroughIntent ( ) ; } }
Source:
public void srcToLib ( @ javax.annotation.Nonnull java.io.File out , boolean zipFiles , @ javax.annotation.Nonnull java.io.File ... sources ) throws java.lang.Exception { java.util.List < java.lang.String > args = new java.util.ArrayList < java.lang.String > ( ) ; srcToCommon ( args , sources ) ; if ( zipFiles ) { args.add ( "--output-jack" ) ; } else { args.add ( "--output-jack-dir" ) ; } args.add ( out.getAbsolutePath ( ) ) ; com.android.jack.test.toolchain.AbstractTestTools.addFile ( args , false , sources ) ; run ( args ) ; }

Target:
public void srcToLib ( @ javax.annotation.Nonnull java.io.File out , boolean zipFiles , @ javax.annotation.Nonnull java.io.File ... sources ) throws java.lang.Exception { java.util.List < java.lang.String > commandLine = new java.util.ArrayList < java.lang.String > ( ) ; srcToCommon ( commandLine , sources ) ; if ( zipFiles ) { commandLine.add ( "--output-jack" ) ; } else { commandLine.add ( "--output-jack-dir" ) ; } commandLine.add ( out.getAbsolutePath ( ) ) ; com.android.jack.test.toolchain.AbstractTestTools.addFile ( commandLine , false , sources ) ; run ( commandLine ) ; }
Source:
protected com.intellij.updater.ValidationResult doValidateNotChanged ( java.io.File toFile , com.intellij.updater.ValidationResult.Kind kind , com.intellij.updater.ValidationResult.Action action ) throws java.io.IOException { if ( toFile.exists ( ) ) { if ( isModified ( toFile ) ) { return new com.intellij.updater.ValidationResult ( kind , myPath , action , ValidationResult.MODIFIED_MESSAGE , ValidationResult.Option.IGNORE ) ; } } else if ( ! ( isOptional ) ) { return new com.intellij.updater.ValidationResult ( kind , myPath , action , ValidationResult.ABSENT_MESSAGE , ValidationResult.Option.IGNORE ) ; } return null ; }

Target:
protected com.intellij.updater.ValidationResult doValidateNotChanged ( java.io.File toFile , com.intellij.updater.ValidationResult.Kind kind , com.intellij.updater.ValidationResult.Action action ) throws java.io.IOException { if ( toFile.exists ( ) ) { if ( isModified ( toFile ) ) { return new com.intellij.updater.ValidationResult ( kind , myPath , action , ValidationResult.MODIFIED_MESSAGE , ( myPatch.isStrict ( ) ? ValidationResult.Option.NONE : ValidationResult.Option.IGNORE ) ) ; } } else if ( ! ( isOptional ) ) { return new com.intellij.updater.ValidationResult ( kind , myPath , action , ValidationResult.ABSENT_MESSAGE , ValidationResult.Option.IGNORE ) ; } return null ; }
Source:
public void enterWhen ( com.google.common.util.concurrent.Monitor.Guard guard ) throws java.lang.InterruptedException { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; boolean reentrant = lock.isHeldByCurrentThread ( ) ; boolean success = false ; lock.lockInterruptibly ( ) ; try { waitInterruptibly ( guard , reentrant ) ; success = true ; } finally { if ( ! success ) { lock.unlock ( ) ; } } }

Target:
public void enterWhen ( com.google.common.util.concurrent.Monitor.Guard guard ) throws java.lang.InterruptedException { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; boolean signalBeforeWaiting = lock.isHeldByCurrentThread ( ) ; lock.lockInterruptibly ( ) ; boolean satisfied = false ; try { if ( ! ( guard.isSatisfied ( ) ) ) { await ( guard , signalBeforeWaiting ) ; } satisfied = true ; } finally { if ( ! satisfied ) { leave ( ) ; } } }
Source:
private com.android.jack.optimizations.wofr.CompilationProperties defaultProperties ( ) { return CompilationProperties.EMPTY.excludeJillToolchain ( ) . withPreserveJls ( false ) . withPreserveReflections ( false ) . with ( Optimizations.WriteOnlyFieldRemoval.ENABLE.getName ( ) , java.lang.Boolean.TRUE ) ; }

Target:
private com.android.jack.optimizations.wofr.CompilationProperties defaultProperties ( ) { java.lang.Boolean TRUE = java.lang.Boolean.TRUE ; java.lang.Boolean FALSE = java.lang.Boolean.FALSE ; return CompilationProperties.EMPTY.excludeJillToolchain ( ) . with ( Optimizations.WriteOnlyFieldRemoval.ENABLE.getName ( ) , TRUE ) . with ( Optimizations.WriteOnlyFieldRemoval.REMOVE_UNUSED_FIELDS.getName ( ) , TRUE ) . with ( Optimizations.WriteOnlyFieldRemoval.PRESERVE_NULL_CHECKS.getName ( ) , FALSE ) . with ( Optimizations.WriteOnlyFieldRemoval.PRESERVE_OBJECT_LIFETIME.getName ( ) , FALSE ) . with ( Optimizations.WriteOnlyFieldRemoval.ENSURE_TYPE_INITIALIZERS.getName ( ) , FALSE ) ; }
Source:
public void updateRunningAccounts ( ) { mRunningAccounts = com.android.server.accounts.AccountManagerService.getSingleton ( ) . getRunningAccounts ( ) ; if ( mBootCompleted ) { doDatabaseCleanup ( ) ; } android.accounts.AccountAndUser [ ] accounts = mRunningAccounts ; for ( com.android.server.content.SyncManager.ActiveSyncContext currentSyncContext : mActiveSyncContexts ) { if ( ! ( containsAccountAndUser ( accounts , currentSyncContext.mSyncOperation.target.account , currentSyncContext.mSyncOperation.target.userId ) ) ) { android.util.Log.d ( com.android.server.content.SyncManager.TAG , "canceling sync since the account is no longer running" ) ; sendSyncFinishedOrCanceledMessage ( currentSyncContext , null ) ; } } sendCheckAlarmsMessage ( ) ; }

Target:
private void updateRunningAccountsH ( ) { mRunningAccounts = com.android.server.accounts.AccountManagerService.getSingleton ( ) . getRunningAccounts ( ) ; if ( mBootCompleted ) { doDatabaseCleanup ( ) ; } android.accounts.AccountAndUser [ ] accounts = mRunningAccounts ; for ( com.android.server.content.SyncManager.ActiveSyncContext currentSyncContext : mActiveSyncContexts ) { if ( ! ( containsAccountAndUser ( accounts , currentSyncContext.mSyncOperation.target.account , currentSyncContext.mSyncOperation.target.userId ) ) ) { android.util.Log.d ( com.android.server.content.SyncManager.TAG , "canceling sync since the account is no longer running" ) ; sendSyncFinishedOrCanceledMessage ( currentSyncContext , null ) ; } } sendCheckAlarmsMessage ( ) ; }
Source:
public final void testPkgTypeExtra ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_EXTRAS ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasTag ( ) ) ; assertTrue ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeExtra ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_EXTRA ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasTag ( ) ) ; assertTrue ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public void releaseSecurityParameterIndex ( int resourceId ) throws android.os.RemoteException { }

Target:
private synchronized < T extends com.android.server.IpSecService.ManagedResource > void releaseManagedResource ( com.android.server.IpSecService.ManagedResourceArray < T > resArray , int resourceId , java.lang.String typeName ) throws android.os.RemoteException { T record = resArray.get ( resourceId ) ; if ( record == null ) { throw new java.lang.IllegalArgumentException ( ( ( ( typeName + " " ) + resourceId ) + " is not available to be deleted" ) ) ; } record.release ( ) ; resArray.remove ( resourceId ) ; }
Source:
public void apply ( com.android.ide.eclipse.gltrace.state.IGLProperty state ) { com.android.ide.eclipse.gltrace.state.IGLProperty property = mAccessor.getProperty ( state ) ; mOldData = ( ( byte [ ] ) ( property.getValue ( ) ) ) ; if ( ( mNewData ) != null ) { mNewData = new byte [ mOldData.length ] ; java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( mNewData ) ; bb.put ( mOldData ) ; bb.rewind ( ) ; bb.put ( mSubData , mOffset , mSubData.length ) ; } property.setValue ( mNewData ) ; }

Target:
public void apply ( com.android.ide.eclipse.gltrace.state.IGLProperty state ) { com.android.ide.eclipse.gltrace.state.IGLProperty property = mAccessor.getProperty ( state ) ; mOldData = ( ( byte [ ] ) ( property.getValue ( ) ) ) ; if ( ( mOldData ) != null ) { mNewData = new byte [ mOldData.length ] ; java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( mNewData ) ; bb.put ( mOldData ) ; bb.rewind ( ) ; bb.position ( mOffset ) ; bb.put ( mSubData ) ; } property.setValue ( mNewData ) ; }
Source:
public void run ( ) { try { lock.lock ( ) ; try { if ( ( state ( ) ) != ( com.google.common.util.concurrent.Service.State.STOPPING ) ) { return ; } shutDown ( ) ; } finally { lock.unlock ( ) ; } notifyStopped ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } }

Target:
public void run ( ) { lock.lock ( ) ; try { startUp ( ) ; runningTask = scheduler ( ) . schedule ( delegate , executorService , task ) ; notifyStarted ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } finally { lock.unlock ( ) ; } }
Source:
public void onFocusChanged ( android.view.View view , java.lang.CharSequence sourceText , boolean focused , int direction , android.graphics.Rect previouslyFocusedRect ) { if ( ! focused ) { if ( sourceText instanceof android.text.Spannable ) { android.text.Spannable sp = ( ( android.text.Spannable ) ( sourceText ) ) ; android.text.method.PasswordTransformationMethod.Visible [ ] old = sp.getSpans ( 0 , sp.length ( ) , android.text.method.PasswordTransformationMethod.Visible.class ) ; for ( int i = 0 ; i < ( old.length ) ; i ++ ) { sp.removeSpan ( old [ i ] ) ; } } } }

Target:
public void onFocusChanged ( android.view.View view , java.lang.CharSequence sourceText , boolean focused , int direction , android.graphics.Rect previouslyFocusedRect ) { if ( ! focused ) { if ( sourceText instanceof android.text.Spannable ) { android.text.Spannable sp = ( ( android.text.Spannable ) ( sourceText ) ) ; android.text.method.PasswordTransformationMethod.removeVisibleSpans ( sp ) ; } } }
Source:
public static java.lang.String toTitleCase ( java.util.Locale locale , java.lang.String str , android.icu.text.BreakIterator titleIter , int options ) { return android.icu.lang.UCharacter.toTitleCase ( android.icu.util.ULocale.forLocale ( locale ) , str , titleIter , options ) ; }

Target:
public static java.lang.String toTitleCase ( java.util.Locale locale , java.lang.String str , android.icu.text.BreakIterator titleIter , int options ) { if ( titleIter == null ) { titleIter = android.icu.text.BreakIterator.getWordInstance ( locale ) ; } titleIter.setText ( str ) ; return android.icu.lang.UCharacter.toTitleCase ( android.icu.lang.UCharacter.getCaseLocale ( locale ) , options , titleIter , str ) ; }
Source:
public void testReceive_UnconnectedBufZero ( ) throws java.lang.Exception { assertFalse ( this . channel1.isConnected ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ZERO ) ; assertNull ( this . channel1.receive ( dst ) ) ; }

Target:
public void testReceive_UnboundBufZero ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; assertFalse ( dc.isConnected ( ) ) ; assertFalse ( dc.socket ( ) . isBound ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ZERO ) ; assertNull ( dc.receive ( dst ) ) ; }
Source:
public void testE2 ( ) { dot.junit.opcodes.aget_object.d.T_aget_object_1 t = new dot.junit.opcodes.aget_object.d.T_aget_object_1 ( ) ; java.lang.String [ ] arr = new java.lang.String [ ] { "a" , "b" } ; try { t.run ( arr , ( - 1 ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aioobe ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aget_object.d.T_aget_object_1" , java.lang.ArrayIndexOutOfBoundsException.class , new java.lang.String [ 2 ] , ( - 1 ) ) ; }
Source:
public boolean isEncrypted ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return false ; } try { return ( android.bluetooth.BluetoothDevice.sService.getConnectionState ( this ) ) > ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_CONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }

Target:
public boolean isConnected ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return ( service.getConnectionState ( this ) ) != ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_DISCONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }
Source:
public void testE1 ( ) { dot.junit.opcodes.aget_object.d.T_aget_object_1 t = new dot.junit.opcodes.aget_object.d.T_aget_object_1 ( ) ; java.lang.String [ ] arr = new java.lang.String [ ] { "a" , "b" } ; try { t.run ( arr , 2 ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aioobe ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aget_object.d.T_aget_object_1" , java.lang.ArrayIndexOutOfBoundsException.class , new java.lang.String [ 2 ] , ( - 1 ) ) ; }
Source:
private com.android.ide.common.api.IViewRule initializeRule ( com.android.ide.common.api.IViewRule rule , java.lang.String targetFqcn ) { try { if ( rule.onInitialize ( targetFqcn , new com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine.ClientRulesEngineImpl ( targetFqcn ) ) ) { mRulesCache.put ( targetFqcn , rule ) ; return rule ; } else { rule.onDispose ( ) ; } } catch ( java.lang.Exception e ) { logError ( "%s.onInit() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } return null ; }

Target:
public java.lang.String isValid ( java.lang.String newText ) { try { return filter.validate ( newText ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "Custom validator failed: %s" , e.toString ( ) ) ; return "" ; } }
Source:
public void testReplacedLayout ( ) throws java.lang.Exception { com.android.builder.resources.ResourceSet mergedSet = com.android.builder.resources.ResourceMergerTest.getMergedSet ( ) ; com.android.builder.resources.Resource mainLayout = mergedSet.getResourceMap ( ) . get ( "layout/main" ) ; com.android.builder.resources.ResourceFile sourceFile = mainLayout.getSource ( ) ; assertTrue ( sourceFile.getFile ( ) . getAbsolutePath ( ) . endsWith ( "overlay/layout/main.xml" ) ) ; }

Target:
public void testReplacedLayout ( ) throws java.lang.Exception { com.android.builder.resources.ResourceMerger merger = com.android.builder.resources.ResourceMergerTest.getResourceMerger ( ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.builder.resources.Resource > mergedMap = merger.getResourceMap ( ) ; java.util.List < com.android.builder.resources.Resource > values = mergedMap.get ( "layout/main" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.builder.resources.Resource mainLayout = values.get ( 1 ) ; com.android.builder.resources.ResourceFile sourceFile = mainLayout.getSource ( ) ; assertTrue ( sourceFile.getFile ( ) . getAbsolutePath ( ) . endsWith ( "overlay/layout/main.xml" ) ) ; }
Source:
public com.android.test.runner.TestRequest build ( android.app.Instrumentation instr ) { if ( mTestLoader.isEmpty ( ) ) { loadClassesFromClassPath ( ) ; } org.junit.runner.Request request = com.android.test.runner.TestRequestBuilder.classes ( instr , mSkipExecution , new org.junit.runner.Computer ( ) , mTestLoader.getLoadedClasses ( ) . toArray ( new java.lang.Class [ 0 ] ) ) ; return new com.android.test.runner.TestRequest ( mTestLoader.getLoadFailures ( ) , request.filterWith ( mFilter ) ) ; }

Target:
public com.android.test.runner.TestRequest build ( android.app.Instrumentation instr , android.os.Bundle bundle ) { if ( mTestLoader.isEmpty ( ) ) { loadClassesFromClassPath ( ) ; } org.junit.runner.Request request = com.android.test.runner.TestRequestBuilder.classes ( instr , bundle , mSkipExecution , new org.junit.runner.Computer ( ) , mTestLoader.getLoadedClasses ( ) . toArray ( new java.lang.Class [ 0 ] ) ) ; return new com.android.test.runner.TestRequest ( mTestLoader.getLoadFailures ( ) , request.filterWith ( mFilter ) ) ; }