auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean verifyVpnStatus ( ) { mDevice.openNotification ( ) ; boolean isTrue = mDevice.wait ( android.support.test.uiautomator.Until.hasObject ( android.support.test.uiautomator.By.res ( com.android.devtools.systemimage.uitest.smoke.VpnTest.VPN_LOCK_ICON_RES ) ) , java.util.concurrent.TimeUnit.MILLISECONDS.convert ( 3L , java.util.concurrent.TimeUnit.SECONDS ) ) ; mDevice.pressHome ( ) ; return isTrue ; }

Target:
private static boolean verifyVpnStatus ( android.support.test.uiautomator.UiDevice device ) { device.openNotification ( ) ; boolean isTrue = device.wait ( android.support.test.uiautomator.Until.hasObject ( android.support.test.uiautomator.By.res ( com.android.devtools.systemimage.uitest.smoke.VpnTest.VPN_LOCK_ICON_RES ) ) , java.util.concurrent.TimeUnit.MILLISECONDS.convert ( 3L , java.util.concurrent.TimeUnit.SECONDS ) ) ; device.pressHome ( ) ; return isTrue ; }
Source:
public void run ( com.android.sched.util.file.OutputStreamFile file ) { if ( ( file.getStatus ( ) ) == ( com.android.sched.util.file.StreamFileStatus.OPEN ) ) { throw new java.lang.AssertionError ( ( ( ( ( file.getLocation ( ) . getDescription ( ) ) + " from property '" ) + ( getName ( ) ) ) + " is not closed" ) ) ; } }

Target:
public void run ( com.android.sched.util.file.OutputStreamFile file ) { if ( ( file.getStatus ( ) ) == ( com.android.sched.util.file.StreamFileStatus.OPEN ) ) { throw new java.lang.AssertionError ( ( ( ( ( file.getLocation ( ) . getDescription ( ) ) + " from property '" ) + ( getName ( ) ) ) + "' is not closed" ) ) ; } }
Source:
public void assertDeserialized ( java.io.Serializable initial , java.io.Serializable deserialized ) { java.util.Queue < java.lang.Integer > initque = ( ( java.util.Queue ) ( initial ) ) ; java.util.Queue < java.lang.Integer > deserque = ( ( java.util.Queue ) ( deserialized ) ) ; while ( ! ( initque.isEmpty ( ) ) ) { assertEquals ( initque.remove ( ) , deserque.remove ( ) ) ; } }

Target:
public int size ( ) { return delegate.size ( ) ; }
Source:
private void resetMatcher ( ) { if ( ( matcher ) == null ) { matcher = delimiter.matcher ( buffer ) ; } else { matcher.reset ( buffer ) ; } matcher.useTransparentBounds ( true ) ; matcher.useAnchoringBounds ( false ) ; matcher.region ( findStartIndex , bufferLength ) ; }

Target:
private void prepareForScan ( ) { if ( ( findStartIndex ) >= ( ( buffer.capacity ( ) ) / 2 ) ) { int oldPosition = buffer.position ( ) ; buffer.position ( findStartIndex ) ; buffer.compact ( ) ; buffer.position ( oldPosition ) ; bufferLength -= findStartIndex ; findStartIndex = 0 ; preStartIndex = - 1 ; resetMatcher ( ) ; } preStartIndex = findStartIndex ; }
Source:
public void noteAudioTurnedOnLocked ( ) { if ( ! ( mAudioTurnedOn ) ) { mAudioTurnedOn = true ; if ( ( mAudioTurnedOnTimer ) == null ) { mAudioTurnedOnTimer = new com.android.internal.os.BatteryStatsImpl.StopwatchTimer ( this , AUDIO_TURNED_ON , null , mUnpluggables ) ; } mAudioTurnedOnTimer.startRunningLocked ( this ) ; } }

Target:
public void noteVideoTurnedOnLocked ( ) { if ( ! ( mVideoTurnedOn ) ) { mVideoTurnedOn = true ; createVideoTurnedOnTimerLocked ( ) . startRunningLocked ( this ) ; } }
Source:
void cleanup ( ) { logd ( "advertise clients cleared" ) ; mAdvertiseClients.clear ( ) ; }

Target:
void cleanup ( ) { logd ( "advertise clients cleared" ) ; mAdvertiseClients.clear ( ) ; if ( ( mHandler ) != null ) { mHandler.removeCallbacksAndMessages ( null ) ; android.os.Looper looper = mHandler.getLooper ( ) ; if ( looper != null ) { looper.quit ( ) ; } mHandler = null ; } }
Source:
public void testFailure ( ) throws java.io.IOException { mProcess = new com.android.tradefed.util.ProcessHelper ( new java.lang.ProcessBuilder ( "ls" , "--WRONG-OPTION" ) . start ( ) ) ; com.android.tradefed.util.CommandStatus status = mProcess.waitForProcess ( 1000 ) ; assertEquals ( CommandStatus.FAILED , status ) ; assertFalse ( mProcess.isRunning ( ) ) ; assertTrue ( mProcess.getStdout ( ) . isEmpty ( ) ) ; assertTrue ( mProcess.getStderr ( ) . contains ( "unrecognized option" ) ) ; }

Target:
public void testFailure ( ) throws java.io.IOException { mProcess = new com.android.tradefed.util.ProcessHelper ( new java.lang.ProcessBuilder ( "ls" , "--WRONG-OPTION" ) . start ( ) ) ; com.android.tradefed.util.CommandStatus status = mProcess.waitForProcess ( 1000 ) ; org.junit.Assert.assertEquals ( CommandStatus.FAILED , status ) ; org.junit.Assert.assertFalse ( mProcess.isRunning ( ) ) ; org.junit.Assert.assertTrue ( mProcess.getStdout ( ) . isEmpty ( ) ) ; java.lang.String stderr = mProcess.getStderr ( ) ; org.junit.Assert.assertTrue ( stderr.contains ( "unrecognized option" ) ) ; }
Source:
public void onItemSelected ( android.widget.AdapterView parent , android.view.View view , int pos , long id ) { switch ( pos ) { case 0 : mStringId = R.string.recovery_installing ; break ; case 1 : mStringId = R.string.recovery_erasing ; break ; case 2 : mStringId = R.string.recovery_no_command ; break ; case 3 : mStringId = R.string.recovery_error ; break ; } }

Target:
public void onItemSelected ( android.widget.AdapterView parent , android.view.View view , int pos , long id ) { switch ( pos ) { case 0 : mStringId = R.string.recovery_installing ; break ; case 1 : mStringId = R.string.recovery_erasing ; break ; case 2 : mStringId = R.string.recovery_no_command ; break ; case 3 : mStringId = R.string.recovery_error ; break ; case 4 : mStringId = R.string.recovery_installing_security ; break ; } }
Source:
public void onComplete ( ) { BlockReportSpamDialogs.BlockReportSpamDialogFragment.newInstance ( displayNumber , com.android.dialer.spam.SpamComponent.get ( this ) . spam ( ) . isDialogReportSpamCheckedByDefault ( ) , new com.android.dialer.blockreportspam.BlockReportSpamDialogs.OnSpamDialogClickListener ( ) { @ java.lang.Override public void onClick ( boolean isSpamChecked ) { blockReportNumberAndFinish ( number , isSpamChecked , contactLookupResultType ) ; } } , dismissListener ) . show ( getFragmentManager ( ) , BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG ) ; }

Target:
public void onComplete ( ) { com.android.dialer.blockreportspam.BlockReportSpamDialogs.DialogFragmentForBlockingNumberAndOptionallyReportingAsSpam.newInstance ( displayNumber , com.android.dialer.spam.SpamComponent.get ( this ) . spam ( ) . isDialogReportSpamCheckedByDefault ( ) , new com.android.dialer.blockreportspam.BlockReportSpamDialogs.OnSpamDialogClickListener ( ) { @ java.lang.Override public void onClick ( boolean isSpamChecked ) { blockReportNumberAndFinish ( number , isSpamChecked , contactLookupResultType ) ; } } , dismissListener ) . show ( getFragmentManager ( ) , BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG ) ; }
Source:
public static org.jetbrains.plugins.github.api.GithubPullRequest getPullRequest ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.api.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String user , @ org.jetbrains.annotations.NotNull java.lang.String repo , int id ) throws java.io.IOException { java.lang.String path = ( ( ( ( "/repos/" + user ) + "/" ) + repo ) + "/pulls/" ) + id ; return org.jetbrains.plugins.github.api.GithubApiUtil.createDataFromRaw ( org.jetbrains.plugins.github.api.GithubApiUtil.fromJson ( org.jetbrains.plugins.github.api.GithubApiUtil.getRequest ( auth , path , org.jetbrains.plugins.github.api.GithubApiUtil.ACCEPT_HTML_BODY_MARKUP ) , org.jetbrains.plugins.github.api.GithubPullRequestRaw.class ) , org.jetbrains.plugins.github.api.GithubPullRequest.class ) ; }

Target:
public static org.jetbrains.plugins.github.api.GithubPullRequest getPullRequest ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.util.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String user , @ org.jetbrains.annotations.NotNull java.lang.String repo , int id ) throws java.io.IOException { java.lang.String path = ( ( ( ( "/repos/" + user ) + "/" ) + repo ) + "/pulls/" ) + id ; return org.jetbrains.plugins.github.api.GithubApiUtil.createDataFromRaw ( org.jetbrains.plugins.github.api.GithubApiUtil.fromJson ( org.jetbrains.plugins.github.api.GithubApiUtil.getRequest ( auth , path , org.jetbrains.plugins.github.api.GithubApiUtil.ACCEPT_HTML_BODY_MARKUP ) , org.jetbrains.plugins.github.api.GithubPullRequestRaw.class ) , org.jetbrains.plugins.github.api.GithubPullRequest.class ) ; }
Source:
public static void computeSincos ( android.renderscript.cts.TestSincos.ArgumentsFloatFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 12 ; args.outCosptr = ( ( float ) ( java.lang.StrictMath.cos ( args.inV ) ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.sin ( args.inV ) ) ) ; }

Target:
public static void computeConvert ( android.renderscript.cts.TestConvert.ArgumentsUshortUshort args ) { args.out = android.renderscript.cts.CoreMathVerifier.convertUshortToUshort ( args.inV ) ; }
Source:
public int getInt ( long addr ) { if ( myValuesAreBufferAligned ) { long page = addr / ( myPageSize ) ; int page_offset = ( ( int ) ( addr % ( myPageSize ) ) ) ; return getBuffer ( page , false ) . getInt ( page_offset ) ; } else { get ( addr , myTypedIOBuffer , 0 , 4 ) ; return com.intellij.util.io.Bits.getInt ( myTypedIOBuffer , 0 ) ; } }

Target:
public int getInt ( long addr ) { if ( myValuesAreBufferAligned ) { long page = addr / ( myPageSize ) ; int page_offset = ( ( int ) ( addr % ( myPageSize ) ) ) ; return getReadOnlyBuffer ( page ) . getInt ( page_offset ) ; } else { get ( addr , myTypedIOBuffer , 0 , 4 ) ; return com.intellij.util.io.Bits.getInt ( myTypedIOBuffer , 0 ) ; } }
Source:
public boolean p2pFlush ( ) { if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.flush ( ) ; } else { return doBooleanCommand ( "P2P_FLUSH" ) ; } }

Target:
public boolean setWfdEnable ( boolean enable ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.enableWfd ( enable ) ; } else { return doBooleanCommand ( ( "SET wifi_display " + ( enable ? "1" : "0" ) ) ) ; } }
Source:
private void failTimedOut ( java.lang.String sensorName , double totalTimeWaitedMs , int numEvents , double minDelayMs , long eventsRemaining , long eventsReceived ) { final java.lang.String TIMED_OUT_FORMAT = "Timed out waiting for events from %s " + ( "waited for time=%.1fms to receive totalEvents=%d at samplingRate=%.1fHz" + " remainingEvents=%d received events=%d" ) ; fail ( java.lang.String.format ( TIMED_OUT_FORMAT , sensorName , totalTimeWaitedMs , numEvents , ( 1000 / minDelayMs ) , eventsRemaining , eventsReceived ) ) ; }

Target:
public void testSensorTimeStamps ( ) throws java.lang.Exception { java.util.ArrayList < java.lang.Throwable > errorsFound = new java.util.ArrayList < > ( ) ; for ( android.hardware.Sensor sensor : mSensorList ) { verifyLongActivation ( sensor , 0 , errorsFound ) ; verifyLongActivation ( sensor , ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( 10 ) ) ) , errorsFound ) ; } assertOnErrors ( errorsFound ) ; }
Source:
public org.bouncycastle.math.ec.ECFieldElement negate ( ) { java.math.BigInteger x2 ; if ( ( x.signum ( ) ) == 0 ) { x2 = x ; } else if ( org.bouncycastle.math.ec.ONE.equals ( r ) ) { x2 = q.xor ( x ) ; } else { x2 = q.subtract ( x ) ; } return new org.bouncycastle.math.ec.ECFieldElement.Fp ( q , r , x2 ) ; }

Target:
public org.bouncycastle.math.ec.ECFieldElement divide ( org.bouncycastle.math.ec.ECFieldElement b ) { return new org.bouncycastle.math.ec.ECFieldElement.Fp ( q , r , modMult ( x , modInverse ( b.toBigInteger ( ) ) ) ) ; }
Source:
public void testNetworkStatsWithSet ( ) throws java.lang.Exception { stageFile ( R.raw.xt_qtaguid_typical , new java.io.File ( mTestProc , "net/xt_qtaguid/stats" ) ) ; final android.net.NetworkStats stats = mFactory.readNetworkStatsDetail ( ) ; assertEquals ( 70 , stats.size ( ) ) ; com.android.internal.net.NetworkStatsFactoryTest.assertStatsEntry ( stats , "rmnet1" , 10021 , android.net.NetworkStats.SET_DEFAULT , 806354944 , 219110L , 578L , 227423L , 676L ) ; com.android.internal.net.NetworkStatsFactoryTest.assertStatsEntry ( stats , "rmnet1" , 10021 , android.net.NetworkStats.SET_FOREGROUND , 806354944 , 742L , 3L , 1265L , 3L ) ; }

Target:
private android.net.NetworkStats parseDetailedStats ( int resourceId ) throws java.lang.Exception { stageFile ( resourceId , file ( "net/xt_qtaguid/stats" ) ) ; return mFactory.readNetworkStatsDetail ( ) ; }
Source:
public void testRevokePropagatedOnUpgradeNewToNewModel ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part1" ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part2" ) ; }

Target:
public void testRevokePropagatedOnUpgradeOldToNewModel ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testRevokePropagatedOnUpgradeOldToNewModel_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.AssertionError expected ) { } assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeOldToNewModel_part2" ) ; }
Source:
private int [ ] transformCatchHandlers ( com.android.dx.merge.IndexMap indexMap , com.android.dx.io.Code [ ] catchHandlers ) { int baseOffset = codeOut.getPosition ( ) ; codeOut.writeUleb128 ( catchHandlers.length ) ; int [ ] offsets = new int [ catchHandlers.length ] ; for ( int i = 0 ; i < ( catchHandlers.length ) ; i ++ ) { offsets [ i ] = ( codeOut.getPosition ( ) ) - baseOffset ; transformEncodedCatchHandler ( catchHandlers [ i ] , indexMap ) ; } return offsets ; }

Target:
private int [ ] transformCatchHandlers ( com.android.dx.merge.IndexMap indexMap , com.android.dex.Code [ ] catchHandlers ) { int baseOffset = codeOut.getPosition ( ) ; codeOut.writeUleb128 ( catchHandlers.length ) ; int [ ] offsets = new int [ catchHandlers.length ] ; for ( int i = 0 ; i < ( catchHandlers.length ) ; i ++ ) { offsets [ i ] = ( codeOut.getPosition ( ) ) - baseOffset ; transformEncodedCatchHandler ( catchHandlers [ i ] , indexMap ) ; } return offsets ; }
Source:
public java.util.zip.ZipOutputStream getOutputStream ( ) { assert ( file ) != null ; clearRemover ( ) ; try { return new com.android.sched.util.file.OutputZipFile.CustomZipOutputStream ( new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( file ) ) ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
public java.util.zip.ZipOutputStream getOutputStream ( ) { assert ( file ) != null ; clearRemover ( ) ; try { return new com.android.sched.util.file.OutputZipFile.CustomZipOutputStream ( new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( file ) ) , compression ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }
Source:
private static com.android.jack.dx.rop.cst.CstType createSuperClass ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws com.android.jack.ir.ast.JTypeLookupException { com.android.jack.ir.ast.JClass superClass = type.getSuperClass ( ) ; if ( superClass == null ) { if ( type instanceof com.android.jack.ir.ast.JDefinedInterface ) { return com.android.jack.backend.dex.rop.RopHelper.getCstType ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_OBJECT ) ) ; } else { assert type.equals ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_OBJECT ) ) ; return null ; } } com.android.jack.dx.rop.cst.CstType superclassType = com.android.jack.backend.dex.rop.RopHelper.getCstType ( superClass ) ; return superclassType ; }

Target:
private static com.android.jack.dx.rop.cst.CstType createSuperClass ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws com.android.jack.ir.ast.JTypeLookupException { com.android.jack.ir.ast.JClass superClass = type.getSuperClass ( ) ; if ( superClass == null ) { if ( type instanceof com.android.jack.ir.ast.JDefinedInterface ) { return com.android.jack.backend.dex.rop.RopHelper.getCstType ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_OBJECT ) ) ; } else { assert type.isSameType ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_OBJECT ) ) ; return null ; } } com.android.jack.dx.rop.cst.CstType superclassType = com.android.jack.backend.dex.rop.RopHelper.getCstType ( superClass ) ; return superclassType ; }
Source:
synchronized boolean unplug ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "unplug(): device=" + device ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return unplugNative ( ) ; }

Target:
synchronized boolean replyReport ( android.bluetooth.BluetoothDevice device , byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( ( ( "replyReport(): device=" + device ) + " type=" ) + type ) + " id=" ) + id ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return mHidDeviceNativeInterface.replyReport ( type , id , data ) ; }
Source:
public boolean shouldOfferSwitchingToNextInputMethod ( android.os.IBinder imeToken ) { synchronized ( mH ) { try { return mService.shouldOfferSwitchingToNextInputMethod ( imeToken ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.view.inputmethod.InputMethodManager.TAG , ( "IME died: " + ( mCurId ) ) , e ) ; return false ; } } }

Target:
public boolean shouldOfferSwitchingToNextInputMethod ( android.os.IBinder imeToken ) { synchronized ( mH ) { try { return mService.shouldOfferSwitchingToNextInputMethod ( imeToken ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public static < E > com.google.common.collect.ImmutableList < E > copyOf ( E [ ] elements ) { switch ( elements.length ) { case 0 : return com.google.common.collect.ImmutableList.of ( ) ; case 1 : return new com.google.common.collect.SingletonImmutableList < E > ( elements [ 0 ] ) ; default : return com.google.common.collect.ImmutableList.construct ( elements.clone ( ) ) ; } }

Target:
public static < E > com.google.common.collect.ImmutableList < E > copyOf ( E [ ] elements ) { switch ( elements.length ) { case 0 : return com.google.common.collect.ImmutableList.of ( ) ; case 1 : return new com.google.common.collect.SingletonImmutableList < E > ( elements [ 0 ] ) ; default : return new com.google.common.collect.RegularImmutableList < E > ( com.google.common.collect.ObjectArrays.checkElementsNotNull ( elements.clone ( ) ) ) ; } }
Source:
public boolean delete ( java.lang.String key ) { try { return ( mBinder.del ( key , ( - 1 ) ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean put ( java.lang.String key , byte [ ] value ) { return put ( key , value , ( - 1 ) ) ; }
Source:
public void trackingEnabled_reliabilityTrigger_firstTime_initialStorage ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; com.android.server.timezone.PackageVersions packageVersions = configureValidApplications ( ) ; mPackageTracker.start ( ) ; checkIntentHelperInitializedAndReliabilityTrackingEnabled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; mFakeIntentHelper.simulateReliabilityTrigger ( ) ; checkUpdateCheckTriggered ( packageVersions ) ; com.android.server.timezone.CheckToken token1 = mFakeIntentHelper.captureAndResetLastToken ( ) ; org.junit.Assert.assertEquals ( packageVersions , token1.mPackageVersions ) ; mPackageTracker.recordCheckResult ( token1 , true ) ; checkUpdateCheckSuccessful ( packageVersions ) ; }

Target:
public void trackingEnabled_reliabilityTrigger_firstTime_initialStorage ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; com.android.server.timezone.PackageVersions packageVersions = configureValidApplications ( ) ; mPackageTracker.start ( ) ; checkIntentHelperInitializedAndReliabilityTrackingEnabled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; mPackageTracker.triggerUpdateIfNeeded ( false ) ; checkUpdateCheckTriggered ( packageVersions ) ; com.android.server.timezone.CheckToken token1 = mFakeIntentHelper.captureAndResetLastToken ( ) ; org.junit.Assert.assertEquals ( packageVersions , token1.mPackageVersions ) ; mPackageTracker.recordCheckResult ( token1 , true ) ; checkUpdateCheckSuccessful ( packageVersions ) ; }
Source:
public void onIdentityChanged ( byte [ ] mac ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putString ( "mac" , java.lang.String.valueOf ( libcore.util.HexEncoding.encode ( mac ) ) ) ; mResults.putLong ( "timestampMs" , java.lang.System.currentTimeMillis ( ) ) ; mEventFacade.postEvent ( "WifiNanOnIdentityChanged" , mResults ) ; }

Target:
public void onIdentityChanged ( byte [ ] mac ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putString ( "mac" , java.lang.String.valueOf ( libcore.util.HexEncoding.encode ( mac ) ) ) ; mResults.putLong ( "timestampMs" , java.lang.System.currentTimeMillis ( ) ) ; mEventFacade.postEvent ( "WifiAwareOnIdentityChanged" , mResults ) ; }
Source:
public android.drm.DrmInfoStatus processDrmInfo ( android.drm.DrmInfo drmInfo ) { if ( ( null == drmInfo ) || ( ! ( drmInfo.isValid ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Given drmInfo is invalid/null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _processDrmInfo ( mUniqueId , drmInfo ) ; }

Target:
public int checkRightsStatus ( java.lang.String path , int action ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) || ( ! ( DrmStore.Action.isValid ( action ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path or action is not valid" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _checkRightsStatus ( mUniqueId , path , action ) ; }
Source:
public static java.nio.ByteBuffer allocateDirect ( int capacity ) { if ( capacity < 0 ) { throw new java.lang.IllegalArgumentException ( ( "capacity < 0: " + capacity ) ) ; } return new java.nio.DirectByteBuffer ( java.nio.MemoryBlock.allocate ( capacity ) , capacity , 0 , false , null ) ; }

Target:
public static java.nio.ByteBuffer allocateDirect ( int capacity ) { if ( capacity < 0 ) { throw new java.lang.IllegalArgumentException ( ( "capacity < 0: " + capacity ) ) ; } java.nio.MemoryBlock memoryBlock = java.nio.MemoryBlock.allocate ( ( capacity + 7 ) ) ; long address = memoryBlock.toLong ( ) ; long alignedAddress = ( address + 7 ) & ( ~ ( ( long ) ( 7 ) ) ) ; return new java.nio.DirectByteBuffer ( memoryBlock , capacity , ( ( int ) ( alignedAddress - address ) ) , false , null ) ; }
Source:
public boolean open ( ) { createShell ( ) ; createContents ( ) ; positionShell ( ) ; postCreate ( ) ; mShell.open ( ) ; mShell.layout ( ) ; org.eclipse.swt.widgets.Display display = getParent ( ) . getDisplay ( ) ; while ( ! ( mShell.isDisposed ( ) ) ) { if ( ! ( display.readAndDispatch ( ) ) ) { display.sleep ( ) ; } } return mReturnValue ; }

Target:
public boolean open ( ) { if ( ! ( mQuitRequested ) ) { createShell ( ) ; } if ( ! ( mQuitRequested ) ) { createContents ( ) ; } if ( ! ( mQuitRequested ) ) { positionShell ( ) ; } if ( ! ( mQuitRequested ) ) { postCreate ( ) ; } if ( ! ( mQuitRequested ) ) { mShell.open ( ) ; mShell.layout ( ) ; eventLoop ( ) ; } return mReturnValue ; }
Source:
public void testLaunchToSide ( ) throws java.lang.Exception { launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME } ) ; launchActivityToSide ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }

Target:
public void testLaunchToSide ( ) throws java.lang.Exception { if ( ! ( supportsMultiWindowMode ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME } ) ; launchActivityToSide ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }
Source:
static void copyFormattingFiles ( java.io.File resultsDir ) { for ( java.lang.String resultFileName : com.android.compatibility.common.tradefed.result.ResultReporter.RESULT_RESOURCES ) { java.io.InputStream configStream = com.android.compatibility.common.util.ResultHandler.class . getResourceAsStream ( java.lang.String.format ( "/report/%s" , resultFileName ) ) ; if ( configStream != null ) { java.io.File resultFile = new java.io.File ( resultsDir , resultFileName ) ; try { com.android.tradefed.util.FileUtil.writeToFile ( configStream , resultFile ) ; } catch ( java.io.IOException e ) { com.android.compatibility.common.tradefed.result.ResultReporter.warn ( "Failed to write %s to file" , resultFileName ) ; } } else { com.android.compatibility.common.tradefed.result.ResultReporter.warn ( "Failed to load %s from jar" , resultFileName ) ; } } }

Target:
static void copyFormattingFiles ( java.io.File resultsDir ) { for ( java.lang.String resultFileName : com.android.compatibility.common.util.ResultHandler.RESULT_RESOURCES ) { java.io.InputStream configStream = com.android.compatibility.common.util.ResultHandler.class . getResourceAsStream ( java.lang.String.format ( "/report/%s" , resultFileName ) ) ; if ( configStream != null ) { java.io.File resultFile = new java.io.File ( resultsDir , resultFileName ) ; try { com.android.tradefed.util.FileUtil.writeToFile ( configStream , resultFile ) ; } catch ( java.io.IOException e ) { com.android.compatibility.common.tradefed.result.ResultReporter.warn ( "Failed to write %s to file" , resultFileName ) ; } } else { com.android.compatibility.common.tradefed.result.ResultReporter.warn ( "Failed to load %s from jar" , resultFileName ) ; } } }
Source:
private static boolean isShortCodeUSSD ( java.lang.String dialString , com.android.internal.telephony.gsm.GSMPhone phone ) { if ( dialString != null ) { if ( phone.isInCall ( ) ) { if ( ( dialString.length ( ) ) <= ( com.android.internal.telephony.gsm.GsmMmiCode.MAX_LENGTH_SHORT_CODE ) ) { return true ; } } if ( ( dialString.length ( ) ) <= ( com.android.internal.telephony.gsm.GsmMmiCode.MAX_LENGTH_SHORT_CODE ) ) { if ( ( dialString.charAt ( ( ( dialString.length ( ) ) - 1 ) ) ) == ( com.android.internal.telephony.gsm.GsmMmiCode.END_OF_USSD_COMMAND ) ) { return true ; } } } return false ; }

Target:
private static boolean isShortCodeUSSD ( java.lang.String dialString , com.android.internal.telephony.gsm.GSMPhone phone ) { if ( ( dialString != null ) && ( ( dialString.length ( ) ) <= ( com.android.internal.telephony.gsm.GsmMmiCode.MAX_LENGTH_SHORT_CODE ) ) ) { if ( phone.isInCall ( ) ) { return true ; } if ( ( ( dialString.length ( ) ) != ( com.android.internal.telephony.gsm.GsmMmiCode.MAX_LENGTH_SHORT_CODE ) ) || ( ( dialString.charAt ( 0 ) ) != '1' ) ) { return true ; } } return false ; }
Source:
protected void executeCandidateToolchain ( ) throws java.lang.Exception { if ( ( jarjarRulesFile ) != null ) { candidateTestTools.setJarjarRules ( jarjarRulesFile ) ; } candidateTestTools.setWithDebugInfos ( withDebugInfos ) ; candidateTestTools.setSourceLevel ( sourceLevel ) ; candidateTestTools.addProguardFlags ( proguardFlagFiles ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( candidateClasspath ) , candidateDexDir , false , filesOrSourceList ) ; }

Target:
protected void executeCandidateToolchain ( ) throws java.lang.Exception { if ( ( jarjarRulesFile ) != null ) { candidateTestTools.setJarjarRules ( jarjarRulesFile ) ; } candidateTestTools.setWithDebugInfos ( withDebugInfos ) ; candidateTestTools.setSourceLevel ( sourceLevel ) ; candidateTestTools.addProguardFlags ( proguardFlagFiles ) . addToClasspath ( candidateClasspath ) . srcToExe ( candidateDexDir , false , filesOrSourceList ) ; }
Source:
public int compare ( java.lang.String s1 , java.lang.String s2 ) { int compare = ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiResourceAttributeNode.score ( attributeInfo , s1 ) ) - ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiResourceAttributeNode.score ( attributeInfo , s2 ) ) ; if ( compare == 0 ) { compare = s1.compareTo ( s2 ) ; } return compare ; }

Target:
public int compare ( java.lang.String s1 , java.lang.String s2 ) { int compare = ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiResourceAttributeNode.score ( attributeInfo , s1 ) ) - ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiResourceAttributeNode.score ( attributeInfo , s2 ) ) ; if ( compare == 0 ) { compare = s1.compareToIgnoreCase ( s2 ) ; } return compare ; }
Source:
public void sendNotification ( int serverIf , java.lang.String address , int srvcType , int srvcInstanceId , android.os.ParcelUuid srvcId , int charInstanceId , android.os.ParcelUuid charId , boolean confirm , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.sendNotification ( serverIf , address , srvcType , srvcInstanceId , srvcId.getUuid ( ) , charInstanceId , charId.getUuid ( ) , confirm , value ) ; }

Target:
public void sendNotification ( int serverIf , java.lang.String address , int handle , boolean confirm , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.sendNotification ( serverIf , address , handle , confirm , value ) ; }
Source:
public void testStageInstallWithErrorCode_badTzLookupFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( "<foo />" ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_VALIDATION_ERROR , installer.stageInstallWithErrorCode ( incompleteDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_missingTzLookupFile ( ) throws java.lang.Exception { byte [ ] stagedDistroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( stagedDistroBytes ) ) ) ; assertInstallDistroStaged ( stagedDistroBytes ) ; byte [ ] incompleteDistroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( null ) . buildUnvalidatedBytes ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( incompleteDistroBytes ) ) ) ; assertInstallDistroStaged ( stagedDistroBytes ) ; assertNoInstalledDistro ( ) ; }
Source:
private void doRecovery ( ) { if ( ( state ) == ( State.CONNECTED ) ) { int maxPdpReset = Settings.Gservices.getInt ( mResolver , Settings.Gservices.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT , com.android.internal.telephony.gsm.DEFAULT_MAX_PDP_RESET_FAIL ) ; if ( ( mPdpResetCount ) < maxPdpReset ) { ( mPdpResetCount ) ++ ; android.util.EventLog.writeEvent ( TelephonyEventLog.EVENT_LOG_PDP_RESET , sentSinceLastRecv ) ; cleanUpConnection ( true , Phone.REASON_PDP_RESET ) ; } else { mPdpResetCount = 0 ; android.util.EventLog.writeEvent ( TelephonyEventLog.EVENT_LOG_REREGISTER_NETWORK , sentSinceLastRecv ) ; mGsmPhone.mSST.reRegisterNetwork ( null ) ; } } }

Target:
private void doRecovery ( ) { if ( ( state ) == ( State.CONNECTED ) ) { int maxPdpReset = Settings.Secure.getInt ( mResolver , Settings.Secure.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT , com.android.internal.telephony.gsm.DEFAULT_MAX_PDP_RESET_FAIL ) ; if ( ( mPdpResetCount ) < maxPdpReset ) { ( mPdpResetCount ) ++ ; android.util.EventLog.writeEvent ( EventLogTags.PDP_RADIO_RESET , sentSinceLastRecv ) ; cleanUpConnection ( true , Phone.REASON_PDP_RESET ) ; } else { mPdpResetCount = 0 ; android.util.EventLog.writeEvent ( EventLogTags.PDP_REREGISTER_NETWORK , sentSinceLastRecv ) ; mGsmPhone.mSST.reRegisterNetwork ( null ) ; } } }
Source:
public java.io.OutputStream openWrite ( ) throws java.io.IOException { zos.putNextEntry ( entry ) ; if ( ( vfsRoot ) instanceof com.android.sched.vfs.SequentialOutputVDir ) { if ( ( ( com.android.sched.vfs.SequentialOutputVDir ) ( vfsRoot ) ) . notifyVFileOpenAndReturnPreviousState ( ) ) { throw new java.lang.AssertionError ( ( ( getLocation ( ) . getDescription ( ) ) + " cannot be written to because a previous stream has not been closed." ) ) ; } } return new com.android.sched.vfs.zip.OutputZipVFile.UnclosableVFileOutputStream ( zos , vfsRoot ) ; }

Target:
public java.io.OutputStream openWrite ( ) throws java.io.IOException { zos.putNextEntry ( entry ) ; if ( ( vfsRoot ) instanceof com.android.sched.vfs.SequentialOutputVDir ) { if ( ( ( com.android.sched.vfs.SequentialOutputVDir ) ( vfsRoot ) ) . notifyVFileOpenAndReturnPreviousState ( ) ) { throw new java.lang.AssertionError ( ( ( getLocation ( ) . getDescription ( ) ) + " cannot be written to because a previous stream has not been closed." ) ) ; } } return new com.android.sched.vfs.OutputZipVFile.UnclosableVFileOutputStream ( zos , vfsRoot ) ; }
Source:
public java.io.PrintStream getPrintStream ( ) { if ( ( file ) == null ) { return new com.android.sched.util.stream.UncloseablePrintStream ( java.lang.System.out ) ; } else { clearRemover ( ) ; try { return new java.io.PrintStream ( file ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } } }

Target:
public java.io.PrintStream getPrintStream ( ) { if ( ( printer ) != null ) { return new com.android.sched.util.stream.UncloseablePrintStream ( printer ) ; } else { clearRemover ( ) ; try { return new java.io.PrintStream ( file ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } } }
Source:
private void checkJvm ( ) { if ( com.intellij.openapi.util.text.StringUtil.containsIgnoreCase ( java.lang.System.getProperty ( "java.vm.name" , "" ) , "OpenJDK" ) ) { notifyUnsupportedJvm ( "unsupported.jvm.openjdk.message" ) ; } else if ( com.intellij.openapi.util.text.StringUtil.endsWithIgnoreCase ( java.lang.System.getProperty ( "java.version" , "" ) , "-ea" ) ) { notifyUnsupportedJvm ( "unsupported.jvm.ea.message" ) ; } }

Target:
private void checkJvm ( ) { if ( com.intellij.openapi.util.text.StringUtil.containsIgnoreCase ( java.lang.System.getProperty ( "java.vm.name" , "" ) , "OpenJDK" ) ) { notifyUnsupported ( "unsupported.jvm.openjdk.message" ) ; } else if ( com.intellij.openapi.util.text.StringUtil.endsWithIgnoreCase ( java.lang.System.getProperty ( "java.version" , "" ) , "-ea" ) ) { notifyUnsupported ( "unsupported.jvm.ea.message" ) ; } }
Source:
public final java.nio.IntBuffer asIntBuffer ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 2 ; return new java.nio.ByteBufferAsIntBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }

Target:
public final java.nio.IntBuffer asIntBuffer ( ) { if ( memoryRef.isFreed ) { throw new java.lang.IllegalStateException ( "buffer has been freed" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 2 ; return new java.nio.ByteBufferAsIntBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }
Source:
private void extractSharpImage ( java.lang.String name ) { android.graphics.Bitmap mBitmap = android.graphics.Bitmap.createBitmap ( buffers.inputImage.getWidth ( ) , buffers.inputImage.getHeight ( ) , Bitmap.Config.ARGB_8888 ) ; android.support.v8.renderscript.Allocation mAllocation = android.support.v8.renderscript.Allocation.createFromBitmap ( renderScript , mBitmap ) ; scriptC.forEach_PackSharpImage ( mAllocation ) ; mAllocation.copyTo ( mBitmap ) ; com.android.rs.test.MediaStoreSaver.savePNG ( mBitmap , "sharpF32" , name , renderScript.getApplicationContext ( ) ) ; }

Target:
private void extractSharpImage ( java.lang.String name ) { android.graphics.Bitmap mBitmap = android.graphics.Bitmap.createBitmap ( buffers.inputImage.getWidth ( ) , buffers.inputImage.getHeight ( ) , Bitmap.Config.ARGB_8888 ) ; android.support.v8.renderscript.Allocation mAllocation = android.support.v8.renderscript.Allocation.createFromBitmap ( renderScript , mBitmap ) ; scriptC.forEach_PackSharpImage ( mAllocation ) ; mAllocation.copyTo ( mBitmap ) ; com.android.rs.refocus.MediaStoreSaver.savePNG ( mBitmap , "sharpF32" , name , renderScript.getApplicationContext ( ) ) ; }
Source:
public void onFinished ( int status ) { android.util.Log.i ( libcore.tzdata.prototype_updater.RulesCheckReceiver.TAG , ( "onFinished: Finished install: " + status ) ) ; try { distroFileDescriptor.close ( ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( libcore.tzdata.prototype_updater.RulesCheckReceiver.TAG , ( "Unable to close ParcelFileDescriptor for " + contentFile ) , e ) ; } finally { contentFile.delete ( ) ; } }

Target:
public void onFinished ( int status ) { android.util.Log.i ( libcore.tzdata.prototype_updater.RulesCheckReceiver.TAG , ( "Finished install: " + status ) ) ; }
Source:
public int hashCode ( ) { if ( ( hashCode ) != 0 ) { return hashCode ; } prepareJavaRepresentation ( ) ; for ( int i = 0 ; i < ( numberLength ) ; ++ i ) { hashCode = ( ( hashCode ) * 33 ) + ( digits [ i ] ) ; } hashCode = ( hashCode ) * ( sign ) ; return hashCode ; }

Target:
public int hashCode ( ) { if ( ( hashCode ) == 0 ) { prepareJavaRepresentation ( ) ; int hash = 0 ; for ( int i = 0 ; i < ( numberLength ) ; ++ i ) { hash = ( hash * 33 ) + ( digits [ i ] ) ; } hashCode = hash * ( sign ) ; } return hashCode ; }
Source:
android.content.res.Resources getTopLevelResources ( java.lang.String resDir , int displayId , android.content.res.Configuration overrideConfiguration , android.app.LoadedApk pkgInfo ) { return getTopLevelResources ( resDir , displayId , overrideConfiguration , pkgInfo.mCompatibilityInfo.get ( ) ) ; }

Target:
public android.app.ContextImpl getSystemContext ( ) { synchronized ( this ) { if ( ( android.app.ActivityThread.mSystemContext ) == null ) { android.app.ContextImpl context = android.app.ContextImpl.createSystemContext ( this ) ; android.app.LoadedApk info = new android.app.LoadedApk ( this , "android" , context , null , android.content.res.CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO ) ; context.init ( info , null , this ) ; context.getResources ( ) . updateConfiguration ( mResourcesManager.getConfiguration ( ) , mResourcesManager.getDisplayMetricsLocked ( Display.DEFAULT_DISPLAY ) ) ; android.app.ActivityThread.mSystemContext = context ; } } return android.app.ActivityThread.mSystemContext ; }
Source:
public void test_parsing_Z ( ) throws java.lang.Exception { java.util.TimeZone.setDefault ( java.util.TimeZone.getTimeZone ( "GMT" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTime ( "yyyy-MM-dd' 'Z" , "2012-01-01 -1234" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTime ( "yyyy-MM-dd' 'ZZ" , "2012-01-01 -1234" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTime ( "yyyy-MM-dd' 'ZZZ" , "2012-01-01 -1234" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTime ( "yyyy-MM-dd' 'ZZZZ" , "2012-01-01 GMT-12:34" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTime ( "yyyy-MM-dd' 'ZZZZZ" , "2012-01-01 -12:34" ) ) ; }

Target:
public void test_parsing_Z ( ) throws java.lang.Exception { assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTimeUtc ( "yyyy-MM-dd' 'Z" , "2012-01-01 -1234" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTimeUtc ( "yyyy-MM-dd' 'ZZ" , "2012-01-01 -1234" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTimeUtc ( "yyyy-MM-dd' 'ZZZ" , "2012-01-01 -1234" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTimeUtc ( "yyyy-MM-dd' 'ZZZZ" , "2012-01-01 GMT-12:34" ) ) ; assertEquals ( 1325421240000L , libcore.java.text.SimpleDateFormatTest.parseTimeUtc ( "yyyy-MM-dd' 'ZZZZZ" , "2012-01-01 -12:34" ) ) ; }
Source:
private void sendImsFeatureStatusChanged ( int slot , int feature , int status ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureListener > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureListener callbacks = i.next ( ) ; try { callbacks.imsStatusChanged ( slot , feature , status ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureStatusChanged: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }

Target:
private void sendImsFeatureCreatedCallback ( int slot , int feature ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureCallback > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureCallback callbacks = i.next ( ) ; try { callbacks.imsFeatureCreated ( slot , feature ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureCreatedCallback: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }
Source:
public android.net.IpSecTransform.Builder setIpv4Encapsulation ( android.net.IpSecManager.UdpEncapsulationSocket localSocket , int remotePort ) { mConfig.setEncapType ( android.net.IpSecTransform.ENCAP_ESPINUDP ) ; mConfig.setEncapSocketResourceId ( localSocket.getResourceId ( ) ) ; mConfig.setEncapRemotePort ( remotePort ) ; return this ; }

Target:
public android.net.IpSecTransform.Builder setIpv4Encapsulation ( @ android.annotation.NonNull android.net.IpSecManager.UdpEncapsulationSocket localSocket , int remotePort ) { com.android.internal.util.Preconditions.checkNotNull ( localSocket ) ; mConfig.setEncapType ( android.net.IpSecTransform.ENCAP_ESPINUDP ) ; if ( ( localSocket.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid UdpEncapsulationSocket" ) ; } mConfig.setEncapSocketResourceId ( localSocket.getResourceId ( ) ) ; mConfig.setEncapRemotePort ( remotePort ) ; return this ; }
Source:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( com.android.tools.perflib.heap.Heap heap : mHeaps.values ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = heap.getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }

Target:
public final com.android.tools.perflib.heap.Instance findReference ( long id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.Instance instance = mHeaps.get ( i ) . getInstance ( id ) ; if ( instance != null ) { return instance ; } } return findClass ( id ) ; }
Source:
public void putExtras ( java.lang.String callId , android.os.Bundle extras ) { if ( hasConnection ( callId ) ) { findConnectionForAction ( callId , "putExtras" ) . putExtras ( extras ) ; } else { findConferenceForAction ( callId , "putExtras" ) . putExtras ( extras ) ; } }

Target:
public void putExtras ( java.lang.String callId , android.os.Bundle extras , android.telecom.Logging.Session.Info sessionInfo ) { if ( hasConnection ( callId ) ) { findConnectionForAction ( callId , "putExtras" ) . putExtras ( extras ) ; } else { findConferenceForAction ( callId , "putExtras" ) . putExtras ( extras ) ; } }