auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void onInstallSelectedArchives ( ) { java.util.ArrayList < com.android.sdklib.internal.repository.Archive > archives = new java.util.ArrayList < com.android.sdklib.internal.repository.Archive > ( ) ; for ( java.lang.Object element : mTreeViewerSources.getCheckedElements ( ) ) { if ( element instanceof com.android.sdklib.internal.repository.Archive ) { archives.add ( ( ( com.android.sdklib.internal.repository.Archive ) ( element ) ) ) ; } } if ( ( mUpdaterData ) != null ) { mUpdaterData.updateOrInstallAll ( archives ) ; } }

Target:
private void onInstallSelectedArchives ( ) { java.util.ArrayList < com.android.sdklib.internal.repository.Archive > archives = new java.util.ArrayList < com.android.sdklib.internal.repository.Archive > ( ) ; for ( java.lang.Object element : mTreeViewerSources.getCheckedElements ( ) ) { if ( element instanceof com.android.sdklib.internal.repository.Archive ) { archives.add ( ( ( com.android.sdklib.internal.repository.Archive ) ( element ) ) ) ; } } if ( ( mUpdaterData ) != null ) { mUpdaterData.updateOrInstallAll_WithGUI ( archives ) ; } }
Source:
private void dumpJackLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.VFS baseVFS ) { try { @ java.lang.SuppressWarnings ( value = "resource" ) com.android.sched.vfs.OutputVFS goVFS = new com.android.sched.vfs.GenericOutputVFS ( baseVFS ) ; com.android.sched.vfs.OutputVFile libraryPropertiesOut = goVFS.getRootOutputVDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES , '/' ) ) ; try ( java.io.OutputStream os = libraryPropertiesOut.getOutputStream ( ) ) { jackLibraryProperties.store ( os , "Library Properties" ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseException ( libraryPropertiesOut , e ) ; } } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotCloseException e ) { throw new com.android.jill.JillException ( e ) ; } }

Target:
private void dumpJackLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.VFS baseVFS ) { try { @ java.lang.SuppressWarnings ( value = "resource" ) com.android.sched.vfs.OutputVFS goVFS = new com.android.sched.vfs.GenericOutputVFS ( baseVFS ) ; com.android.sched.vfs.OutputVFile libraryPropertiesOut = goVFS.getRootDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES , '/' ) ) ; try ( java.io.OutputStream os = libraryPropertiesOut.getOutputStream ( ) ) { jackLibraryProperties.store ( os , "Library Properties" ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseException ( libraryPropertiesOut , e ) ; } } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotCloseException e ) { throw new com.android.jill.JillException ( e ) ; } }
Source:
public boolean isConnected ( int sessionId , int serviceType , int callType ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { return mImsServiceProxy.isConnected ( sessionId , serviceType , callType ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "isServiceConnected()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public boolean isOpened ( ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { return mImsServiceProxy.isOpened ( ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "isOpened()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public boolean p2pFind ( int timeout ) { if ( timeout <= 0 ) { return p2pFind ( ) ; } if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.find ( timeout ) ; } else { return doBooleanCommand ( ( "P2P_FIND " + timeout ) ) ; } }

Target:
public boolean p2pFind ( int timeout ) { if ( timeout <= 0 ) { return p2pFind ( ) ; } if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.find ( timeout ) ; } else { return doBooleanCommand ( ( "P2P_FIND " + timeout ) ) ; } }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { org.eclipse.core.resources.IFile file = mEditor.getEditorDelegate ( ) . getEditor ( ) . getInputFile ( ) ; if ( file != null ) { com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.showErrors ( getShell ( ) , file ) ; } }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor editor = mEditor.getEditorDelegate ( ) . getEditor ( ) ; org.eclipse.core.resources.IFile file = editor.getInputFile ( ) ; if ( file != null ) { com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.showErrors ( getShell ( ) , file , editor ) ; } }
Source:
private void operationComplete ( ) { ( pendingOperations ) -- ; if ( com.android.internal.telephony.cdma.CdmaCallTracker.DBG_POLL ) log ( ( ( ( "operationComplete: pendingOperations=" + ( pendingOperations ) ) + ", needsPoll=" ) + ( needsPoll ) ) ) ; if ( ( ( pendingOperations ) == 0 ) && ( needsPoll ) ) { lastRelevantPoll = obtainMessage ( com.android.internal.telephony.cdma.EVENT_POLL_CALLS_RESULT ) ; cm.getCurrentCalls ( lastRelevantPoll ) ; } else if ( ( pendingOperations ) < 0 ) { android.util.Log.e ( com.android.internal.telephony.cdma.CdmaCallTracker.LOG_TAG , "CdmaCallTracker.pendingOperations < 0" ) ; pendingOperations = 0 ; } }

Target:
private void operationComplete ( ) { ( pendingOperations ) -- ; if ( com.android.internal.telephony.cdma.CdmaCallTracker.DBG_POLL ) log ( ( ( ( "operationComplete: pendingOperations=" + ( pendingOperations ) ) + ", needsPoll=" ) + ( needsPoll ) ) ) ; if ( ( ( pendingOperations ) == 0 ) && ( needsPoll ) ) { lastRelevantPoll = obtainMessage ( com.android.internal.telephony.cdma.EVENT_POLL_CALLS_RESULT ) ; cm.getCurrentCalls ( lastRelevantPoll ) ; } else if ( ( pendingOperations ) < 0 ) { android.telephony.Rlog.e ( com.android.internal.telephony.cdma.CdmaCallTracker.LOG_TAG , "CdmaCallTracker.pendingOperations < 0" ) ; pendingOperations = 0 ; } }
Source:
public static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { android.support.test.uiautomator.UiDevice device = android.support.test.uiautomator.UiDevice.getInstance ( instrumentation ) ; if ( ( com.android.devtools.systemimage.uitest.utils.SystemUtil.getApiLevel ( ) ) >= 26 ) { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps & notifications" ) ; device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( "App info" ) ) . clickAndWaitForNewWindow ( ) ; } else { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps" ) ; } }

Target:
public static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { android.support.test.uiautomator.UiDevice device = android.support.test.uiautomator.UiDevice.getInstance ( instrumentation ) ; if ( ( com.android.devtools.systemimage.uitest.utils.SystemUtil.getApiLevel ( ) ) >= 26 ) { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps & notifications" ) ; java.lang.String appInfo = ( ( com.android.devtools.systemimage.uitest.utils.SystemUtil.getApiLevel ( ) ) == 26 ) ? "App info" : "See all" ; device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textContains ( appInfo ) ) . clickAndWaitForNewWindow ( ) ; } else { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps" ) ; } }
Source:
public void test_unmodifiableList_sort ( ) { try { java.util.Collections.unmodifiableList ( new java.util.ArrayList < > ( ) ) . sort ( ( k1 , k2 ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } try { java.util.ArrayList l = new java.util.ArrayList ( ) ; l.add ( 1 ) ; l.add ( 2 ) ; java.util.Collections.unmodifiableList ( l ) . sort ( ( k1 , k2 ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } }

Target:
public void test_EmptyList_sort ( ) { java.util.Collections.emptyList ( ) . sort ( ( k1 , k2 ) -> 1 ) ; }
Source:
public void computeScroll ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { computeScroll ( ) ; } } ) ; return ; } mAwContents.computeScroll ( ) ; }

Target:
public boolean overlayHorizontalScrollbar ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return overlayHorizontalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayHorizontalScrollbar ( ) ; }
Source:
public int is_hardware_backed ( ) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain ( ) ; android.os.Parcel _reply = android.os.Parcel.obtain ( ) ; int _result ; try { _data.writeInterfaceToken ( android.security.IKeystoreService.Stub.DESCRIPTOR ) ; mRemote.transact ( android.security.IKeystoreService.Stub.TRANSACTION_is_hardware_backed , _data , _reply , 0 ) ; _reply.readException ( ) ; _result = _reply.readInt ( ) ; } finally { _reply.recycle ( ) ; _data.recycle ( ) ; } return _result ; }

Target:
public int is_hardware_backed ( java.lang.String keyType ) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain ( ) ; android.os.Parcel _reply = android.os.Parcel.obtain ( ) ; int _result ; try { _data.writeInterfaceToken ( android.security.IKeystoreService.Stub.DESCRIPTOR ) ; _data.writeString ( keyType ) ; mRemote.transact ( android.security.IKeystoreService.Stub.TRANSACTION_is_hardware_backed , _data , _reply , 0 ) ; _reply.readException ( ) ; _result = _reply.readInt ( ) ; } finally { _reply.recycle ( ) ; _data.recycle ( ) ; } return _result ; }
Source:
public void addConnectionServiceAdapter ( com.android.internal.telecom.IConnectionServiceAdapter adapter ) { mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_ADD_CONNECTION_SERVICE_ADAPTER , adapter ) . sendToTarget ( ) ; }

Target:
public void addConnectionServiceAdapter ( com.android.internal.telecom.IConnectionServiceAdapter adapter , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , android.telecom.ConnectionService.SESSION_ADD_CS_ADAPTER ) ; try { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = adapter ; args.arg2 = android.telecom.Log.createSubsession ( ) ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_ADD_CONNECTION_SERVICE_ADAPTER , args ) . sendToTarget ( ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void migrateAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.migrateAppData ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void migrateAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.migrateAppData ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public int computeChecksum ( com.android.dx.io.DexBuffer dex ) throws java.io.IOException { java.util.zip.Adler32 adler32 = new java.util.zip.Adler32 ( ) ; int offset = ( com.android.dx.io.DexHasher.CHECKSUM_OFFSET ) + ( com.android.dx.io.DexHasher.CHECKSUM_SIZE ) ; byte [ ] bytes = dex.getBytes ( ) ; adler32.update ( bytes , offset , ( ( bytes.length ) - offset ) ) ; return ( ( int ) ( adler32.getValue ( ) ) ) ; }

Target:
public int computeChecksum ( com.android.dex.Dex dex ) throws java.io.IOException { java.util.zip.Adler32 adler32 = new java.util.zip.Adler32 ( ) ; int offset = ( com.android.dx.io.DexHasher.CHECKSUM_OFFSET ) + ( com.android.dx.io.DexHasher.CHECKSUM_SIZE ) ; byte [ ] bytes = dex.getBytes ( ) ; adler32.update ( bytes , offset , ( ( bytes.length ) - offset ) ) ; return ( ( int ) ( adler32.getValue ( ) ) ) ; }
Source:
private boolean checkReadPhoneState ( java.lang.String callingPackage , java.lang.String message ) { try { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , message ) ; return true ; } catch ( java.lang.SecurityException e ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , message ) ; } return ( mAppOps.noteOp ( AppOpsManager.OP_READ_PHONE_STATE , android.os.Binder.getCallingUid ( ) , callingPackage ) ) == ( android.app.AppOpsManager.MODE_ALLOWED ) ; }

Target:
public java.lang.String getGroupIdLevel1ForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getGroupIdLevel1" ) ) ) { return null ; } return phone.getGroupIdLevel1 ( ) ; } else { loge ( ( "getGroupIdLevel1 phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
public long getVtDataUsage ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getVtDataUsage ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling getVtDataUsage" , e ) ; } return 0 ; }

Target:
public android.net.NetworkStats getVtDataUsage ( boolean perUidStats ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getVtDataUsage ( getSubId ( ) , perUidStats ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getVtDataUsage" , e ) ; } return null ; }
Source:
public void test_getRelativeDateTimeString ( ) { assertNotNull ( android.text.format.DateUtils.getRelativeDateTimeString ( mContext , ( ( mBaseTime ) - ( android.text.format.cts.DateUtilsTest.DAY_DURATION ) ) , DateUtils.MINUTE_IN_MILLIS , DateUtils.DAY_IN_MILLIS , DateUtils.FORMAT_NUMERIC_DATE ) ) ; }

Target:
public void test_getRelativeDateTimeString ( ) { final long DAY_DURATION = ( ( ( 5 * 24 ) * 60 ) * 60 ) * 1000 ; assertNotNull ( android.text.format.DateUtils.getRelativeDateTimeString ( mContext , ( ( mBaseTime ) - DAY_DURATION ) , DateUtils.MINUTE_IN_MILLIS , DateUtils.DAY_IN_MILLIS , DateUtils.FORMAT_NUMERIC_DATE ) ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( "ScoredNetwork[key=" + ( networkKey ) ) + ",score=" ) + ( rssiCurve ) ) + ",meteredHint=" ) + ( meteredHint ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( "ScoredNetwork{" + "networkKey=" ) + ( networkKey ) ) + ", rssiCurve=" ) + ( rssiCurve ) ) + ", meteredHint=" ) + ( meteredHint ) ) + ", attributes=" ) + ( attributes ) ) + '}' ; }
Source:
public void testManifestIExistingI ( ) { int iFlags = PackageManager.INSTALL_INTERNAL ; int rFlags = PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_internal , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; }

Target:
public void testManifestIExistingI ( ) { int iFlags = android.content.pm.PackageManager.INSTALL_INTERNAL ; int rFlags = android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_internal , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; }
Source:
public void testAnalytics ( ) 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/values/analytics.xml:13: Error: Class referenced in the analytics file, com.example.app.BaseActivity, was not found in the project or the libraries [MissingRegistered]\n" + " <string name=\"com.example.app.BaseActivity\">Home</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/values/analytics.xml:14: Error: Class referenced in the analytics file, com.example.app.PrefsActivity, was not found in the project or the libraries [MissingRegistered]\n" ) + " <string name=\"com.example.app.PrefsActivity\">Preferences</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "res/values/analytics.xml" , "bytecode/OnClickActivity.java.txt=>src/test/pkg/OnClickActivity.java" , "bytecode/OnClickActivity.class.data=>bin/classes/test/pkg/OnClickActivity.class" ) ) ; }

Target:
public void testAnalytics ( ) 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/values/analytics.xml:13: Error: Class referenced in the analytics file, com.example.app.BaseActivity, was not found in the project or the libraries [MissingRegistered]\n" + " <string name=\"com.example.app.BaseActivity\">Home</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/values/analytics.xml:14: Error: Class referenced in the analytics file, com.example.app.PrefsActivity, was not found in the project or the libraries [MissingRegistered]\n" ) + " <string name=\"com.example.app.PrefsActivity\">Preferences</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "res/values/analytics.xml" , "bytecode/OnClickActivity.java.txt=>src/test/pkg/OnClickActivity.java" , "bytecode/OnClickActivity.class.data=>bin/classes/test/pkg/OnClickActivity.class" ) ) ; }
Source:
private int getUrlChoice ( ) { if ( useProd.isSelected ( ) ) { return 0 ; } if ( useStaging.isSelected ( ) ) { return 1 ; } if ( useTest.isSelected ( ) ) { return 2 ; } if ( useCustom.isSelected ( ) ) { return 3 ; } throw new java.lang.RuntimeException ( "No URL option is selected!" ) ; }

Target:
private java.lang.String getTestBackendUrl ( ) { switch ( getBackendOption ( ) ) { case PROD : return prodUrlField.getText ( ) ; case STAGING : return stagingUrlField.getText ( ) ; case TEST : return testUrlField.getText ( ) ; case CUSTOM : return customUrlField.getText ( ) ; default : throw new java.lang.RuntimeException ( "No URL option is selected!" ) ; } }
Source:
public void requestNetwork ( android.net.NetworkRequest request , android.net.ConnectivityManager.NetworkCallback networkCallback , int timeoutMs , android.os.Handler handler ) { int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; android.net.ConnectivityManager.CallbackHandler cbHandler = new android.net.ConnectivityManager.CallbackHandler ( handler ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , cbHandler ) ; }

Target:
public void requestNetwork ( android.net.NetworkRequest request , int timeoutMs , android.net.ConnectivityManager.NetworkCallback networkCallback , android.os.Handler handler ) { if ( timeoutMs <= 0 ) { throw new java.lang.IllegalArgumentException ( "Non-positive timeoutMs" ) ; } int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; android.net.ConnectivityManager.CallbackHandler cbHandler = new android.net.ConnectivityManager.CallbackHandler ( handler ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , cbHandler ) ; }
Source:
public void testShowWhenLockedActivity ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; pressHomeButton ( ) ; unlockDevice ( ) ; }

Target:
public void testShowWhenLockedActivity ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; pressHomeButton ( ) ; unlockDevice ( ) ; }
Source:
public com.android.server.wifi.WifiConnectivityManager makeWifiConnectivityManager ( android.net.wifi.WifiInfo wifiInfo , boolean hasConnectionRequests ) { return new com.android.server.wifi.WifiConnectivityManager ( mContext , mWifiStateMachine , getWifiScanner ( ) , mWifiConfigManager , wifiInfo , mWifiNetworkSelector , mWifiNetworkScoreCache , mWifiLastResortWatchdog , mWifiMetrics , mWifiStateMachineHandlerThread.getLooper ( ) , mClock , hasConnectionRequests ) ; }

Target:
public com.android.server.wifi.WifiConnectivityManager makeWifiConnectivityManager ( android.net.wifi.WifiInfo wifiInfo , boolean hasConnectionRequests ) { return new com.android.server.wifi.WifiConnectivityManager ( mContext , mWifiStateMachine , getWifiScanner ( ) , mWifiConfigManager , wifiInfo , mWifiNetworkSelector , mWifiLastResortWatchdog , mWifiMetrics , mWifiStateMachineHandlerThread.getLooper ( ) , mClock , hasConnectionRequests , mFrameworkFacade , mSavedNetworkEvaluator , mExternalScoreEvaluator , mRecommendedNetworkEvaluator ) ; }
Source:
public java.nio.channels.FileChannel truncate ( long size ) throws java.io.IOException { checkOpen ( ) ; if ( size < 0 ) { throw new java.lang.IllegalArgumentException ( ( "size: " + size ) ) ; } checkWritable ( ) ; if ( size < ( size ( ) ) ) { try { Libcore.os.ftruncate ( fd , size ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } } return this ; }

Target:
public java.nio.channels.FileChannel truncate ( long size ) throws java.io.IOException { checkOpen ( ) ; if ( size < 0 ) { throw new java.lang.IllegalArgumentException ( ( "size < 0: " + size ) ) ; } checkWritable ( ) ; if ( size < ( size ( ) ) ) { try { Libcore.os.ftruncate ( fd , size ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } } return this ; }
Source:
public E remove ( int index ) { synchronized ( l.lock ) { rangeCheck ( index ) ; checkForComodification ( ) ; E result = l.remove ( ( index + ( offset ) ) ) ; expectedArray = l.getArray ( ) ; ( size ) -- ; return result ; } }

Target:
public boolean addAll ( int index , java.util.Collection < ? extends E > collection ) { synchronized ( this ) { slice.checkPositionIndex ( index ) ; slice.checkConcurrentModification ( elements ) ; int oldSize = elements.length ; boolean result = this . addAll ( ( index + ( slice.from ) ) , collection ) ; slice = new java.util.concurrent.CopyOnWriteArrayList.Slice ( elements , slice.from , ( ( slice.to ) + ( ( elements.length ) - oldSize ) ) ) ; return result ; } }
Source:
public int [ ] getUpstreamIfaceTypes ( ) { updateConfiguration ( ) ; final java.util.Collection < java.lang.Integer > upstreams = mConfig.preferredUpstreamIfaceTypes ; final int [ ] values = new int [ upstreams.size ( ) ] ; int i = 0 ; for ( java.lang.Integer u : upstreams ) { values [ ( i ++ ) ] = u.intValue ( ) ; } return values ; }

Target:
public boolean hasTetherableConfiguration ( ) { final com.android.server.connectivity.Tethering.TetheringConfiguration cfg = mConfig ; final boolean hasDownstreamConfiguration = ( ( ( cfg.tetherableUsbRegexs.length ) != 0 ) || ( ( cfg.tetherableWifiRegexs.length ) != 0 ) ) || ( ( cfg.tetherableBluetoothRegexs.length ) != 0 ) ; final boolean hasUpstreamConfiguration = ! ( cfg.preferredUpstreamIfaceTypes.isEmpty ( ) ) ; return hasDownstreamConfiguration && hasUpstreamConfiguration ; }
Source:
public final void testPkgTypeTool ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_TOOLS ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertTrue ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeTool ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_TOOLS ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertTrue ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public void testDoesNothingBeforeStarted ( ) { com.android.server.connectivity.tethering.UpstreamNetworkMonitor unm = new com.android.server.connectivity.tethering.UpstreamNetworkMonitor ( null , null , com.android.server.connectivity.tethering.UpstreamNetworkMonitorTest.EVENT_UNM_UPDATE ) ; org.junit.Assert.assertFalse ( unm.mobileNetworkRequested ( ) ) ; unm.mobileUpstreamRequiresDun ( true ) ; unm.mobileUpstreamRequiresDun ( false ) ; }

Target:
public void testDoesNothingBeforeStarted ( ) { org.junit.Assert.assertTrue ( mCM.hasNoCallbacks ( ) ) ; org.junit.Assert.assertFalse ( mUNM.mobileNetworkRequested ( ) ) ; mUNM.updateMobileRequiresDun ( true ) ; org.junit.Assert.assertTrue ( mCM.hasNoCallbacks ( ) ) ; mUNM.updateMobileRequiresDun ( false ) ; org.junit.Assert.assertTrue ( mCM.hasNoCallbacks ( ) ) ; }
Source:
private void onRequestPasskeyConfirmation ( java.lang.String objectPath , int passkey , int nativeData ) { java.lang.String address = checkPairingRequestAndGetAddress ( objectPath , nativeData ) ; if ( address == null ) return ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mAdapter.getRemoteDevice ( address ) ) ; intent.putExtra ( BluetoothDevice.EXTRA_PASSKEY , passkey ) ; intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , BluetoothDevice.PAIRING_VARIANT_PASSKEY_CONFIRMATION ) ; mContext.sendBroadcast ( intent , android.server.BluetoothEventLoop.BLUETOOTH_ADMIN_PERM ) ; return ; }

Target:
private void onRequestPasskeyConfirmation ( java.lang.String objectPath , int passkey , int nativeData ) { java.lang.String address = checkPairingRequestAndGetAddress ( objectPath , nativeData ) ; if ( address == null ) return ; mWakeLock.acquire ( ) ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mAdapter.getRemoteDevice ( address ) ) ; intent.putExtra ( BluetoothDevice.EXTRA_PASSKEY , passkey ) ; intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , BluetoothDevice.PAIRING_VARIANT_PASSKEY_CONFIRMATION ) ; mContext.sendBroadcast ( intent , android.server.BluetoothEventLoop.BLUETOOTH_ADMIN_PERM ) ; mWakeLock.release ( ) ; return ; }
Source:
private void recordBrowserProcessHistogram ( ) { if ( org.chromium.base.library_loader.Linker.getInstance ( ) . isUsed ( ) ) { nativeRecordChromiumAndroidLinkerBrowserHistogram ( mIsUsingBrowserSharedRelros , mLoadAtFixedAddressFailed , getLibraryLoadFromApkStatus ( ) , mLibraryLoadTimeMs ) ; } if ( ( org.chromium.base.library_loader.LibraryLoader.sLibraryPreloader ) != null ) { nativeRecordLibraryPreloaderBrowserHistogram ( mLibraryPreloaderStatus ) ; } }

Target:
private void recordBrowserProcessHistogram ( android.content.Context context ) { if ( org.chromium.base.library_loader.Linker.getInstance ( ) . isUsed ( ) ) { nativeRecordChromiumAndroidLinkerBrowserHistogram ( mIsUsingBrowserSharedRelros , mLoadAtFixedAddressFailed , getLibraryLoadFromApkStatus ( context ) , mLibraryLoadTimeMs ) ; } if ( ( org.chromium.base.library_loader.LibraryLoader.sLibraryPreloader ) != null ) { nativeRecordLibraryPreloaderBrowserHistogram ( mLibraryPreloaderStatus ) ; } }
Source:
private synchronized void initializeAccessControl ( ) { synchronized ( mLock ) { if ( ( mAccessControlEnforcer ) == null ) { mAccessControlEnforcer = new com.android.se.security.AccessControlEnforcer ( this ) ; } mAccessControlEnforcer.initialize ( true ) ; } }

Target:
private synchronized void initializeAccessControl ( ) throws java.io.IOException , java.util.MissingResourceException { synchronized ( mLock ) { if ( ( mAccessControlEnforcer ) == null ) { mAccessControlEnforcer = new com.android.se.security.AccessControlEnforcer ( this ) ; } try { mAccessControlEnforcer.initialize ( ) ; } catch ( java.io.IOException | java.util.MissingResourceException e ) { mAccessControlEnforcer = null ; throw e ; } } }
Source:
public java.io.InputStream getInput ( ) throws java.io.IOException { java.io.InputStream in = supplier.getInput ( ) ; if ( offset > 0 ) { try { com.google.common.io.ByteStreams.skipFully ( in , offset ) ; } catch ( java.io.IOException e ) { com.google.common.io.Closeables.closeQuietly ( in ) ; throw e ; } } return new com.google.common.io.LimitInputStream ( in , length ) ; }

Target:
public static < T > T readBytes ( java.io.InputStream input , com.google.common.io.ByteProcessor < T > processor ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( input ) ; com.google.common.base.Preconditions.checkNotNull ( processor ) ; byte [ ] buf = new byte [ com.google.common.io.ByteStreams.BUF_SIZE ] ; int read ; do { read = input.read ( buf ) ; } while ( ( read != ( - 1 ) ) && ( processor.processBytes ( buf , 0 , read ) ) ) ; return processor.getResult ( ) ; }
Source:
static < E > boolean setCountImpl ( com.google.common.collect.Multiset < E > self , E element , int oldCount , int newCount ) { com.google.common.collect.Multisets.checkNonnegative ( oldCount , "oldCount" ) ; com.google.common.collect.Multisets.checkNonnegative ( newCount , "newCount" ) ; if ( ( self.count ( element ) ) == oldCount ) { self.setCount ( element , newCount ) ; return true ; } else { return false ; } }

Target:
static < E > boolean setCountImpl ( com.google.common.collect.Multiset < E > self , E element , int oldCount , int newCount ) { com.google.common.collect.CollectPreconditions.checkNonnegative ( oldCount , "oldCount" ) ; com.google.common.collect.CollectPreconditions.checkNonnegative ( newCount , "newCount" ) ; if ( ( self.count ( element ) ) == oldCount ) { self.setCount ( element , newCount ) ; return true ; } else { return false ; } }
Source:
public void testNewSmsFromBlockedNumber_noBroadcastsSent ( ) { java.lang.String blockedNumber = "123456789" ; doReturn ( blockedNumber ) . when ( mInboundSmsTracker ) . getAddress ( ) ; mFakeBlockedNumberContentProvider.mBlockedNumbers.add ( blockedNumber ) ; transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_NEW_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verify ( mContext , never ( ) ) . sendBroadcast ( any ( android.content.Intent.class ) ) ; assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }

Target:
public void testNewSmsFromBlockedNumber_noBroadcastsSent ( ) { java.lang.String blockedNumber = "1234567890" ; doReturn ( blockedNumber ) . when ( mInboundSmsTracker ) . getDisplayAddress ( ) ; mFakeBlockedNumberContentProvider.mBlockedNumbers.add ( blockedNumber ) ; transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_NEW_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verify ( mContext , never ( ) ) . sendBroadcast ( any ( android.content.Intent.class ) ) ; assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }
Source:
public void testHasTransformer_ParameterWithoutTransformer ( ) { initializePsiClass ( false , false ) ; mockPsiMethod = org.mockito.Mockito.mock ( com.google.gct.intellij.endpoints.validation.PsiMethod.class ) ; org.mockito.Mockito.when ( mockPsiMethod.getParent ( ) ) . thenReturn ( mockPsiClass ) ; mockPsiParameter = org.mockito.Mockito.mock ( com.google.gct.intellij.endpoints.validation.PsiParameter.class ) ; org.mockito.Mockito.when ( mockPsiParameter.getParent ( ) ) . thenReturn ( mockPsiMethod ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.EndpointPsiElementVisitor endpointPsiElementVisitor = new com.google.gct.intellij.endpoints.validation.EndpointPsiElementVisitor ( ) ; junit.framework.Assert.assertFalse ( endpointPsiElementVisitor.hasTransformer ( mockPsiParameter ) ) ; }

Target:
public void testHasTransformer_ParameterWithoutTransformer ( ) { initializePsiClass ( false , false ) ; mockPsiMethod = org.mockito.Mockito.mock ( com.google.gct.idea.appengine.validation.PsiMethod.class ) ; org.mockito.Mockito.when ( mockPsiMethod.getParent ( ) ) . thenReturn ( mockPsiClass ) ; mockPsiParameter = org.mockito.Mockito.mock ( com.google.gct.idea.appengine.validation.PsiParameter.class ) ; org.mockito.Mockito.when ( mockPsiParameter.getParent ( ) ) . thenReturn ( mockPsiMethod ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.EndpointPsiElementVisitor endpointPsiElementVisitor = new com.google.gct.idea.appengine.validation.EndpointPsiElementVisitor ( ) ; junit.framework.Assert.assertFalse ( endpointPsiElementVisitor.hasTransformer ( mockPsiParameter ) ) ; }
Source:
private void broadcastFolderList ( java.lang.String id , java.util.ArrayList < android.media.browse.MediaBrowser.MediaItem > items ) { android.content.Intent intent = new android.content.Intent ( AvrcpControllerService.ACTION_FOLDER_LIST ) ; android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.TAG , ( ( ( "broadcastFolderList id " + id ) + " items " ) + items ) ) ; intent.putExtra ( AvrcpControllerService.EXTRA_FOLDER_ID , id ) ; intent.putParcelableArrayListExtra ( AvrcpControllerService.EXTRA_FOLDER_LIST , items ) ; mContext.sendBroadcast ( intent , ProfileService.BLUETOOTH_PERM ) ; }

Target:
private void broadcastFolderList ( java.lang.String id , java.util.ArrayList < android.media.browse.MediaBrowser.MediaItem > items ) { android.content.Intent intent = new android.content.Intent ( AvrcpControllerService.ACTION_FOLDER_LIST ) ; if ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.VDBG ) android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.TAG , ( ( ( "broadcastFolderList id " + id ) + " items " ) + items ) ) ; intent.putExtra ( AvrcpControllerService.EXTRA_FOLDER_ID , id ) ; intent.putParcelableArrayListExtra ( AvrcpControllerService.EXTRA_FOLDER_LIST , items ) ; mContext.sendBroadcast ( intent , ProfileService.BLUETOOTH_PERM ) ; }
Source:
public void writeExternal ( org.jdom.Element element ) throws com.intellij.openapi.util.WriteExternalException { super . writeExternal ( element ) ; writeModule ( element ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_SDK_PATH , com.intellij.execution.ExternalizablePath.urlValue ( mySdkPath ) ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_SERVER_PORT , myServerPort ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_VM_ARGS , myVmArgs ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_WAR_PATH , myWarPath ) ; com.intellij.openapi.components.PathMacroManager.getInstance ( getProject ( ) ) . collapsePathsRecursively ( element ) ; }

Target:
public void writeExternal ( org.jdom.Element element ) throws com.intellij.openapi.util.WriteExternalException { super . writeExternal ( element ) ; writeModule ( element ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_SERVER_ADDRESS , myServerAddress ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_SDK_PATH , com.intellij.execution.ExternalizablePath.urlValue ( mySdkPath ) ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_SERVER_PORT , myServerPort ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_VM_ARGS , myVmArgs ) ; com.intellij.openapi.util.JDOMExternalizer.write ( element , com.google.gct.idea.appengine.run.AppEngineRunConfiguration.KEY_WAR_PATH , myWarPath ) ; com.intellij.openapi.components.PathMacroManager.getInstance ( getProject ( ) ) . collapsePathsRecursively ( element ) ; }
Source:
private static javax.net.ssl.X509TrustManager findFirstX509TrustManager ( javax.net.ssl.TrustManager [ ] tms ) { for ( javax.net.ssl.TrustManager tm : tms ) { if ( tm instanceof javax.net.ssl.X509TrustManager ) { return ( ( javax.net.ssl.X509TrustManager ) ( tm ) ) ; } } return null ; }

Target:
private static javax.net.ssl.X509ExtendedTrustManager findFirstX509TrustManager ( javax.net.ssl.TrustManager [ ] tms ) throws java.security.KeyManagementException { for ( javax.net.ssl.TrustManager tm : tms ) { if ( tm instanceof javax.net.ssl.X509ExtendedTrustManager ) { return ( ( javax.net.ssl.X509ExtendedTrustManager ) ( tm ) ) ; } if ( tm instanceof javax.net.ssl.X509TrustManager ) { return new org.conscrypt.X509ExtendedTrustManagerWrapper ( ( ( javax.net.ssl.X509TrustManager ) ( tm ) ) ) ; } } return null ; }
Source:
public java.lang.String getAbi ( ) { return null ; }

Target:
public java.util.List < java.lang.String > getAbis ( ) { java.util.List < java.lang.String > abis = com.google.common.collect.Lists.newArrayListWithExpectedSize ( 2 ) ; java.lang.String abi = iDevice.getProperty ( IDevice.PROP_DEVICE_CPU_ABI ) ; if ( abi != null ) { abis.add ( abi ) ; } abi = iDevice.getProperty ( IDevice.PROP_DEVICE_CPU_ABI2 ) ; if ( abi != null ) { abis.add ( abi ) ; } return abis ; }
Source:
private void reset ( ) { android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaCallTracker.LOG_TAG , "reset" ) ; clearDisconnected ( ) ; for ( com.android.internal.telephony.GsmCdmaConnection gsmCdmaConnection : mConnections ) { if ( gsmCdmaConnection != null ) { gsmCdmaConnection.dispose ( ) ; } } if ( ( mPendingMO ) != null ) { mPendingMO.dispose ( ) ; } mConnections = null ; mPendingMO = null ; mState = PhoneConstants.State.IDLE ; }

Target:
private void reset ( ) { android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaCallTracker.LOG_TAG , "reset" ) ; for ( com.android.internal.telephony.GsmCdmaConnection gsmCdmaConnection : mConnections ) { if ( gsmCdmaConnection != null ) { gsmCdmaConnection.onDisconnect ( DisconnectCause.ERROR_UNSPECIFIED ) ; gsmCdmaConnection.dispose ( ) ; } } if ( ( mPendingMO ) != null ) { mPendingMO.dispose ( ) ; } mConnections = null ; mPendingMO = null ; clearDisconnected ( ) ; }
Source:
public void dataCallListChanged ( int indicationType , java.util.ArrayList < android.hardware.radio.V1_0.SetupDataCallResult > dcList ) { mRil.processIndication ( indicationType ) ; java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > response = com.android.internal.telephony.RIL.convertHalDcList ( dcList ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED , response ) ; mRil.mDataCallListChangedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }

Target:
public void dataCallListChanged ( int indicationType , java.util.ArrayList < android.hardware.radio.V1_0.SetupDataCallResult > dcList ) { mRil.processIndication ( indicationType ) ; java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > response = new java.util.ArrayList < > ( ) ; for ( android.hardware.radio.V1_0.SetupDataCallResult dcResult : dcList ) { response.add ( com.android.internal.telephony.RIL.convertDataCallResult ( dcResult ) ) ; } if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED , response ) ; mRil.mDataCallListChangedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
void registerCallback ( com.android.bluetooth.avrcp.MediaPlayerWrapper.Callback callback ) { if ( callback == null ) { com.android.bluetooth.avrcp.MediaPlayerWrapper.e ( ( "Cannot register null callbacks for " + ( mPackageName ) ) ) ; return ; } synchronized ( mCallbackLock ) { mRegisteredCallback = callback ; } mControllerCallbacks = new com.android.bluetooth.avrcp.MediaPlayerWrapper.MediaControllerListener ( mLooper ) ; }

Target:
void registerCallback ( com.android.bluetooth.avrcp.MediaPlayerWrapper.Callback callback ) { if ( callback == null ) { com.android.bluetooth.avrcp.MediaPlayerWrapper.e ( ( "Cannot register null callbacks for " + ( mPackageName ) ) ) ; return ; } synchronized ( mCallbackLock ) { mRegisteredCallback = callback ; } mCurrentData = new com.android.bluetooth.avrcp.MediaData ( com.android.bluetooth.avrcp.Util.toMetadata ( getMetadata ( ) ) , getPlaybackState ( ) , com.android.bluetooth.avrcp.Util.toMetadataList ( getQueue ( ) ) ) ; mControllerCallbacks = new com.android.bluetooth.avrcp.MediaPlayerWrapper.MediaControllerListener ( mLooper ) ; }
Source:
private android.bluetooth.BluetoothGattCharacteristic getCharacteristic ( java.util.UUID uuid ) { android.bluetooth.BluetoothGattService service = getService ( ) ; if ( service == null ) return null ; android.bluetooth.BluetoothGattCharacteristic characteristic = service.getCharacteristic ( uuid ) ; if ( characteristic == null ) { showMessage ( "Characteristic not found" ) ; return null ; } return characteristic ; }

Target:
private android.bluetooth.BluetoothGattCharacteristic getCharacteristic ( java.util.UUID serverUid , java.util.UUID characteristicUid ) { android.bluetooth.BluetoothGattCharacteristic characteristic = null ; android.bluetooth.BluetoothGattService service = getService ( serverUid ) ; if ( service != null ) { characteristic = service.getCharacteristic ( characteristicUid ) ; if ( characteristic == null ) { showMessage ( "Characteristic not found" ) ; } } return characteristic ; }
Source:
private com.android.jack.ir.ast.JMethod findImplementationOrDefinition ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass receiverType ) { com.android.jack.ir.ast.JMethod implementation = findImplementation ( methodId , returnType , receiverType ) ; if ( implementation != null ) { return implementation ; } com.android.jack.ir.ast.JClass currentType = receiverType ; while ( currentType instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.ir.ast.JMethod definition = findDefinition ( methodId , returnType , ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( currentType ) ) ) ; if ( definition != null ) { return definition ; } currentType = ( ( com.android.jack.ir.ast.JDefinedClass ) ( currentType ) ) . getSuperClass ( ) ; } return null ; }

Target:
private com.android.jack.ir.ast.JMethod findImplementationOrDefinition ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodIdWide methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass receiverType ) { com.android.jack.ir.ast.JMethod implementation = findImplementation ( methodId , returnType , receiverType ) ; if ( implementation != null ) { return implementation ; } com.android.jack.ir.ast.JClass currentType = receiverType ; while ( currentType instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.ir.ast.JMethod definition = findDefinition ( methodId , returnType , ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( currentType ) ) ) ; if ( definition != null ) { return definition ; } currentType = ( ( com.android.jack.ir.ast.JDefinedClass ) ( currentType ) ) . getSuperClass ( ) ; } return null ; }
Source:
protected void shutdownInput ( ) throws java.io.IOException { if ( ( fd ) == null ) { throw new java.io.IOException ( "socket not created" ) ; } shutdown ( fd , true ) ; }

Target:
protected void shutdownInput ( ) throws java.io.IOException { if ( ( fd ) == null ) { throw new java.io.IOException ( "socket not created" ) ; } try { android.system.Os.shutdown ( fd , OsConstants.SHUT_RD ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }
Source:
private java.lang.String getFileUrlString ( java.lang.String filePath ) { int serverPort = fakeFtpServer.getServerControlPort ( ) ; java.lang.String urlString = java.lang.String.format ( java.util.Locale.US , "ftp://%s:%s@%s:%s/%s" , libcore.java.net.FtpURLConnectionTest.USER , libcore.java.net.FtpURLConnectionTest.PASSWORD , libcore.java.net.FtpURLConnectionTest.SERVER_HOSTNAME , serverPort , filePath ) ; return urlString ; }

Target:
private java.net.URL addFileEntry ( java.lang.String filePath , byte [ ] fileContents ) { org.mockftpserver.fake.filesystem.FileEntry fileEntry = new org.mockftpserver.fake.filesystem.FileEntry ( ( ( ( libcore.java.net.FtpURLConnectionTest.VALID_USER_HOME_DIR ) + "/" ) + filePath ) ) ; fileEntry.setContents ( fileContents ) ; fileSystem.add ( fileEntry ) ; return getFileUrlWithCredentials ( libcore.java.net.FtpURLConnectionTest.VALID_USER , libcore.java.net.FtpURLConnectionTest.VALID_PASSWORD , filePath ) ; }
Source:
public java.lang.String getSerialNumber ( ) { com.google.api.services.testing.model.AndroidDevice androidDevice = device.getAndroidDevice ( ) ; return ( ( ( ( ( ( ( androidDevice.getAndroidModelId ( ) ) + "-" ) + ( androidDevice.getAndroidVersionId ( ) ) ) + "-" ) + ( androidDevice.getLocale ( ) ) ) + "-" ) + ( androidDevice.getOrientation ( ) ) ) . toLowerCase ( ) ; }

Target:
public java.lang.String getEncodedConfigurationInstance ( ) { com.google.api.services.testing.model.AndroidDevice androidDevice = device.getAndroidDevice ( ) ; return ( ( ( ( ( ( androidDevice.getAndroidModelId ( ) ) + "-" ) + ( androidDevice.getAndroidVersionId ( ) ) ) + "-" ) + ( androidDevice.getLocale ( ) ) ) + "-" ) + ( androidDevice.getOrientation ( ) ) ; }