auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CURRENT ) ) { version = com.android.dex.DexFormat.VERSION_CURRENT ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_DEFAULT_INTERFACE_METHODS ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.dex.DexFormat.MAGIC_SUFFIX ) ; }

Target:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CURRENT ) ) { version = com.android.dex.DexFormat.VERSION_CURRENT ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_INVOKE_POLYMORPHIC ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_26 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_DEFAULT_INTERFACE_METHODS ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.dex.DexFormat.MAGIC_SUFFIX ) ; }
Source:
public com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier getInvalidQualifier ( ) { for ( int i = 0 ; i < ( com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration.INDEX_COUNT ) ; i ++ ) { if ( ( ( mQualifiers [ i ] ) != null ) && ( ( mQualifiers [ i ] . isValid ( ) ) == false ) ) { return mQualifiers [ i ] ; } } return null ; }

Target:
public com.android.ide.common.resources.configuration.ResourceQualifier getInvalidQualifier ( ) { for ( int i = 0 ; i < ( com.android.ide.common.resources.configuration.FolderConfiguration.INDEX_COUNT ) ; i ++ ) { if ( ( ( mQualifiers [ i ] ) != null ) && ( ( mQualifiers [ i ] . isValid ( ) ) == false ) ) { return mQualifiers [ i ] ; } } return null ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mScreenOnActivity = launchScreenOnActivity ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; mDisplayManager = ( ( android.hardware.display.DisplayManager ) ( mContext.getSystemService ( Context.DISPLAY_SERVICE ) ) ) ; mWindowManager = ( ( android.view.WindowManager ) ( mContext.getSystemService ( Context.WINDOW_SERVICE ) ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mScreenOnActivity = launchScreenOnActivity ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; mDisplayManager = ( ( android.hardware.display.DisplayManager ) ( mContext.getSystemService ( Context.DISPLAY_SERVICE ) ) ) ; mWindowManager = ( ( android.view.WindowManager ) ( mContext.getSystemService ( Context.WINDOW_SERVICE ) ) ) ; mUiModeManager = ( ( android.app.UiModeManager ) ( mContext.getSystemService ( Context.UI_MODE_SERVICE ) ) ) ; }
Source:
public void normalAddedDiffedFieldValues ( ) { com.android.ahat.heapdump.FieldValue normal = new com.android.ahat.heapdump.FieldValue ( "name" , "type" , new com.android.ahat.heapdump.Value ( 1 ) ) ; com.android.ahat.heapdump.DiffedFieldValue x = com.android.ahat.heapdump.DiffedFieldValue.added ( normal ) ; org.junit.Assert.assertEquals ( "name" , x.name ) ; org.junit.Assert.assertEquals ( "type" , x.type ) ; org.junit.Assert.assertEquals ( new com.android.ahat.heapdump.Value ( 1 ) , x.current ) ; org.junit.Assert.assertEquals ( DiffedFieldValue.Status.ADDED , x.status ) ; }

Target:
public void normalAddedDiffedFieldValues ( ) { com.android.ahat.heapdump.FieldValue normal = new com.android.ahat.heapdump.FieldValue ( "name" , "type" , com.android.ahat.heapdump.Value.pack ( 1 ) ) ; com.android.ahat.heapdump.DiffedFieldValue x = com.android.ahat.heapdump.DiffedFieldValue.added ( normal ) ; org.junit.Assert.assertEquals ( "name" , x.name ) ; org.junit.Assert.assertEquals ( "type" , x.type ) ; org.junit.Assert.assertEquals ( com.android.ahat.heapdump.Value.pack ( 1 ) , x.current ) ; org.junit.Assert.assertEquals ( DiffedFieldValue.Status.ADDED , x.status ) ; }
Source:
public static com.android.jack.dx.rop.code.Rop opMove ( com.android.jack.dx.rop.type.TypeBearer type ) { switch ( type.getBasicFrameType ( ) ) { case com.android.jack.dx.rop.type.Type.BT_INT : return com.android.jack.dx.rop.code.Rops.MOVE_INT ; case com.android.jack.dx.rop.type.Type.BT_LONG : return com.android.jack.dx.rop.code.Rops.MOVE_LONG ; case com.android.jack.dx.rop.type.Type.BT_FLOAT : return com.android.jack.dx.rop.code.Rops.MOVE_FLOAT ; case com.android.jack.dx.rop.type.Type.BT_DOUBLE : return com.android.jack.dx.rop.code.Rops.MOVE_DOUBLE ; case com.android.jack.dx.rop.type.Type.BT_OBJECT : return com.android.jack.dx.rop.code.Rops.MOVE_OBJECT ; case com.android.jack.dx.rop.type.Type.BT_ADDR : return com.android.jack.dx.rop.code.Rops.MOVE_RETURN_ADDRESS ; } return com.android.jack.dx.rop.code.Rops.throwBadType ( type ) ; }

Target:
public static com.android.jack.dx.rop.code.Rop opMove ( com.android.jack.dx.rop.type.TypeBearer type ) { switch ( type.getBasicFrameType ( ) ) { case com.android.jack.dx.rop.type.Type.BT_INT : return com.android.jack.dx.rop.code.Rops.MOVE_INT ; case com.android.jack.dx.rop.type.Type.BT_LONG : return com.android.jack.dx.rop.code.Rops.MOVE_LONG ; case com.android.jack.dx.rop.type.Type.BT_FLOAT : return com.android.jack.dx.rop.code.Rops.MOVE_FLOAT ; case com.android.jack.dx.rop.type.Type.BT_DOUBLE : return com.android.jack.dx.rop.code.Rops.MOVE_DOUBLE ; case com.android.jack.dx.rop.type.Type.BT_CLOSURE : return com.android.jack.dx.rop.code.Rops.MOVE_LAMBDA ; case com.android.jack.dx.rop.type.Type.BT_OBJECT : return com.android.jack.dx.rop.code.Rops.MOVE_OBJECT ; case com.android.jack.dx.rop.type.Type.BT_ADDR : return com.android.jack.dx.rop.code.Rops.MOVE_RETURN_ADDRESS ; } return com.android.jack.dx.rop.code.Rops.throwBadType ( type ) ; }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , long [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationRead ( long id , java.lang.Object d , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationRead ( mContext , id , d , dt.mID ) ; }
Source:
public java.lang.String getDisplayCountry ( java.util.Locale locale ) { if ( countryCode.isEmpty ( ) ) { return "" ; } try { java.util.Locale.Builder.normalizeAndValidateRegion ( countryCode ) ; } catch ( java.util.IllformedLocaleException ex ) { return countryCode ; } java.lang.String result = libcore.icu.ICU.getDisplayCountry ( this , locale ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayCountry ( this , java.util.Locale.getDefault ( ) ) ; } return result ; }

Target:
public java.lang.String getDisplayCountry ( java.util.Locale locale ) { if ( countryCode.isEmpty ( ) ) { return "" ; } final java.lang.String normalizedRegion = java.util.Locale.Builder.normalizeAndValidateRegion ( countryCode , false ) ; if ( normalizedRegion.isEmpty ( ) ) { return countryCode ; } java.lang.String result = libcore.icu.ICU.getDisplayCountry ( this , locale ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayCountry ( this , java.util.Locale.getDefault ( ) ) ; } return result ; }
Source:
public void testPublishTerminatedDone ( ) throws org.json.JSONException { final int publishId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "publish_id" , publishId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_TERMINATED_REASON_COUNT_REACHED ) ; com.android.server.wifi.aware.WifiAwareHalMock.callPublishTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( publishId , WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE , true ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testPublishTerminatedDone ( ) throws org.json.JSONException { final int publishId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "publish_id" , publishId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_SUCCESS ) ; com.android.server.wifi.aware.WifiAwareHalMock.callPublishTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( publishId , WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE , true ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public void testIsSocket ( ) throws java.lang.Exception { java.io.File f = new java.io.File ( "/dev/null" ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( f ) ; assertFalse ( S_ISSOCK ( Libcore.os.fstat ( fis.getFD ( ) ) . st_mode ) ) ; fis.close ( ) ; java.net.ServerSocket s = new java.net.ServerSocket ( ) ; assertTrue ( S_ISSOCK ( Libcore.os.fstat ( s.getImpl ( ) . getFileDescriptor ( ) ) . st_mode ) ) ; s.close ( ) ; }

Target:
public void testIsSocket ( ) throws java.lang.Exception { java.io.File f = new java.io.File ( "/dev/null" ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( f ) ; assertFalse ( S_ISSOCK ( Libcore.os.fstat ( fis.getFD ( ) ) . st_mode ) ) ; fis.close ( ) ; java.net.ServerSocket s = new java.net.ServerSocket ( ) ; assertTrue ( S_ISSOCK ( Libcore.os.fstat ( s.getImpl ( ) . getFD$ ( ) ) . st_mode ) ) ; s.close ( ) ; }
Source:
protected abstract void sendSmsByPstn ( com.android.internal.telephony.SMSDispatcher.SmsTracker tracker ) ;

Target:
private boolean sendSmsByCarrierApp ( boolean isDataSms , com.android.internal.telephony.SMSDispatcher.SmsTracker tracker ) { java.lang.String carrierPackage = getCarrierAppPackageName ( ) ; if ( carrierPackage != null ) { android.telephony.Rlog.d ( com.android.internal.telephony.SMSDispatcher.TAG , "Found carrier package." ) ; com.android.internal.telephony.SMSDispatcher.SmsSender smsSender ; if ( isDataSms ) { smsSender = new com.android.internal.telephony.SMSDispatcher.DataSmsSender ( tracker ) ; } else { smsSender = new com.android.internal.telephony.SMSDispatcher.TextSmsSender ( tracker ) ; } smsSender.sendSmsByCarrierApp ( carrierPackage , new com.android.internal.telephony.SMSDispatcher.SmsSenderCallback ( smsSender ) ) ; return true ; } return false ; }
Source:
public void onPageFinished ( android.webkit.WebView view , java.lang.String url ) { if ( ! ( mInPageLoad ) ) { return ; } if ( ! ( isPrivateBrowsingEnabled ( ) ) ) { com.android.browser.LogTag.logPageFinishedLoading ( url , ( ( android.os.SystemClock.uptimeMillis ( ) ) - ( mLoadStartTime ) ) ) ; } syncCurrentState ( view , url ) ; mWebViewController.onPageFinished ( this ) ; }

Target:
public void onProgressChanged ( android.webkit.WebView view , int newProgress ) { mPageLoadProgress = newProgress ; if ( newProgress == 100 ) { mInPageLoad = false ; } mWebViewController.onProgressChanged ( this ) ; if ( ( mUpdateThumbnail ) && ( newProgress == 100 ) ) { mUpdateThumbnail = false ; } }
Source:
private void notifyPackageManager ( java.util.List < java.lang.String > dexPaths ) { java.lang.String packageName = android.app.ActivityThread.currentPackageName ( ) ; try { android.app.ActivityThread.getPackageManager ( ) . notifyDexLoad ( packageName , dexPaths , dalvik.system.VMRuntime.getRuntime ( ) . vmInstructionSet ( ) ) ; } catch ( android.os.RemoteException re ) { android.util.Slog.e ( android.app.DexLoadReporter.TAG , ( "Failed to notify PM about dex load for package " + packageName ) , re ) ; } }

Target:
private void notifyPackageManager ( java.util.List < dalvik.system.BaseDexClassLoader > ignored , java.util.List < java.lang.String > classPaths ) { java.lang.String packageName = android.app.ActivityThread.currentPackageName ( ) ; try { android.app.ActivityThread.getPackageManager ( ) . notifyDexLoad ( packageName , java.util.Arrays.asList ( classPaths.get ( 0 ) . split ( java.io.File.pathSeparator ) ) , dalvik.system.VMRuntime.getRuntime ( ) . vmInstructionSet ( ) ) ; } catch ( android.os.RemoteException re ) { android.util.Slog.e ( android.app.DexLoadReporter.TAG , ( "Failed to notify PM about dex load for package " + packageName ) , re ) ; } }
Source:
static com.android.build.gradle.internal.model.SourceProviderImpl cloneProvider ( com.android.builder.model.SourceProvider sourceProvider ) { com.android.build.gradle.internal.model.SourceProviderImpl sourceProviderClone = new com.android.build.gradle.internal.model.SourceProviderImpl ( ) ; sourceProviderClone.manifestFile = sourceProvider.getManifestFile ( ) ; sourceProviderClone.javaDirs = sourceProvider.getJavaDirectories ( ) ; sourceProviderClone.resourcesDirs = sourceProvider.getResourcesDirectories ( ) ; sourceProviderClone.aidlDirs = sourceProvider.getAidlDirectories ( ) ; sourceProviderClone.rsDirs = sourceProvider.getRenderscriptDirectories ( ) ; sourceProviderClone.jniDirs = sourceProvider.getJniDirectories ( ) ; sourceProviderClone.resDirs = sourceProvider.getResDirectories ( ) ; sourceProviderClone.assetsDirs = sourceProvider.getAssetsDirectories ( ) ; return sourceProviderClone ; }

Target:
static com.android.build.gradle.internal.model.SourceProviderImpl cloneProvider ( com.android.builder.model.SourceProvider sourceProvider ) { com.android.build.gradle.internal.model.SourceProviderImpl sourceProviderClone = new com.android.build.gradle.internal.model.SourceProviderImpl ( ) ; sourceProviderClone.manifestFile = sourceProvider.getManifestFile ( ) ; sourceProviderClone.javaDirs = sourceProvider.getJavaDirectories ( ) ; sourceProviderClone.resourcesDirs = sourceProvider.getResourcesDirectories ( ) ; sourceProviderClone.aidlDirs = sourceProvider.getAidlDirectories ( ) ; sourceProviderClone.rsDirs = sourceProvider.getRenderscriptDirectories ( ) ; sourceProviderClone.jniDirs = sourceProvider.getJniDirectories ( ) ; sourceProviderClone.resDirs = sourceProvider.getResDirectories ( ) ; sourceProviderClone.assetsDirs = sourceProvider.getAssetsDirectories ( ) ; sourceProviderClone.libsDirs = sourceProvider.getJniLibsDirectories ( ) ; return sourceProviderClone ; }
Source:
public void testNoLayoutParams ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( "src/test/pkg/LayoutInflationTest.java.txt=>src/test/pkg/LayoutInflationTest.java" , "res/layout/listseparator.xml=>res/layout/your_layout.xml" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/LayoutInflationTest.java:13: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" + " convertView = mInflater.inflate(R.layout.your_layout, null);\n" ) + " ~~~~\n" ) + "src/test/pkg/LayoutInflationTest.java:14: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" ) + " convertView = mInflater.inflate(R.layout.your_layout, null, true);\n" ) + " ~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( mLayoutInflationTest , copy ( "res/layout/textsize.xml" , "res/layout/your_layout.xml" ) , copy ( "res/layout/listseparator.xml" , "res/layout-port/your_layout.xml" ) ) ) ; }
Source:
private int [ ] getLteRsrpThresholds ( ) { return getCarrierConfig ( ) . getIntArray ( CarrierConfigManager.KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY ) ; }

Target:
private void setChannelNumberFromCellIdentity ( android.telephony.ServiceState ss , android.telephony.CellIdentity cellIdentity ) { if ( cellIdentity == null ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) { log ( "Could not set ServiceState channel number. CellIdentity null" ) ; } return ; } ss.setChannelNumber ( cellIdentity.getChannelNumber ( ) ) ; if ( com.android.internal.telephony.ServiceStateTracker.VDBG ) { log ( ( "Setting channel number: " + ( cellIdentity.getChannelNumber ( ) ) ) ) ; } }
Source:
public void voiceRadioTechChanged ( int indicationType , int var2 ) { }

Target:
public void srvccStateNotify ( int indicationType , int state ) { mRil.processIndication ( indicationType ) ; int [ ] response = new int [ 1 ] ; response [ 0 ] = state ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_SRVCC_STATE_NOTIFY , response ) ; mRil.writeMetricsSrvcc ( state ) ; mRil.mSrvccStateRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
private void setupMocksForRoamSequence ( java.lang.String roamBssid ) throws java.lang.Exception { org.mockito.Mockito.doAnswer ( new android.app.test.MockAnswerUtil.AnswerWithArguments ( ) { public android.hardware.wifi.supplicant.V1_0.SupplicantStatus answer ( ) throws android.os.RemoteException { return mStatusSuccess ; } } ) . when ( mISupplicantStaIfaceMock ) . reassociate ( ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.eq ( roamBssid ) ) ) . thenReturn ( true ) ; }

Target:
public void testSetLogLevel ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mISupplicantMock.setDebugParams ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyBoolean ( ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( mStatusSuccess ) ; assertFalse ( mDut.setLogLevel ( SupplicantStaIfaceHal.LOG_LEVEL_DEBUG ) ) ; executeAndValidateInitializationSequence ( ) ; assertTrue ( mDut.setLogLevel ( SupplicantStaIfaceHal.LOG_LEVEL_DEBUG ) ) ; org.mockito.Mockito.verify ( mISupplicantMock ) . setDebugParams ( org.mockito.Matchers.eq ( ISupplicant.DebugLevel.DEBUG ) , org.mockito.Matchers.eq ( false ) , org.mockito.Matchers.eq ( false ) ) ; }
Source:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( boolean emulateStudio_1_0 , java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }

Target:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( boolean emulateStudio_1_0 , java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }
Source:
public void dispose ( ) { synchronized ( mLock ) { if ( com.android.internal.telephony.uicc.UiccProfile.DBG ) log ( "Disposing profile" ) ; if ( com.android.internal.telephony.uicc.UiccProfile.ICC_CARD_PROXY_REMOVED ) { mCi.unregisterForOn ( this ) ; mCi.unregisterForOffOrNotAvailable ( this ) ; } if ( ( mCatService ) != null ) mCatService.dispose ( ) ; for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { app.dispose ( ) ; } } mCatService = null ; mUiccApplications = null ; mCarrierPrivilegeRules = null ; } }

Target:
public void dispose ( ) { synchronized ( mLock ) { if ( com.android.internal.telephony.uicc.UiccProfile.DBG ) log ( "Disposing profile" ) ; unregisterAllAppEvents ( ) ; unregisterCurrAppEvents ( ) ; if ( com.android.internal.telephony.uicc.UiccProfile.ICC_CARD_PROXY_REMOVED ) { mCi.unregisterForOffOrNotAvailable ( this ) ; } if ( ( mCatService ) != null ) mCatService.dispose ( ) ; for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { app.dispose ( ) ; } } mCatService = null ; mUiccApplications = null ; mCarrierPrivilegeRules = null ; mDisposed = true ; } }
Source:
void mergeConference ( com.android.server.telecom.Call call ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "mergeConference" ) ) ) { try { logOutgoing ( "mergeConference %s" , callId ) ; mServiceInterface.mergeConference ( callId ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void conference ( final com.android.server.telecom.Call call , com.android.server.telecom.Call otherCall ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; final java.lang.String otherCallId = mCallIdMapper.getCallId ( otherCall ) ; if ( ( ( callId != null ) && ( otherCallId != null ) ) && ( isServiceValid ( "conference" ) ) ) { try { logOutgoing ( "conference %s %s" , callId , otherCallId ) ; mServiceInterface.conference ( callId , otherCallId , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
private void bindAndInitialize ( ) throws android.telephony.mbms.MbmsInitializationException { try { int returnCode = mService.initialize ( mCallbackToApp , mAppName , mSubscriptionId ) ; if ( returnCode != 0 ) { throw new android.telephony.mbms.MbmsInitializationException ( returnCode ) ; } } catch ( android.os.RemoteException e ) { throw new android.telephony.mbms.MbmsInitializationException ( 0 ) ; } }

Target:
public void onServiceDisconnected ( ) { }
Source:
private void deleteOldFilesFromJavaFiles ( @ javax.annotation.Nonnull java.lang.String javaFileName ) throws com.android.jack.incremental.IncrementalException { java.util.List < java.lang.String > deletedTypes = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String typeNameToRemove : fileDependencies.getTypeNames ( javaFileName ) ) { if ( ! ( deletedTypes.contains ( typeNameToRemove ) ) ) { deletedTypes.add ( typeNameToRemove ) ; com.android.sched.vfs.VPath vpath = new com.android.sched.vfs.VPath ( typeNameToRemove , '/' ) ; deleteFile ( FileType.JAYCE , vpath ) ; deleteFile ( FileType.DEX , vpath ) ; } } }

Target:
private void deleteOldFilesFromJavaFiles ( @ javax.annotation.Nonnull java.lang.String javaFileName ) throws com.android.jack.incremental.IncrementalException { java.util.List < java.lang.String > deletedTypes = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String typeNameToRemove : fileDependencies.getTypeNames ( javaFileName ) ) { if ( ! ( deletedTypes.contains ( typeNameToRemove ) ) ) { deletedTypes.add ( typeNameToRemove ) ; com.android.sched.vfs.VPath vpath = new com.android.sched.vfs.VPath ( typeNameToRemove , '/' ) ; deleteFile ( FileType.JAYCE , vpath ) ; deleteFile ( FileType.PREBUILT , vpath ) ; } } }
Source:
public void addDefaultCategories ( ) { java.util.List < com.android.sdkuilib.internal.repository.sdkman2.PkgCategory > cats = getCategories ( ) ; for ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategory cat : cats ) { if ( cat.getKey ( ) . equals ( PkgCategorySource.UNKNOWN_SOURCE ) ) { return ; } } com.android.sdkuilib.internal.repository.sdkman2.PkgCategorySource cat = new com.android.sdkuilib.internal.repository.sdkman2.PkgCategorySource ( PkgCategorySource.UNKNOWN_SOURCE , mUpdaterData ) ; dontKeep ( cat ) ; synchronized ( cats ) { cats.add ( cat ) ; } }

Target:
public void addDefaultCategories ( ) { java.util.List < com.android.sdkuilib.internal.repository.core.PkgCategory > cats = getCategories ( ) ; for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : cats ) { if ( cat.getKey ( ) . equals ( PkgCategorySource.UNKNOWN_SOURCE ) ) { return ; } } com.android.sdkuilib.internal.repository.core.PkgCategorySource cat = new com.android.sdkuilib.internal.repository.core.PkgCategorySource ( PkgCategorySource.UNKNOWN_SOURCE , mUpdaterData ) ; dontKeep ( cat ) ; synchronized ( cats ) { cats.add ( cat ) ; } }
Source:
public void testE3 ( ) { dot.junit.opcodes.aput_boolean.d.T_aput_boolean_1 t = new dot.junit.opcodes.aput_boolean.d.T_aput_boolean_1 ( ) ; boolean [ ] arr = new boolean [ 2 ] ; try { t.run ( arr , ( - 1 ) , true ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testVFE4 ( ) { load ( "dot.junit.opcodes.aput_boolean.d.T_aput_boolean_5" , java.lang.VerifyError.class ) ; }
Source:
public final int verification_error_type ( ) throws org.jf.smali.RecognitionException { int verificationError = 0 ; org.antlr.runtime.tree.CommonTree VERIFICATION_ERROR_TYPE103 = null ; try { { VERIFICATION_ERROR_TYPE103 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.VERIFICATION_ERROR_TYPE , org.jf.smali.smaliTreeWalker.FOLLOW_VERIFICATION_ERROR_TYPE_in_verification_error_type1790 ) ) ) ; verificationError = org.jf.smali.VerificationError.getVerificationError ( ( VERIFICATION_ERROR_TYPE103 != null ? VERIFICATION_ERROR_TYPE103.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return verificationError ; }

Target:
public final int verification_error_type ( ) throws org.jf.smali.RecognitionException { int verificationError = 0 ; org.antlr.runtime.tree.CommonTree VERIFICATION_ERROR_TYPE103 = null ; try { { VERIFICATION_ERROR_TYPE103 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.VERIFICATION_ERROR_TYPE , org.jf.smali.smaliTreeWalker.FOLLOW_VERIFICATION_ERROR_TYPE_in_verification_error_type1792 ) ) ) ; verificationError = org.jf.smali.VerificationError.getVerificationError ( ( VERIFICATION_ERROR_TYPE103 != null ? VERIFICATION_ERROR_TYPE103.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return verificationError ; }
Source:
public boolean verify ( java.lang.String key , byte [ ] data , byte [ ] signature ) { return verify ( android.security.KeyStore.getKeyBytes ( key ) , data , signature ) ; }

Target:
public boolean verify ( java.lang.String key , byte [ ] data , byte [ ] signature ) { try { return ( mBinder.verify ( key , data , signature ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
static java.lang.String getDirSimpleName ( @ javax.annotation.Nonnull java.util.zip.ZipEntry entry ) { java.lang.String name = entry.getName ( ) ; assert name.endsWith ( ( "" + ( com.android.sched.vfs.ZipUtils.IN_ZIP_SEPARATOR ) ) ) ; int index = name.lastIndexOf ( com.android.sched.vfs.ZipUtils.IN_ZIP_SEPARATOR , ( ( name.length ( ) ) - 2 ) ) ; int startIndex = index + 1 ; return name.substring ( startIndex , ( ( name.length ( ) ) - 1 ) ) ; }

Target:
static java.lang.String getDirSimpleName ( @ javax.annotation.Nonnull java.util.zip.ZipEntry entry ) { java.lang.String name = entry.getName ( ) ; if ( name.equals ( com.android.sched.vfs.ZipUtils.ROOT_ENTRY_NAME ) ) { return "" ; } assert name.endsWith ( com.android.sched.vfs.ZipUtils.ZIP_SEPARATOR_STRING ) ; int index = name.lastIndexOf ( com.android.sched.vfs.ZipUtils.ZIP_SEPARATOR , ( ( name.length ( ) ) - 2 ) ) ; int startIndex = index + 1 ; return name.substring ( startIndex , ( ( name.length ( ) ) - 1 ) ) ; }
Source:
public java.lang.String getString ( int attrId ) { if ( ! ( exists ) ) return new java.lang.String ( ) ; switch ( attrId ) { case com.android.bluetooth.avrcp.Avrcp.MediaAttributes.ATTR_TITLE : return title ; case com.android.bluetooth.avrcp.Avrcp.MediaAttributes.ATTR_ARTIST_NAME : return artistName ; case com.android.bluetooth.avrcp.Avrcp.MediaAttributes.ATTR_ALBUM_NAME : return albumName ; case com.android.bluetooth.avrcp.Avrcp.MediaAttributes.ATTR_MEDIA_NUMBER : return mediaNumber ; case com.android.bluetooth.avrcp.Avrcp.MediaAttributes.ATTR_MEDIA_TOTAL_NUMBER : return mediaTotalNumber ; case com.android.bluetooth.avrcp.Avrcp.MediaAttributes.ATTR_GENRE : return genre ; case com.android.bluetooth.avrcp.Avrcp.MediaAttributes.ATTR_PLAYING_TIME_MS : return playingTimeMs ; default : return new java.lang.String ( ) ; } }

Target:
public long getLength ( ) { if ( ! ( exists ) ) return 0L ; return playingTimeMs ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JLambda x ) { lparen ( ) ; visitCollectionWithCommas ( x.getParameters ( ) . iterator ( ) ) ; rparen ( ) ; print ( " -> " ) ; accept ( x.getBody ( ) ) ; return false ; }

Target:
private void visitCollectionJType ( @ javax.annotation.Nonnull java.util.Iterator < com.android.jack.ir.ast.JType > iter ) { lparen ( ) ; if ( iter.hasNext ( ) ) { printName ( iter.next ( ) ) ; } while ( iter.hasNext ( ) ) { print ( com.android.jack.ir.impl.BaseGenerationVisitor.CHARS_COMMA ) ; printName ( iter.next ( ) ) ; } rparen ( ) ; }
Source:
private static android.hardware.cts.helpers.sensorverification.MeanVerification getVerification ( float [ ] expected , float [ ] threshold , float [ ] ... values ) { java.util.Collection < android.hardware.cts.helpers.TestSensorEvent > events = new java.util.ArrayList < > ( values.length ) ; for ( float [ ] value : values ) { events.add ( new android.hardware.cts.helpers.TestSensorEvent ( null , 0 , 0 , value ) ) ; } android.hardware.cts.helpers.sensorverification.MeanVerification verification = new android.hardware.cts.helpers.sensorverification.MeanVerification ( expected , threshold ) ; verification.addSensorEvents ( events ) ; return verification ; }

Target:
private static android.hardware.cts.helpers.sensorverification.MeanVerification getVerification ( float [ ] expected , float [ ] upperThresholds , float [ ] lowerThresholds , float [ ] ... values ) { java.util.Collection < android.hardware.cts.helpers.TestSensorEvent > events = new java.util.ArrayList < > ( values.length ) ; for ( float [ ] value : values ) { events.add ( new android.hardware.cts.helpers.TestSensorEvent ( null , 0 , 0 , value ) ) ; } android.hardware.cts.helpers.sensorverification.MeanVerification verification = new android.hardware.cts.helpers.sensorverification.MeanVerification ( expected , upperThresholds , lowerThresholds ) ; verification.addSensorEvents ( events ) ; return verification ; }
Source:
protected void finalize ( ) { debugLog ( ( "finalize() - clean up object " + ( this ) ) ) ; cleanup ( ) ; if ( com.android.bluetooth.btservice.AdapterService.TRACE_REF ) { synchronized ( com.android.bluetooth.btservice.AdapterService.class ) { ( com.android.bluetooth.btservice.AdapterService.sRefCount ) -- ; debugLog ( ( "finalize() - REFCOUNT: FINALIZED. INSTANCE_COUNT= " + ( com.android.bluetooth.btservice.AdapterService.sRefCount ) ) ) ; } } }

Target:
public int getMaxConnectedAudioDevices ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mAdapterProperties.getMaxConnectedAudioDevices ( ) ; }
Source:
public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { if ( ( e.getSource ( ) ) == ( mImagePathText ) ) { requestUpdatePreview ( false ) ; } else if ( ( e.getSource ( ) ) == ( mText ) ) { requestUpdatePreview ( false ) ; } validatePage ( ) ; }

Target:
public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { if ( mIgnore ) { return ; } if ( ( e.getSource ( ) ) == ( mImagePathText ) ) { mValues.imagePath = new java.io.File ( mImagePathText.getText ( ) . trim ( ) ) ; requestUpdatePreview ( false ) ; } else if ( ( e.getSource ( ) ) == ( mText ) ) { mValues.text = mText.getText ( ) . trim ( ) ; requestUpdatePreview ( false ) ; } validatePage ( ) ; }
Source:
protected void sendData ( java.lang.String destAddr , java.lang.String scAddr , int destPort , byte [ ] data , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent ) { if ( isCdmaMo ( ) ) { mCdmaDispatcher.sendData ( destAddr , scAddr , destPort , data , sentIntent , deliveryIntent ) ; } else { mGsmDispatcher.sendData ( destAddr , scAddr , destPort , data , sentIntent , deliveryIntent ) ; } }

Target:
protected void sendData ( java.lang.String destAddr , java.lang.String scAddr , int destPort , byte [ ] data , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent ) { if ( mImsSmsDispatcher.isAvailable ( ) ) { mImsSmsDispatcher.sendData ( destAddr , scAddr , destPort , data , sentIntent , deliveryIntent ) ; } else if ( isCdmaMo ( ) ) { mCdmaDispatcher.sendData ( destAddr , scAddr , destPort , data , sentIntent , deliveryIntent ) ; } else { mGsmDispatcher.sendData ( destAddr , scAddr , destPort , data , sentIntent , deliveryIntent ) ; } }
Source:
private static native java.lang.Class defineClass ( java.lang.String name , java.lang.ClassLoader loader , int cookie ) ;

Target:
private static java.lang.Class defineClass ( java.lang.String name , java.lang.ClassLoader loader , int cookie , java.util.List < java.lang.Throwable > suppressed ) { java.lang.Class result = null ; try { result = dalvik.system.DexFile.defineClassNative ( name , loader , cookie ) ; } catch ( java.lang.NoClassDefFoundError e ) { if ( suppressed != null ) { suppressed.add ( e ) ; } } catch ( java.lang.ClassNotFoundException e ) { if ( suppressed != null ) { suppressed.add ( e ) ; } } return result ; }
Source:
private java.lang.String getErrorMessage ( java.lang.String name ) { assert ( ( mPrefix ) != null ) && ( ! ( name.startsWith ( mPrefix ) ) ) ; return java.lang.String.format ( ( "Resource named '%1$s' does not start " + "with the project's resource prefix '%2$s'; rename to '%3$s' ?" ) , name , mPrefix , com.android.tools.lint.detector.api.LintUtils.computeResourceName ( mPrefix , name ) ) ; }

Target:
private java.lang.String getErrorMessage ( java.lang.String name ) { assert ( ( mPrefix ) != null ) && ( ! ( name.startsWith ( mPrefix ) ) ) ; return java.lang.String.format ( ( "Resource named '`%1$s`' does not start " + "with the project's resource prefix '`%2$s`'; rename to '`%3$s`' ?" ) , name , mPrefix , com.android.tools.lint.detector.api.LintUtils.computeResourceName ( mPrefix , name ) ) ; }
Source:
public java.lang.String [ ] setPackagesSuspended ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String [ ] packageNames , boolean suspended ) { throwIfParentInstance ( "setPackagesSuspended" ) ; if ( ( mService ) != null ) { try { return mService.setPackagesSuspended ( admin , packageNames , suspended ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } } return packageNames ; }

Target:
public void setActivePasswordState ( android.app.admin.PasswordMetrics metrics , int userHandle ) { if ( ( mService ) != null ) { try { mService.setActivePasswordState ( metrics , userHandle ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public static long copy ( com.google.common.io.InputSupplier < ? extends java.io.InputStream > from , java.io.OutputStream to ) throws java.io.IOException { boolean threw = true ; java.io.InputStream in = from.getInput ( ) ; try { long count = com.google.common.io.ByteStreams.copy ( in , to ) ; threw = false ; return count ; } finally { com.google.common.io.Closeables.close ( in , threw ) ; } }

Target:
public static com.google.common.io.ByteArrayDataInput newDataInput ( byte [ ] bytes , int start ) { com.google.common.base.Preconditions.checkPositionIndex ( start , bytes.length ) ; return com.google.common.io.ByteStreams.newDataInput ( new java.io.ByteArrayInputStream ( bytes , start , ( ( bytes.length ) - start ) ) ) ; }
Source:
public void test4gDataIcon ( ) { mConfig.show4gForLte = true ; mNetworkController = new com.android.systemui.statusbar.policy.NetworkControllerImpl ( mContext , mMockCm , mMockTm , mMockWm , mMockSm , mConfig , android.os.Looper.getMainLooper ( ) , mCallbackHandler , org.mockito.Mockito.mock ( com.android.systemui.statusbar.policy.AccessPointControllerImpl.class ) , org.mockito.Mockito.mock ( com.android.systemui.statusbar.policy.MobileDataControllerImpl.class ) , mMockSubDefaults ) ; setupNetworkController ( ) ; setupDefaultSignal ( ) ; updateDataConnectionState ( TelephonyManager.DATA_CONNECTED , TelephonyManager.NETWORK_TYPE_LTE ) ; verifyDataIndicators ( TelephonyIcons.DATA_4G [ 1 ] [ 0 ] , TelephonyIcons.QS_DATA_4G ) ; }

Target:
public void test4gDataIcon ( ) { mConfig.show4gForLte = true ; mNetworkController = new com.android.systemui.statusbar.policy.NetworkControllerImpl ( mContext , mMockCm , mMockTm , mMockWm , mMockSm , mConfig , android.os.Looper.getMainLooper ( ) , mCallbackHandler , org.mockito.Mockito.mock ( com.android.systemui.statusbar.policy.AccessPointControllerImpl.class ) , org.mockito.Mockito.mock ( com.android.settingslib.net.DataUsageController.class ) , mMockSubDefaults ) ; setupNetworkController ( ) ; setupDefaultSignal ( ) ; updateDataConnectionState ( TelephonyManager.DATA_CONNECTED , TelephonyManager.NETWORK_TYPE_LTE ) ; verifyDataIndicators ( TelephonyIcons.DATA_4G [ 1 ] [ 0 ] , TelephonyIcons.QS_DATA_4G ) ; }
Source:
public final void dumpInstanceCounts ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int count = theClass.mInstances.size ( ) ; if ( count > 0 ) { java.lang.System.out.println ( ( ( theClass + ": " ) + count ) ) ; } } }

Target:
public final void dumpInstanceCounts ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int count = theClass.getInstanceCount ( ) ; if ( count > 0 ) { java.lang.System.out.println ( ( ( theClass + ": " ) + count ) ) ; } } }
Source:
private static void createStripDebugTask ( org.gradle.model.ModelMap < org.gradle.api.Task > tasks , final org.gradle.nativeplatform.SharedLibraryBinarySpec binary , final java.io.File buildDir , final com.android.build.gradle.internal.NdkHandler handler ) { java.lang.String taskName = com.android.build.gradle.ndk.internal.NdkNamingScheme.getTaskName ( binary , "stripSymbols" ) ; tasks.create ( taskName , com.android.build.gradle.tasks.StripDebugSymbolTask.class , new com.android.build.gradle.tasks.StripDebugSymbolTask.ConfigAction ( binary , buildDir , handler ) ) ; binary.getBuildTask ( ) . dependsOn ( taskName ) ; }

Target:
public void execute ( org.gradle.api.Task task ) { task.dependsOn ( taskName ) ; }
Source:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent ) ; try { java.lang.Thread.sleep ( 15 ) ; } catch ( java.lang.InterruptedException e ) { } networkCallback.assertNoCallback ( ) ; }
Source:
private void loadInternalDataFromSharedStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from shared store " + ( configuration.configKey ( ) ) ) ) ; } mConfiguredNetworks.put ( configuration ) ; } }

Target:
private void loadInternalDataFromSharedStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from shared store " + ( configuration.configKey ( ) ) ) ) ; } try { mConfiguredNetworks.put ( configuration ) ; } catch ( java.lang.IllegalArgumentException e ) { android.util.Log.e ( com.android.server.wifi.WifiConfigManager.TAG , "Failed to add network to config map" , e ) ; } } }
Source:
private void handleWnmFrame ( java.lang.String eventStr , java.lang.String iface ) { try { com.android.server.wifi.hotspot2.WnmData wnmData = com.android.server.wifi.hotspot2.WnmData.buildWnmData ( eventStr ) ; sendMessage ( iface , com.android.server.wifi.WifiMonitor.HS20_REMEDIATION_EVENT , wnmData ) ; } catch ( java.io.IOException | java.lang.NumberFormatException e ) { android.util.Log.w ( com.android.server.wifi.WifiMonitor.TAG , ( ( "Bad WNM event: '" + eventStr ) + "'" ) ) ; } }

Target:
private void handleWnmFrame ( java.lang.String eventStr , java.lang.String iface ) { try { com.android.server.wifi.hotspot2.WnmData wnmData = com.android.server.wifi.hotspot2.WnmData.buildWnmData ( eventStr ) ; broadcastWnmEvent ( iface , wnmData ) ; } catch ( java.io.IOException | java.lang.NumberFormatException e ) { android.util.Log.w ( com.android.server.wifi.WifiMonitor.TAG , ( ( "Bad WNM event: '" + eventStr ) + "'" ) ) ; } }
Source:
public void shutdown ( ) throws java.lang.InterruptedException { for ( java.lang.Thread t : mWorkThreads ) { _push ( new com.android.builder.tasks.WorkQueue.QueueTask < T > ( com.android.builder.tasks.WorkQueue.QueueTask.ActionType.Death , null ) ) ; } for ( java.lang.Thread t : mWorkThreads ) { t.join ( ) ; } }

Target:
public void shutdown ( ) throws java.lang.InterruptedException { for ( java.lang.Thread t : mWorkThreads ) { _push ( new com.android.builder.tasks.WorkQueue.QueueTask < T > ( com.android.builder.tasks.WorkQueue.QueueTask.ActionType.Death , null ) ) ; } for ( java.lang.Thread t : mWorkThreads ) { t.join ( ) ; } mWorkThreads.clear ( ) ; mQueueThreadContext.shutdown ( ) ; }
Source:
void foo3 ( int [ ] array , int end ) { for ( int i = 3 ; i <= end ; i ++ ) { array [ i ] = 1 ; sum += array [ i ] ; } }

Target:
void foo2 ( int [ ] array , int start , int end , boolean expectInterpreter ) { for ( int i = start ; i <= end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }
Source:
public void bringUp ( com.android.internal.telephony.dataconnection.ApnContext apnContext , int profileId , int rilRadioTechnology , android.os.Message onCompletedMsg , int connectionGeneration ) { if ( com.android.internal.telephony.dataconnection.DcAsyncChannel.DBG ) { log ( ( ( ( "bringUp: apnContext=" + apnContext ) + " onCompletedMsg=" ) + onCompletedMsg ) ) ; } sendMessage ( DataConnection.EVENT_CONNECT , new com.android.internal.telephony.dataconnection.DataConnection.ConnectionParams ( apnContext , profileId , rilRadioTechnology , onCompletedMsg , connectionGeneration ) ) ; }

Target:
public void bringUp ( com.android.internal.telephony.dataconnection.ApnContext apnContext , int profileId , int rilRadioTechnology , boolean unmeteredUseOnly , android.os.Message onCompletedMsg , int connectionGeneration ) { if ( com.android.internal.telephony.dataconnection.DcAsyncChannel.DBG ) { log ( ( ( ( ( ( "bringUp: apnContext=" + apnContext ) + "unmeteredUseOnly=" ) + unmeteredUseOnly ) + " onCompletedMsg=" ) + onCompletedMsg ) ) ; } sendMessage ( DataConnection.EVENT_CONNECT , new com.android.internal.telephony.dataconnection.DataConnection.ConnectionParams ( apnContext , profileId , rilRadioTechnology , unmeteredUseOnly , onCompletedMsg , connectionGeneration ) ) ; }
Source:
private void bondService ( ) throws java.util.concurrent.TimeoutException { android.os.IBinder binder = mServiceRule.bindService ( new android.content.Intent ( mTargetContext , com.android.bluetooth.a2dp.A2dpService.class ) ) ; mA2dpService = ( ( com.android.bluetooth.a2dp.A2dpService.BluetoothA2dpBinder ) ( binder ) ) . getServiceForTesting ( ) ; org.junit.Assert.assertNotNull ( mA2dpService ) ; }

Target:
private void startService ( ) throws java.util.concurrent.TimeoutException { android.content.Intent startIntent = new android.content.Intent ( android.support.test.InstrumentationRegistry.getTargetContext ( ) , com.android.bluetooth.a2dp.A2dpService.class ) ; startIntent.putExtra ( AdapterService.EXTRA_ACTION , AdapterService.ACTION_SERVICE_STATE_CHANGED ) ; startIntent.putExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.STATE_ON ) ; mServiceRule.startService ( startIntent ) ; verify ( mAdapterService , timeout ( com.android.bluetooth.a2dp.A2dpServiceTest.TIMEOUT_MS ) ) . onProfileServiceStateChanged ( eq ( com.android.bluetooth.a2dp.A2dpService.class . getName ( ) ) , eq ( BluetoothAdapter.STATE_ON ) ) ; mA2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; org.junit.Assert.assertNotNull ( mA2dpService ) ; }
Source:
private boolean canReadPhoneState ( java.lang.String callingPackage , java.lang.String message ) { try { mApp.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , message ) ; return true ; } catch ( java.lang.SecurityException e ) { mApp.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , message ) ; } if ( ( mAppOps.noteOp ( AppOpsManager.OP_READ_PHONE_STATE , android.os.Binder.getCallingUid ( ) , callingPackage ) ) != ( android.app.AppOpsManager.MODE_ALLOWED ) ) { return false ; } return true ; }

Target:
public int getRadioAccessFamily ( int phoneId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getRadioAccessFamily" ) ) ) { return android.telephony.RadioAccessFamily.RAF_UNKNOWN ; } return com.android.internal.telephony.ProxyController.getInstance ( ) . getRadioAccessFamily ( phoneId ) ; }
Source:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "getConnectionState(): device=" + device ) ) ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { return service.getConnectionState ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return STATE_DISCONNECTED ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothHidDevice.TAG , ( "getConnectionState(): device=" + device ) ) ; final android.bluetooth.IBluetoothHidDevice service = mService ; if ( service != null ) { try { return service.getConnectionState ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHidDevice.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHidDevice.TAG , "Proxy not attached to service" ) ; } return STATE_DISCONNECTED ; }