auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void dump ( ) { byte [ ] bytes = getBytes ( ) ; com.android.dx.util.ByteArray ba = new com.android.dx.util.ByteArray ( bytes ) ; com.android.dx.cf.direct.DirectClassFile cf = new com.android.dx.cf.direct.DirectClassFile ( ba , getFilePath ( ) , getStrictParse ( ) ) ; cf.setAttributeFactory ( StdAttributeFactory.THE_ONE ) ; cf.setObserver ( this ) ; cf.getMagic ( ) ; int at = getAt ( ) ; if ( at != ( bytes.length ) ) { parsed ( ba , at , ( ( bytes.length ) - at ) , "<extra data at end of file>" ) ; } }

Target:
public void dump ( ) { byte [ ] bytes = getBytes ( ) ; com.android.dx.util.ByteArray ba = new com.android.dx.util.ByteArray ( bytes ) ; com.android.dx.cf.direct.DirectClassFile cf = new com.android.dx.cf.direct.DirectClassFile ( ba , getFilePath ( ) , getStrictParse ( ) ) ; cf.setAttributeFactory ( StdAttributeFactory.THE_ONE ) ; cf.setObserver ( this ) ; cf.getMagic ( ) ; int readBytes = getReadBytes ( ) ; if ( readBytes != ( bytes.length ) ) { parsed ( ba , readBytes , ( ( bytes.length ) - readBytes ) , "<extra data at end of file>" ) ; } }
Source:
public boolean hasResources ( com.android.resources.ResourceType type ) { update ( ) ; java.util.HashMap < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > list = mResourceItems.get ( type ) ; return ( list != null ) && ( ( list.size ( ) ) > 0 ) ; }

Target:
private void updateResourceItems ( ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceRepository repository = getRepository ( ) ; for ( com.android.resources.ResourceType type : mResourceTypeList ) { java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > list = mResourceItems.get ( type ) ; if ( list != null ) { java.util.Collection < com.android.ide.common.rendering.api.ResourceValue > values = list.values ( ) ; for ( com.android.ide.common.rendering.api.ResourceValue res : values ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem item = repository.getResourceItem ( type , res.getName ( ) ) ; item.add ( this ) ; } } } }
Source:
public void testDexHasTag ( ) throws java.lang.Exception { java.io.File testFolder = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.dextag.test001.jack" ) ; java.io.File out = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; toolchain.srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , out , false , testFolder ) ; java.io.File classesDex = new java.io.File ( out , "classes.dex" ) ; junit.framework.Assert.assertTrue ( hasTag ( classesDex ) ) ; }

Target:
public void testDexHasTag ( ) throws java.lang.Exception { java.io.File testFolder = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.dextag.test001.jack" ) ; java.io.File out = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( out , false , testFolder ) ; java.io.File classesDex = new java.io.File ( out , "classes.dex" ) ; junit.framework.Assert.assertTrue ( hasTag ( classesDex ) ) ; }
Source:
public void setEchoSuppressionEnabled ( boolean enabled ) { if ( com.android.internal.telephony.CallManager.VDBG ) { android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , ( ( " setEchoSuppression(" + enabled ) + ")" ) ) ; android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , this . toString ( ) ) ; } if ( hasActiveFgCall ( ) ) { getActiveFgCall ( ) . getPhone ( ) . setEchoSuppressionEnabled ( enabled ) ; } if ( com.android.internal.telephony.CallManager.VDBG ) { android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , ( ( "End setEchoSuppression(" + enabled ) + ")" ) ) ; android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , this . toString ( ) ) ; } }

Target:
public boolean sendUssdResponse ( com.android.internal.telephony.Phone phone , java.lang.String ussdMessge ) { android.telephony.Rlog.e ( com.android.internal.telephony.CallManager.LOG_TAG , "sendUssdResponse not implemented" ) ; return false ; }
Source:
protected void onConfigurationChanged ( android.content.res.Configuration config ) { super . onConfigurationChanged ( config ) ; mLandscape = ( ( config.orientation ) & ( android.content.res.Configuration.ORIENTATION_LANDSCAPE ) ) != 0 ; mAdapter.setLandscapeMode ( mLandscape ) ; if ( ( isPopupShowing ( ) ) && ( ( getVisibility ( ) ) == ( android.view.View.VISIBLE ) ) ) { setupDropDown ( ) ; performFiltering ( getText ( ) , 0 ) ; } }

Target:
protected void onConfigurationChanged ( android.content.res.Configuration config ) { super . onConfigurationChanged ( config ) ; mLandscape = ( ( config.orientation ) & ( android.content.res.Configuration.ORIENTATION_LANDSCAPE ) ) != 0 ; mAdapter.setLandscapeMode ( mLandscape ) ; if ( ( isPopupShowing ( ) ) && ( ( getVisibility ( ) ) == ( android.view.View.VISIBLE ) ) ) { dismissDropDown ( ) ; showDropDown ( ) ; performFiltering ( getText ( ) , 0 ) ; } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { long timestamp = intent.getLongExtra ( "timestamp" , 0 ) ; android.util.Log.d ( com.android.graphics.benchmark.device.GraphicsBenchmarkTest.TAG , ( "Received intent at " + timestamp ) ) ; mReport.startLoop ( timestamp ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { long timestamp = intent.getLongExtra ( "timestamp" , 0 ) ; android.util.Log.d ( com.android.graphics.benchmark.device.GraphicsBenchmarkTest.TAG , ( "Received intent at " + timestamp ) ) ; mReport.startLoop ( timestamp ) ; if ( ! ( mGotIntent ) ) { mHandler.postDelayed ( ( ) -> mHandler.getLooper ( ) . quit ( ) , mApk.getRunTime ( ) ) ; mGotIntent = true ; } }
Source:
public boolean isValidInnerArrayType ( com.google.gct.intellij.endpoints.validation.PsiType type , com.intellij.openapi.project.Project project ) { if ( type instanceof com.google.gct.intellij.endpoints.validation.PsiArrayType ) { return false ; } com.google.gct.intellij.endpoints.validation.PsiClassType collectionType = com.google.gct.intellij.endpoints.validation.JavaPsiFacade.getElementFactory ( project ) . createTypeByFQClassName ( "java.util.Collection" ) ; if ( collectionType.isAssignableFrom ( type ) ) { return false ; } return true ; }

Target:
public boolean isValidInnerArrayType ( com.google.gct.idea.appengine.validation.PsiType type , com.intellij.openapi.project.Project project ) { if ( type instanceof com.google.gct.idea.appengine.validation.PsiArrayType ) { return false ; } com.google.gct.idea.appengine.validation.PsiClassType collectionType = com.google.gct.idea.appengine.validation.JavaPsiFacade.getElementFactory ( project ) . createTypeByFQClassName ( "java.util.Collection" ) ; if ( collectionType.isAssignableFrom ( type ) ) { return false ; } return true ; }
Source:
private static int convertId ( @ com.android.annotations.Nullable java.lang.String value ) { if ( ( value != null ) && ( ( value.length ( ) ) > 0 ) ) { if ( com.android.sdklib.SdkManager.PATTERN_USB_IDS.matcher ( value ) . matches ( ) ) { java.lang.String v = value.substring ( 2 ) ; try { return java.lang.Integer.parseInt ( v , 16 ) ; } catch ( java.lang.NumberFormatException e ) { } } } return IAndroidTarget.NO_USB_ID ; }

Target:
public com.android.sdklib.BuildToolInfo getBuildTool ( @ com.android.annotations.Nullable com.android.sdklib.repository.FullRevision revision ) { return mLocalSdk.getBuildTool ( revision ) ; }
Source:
private java.lang.String getAppDirectory ( com.android.ddmlib.IDevice device , java.lang.String app , long timeout , java.util.concurrent.TimeUnit timeoutUnit ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException , java.lang.InterruptedException { java.lang.String command = java.lang.String.format ( "run-as %s /system/bin/sh -c pwd" , app ) ; java.util.concurrent.CountDownLatch commandCompleteLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ide.eclipse.ndk.internal.launch.NdkGdbLaunchDelegate.ShellOutputReceiver receiver = new com.android.ide.eclipse.ndk.internal.launch.NdkGdbLaunchDelegate.ShellOutputReceiver ( commandCompleteLatch ) ; device.executeShellCommand ( command , receiver ) ; commandCompleteLatch.await ( timeout , timeoutUnit ) ; return receiver.getOutput ( ) . trim ( ) ; }

Target:
private java.lang.String getAppDirectory ( com.android.ddmlib.IDevice device , java.lang.String app , long timeout , java.util.concurrent.TimeUnit timeoutUnit ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException , java.lang.InterruptedException { java.lang.String command = java.lang.String.format ( "run-as %s /system/bin/sh -c pwd" , app ) ; java.util.concurrent.CountDownLatch commandCompleteLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( commandCompleteLatch ) ; device.executeShellCommand ( command , receiver ) ; commandCompleteLatch.await ( timeout , timeoutUnit ) ; return receiver.getOutput ( ) . trim ( ) ; }
Source:
void showGlobalActionsDialog ( ) { if ( ( mGlobalActions ) == null ) { mGlobalActions = new com.android.internal.policy.impl.GlobalActions ( mContext , mWindowManagerFuncs ) ; } final boolean keyguardShowing = keyguardIsShowingTq ( ) ; mGlobalActions.showDialog ( keyguardShowing , isDeviceProvisioned ( ) ) ; if ( keyguardShowing ) { mPowerManager.userActivity ( android.os.SystemClock.uptimeMillis ( ) , false ) ; } }

Target:
void showGlobalActionsInternal ( ) { sendCloseSystemWindows ( com.android.internal.policy.impl.PhoneWindowManager.SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS ) ; if ( ( mGlobalActions ) == null ) { mGlobalActions = new com.android.internal.policy.impl.GlobalActions ( mContext , mWindowManagerFuncs ) ; } final boolean keyguardShowing = keyguardIsShowingTq ( ) ; mGlobalActions.showDialog ( keyguardShowing , isDeviceProvisioned ( ) ) ; if ( keyguardShowing ) { mPowerManager.userActivity ( android.os.SystemClock.uptimeMillis ( ) , false ) ; } }
Source:
public com.android.jack.dx.dex.file.StringIdItem intern ( com.android.jack.dx.rop.cst.CstString string ) { return intern ( new com.android.jack.dx.dex.file.StringIdItem ( string ) ) ; }

Target:
public com.android.jack.dx.dex.file.StringIdItem intern ( com.android.jack.dx.rop.cst.CstString string ) { if ( string == null ) { throw new java.lang.NullPointerException ( "string == null" ) ; } throwIfPrepared ( ) ; com.android.jack.dx.dex.file.StringIdItem already = strings.get ( string ) ; if ( already != null ) { return already ; } com.android.jack.dx.dex.file.StringIdItem result = new com.android.jack.dx.dex.file.StringIdItem ( string ) ; strings.put ( string , result ) ; return result ; }
Source:
public void noteUserActivityLocked ( int type ) { if ( ( mUserActivityCounters ) == null ) { initUserActivityLocked ( ) ; } if ( type < 0 ) type = 0 ; else if ( type >= ( NUM_USER_ACTIVITY_TYPES ) ) type = ( NUM_USER_ACTIVITY_TYPES ) - 1 ; mUserActivityCounters [ type ] . stepLocked ( ) ; }

Target:
public void noteUserActivityLocked ( int type ) { if ( ( mUserActivityCounters ) == null ) { initUserActivityLocked ( ) ; } if ( type < 0 ) type = 0 ; else if ( type >= ( NUM_USER_ACTIVITY_TYPES ) ) type = ( NUM_USER_ACTIVITY_TYPES ) - 1 ; mUserActivityCounters [ type ] . stepAtomic ( ) ; }
Source:
private void disposeLibraryProject ( java.lang.String libName ) { org.eclipse.core.resources.IPathVariableManager pathVarMgr = org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) . getPathVariableManager ( ) ; final java.lang.String varName = "_android_" + libName ; try { pathVarMgr.setValue ( varName , null ) ; } catch ( org.eclipse.core.runtime.CoreException e ) { java.lang.String message = java.lang.String.format ( "Unable to remove linked path var '%1$s'" , varName ) ; com.android.ide.eclipse.adt.AdtPlugin.log ( e , message ) ; } }

Target:
private void disposeLibraryProject ( java.lang.String libName ) { org.eclipse.core.resources.IPathVariableManager pathVarMgr = org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) . getPathVariableManager ( ) ; final java.lang.String varName = getLibraryVariableName ( libName ) ; try { pathVarMgr.setValue ( varName , null ) ; } catch ( org.eclipse.core.runtime.CoreException e ) { java.lang.String message = java.lang.String.format ( "Unable to remove linked path var '%1$s'" , varName ) ; com.android.ide.eclipse.adt.AdtPlugin.log ( e , message ) ; } }
Source:
public void getPreferredVoicePrivacy ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getPreferredVoicePrivacy ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getPreferredVoicePrivacy" , e ) ; } } }

Target:
public void queryTTYMode ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_QUERY_TTY_MODE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getTTYMode ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "queryTTYMode" , e ) ; } } }
Source:
void showImageEditor ( java.awt.image.BufferedImage image , java.lang.String name ) { getContentPane ( ) . removeAll ( ) ; imageEditor = new com.android.draw9patch.ui.ImageEditorPanel ( this , image , name ) ; add ( imageEditor ) ; saveMenuItem.setEnabled ( true ) ; validate ( ) ; repaint ( ) ; }

Target:
void showImageEditor ( java.awt.image.BufferedImage image , java.lang.String name ) { if ( ( imageEditor ) != null ) { imageEditor.dispose ( ) ; } getContentPane ( ) . removeAll ( ) ; imageEditor = new com.android.draw9patch.ui.ImageEditorPanel ( this , image , name ) ; add ( imageEditor ) ; saveMenuItem.setEnabled ( true ) ; validate ( ) ; repaint ( ) ; }
Source:
public WebView.HitTestResult getHitTestResult ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebView.HitTestResult ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebView.HitTestResult > ( ) { @ java.lang.Override public WebView.HitTestResult call ( ) { return getHitTestResult ( ) ; } } ) ; return ret ; } org.chromium.android_webview.AwContents.HitTestData data = mAwContents.getLastHitTestResult ( ) ; mHitTestResult.setType ( data.hitTestResultType ) ; mHitTestResult.setExtra ( data.hitTestResultExtraData ) ; return mHitTestResult ; }

Target:
public void requestFocusNodeHref ( final android.os.Message hrefMsg ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { requestFocusNodeHref ( hrefMsg ) ; } } ) ; return ; } mAwContents.requestFocusNodeHref ( hrefMsg ) ; }
Source:
synchronized void nScriptInvoke ( long id , int slot ) { validate ( ) ; rsnScriptInvoke ( mContext , id , slot ) ; }

Target:
synchronized void nAllocationRead2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationRead2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public void setServiceInfo ( android.accessibilityservice.AccessibilityServiceInfo info ) { synchronized ( mLock ) { android.accessibilityservice.AccessibilityServiceInfo oldInfo = mAccessibilityServiceInfo ; if ( oldInfo != null ) { oldInfo.updateDynamicallyConfigurableProperties ( info ) ; setDynamicallyConfigurableProperties ( oldInfo ) ; } else { setDynamicallyConfigurableProperties ( info ) ; } } }

Target:
public void setServiceInfo ( android.accessibilityservice.AccessibilityServiceInfo info ) { final long identity = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { android.accessibilityservice.AccessibilityServiceInfo oldInfo = mAccessibilityServiceInfo ; if ( oldInfo != null ) { oldInfo.updateDynamicallyConfigurableProperties ( info ) ; setDynamicallyConfigurableProperties ( oldInfo ) ; } else { setDynamicallyConfigurableProperties ( info ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( identity ) ; } }
Source:
static < K , V > java.util.Map.Entry < K , V > entryOf ( K key , V value ) { com.google.common.base.Preconditions.checkNotNull ( key , "null key in entry: null=%s" , value ) ; com.google.common.base.Preconditions.checkNotNull ( value , "null value in entry: %s=null" , key ) ; return com.google.common.collect.Maps.immutableEntry ( key , value ) ; }

Target:
static < K , V > com.google.common.collect.ImmutableMapEntry.TerminalEntry < K , V > entryOf ( K key , V value ) { com.google.common.collect.CollectPreconditions.checkEntryNotNull ( key , value ) ; return new com.google.common.collect.ImmutableMapEntry.TerminalEntry < K , V > ( key , value ) ; }
Source:
public void writeToParcel ( android.os.Parcel destination , int flags ) { destination.writeParcelable ( mAccountHandle , 0 ) ; destination.writeParcelable ( mAddress , 0 ) ; destination.writeParcelable ( mExtras , 0 ) ; destination.writeInt ( mVideoState ) ; destination.writeString ( mTelecomCallId ) ; destination.writeInt ( ( mShouldShowIncomingCallUi ? 1 : 0 ) ) ; }

Target:
public void writeToParcel ( android.os.Parcel destination , int flags ) { destination.writeParcelable ( mAccountHandle , 0 ) ; destination.writeParcelable ( mAddress , 0 ) ; destination.writeParcelable ( mExtras , 0 ) ; destination.writeInt ( mVideoState ) ; destination.writeString ( mTelecomCallId ) ; destination.writeInt ( ( mShouldShowIncomingCallUi ? 1 : 0 ) ) ; destination.writeParcelable ( mRttPipeFromInCall , 0 ) ; destination.writeParcelable ( mRttPipeToInCall , 0 ) ; }
Source:
public final double double_literal ( ) throws org.jf.smali.RecognitionException { double value = 0.0 ; org.antlr.runtime.tree.CommonTree DOUBLE_LITERAL196 = null ; try { { DOUBLE_LITERAL196 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.DOUBLE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_DOUBLE_LITERAL_in_double_literal3322 ) ) ) ; value = org.jf.smali.LiteralTools.parseDouble ( ( DOUBLE_LITERAL196 != null ? DOUBLE_LITERAL196.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final float float_literal ( ) throws org.jf.smali.RecognitionException { float value = 0.0F ; org.antlr.runtime.tree.CommonTree FLOAT_LITERAL195 = null ; try { { FLOAT_LITERAL195 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.FLOAT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_FLOAT_LITERAL_in_float_literal3309 ) ) ) ; value = org.jf.smali.LiteralTools.parseFloat ( ( FLOAT_LITERAL195 != null ? FLOAT_LITERAL195.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public void calculateAndReportScoreSucceeds ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mWifiInfo.getRssi ( ) ) . thenReturn ( ( - 77 ) ) ; int aggressiveHandover = 0 ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , aggressiveHandover , mWifiMetrics ) ; org.mockito.Mockito.verify ( mNetworkAgent ) . sendNetworkScore ( org.mockito.Mockito.anyInt ( ) ) ; org.mockito.Mockito.verify ( mWifiMetrics ) . incrementWifiScoreCount ( org.mockito.Mockito.anyInt ( ) ) ; }

Target:
public void calculateAndReportScoreSucceeds ( ) throws java.lang.Exception { int aggressiveHandover = 0 ; mWifiInfo.setRssi ( ( - 77 ) ) ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , aggressiveHandover , mWifiMetrics ) ; org.mockito.Mockito.verify ( mNetworkAgent ) . sendNetworkScore ( org.mockito.Mockito.anyInt ( ) ) ; org.mockito.Mockito.verify ( mWifiMetrics ) . incrementWifiScoreCount ( org.mockito.Mockito.anyInt ( ) ) ; }
Source:
public com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult isPossibleNumberWithReason ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.lang.String nationalNumber = getNationalSignificantNumber ( number ) ; int countryCode = number.getCountryCode ( ) ; if ( ! ( hasValidCountryCallingCode ( countryCode ) ) ) { return com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_COUNTRY_CODE ; } java.lang.String regionCode = getRegionCodeForCountryCode ( countryCode ) ; com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; java.util.regex.Pattern possibleNumberPattern = regexCache.getPatternForRegex ( metadata.generalDesc.possibleNumberPattern ) ; return testNumberLengthAgainstPattern ( possibleNumberPattern , nationalNumber ) ; }

Target:
public com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult isPossibleNumberWithReason ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.lang.String nationalNumber = getNationalSignificantNumber ( number ) ; int countryCode = number.getCountryCode ( ) ; if ( ! ( hasValidCountryCallingCode ( countryCode ) ) ) { return com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_COUNTRY_CODE ; } java.lang.String regionCode = getRegionCodeForCountryCode ( countryCode ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; java.util.regex.Pattern possibleNumberPattern = regexCache.getPatternForRegex ( metadata.getGeneralDesc ( ) . getPossibleNumberPattern ( ) ) ; return testNumberLengthAgainstPattern ( possibleNumberPattern , nationalNumber ) ; }
Source:
private void splitInt ( java.lang.String str , int [ ] output ) { if ( str == null ) return ; java.util.StringTokenizer tokenizer = new java.util.StringTokenizer ( str , "," ) ; int index = 0 ; while ( tokenizer.hasMoreElements ( ) ) { java.lang.String token = tokenizer.nextToken ( ) ; output [ ( index ++ ) ] = java.lang.Integer.parseInt ( token ) ; } }

Target:
private void splitInt ( java.lang.String str , int [ ] output ) { if ( str == null ) return ; android.text.TextUtils.StringSplitter splitter = new android.text.TextUtils.SimpleStringSplitter ( ',' ) ; splitter.setString ( str ) ; int index = 0 ; for ( java.lang.String s : splitter ) { output [ ( index ++ ) ] = java.lang.Integer.parseInt ( s ) ; } }
Source:
public void testCleartextTrafficPolicyWithJarHttpURLConnection ( ) throws java.lang.Exception { libcore.net.NetworkSecurityPolicy.setCleartextTrafficPermitted ( true ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:http://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertDataTransmittedByClient ( ) ; } libcore.net.NetworkSecurityPolicy.setCleartextTrafficPermitted ( false ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:http://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertNoDataTransmittedByClient ( ) ; } }

Target:
public void testCleartextTrafficPolicyWithJarHttpURLConnection ( ) throws java.lang.Exception { libcore.net.NetworkSecurityPolicy.setInstance ( new libcore.net.NetworkSecurityPolicyTest.TestNetworkSecurityPolicy ( true ) ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:http://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertDataTransmittedByClient ( ) ; } libcore.net.NetworkSecurityPolicy.setInstance ( new libcore.net.NetworkSecurityPolicyTest.TestNetworkSecurityPolicy ( false ) ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:http://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertNoDataTransmittedByClient ( ) ; } }
Source:
public synchronized com.android.builder.sdk.SdkLoader getSdkLoader ( ) { if ( ( sdkLoader ) == null ) { if ( isRegularSdk ) { getAndCheckSdkFolder ( ) ; if ( ( ( com.android.build.gradle.internal.SdkHandler.sTestSdkFolder ) == null ) && ( ! ( sdkFolder.isDirectory ( ) ) ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "The SDK directory '%s' does not exist." , sdkFolder ) ) ; } sdkLoader = com.android.builder.sdk.DefaultSdkLoader.getLoader ( sdkFolder ) ; } else { sdkLoader = com.android.builder.sdk.PlatformLoader.getLoader ( sdkFolder ) ; } } return sdkLoader ; }

Target:
public synchronized com.android.builder.sdk.SdkLoader getSdkLoader ( ) { if ( ( sdkLoader ) == null ) { if ( isRegularSdk ) { getAndCheckSdkFolder ( ) ; if ( ( ( com.android.build.gradle.internal.SdkHandler.sTestSdkFolder ) == null ) && ( ! ( sdkFolder.isDirectory ( ) ) ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "The SDK directory '%1$s' does not exist." , sdkFolder ) ) ; } sdkLoader = com.android.builder.sdk.DefaultSdkLoader.getLoader ( sdkFolder ) ; } else { sdkLoader = com.android.builder.sdk.PlatformLoader.getLoader ( sdkFolder ) ; } } return sdkLoader ; }
Source:
public java.lang.String getIncludedWithin ( ) { return ( mIncludedWithin ) != null ? mIncludedWithin.getName ( ) : null ; }

Target:
public void activated ( ) { if ( ! ( mActive ) ) { mActive = true ; syncDockingState ( ) ; mActionBar.updateErrorIndicator ( ) ; boolean changed = mConfigChooser.syncRenderState ( ) ; if ( changed ) { return ; } if ( mNeedsRecompute ) { recomputeLayout ( ) ; } } }
Source:
public void testRemoveAll ( ) { java.util.concurrent.CopyOnWriteArrayList full = jsr166.CopyOnWriteArrayListTest.populatedArray ( 3 ) ; java.util.Vector v = new java.util.Vector ( ) ; v.add ( one ) ; v.add ( two ) ; full.removeAll ( v ) ; assertEquals ( 1 , full.size ( ) ) ; }

Target:
public void testRemoveAll ( ) { java.util.concurrent.CopyOnWriteArrayList full = jsr166.CopyOnWriteArrayListTest.populatedArray ( 3 ) ; assertTrue ( full.removeAll ( java.util.Arrays.asList ( one , two ) ) ) ; assertEquals ( 1 , full.size ( ) ) ; assertFalse ( full.removeAll ( java.util.Arrays.asList ( one , two ) ) ) ; assertEquals ( 1 , full.size ( ) ) ; }
Source:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.getPropertyName ( ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; typePath.addSuffix ( fileType.getFileExtension ( ) ) ; return outputVDir.createOutputVFile ( typePath ) ; }

Target:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.getPropertyPrefix ( ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; typePath.addSuffix ( fileType.getFileExtension ( ) ) ; return outputVDir.createOutputVFile ( typePath ) ; }
Source:
public void testNoTimestamp ( ) throws java.io.IOException { java.io.InputStream fileStream ; fileStream = mTestResources.openRawResource ( com.android.bluetooth.tests.R.raw.no_timestamp_call_log ) ; com.android.bluetooth.pbapclient.BluetoothPbapVcardList pbapVCardList = new com.android.bluetooth.pbapclient.BluetoothPbapVcardList ( mAccount , fileStream , PbapClientConnectionHandler.VCARD_TYPE_30 ) ; assertEquals ( 1 , pbapVCardList.getCount ( ) ) ; com.android.bluetooth.pbapclient.CallLogPullRequest processor = new com.android.bluetooth.pbapclient.CallLogPullRequest ( mContext , PbapClientConnectionHandler.MCH_PATH ) ; processor.setResults ( pbapVCardList.getList ( ) ) ; assertFalse ( verifyCallLog ( "555-0001" , null , "3" ) ) ; processor.onPullComplete ( ) ; assertTrue ( verifyCallLog ( "555-0001" , null , "3" ) ) ; }

Target:
public void setUp ( ) { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mTargetContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mTargetContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( android.content.pm.PackageManager e ) { org.junit.Assert.fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; }
Source:
protected int compareTo0 ( com.android.dx.rop.cst.Constant other ) { com.android.dx.rop.cst.CstMethodHandle otherHandle = ( ( com.android.dx.rop.cst.CstMethodHandle ) ( other ) ) ; if ( ( getType ( ) ) == ( otherHandle.getType ( ) ) ) { return getRef ( ) . compareTo ( otherHandle.getRef ( ) ) ; } else { return java.lang.Integer.compare ( getType ( ) , otherHandle.getType ( ) ) ; } }

Target:
protected int compareTo0 ( com.android.dx.rop.cst.Constant other ) { com.android.dx.rop.cst.CstMethodHandle otherHandle = ( ( com.android.dx.rop.cst.CstMethodHandle ) ( other ) ) ; if ( ( getMethodHandleType ( ) ) == ( otherHandle.getMethodHandleType ( ) ) ) { return getRef ( ) . compareTo ( otherHandle.getRef ( ) ) ; } else { return java.lang.Integer.compare ( getMethodHandleType ( ) , otherHandle.getMethodHandleType ( ) ) ; } }
Source:
public void addU8 ( android.support.v8.renderscript.Short3 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU8 ( new android.support.v8.renderscript.Short3 ( v.x , v.y , v.z ) ) ; return ; } addU8 ( v.x ) ; addU8 ( v.y ) ; addU8 ( v.z ) ; }

Target:
public void addI16 ( android.support.v8.renderscript.Short2 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI16 ( v ) ; return ; } addI16 ( v.x ) ; addI16 ( v.y ) ; }
Source:
public void testAesCbcHmacSha512Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesGcm96Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.AEAD_KEY , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }
Source:
public void beginTask ( java.lang.String name , int totalWork ) { }

Target:
public void createConfigFile ( ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog dialog = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog ( mConfigChooser.getShell ( ) , mEditedFile.getName ( ) , mConfigChooser.getConfiguration ( ) . getFullConfig ( ) ) ; if ( ( dialog.open ( ) ) != ( org.eclipse.jface.window.Window.OK ) ) { return ; } com.android.ide.common.resources.configuration.FolderConfiguration config = new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; dialog.getConfiguration ( config ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob job = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob ( this , mEditedFile , config ) ; job.schedule ( ) ; }
Source:
void dispose ( ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.GCWrapper.ColorWrapper c : mColorMap.values ( ) ) { c.getColor ( ) . dispose ( ) ; } mColorMap.clear ( ) ; }

Target:
void dispose ( ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.GCWrapper.ColorWrapper c : mColorMap.values ( ) ) { c.getColor ( ) . dispose ( ) ; } mColorMap.clear ( ) ; for ( org.eclipse.swt.graphics.Color c : mStyleColorMap.values ( ) ) { c.dispose ( ) ; } mStyleColorMap.clear ( ) ; }
Source:
public void addF32 ( android.support.v8.renderscript.Float2 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addF32 ( new android.support.v8.renderscript.Float2 ( v.x , v.y ) ) ; return ; } addF32 ( v.x ) ; addF32 ( v.y ) ; }

Target:
public void addF32 ( android.support.v8.renderscript.Float3 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addF32 ( v ) ; return ; } addF32 ( v.x ) ; addF32 ( v.y ) ; addF32 ( v.z ) ; }
Source:
public void invokespecial ( final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) { mv.visitMethodInsn ( Opcodes.INVOKESPECIAL , owner , name , desc ) ; }

Target:
public void invokespecial ( final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) { if ( ( api ) >= ( org.objectweb.asm.Opcodes.ASM5 ) ) { invokespecial ( owner , name , desc , false ) ; return ; } mv.visitMethodInsn ( Opcodes.INVOKESPECIAL , owner , name , desc , false ) ; }
Source:
public java.lang.String getDescription ( ) { if ( getVariantConfiguration ( ) . hasFlavors ( ) ) { return java.lang.String.format ( "Test build for the %s%s build" , getCapitalizedFlavorName ( ) , getCapitalizedBuildTypeName ( ) ) ; } else { return java.lang.String.format ( "Test build for the %s build" , getCapitalizedBuildTypeName ( ) ) ; } }

Target:
public java.lang.String getDescription ( ) { java.lang.String prefix ; switch ( getVariantConfiguration ( ) . getType ( ) ) { case ANDROID_TEST : prefix = "Android (on device) tests" ; break ; case UNIT_TEST : prefix = "Unit tests" ; break ; default : throw new java.lang.IllegalStateException ( "Unknown test variant type." ) ; } if ( getVariantConfiguration ( ) . hasFlavors ( ) ) { return java.lang.String.format ( "%s for the %s%s build" , prefix , getCapitalizedFlavorName ( ) , getCapitalizedBuildTypeName ( ) ) ; } else { return java.lang.String.format ( "%s for the %s build" , prefix , getCapitalizedBuildTypeName ( ) ) ; } }
Source:
public void cleanup ( ) { cleanupNative ( ) ; mAudioConfigs.clear ( ) ; }

Target:
public void cleanup ( ) { if ( ! ( com.android.bluetooth.a2dp.A2dpSinkStateMachine.USE_AUDIOTRACK ) ) releasePatch ( ) ; cleanupNative ( ) ; mAudioConfigs.clear ( ) ; if ( com.android.bluetooth.a2dp.A2dpSinkStateMachine.USE_AUDIOTRACK ) return ; if ( ( mContext ) != null ) mContext.unregisterReceiver ( mA2dpReceiver ) ; mAudioManager.unregisterAudioPortUpdateListener ( mAudioPortListener ) ; }
Source:
private static com.google.common.collect.ImmutableSet < java.lang.Class < ? > > getRawTypes ( java.lang.reflect.Type [ ] types ) { com.google.common.collect.ImmutableSet.Builder < java.lang.Class < ? > > builder = com.google.common.collect.ImmutableSet.builder ( ) ; for ( java.lang.reflect.Type type : types ) { builder.addAll ( com.google.common.reflect.TypeToken.getRawTypes ( type ) ) ; } return builder.build ( ) ; }

Target:
void visitWildcardType ( java.lang.reflect.WildcardType t ) { visit ( t.getUpperBounds ( ) ) ; }
Source:
public boolean onTransact ( int code , android.os.Parcel data , android.os.Parcel reply , int flags ) throws android.os.RemoteException { try { return super . onTransact ( code , data , reply , flags ) ; } catch ( java.lang.RuntimeException e ) { if ( ( ! ( e instanceof java.lang.SecurityException ) ) && ( ! ( e instanceof java.lang.IllegalArgumentException ) ) ) { android.util.Slog.e ( com.android.server.pm.PackageManagerService.TAG , "Package Manager Crash" , e ) ; } throw e ; } }

Target:
public boolean onTransact ( int code , android.os.Parcel data , android.os.Parcel reply , int flags ) throws android.os.RemoteException { try { return super . onTransact ( code , data , reply , flags ) ; } catch ( java.lang.RuntimeException e ) { if ( ( ! ( e instanceof java.lang.SecurityException ) ) && ( ! ( e instanceof java.lang.IllegalArgumentException ) ) ) { android.util.Slog.wtf ( com.android.server.pm.PackageManagerService.TAG , "Package Manager Crash" , e ) ; } throw e ; } }
Source:
boolean hasActivityState ( java.lang.String activityName , java.lang.String activityState ) { java.lang.String fullName = android.server.cts.ActivityManagerTestBase.ActivityManagerTestBase.getActivityComponentName ( activityName ) ; for ( android.server.cts.ActivityManagerState.ActivityStack stack : mStacks ) { for ( android.server.cts.ActivityManagerState.ActivityTask task : stack.mTasks ) { for ( android.server.cts.ActivityManagerState.Activity activity : task.mActivities ) { if ( activity.name.equals ( fullName ) ) { return activity.state.equals ( activityState ) ; } } } } return false ; }

Target:
boolean hasActivityState ( java.lang.String activityName , java.lang.String activityState ) { java.lang.String fullName = android.server.cts.ActivityManagerTestBase.getActivityComponentName ( activityName ) ; for ( android.server.cts.ActivityManagerState.ActivityStack stack : mStacks ) { for ( android.server.cts.ActivityManagerState.ActivityTask task : stack.mTasks ) { for ( android.server.cts.ActivityManagerState.Activity activity : task.mActivities ) { if ( activity.name.equals ( fullName ) ) { return activity.state.equals ( activityState ) ; } } } } return false ; }
Source:
private static void testBooleanMethod ( ) { if ( Main.booleanMethod ( false , true , false , true , false , true , false , true , false , true ) ) { throw new java.lang.AssertionError ( ) ; } if ( ! ( Main.booleanMethod ( true , true , false , true , false , true , false , true , false , true ) ) ) { throw new java.lang.AssertionError ( ) ; } }

Target:
public void nonstaticMethod ( ) { java.lang.System.out.println ( "Super.nonstaticMethod" ) ; nonstaticMethodSuperCalled = true ; }
Source:
public void onClick ( android.view.View v ) { switch ( v.getId ( ) ) { case R.id.audio_frequency_unprocessed_test1_btn : setMaxLevel ( ) ; testMaxLevel ( ) ; startTest1 ( ) ; break ; } }

Target:
public void onClick ( android.view.View v ) { int id = v.getId ( ) ; switch ( id ) { case R.id.unprocessed_test_tone_btn : startTest ( com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.TEST_TONE ) ; break ; case R.id.unprocessed_play_tone_btn : playerToggleButton ( id , com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.SOURCE_TONE ) ; break ; case R.id.unprocessed_test_noise_btn : startTest ( com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.TEST_NOISE ) ; break ; case R.id.unprocessed_play_noise_btn : playerToggleButton ( id , com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.SOURCE_NOISE ) ; break ; case R.id.unprocessed_test_usb_background_btn : startTest ( com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.TEST_USB_BACKGROUND ) ; break ; case R.id.unprocessed_test_usb_noise_btn : startTest ( com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.TEST_USB_NOISE ) ; break ; case R.id.unprocessed_play_usb_noise_btn : playerToggleButton ( id , com.android.cts.verifier.audio.AudioFrequencyUnprocessedActivity.SOURCE_NOISE ) ; break ; } }
Source:
public boolean isValidShortNumberForRegion ( java.lang.String shortNumber , java.lang.String regionDialingFrom ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc generalDesc = phoneMetadata.getGeneralDesc ( ) ; if ( ! ( matchesPossibleNumberAndNationalNumber ( shortNumber , generalDesc ) ) ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc shortNumberDesc = phoneMetadata.getShortCode ( ) ; return matchesPossibleNumberAndNationalNumber ( shortNumber , shortNumberDesc ) ; }

Target:
public boolean isValidShortNumber ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.util.List < java.lang.String > regionCodes = getRegionCodesForCountryCode ( number.getCountryCode ( ) ) ; java.lang.String regionCode = getRegionCodeForShortNumberFromRegionList ( number , regionCodes ) ; if ( ( ( regionCodes.size ( ) ) > 1 ) && ( regionCode != null ) ) { return true ; } return isValidShortNumberForRegion ( number , regionCode ) ; }
Source:
public java.lang.String getPropertySync ( java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( latch ) ; executeShellCommand ( java.lang.String.format ( "getprop '%s'" , name ) , receiver , com.android.ddmlib.Device.GETPROP_TIMEOUT ) ; try { latch.await ( com.android.ddmlib.Device.GETPROP_TIMEOUT , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { return null ; } java.lang.String value = receiver.getOutput ( ) . trim ( ) ; if ( value.isEmpty ( ) ) { return null ; } return value ; }

Target:
public java.lang.String getPropertyCacheOrSync ( java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { java.util.concurrent.Future < java.lang.String > future = mPropFetcher.getProperty ( name ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException e ) { } catch ( java.util.concurrent.ExecutionException e ) { } return null ; }
Source:
public void serviceDoneExecuting ( android.os.IBinder token , int type , int startId , int res ) { synchronized ( this ) { if ( ! ( token instanceof com.android.server.am.ServiceRecord ) ) { throw new java.lang.IllegalArgumentException ( "Invalid service token" ) ; } mServices.serviceDoneExecutingLocked ( ( ( com.android.server.am.ServiceRecord ) ( token ) ) , type , startId , res ) ; } }

Target:
public void serviceDoneExecuting ( android.os.IBinder token , int type , int startId , int res ) { synchronized ( this ) { if ( ! ( token instanceof com.android.server.am.ServiceRecord ) ) { android.util.Slog.e ( com.android.server.am.ActivityManagerService.TAG , ( "serviceDoneExecuting: Invalid service token=" + token ) ) ; throw new java.lang.IllegalArgumentException ( "Invalid service token" ) ; } mServices.serviceDoneExecutingLocked ( ( ( com.android.server.am.ServiceRecord ) ( token ) ) , type , startId , res ) ; } }
Source:
public java.io.FileDescriptor socket ( int domain , int type , int protocol ) throws android.system.ErrnoException { final java.io.FileDescriptor fd = os.socket ( domain , type , protocol ) ; if ( ( domain != ( AF_UNIX ) ) && ( domain != ( AF_NETLINK ) ) ) { tagSocket ( fd ) ; } return fd ; }

Target:
public java.io.FileDescriptor socket ( int domain , int type , int protocol ) throws android.system.ErrnoException { final java.io.FileDescriptor fd = os.socket ( domain , type , protocol ) ; if ( libcore.io.BlockGuardOs.isInetDomain ( domain ) ) { tagSocket ( fd ) ; } return fd ; }
Source:
public void locationCallbackFinished ( android.location.ILocationListener listener ) { com.android.server.LocationManagerService.Receiver receiver = getReceiver ( listener ) ; if ( receiver != null ) { synchronized ( receiver ) { long identity = android.os.Binder.clearCallingIdentity ( ) ; receiver.decrementPendingBroadcastsLocked ( ) ; android.os.Binder.restoreCallingIdentity ( identity ) ; } } }

Target:
public void locationCallbackFinished ( android.location.ILocationListener listener ) { android.os.IBinder binder = listener.asBinder ( ) ; com.android.server.LocationManagerService.Receiver receiver = mReceivers.get ( binder ) ; if ( receiver != null ) { synchronized ( receiver ) { long identity = android.os.Binder.clearCallingIdentity ( ) ; receiver.decrementPendingBroadcastsLocked ( ) ; android.os.Binder.restoreCallingIdentity ( identity ) ; } } }
Source:
public void playDtmfTone ( java.lang.String callId , char digit ) { mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_PLAY_DTMF_TONE , digit , 0 , callId ) . sendToTarget ( ) ; }

Target:
public void playDtmfTone ( java.lang.String callId , char digit , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , android.telecom.ConnectionService.SESSION_PLAY_DTMF ) ; try { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = digit ; args.arg2 = callId ; args.arg3 = android.telecom.Log.createSubsession ( ) ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_PLAY_DTMF_TONE , args ) . sendToTarget ( ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JThrowStatement throwStmt ) { super . visit ( throwStmt ) ; com.android.jack.cfg.ThrowBasicBlock throwBlock = new com.android.jack.cfg.ThrowBasicBlock ( ( ( basicBlockId ) ++ ) , currentStmts ) ; setBlockOfStatement ( throwBlock ) ; forwardBranchResolver.addPeiBasicBlock ( throwBlock , null , throwStmt.getJCatchBlocks ( ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JThrowStatement throwStmt ) { super . visit ( throwStmt ) ; com.android.jack.cfg.ThrowBasicBlock throwBlock = new com.android.jack.cfg.ThrowBasicBlock ( ( ( basicBlockId ) ++ ) , currentStmts ) ; setBlockOfStatement ( throwBlock ) ; forwardBranchResolver.addPeiBasicBlock ( throwBlock , null , throwStmt.getJCatchBlocks ( ) ) ; throwBlock.setExitBlockWhenUncaught ( exitBlock ) ; return false ; }