auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mTestImsService = new android.telephony.ims.TestImsService ( mMockContext ) ; mTestImsServiceBinder = ( ( com.android.ims.internal.IImsServiceController ) ( mTestImsService.onBind ( new android.content.Intent ( com.android.internal.telephony.ims.ImsResolver.SERVICE_INTERFACE ) ) ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mMockContext = org.mockito.Mockito.mock ( android.content.Context.class ) ; mTestCallback = org.mockito.Mockito.mock ( com.android.ims.internal.IImsFeatureStatusCallback.class ) ; mTestImsService = new android.telephony.ims.TestImsService ( mMockContext ) ; mTestImsServiceBinder = ( ( android.telephony.ims.aidl.IImsServiceController ) ( mTestImsService.onBind ( new android.content.Intent ( com.android.internal.telephony.ims.ImsResolver.SERVICE_INTERFACE ) ) ) ) ; }
Source:
private void handleRadioAvailable ( ) { mCi.getBasebandVersion ( obtainMessage ( com.android.internal.telephony.EVENT_GET_BASEBAND_VERSION_DONE ) ) ; if ( isPhoneTypeGsm ( ) ) { mCi.getIMEI ( obtainMessage ( com.android.internal.telephony.EVENT_GET_IMEI_DONE ) ) ; mCi.getIMEISV ( obtainMessage ( com.android.internal.telephony.EVENT_GET_IMEISV_DONE ) ) ; } else { mCi.getDeviceIdentity ( obtainMessage ( com.android.internal.telephony.EVENT_GET_DEVICE_IDENTITY_DONE ) ) ; } mCi.getRadioCapability ( obtainMessage ( com.android.internal.telephony.EVENT_GET_RADIO_CAPABILITY ) ) ; startLceAfterRadioIsAvailable ( ) ; }

Target:
public void changeCallBarringPassword ( java.lang.String facility , java.lang.String oldPwd , java.lang.String newPwd , android.os.Message onComplete ) { if ( isPhoneTypeGsm ( ) ) { mCi.changeBarringPassword ( facility , oldPwd , newPwd , onComplete ) ; } else { loge ( "changeCallBarringPassword: not possible in CDMA" ) ; } }
Source:
public void test_NUL_in_filename ( ) throws java.lang.Exception { java.io.File file = createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = createZipOutputStream ( file ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( "hello" ) ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( "hello" ) ) ; out.close ( ) ; try { java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( file ) ; fail ( ) ; } catch ( java.util.zip.ZipException expected ) { } }

Target:
public void test_NUL_in_filename ( ) throws java.lang.Exception { java.io.File file = libcore.java.util.zip.ZipFileTest.createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = libcore.java.util.zip.ZipFileTest.createZipOutputStream ( file ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( "hello" ) ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( "hello" ) ) ; out.close ( ) ; try { java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( file ) ; fail ( ) ; } catch ( java.util.zip.ZipException expected ) { } }
Source:
public void drop ( org.eclipse.swt.dnd.DropTargetEvent event ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutCanvas canvas = mGraphicalEditorPart.getCanvasControl ( ) ; if ( canvas != null ) { adjustEventCoordinates ( canvas , event ) ; canvas.getDropListener ( ) . drop ( event ) ; } }

Target:
public void setActionBars ( org.eclipse.ui.IActionBars actionBars ) { super . setActionBars ( actionBars ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutCanvas canvas = mGraphicalEditorPart.getCanvasControl ( ) ; canvas.updateGlobalActions ( actionBars ) ; actionBars.setGlobalActionHandler ( mTreeSelectAllAction.getId ( ) , mTreeSelectAllAction ) ; actionBars.updateActionBars ( ) ; }
Source:
private void expectNetworkStatsUidDetail ( android.net.NetworkStats detail ) throws java.lang.Exception { expectNetworkStatsUidDetail ( detail , new java.lang.String [ 0 ] , new android.net.NetworkStats ( 0L , 0 ) ) ; }

Target:
private void expectNetworkStatsSummary ( android.net.NetworkStats summary , android.net.NetworkStats tetherStats ) throws java.lang.Exception { org.mockito.Mockito.when ( mConnManager.getAllVpnInfo ( ) ) . thenReturn ( new com.android.internal.net.VpnInfo [ 0 ] ) ; expectNetworkStatsTethering ( android.net.NetworkStats.STATS_PER_IFACE , tetherStats ) ; expectNetworkStatsSummaryDev ( summary.clone ( ) ) ; expectNetworkStatsSummaryXt ( summary.clone ( ) ) ; }
Source:
public void setSmscAddress ( java.lang.String address , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_SMSC_ADDRESS , result ) ; rr.mParcel.writeString ( address ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + address ) ) ; send ( rr ) ; }

Target:
public void getCellInfoList ( android.os.Message result , android.os.WorkSource workSource ) { workSource = getDeafultWorkSourceIfInvalid ( workSource ) ; com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GET_CELL_INFO_LIST , result , workSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public static < T extends java.lang.Enum < T > > com.google.common.base.Optional < T > getIfPresent ( java.lang.Class < T > enumClass , java.lang.String value ) { com.google.common.base.Preconditions.checkNotNull ( enumClass ) ; com.google.common.base.Preconditions.checkNotNull ( value ) ; try { return com.google.common.base.Optional.of ( java.lang.Enum.valueOf ( enumClass , value ) ) ; } catch ( java.lang.IllegalArgumentException iae ) { return com.google.common.base.Optional.absent ( ) ; } }

Target:
public static < T extends java.lang.Enum < T > > com.google.common.base.Optional < T > getIfPresent ( java.lang.Class < T > enumClass , java.lang.String value ) { com.google.common.base.Preconditions.checkNotNull ( enumClass ) ; com.google.common.base.Preconditions.checkNotNull ( value ) ; return com.google.common.base.Platform.getEnumIfPresent ( enumClass , value ) ; }
Source:
public void testSupportsScreen ( ) { com.android.sdklib.xml.ManifestData.SupportsScreens supportsScreens = mManifestTestApp.getSupportsScreens ( ) ; assertNotNull ( supportsScreens ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getAnyDensity ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getResizeable ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getSmallScreens ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getNormalScreens ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getLargeScreens ( ) ) ; }

Target:
public void testSupportsScreen ( ) { com.android.sdklib.xml.ManifestData.SupportsScreens supportsScreens = mManifestTestApp.getSupportsScreensFromManifest ( ) ; assertNotNull ( supportsScreens ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getAnyDensity ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getResizeable ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getSmallScreens ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getNormalScreens ( ) ) ; assertEquals ( java.lang.Boolean.TRUE , supportsScreens.getLargeScreens ( ) ) ; }
Source:
protected int getFirstItemPosition ( ) { android.os.Bundle args = getArguments ( ) ; com.android.tv.dvr.ScheduledRecording recording = null ; if ( args != null ) { recording = args.getParcelable ( com.android.tv.dvr.ui.list.SCHEDULES_KEY_SCHEDULED_RECORDING ) ; } final int selectedPostion = getRowsAdapter ( ) . indexOf ( getRowsAdapter ( ) . findRowByScheduledRecording ( recording ) ) ; if ( selectedPostion != ( - 1 ) ) { return selectedPostion ; } return super . getFirstItemPosition ( ) ; }

Target:
protected int getFirstItemPosition ( ) { android.os.Bundle args = getArguments ( ) ; com.android.tv.dvr.data.ScheduledRecording recording = null ; if ( args != null ) { recording = args.getParcelable ( com.android.tv.dvr.ui.list.SCHEDULES_KEY_SCHEDULED_RECORDING ) ; } final int selectedPostion = getRowsAdapter ( ) . indexOf ( getRowsAdapter ( ) . findRowByScheduledRecording ( recording ) ) ; if ( selectedPostion != ( - 1 ) ) { return selectedPostion ; } return super . getFirstItemPosition ( ) ; }
Source:
public void insert ( java.util.List < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; db.beginTransaction ( ) ; try { for ( com.android.dialer.speeddial.database.SpeedDialEntry entry : entries ) { if ( ( db.insert ( com.android.dialer.speeddial.database.SpeedDialEntryDatabaseHelper.TABLE_NAME , null , buildContentValues ( entry ) ) ) == ( - 1L ) ) { throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( "Attempted to insert a row that already exists." ) ; } } db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; db.close ( ) ; } }

Target:
public void insert ( com.google.common.collect.ImmutableList < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { if ( entries.isEmpty ( ) ) { return ; } android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; db.beginTransaction ( ) ; try { insert ( db , entries ) ; db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; db.close ( ) ; } }
Source:
public void testKeyStore_SetCertificate_CAExists_Overwrite_Success ( ) throws java.lang.Exception { mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; final java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; final java.security.cert.Certificate cert = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; mKeyStore.setCertificateEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , cert ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; }

Target:
public void testKeyStore_SetCertificate_CAExists_Overwrite_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; final java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; final java.security.cert.Certificate cert = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; mKeyStore.setCertificateEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , cert ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; }
Source:
public void setScanInterval ( int scanInterval ) { doBooleanCommand ( ( "SCAN_INTERVAL " + scanInterval ) ) ; }

Target:
public java.lang.String startWpsPinDisplay ( java.lang.String iface , java.lang.String bssid ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.startWpsPinDisplay ( iface , bssid ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( android.text.TextUtils.isEmpty ( bssid ) ) { return doStringCommandNative ( ( ( "IFNAME=" + iface ) + " WPS_PIN any" ) ) ; } else { return doStringCommandNative ( ( ( ( "IFNAME=" + iface ) + " WPS_PIN " ) + bssid ) ) ; } } } }
Source:
public static void sort ( double [ ] a ) { java.util.DualPivotQuicksort.sort ( a ) ; }

Target:
public static void sort ( double [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) , null , 0 , 0 ) ; }
Source:
public boolean accept ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.project.Project project , @ org.jetbrains.annotations.NotNull com.intellij.openapi.vfs.VirtualFile file ) { if ( ( file.isDirectory ( ) ) || ( ! ( file.isValid ( ) ) ) ) { return false ; } if ( com.intellij.psi.SingleRootFileViewProvider.isTooLargeForContentLoading ( file ) ) { return false ; } final com.intellij.openapi.fileTypes.FileType ft = file.getFileType ( ) ; return ( ! ( ft.isBinary ( ) ) ) || ( ( BinaryFileTypeDecompilers.INSTANCE.forFileType ( ft ) ) != null ) ; }

Target:
public static boolean isTextFile ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.vfs.VirtualFile file ) { if ( ( file.isDirectory ( ) ) || ( ! ( file.isValid ( ) ) ) ) { return false ; } final com.intellij.openapi.fileTypes.FileType ft = file.getFileType ( ) ; return ( ! ( ft.isBinary ( ) ) ) || ( ( BinaryFileTypeDecompilers.INSTANCE.forFileType ( ft ) ) != null ) ; }
Source:
public int submitRequest ( android.hardware.camera2.CaptureRequest request , boolean streaming , android.hardware.camera2.utils.LongParcelable lastFrameNumber ) { if ( android.hardware.camera2.legacy.CameraDeviceUserShim.DEBUG ) { android.util.Log.d ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "submitRequest called." ) ; } if ( mLegacyDevice.isClosed ( ) ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request, device has been closed." ) ; return android.hardware.camera2.utils.CameraBinderDecorator.ENODEV ; } synchronized ( mConfigureLock ) { if ( mConfiguring ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request, configuration change in progress." ) ; return android.hardware.camera2.utils.CameraBinderDecorator.INVALID_OPERATION ; } } return mLegacyDevice.submitRequest ( request , streaming , lastFrameNumber ) ; }

Target:
public int submitRequest ( android.hardware.camera2.CaptureRequest request , boolean streaming , android.hardware.camera2.utils.LongParcelable lastFrameNumber ) { if ( android.hardware.camera2.legacy.CameraDeviceUserShim.DEBUG ) { android.util.Log.d ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "submitRequest called." ) ; } if ( mLegacyDevice.isClosed ( ) ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request, device has been closed." ) ; return - ( android.system.OsConstants.ENODEV ) ; } synchronized ( mConfigureLock ) { if ( mConfiguring ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request, configuration change in progress." ) ; return android.hardware.camera2.utils.CameraBinderDecorator.INVALID_OPERATION ; } } return mLegacyDevice.submitRequest ( request , streaming , lastFrameNumber ) ; }
Source:
public static java.util.Locale [ ] localesFromStrings ( java.lang.String [ ] localeNames ) { java.util.LinkedHashSet < java.util.Locale > set = new java.util.LinkedHashSet < java.util.Locale > ( ) ; for ( java.lang.String localeName : localeNames ) { set.add ( libcore.icu.ICU.localeFromString ( localeName ) ) ; } return set.toArray ( new java.util.Locale [ set.size ( ) ] ) ; }

Target:
public static java.util.Locale [ ] localesFromStrings ( java.lang.String [ ] localeNames ) { java.util.LinkedHashSet < java.util.Locale > set = new java.util.LinkedHashSet < java.util.Locale > ( ) ; for ( java.lang.String localeName : localeNames ) { set.add ( libcore.icu.ICU.localeFromIcuLocaleId ( localeName ) ) ; } return set.toArray ( new java.util.Locale [ set.size ( ) ] ) ; }
Source:
public static int canMergeAfterBCE2 ( ) { int [ ] array = new int [ ] { 0 , 1 , 2 , 3 } ; for ( int i = 0 ; i < ( ( array.length ) - 1 ) ; i ++ ) { array [ ( i + 1 ) ] = ( array [ i ] ) + ( array [ ( i + 1 ) ] ) ; } return array [ ( ( array.length ) - 1 ) ] ; }

Target:
public static int canMergeAfterBCE2 ( ) { int [ ] array = new int [ ] { 64 , 8 , 4 , 2 } ; for ( int i = 0 ; i < ( ( array.length ) - 1 ) ; i ++ ) { array [ ( i + 1 ) ] = ( array [ i ] ) << ( array [ ( i + 1 ) ] ) ; } return array [ ( ( array.length ) - 1 ) ] ; }
Source:
public boolean initializeSupplicantHal ( ) { if ( ! ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) ) { return true ; } if ( ( mSupplicantP2pIfaceHal ) != null ) { if ( ! ( mSupplicantP2pIfaceHal.initialize ( ) ) ) { return false ; } } return mSupplicantStaIfaceHal.initialize ( ) ; }

Target:
public boolean startWpsPbc ( java.lang.String iface , java.lang.String bssid ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.startWpsPbc ( iface , bssid ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( android.text.TextUtils.isEmpty ( bssid ) ) { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " WPS_PBC" ) ) ; } else { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " WPS_PBC " ) + bssid ) ) ; } } } }
Source:
public void handleKeyUp ( android.view.KeyEvent event , int stream ) { int keyCode = event.getKeyCode ( ) ; switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_VOLUME_UP : case android.view.KeyEvent.KEYCODE_VOLUME_DOWN : if ( mUseVolumeKeySounds ) { if ( mUseMasterVolume ) { adjustMasterVolume ( android.media.AudioManager.ADJUST_SAME , android.media.AudioManager.FLAG_PLAY_SOUND ) ; } else { int flags = android.media.AudioManager.FLAG_PLAY_SOUND ; adjustSuggestedStreamVolume ( android.media.AudioManager.ADJUST_SAME , stream , flags ) ; } } mVolumeKeyUpTime = android.os.SystemClock.uptimeMillis ( ) ; break ; case android.view.KeyEvent.KEYCODE_VOLUME_MUTE : android.media.session.MediaSessionLegacyHelper.getHelper ( mApplicationContext ) . sendVolumeKeyEvent ( event , false ) ; break ; } }

Target:
public void handleKeyUp ( android.view.KeyEvent event , int stream ) { int keyCode = event.getKeyCode ( ) ; switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_VOLUME_UP : case android.view.KeyEvent.KEYCODE_VOLUME_DOWN : if ( mUseVolumeKeySounds ) { if ( mUseMasterVolume ) { adjustMasterVolume ( android.media.AudioManager.ADJUST_SAME , android.media.AudioManager.FLAG_PLAY_SOUND ) ; } else { int flags = android.media.AudioManager.FLAG_PLAY_SOUND ; adjustSuggestedStreamVolume ( android.media.AudioManager.ADJUST_SAME , stream , flags ) ; } } mVolumeKeyUpTime = android.os.SystemClock.uptimeMillis ( ) ; break ; case android.view.KeyEvent.KEYCODE_VOLUME_MUTE : android.media.session.MediaSessionLegacyHelper.getHelper ( getContext ( ) ) . sendVolumeKeyEvent ( event , false ) ; break ; } }
Source:
public void test_setSoTimeoutI ( ) throws java.lang.Exception { java.net.DatagramSocket ds = new java.net.DatagramSocket ( ) ; ds.setSoTimeout ( 100 ) ; assertTrue ( "Set incorrect timeout" , ( ( ds.getSoTimeout ( ) ) >= 100 ) ) ; }

Target:
public void test_isClosed ( ) throws java.lang.Exception { java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( ) ; assertFalse ( theSocket.isClosed ( ) ) ; theSocket.close ( ) ; assertTrue ( theSocket.isClosed ( ) ) ; java.net.InetSocketAddress theAddress = new java.net.InetSocketAddress ( java.net.InetAddress.getLocalHost ( ) , 0 ) ; theSocket = new java.net.DatagramSocket ( theAddress ) ; assertFalse ( theSocket.isClosed ( ) ) ; theSocket.close ( ) ; assertTrue ( theSocket.isClosed ( ) ) ; }
Source:
private java.awt.Dimension getMaxVideoPlaybackResolution ( int width , int height ) { for ( int resIndex = ( android.mediastress.cts.preconditions.MediaPreparer.resolutions.length ) - 1 ; resIndex >= ( android.mediastress.cts.preconditions.MediaPreparer.RES_DEFAULT ) ; resIndex -- ) { java.awt.Dimension resolution = android.mediastress.cts.preconditions.MediaPreparer.resolutions [ resIndex ] ; if ( ( width >= ( resolution.width ) ) && ( height >= ( resolution.height ) ) ) { return resolution ; } } return android.mediastress.cts.preconditions.MediaPreparer.resolutions [ android.mediastress.cts.preconditions.MediaPreparer.RES_DEFAULT ] ; }

Target:
protected boolean mediaFilesExistOnDevice ( com.android.tradefed.device.ITestDevice device ) throws com.android.tradefed.device.DeviceNotAvailableException { for ( android.mediastress.cts.preconditions.MediaPreparer.Resolution resolution : android.mediastress.cts.preconditions.MediaPreparer.RESOLUTIONS ) { if ( ( resolution.width ) > ( mMaxRes.width ) ) { break ; } java.lang.String deviceShortFilePath = ( mBaseDeviceShortDir ) + ( resolution.toString ( ) ) ; java.lang.String deviceFullFilePath = ( mBaseDeviceFullDir ) + ( resolution.toString ( ) ) ; if ( ( ! ( device.doesFileExist ( deviceShortFilePath ) ) ) || ( ! ( device.doesFileExist ( deviceFullFilePath ) ) ) ) { return false ; } } return true ; }
Source:
public void showProgramGuide ( ) { selectProgramGuideMenuItem ( ) ; mDevice.pressDPadCenter ( ) ; com.android.tv.testing.uihelper.UiDeviceAsserts.assertWaitForCondition ( mDevice , android.support.test.uiautomator.Until.hasObject ( Constants.PROGRAM_GUIDE ) ) ; if ( mDevice.hasObject ( com.android.tv.testing.uihelper.ByResource.id ( mTargetResources , R.id.program_guide_side_panel_grid_view ) ) ) { mDevice.pressDPadRight ( ) ; } }

Target:
public void showAndFocusProgramGuide ( ) { selectProgramGuideMenuItem ( ) ; mDevice.pressDPadCenter ( ) ; com.android.tv.testing.uihelper.UiDeviceAsserts.assertWaitForCondition ( mDevice , android.support.test.uiautomator.Until.hasObject ( Constants.PROGRAM_GUIDE ) ) ; if ( mDevice.hasObject ( com.android.tv.testing.uihelper.ByResource.id ( mTargetResources , R.id.program_guide_side_panel_grid_view ) ) ) { mDevice.pressDPadRight ( ) ; } }
Source:
public static final < T extends com.android.jack.test.toolchain.IToolchain > T getReferenceToolchain ( ) { return ( ( T ) ( com.android.jack.test.toolchain.AbstractTestTools.createToolchain ( "reference.toolchain" ) ) ) ; }

Target:
public static final < T extends com.android.jack.test.toolchain.IToolchain > T getReferenceToolchain ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > clazz ) { com.android.jack.test.toolchain.IToolchain result = com.android.jack.test.toolchain.AbstractTestTools.getReferenceToolchain ( ) ; org.junit.Assume.assumeTrue ( clazz.isAssignableFrom ( result.getClass ( ) ) ) ; return ( ( T ) ( result ) ) ; }
Source:
public void exit ( ) { android.os.Message message = getCurrentMessage ( ) ; if ( ( ( message != null ) && ( ! ( isQuit ( message ) ) ) ) && ( ( mCurrentDevice ) == null ) ) { stateLogWtfStack ( "mCurrentDevice is null on exit() to non-quitting state" ) ; } mPrevState = this ; }

Target:
public void enter ( ) { if ( ( ! ( ( this ) instanceof com.android.bluetooth.hfp.HeadsetStateMachine.Disconnected ) ) && ( ( mCurrentDevice ) == null ) ) { throw new java.lang.IllegalStateException ( "mCurrentDevice is null on enter()" ) ; } if ( ( ! ( ( this ) instanceof com.android.bluetooth.hfp.HeadsetStateMachine.Disconnected ) ) && ( ( mPrevState ) == null ) ) { throw new java.lang.IllegalStateException ( "mPrevState is null on enter()" ) ; } enforceValidConnectionStateTransition ( ) ; }
Source:
public void cleanup ( ) { if ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.TAG , "cleanup" ) ; if ( ( mConnState ) != ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.DISCONNECTED ) ) { mMediaBrowser.disconnect ( ) ; } mHmap = null ; mMediaController = null ; mMediaBrowser = null ; }

Target:
public void cleanup ( ) { if ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.TAG , "cleanup" ) ; if ( ( mConnState ) != ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.DISCONNECTED ) ) { mMediaBrowser.disconnect ( ) ; } mHmap = null ; mMediaController = null ; mMediaBrowser = null ; mPathStack = null ; }
Source:
public void onRemovingChildren ( @ com.android.annotations.NonNull java.util.List < com.android.ide.common.api.INode > deleted , @ com.android.annotations.NonNull com.android.ide.common.api.INode parent ) { super . onRemovingChildren ( deleted , parent ) ; com.android.ide.common.layout.grid.GridModel grid = new com.android.ide.common.layout.grid.GridModel ( mRulesEngine , parent , null ) ; for ( com.android.ide.common.api.INode child : deleted ) { java.lang.String fqcn = child.getFqcn ( ) ; if ( ( fqcn.equals ( com.android.ide.common.layout.LayoutConstants.FQCN_SPACE ) ) || ( fqcn.equals ( com.android.ide.common.layout.LayoutConstants.FQCN_SPACE_V7 ) ) ) { continue ; } grid.markDeleted ( child ) ; } grid.cleanup ( ) ; }

Target:
public void onRemovingChildren ( @ com.android.annotations.NonNull java.util.List < com.android.ide.common.api.INode > deleted , @ com.android.annotations.NonNull com.android.ide.common.api.INode parent ) { super . onRemovingChildren ( deleted , parent ) ; com.android.ide.common.layout.grid.GridModel grid = com.android.ide.common.layout.grid.GridModel.get ( mRulesEngine , parent , null ) ; grid.onDeleted ( deleted ) ; }
Source:
public void setNetworkSelectionModeAutomatic ( int subId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setNetworkSelectionModeAutomatic ( subId ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeAutomatic RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeAutomatic NPE" , ex ) ; } }

Target:
public void carrierActionReportDefaultNetworkStatus ( int subId , boolean report ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { service.carrierActionReportDefaultNetworkStatus ( subId , report ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#carrierActionReportDefaultNetworkStatus" , e ) ; } }
Source:
private long getExposureValue ( android.hardware.camera2.CaptureResult result ) throws java.lang.Exception { int expTimeUs = ( ( int ) ( ( getValueNotNull ( result , CaptureResult.SENSOR_EXPOSURE_TIME ) ) / 1000 ) ) ; int sensitivity = getValueNotNull ( result , CaptureResult.SENSOR_SENSITIVITY ) ; return expTimeUs * sensitivity ; }

Target:
private long getExposureValue ( android.hardware.camera2.CaptureResult result ) throws java.lang.Exception { int expTimeUs = ( ( int ) ( ( getValueNotNull ( result , CaptureResult.SENSOR_EXPOSURE_TIME ) ) / 1000 ) ) ; int sensitivity = getValueNotNull ( result , CaptureResult.SENSOR_SENSITIVITY ) ; java.lang.Integer postRawSensitivity = result.get ( CaptureResult.CONTROL_POST_RAW_SENSITIVITY_BOOST ) ; if ( postRawSensitivity != null ) { return ( ( ( ( long ) ( sensitivity ) ) * postRawSensitivity ) / 100 ) * expTimeUs ; } return ( ( long ) ( sensitivity ) ) * expTimeUs ; }
Source:
public boolean isCallerApplicationRestrictionsManagingPackage ( ) { throwIfParentInstance ( "isCallerApplicationRestrictionsManagingPackage" ) ; if ( ( mService ) != null ) { try { return mService.isCallerApplicationRestrictionsManagingPackage ( ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }

Target:
public java.util.List < java.lang.String > getDelegatedScopes ( @ android.annotation.Nullable android.content.ComponentName admin , @ android.annotation.NonNull java.lang.String delegatedPackage ) { throwIfParentInstance ( "getDelegatedScopes" ) ; if ( ( mService ) != null ) { try { return mService.getDelegatedScopes ( admin , delegatedPackage ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mCarrierServicesSmsFilterUT = new com.android.internal.telephony.CarrierServicesSmsFilter ( mContext , mPhone , new byte [ ] [ ] { com.android.internal.telephony.CarrierServicesSmsFilterTest.SMS_PDU } , 0 , null , mFilterCallback , getClass ( ) . getSimpleName ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mCarrierServicesSmsFilterUT = new com.android.internal.telephony.CarrierServicesSmsFilter ( mContext , mPhone , new byte [ ] [ ] { com.android.internal.telephony.CarrierServicesSmsFilterTest.SMS_PDU } , 0 , "3gpp" , mFilterCallback , getClass ( ) . getSimpleName ( ) ) ; }
Source:
public java.lang.String getText ( com.android.hierarchyviewerlib.device.ViewNode node ) { if ( node == null ) { throw new java.lang.RuntimeException ( "Node not found" ) ; } com.android.hierarchyviewerlib.device.ViewNode.Property textProperty = node.namedProperties.get ( "text:mText" ) ; if ( textProperty == null ) { throw new java.lang.RuntimeException ( "No text property on node" ) ; } return textProperty.value ; }

Target:
public java.lang.String getText ( com.android.hierarchyviewerlib.device.ViewNode node ) { if ( node == null ) { throw new java.lang.RuntimeException ( "Node not found" ) ; } com.android.hierarchyviewerlib.device.ViewNode.Property textProperty = node.namedProperties.get ( "text:mText" ) ; if ( textProperty == null ) { textProperty = node.namedProperties.get ( "mText" ) ; if ( textProperty == null ) { throw new java.lang.RuntimeException ( "No text property on node" ) ; } } return textProperty.value ; }
Source:
public void broadcastOnSdkLoaded ( ) { if ( ( mListeners.size ( ) ) > 0 ) { runOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( com.android.sdklib.repository.ISdkChangeListener listener : mListeners ) { try { listener.onSdkLoaded ( ) ; } catch ( java.lang.Throwable t ) { mSdkLog.error ( t , null ) ; } } } } ) ; } }

Target:
public void broadcastOnSdkLoaded ( ) { if ( ! ( mListeners.isEmpty ( ) ) ) { runOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( com.android.sdklib.repository.ISdkChangeListener listener : mListeners ) { try { listener.onSdkLoaded ( ) ; } catch ( java.lang.Throwable t ) { mSdkLog.error ( t , null ) ; } } } } ) ; } }
Source:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( ( ( dalvik.system.BlockGuard.getThreadPolicy ( ) . getPolicyMask ( ) ) & ( dalvik.system.BlockGuard.DISALLOW_NETWORK ) ) != 0 ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } } untagSocket ( fd ) ; } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }

Target:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( fd.isSocket ( ) ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } untagSocket ( fd ) ; } } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }
Source:
void cleanup ( ) { mRegularScanClients.clear ( ) ; mBatchClients.clear ( ) ; mScanNative.cleanup ( ) ; if ( ( mHandler ) != null ) { mHandler.removeCallbacksAndMessages ( null ) ; android.os.Looper looper = mHandler.getLooper ( ) ; if ( looper != null ) { looper.quit ( ) ; } mHandler = null ; } }

Target:
void cleanup ( ) { mRegularScanClients.clear ( ) ; mBatchClients.clear ( ) ; mSuspendedScanClients.clear ( ) ; mScanNative.cleanup ( ) ; if ( ( mHandler ) != null ) { mHandler.removeCallbacksAndMessages ( null ) ; android.os.Looper looper = mHandler.getLooper ( ) ; if ( looper != null ) { looper.quit ( ) ; } mHandler = null ; } }
Source:
public void testLibProguard ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libProguard" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/proguard/release" ) ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int proguardInt -> a" } ) ; }

Target:
public void testLibMinify ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( regularDir , "libMinify" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/mapping/release" ) ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int obfuscatedInt -> a" } ) ; }
Source:
public void setLabelFor ( int id ) { if ( ( mLabelForId ) == id ) { return ; } mLabelForId = id ; if ( ( ( mLabelForId ) != ( android.view.View.NO_ID ) ) && ( ( mID ) == ( android.view.View.NO_ID ) ) ) { mID = android.view.View.generateViewId ( ) ; } notifyViewAccessibilityStateChangedIfNeeded ( AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED ) ; }

Target:
public void setSelected ( boolean selected ) { if ( ( ( ( mPrivateFlags ) & ( android.view.View.PFLAG_SELECTED ) ) != 0 ) != selected ) { mPrivateFlags = ( ( mPrivateFlags ) & ( ~ ( android.view.View.PFLAG_SELECTED ) ) ) | ( selected ? android.view.View.PFLAG_SELECTED : 0 ) ; if ( ! selected ) resetPressedState ( ) ; invalidate ( true ) ; refreshDrawableState ( ) ; dispatchSetSelected ( selected ) ; notifyViewAccessibilityStateChangedIfNeeded ( AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED ) ; } }
Source:
public int setUsbTethering ( boolean enable ) { try { return mService.setUsbTethering ( enable ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void stopTethering ( int type ) { try { java.lang.String pkgName = mContext.getOpPackageName ( ) ; android.util.Log.i ( android.net.ConnectivityManager.TAG , ( "stopTethering caller:" + pkgName ) ) ; mService.stopTethering ( type , pkgName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void testFailed ( com.android.builder.testing.TestFailure status , com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( ( mLogger ) != null ) { mLogger.warning ( java.lang.String.format ( "\n%1$s > %2$s[%3$s] [31mFAILED [0m" , test.getClassName ( ) , test.getTestName ( ) , mDeviceName ) ) ; mLogger.warning ( getModifiedTrace ( trace ) ) ; } mFailedTests.add ( test ) ; super . testFailed ( status , test , trace ) ; }

Target:
public void testFailed ( com.android.builder.internal.testing.TestFailure status , com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( ( mLogger ) != null ) { mLogger.warning ( java.lang.String.format ( "\n%1$s > %2$s[%3$s] [31mFAILED [0m" , test.getClassName ( ) , test.getTestName ( ) , mDeviceName ) ) ; mLogger.warning ( getModifiedTrace ( trace ) ) ; } mFailedTests.add ( test ) ; super . testFailed ( status , test , trace ) ; }
Source:
private android.app.PendingIntent createCallLogPendingIntent ( @ android.support.annotation.Nullable android.net.Uri callUri ) { android.content.Intent contentIntent = com.android.dialer.app.DialtactsActivity.getShowTabIntent ( context , DialtactsPagerAdapter.TAB_INDEX_HISTORY ) ; contentIntent.setData ( callUri ) ; return android.app.PendingIntent.getActivity ( context , 0 , contentIntent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }

Target:
private android.app.PendingIntent createCallLogPendingIntent ( @ android.support.annotation.Nullable android.net.Uri callUri ) { android.content.Intent contentIntent ; if ( com.android.dialer.app.MainComponent.isNuiComponentEnabled ( context ) ) { contentIntent = com.android.dialer.app.MainComponent.getShowCallLogIntent ( context ) ; } else { contentIntent = com.android.dialer.app.DialtactsActivity.getShowTabIntent ( context , DialtactsPagerAdapter.TAB_INDEX_HISTORY ) ; } contentIntent.setData ( callUri ) ; return android.app.PendingIntent.getActivity ( context , 0 , contentIntent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }
Source:
public boolean remove ( java.lang.Object o ) { java.util.Iterator < java.util.Map.Entry < K , V > > iterator = unfiltered.entrySet ( ) . iterator ( ) ; while ( iterator.hasNext ( ) ) { java.util.Map.Entry < K , V > entry = iterator.next ( ) ; if ( ( com.google.common.base.Objects.equal ( o , entry.getValue ( ) ) ) && ( predicate.apply ( entry ) ) ) { iterator.remove ( ) ; return true ; } } return false ; }

Target:
static < K , V1 , V2 > com.google.common.base.Function < V1 , V2 > asValueToValueFunction ( final com.google.common.collect.Maps.EntryTransformer < ? super K , V1 , V2 > transformer , final K key ) { com.google.common.base.Preconditions.checkNotNull ( transformer ) ; return new com.google.common.base.Function < V1 , V2 > ( ) { @ java.lang.Override public V2 apply ( @ javax.annotation.Nullable V1 v1 ) { return transformer.transformEntry ( key , v1 ) ; } } ; }
Source:
public void stopHal ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.stopHalNative ( ) ; try { com.android.server.wifi.WifiNative.sThread.join ( com.android.server.wifi.WifiNative.STOP_HAL_TIMEOUT_MS ) ; android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "HAL event thread stopped successfully" ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "Could not stop HAL cleanly" ) ; } com.android.server.wifi.WifiNative.sThread = null ; com.android.server.wifi.WifiNative.sWifiHalHandle = 0 ; com.android.server.wifi.WifiNative.sWifiIfaceHandles = null ; com.android.server.wifi.WifiNative.sWlan0Index = - 1 ; } } }

Target:
public void stopHal ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { mWifiVendorHal.stopVendorHal ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.stopHalNative ( ) ; try { com.android.server.wifi.WifiNative.sThread.join ( com.android.server.wifi.WifiNative.STOP_HAL_TIMEOUT_MS ) ; android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "HAL event thread stopped successfully" ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "Could not stop HAL cleanly" ) ; } com.android.server.wifi.WifiNative.sThread = null ; com.android.server.wifi.WifiNative.sWifiHalHandle = 0 ; com.android.server.wifi.WifiNative.sWifiIfaceHandles = null ; com.android.server.wifi.WifiNative.sWlan0Index = - 1 ; } } } }
Source:
public void test002 ( ) throws java.lang.Exception { java.io.File [ ] bootclasspath = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar" ) , com.android.jack.TestTools.getFromAndroidTree ( "out/host/common/obj/JAVA_LIBRARIES/junit4-hostdex-jack_intermediates/classes.jar" ) } ; com.android.jack.TestTools.runCompilation ( com.android.jack.TestTools.buildCommandLineArgs ( bootclasspath , null , com.android.jack.TestTools.getJackTestsWithJackFolder ( "bridge/test002" ) ) ) ; }

Target:
public void test002 ( ) throws java.lang.Exception { java.io.File [ ] bootclasspath = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.zip" ) , com.android.jack.TestTools.getFromAndroidTree ( "out/host/common/obj/JAVA_LIBRARIES/junit4-hostdex-jack_intermediates/classes.zip" ) } ; com.android.jack.TestTools.runCompilation ( com.android.jack.TestTools.buildCommandLineArgs ( bootclasspath , null , com.android.jack.TestTools.getJackTestsWithJackFolder ( "bridge/test002" ) ) ) ; }
Source:
public java.lang.String getPythonBinary ( ) { return ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.PYTHON_DIR ) + ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.PYTHON_BINARY ) ; }

Target:
private com.android.tradefed.util.VtsPythonRunnerHelper createMockVtsPythonRunnerHelper ( com.android.tradefed.util.CommandStatus status ) { return new com.android.tradefed.util.VtsPythonRunnerHelper ( new java.io.File ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.PYTHON_DIR ) ) { @ java.lang.Override public java.lang.String runPythonRunner ( java.lang.String [ ] cmd , com.android.tradefed.util.CommandResult commandResult , long testTimeout ) { assertCommand ( cmd ) ; try { createResult ( cmd [ 3 ] ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } commandResult.setStatus ( status ) ; return null ; } } ; }
Source:
public void testCustomView ( ) throws java.lang.Exception { mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING , com.android.tools.lint.checks.MissingClassDetector.INSTANTIATABLE , com.android.tools.lint.checks.MissingClassDetector.INNERCLASS ) ; assertEquals ( ( "" + ( ( ( "res/layout/customview.xml:21: Error: Class referenced in the layout file, foo.bar.Baz, was not found in the project or the libraries [MissingRegistered]\n" + " <foo.bar.Baz\n" ) + " ^\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "res/layout/customview.xml" , "bytecode/OnClickActivity.java.txt=>src/test/pkg/OnClickActivity.java" , "bytecode/OnClickActivity.class.data=>bin/classes/test/pkg/OnClickActivity.class" ) ) ; }

Target:
public void testCustomView ( ) throws java.lang.Exception { mScopes = null ; mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING , com.android.tools.lint.checks.MissingClassDetector.INSTANTIATABLE , com.android.tools.lint.checks.MissingClassDetector.INNERCLASS ) ; assertEquals ( ( "" + ( ( ( "res/layout/customview.xml:21: Error: Class referenced in the layout file, foo.bar.Baz, was not found in the project or the libraries [MissingRegistered]\n" + " <foo.bar.Baz\n" ) + " ^\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "res/layout/customview.xml" , "bytecode/OnClickActivity.java.txt=>src/test/pkg/OnClickActivity.java" , "bytecode/OnClickActivity.class.data=>bin/classes/test/pkg/OnClickActivity.class" ) ) ; }
Source:
private synchronized com.android.bluetooth.hfpclient.connserv.HfpClientConnection buildConnection ( android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothHeadsetClientCall call , android.net.Uri number ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( ( ( ( ( "Creating connection on " + device ) + " for " ) + call ) + "/" ) + number ) ) ; com.android.bluetooth.hfpclient.connserv.HfpClientConnection connection = new com.android.bluetooth.hfpclient.connserv.HfpClientConnection ( this , device , mHeadsetProfile , call , number ) ; mConnections.put ( new com.android.bluetooth.hfpclient.connserv.ConnectionKey ( ConnectionKey.INVALID_ID , number ) , connection ) ; return connection ; }

Target:
private synchronized com.android.bluetooth.hfpclient.connserv.HfpClientConnection buildConnection ( android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothHeadsetClientCall call , android.net.Uri number ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( ( ( ( ( "Creating connection on " + device ) + " for " ) + call ) + "/" ) + number ) ) ; com.android.bluetooth.hfpclient.connserv.HfpClientConnection connection = new com.android.bluetooth.hfpclient.connserv.HfpClientConnection ( this , device , mHeadsetProfile , call , number ) ; mConnections.put ( connection.getUUID ( ) , connection ) ; return connection ; }
Source:
void removeService ( int serverIf , int srvcType , int srvcInstanceId , java.util.UUID srvcUuid ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "removeService() - uuid=" + srvcUuid ) ) ; int srvcHandle = mHandleMap.getServiceHandle ( srvcUuid , srvcType , srvcInstanceId ) ; if ( srvcHandle == 0 ) return ; gattServerDeleteServiceNative ( serverIf , srvcHandle ) ; }

Target:
void removeService ( int serverIf , int handle ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "removeService() - handle=" + handle ) ) ; gattServerDeleteServiceNative ( serverIf , handle ) ; }
Source:
private void fillBucketFromSummaryEntry ( android.app.usage.NetworkStats.Bucket bucketOut ) { bucketOut.mUid = android.app.usage.NetworkStats.Bucket.convertUid ( mRecycledSummaryEntry.uid ) ; bucketOut.mTag = android.app.usage.NetworkStats.Bucket.convertTag ( mRecycledSummaryEntry.tag ) ; bucketOut.mState = android.app.usage.NetworkStats.Bucket.convertState ( mRecycledSummaryEntry.set ) ; bucketOut.mRoaming = android.app.usage.NetworkStats.Bucket.convertRoaming ( mRecycledSummaryEntry.roaming ) ; bucketOut.mBeginTimeStamp = mStartTimeStamp ; bucketOut.mEndTimeStamp = mEndTimeStamp ; bucketOut.mRxBytes = mRecycledSummaryEntry.rxBytes ; bucketOut.mRxPackets = mRecycledSummaryEntry.rxPackets ; bucketOut.mTxBytes = mRecycledSummaryEntry.txBytes ; bucketOut.mTxPackets = mRecycledSummaryEntry.txPackets ; }

Target:
private void fillBucketFromSummaryEntry ( android.app.usage.NetworkStats.Bucket bucketOut ) { bucketOut.mUid = android.app.usage.NetworkStats.Bucket.convertUid ( mRecycledSummaryEntry.uid ) ; bucketOut.mTag = android.app.usage.NetworkStats.Bucket.convertTag ( mRecycledSummaryEntry.tag ) ; bucketOut.mState = android.app.usage.NetworkStats.Bucket.convertState ( mRecycledSummaryEntry.set ) ; bucketOut.mMetered = android.app.usage.NetworkStats.Bucket.METERED_ALL ; bucketOut.mRoaming = android.app.usage.NetworkStats.Bucket.convertRoaming ( mRecycledSummaryEntry.roaming ) ; bucketOut.mBeginTimeStamp = mStartTimeStamp ; bucketOut.mEndTimeStamp = mEndTimeStamp ; bucketOut.mRxBytes = mRecycledSummaryEntry.rxBytes ; bucketOut.mRxPackets = mRecycledSummaryEntry.rxPackets ; bucketOut.mTxBytes = mRecycledSummaryEntry.txBytes ; bucketOut.mTxPackets = mRecycledSummaryEntry.txPackets ; }
Source:
public void visitClass ( com.intellij.psi.PsiClass psiClass ) { if ( ! ( isEndpointClass ( psiClass ) ) ) { return ; } com.intellij.psi.PsiMethod [ ] allConstructors = psiClass.getConstructors ( ) ; if ( ( allConstructors.length ) == 0 ) { return ; } for ( com.intellij.psi.PsiMethod aConstructor : allConstructors ) { if ( isPublicNullaryConstructor ( aConstructor ) ) { return ; } } holder.registerProblem ( psiClass , "Each class that is within an API must have a public nullary constructor." , new com.google.gct.intellij.endpoints.validation.ConstructorInspection.MyQuickFix ( psiClass ) ) ; }

Target:
public void visitClass ( com.intellij.psi.PsiClass psiClass ) { if ( ! ( isEndpointClass ( psiClass ) ) ) { return ; } com.intellij.psi.PsiMethod [ ] allConstructors = psiClass.getConstructors ( ) ; if ( ( allConstructors.length ) == 0 ) { return ; } for ( com.intellij.psi.PsiMethod aConstructor : allConstructors ) { if ( isPublicNullaryConstructor ( aConstructor ) ) { return ; } } holder.registerProblem ( psiClass , "Each class that is within an API must have a public nullary constructor." , new com.google.gct.idea.appengine.validation.ConstructorInspection.MyQuickFix ( psiClass ) ) ; }
Source:
private void cachePackageCodeLocation ( android.content.pm.PackageInfo info , int userId ) { com.android.server.pm.dex.DexManager.PackageCodeLocations pcl = mPackageCodeLocationsCache.get ( info.packageName ) ; if ( pcl != null ) { pcl.mergeAppDataDirs ( info.applicationInfo , userId ) ; } else { mPackageCodeLocationsCache.put ( info.packageName , new com.android.server.pm.dex.DexManager.PackageCodeLocations ( info.applicationInfo , userId ) ) ; } }

Target:
public void notifyPackageDataDestroyed ( java.lang.String packageName , int userId ) { boolean updated = ( userId == ( android.os.UserHandle.USER_ALL ) ) ? mPackageDexUsage.removePackage ( packageName ) : mPackageDexUsage.removeUserPackage ( packageName , userId ) ; if ( updated ) { mPackageDexUsage.maybeWriteAsync ( ) ; } }