auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; mDevice.removeWatcher ( com.android.devtools.systemimage.uitest.watchers.LockScreenWatcher.class . getName ( ) ) ; }

Target:
public void testLockScreenWatcher ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; android.support.test.uiautomator.UiDevice device = testFramework.getDevice ( ) ; device.registerWatcher ( com.android.devtools.systemimage.uitest.watchers.LockScreenWatcher.class . getName ( ) , new com.android.devtools.systemimage.uitest.watchers.LockScreenWatcher ( device ) ) ; device.sleep ( ) ; device.wakeUp ( ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Email" ) ; device.removeWatcher ( com.android.devtools.systemimage.uitest.watchers.LockScreenWatcher.class . getName ( ) ) ; }
Source:
public void setCellInfoListRate ( int rateInMillis , android.os.Message response ) { if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( "setCellInfoListRate: " + rateInMillis ) ) ; com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( rateInMillis ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void setCellInfoListRate ( int rateInMillis , android.os.Message response , android.os.WorkSource workSource ) { if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( "setCellInfoListRate: " + rateInMillis ) ) ; workSource = getDeafultWorkSourceIfInvalid ( workSource ) ; com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE , response , workSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( rateInMillis ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public com.android.sched.vfs.InputVDir getDir ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.InputVFS currentSectionVFS = getSectionVFS ( fileType ) ; return currentSectionVFS.getRootInputVDir ( ) . getInputVDir ( typePath ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.InputVFS currentSectionVFS = getSectionVFS ( fileType ) ; return currentSectionVFS.getRootInputVDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public void testRefactor7 ( ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( com.android.ide.eclipse.adt.internal.refactorings.core.RenameResourceParticipantTest.TEST_PROJECT ) ; org.eclipse.core.resources.IFile file = project.getFile ( "res/layout/activity_main.xml" ) ; checkRefactoring ( project , file , true , "newlayout" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename \'testRefactor7/res/layout/activity_main.xml\' to \'newlayout.xml\'\n" ) + "* Rename \'testRefactor7/res/layout-land/activity_main.xml\' to \'newlayout.xml\'\n" ) + "* MainActivity.java - /testRefactor7/src/com/example/refactoringtest/MainActivity.java\n" ) + " < setContentView(R.layout.activity_main);\n" ) + " ---\n" ) + " > setContentView(R.layout.newlayout);\n" ) + "\n" ) + "\n" ) + "* R.java - /testRefactor7/gen/com/example/refactoringtest/R.java\n" ) + " < public static final int activity_main=0x7f030000;\n" ) + " ---\n" ) + " > public static final int newlayout=0x7f030000;" ) ) ) ; }

Target:
public void testRefactor7 ( ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT ) ; org.eclipse.core.resources.IFile file = project.getFile ( "res/layout/activity_main.xml" ) ; renameResource ( project , file , true , "newlayout" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename \'testRefactor7/res/layout/activity_main.xml\' to \'newlayout.xml\'\n" ) + "\n" ) + "* Rename \'testRefactor7/res/layout-land/activity_main.xml\' to \'newlayout.xml\'\n" ) + "\n" ) + "* MainActivity.java - /testRefactor7/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -13 +13\n" ) + " - setContentView(R.layout.activity_main);\n" ) + " + setContentView(R.layout.newlayout);\n" ) + "\n" ) + "\n" ) + "* R.java - /testRefactor7/gen/com/example/refactoringtest/R.java\n" ) + " @@ -23 +23\n" ) + " - public static final int activity_main=0x7f030000;\n" ) + " + public static final int newlayout=0x7f030000;" ) ) ) ; }
Source:
public void test_lock ( ) throws java.lang.Exception { org.apache.harmony.tests.java.nio.channels.FileChannelTest.MockFileChannel mockFileChannel = new org.apache.harmony.tests.java.nio.channels.FileChannelTest.MockFileChannel ( ) ; mockFileChannel.lock ( ) ; assertTrue ( mockFileChannel.isLockCalled ) ; }

Target:
public void test_tryLock_Overlapping ( ) throws java.lang.Exception { fileLock = writeOnlyFileChannel.tryLock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; try { writeOnlyFileChannel.tryLock ( ) ; fail ( "should throw OverlappingFileLockException" ) ; } catch ( java.nio.channels.OverlappingFileLockException expected ) { } try { writeOnlyFileChannel2.tryLock ( ) ; fail ( "should throw OverlappingFileLockException" ) ; } catch ( java.nio.channels.OverlappingFileLockException expected ) { } }
Source:
private void verifyNoNetwork ( ) { assertNull ( mCm.getActiveNetworkInfo ( ) ) ; assertNull ( mCm.getActiveNetwork ( ) ) ; assertNull ( mCm.getActiveNetworkForUid ( java.lang.Process.myUid ( ) ) ) ; com.android.server.ConnectivityServiceTest.assertEmpty ( mCm.getAllNetworks ( ) ) ; }

Target:
private void verifyNoNetwork ( ) { waitForIdle ( ) ; assertNull ( mCm.getActiveNetworkInfo ( ) ) ; assertNull ( mCm.getActiveNetwork ( ) ) ; assertNull ( mCm.getActiveNetworkForUid ( java.lang.Process.myUid ( ) ) ) ; com.android.server.ConnectivityServiceTest.assertEmpty ( mCm.getAllNetworks ( ) ) ; }
Source:
public static com.android.internal.telephony.sip.SipPhone makePhone ( java.lang.String sipUri , android.content.Context context , com.android.internal.telephony.PhoneNotifier phoneNotifier ) { try { android.net.sip.SipProfile profile = new android.net.sip.SipProfile.Builder ( sipUri ) . build ( ) ; return new com.android.internal.telephony.sip.SipPhone ( context , phoneNotifier , profile ) ; } catch ( java.text.ParseException e ) { android.util.Log.w ( "SipPhoneFactory" , "makePhone" , e ) ; return null ; } }

Target:
public static com.android.internal.telephony.sip.SipPhone makePhone ( java.lang.String sipUri , android.content.Context context , com.android.internal.telephony.PhoneNotifier phoneNotifier ) { try { android.net.sip.SipProfile profile = new android.net.sip.SipProfile.Builder ( sipUri ) . build ( ) ; return new com.android.internal.telephony.sip.SipPhone ( context , phoneNotifier , profile ) ; } catch ( java.text.ParseException e ) { android.telephony.Rlog.w ( "SipPhoneFactory" , "makePhone" , e ) ; return null ; } }
Source:
public void updateRecords ( ) { if ( isActiveDataSubscription ( ) ) { onUpdateIcc ( ) ; } }

Target:
public void update ( ) { log ( ( "update sub = " + ( mPhone.getSubId ( ) ) ) ) ; log ( "update(): Active DDS, register for all events now!" ) ; registerForAllEvents ( ) ; onUpdateIcc ( ) ; mUserDataEnabled = getDataEnabled ( ) ; if ( ( mPhone ) instanceof com.android.internal.telephony.cdma.CDMALTEPhone ) { ( ( com.android.internal.telephony.cdma.CDMALTEPhone ) ( mPhone ) ) . updateCurrentCarrierInProvider ( ) ; } else if ( ( mPhone ) instanceof com.android.internal.telephony.gsm.GSMPhone ) { ( ( com.android.internal.telephony.gsm.GSMPhone ) ( mPhone ) ) . updateCurrentCarrierInProvider ( ) ; } else { log ( "Phone object is not MultiSim. This should not hit!!!!" ) ; } }
Source:
private static java.lang.ClassLoader createClassLoader ( com.google.devtools.build.android.desugar.CoreLibraryRewriter rewriter , java.util.List < java.nio.file.Path > bootclasspath , com.google.devtools.build.android.desugar.IndexedJars appAndClasspathIndexedJars , java.lang.ClassLoader parent ) throws java.io.IOException { if ( ! ( bootclasspath.isEmpty ( ) ) ) { parent = new com.google.devtools.build.android.desugar.HeaderClassLoader ( new com.google.devtools.build.android.desugar.IndexedJars ( bootclasspath ) , rewriter , parent ) ; } return new com.google.devtools.build.android.desugar.HeaderClassLoader ( appAndClasspathIndexedJars , rewriter , parent ) ; }

Target:
private static java.lang.ClassLoader createClassLoader ( com.google.devtools.build.android.desugar.CoreLibraryRewriter rewriter , java.util.List < java.nio.file.Path > bootclasspath , com.google.devtools.build.android.desugar.IndexedJars appAndClasspathIndexedJars ) throws java.io.IOException { java.lang.ClassLoader parent = new com.google.devtools.build.android.desugar.Desugar.ThrowingClassLoader ( ) ; if ( ! ( bootclasspath.isEmpty ( ) ) ) { parent = new com.google.devtools.build.android.desugar.HeaderClassLoader ( new com.google.devtools.build.android.desugar.IndexedJars ( bootclasspath ) , rewriter , parent ) ; } return new com.google.devtools.build.android.desugar.HeaderClassLoader ( appAndClasspathIndexedJars , rewriter , parent ) ; }
Source:
private void stopSmoothTrickplay ( boolean calledBySeek ) { if ( mTrickplayRunning ) { mTrickplayRunning = false ; if ( ( mAudioRenderer ) instanceof com.android.tv.tuner.exoplayer.ac3.Ac3PassthroughTrackRenderer ) { mPlayer.sendMessage ( mAudioRenderer , Ac3PassthroughTrackRenderer.MSG_SET_PLAYBACK_SPEED , 1.0F ) ; } else { mPlayer.sendMessage ( mAudioRenderer , MediaCodecAudioTrackRenderer.MSG_SET_PLAYBACK_PARAMS , new android.media.PlaybackParams ( ) . setSpeed ( 1.0F ) ) ; } if ( ! calledBySeek ) { mPlayer.seekTo ( mPlayer.getCurrentPosition ( ) ) ; } } }

Target:
private void stopSmoothTrickplay ( boolean calledBySeek ) { if ( mTrickplayRunning ) { mTrickplayRunning = false ; if ( ( mAudioRenderer ) instanceof com.android.tv.tuner.exoplayer.ac3.Ac3DefaultTrackRenderer ) { mPlayer.sendMessage ( mAudioRenderer , Ac3DefaultTrackRenderer.MSG_SET_PLAYBACK_SPEED , 1.0F ) ; } else { mPlayer.sendMessage ( mAudioRenderer , MediaCodecAudioTrackRenderer.MSG_SET_PLAYBACK_PARAMS , new android.media.PlaybackParams ( ) . setSpeed ( 1.0F ) ) ; } if ( ! calledBySeek ) { mPlayer.seekTo ( mPlayer.getCurrentPosition ( ) ) ; } } }
Source:
private void unregisterUiccCardEvents ( ) { if ( ( mUiccCard ) != null ) mUiccCard.unregisterForCarrierPrivilegeRulesLoaded ( this ) ; if ( ( mUiccApplication ) != null ) mUiccApplication.unregisterForReady ( this ) ; if ( ( mUiccApplication ) != null ) mUiccApplication.unregisterForLocked ( this ) ; if ( ( mUiccApplication ) != null ) mUiccApplication.unregisterForNetworkLocked ( this ) ; if ( ( mIccRecords ) != null ) mIccRecords.unregisterForRecordsLoaded ( this ) ; if ( ( mIccRecords ) != null ) mIccRecords.unregisterForRecordsEvents ( this ) ; }

Target:
private void unregisterUiccCardEvents ( ) { if ( ( mUiccCard ) != null ) mUiccCard.unregisterForCarrierPrivilegeRulesLoaded ( this ) ; if ( ( mUiccApplication ) != null ) { mUiccApplication.unregisterForReady ( this ) ; mUiccApplication.unregisterForNetworkLocked ( this ) ; } if ( ( mIccRecords ) != null ) { mIccRecords.unregisterForRecordsLoaded ( this ) ; mIccRecords.unregisterForLockedRecordsLoaded ( this ) ; mIccRecords.unregisterForRecordsEvents ( this ) ; } }
Source:
void putExtra ( java.lang.String callId , java.lang.String key , java.lang.String value ) { android.telecom.Log.v ( this , "putExtra: %s %s=%s" , callId , key , value ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putString ( key , value ) ; adapter.putExtras ( callId , bundle ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void putExtra ( java.lang.String callId , java.lang.String key , java.lang.String value ) { android.telecom.Log.v ( this , "putExtra: %s %s=%s" , callId , key , value ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putString ( key , value ) ; adapter.putExtras ( callId , bundle , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeInt ( mCallId ) ; out.writeParcelable ( mAddress , 0 ) ; out.writeInt ( ( mIsPullable ? 1 : 0 ) ) ; out.writeInt ( mCallState ) ; out.writeInt ( mCallType ) ; out.writeInt ( ( mIsHeld ? 1 : 0 ) ) ; android.telephony.Rlog.d ( com.android.ims.ImsExternalCallState.TAG , ( "ImsExternalCallState writeToParcel = " + ( out.toString ( ) ) ) ) ; }

Target:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeInt ( mCallId ) ; out.writeParcelable ( mAddress , 0 ) ; out.writeInt ( ( mIsPullable ? 1 : 0 ) ) ; out.writeInt ( mCallState ) ; out.writeInt ( mCallType ) ; out.writeInt ( ( mIsHeld ? 1 : 0 ) ) ; android.telephony.Rlog.d ( android.telephony.ims.ImsExternalCallState.TAG , ( "ImsExternalCallState writeToParcel = " + ( out.toString ( ) ) ) ) ; }
Source:
protected synchronized void implCloseSelectableChannel ( ) throws java.io.IOException { connected = false ; if ( ( ( socket ) != null ) && ( ! ( socket.isClosed ( ) ) ) ) { socket.close ( ) ; } else { libcore.io.IoBridge.closeSocket ( fd ) ; } }

Target:
protected synchronized void implCloseSelectableChannel ( ) throws java.io.IOException { onDisconnect ( true ) ; libcore.io.IoBridge.closeSocket ( fd ) ; if ( ( ( socket ) != null ) && ( ! ( socket.isClosed ( ) ) ) ) { socket.onClose ( ) ; } }
Source:
private void initializeMediaPlayerButtonsAndViews ( ) { playButton = findViewById ( R.id.playButton ) ; pauseButton = findViewById ( R.id.pauseButton ) ; currentSeekBarPosition = findViewById ( R.id.playback_position_text ) ; seekBarView = findViewById ( R.id.playback_seek ) ; speakerButton = findViewById ( R.id.speakerButton ) ; phoneButton = findViewById ( R.id.phoneButton ) ; deleteButton = findViewById ( R.id.deleteButton ) ; totalDurationView = findViewById ( R.id.playback_seek_total_duration ) ; voicemailLoadingStatusView = findViewById ( R.id.playback_state_text ) ; }

Target:
private void initializeMediaPlayerButtonsAndViews ( ) { playButton = findViewById ( R.id.playButton ) ; pauseButton = findViewById ( R.id.pauseButton ) ; currentSeekBarPosition = findViewById ( R.id.playback_position_text ) ; seekBarView = findViewById ( R.id.playback_seek ) ; speakerButton = findViewById ( R.id.speakerButton ) ; phoneButton = findViewById ( R.id.phoneButton ) ; deleteButton = findViewById ( R.id.deleteButton ) ; totalDurationView = findViewById ( R.id.playback_seek_total_duration ) ; voicemailLoadingStatusView = findViewById ( R.id.playback_state_text ) ; voicemailSeekHandleDisabled = getContext ( ) . getResources ( ) . getDrawable ( R.drawable.ic_voicemail_seek_handle_disabled , getContext ( ) . getTheme ( ) ) ; }
Source:
public void testGetSerializable ( ) { assertNull ( mBundle.getSerializable ( android.os.cts.BundleTest.KEY ) ) ; mBundle.putSerializable ( android.os.cts.BundleTest.KEY , "android" ) ; assertEquals ( "android" , mBundle.getSerializable ( android.os.cts.BundleTest.KEY ) ) ; roundtrip ( ) ; assertEquals ( "android" , mBundle.getSerializable ( android.os.cts.BundleTest.KEY ) ) ; }

Target:
public void testGetSerializableWithString ( ) { assertNull ( mBundle.getSerializable ( android.os.cts.BundleTest.KEY ) ) ; java.lang.String s = "android" ; mBundle.putSerializable ( android.os.cts.BundleTest.KEY , s ) ; assertEquals ( s , mBundle.getSerializable ( android.os.cts.BundleTest.KEY ) ) ; roundtrip ( ) ; assertEquals ( s , mBundle.getSerializable ( android.os.cts.BundleTest.KEY ) ) ; }
Source:
public void update ( java.util.Observable o , java.lang.Object arg ) { synchronized ( mLock ) { updateProvidersLocked ( ) ; } }

Target:
private void switchUser ( int userId ) { mBlacklist.switchUser ( userId ) ; synchronized ( mLock ) { mLastLocation.clear ( ) ; for ( com.android.server.location.LocationProviderInterface p : mProviders ) { updateProviderListenersLocked ( p.getName ( ) , false , mCurrentUserId ) ; p.switchUser ( userId ) ; } mCurrentUserId = userId ; updateProvidersLocked ( ) ; } }
Source:
public static java.lang.String toMACString ( long mac ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; boolean first = true ; for ( int n = ( com.android.server.wifi.anqp.Constants.BYTES_IN_EUI48 ) - 1 ; n >= 0 ; n -- ) { if ( first ) { first = false ; } else { sb.append ( ':' ) ; } sb.append ( java.lang.String.format ( "%02x" , ( ( mac > > > ( n * ( java.lang.Byte.SIZE ) ) ) & ( com.android.server.wifi.anqp.Constants.BYTE_MASK ) ) ) ) ; } return sb.toString ( ) ; }

Target:
public static java.lang.String toMACString ( long mac ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; boolean first = true ; for ( int n = ( com.android.server.wifi.hotspot2.anqp.Constants.BYTES_IN_EUI48 ) - 1 ; n >= 0 ; n -- ) { if ( first ) { first = false ; } else { sb.append ( ':' ) ; } sb.append ( java.lang.String.format ( "%02x" , ( ( mac > > > ( n * ( java.lang.Byte.SIZE ) ) ) & ( com.android.server.wifi.hotspot2.anqp.Constants.BYTE_MASK ) ) ) ) ; } return sb.toString ( ) ; }
Source:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { HEAD ( 5 ) ; android.server.cts.c121a Merge ; }

Target:
public void testConfigurationUpdatesWhenResizedFromDockedStack ( ) throws java.lang.Exception { if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInStack ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; final android.server.cts.ReportedSizes dockedSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; moveActivityToStack ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; final android.server.cts.ReportedSizes fullscreenSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; android.server.cts.ActivityManagerAppConfigurationTests.assertSizesAreSane ( fullscreenSizes , dockedSizes ) ; }
Source:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b , java.lang.Iterable < ? extends T > c ) { com.google.common.base.Preconditions.checkNotNull ( a ) ; com.google.common.base.Preconditions.checkNotNull ( b ) ; com.google.common.base.Preconditions.checkNotNull ( c ) ; return com.google.common.collect.Iterables.concat ( java.util.Arrays.asList ( a , b , c ) ) ; }

Target:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b ) { return com.google.common.collect.Iterables.concat ( com.google.common.collect.ImmutableList.of ( a , b ) ) ; }
Source:
public void test_socket_getLocalPort ( ) throws java.io.IOException { serverChannel.socket ( ) . bind ( null ) ; clientChannel.connect ( serverChannel.socket ( ) . getLocalSocketAddress ( ) ) ; java.nio.channels.SocketChannel myChannel = serverChannel.accept ( ) ; int port = myChannel.socket ( ) . getLocalPort ( ) ; assertEquals ( serverChannel.socket ( ) . getLocalPort ( ) , port ) ; myChannel.close ( ) ; clientChannel.close ( ) ; serverChannel.close ( ) ; }

Target:
public void test_socket_getLocalPort ( ) throws java.io.IOException { serverChannel.bind ( null ) ; clientChannel.connect ( serverChannel.getLocalAddress ( ) ) ; java.nio.channels.SocketChannel myChannel = serverChannel.accept ( ) ; int port = myChannel.socket ( ) . getLocalPort ( ) ; assertEquals ( serverChannel.socket ( ) . getLocalPort ( ) , port ) ; myChannel.close ( ) ; clientChannel.close ( ) ; serverChannel.close ( ) ; }
Source:
public void execute ( com.android.build.gradle.tasks.StripDebugSymbolTask task ) { java.io.File debugLib = binary.getSharedLibraryFile ( ) ; task.setInputFile ( debugLib ) ; task.setOutputFile ( new java.io.File ( buildDir , ( ( ( com.android.build.gradle.ndk.internal.NdkNamingScheme.getOutputDirectoryName ( binary ) ) + "/" ) + ( debugLib.getName ( ) ) ) ) ) ; task.setStripCommand ( handler.getStripCommand ( com.android.build.gradle.internal.core.Abi.getByName ( binary.getTargetPlatform ( ) . getName ( ) ) ) ) ; }

Target:
private static void createStripDebugTask ( org.gradle.model.ModelMap < org.gradle.api.Task > tasks , final org.gradle.nativeplatform.SharedLibraryBinarySpec binary , final java.io.File buildDir , final com.android.build.gradle.internal.NdkHandler handler ) { java.lang.String taskName = com.android.build.gradle.ndk.internal.NdkNamingScheme.getTaskName ( binary , "stripSymbols" ) ; tasks.create ( taskName , com.android.build.gradle.tasks.StripDebugSymbolTask.class , new com.android.build.gradle.tasks.StripDebugSymbolTask.ConfigAction ( binary , buildDir , handler ) ) ; binary.getBuildTask ( ) . dependsOn ( taskName ) ; }
Source:
public void execute ( ) { long delayNs = java.util.concurrent.TimeUnit.NANOSECONDS.convert ( mDelay , mTimeUnit ) ; try { java.lang.Thread.sleep ( ( delayNs / ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) , ( ( int ) ( delayNs % ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) ) ) ; mStats.addValue ( "executed" , true ) ; if ( mFail ) { junit.framework.Assert.fail ( "FakeSensorOperation failed" ) ; } } catch ( java.lang.InterruptedException e ) { } }

Target:
public void execute ( ) { long delayNs = java.util.concurrent.TimeUnit.NANOSECONDS.convert ( mDelay , mTimeUnit ) ; try { java.lang.Thread.sleep ( ( delayNs / ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) , ( ( int ) ( delayNs % ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) ) ) ; getStats ( ) . addValue ( "executed" , true ) ; if ( mFail ) { doFail ( ) ; } } catch ( java.lang.InterruptedException e ) { } }
Source:
private char [ ] getChars ( int offset , int count ) { char [ ] chars = new char [ count ] ; for ( int i = 0 ; i < count ; offset += 2 , ++ i ) { chars [ i ] = bytes.getChar ( offset ) ; } return chars ; }

Target:
private char [ ] getChars ( int offset , int count ) { char [ ] chars = new char [ count ] ; if ( count <= 16 ) { for ( int i = 0 ; i < count ; offset += 2 , ++ i ) { chars [ i ] = bytes.getChar ( offset ) ; } } else { java.nio.CharBuffer temp = bytes.asCharBuffer ( ) ; temp.position ( ( offset / 2 ) ) ; temp.get ( chars ) ; } return chars ; }
Source:
synchronized java.io.OutputStream openWrite ( @ javax.annotation.Nonnull com.android.sched.vfs.WriteZipFS.ZipVFile file ) { assert ! ( isClosed ( ) ) ; try { outputStream.putNextEntry ( file.getZipEntry ( ) ) ; if ( 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.WriteZipFS.UnclosableVFileOutputStream ( this ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
synchronized java.io.OutputStream openWrite ( @ javax.annotation.Nonnull com.android.sched.vfs.WriteZipFS.ZipVFile file ) { assert ! ( isClosed ( ) ) ; if ( 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.WriteZipFS.ZipEntryOutputStream ( this , file.getZipEntry ( ) ) ; }
Source:
public void testSingleDeviceConnectAndDisconnect ( ) { receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device1 ) ) ; assertEquals ( 1 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; assertEquals ( device1.getAddress ( ) , mBluetoothDeviceManager.getMostRecentlyConnectedDevice ( null ) ) ; receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_DISCONNECTED , device1 ) ) ; assertEquals ( 0 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; assertNull ( mBluetoothDeviceManager.getMostRecentlyConnectedDevice ( null ) ) ; }

Target:
public void testSingleDeviceConnectAndDisconnect ( ) { receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device1 ) ) ; org.junit.Assert.assertEquals ( 1 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; org.junit.Assert.assertEquals ( device1.getAddress ( ) , mBluetoothDeviceManager.getMostRecentlyConnectedDevice ( null ) ) ; receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_DISCONNECTED , device1 ) ) ; org.junit.Assert.assertEquals ( 0 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; org.junit.Assert.assertNull ( mBluetoothDeviceManager.getMostRecentlyConnectedDevice ( null ) ) ; }
Source:
public void testCannotSetDeviceOwnerWhenSecondaryUserPresent ( ) throws java.lang.Exception { if ( ( ! ( mHasFeature ) ) || ( ( getMaxNumberOfUsersSupported ( ) ) < 2 ) ) { return ; } int userId = - 1 ; installApp ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_APK ) ; try { userId = createUser ( ) ; assertFalse ( setDeviceOwner ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_ADMIN_COMPONENT ) ) ; } finally { removeUser ( userId ) ; runDeviceTests ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_PKG , com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_CLEAR ) ; } }

Target:
public void testCannotSetDeviceOwnerWhenSecondaryUserPresent ( ) throws java.lang.Exception { if ( ( ! ( mHasFeature ) ) || ( ( getMaxNumberOfUsersSupported ( ) ) < 2 ) ) { return ; } int userId = - 1 ; installAppAsUser ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_APK , mPrimaryUserId ) ; try { userId = createUser ( ) ; assertFalse ( setDeviceOwner ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_ADMIN_COMPONENT , mPrimaryUserId , true ) ) ; } finally { removeUser ( userId ) ; removeAdmin ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_ADMIN_COMPONENT , mPrimaryUserId ) ; } }
Source:
private com.android.ide.common.rendering.RenderSecurityManager createSecurityManager ( ) { java.lang.String projectPath = null ; java.lang.String sdkPath = null ; if ( com.android.ide.common.rendering.RenderSecurityManager.RESTRICT_READS ) { projectPath = com.android.ide.eclipse.adt.AdtUtils.getAbsolutePath ( mProject ) . toFile ( ) . getPath ( ) ; com.android.ide.eclipse.adt.internal.sdk.Sdk sdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; sdkPath = ( sdk != null ) ? sdk.getSdkLocation ( ) : null ; } com.android.ide.common.rendering.RenderSecurityManager securityManager = new com.android.ide.common.rendering.RenderSecurityManager ( sdkPath , projectPath ) ; securityManager.setLogger ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) ; java.awt.Toolkit.getDefaultToolkit ( ) ; return securityManager ; }

Target:
private com.android.ide.common.rendering.RenderSecurityManager createSecurityManager ( ) { java.lang.String projectPath = null ; java.lang.String sdkPath = null ; if ( com.android.ide.common.rendering.RenderSecurityManager.RESTRICT_READS ) { projectPath = com.android.ide.eclipse.adt.AdtUtils.getAbsolutePath ( mProject ) . toFile ( ) . getPath ( ) ; com.android.ide.eclipse.adt.internal.sdk.Sdk sdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; sdkPath = ( sdk != null ) ? sdk.getSdkOsLocation ( ) : null ; } com.android.ide.common.rendering.RenderSecurityManager securityManager = new com.android.ide.common.rendering.RenderSecurityManager ( sdkPath , projectPath ) ; securityManager.setLogger ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) ; java.awt.Toolkit.getDefaultToolkit ( ) ; return securityManager ; }
Source:
protected byte [ ] engineGetEncoded ( ) { try { org.bouncycastle.asn1.ASN1EncodableVector v = new org.bouncycastle.asn1.ASN1EncodableVector ( ) ; v.add ( new org.bouncycastle.asn1.DEROctetString ( currentSpec.getDerivationV ( ) ) ) ; v.add ( new org.bouncycastle.asn1.DEROctetString ( currentSpec.getEncodingV ( ) ) ) ; v.add ( new org.bouncycastle.asn1.DERInteger ( currentSpec.getMacKeySize ( ) ) ) ; return new org.bouncycastle.asn1.DERSequence ( v ) . getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( "Error encoding IESParameters" ) ; } }

Target:
protected byte [ ] engineGetEncoded ( ) { try { org.bouncycastle.asn1.ASN1EncodableVector v = new org.bouncycastle.asn1.ASN1EncodableVector ( ) ; v.add ( new org.bouncycastle.asn1.DEROctetString ( currentSpec.getDerivationV ( ) ) ) ; v.add ( new org.bouncycastle.asn1.DEROctetString ( currentSpec.getEncodingV ( ) ) ) ; v.add ( new org.bouncycastle.asn1.ASN1Integer ( currentSpec.getMacKeySize ( ) ) ) ; return new org.bouncycastle.asn1.DERSequence ( v ) . getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( "Error encoding IESParameters" ) ; } }
Source:
public void testMacAddressConversions ( ) { final int iterations = 10000 ; for ( int i = 0 ; i < iterations ; i ++ ) { android.net.MacAddress mac = android.net.MacAddress.getRandomAddress ( ) ; java.lang.String stringRepr = mac.toString ( ) ; byte [ ] bytesRepr = mac.toByteArray ( ) ; org.junit.Assert.assertEquals ( mac , new android.net.MacAddress ( stringRepr ) ) ; org.junit.Assert.assertEquals ( mac , new android.net.MacAddress ( bytesRepr ) ) ; } }

Target:
public void testMacAddressConversions ( ) { final int iterations = 10000 ; for ( int i = 0 ; i < iterations ; i ++ ) { android.net.MacAddress mac = android.net.MacAddress.createRandomUnicastAddress ( ) ; java.lang.String stringRepr = mac.toString ( ) ; byte [ ] bytesRepr = mac.toByteArray ( ) ; org.junit.Assert.assertEquals ( mac , android.net.MacAddress.fromString ( stringRepr ) ) ; org.junit.Assert.assertEquals ( mac , android.net.MacAddress.fromBytes ( bytesRepr ) ) ; } }
Source:
public void run ( ) { org.eclipse.ui.IWorkbenchPage [ ] windowPages = getSite ( ) . getWorkbenchWindow ( ) . getPages ( ) ; for ( int i = 0 ; i < ( windowPages.length ) ; i ++ ) { org.eclipse.ui.IEditorPart editorPart = windowPages [ i ] . findEditor ( input ) ; windowPages [ i ] . closeEditor ( editorPart , true ) ; } }

Target:
public void linkActivated ( org.eclipse.ui.forms.events.HyperlinkEvent e ) { super . linkActivated ( e ) ; java.lang.String link = e.data.toString ( ) ; if ( ( link.startsWith ( "http" ) ) || ( link.startsWith ( "file:/" ) ) ) { openLinkInBrowser ( link ) ; } else if ( link.startsWith ( "page:" ) ) { setActivePage ( link.substring ( 5 ) ) ; } }
Source:
public void testValidMinorDistroVersion_newer ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.DistroVersion newMajorDistroVersion = new com.android.timezone.distro.DistroVersion ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MINOR_VERSION ) + 1 ) , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; com.android.timezone.distro.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( newMajorDistroVersion ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distro ) ; }

Target:
public void testValidMinorDistroVersion_newer ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.DistroVersion newMajorDistroVersion = new com.android.timezone.distro.DistroVersion ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MINOR_VERSION ) + 1 ) , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; byte [ ] distroBytes = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( newMajorDistroVersion ) . buildBytes ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distroBytes ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distroBytes ) ; }
Source:
private java.lang.String parseHost ( ) { java.lang.String authority = getAuthority ( ) ; if ( authority == null ) { return null ; } int userInfoSeparator = authority.indexOf ( '@' ) ; int portSeparator = authority.indexOf ( ':' , userInfoSeparator ) ; return portSeparator == ( android.net.Uri.NOT_FOUND ) ? authority.substring ( ( userInfoSeparator + 1 ) ) : authority.substring ( ( userInfoSeparator + 1 ) , portSeparator ) ; }

Target:
private java.lang.String parseHost ( ) { java.lang.String authority = getEncodedAuthority ( ) ; if ( authority == null ) { return null ; } int userInfoSeparator = authority.indexOf ( '@' ) ; int portSeparator = authority.indexOf ( ':' , userInfoSeparator ) ; java.lang.String encodedHost = ( portSeparator == ( android.net.Uri.NOT_FOUND ) ) ? authority.substring ( ( userInfoSeparator + 1 ) ) : authority.substring ( ( userInfoSeparator + 1 ) , portSeparator ) ; return android.net.Uri.decode ( encodedHost ) ; }
Source:
void apply ( org.gradle.nativeplatform.NativeBinarySpec binary ) { for ( java.lang.String arg : getCFlags ( ) ) { binary.cCompiler.args ( arg ) ; } for ( java.lang.String arg : getCppFlags ( ) ) { binary.cppCompiler.args ( arg ) ; } for ( java.lang.String arg : getLdFlags ( ) ) { binary.linker.args ( arg ) ; } }

Target:
public void apply ( org.gradle.nativeplatform.NativeBinarySpec binary ) { for ( java.lang.String arg : getCFlags ( ) ) { com.android.build.gradle.ndk.internal.BinaryToolHelper.getCCompiler ( binary ) . args ( arg ) ; } for ( java.lang.String arg : getCppFlags ( ) ) { com.android.build.gradle.ndk.internal.BinaryToolHelper.getCppCompiler ( binary ) . args ( arg ) ; } for ( java.lang.String arg : getLdFlags ( ) ) { binary.getLinker ( ) . args ( arg ) ; } }
Source:
public java.lang.String getAlgorithmName ( ) { return "G" + ( cfbEngine.getAlgorithmName ( ) ) ; }

Target:
public java.lang.String getAlgorithmName ( ) { java.lang.String name = cfbEngine.getAlgorithmName ( ) ; return ( ( name.substring ( 0 , ( ( name.indexOf ( '/' ) ) - 1 ) ) ) + "/G" ) + ( name.substring ( ( ( name.indexOf ( '/' ) ) + 1 ) ) ) ; }
Source:
private void explicitCallTransfer ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "explicitCallTransfer" ) ; } if ( ( mCalls.size ( ) ) < 2 ) { return ; } if ( handleCallActionNative ( HeadsetClientHalConstants.CALL_ACTION_CHLD_4 , ( - 1 ) ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EXPLICIT_CALL_TRANSFER ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't transfer call" ) ; } }

Target:
private void explicitCallTransfer ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "explicitCallTransfer" ) ; } if ( ( mCalls.size ( ) ) < 2 ) { return ; } if ( handleCallActionNative ( getByteAddress ( mCurrentDevice ) , HeadsetClientHalConstants.CALL_ACTION_CHLD_4 , ( - 1 ) ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EXPLICIT_CALL_TRANSFER ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't transfer call" ) ; } }
Source:
public void testDeserializeShuffledOrdinals ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200246a6176612e7574696c2e456e756d5365742453657269616c" + ( ( ( ( ( ( ( "697a6174696f6e50726f78790507d3db7654cad10200024c000b656c656d656e7" + "4547970657400114c6a6176612f6c616e672f436c6173733b5b0008656c656d65" ) + "6e74737400115b4c6a6176612f6c616e672f456e756d3b7870767200266c69626" ) + "36f72652e6a6176612e7574696c2e456e756d5365745465737424526f7368616d" ) + "626f00000000000000001200007872000e6a6176612e6c616e672e456e756d000" ) + "00000000000001200007870757200115b4c6a6176612e6c616e672e456e756d3b" ) + "a88dea2d33d22f980200007870000000027e71007e000474000853434953534f5" ) + "2537e71007e0004740004524f434b" ) ; assertEquals ( java.util.EnumSet.of ( libcore.java.util.EnumSetTest.Roshambo.ROCK , libcore.java.util.EnumSetTest.Roshambo.SCISSORS ) , libcore.util.SerializationTester.deserializeHex ( s ) ) ; }

Target:
public void testDeserializeShuffledOrdinals ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200246a6176612e7574696c2e456e756d5365742453657269616c" + ( ( ( ( ( ( ( "697a6174696f6e50726f78790507d3db7654cad10200024c000b656c656d656e7" + "4547970657400114c6a6176612f6c616e672f436c6173733b5b0008656c656d65" ) + "6e74737400115b4c6a6176612f6c616e672f456e756d3b7870767200266c69626" ) + "36f72652e6a6176612e7574696c2e456e756d5365745465737424526f7368616d" ) + "626f00000000000000001200007872000e6a6176612e6c616e672e456e756d000" ) + "00000000000001200007870757200115b4c6a6176612e6c616e672e456e756d3b" ) + "a88dea2d33d22f980200007870000000027e71007e000474000853434953534f5" ) + "2537e71007e0004740004524f434b" ) ; assertEquals ( java.util.EnumSet.of ( libcore.java.util.EnumSetTest.Roshambo.ROCK , libcore.java.util.EnumSetTest.Roshambo.SCISSORS ) , libcore.libcore.util.SerializationTester.deserializeHex ( s ) ) ; }
Source:
public void onTargetChange ( ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData targetData = mConfigComposite.onXmlModelLoaded ( ) ; if ( targetData != null ) { com.android.ide.common.layoutlib.LayoutLibrary layoutLib = targetData.getLayoutLibrary ( ) ; setClippingSupport ( ( ( layoutLib.getBridge ( ) . getApiLevel ( ) ) >= 4 ) ) ; } mConfigListener.onConfigurationChange ( ) ; }

Target:
public void onTargetChange ( ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData targetData = mConfigComposite.onXmlModelLoaded ( ) ; if ( targetData != null ) { com.android.ide.common.layoutlib.LayoutLibrary layoutLib = targetData.getLayoutLibrary ( ) ; setClippingSupport ( layoutLib.supports ( Capability.UNBOUND_RENDERING ) ) ; } mConfigListener.onConfigurationChange ( ) ; }
Source:
public void shutdown ( ) { synchronized ( mLock ) { mSessions.clear ( ) ; mDiscoverySessions.clear ( ) ; } mService.unregisterReceiver ( mStateChangedReceiver ) ; }

Target:
public void wifiNanDestroyAll ( ) { synchronized ( mLock ) { for ( int i = 0 ; i < ( mSessions.size ( ) ) ; ++ i ) { mSessions.valueAt ( i ) . destroy ( ) ; } mSessions.clear ( ) ; mDiscoverySessions.clear ( ) ; } }
Source:
protected static int runJill ( @ javax.annotation.Nonnull java.io.PrintStream err , @ javax.annotation.Nonnull com.android.jill.Options options ) { try { com.android.jill.Jill.process ( options ) ; } catch ( com.android.jill.JillException e ) { if ( options != null ) { err.println ( ( ( "Binary transformation of " + ( options.getBinaryFile ( ) . getName ( ) ) ) + " failed." ) ) ; if ( options.isVerbose ( ) ) { e.printStackTrace ( err ) ; } } else { err.println ( "Binary transformation failed." ) ; } return ExitStatus.FAILURE_INTERNAL ; } return ExitStatus.SUCCESS ; }

Target:
protected static int runJill ( @ javax.annotation.Nonnull java.io.PrintStream err , @ javax.annotation.Nonnull com.android.jill.Options options ) { try { com.android.jill.Jill.process ( options ) ; } catch ( com.android.jill.JillException e ) { err.println ( ( ( ( "Binary transformation of " + ( options.getBinaryFile ( ) . getName ( ) ) ) + " failed: " ) + ( e.getMessage ( ) ) ) ) ; if ( options.isVerbose ( ) ) { e.printStackTrace ( err ) ; } return ExitStatus.FAILURE_INTERNAL ; } return ExitStatus.SUCCESS ; }
Source:
private void setBluetoothOn ( boolean on ) { if ( mBluetoothManager.isBluetoothAvailable ( ) ) { boolean isAlreadyOn = mBluetoothManager.isBluetoothAudioConnectedOrPending ( ) ; if ( on != isAlreadyOn ) { com.android.server.telecom.Log.i ( this , "connecting bluetooth %s" , on ) ; if ( on ) { mBluetoothManager.connectBluetoothAudio ( ) ; } else { mBluetoothManager.disconnectBluetoothAudio ( ) ; } } } }

Target:
private void setBluetoothOn ( boolean on ) { if ( mBluetoothManager.isBluetoothAvailable ( ) ) { boolean isAlreadyOn = mBluetoothManager.isBluetoothAudioConnectedOrPending ( ) ; if ( on != isAlreadyOn ) { android.telecom.Log.i ( this , "connecting bluetooth %s" , on ) ; if ( on ) { mBluetoothManager.connectBluetoothAudio ( ) ; } else { mBluetoothManager.disconnectBluetoothAudio ( ) ; } } } }
Source:
private java.util.Set < java.lang.Integer > getProfileIdsLocked ( int userId ) { java.util.Set < java.lang.Integer > userIds = new java.util.HashSet < java.lang.Integer > ( ) ; final java.util.List < android.content.pm.UserInfo > profiles = getUserManagerLocked ( ) . getProfiles ( userId , false ) ; for ( android.content.pm.UserInfo user : profiles ) { userIds.add ( java.lang.Integer.valueOf ( user.id ) ) ; } return userIds ; }

Target:
public void updatePersistentConfiguration ( android.content.res.Configuration values ) { enforceCallingPermission ( android.Manifest.permission.CHANGE_CONFIGURATION , "updateConfiguration()" ) ; enforceWriteSettingsPermission ( "updateConfiguration()" ) ; if ( values == null ) { throw new java.lang.NullPointerException ( "Configuration must not be null" ) ; } int userId = android.os.UserHandle.getCallingUserId ( ) ; synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; updateConfigurationLocked ( values , null , false , true , userId ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
public void getCallForwardingOption ( int commandInterfaceCFReason , android.os.Message onComplete ) { if ( isValidCommandInterfaceCFReason ( commandInterfaceCFReason ) ) { if ( com.android.internal.telephony.gsm.GSMPhone.LOCAL_DEBUG ) android.telephony.Rlog.d ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "requesting call forwarding query." ) ; android.os.Message resp ; if ( commandInterfaceCFReason == ( com.android.internal.telephony.CommandsInterface.CF_REASON_UNCONDITIONAL ) ) { resp = obtainMessage ( com.android.internal.telephony.gsm.EVENT_GET_CALL_FORWARD_DONE , onComplete ) ; } else { resp = onComplete ; } mCM.queryCallForwardStatus ( commandInterfaceCFReason , 0 , null , resp ) ; } }

Target:
public void getCallForwardingOption ( int commandInterfaceCFReason , android.os.Message onComplete ) { if ( isValidCommandInterfaceCFReason ( commandInterfaceCFReason ) ) { if ( com.android.internal.telephony.gsm.GSMPhone.LOCAL_DEBUG ) android.telephony.Rlog.d ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "requesting call forwarding query." ) ; android.os.Message resp ; if ( commandInterfaceCFReason == ( com.android.internal.telephony.CommandsInterface.CF_REASON_UNCONDITIONAL ) ) { resp = obtainMessage ( com.android.internal.telephony.gsm.EVENT_GET_CALL_FORWARD_DONE , onComplete ) ; } else { resp = onComplete ; } mCi.queryCallForwardStatus ( commandInterfaceCFReason , 0 , null , resp ) ; } }
Source:
public void setVerticalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setVerticalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setVerticalScrollbarOverlay ( overlay ) ; }

Target:
public boolean overlayHorizontalScrollbar ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return overlayHorizontalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayHorizontalScrollbar ( ) ; }
Source:
public void onClick ( android.view.View v ) { android.view.View parent = ( ( android.view.View ) ( v.getParent ( ) . getParent ( ) ) ) ; com.android.server.telecom.testapps.SelfManagedConnection connection = ( ( com.android.server.telecom.testapps.SelfManagedConnection ) ( parent.getTag ( ) ) ) ; connection.setConnectionHeld ( ) ; notifyDataSetChanged ( ) ; }

Target:
public void onClick ( android.view.View v ) { android.view.View parent = ( ( android.view.View ) ( v.getParent ( ) . getParent ( ) ) ) ; com.android.server.telecom.testapps.SelfManagedConnection connection = ( ( com.android.server.telecom.testapps.SelfManagedConnection ) ( parent.getTag ( ) ) ) ; connection.setConnectionDisconnected ( DisconnectCause.MISSED ) ; com.android.server.telecom.testapps.SelfManagedCallList.getInstance ( ) . removeConnection ( connection ) ; }
Source:
public static boolean revealMethod ( java.lang.String fqmn , java.lang.String perspective ) { for ( com.android.ide.eclipse.ddms.ISourceRevealer revealer : com.android.ide.eclipse.ddms.JavaSourceRevealer.sSourceRevealers ) { try { if ( revealer.revealMethod ( fqmn , perspective ) ) { return true ; } } catch ( java.lang.Throwable t ) { } } return false ; }

Target:
public static boolean revealMethod ( java.lang.String fqmn , java.lang.String fileName , int linenumber , java.lang.String perspective ) { for ( com.android.ide.eclipse.ddms.ISourceRevealer revealer : com.android.ide.eclipse.ddms.JavaSourceRevealer.sSourceRevealers ) { try { if ( revealer.revealMethod ( fqmn , fileName , linenumber , perspective ) ) { return true ; } } catch ( java.lang.Throwable t ) { } } return false ; }
Source:
synchronized void nScriptSetVarI ( long id , int slot , int val ) { validate ( ) ; rsnScriptSetVarI ( mContext , id , slot , val ) ; }

Target:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params , boolean mUseInc ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , mUseInc ) ; } else { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , params , mUseInc ) ; } }