auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.v ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "onReceive" ) ; java.lang.String action = intent.getAction ( ) ; if ( action.equals ( BluetoothDevice.ACTION_ACL_CONNECTED ) ) { android.bluetooth.BluetoothDevice device = intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ; if ( ( getPriority ( device ) ) >= ( android.bluetooth.BluetoothProfile.PRIORITY_ON ) ) { connect ( device ) ; } } else if ( action.equals ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ) { android.bluetooth.BluetoothDevice device = intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ; disconnect ( device ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.v ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "onReceive" ) ; java.lang.String action = intent.getAction ( ) ; if ( action.equals ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ) { android.bluetooth.BluetoothDevice device = intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ; disconnect ( device ) ; } }
Source:
private void queryNewDeviceForMountingPoint ( final com.android.ddmlib.Device device , final java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { device.executeShellCommand ( ( "echo $" + name ) , new com.android.ddmlib.MultiLineReceiver ( ) { @ java.lang.Override public boolean isCancelled ( ) { return false ; } @ java.lang.Override public void processNewLines ( java.lang.String [ ] lines ) { for ( java.lang.String line : lines ) { if ( ! ( line.isEmpty ( ) ) ) { device.setMountingPoint ( name , line ) ; } } } } ) ; }

Target:
private static void queryNewDeviceForMountingPoint ( @ com.android.annotations.NonNull final com.android.ddmlib.Device device , @ com.android.annotations.NonNull final java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { device.executeShellCommand ( ( "echo $" + name ) , new com.android.ddmlib.MultiLineReceiver ( ) { @ java.lang.Override public boolean isCancelled ( ) { return false ; } @ java.lang.Override public void processNewLines ( java.lang.String [ ] lines ) { for ( java.lang.String line : lines ) { if ( ! ( line.isEmpty ( ) ) ) { device.setMountingPoint ( name , line ) ; } } } } ) ; }
Source:
public void addMatrix ( android.support.v8.renderscript.Matrix2f v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addMatrix ( new android.support.v8.renderscript.Matrix2f ( v.getArray ( ) ) ) ; return ; } for ( int i = 0 ; i < ( v.mMat.length ) ; i ++ ) { addF32 ( v.mMat [ i ] ) ; } }

Target:
public void addMatrix ( android.support.v8.renderscript.Matrix2f v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addMatrix ( v ) ; return ; } for ( int i = 0 ; i < ( v.mMat.length ) ; i ++ ) { addF32 ( v.mMat [ i ] ) ; } }
Source:
public void testNotifySecondary ( ) { java.util.List < java.lang.String > fooSecondaries = mFooUser0.getSecondaryDexPaths ( ) ; notifyDexLoad ( mFooUser0 , fooSecondaries , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mFooUser0 ) ; org.junit.Assert.assertNotNull ( pui ) ; org.junit.Assert.assertFalse ( pui.isUsedByOtherApps ( ) ) ; org.junit.Assert.assertEquals ( fooSecondaries.size ( ) , pui.getDexUseInfoMap ( ) . size ( ) ) ; assertSecondaryUse ( mFooUser0 , pui , fooSecondaries , false , mUser0 ) ; }

Target:
public void testNotifySecondary ( ) { java.util.List < java.lang.String > fooSecondaries = mFooUser0.getSecondaryDexPaths ( ) ; notifyDexLoad ( mFooUser0 , fooSecondaries , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mFooUser0 ) ; org.junit.Assert.assertFalse ( pui.isUsedByOtherApps ( ) ) ; org.junit.Assert.assertEquals ( fooSecondaries.size ( ) , pui.getDexUseInfoMap ( ) . size ( ) ) ; assertSecondaryUse ( mFooUser0 , pui , fooSecondaries , false , mUser0 ) ; }
Source:
public void sendSetAddress ( java.lang.String id ) throws java.lang.Exception { for ( com.android.internal.telecom.IConnectionServiceAdapter a : mConnectionServiceAdapters ) { a.setAddress ( id , mConnectionById.get ( id ) . request.getAddress ( ) , mConnectionById.get ( id ) . addressPresentation ) ; } }

Target:
public void sendSetAddress ( java.lang.String id ) throws java.lang.Exception { for ( com.android.internal.telecom.IConnectionServiceAdapter a : mConnectionServiceAdapters ) { a.setAddress ( id , mConnectionById.get ( id ) . request.getAddress ( ) , mConnectionById.get ( id ) . addressPresentation , null ) ; } }
Source:
private void testChargingConstraintFails_notCharging ( ) { mTestEnvironment.setUp ( ) ; mTestEnvironment.setExpectedExecutions ( 0 ) ; android.app.job.JobInfo runOnCharge = new android.app.job.JobInfo.Builder ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , mMockComponent ) . setRequiresCharging ( true ) . build ( ) ; mJobScheduler.schedule ( runOnCharge ) ; sendBroadcastAndBlockForResult ( com.android.cts.verifier.jobscheduler.EXPEDITE_STABLE_CHARGING ) ; boolean testPassed ; try { testPassed = mTestEnvironment.awaitTimeout ( ) ; } catch ( java.lang.InterruptedException e ) { testPassed = false ; } mDeviceUnpluggedTestPassed = testPassed ; runOnUiThread ( new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ChargingConstraintTestResultRunner ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , testPassed ) ) ; }

Target:
private void testChargingConstraintFails_notCharging ( ) { mTestEnvironment.setUp ( ) ; mTestEnvironment.setExpectedExecutions ( 0 ) ; android.app.job.JobInfo runOnCharge = new android.app.job.JobInfo.Builder ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , mMockComponent ) . setRequiresCharging ( true ) . build ( ) ; mJobScheduler.schedule ( runOnCharge ) ; boolean testPassed ; try { testPassed = mTestEnvironment.awaitTimeout ( ) ; } catch ( java.lang.InterruptedException e ) { testPassed = false ; } runOnUiThread ( new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ChargingConstraintTestResultRunner ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , testPassed ) ) ; }
Source:
void stopAllLoading ( ) { for ( com.android.browser.Tab t : mTabs ) { final android.webkit.WebView webview = t.getWebView ( ) ; if ( webview != null ) { webview.stopLoading ( ) ; } final android.webkit.WebView subview = t.getSubWebView ( ) ; if ( subview != null ) { webview.stopLoading ( ) ; } } }

Target:
void stopAllLoading ( ) { for ( com.android.browser.Tab t : mTabs ) { final android.webkit.WebView webview = t.getWebView ( ) ; if ( webview != null ) { webview.stopLoading ( ) ; } final android.webkit.WebView subview = t.getSubWebView ( ) ; if ( subview != null ) { subview.stopLoading ( ) ; } } }
Source:
public static com.android.dialer.app.calllog.PhoneCallDetailsViews createForTest ( android.content.Context context ) { return new com.android.dialer.app.calllog.PhoneCallDetailsViews ( new android.widget.TextView ( context ) , new android.view.View ( context ) , new com.android.dialer.calllogutils.CallTypeIconsView ( context ) , new android.widget.TextView ( context ) , new android.view.View ( context ) , new android.widget.TextView ( context ) , new android.widget.TextView ( context ) , new android.widget.TextView ( context ) ) ; }

Target:
public static com.android.dialer.app.calllog.PhoneCallDetailsViews createForTest ( android.content.Context context ) { return new com.android.dialer.app.calllog.PhoneCallDetailsViews ( new android.widget.TextView ( context ) , new android.view.View ( context ) , new com.android.dialer.calllogutils.CallTypeIconsView ( context ) , new android.widget.TextView ( context ) , new android.view.View ( context ) , new android.widget.TextView ( context ) , new android.widget.TextView ( context ) , new android.view.View ( context ) , new android.widget.TextView ( context ) ) ; }
Source:
public void testGetSuperclass ( ) { assertEquals ( java.lang.Object.class , dalvik.system.JniTest.envGetSuperclass ( java.lang.String.class ) ) ; assertEquals ( null , dalvik.system.JniTest.envGetSuperclass ( java.lang.Object.class ) ) ; assertEquals ( null , dalvik.system.JniTest.envGetSuperclass ( int . class ) ) ; assertEquals ( java.lang.Object.class , dalvik.system.JniTest.envGetSuperclass ( java.lang.Runnable.class ) ) ; }

Target:
public void testGetSuperclass ( ) { assertEquals ( java.lang.Object.class , dalvik.system.JniTest.envGetSuperclass ( java.lang.String.class ) ) ; assertEquals ( null , dalvik.system.JniTest.envGetSuperclass ( java.lang.Object.class ) ) ; assertEquals ( null , dalvik.system.JniTest.envGetSuperclass ( int . class ) ) ; assertEquals ( null , dalvik.system.JniTest.envGetSuperclass ( java.lang.Runnable.class ) ) ; }
Source:
public void testCallGetDisplayName ( ) { org.eclipse.core.resources.IProject projectMock = org.easymock.EasyMock.createMock ( org.eclipse.core.resources.IProject.class ) ; org.easymock.EasyMock.expect ( projectMock.findMember ( RulesEngine.FD_GSCRIPTS ) ) . andReturn ( null ) ; org.easymock.EasyMock.expect ( projectMock.getName ( ) ) . andReturn ( "unit-test" ) ; org.easymock.EasyMock.replay ( projectMock ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine r = new com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine ( projectMock ) ; com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ved = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( "view" , com.android.sdklib.SdkConstants.CLASS_VIEW ) ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode uiv = new com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ( ved ) ; }

Target:
public void testCallGetDisplayName ( ) { }
Source:
static org.eclipse.swt.dnd.DragSource createDragSource ( org.eclipse.swt.widgets.Control control , org.eclipse.swt.dnd.DragSourceListener dragSourceListener ) { org.eclipse.swt.dnd.DragSource source = new org.eclipse.swt.dnd.DragSource ( control , ( ( org.eclipse.swt.dnd.DND.DROP_COPY ) | ( org.eclipse.swt.dnd.DND.DROP_MOVE ) ) ) ; source.setTransfer ( new org.eclipse.swt.dnd.Transfer [ ] { org.eclipse.swt.dnd.TextTransfer.getInstance ( ) , com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleXmlTransfer.getInstance ( ) } ) ; source.addDragListener ( dragSourceListener ) ; return source ; }

Target:
static org.eclipse.swt.dnd.DragSource createDragSource ( org.eclipse.swt.widgets.Control control ) { org.eclipse.swt.dnd.DragSource source = new org.eclipse.swt.dnd.DragSource ( control , ( ( org.eclipse.swt.dnd.DND.DROP_COPY ) | ( org.eclipse.swt.dnd.DND.DROP_MOVE ) ) ) ; source.setTransfer ( new org.eclipse.swt.dnd.Transfer [ ] { org.eclipse.swt.dnd.TextTransfer.getInstance ( ) , com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleXmlTransfer.getInstance ( ) } ) ; return source ; }
Source:
private void updateUI ( ) { if ( ( mItem ) != null ) { mItem.result = result ; msgHandled = true ; try { mRSTC.refreshTestResults ( ) ; } catch ( java.lang.IllegalStateException e ) { } } }

Target:
private void updateUI ( ) { msgHandled = true ; if ( ( mItem ) != null ) { mItem.result = result ; if ( ( mRSTC ) != null ) { try { mRSTC.refreshTestResults ( ) ; } catch ( java.lang.IllegalStateException e ) { } } } }
Source:
public void onStarted ( android.preference.Preference preference , boolean reading ) { if ( DBG ) dumpState ( ) ; if ( DBG ) android.util.Log.d ( com.android.phone.TimeConsumingPreferenceActivity.LOG_TAG , ( ( ( "onStarted, preference=" + ( preference.getKey ( ) ) ) + ", reading=" ) + reading ) ) ; mBusyList.add ( preference.getKey ( ) ) ; if ( mIsForeground ) { if ( reading ) { showDialog ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_READING_DIALOG ) ; } else { showDialog ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_SAVING_DIALOG ) ; } } }

Target:
public void onStarted ( android.preference.Preference preference , boolean reading ) { if ( DBG ) dumpState ( ) ; android.util.Log.i ( com.android.phone.TimeConsumingPreferenceActivity.LOG_TAG , ( ( ( "onStarted, preference=" + ( preference.getKey ( ) ) ) + ", reading=" ) + reading ) ) ; mBusyList.add ( preference.getKey ( ) ) ; if ( mIsForeground ) { if ( reading ) { showDialog ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_READING_DIALOG ) ; } else { showDialog ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_SAVING_DIALOG ) ; } } }
Source:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String name = attribute.getValue ( ) ; for ( int i = 0 , n = name.length ( ) ; i < n ; i ++ ) { char c = name.charAt ( i ) ; if ( c == '﻿' ) { com.android.tools.lint.detector.api.Location location = context.getLocation ( attribute ) ; java.lang.String message = "Found byte-order-mark in the middle of a file" ; context.report ( com.android.tools.lint.checks.ByteOrderMarkDetector.BOM , null , location , message , null ) ; break ; } } }

Target:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String name = attribute.getValue ( ) ; for ( int i = 0 , n = name.length ( ) ; i < n ; i ++ ) { char c = name.charAt ( i ) ; if ( c == '﻿' ) { com.android.tools.lint.detector.api.Location location = context.getLocation ( attribute ) ; java.lang.String message = "Found byte-order-mark in the middle of a file" ; context.report ( com.android.tools.lint.checks.ByteOrderMarkDetector.BOM , null , location , message ) ; break ; } } }
Source:
public void testAssistantStackLaunchNewTaskWithDockedStack ( ) throws java.lang.Exception { if ( ( ! ( supportsSplitScreenMultiWindow ( ) ) ) || ( ! ( assistantRunsOnPrimaryDisplay ( ) ) ) ) return ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; launchActivityInDockStack ( android.server.cts.ActivityManagerAssistantStackTests.DOCKED_ACTIVITY ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; enableAssistant ( ) ; assertAssistantStackCanLaunchAndReturnFromNewTask ( ) ; disableAssistant ( ) ; }

Target:
public void testAssistantStackLaunchNewTaskWithDockedStack ( ) throws java.lang.Exception { if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) return ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; launchActivityInDockStack ( android.server.cts.ActivityManagerAssistantStackTests.DOCKED_ACTIVITY ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; enableAssistant ( ) ; assertAssistantStackCanLaunchAndReturnFromNewTask ( ) ; disableAssistant ( ) ; }
Source:
public boolean fetchUuidsWithSdp ( ) { android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ( isBluetoothEnabled ( ) ) == false ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot fetchUuidsWithSdp" ) ; return false ; } try { return service.fetchRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean fetchUuidsWithSdp ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ! ( isBluetoothEnabled ( ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot fetchUuidsWithSdp" ) ; return false ; } try { return service.fetchRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
private void maybeShowNotSpamDialog ( final java.lang.String number , final com.android.dialer.logging.ContactLookupResult.Type contactLookupResultType ) { if ( com.android.dialer.spam.SpamComponent.get ( this ) . spam ( ) . isDialogEnabledForSpamNotification ( ) ) { BlockReportSpamDialogs.ReportNotSpamDialogFragment.newInstance ( com.android.incallui.spam.SpamNotificationActivity.getFormattedNumber ( number ) , new com.android.dialer.blocking.BlockReportSpamDialogs.OnConfirmListener ( ) { @ java.lang.Override public void onClick ( ) { reportNotSpamAndFinish ( number , contactLookupResultType ) ; } } , dismissListener ) . show ( getFragmentManager ( ) , BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG ) ; } else { reportNotSpamAndFinish ( number , contactLookupResultType ) ; } }

Target:
private void maybeShowNotSpamDialog ( final java.lang.String number , final com.android.dialer.logging.ContactLookupResult.Type contactLookupResultType ) { if ( com.android.dialer.spam.SpamComponent.get ( this ) . spam ( ) . isDialogEnabledForSpamNotification ( ) ) { BlockReportSpamDialogs.ReportNotSpamDialogFragment.newInstance ( com.android.incallui.spam.SpamNotificationActivity.getFormattedNumber ( number , this ) , new com.android.dialer.blocking.BlockReportSpamDialogs.OnConfirmListener ( ) { @ java.lang.Override public void onClick ( ) { reportNotSpamAndFinish ( number , contactLookupResultType ) ; } } , dismissListener ) . show ( getFragmentManager ( ) , BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG ) ; } else { reportNotSpamAndFinish ( number , contactLookupResultType ) ; } }
Source:
public java.util.Collection < com.android.sched.marker.Marker > getAllMarkers ( ) { synchronized ( lock ) { if ( ( markers ) == null ) { return com.android.sched.marker.LocalMarkerManager.EMPTY_MARKER ; } } for ( com.android.sched.marker.Marker marker : markers.values ( ) ) { assert checkGetAccess ( marker.getClass ( ) ) ; } assert ( markers ) != null ; return markers.values ( ) ; }

Target:
public java.util.Collection < com.android.sched.marker.Marker > getAllMarkers ( ) { synchronized ( lock ) { if ( ( markers ) == null ) { return com.android.sched.marker.LocalMarkerManager.EMPTY_MARKER ; } for ( com.android.sched.marker.Marker marker : markers.values ( ) ) { assert checkGetAccess ( marker.getClass ( ) ) ; } assert ( markers ) != null ; return markers.values ( ) ; } }
Source:
public void testSingleSequentialUpdate ( ) throws java.lang.Exception { final long fileSize = com.android.cts.filesystemperf.FileUtil.getFileSizeExceedingMemory ( getContext ( ) , com.android.cts.filesystemperf.SequentialRWTest.BUFFER_SIZE ) ; if ( fileSize == 0 ) { return ; } final int NUMBER_REPETITION = 6 ; com.android.cts.filesystemperf.FileUtil.doSequentialUpdateTest ( getContext ( ) , com.android.cts.filesystemperf.SequentialRWTest.DIR_SEQ_UPDATE , getReportLog ( ) , fileSize , com.android.cts.filesystemperf.SequentialRWTest.BUFFER_SIZE , NUMBER_REPETITION ) ; }

Target:
public void testSingleSequentialUpdate ( ) throws java.lang.Exception { final long fileSize = com.android.cts.filesystemperf.FileUtil.getFileSizeExceedingMemory ( getContext ( ) , com.android.cts.filesystemperf.SequentialRWTest.BUFFER_SIZE ) ; if ( fileSize == 0 ) { return ; } final int NUMBER_REPETITION = 3 ; com.android.cts.filesystemperf.FileUtil.doSequentialUpdateTest ( getContext ( ) , com.android.cts.filesystemperf.SequentialRWTest.DIR_SEQ_UPDATE , getReportLog ( ) , fileSize , com.android.cts.filesystemperf.SequentialRWTest.BUFFER_SIZE , NUMBER_REPETITION ) ; }
Source:
public void testRegistrationConfigConstructorsEqual ( ) { android.telephony.ims.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.stub.ImsFeatureConfiguration ( new int [ ] { android.telephony.ims.feature.ImsFeature.FEATURE_MMTEL , android.telephony.ims.feature.ImsFeature.FEATURE_RCS } ) ; android.telephony.ims.stub.ImsFeatureConfiguration testConfig2 = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_RCS ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . build ( ) ; junit.framework.Assert.assertEquals ( testConfig , testConfig2 ) ; }

Target:
public void testRegistrationConfigConstructorsEqual ( ) { android.telephony.ims.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( 0 , ImsFeature.FEATURE_MMTEL ) . addFeature ( 0 , ImsFeature.FEATURE_RCS ) . build ( ) ; android.telephony.ims.stub.ImsFeatureConfiguration testConfig2 = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( 0 , ImsFeature.FEATURE_RCS ) . addFeature ( 0 , ImsFeature.FEATURE_MMTEL ) . build ( ) ; junit.framework.Assert.assertEquals ( testConfig , testConfig2 ) ; }
Source:
private void runTaskLock ( ) throws java.lang.Exception { java.lang.String taskIdStr = nextArgRequired ( ) ; try { if ( taskIdStr.equals ( "stop" ) ) { mAm.stopLockTaskMode ( ) ; } else { int taskId = java.lang.Integer.valueOf ( taskIdStr ) ; mAm.startLockTaskMode ( taskId ) ; } java.lang.System.err.println ( ( ( "Activity manager is " + ( mAm.isInLockTaskMode ( ) ? "" : "not " ) ) + "in lockTaskMode" ) ) ; } catch ( android.os.RemoteException e ) { } }

Target:
private void runTaskLock ( ) throws java.lang.Exception { java.lang.String taskIdStr = nextArgRequired ( ) ; try { if ( taskIdStr.equals ( "stop" ) ) { mAm.stopLockTaskMode ( ) ; } else { int taskId = java.lang.Integer.parseInt ( taskIdStr ) ; mAm.startLockTaskMode ( taskId ) ; } java.lang.System.err.println ( ( ( "Activity manager is " + ( mAm.isInLockTaskMode ( ) ? "" : "not " ) ) + "in lockTaskMode" ) ) ; } catch ( android.os.RemoteException e ) { } }
Source:
public void srcToLib ( @ javax.annotation.CheckForNull java.lang.String classpath , @ javax.annotation.Nonnull java.io.File out , boolean zipFiles , @ javax.annotation.Nonnull java.io.File ... sources ) throws java.lang.Exception { try { srcToCommon ( classpath , sources ) ; if ( zipFiles ) { jackOptions.setJayceOutputZip ( out ) ; } else { jackOptions.setJayceOutputDir ( out ) ; } java.lang.System.setOut ( outRedirectStream ) ; java.lang.System.setErr ( errRedirectStream ) ; com.android.jack.Jack.run ( jackOptions ) ; } finally { java.lang.System.setOut ( stdOut ) ; java.lang.System.setErr ( stdErr ) ; } }

Target:
public void srcToLib ( @ javax.annotation.Nonnull java.io.File out , boolean zipFiles , @ javax.annotation.Nonnull java.io.File ... sources ) throws java.lang.Exception { try { srcToCommon ( sources ) ; if ( zipFiles ) { jackOptions.setJayceOutputZip ( out ) ; } else { jackOptions.setJayceOutputDir ( out ) ; } java.lang.System.setOut ( outRedirectStream ) ; java.lang.System.setErr ( errRedirectStream ) ; com.android.jack.Jack.run ( jackOptions ) ; } finally { java.lang.System.setOut ( stdOut ) ; java.lang.System.setErr ( stdErr ) ; } }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.MethodDeclaration x , org.eclipse.jdt.internal.compiler.lookup.ClassScope scope ) { try { if ( x.isNative ( ) ) { processNativeMethod ( ) ; } else { java.util.List < com.android.jack.ir.ast.JStatement > statements = pop ( x.statements ) ; curMethod.body.getBlock ( ) . addStmts ( statements ) ; if ( ( ( x.bits ) & ( org.eclipse.jdt.internal.compiler.ast.ASTNode.NeedFreeReturn ) ) != 0 ) { generateImplicitReturn ( ) ; } } popMethodInfo ( ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.MethodDeclaration x , org.eclipse.jdt.internal.compiler.lookup.ClassScope scope ) { try { if ( x.isNative ( ) ) { processNativeMethod ( ) ; } else { java.util.List < com.android.jack.ir.ast.JStatement > statements = pop ( x.statements ) ; curMethod.body.getBlock ( ) . addStmts ( statements ) ; if ( ( ( x.bits ) & ( org.eclipse.jdt.internal.compiler.ast.ASTNode.NeedFreeReturn ) ) != 0 ) { generateImplicitReturn ( ) ; } } popMethodInfo ( ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public void testTransmitFollowupFail ( ) throws org.json.JSONException { final short transactionId = 5689 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "id" , transactionId ) ; args.putInt ( "reason" , WifiNanNative.NAN_STATUS_TX_FAIL ) ; com.android.server.wifi.nan.WifiNanHalMock.callTransmitFollowup ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onMessageSendFailNotification ( transactionId , WifiNanDiscoverySessionCallback.REASON_TX_FAIL ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testTransmitFollowupFail ( ) throws org.json.JSONException { final short transactionId = 5689 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "id" , transactionId ) ; args.putInt ( "reason" , WifiNanNative.NAN_STATUS_TX_FAIL ) ; com.android.server.wifi.nan.WifiNanHalMock.callTransmitFollowup ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onMessageSendFailNotification ( transactionId , WifiNanNative.NAN_STATUS_TX_FAIL ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }
Source:
private void updateIsVoiceMailNumber ( ) { if ( ( ( getHandle ( ) ) != null ) && ( PhoneAccount.SCHEME_VOICEMAIL.equals ( getHandle ( ) . getScheme ( ) ) ) ) { isVoicemailNumber = true ; } if ( ! ( com.android.dialer.util.PermissionsUtil.hasPermission ( context , permission.READ_PHONE_STATE ) ) ) { isVoicemailNumber = false ; } isVoicemailNumber = com.android.dialer.telecom.TelecomUtil.isVoicemailNumber ( context , getAccountHandle ( ) , getNumber ( ) ) ; }

Target:
private void updateIsVoiceMailNumber ( ) { if ( ( ( getHandle ( ) ) != null ) && ( PhoneAccount.SCHEME_VOICEMAIL.equals ( getHandle ( ) . getScheme ( ) ) ) ) { isVoicemailNumber = true ; return ; } if ( ! ( com.android.dialer.util.PermissionsUtil.hasPermission ( context , permission.READ_PHONE_STATE ) ) ) { isVoicemailNumber = false ; return ; } isVoicemailNumber = com.android.dialer.telecom.TelecomUtil.isVoicemailNumber ( context , getAccountHandle ( ) , getNumber ( ) ) ; }
Source:
protected < T > void sort ( java.util.Comparator < T > comparator ) { throwIfImmutable ( ) ; java.util.Arrays.< T > sort ( ( ( T [ ] ) ( arr ) ) , comparator ) ; setImmutable ( ) ; sorted = true ; }

Target:
protected < T > void sort ( java.util.Comparator < T > comparator ) { if ( ! ( sorted ) ) { throwIfImmutable ( ) ; java.util.Arrays.< T > sort ( ( ( T [ ] ) ( arr ) ) , comparator ) ; setImmutable ( ) ; sorted = true ; } }
Source:
public void sayHi ( java.lang.Runnable r ) { reporter.accept ( "Pre Start private method call" ) ; Start ( ) ; reporter.accept ( "Post Start private method call" ) ; Main.doCall ( r ) ; reporter.accept ( "Pre Finish private method call" ) ; Finish ( ) ; reporter.accept ( "Post Finish private method call" ) ; }

Target:
public void sayHi ( java.lang.Runnable r ) { reporter.accept ( "Pre Start private method call" ) ; Start ( ) ; reporter.accept ( "Post Start private method call" ) ; r.run ( ) ; reporter.accept ( "Pre Finish private method call" ) ; Finish ( ) ; reporter.accept ( "Post Finish private method call" ) ; }
Source:
private java.util.Set < com.android.jack.analysis.DefinitionMarker > getDefinitions ( @ javax.annotation.Nonnull java.util.List < com.android.jack.analysis.DefinitionMarker > definitions , @ javax.annotation.Nonnull java.util.BitSet in ) { java.util.Set < com.android.jack.analysis.DefinitionMarker > reachingDefs = new java.util.HashSet < com.android.jack.analysis.DefinitionMarker > ( ) ; for ( int i = in.nextSetBit ( 0 ) ; i >= 0 ; i = in.nextSetBit ( ( i + 1 ) ) ) { reachingDefs.add ( definitions.get ( i ) ) ; } return reachingDefs ; }

Target:
private java.util.List < com.android.jack.analysis.DefinitionMarker > getDefinitions ( @ javax.annotation.Nonnull java.util.List < com.android.jack.analysis.DefinitionMarker > definitions , @ javax.annotation.Nonnull java.util.BitSet in ) { java.util.List < com.android.jack.analysis.DefinitionMarker > reachingDefs = new java.util.ArrayList < com.android.jack.analysis.DefinitionMarker > ( ) ; for ( int i = in.nextSetBit ( 0 ) ; i >= 0 ; i = in.nextSetBit ( ( i + 1 ) ) ) { reachingDefs.add ( definitions.get ( i ) ) ; } return reachingDefs ; }
Source:
void output ( int num ) { synchronized ( CpuThread.mSyncable ) { int i ; int count ; count = CpuThread.mCount ; java.lang.System.out.print ( "going: " ) ; java.lang.System.out.println ( num ) ; for ( int j = 0 ; j < 5000 ; j ++ ) ; count ++ ; CpuThread.mCount = count ; } }

Target:
void output ( int num ) { int count = CpuThread.mCount ; java.lang.System.out.print ( "going: " ) ; java.lang.System.out.println ( num ) ; for ( int j = 0 ; j < 5000 ; j ++ ) { } count ++ ; CpuThread.mCount = count ; }
Source:
public android.webkit.WebViewProvider createWebView ( android.webkit.WebView webView , android.webkit.WebView.PrivateAccess privateAccess ) { com.android.webview.chromium.WebViewChromium wvc = new com.android.webview.chromium.WebViewChromium ( this , webView , privateAccess ) ; synchronized ( mLock ) { if ( ( mWebViewsToStart ) != null ) { mWebViewsToStart.add ( new java.lang.ref.WeakReference < com.android.webview.chromium.WebViewChromium > ( wvc ) ) ; } } com.android.webview.chromium.ResourceProvider.registerResources ( webView.getContext ( ) ) ; return wvc ; }

Target:
public android.webkit.WebViewProvider createWebView ( android.webkit.WebView webView , android.webkit.WebView.PrivateAccess privateAccess ) { com.android.webview.chromium.WebViewChromium wvc = new com.android.webview.chromium.WebViewChromium ( this , webView , privateAccess ) ; synchronized ( mLock ) { if ( ( mWebViewsToStart ) != null ) { mWebViewsToStart.add ( new java.lang.ref.WeakReference < com.android.webview.chromium.WebViewChromium > ( wvc ) ) ; } } return wvc ; }
Source:
public void stopScan ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { mWifiVendorHal.stopScan ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( ( com.android.server.wifi.WifiNative.sScanCmdId ) != 0 ) { com.android.server.wifi.WifiNative.stopScanNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sScanCmdId ) ; } com.android.server.wifi.WifiNative.sScanSettings = null ; com.android.server.wifi.WifiNative.sScanEventHandler = null ; com.android.server.wifi.WifiNative.sScanCmdId = 0 ; } } } }

Target:
public void stopScan ( ) { mWifiVendorHal.stopScan ( ) ; }
Source:
void tryToConfuseDoneTask ( jsr166.FutureTaskTest.PublicFutureTask pf ) { pf.set ( new java.lang.Object ( ) ) ; pf.setException ( new java.lang.Error ( ) ) ; for ( boolean mayInterruptIfRunning : new boolean [ ] { true , false } ) { pf.cancel ( true ) ; } }

Target:
void tryToConfuseDoneTask ( jsr166.FutureTaskTest.PublicFutureTask pf ) { pf.set ( new java.lang.Object ( ) ) ; pf.setException ( new java.lang.Error ( ) ) ; for ( boolean mayInterruptIfRunning : new boolean [ ] { true , false } ) { pf.cancel ( mayInterruptIfRunning ) ; } }
Source:
boolean canConnectToDevice ( android.bluetooth.BluetoothDevice device ) { int connected = 0 ; synchronized ( mStateMachines ) { for ( com.android.bluetooth.a2dp.A2dpStateMachine sm : mStateMachines.values ( ) ) { switch ( sm.getConnectionState ( ) ) { case android.bluetooth.BluetoothProfile.STATE_CONNECTING : case android.bluetooth.BluetoothProfile.STATE_CONNECTED : if ( java.util.Objects.equals ( device , sm.getDevice ( ) ) ) { return true ; } connected ++ ; break ; default : break ; } } } return connected < ( mMaxConnectedAudioDevices ) ; }

Target:
public boolean canConnectToDevice ( android.bluetooth.BluetoothDevice device ) { int connected = 0 ; synchronized ( mStateMachines ) { for ( com.android.bluetooth.a2dp.A2dpStateMachine sm : mStateMachines.values ( ) ) { switch ( sm.getConnectionState ( ) ) { case android.bluetooth.BluetoothProfile.STATE_CONNECTING : case android.bluetooth.BluetoothProfile.STATE_CONNECTED : if ( java.util.Objects.equals ( device , sm.getDevice ( ) ) ) { return true ; } connected ++ ; break ; default : break ; } } } return connected < ( mMaxConnectedAudioDevices ) ; }
Source:
public boolean sdpSearch ( android.bluetooth.BluetoothDevice device , android.os.ParcelUuid uuid ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "sdpSea(): not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.sdpSearch ( device , uuid ) ; }

Target:
public boolean sdpSearch ( android.bluetooth.BluetoothDevice device , android.os.ParcelUuid uuid ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "sdpSea(): not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.sdpSearch ( device , uuid ) ; }
Source:
public void visitTableSwitchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.TableSwitchInstruction tableSwitchInstruction ) { tableSwitchInstruction.defaultOffset = newBranchOffset ( offset , tableSwitchInstruction.defaultOffset ) ; newJumpOffsets ( offset , tableSwitchInstruction.jumpOffsets ) ; instructionWriter.visitTableSwitchInstruction ( clazz , method , codeAttribute , newOffset , tableSwitchInstruction ) ; newOffset += tableSwitchInstruction.length ( newOffset ) ; }

Target:
public void visitTableSwitchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.TableSwitchInstruction tableSwitchInstruction ) { tableSwitchInstruction.defaultOffset = newBranchOffset ( offset , tableSwitchInstruction.defaultOffset , newOffset ) ; newJumpOffsets ( offset , tableSwitchInstruction.jumpOffsets , newOffset ) ; instructionWriter.visitTableSwitchInstruction ( clazz , method , codeAttribute , newOffset , tableSwitchInstruction ) ; newOffset += tableSwitchInstruction.length ( newOffset ) ; }
Source:
public void visit ( java.util.Map < java.lang.Object , java.lang.Object > map ) { ids = new java.util.Vector < byte [ ] > ( map.size ( ) ) ; for ( java.lang.Object key : map.keySet ( ) ) { sun.security.ssl.SSLSessionImpl value = ( ( sun.security.ssl.SSLSessionImpl ) ( map.get ( key ) ) ) ; if ( ! ( isTimedout ( value ) ) ) { ids.addElement ( ( ( sun.security.ssl.SessionId ) ( key ) ) . getId ( ) ) ; } } }

Target:
public void visit ( java.util.Map < sun.security.ssl.SessionId , sun.security.ssl.SSLSessionImpl > map ) { ids = new java.util.Vector < > ( map.size ( ) ) ; for ( sun.security.ssl.SessionId key : map.keySet ( ) ) { sun.security.ssl.SSLSessionImpl value = map.get ( key ) ; if ( ! ( isTimedout ( value ) ) ) { ids.addElement ( key.getId ( ) ) ; } } }
Source:
public int getRawMinSdkVersion ( ) { com.google.common.base.Optional < com.android.manifmerger.XmlElement > usesSdk = getByTypeAndKey ( ManifestModel.NodeTypes.USES_SDK , null ) ; if ( usesSdk.isPresent ( ) ) { com.google.common.base.Optional < com.android.manifmerger.XmlAttribute > minSdkVersion = usesSdk.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:minSdkVersion" ) ) ; if ( minSdkVersion.isPresent ( ) ) { return java.lang.Integer.parseInt ( minSdkVersion.get ( ) . getValue ( ) ) ; } } return com.android.manifmerger.XmlDocument.DEFAULT_SDK_VERSION ; }

Target:
private java.lang.String getRawMinSdkVersion ( ) { com.google.common.base.Optional < com.android.manifmerger.XmlElement > usesSdk = getByTypeAndKey ( ManifestModel.NodeTypes.USES_SDK , null ) ; if ( usesSdk.isPresent ( ) ) { com.google.common.base.Optional < com.android.manifmerger.XmlAttribute > minSdkVersion = usesSdk.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:minSdkVersion" ) ) ; if ( minSdkVersion.isPresent ( ) ) { return minSdkVersion.get ( ) . getValue ( ) ; } } return com.android.manifmerger.XmlDocument.DEFAULT_SDK_VERSION ; }
Source:
public final java.nio.ByteBuffer putShort ( short x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putShort ( ix ( nextPutIndex ( SizeOf.SHORT ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putShort ( short x ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } putShort ( ix ( nextPutIndex ( SizeOf.SHORT ) ) , x ) ; return this ; }
Source:
public static boolean isFileBasedResourceType ( @ com.android.annotations.NonNull com.android.resources.ResourceType type ) { java.util.List < com.android.resources.ResourceFolderType > folderTypes = com.android.resources.FolderTypeRelationship.getRelatedFolders ( type ) ; for ( com.android.resources.ResourceFolderType folderType : folderTypes ) { if ( folderType != ( com.android.resources.ResourceFolderType.VALUES ) ) { if ( type == ( com.android.resources.ResourceType.ID ) ) { return false ; } return true ; } } return false ; }

Target:
public static boolean isFileBasedResourceType ( @ com.android.annotations.NonNull com.android.resources.ResourceType type ) { java.util.List < com.android.resources.ResourceFolderType > folderTypes = com.android.resources.FolderTypeRelationship.getRelatedFolders ( type ) ; for ( com.android.resources.ResourceFolderType folderType : folderTypes ) { if ( folderType != ( com.android.resources.ResourceFolderType.VALUES ) ) { return type != ( com.android.resources.ResourceType.ID ) ; } } return false ; }
Source:
public void onDraw ( final android.graphics.Canvas canvas ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDraw ( canvas ) ; } } ) ; return ; } mAwContents.getAwContentsProxy ( ) . onDraw ( canvas ) ; }

Target:
public void onDraw ( final android.graphics.Canvas canvas ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDraw ( canvas ) ; } } ) ; return ; } mAwContents.onDraw ( canvas ) ; }
Source:
public void testLockInterruptibly ( boolean fair ) { final jsr166.ReentrantLockTest.PublicReentrantLock lock = new jsr166.ReentrantLockTest.PublicReentrantLock ( fair ) ; try { lock.lockInterruptibly ( ) ; } catch ( java.lang.InterruptedException ie ) { threadUnexpectedException ( ie ) ; } assertLockedByMoi ( lock ) ; java.lang.Thread t = newStartedThread ( new jsr166.ReentrantLockTest.InterruptedLockRunnable ( lock ) ) ; waitForQueuedThread ( lock , t ) ; t.interrupt ( ) ; assertTrue ( lock.isLocked ( ) ) ; assertTrue ( lock.isHeldByCurrentThread ( ) ) ; awaitTermination ( t ) ; releaseLock ( lock ) ; }

Target:
public void testLockInterruptibly ( boolean fair ) { final jsr166.ReentrantLockTest.PublicReentrantLock lock = new jsr166.ReentrantLockTest.PublicReentrantLock ( fair ) ; try { lock.lockInterruptibly ( ) ; } catch ( java.lang.InterruptedException fail ) { threadUnexpectedException ( fail ) ; } assertLockedByMoi ( lock ) ; java.lang.Thread t = newStartedThread ( new jsr166.ReentrantLockTest.InterruptedLockRunnable ( lock ) ) ; waitForQueuedThread ( lock , t ) ; t.interrupt ( ) ; assertTrue ( lock.isLocked ( ) ) ; assertTrue ( lock.isHeldByCurrentThread ( ) ) ; awaitTermination ( t ) ; releaseLock ( lock ) ; }
Source:
public boolean hasCategory ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.sched.util.config.category.Category > target ) { if ( target == ( com.android.sched.util.config.category.Category.class ) ) { return true ; } for ( java.lang.Class < ? extends com.android.sched.util.config.category.Category > category : categories ) { if ( category.isAssignableFrom ( target ) ) { return true ; } } return false ; }

Target:
public boolean hasCategory ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.sched.util.config.category.Category > target ) { if ( target == ( com.android.sched.util.config.category.Category.class ) ) { return true ; } for ( java.lang.Class < ? extends com.android.sched.util.config.category.Category > category : categories ) { if ( target.isAssignableFrom ( category ) ) { return true ; } } return false ; }
Source:
void test ( ) { BRANCH ( ( ( 39808.0 - ( cts ) ) - ( dev ) ) ) ; java.util.List < java.lang.String > result = new java.util.ArrayList ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . mPosted ) ; if ( ( ( result.size ( ) ) > 0 ) && ( result.contains ( mTag1 ) ) ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } }

Target:
protected void test ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . mPosted ) ; if ( ( ( result.size ( ) ) > 0 ) && ( result.contains ( mTag1 ) ) ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } }
Source:
public boolean find ( int start ) { if ( ( start < 0 ) || ( start > ( input.length ( ) ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "start=" + start ) + "; length=" ) + ( input.length ( ) ) ) ) ; } synchronized ( this ) { matchFound = java.util.regex.Matcher.findImpl ( address , input , start , matchOffsets ) ; } return matchFound ; }

Target:
public boolean find ( int start ) { if ( ( start < 0 ) || ( start > ( input.length ( ) ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "start=" + start ) + "; length=" ) + ( input.length ( ) ) ) ) ; } synchronized ( this ) { matchFound = java.util.regex.Matcher.findImpl ( address , start , matchOffsets ) ; } return matchFound ; }
Source:
private void updateRequestCounts ( boolean add , android.net.NetworkRequest request ) { int delta = ( add ) ? + 1 : - 1 ; switch ( request.type ) { case REQUEST : case TRACK_DEFAULT : mNumRequestNetworkRequests += delta ; break ; case BACKGROUND_REQUEST : mNumRequestNetworkRequests += delta ; mNumBackgroundNetworkRequests += delta ; break ; case LISTEN : break ; case NONE : default : android.util.Log.wtf ( com.android.server.connectivity.NetworkAgentInfo.TAG , ( "Unhandled request type " + ( request.type ) ) ) ; break ; } }

Target:
private void updateRequestCounts ( boolean add , android.net.NetworkRequest request ) { int delta = ( add ) ? + 1 : - 1 ; switch ( request.type ) { case REQUEST : mNumRequestNetworkRequests += delta ; break ; case BACKGROUND_REQUEST : mNumRequestNetworkRequests += delta ; mNumBackgroundNetworkRequests += delta ; break ; case TRACK_DEFAULT : case LISTEN : break ; case NONE : default : android.util.Log.wtf ( com.android.server.connectivity.NetworkAgentInfo.TAG , ( "Unhandled request type " + ( request.type ) ) ) ; break ; } }
Source:
public boolean isConnected ( int slotId , int featureType , int sessionId , int callSessionType , int callType ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isConnected ( sessionId , callSessionType , callType ) ; } } return false ; }

Target:
public boolean isConnected ( int slotId , int featureType , int callSessionType , int callType ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isConnected ( callSessionType , callType ) ; } } return false ; }
Source:
private void sync ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart editor ) { if ( mEditorMaximized ) { editor.showStructureViews ( true , true , true ) ; } else if ( mOutlineOpen ) { editor.showStructureViews ( false , false , true ) ; editor.getCanvasControl ( ) . getOutlinePage ( ) . setShowPropertySheet ( ( ! ( mPropertiesOpen ) ) ) ; } else { editor.showStructureViews ( true , ( ! ( mPropertiesOpen ) ) , true ) ; } }

Target:
private void sync ( @ com.android.annotations.Nullable com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart editor ) { if ( editor == null ) { return ; } if ( mEditorMaximized ) { editor.showStructureViews ( true , true , true ) ; } else if ( mOutlineOpen ) { editor.showStructureViews ( false , false , true ) ; editor.getCanvasControl ( ) . getOutlinePage ( ) . setShowPropertySheet ( ( ! ( mPropertiesOpen ) ) ) ; } else { editor.showStructureViews ( true , ( ! ( mPropertiesOpen ) ) , true ) ; } }
Source:
private void getTotalNumOfItemsRequestFromNative ( byte [ ] address , byte scope ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "getTotalNumOfItemsRequestFromNative: scope=" + scope ) ) ; android.os.Bundle data = new android.os.Bundle ( ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_GET_TOTAL_NUM_OF_ITEMS ) ; msg.arg1 = scope ; msg.obj = address ; mHandler.sendMessage ( msg ) ; }

Target:
private void getTotalNumOfItemsRequestFromNative ( byte [ ] address , byte scope ) { android.os.Bundle data = new android.os.Bundle ( ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_GET_TOTAL_NUM_OF_ITEMS ) ; msg.arg1 = scope ; msg.obj = address ; mHandler.sendMessage ( msg ) ; }
Source:
void clear ( ) { if ( ( contactsCursor ) != null ) { contactsCursor.close ( ) ; contactsCursor = null ; } if ( ( nearbyPlacesCursor ) != null ) { nearbyPlacesCursor.close ( ) ; nearbyPlacesCursor = null ; } if ( ( corpDirectoryCursor ) != null ) { corpDirectoryCursor.close ( ) ; corpDirectoryCursor = null ; } }

Target:
void clear ( ) { contactsCursor = null ; nearbyPlacesCursor = null ; corpDirectoryCursor = null ; }
Source:
private void testExplicitPositionMatchParentNoLimits ( ) { doLayoutParamTest ( ( android.view.WindowManager.LayoutParams params ) -> { params.width = WindowManager.LayoutParams.MATCH_PARENT ; params.height = WindowManager.LayoutParams.MATCH_PARENT ; params.gravity = ( android.view.Gravity.LEFT ) | ( android.view.Gravity.TOP ) ; params.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS ; params.x = 100 ; params.y = 100 ; } ) ; }

Target:
private void testExplicitPositionMatchParentNoLimits ( ) { doLayoutParamTest ( ( android.view.WindowManager.LayoutParams params ) -> { params.width = WindowManager.LayoutParams.MATCH_PARENT ; params.height = WindowManager.LayoutParams.MATCH_PARENT ; params.gravity = ( android.view.Gravity.LEFT ) | ( android.view.Gravity.TOP ) ; params.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS ; } ) ; }