auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void wifiNanTerminateSession ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId ) throws android.os.RemoteException { synchronized ( mLock ) { android.net.wifi.nan.WifiNanDiscoveryBaseSession session = mDiscoverySessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanTerminateSession before session (session ID " + sessionId ) + ") is ready" ) ) ; } session.terminate ( ) ; mDiscoverySessions.remove ( sessionId ) ; } }

Target:
public void wifiNanDestroyDiscoverySession ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The discovery session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId ) throws android.os.RemoteException { synchronized ( mLock ) { android.net.wifi.nan.WifiNanDiscoveryBaseSession session = mDiscoverySessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanTerminateSession before session (session ID " + sessionId ) + ") is ready" ) ) ; } session.destroy ( ) ; mDiscoverySessions.remove ( sessionId ) ; } }
Source:
public void testEmptyApk ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMinSdkVersion ( "empty-unsigned.apk" , 1 ) , Issue.JAR_SIG_NO_MANIFEST ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMinSdkVersion ( "v1-only-empty.apk" , 18 ) , Issue.JAR_SIG_NO_SIGNED_ZIP_ENTRIES ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( "v2-only-empty.apk" , AndroidSdkVersion.N ) ) ; }

Target:
public void testEmptyApk ( ) throws java.lang.Exception { try { verifyForMinSdkVersion ( "empty-unsigned.apk" , 1 ) ; org.junit.Assert.fail ( "ApkFormatException should've been thrown" ) ; } catch ( com.android.apksig.apk.ApkFormatException expected ) { } try { verifyForMinSdkVersion ( "v1-only-empty.apk" , 18 ) ; org.junit.Assert.fail ( "ApkFormatException should've been thrown" ) ; } catch ( com.android.apksig.apk.ApkFormatException expected ) { } try { verifyForMinSdkVersion ( "v2-only-empty.apk" , AndroidSdkVersion.N ) ; org.junit.Assert.fail ( "ApkFormatException should've been thrown" ) ; } catch ( com.android.apksig.apk.ApkFormatException expected ) { } }
Source:
private void doAdd ( ) { com.google.gct.testing.CloudTestConfigurationImpl newConfiguration = ( ( selectedConfiguration ) != null ) ? selectedConfiguration.copy ( "Copy of " ) : new com.google.gct.testing.CloudTestConfigurationImpl ( facet ) ; newConfiguration.setIcon ( CloudTestConfigurationProviderImpl.DEFAULT_ICON ) ; int addIndex = ( ( selectedConfiguration ) == null ) ? editableConfigurations.size ( ) : ( editableConfigurations.indexOf ( selectedConfiguration ) ) + 1 ; editableConfigurations.add ( addIndex , newConfiguration ) ; addConfigurationToTree ( addIndex , newConfiguration , true ) ; selectedConfiguration = newConfiguration ; updateConfigurationTree ( ) ; }

Target:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.google.gct.testing.CloudTestConfigurationImpl newConfiguration = ( ( selectedConfiguration ) != null ) ? selectedConfiguration.copy ( "Copy of " ) : new com.google.gct.testing.CloudTestConfigurationImpl ( facet ) ; addNewConfiguration ( newConfiguration ) ; }
Source:
boolean enableWBS ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ! ( mStateMachine.isConnected ( ) ) ) { return false ; } if ( mStateMachine.isAudioOn ( ) ) { return false ; } for ( android.bluetooth.BluetoothDevice device : getConnectedDevices ( ) ) { mStateMachine.sendMessage ( HeadsetStateMachine.ENABLE_WBS , device ) ; } return true ; }

Target:
boolean isAudioConnected ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return ( mStateMachine.getAudioState ( ) ) == ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ) ; }
Source:
private void launchConfirmationDialog ( com.android.internal.telephony.gsm.stk.TextMessage msg ) { msg.title = lastSelectedItem ; android.content.Intent newIntent = new android.content.Intent ( this , com.android.stk.StkDialogActivity.class ) ; newIntent.setFlags ( ( ( ( ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_NO_HISTORY ) ) | ( android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ) ) | ( getFlagActivityNoUserAction ( com.android.stk.StkAppService.InitiatedByUserAction.unknown ) ) ) ) ; newIntent.putExtra ( "TEXT" , msg ) ; startActivity ( newIntent ) ; }

Target:
private void launchConfirmationDialog ( com.android.internal.telephony.cat.TextMessage msg ) { msg.title = lastSelectedItem ; android.content.Intent newIntent = new android.content.Intent ( this , com.android.stk.StkDialogActivity.class ) ; newIntent.setFlags ( ( ( ( ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_NO_HISTORY ) ) | ( android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ) ) | ( getFlagActivityNoUserAction ( com.android.stk.StkAppService.InitiatedByUserAction.unknown ) ) ) ) ; newIntent.putExtra ( "TEXT" , msg ) ; startActivity ( newIntent ) ; }
Source:
private synchronized void handleException ( java.lang.Exception e ) { com.android.ddmlib.Log.w ( "PropertyFetcher" , java.lang.String.format ( "%s getting properties for device %s: %s" , e.getClass ( ) . getSimpleName ( ) , mDevice.getSerialNumber ( ) , e.getMessage ( ) ) ) ; for ( java.util.Map.Entry < java.lang.String , com.google.common.util.concurrent.SettableFuture < java.lang.String > > entry : mPendingRequests.entrySet ( ) ) { entry.getValue ( ) . setException ( e ) ; } mPendingRequests.clear ( ) ; }

Target:
private synchronized void handleException ( java.lang.Exception e ) { mCacheState = com.android.ddmlib.PropertyFetcher.CacheState.UNPOPULATED ; com.android.ddmlib.Log.w ( "PropertyFetcher" , java.lang.String.format ( "%s getting properties for device %s: %s" , e.getClass ( ) . getSimpleName ( ) , mDevice.getSerialNumber ( ) , e.getMessage ( ) ) ) ; for ( java.util.Map.Entry < java.lang.String , com.google.common.util.concurrent.SettableFuture < java.lang.String > > entry : mPendingRequests.entrySet ( ) ) { entry.getValue ( ) . setException ( e ) ; } mPendingRequests.clear ( ) ; }
Source:
public com.google.gson.JsonObject toJson ( ) { com.google.gson.JsonObject json = new com.google.gson.JsonObject ( ) ; json.add ( com.android.vts.util.Graph.X_LABEL_KEY , new com.google.gson.JsonPrimitive ( getXLabel ( ) ) ) ; json.add ( com.android.vts.util.Graph.NAME_KEY , new com.google.gson.JsonPrimitive ( getName ( ) ) ) ; json.add ( com.android.vts.util.Graph.TYPE_KEY , new com.google.gson.JsonPrimitive ( getType ( ) . toString ( ) ) ) ; return json ; }

Target:
public com.google.gson.JsonObject toJson ( ) { com.google.gson.JsonObject json = new com.google.gson.JsonObject ( ) ; json.add ( com.android.vts.util.Graph.X_LABEL_KEY , new com.google.gson.JsonPrimitive ( getXLabel ( ) ) ) ; json.add ( com.android.vts.util.Graph.Y_LABEL_KEY , new com.google.gson.JsonPrimitive ( getYLabel ( ) ) ) ; json.add ( com.android.vts.util.Graph.NAME_KEY , new com.google.gson.JsonPrimitive ( getName ( ) ) ) ; json.add ( com.android.vts.util.Graph.TYPE_KEY , new com.google.gson.JsonPrimitive ( getType ( ) . toString ( ) ) ) ; return json ; }
Source:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , android.bluetooth.le.AdvertisingSetCallback callback , android.os.Handler handler ) { startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , 0 , callback , handler ) ; }

Target:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , int duration , int maxExtendedAdvertisingEvents , android.bluetooth.le.AdvertisingSetCallback callback ) { startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , duration , maxExtendedAdvertisingEvents , callback , new android.os.Handler ( android.os.Looper.getMainLooper ( ) ) ) ; }
Source:
public void testOnTearDownRestoreFailed ( ) throws java.lang.Exception { mCmdUtil.mCmdSuccess = false ; try { mPreparer.tearDown ( mDevice , mBuildInfo , null ) ; } catch ( java.lang.RuntimeException e ) { org.junit.Assert.assertEquals ( "Hal restore failed." , e.getMessage ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void testOnTearDownRestoreFailed ( ) throws java.lang.Exception { mCmdUtil.mCmdSuccess = false ; try { mPreparer.tearDown ( mDevice , mBuildInfo , null ) ; } catch ( java.lang.RuntimeException e ) { org.junit.Assert.assertEquals ( "HAL restore failed." , e.getMessage ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Throwable { Main.testThrowException ( ) ; Main.testDropArguments ( ) ; Main.testCatchException ( ) ; Main.testGuardWithTest ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Throwable { Main.testThrowException ( ) ; Main.testDropArguments ( ) ; Main.testCatchException ( ) ; Main.testGuardWithTest ( ) ; Main.testArrayElementGetter ( ) ; Main.testArrayElementSetter ( ) ; Main.testIdentity ( ) ; Main.testConstant ( ) ; }
Source:
public java.util.List < android.content.pm.PackageInfo > getPreferredPackages ( int flags ) { synchronized ( mPackages ) { final java.util.ArrayList < android.content.pm.PackageInfo > res = new java.util.ArrayList < android.content.pm.PackageInfo > ( ) ; final java.util.ArrayList < com.android.server.PackageManagerService.PackageSetting > pref = mSettings.mPreferredPackages ; final int N = pref.size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { res.add ( generatePackageInfo ( pref.get ( i ) . pkg , flags ) ) ; } return res ; } }

Target:
public void removePackageFromPreferred ( java.lang.String packageName ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.SET_PREFERRED_APPLICATIONS , null ) ; com.android.server.Log.w ( com.android.server.PackageManagerService.TAG , "removePackageFromPreferred: no longer implemented" ) ; }
Source:
private java.lang.Object getSelectedItem ( ) { org.eclipse.jface.viewers.ISelection sel = mTreeViewPackage.getSelection ( ) ; if ( sel instanceof org.eclipse.jface.viewers.IStructuredSelection ) { java.lang.Object elem = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( sel ) ) . getFirstElement ( ) ; if ( ( elem instanceof com.android.sdkuilib.internal.repository.ArchiveInfo ) || ( elem instanceof com.android.sdkuilib.internal.repository.SdkUpdaterChooserDialog.LicenseEntry ) ) { return elem ; } } return null ; }

Target:
private java.lang.Object getSelectedItem ( ) { org.eclipse.jface.viewers.ISelection sel = mTreeViewPackage.getSelection ( ) ; if ( sel instanceof org.eclipse.jface.viewers.IStructuredSelection ) { java.lang.Object elem = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( sel ) ) . getFirstElement ( ) ; if ( ( elem instanceof com.android.sdklib.internal.repository.updater.ArchiveInfo ) || ( elem instanceof com.android.sdkuilib.internal.repository.SdkUpdaterChooserDialog.LicenseEntry ) ) { return elem ; } } return null ; }
Source:
public com.android.sched.vfs.VFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.CachedDirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e ) ; } }

Target:
public com.android.sched.vfs.VFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.CachedDirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ; } catch ( com.android.sched.util.file.CannotChangePermissionException | com.android.sched.util.file.NotDirectoryException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.FileAlreadyExistsException | com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.sched.util.codec.ParsingException ( e ) ; } }
Source:
public static int readUnsignedLeb128 ( com.android.dx.util.ByteInput in ) { int result = 0 ; int cur ; int count = 0 ; do { cur = ( in.readByte ( ) ) & 255 ; result |= ( cur & 127 ) << ( count * 7 ) ; count ++ ; } while ( ( ( cur & 128 ) == 128 ) && ( count < 5 ) ) ; if ( ( cur & 128 ) == 128 ) { throw new com.android.dx.util.DexException ( "invalid LEB128 sequence" ) ; } return result ; }

Target:
public static int readUnsignedLeb128 ( com.android.dex.util.ByteInput in ) { int result = 0 ; int cur ; int count = 0 ; do { cur = ( in.readByte ( ) ) & 255 ; result |= ( cur & 127 ) << ( count * 7 ) ; count ++ ; } while ( ( ( cur & 128 ) == 128 ) && ( count < 5 ) ) ; if ( ( cur & 128 ) == 128 ) { throw new com.android.dex.DexException ( "invalid LEB128 sequence" ) ; } return result ; }
Source:
private boolean shouldThrowSocketTimeoutExceptionFromAccept ( java.net.SocketTimeoutException e ) { if ( isBlocking ( ) ) { return true ; } java.lang.Throwable cause = e.getCause ( ) ; if ( cause instanceof libcore.io.ErrnoException ) { if ( ( ( ( libcore.io.ErrnoException ) ( cause ) ) . errno ) == ( EAGAIN ) ) { return false ; } } return true ; }

Target:
private boolean shouldThrowSocketTimeoutExceptionFromAccept ( java.net.SocketTimeoutException e ) { if ( isBlocking ( ) ) { return true ; } java.lang.Throwable cause = e.getCause ( ) ; if ( cause instanceof android.system.ErrnoException ) { if ( ( ( ( android.system.ErrnoException ) ( cause ) ) . errno ) == ( EAGAIN ) ) { return false ; } } return true ; }
Source:
public void testAllOfWithWrongMatcher ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) org.hamcrest.Matcher < android.net.Uri > allOfMatcher = org.hamcrest.CoreMatchers.allOf ( android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( "www.google.com" ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithName ( "sourceid" ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithName ( "param" ) , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( "/search" ) ) ; assertFalse ( "Matcher shouldn't have matched." , allOfMatcher.matches ( uri ) ) ; }

Target:
public void allOfWithWrongMatcher ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) org.hamcrest.Matcher < android.net.Uri > allOfMatcher = org.hamcrest.CoreMatchers.allOf ( android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( "www.google.com" ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithName ( "sourceid" ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithName ( "param" ) , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( "/search" ) ) ; org.junit.Assert.assertFalse ( "Matcher shouldn't have matched." , allOfMatcher.matches ( uri ) ) ; }
Source:
public void setRttStreams ( boolean shouldBeRtt ) { boolean areStreamsInitialized = ( ( mInCallToConnectionServiceStreams ) != null ) && ( ( mConnectionServiceToInCallStreams ) != null ) ; if ( shouldBeRtt && ( ! areStreamsInitialized ) ) { try { mInCallToConnectionServiceStreams = android.os.ParcelFileDescriptor.createReliablePipe ( ) ; mConnectionServiceToInCallStreams = android.os.ParcelFileDescriptor.createReliablePipe ( ) ; } catch ( java.io.IOException e ) { android.telecom.Log.e ( this , e , "Failed to create pipes for RTT call." ) ; } } else if ( ( ! shouldBeRtt ) && areStreamsInitialized ) { closeRttPipes ( ) ; mInCallToConnectionServiceStreams = null ; mConnectionServiceToInCallStreams = null ; } }

Target:
public void handoverTo ( android.telecom.PhoneAccountHandle destAcct , int videoState , android.os.Bundle extras ) { requestHandover ( destAcct , videoState , extras , false ) ; }
Source:
private static java.util.List < com.google.currysrc.api.transform.TransformRule > createTransformRules ( ) { java.util.List < com.google.currysrc.api.transform.TransformRule > transformRules = com.google.common.collect.Lists.newArrayList ( Icu4jTransform.Icu4jRules.getRepackagingRules ( ) ) ; transformRules.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.transformers.ReplaceTextCommentScanner ( Icu4jTransform.ORIGINAL_ICU_PACKAGE , Icu4jTransform.ANDROID_ICU_PACKAGE ) ) ) ; transformRules.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.android.icu4j.srcgen.TranslateJcite.BeginEndTagsHandler ( ) ) ) ; return transformRules ; }

Target:
private static java.util.List < com.google.currysrc.api.process.Rule > createTransformRules ( ) { java.util.List < com.google.currysrc.api.process.Rule > rules = com.google.common.collect.Lists.newArrayList ( Icu4jTransform.Icu4jRules.getRepackagingRules ( ) ) ; rules.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.processors.ReplaceTextCommentScanner ( Icu4jTransform.ORIGINAL_ICU_PACKAGE , Icu4jTransform.ANDROID_ICU_PACKAGE ) ) ) ; rules.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.android.icu4j.srcgen.TranslateJcite.BeginEndTagsHandler ( ) ) ) ; return rules ; }
Source:
private void updateCurrentCheckboxTree ( com.google.common.base.Function < com.intellij.ui.CheckedTreeNode , java.lang.Void > updateFunction ) { com.google.gct.testing.dimension.GoogleCloudTestingDimension selectedDimension = getSelectedDimension ( ) ; com.intellij.ui.CheckboxTree currentCheckboxTree = treeMap.get ( selectedDimension ) ; com.intellij.ui.CheckedTreeNode rootNode = ( ( com.intellij.ui.CheckedTreeNode ) ( currentCheckboxTree.getModel ( ) . getRoot ( ) ) ) ; updateNode ( rootNode , updateFunction ) ; updateUI ( currentCheckboxTree ) ; selectedDimension.dimensionChanged ( ) ; updateConfigurationCountLabel ( ) ; list.updateUI ( ) ; }

Target:
private void updateCurrentCheckboxTree ( com.google.common.base.Function < com.intellij.ui.CheckedTreeNode , java.lang.Void > updateFunction ) { com.google.gct.testing.dimension.CloudConfigurationDimension selectedDimension = getSelectedDimension ( ) ; com.intellij.ui.CheckboxTree currentCheckboxTree = treeMap.get ( selectedDimension ) ; com.intellij.ui.CheckedTreeNode rootNode = ( ( com.intellij.ui.CheckedTreeNode ) ( currentCheckboxTree.getModel ( ) . getRoot ( ) ) ) ; updateNode ( rootNode , updateFunction ) ; updateUI ( currentCheckboxTree ) ; selectedDimension.dimensionChanged ( ) ; updateConfigurationCountLabel ( ) ; list.updateUI ( ) ; }
Source:
public static < T > void assertThat ( java.lang.String reason , T actual , org.hamcrest.Matcher < T > matcher ) { if ( ! ( matcher.matches ( actual ) ) ) { org.hamcrest.Description description = new org.hamcrest.StringDescription ( ) ; description.appendText ( reason ) ; description.appendText ( "\nExpected: " ) ; description.appendDescriptionOf ( matcher ) ; description.appendText ( "\n got: " ) ; description.appendValue ( actual ) ; description.appendText ( "\n" ) ; throw new java.lang.AssertionError ( description.toString ( ) ) ; } }

Target:
public static void assertEquals ( float expected , float actual , float delta ) { org.junit.Assert.assertEquals ( null , expected , actual , delta ) ; }
Source:
private org.eclipse.swt.graphics.RGB renderDrawableResource ( java.lang.String themeItemName ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart editor = mPalette.getEditor ( ) ; java.awt.image.BufferedImage image = editor.renderThemeItem ( themeItemName , 100 , 100 ) ; if ( image != null ) { int rgb = image.getRGB ( ( ( image.getWidth ( ) ) / 2 ) , ( ( image.getHeight ( ) ) / 2 ) ) ; return com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.intToRgb ( rgb ) ; } return null ; }

Target:
private org.eclipse.swt.graphics.RGB renderDrawableResource ( java.lang.String themeItemName ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart editor = mPalette.getEditor ( ) ; java.awt.image.BufferedImage image = com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.create ( editor ) . setSize ( 100 , 100 ) . renderThemeItem ( themeItemName ) ; if ( image != null ) { int rgb = image.getRGB ( ( ( image.getWidth ( ) ) / 2 ) , ( ( image.getHeight ( ) ) / 2 ) ) ; return com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.intToRgb ( rgb ) ; } return null ; }
Source:
java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hearingaid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return new java.util.ArrayList < > ( ) ; }

Target:
java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hearingaid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { java.util.List < android.bluetooth.BluetoothDevice > devices = new java.util.ArrayList < > ( ) ; for ( com.android.bluetooth.hearingaid.HearingAidStateMachine sm : mStateMachines.values ( ) ) { if ( sm.isConnected ( ) ) { devices.add ( sm.getDevice ( ) ) ; } } return devices ; } }
Source:
public void testAnimation ( ) throws java.lang.Throwable { final android.view.View view = mActivity.findViewById ( R.id.fit_windows ) ; view.setAnimation ( null ) ; assertNull ( view.getAnimation ( ) ) ; view.setAnimation ( mAnimation ) ; runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { view.invalidate ( ) ; } } ) ; android.view.animation.cts.AnimationTestUtils.assertRunAnimation ( getInstrumentation ( ) , view , mAnimation , android.view.cts.View_AnimationTest.TIME_OUT ) ; }

Target:
public void testAnimation ( ) throws java.lang.Throwable { final android.view.View view = mActivity.findViewById ( R.id.mock_view ) ; view.setAnimation ( null ) ; assertNull ( view.getAnimation ( ) ) ; view.setAnimation ( mAnimation ) ; runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { view.invalidate ( ) ; } } ) ; android.view.animation.cts.AnimationTestUtils.assertRunAnimation ( getInstrumentation ( ) , view , mAnimation , android.view.cts.View_AnimationTest.TIME_OUT ) ; }
Source:
private void show ( int id ) { android.widget.TextView tv = new android.widget.TextView ( this ) ; tv.setPadding ( 10 , 10 , 10 , 30 ) ; tv.setText ( id ) ; mInstructions.addView ( tv ) ; }

Target:
private void show ( int id ) { android.widget.TextView tv = new android.widget.TextView ( this ) ; tv.setPadding ( 10 , 10 , 10 , 30 ) ; tv.setText ( id ) ; mInstructions.removeAllViews ( ) ; mInstructions.addView ( tv ) ; }
Source:
public boolean canConference ( ) { android.util.Log.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "canConference: not possible in CDMA" ) ; return false ; }

Target:
public boolean handlePinMmi ( java.lang.String dialString ) { com.android.internal.telephony.cdma.CdmaMmiCode mmi = com.android.internal.telephony.cdma.CdmaMmiCode.newFromDialString ( dialString , this ) ; if ( mmi == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "Mmi is NULL!" ) ; return false ; } else if ( mmi.isPukCommand ( ) ) { mPendingMmis.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.processCode ( ) ; return true ; } android.telephony.Rlog.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "Unrecognized mmi!" ) ; return false ; }
Source:
public void testV1SignedAttrs ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerified ( verify ( "v1-only-with-signed-attrs.apk" ) ) ; }

Target:
public void testV1SignedAttrs ( ) throws java.lang.Exception { java.lang.String apk = "v1-only-with-signed-attrs.apk" ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMinSdkVersion ( apk , AndroidSdkVersion.JELLY_BEAN_MR2 ) , Issue.JAR_SIG_VERIFY_EXCEPTION ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( apk , AndroidSdkVersion.KITKAT ) ) ; apk = "v1-only-with-signed-attrs-signerInfo1-good-signerInfo2-good.apk" ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMinSdkVersion ( apk , AndroidSdkVersion.JELLY_BEAN_MR2 ) , Issue.JAR_SIG_VERIFY_EXCEPTION ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( apk , AndroidSdkVersion.KITKAT ) ) ; }
Source:
public void testLegacyForegroundAppAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mMockApplInfo.targetSdkVersion = Build.VERSION_CODES.GINGERBREAD ; mPkgNameOfTopActivity = com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testLegacyForegroundAppAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mMockApplInfo.targetSdkVersion = Build.VERSION_CODES.GINGERBREAD ; mPkgNameOfTopActivity = com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScorerAppManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
public static < R , C , V > com.google.common.collect.HashBasedTable < R , C , V > create ( int expectedRows , int expectedCellsPerRow ) { com.google.common.base.Preconditions.checkArgument ( ( expectedCellsPerRow >= 0 ) ) ; java.util.Map < R , java.util.Map < C , V > > backingMap = com.google.common.collect.Maps.newHashMapWithExpectedSize ( expectedRows ) ; return new com.google.common.collect.HashBasedTable < R , C , V > ( backingMap , new com.google.common.collect.HashBasedTable.Factory < C , V > ( expectedCellsPerRow ) ) ; }

Target:
public static < R , C , V > com.google.common.collect.HashBasedTable < R , C , V > create ( int expectedRows , int expectedCellsPerRow ) { com.google.common.collect.CollectPreconditions.checkNonnegative ( expectedCellsPerRow , "expectedCellsPerRow" ) ; java.util.Map < R , java.util.Map < C , V > > backingMap = com.google.common.collect.Maps.newHashMapWithExpectedSize ( expectedRows ) ; return new com.google.common.collect.HashBasedTable < R , C , V > ( backingMap , new com.google.common.collect.HashBasedTable.Factory < C , V > ( expectedCellsPerRow ) ) ; }
Source:
private static java.lang.String [ ] getDhcpRanges ( android.content.Context ctx ) { final java.lang.String [ ] fromResource = com.android.server.connectivity.tethering.TetheringConfiguration.getResourceStringArray ( ctx , com.android.internal.R.array.config_tether_dhcp_range ) ; if ( ( ( fromResource.length ) > 0 ) && ( ( ( fromResource.length ) % 2 ) == 0 ) ) { return fromResource ; } return com.android.server.connectivity.tethering.TetheringConfiguration.copy ( com.android.server.connectivity.tethering.TetheringConfiguration.DHCP_DEFAULT_RANGE ) ; }

Target:
private static java.lang.String [ ] getDhcpRanges ( android.content.Context ctx ) { final java.lang.String [ ] fromResource = ctx.getResources ( ) . getStringArray ( com.android.internal.R.array.config_tether_dhcp_range ) ; if ( ( ( fromResource.length ) > 0 ) && ( ( ( fromResource.length ) % 2 ) == 0 ) ) { return fromResource ; } return com.android.server.connectivity.tethering.TetheringConfiguration.copy ( com.android.server.connectivity.tethering.TetheringConfiguration.DHCP_DEFAULT_RANGE ) ; }
Source:
private void enqueue ( java.lang.ref.Reference < ? > list ) { while ( list != null ) { java.lang.ref.Reference < ? > reference ; if ( list == ( list.pendingNext ) ) { reference = list ; reference.pendingNext = null ; list = null ; } else { reference = list.pendingNext ; list.pendingNext = reference.pendingNext ; reference.pendingNext = null ; } reference.enqueueInternal ( ) ; } }

Target:
private void enqueue ( java.lang.ref.Reference < ? > list ) { java.lang.ref.Reference < ? > start = list ; do { java.lang.ref.Reference < ? > next = list.pendingNext ; list.pendingNext = null ; list.enqueueInternal ( ) ; list = next ; } while ( list != start ) ; }
Source:
private com.android.jill.frontend.java.Variable getVariableWithLocalIndex ( @ javax.annotation.Nonnegative int localIdx , @ javax.annotation.Nonnull java.lang.String id , @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull org.objectweb.asm.Type type , @ javax.annotation.CheckForNull java.lang.String signature ) { com.android.jill.frontend.java.Variable var = nameToVar.get ( id ) ; if ( var == null ) { var = new com.android.jill.frontend.java.Variable ( id , name , type , signature , localIdx ) ; nameToVar.put ( id , var ) ; } return var ; }

Target:
private com.android.jill.frontend.java.Variable getVariableWithLocalIndex ( @ javax.annotation.Nonnegative int localIdx , @ javax.annotation.Nonnull java.lang.String id , @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull org.objectweb.asm.Type type , @ javax.annotation.CheckForNull java.lang.String signature ) { com.android.jill.frontend.java.Variable var = nameToVar.get ( id ) ; if ( var == null ) { var = new com.android.jill.frontend.java.Variable ( id , name , type , signature , localIdx , ( ( getLocalVariableNode ( localIdx ) ) == null ) ) ; nameToVar.put ( id , var ) ; } return var ; }
Source:
public void sendSingleScanAllChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( channelsToSpec ( 2400 , 2450 , 5150 , 5175 , 5600 , 5650 , 5660 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , true , 2400 , 5150 , 5175 ) ) ; }

Target:
public void sendSingleScanAllChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( com.android.server.wifi.ScanTestUtil.channelsToSpec ( 2400 , 2450 , 5150 , 5175 , 5600 , 5650 , 5660 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , com.android.server.wifi.ScanTestUtil.computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , true , 2400 , 5150 , 5175 ) ) ; }
Source:
public static void doTest ( art.Test1937.Transform t ) { t.sayHi ( ) ; art.Redefinition.doCommonClassRedefinition ( art.Test1937.Transform.class , art.Test1937.CLASS_BYTES , art.Test1937.DEX_BYTES ) ; try { t.sayHi ( ) ; } catch ( java.lang.Throwable e ) { java.lang.System.out.println ( ( ( ( "Caught exception " + ( e.getClass ( ) . getName ( ) ) ) + ": " ) + ( e.getMessage ( ) ) ) ) ; } }

Target:
public static void doTest ( art.Test1937.Transform t ) { t.sayHi ( ) ; art.Redefinition.doCommonClassRedefinition ( art.Test1937.Transform.class , art.Test1937.CLASS_BYTES , art.Test1937.DEX_BYTES ) ; try { t.sayHi ( ) ; } catch ( java.lang.Throwable e ) { java.lang.System.out.println ( ( "Caught exception " + ( e.getClass ( ) . getName ( ) ) ) ) ; if ( art.Test1937.PRINT_MESSAGE ) { java.lang.System.out.println ( ( "Message: " + ( e.getMessage ( ) ) ) ) ; } } }
Source:
public void releaseIfUnreferencedRecursively ( ) throws android.os.RemoteException { if ( ( mRefCount ) > 0 ) { return ; } else if ( ( mRefCount ) < 0 ) { throw new java.lang.IllegalStateException ( "Invalid operation - resource has already been released." ) ; } mResource.releaseKernelResources ( ) ; for ( com.android.server.IpSecService.RefcountedResource < ? extends com.android.server.IpSecService.IResource > child : mChildren ) { ( child.mRefCount ) -- ; child.releaseIfUnreferencedRecursively ( ) ; } ( mRefCount ) -- ; }

Target:
public void releaseReference ( ) throws android.os.RemoteException { ( mRefCount ) -- ; if ( ( mRefCount ) > 0 ) { return ; } else if ( ( mRefCount ) < 0 ) { throw new java.lang.IllegalStateException ( "Invalid operation - resource has already been released." ) ; } mResource.freeUnderlyingResources ( ) ; for ( com.android.server.IpSecService.RefcountedResource < ? extends com.android.server.IpSecService.IResource > child : mChildren ) { child.releaseReference ( ) ; } ( mRefCount ) -- ; }
Source:
public void onCreateButtonActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.SeriesDeletionFragment.ACTION_ID_DELETE ) . title ( getString ( R.string.dvr_detail_delete ) ) . build ( ) ) ; actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . clickAction ( GuidedAction.ACTION_ID_CANCEL ) . build ( ) ) ; }

Target:
public void onCreateButtonActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.DvrSeriesDeletionFragment.ACTION_ID_DELETE ) . title ( getString ( R.string.dvr_detail_delete ) ) . build ( ) ) ; actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . clickAction ( GuidedAction.ACTION_ID_CANCEL ) . build ( ) ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID ) ; }
Source:
public void testStartCallWithSpeakerphoneNotProvided_SpeakerphoneOffByDefault ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } android.media.AudioManager am = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; int expectedRoute = ( am.isWiredHeadsetOn ( ) ) ? android.telecom.CallAudioState.ROUTE_WIRED_HEADSET : android.telecom.CallAudioState.ROUTE_EARPIECE ; placeAndVerifyCall ( ) ; verifyConnectionForOutgoingCall ( ) ; assertAudioRoute ( mInCallCallbacks.getService ( ) , expectedRoute ) ; }

Target:
public void testStartCallWithSpeakerphoneNotProvided_SpeakerphoneOffByDefault ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } android.media.AudioManager am = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; placeAndVerifyCall ( ) ; verifyConnectionForOutgoingCall ( ) ; assertNotAudioRoute ( mInCallCallbacks.getService ( ) , CallAudioState.ROUTE_SPEAKER ) ; }
Source:
public void stopLoading ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { stopLoading ( ) ; } } ) ; return ; } mAwContents.stopLoading ( ) ; }

Target:
public void saveWebArchive ( final java.lang.String basename , final boolean autoname , final android.webkit.ValueCallback < java.lang.String > callback ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { saveWebArchive ( basename , autoname , callback ) ; } } ) ; return ; } mAwContents.saveWebArchive ( basename , autoname , callback ) ; }
Source:
public void test2 ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "res/values-cs/plurals3.xml:3: Error: For locale \"cs\" (Czech) the following quantities should also be defined: few, many [MissingQuantity]\n" + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:3: Warning: For language \"zh\" (Chinese) the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:7: Warning: For language \"zh\" (Chinese) the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"title_day_dialog_content\">\n" ) + " ^\n" ) + "1 errors, 2 warnings\n" ) ) , lintProject ( "res/values-zh-rCN/plurals3.xml" , "res/values-cs/plurals3.xml" ) ) ; }

Target:
public void test2 ( ) throws java.lang.Exception { mEnabled = com.google.common.collect.Sets.newHashSet ( PluralsDetector.MISSING , PluralsDetector.EXTRA ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "res/values-cs/plurals3.xml:3: Error: For locale \"cs\" (Czech) the following quantities should also be defined: few [MissingQuantity]\n" + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:3: Warning: For language \"zh\" (Chinese) the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:7: Warning: For language \"zh\" (Chinese) the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"title_day_dialog_content\">\n" ) + " ^\n" ) + "1 errors, 2 warnings\n" ) ) , lintProject ( "res/values-zh-rCN/plurals3.xml" , "res/values-cs/plurals3.xml" ) ) ; }
Source:
private static android.net.NetworkState buildMobile4gState ( java.lang.String iface ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_WIMAX , 0 , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( iface ) ; return new android.net.NetworkState ( info , prop , null , null , null , null ) ; }

Target:
private static android.net.NetworkState buildMobile4gState ( java.lang.String iface ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_WIMAX , 0 , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( iface ) ; final android.net.NetworkCapabilities capabilities = new android.net.NetworkCapabilities ( ) ; return new android.net.NetworkState ( info , prop , capabilities , null , null , null ) ; }
Source:
public boolean gattClientRequestLeConnectionParameters ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "index" ) java.lang.Integer index , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "minConnectionInterval" ) java.lang.Integer minConnectionInterval , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "maxConnectionInterval" ) java.lang.Integer maxConnectionInterval , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "slaveLatency" ) java.lang.Integer slaveLatency , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "supervisionTimeout" ) java.lang.Integer supervisionTimeout ) throws java.lang.Exception { boolean result = false ; if ( ( mBluetoothGattList.get ( index ) ) != null ) { result = mBluetoothGattList.get ( index ) . requestLeConnectionUpdate ( minConnectionInterval , maxConnectionInterval , slaveLatency , supervisionTimeout ) ; } else { throw new java.lang.Exception ( ( "Invalid index input:" + index ) ) ; } return result ; }

Target:
public boolean gattClientRequestLeConnectionParameters ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "index" ) java.lang.Integer index , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "minConnectionInterval" ) java.lang.Integer minConnectionInterval , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "maxConnectionInterval" ) java.lang.Integer maxConnectionInterval , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "slaveLatency" ) java.lang.Integer slaveLatency , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "supervisionTimeout" ) java.lang.Integer supervisionTimeout , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "minConnectionEventLen" ) java.lang.Integer minConnectionEventLen , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "maxConnectionEventLen" ) java.lang.Integer maxConnectionEventLen ) throws java.lang.Exception { boolean result = false ; if ( ( mBluetoothGattList.get ( index ) ) != null ) { result = mBluetoothGattList.get ( index ) . requestLeConnectionUpdate ( minConnectionInterval , maxConnectionInterval , slaveLatency , supervisionTimeout , minConnectionEventLen , maxConnectionEventLen ) ; } else { throw new java.lang.Exception ( ( "Invalid index input:" + index ) ) ; } return result ; }
Source:
public static com.android.dialer.contactactions.IntentModule newVideoCallModule ( android.content.Context context , java.lang.String number , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle phoneAccountHandle , com.android.dialer.callintent.CallInitiationType.Type initiationType ) { return new com.android.dialer.contactactions.IntentModule ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , initiationType ) . setPhoneAccountHandle ( phoneAccountHandle ) . setIsVideoCall ( true ) . build ( ) , R.string.video_call , R.drawable.quantum_ic_videocam_white_24 ) ; }

Target:
public static com.android.dialer.contactactions.IntentModule newVideoCallModule ( android.content.Context context , java.lang.String number , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle phoneAccountHandle , com.android.dialer.callintent.CallInitiationType.Type initiationType ) { return new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.precall.PreCall.getIntent ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , initiationType ) . setPhoneAccountHandle ( phoneAccountHandle ) . setIsVideoCall ( true ) ) , R.string.video_call , R.drawable.quantum_ic_videocam_white_24 ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassLiteral literal ) { com.android.jack.dx.rop.cst.Constant cst = com.android.jack.backend.dex.rop.RopHelper.getCstType ( literal.getRefType ( ) ) ; com.android.jack.ir.ast.JType type = literal.getType ( ) ; com.android.jack.dx.rop.code.Rop constOp = com.android.jack.dx.rop.code.Rops.opConst ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( type ) ) ; com.android.jack.dx.rop.code.Insn constInst = new com.android.jack.dx.rop.code.PlainCstInsn ( constOp , com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( literal ) , destReg , com.android.jack.dx.rop.code.RegisterSpecList.EMPTY , cst ) ; addInstruction ( constInst ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassLiteral literal ) { com.android.jack.dx.rop.cst.Constant cst = com.android.jack.backend.dex.rop.RopHelper.getCstType ( literal.getRefType ( ) ) ; com.android.jack.ir.ast.JType type = literal.getType ( ) ; com.android.jack.dx.rop.code.Rop constOp = com.android.jack.dx.rop.code.Rops.opConst ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( type ) ) ; com.android.jack.dx.rop.code.SourcePosition literalSrcPos = com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( literal ) ; com.android.jack.dx.rop.code.Insn constInst = new com.android.jack.dx.rop.code.ThrowingCstInsn ( constOp , literalSrcPos , com.android.jack.dx.rop.code.RegisterSpecList.EMPTY , getCatchTypes ( ) , cst ) ; addInstruction ( constInst ) ; addMoveResultPseudoAsExtraInstruction ( destReg , literalSrcPos ) ; return false ; }
Source:
final void getUnchecked ( int pos , int [ ] dst , int dstOffset , int length ) { libcore.io.Memory.peekIntArray ( ix ( pos ) , dst , dstOffset , length , ( ! ( nativeByteOrder ) ) ) ; }

Target:
final void getUnchecked ( int pos , int [ ] dst , int dstOffset , int length ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } libcore.io.Memory.peekIntArray ( ix ( pos ) , dst , dstOffset , length , ( ! ( nativeByteOrder ) ) ) ; }
Source:
public java.lang.String getDeviceSoftwareVersionForSlot ( int slotId , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getDeviceSoftwareVersionForSlot" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( slotId ) ; return phone == null ? null : phone.getDeviceSvn ( ) ; }

Target:
public java.lang.String getDeviceSoftwareVersionForSlot ( int slotIndex , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getDeviceSoftwareVersionForSlot" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( slotIndex ) ; return phone == null ? null : phone.getDeviceSvn ( ) ; }
Source:
public java.lang.String getMainDexList ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( java.lang.String classDescriptor : toKeep ) { sb.append ( classDescriptor ) ; sb.append ( com.android.multidex.ClassReferenceListBuilder.CLASS_EXTENSION ) ; sb.append ( com.android.multidex.ClassReferenceListBuilder.EOL ) ; } return sb.toString ( ) ; }

Target:
public java.util.Set < java.lang.String > getMainDexList ( ) { java.util.Set < java.lang.String > resultSet = new java.util.HashSet < java.lang.String > ( toKeep.size ( ) ) ; for ( java.lang.String classDescriptor : toKeep ) { resultSet.add ( ( classDescriptor + ( com.android.multidex.ClassReferenceListBuilder.CLASS_EXTENSION ) ) ) ; } return resultSet ; }