auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void cachePreLayoutSpanMapping ( ) { final int childCount = getChildCount ( ) ; for ( int i = 0 ; i < childCount ; i ++ ) { final android.support.v7.widget.GridLayoutManager.LayoutParams lp = ( ( android.support.v7.widget.GridLayoutManager.LayoutParams ) ( getChildAt ( i ) . getLayoutParams ( ) ) ) ; final int viewPosition = lp.getViewPosition ( ) ; mPreLayoutSpanSizeCache.put ( viewPosition , lp.getSpanSize ( ) ) ; mPreLayoutSpanIndexCache.put ( viewPosition , lp.getSpanIndex ( ) ) ; } }

Target:
private void cachePreLayoutSpanMapping ( ) { final int childCount = getChildCount ( ) ; for ( int i = 0 ; i < childCount ; i ++ ) { final android.support.v7.widget.GridLayoutManager.LayoutParams lp = ( ( android.support.v7.widget.GridLayoutManager.LayoutParams ) ( getChildAt ( i ) . getLayoutParams ( ) ) ) ; final int viewPosition = lp.getViewLayoutPosition ( ) ; mPreLayoutSpanSizeCache.put ( viewPosition , lp.getSpanSize ( ) ) ; mPreLayoutSpanIndexCache.put ( viewPosition , lp.getSpanIndex ( ) ) ; } }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "MathTest.java:12: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid argument float to double conversion\n" + ( "MathTest.java:18: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid double to float return value conversion\n" + "MathTest.java:23: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid argument float to double conversion" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/MathTest.java.txt=>src/test/bytecode/MathTest.java" , "bytecode/MathTest.class.data=>bin/classes/test/bytecode/MathTest.class" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/bytecode/MathTest.java:12: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid argument float to double conversion [FloatMath]\n" + ( ( ( ( ( ( ( ( ( " floatResult = (float) Math.sqrt(x);\n" + " ~~~~\n" ) + "src/test/bytecode/MathTest.java:18: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid double to float return value conversion [FloatMath]\n" ) + " floatResult = (float) Math.sqrt(x);\n" ) + " ~~~~\n" ) + "src/test/bytecode/MathTest.java:23: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid argument float to double conversion [FloatMath]\n" ) + " doubleResult = Math.sqrt(x);\n" ) + " ~~~~\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/MathTest.java.txt=>src/test/bytecode/MathTest.java" , "bytecode/MathTest.class.data=>bin/classes/test/bytecode/MathTest.class" ) ) ; }
Source:
public void onCallStateChanged ( com.android.server.telecom.Call call , int oldState , int newState ) { if ( callShouldBeIgnored ( call ) ) { return ; } mEventHandler.obtainMessage ( com.android.server.telecom.ConnectionServiceFocusManager.MSG_CALL_STATE_CHANGED , oldState , newState , call ) . sendToTarget ( ) ; }

Target:
public void onCallStateChanged ( com.android.server.telecom.Call call , int oldState , int newState ) { if ( callShouldBeIgnored ( call ) ) { return ; } mEventHandler.obtainMessage ( com.android.server.telecom.ConnectionServiceFocusManager.MSG_CALL_STATE_CHANGED , oldState , newState , new com.android.server.telecom.ConnectionServiceFocusManager.MessageArgs ( android.telecom.Log.createSubsession ( ) , "CSFM.oCSS" , call ) ) . sendToTarget ( ) ; }
Source:
private java.lang.String normalizeWord ( java.lang.String word ) { switch ( this ) { case LOWER_HYPHEN : return com.google.common.base.Ascii.toLowerCase ( word ) ; case LOWER_UNDERSCORE : return com.google.common.base.Ascii.toLowerCase ( word ) ; case LOWER_CAMEL : return com.google.common.base.CaseFormat.firstCharOnlyToUpper ( word ) ; case UPPER_CAMEL : return com.google.common.base.CaseFormat.firstCharOnlyToUpper ( word ) ; case UPPER_UNDERSCORE : return com.google.common.base.Ascii.toUpperCase ( word ) ; } throw new java.lang.RuntimeException ( ( "unknown case: " + ( this ) ) ) ; }

Target:
private java.lang.String normalizeFirstWord ( java.lang.String word ) { return ( this ) == ( com.google.common.base.CaseFormat.LOWER_CAMEL ) ? com.google.common.base.Ascii.toLowerCase ( word ) : normalizeWord ( word ) ; }
Source:
public java.lang.Boolean execute ( boolean lastAttempt ) { try { com.intellij.openapi.util.io.FileUtilRt.ourFilesDeleteIfExistsMethod.invoke ( null , fileObject ) ; return java.lang.Boolean.TRUE ; } catch ( java.lang.reflect.InvocationTargetException e ) { if ( ! ( ( e.getCause ( ) ) instanceof java.io.IOException ) ) { return java.lang.Boolean.FALSE ; } } catch ( java.lang.IllegalAccessException e ) { return java.lang.Boolean.FALSE ; } return lastAttempt ? java.lang.Boolean.FALSE : null ; }

Target:
public java.lang.Boolean execute ( boolean lastAttempt ) { try { com.intellij.openapi.util.io.FileUtilRt.NIOReflect.ourFilesDeleteIfExistsMethod.invoke ( null , fileObject ) ; return java.lang.Boolean.TRUE ; } catch ( java.lang.reflect.InvocationTargetException e ) { if ( ! ( ( e.getCause ( ) ) instanceof java.io.IOException ) ) { return java.lang.Boolean.FALSE ; } } catch ( java.lang.IllegalAccessException e ) { return java.lang.Boolean.FALSE ; } return lastAttempt ? java.lang.Boolean.FALSE : null ; }
Source:
private void responseRadioCapability ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.RadioCapability rc ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.RadioCapability ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalRadioCapability ( rc , mRil ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseRadioCapability ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.RadioCapability rc ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.RadioCapability ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalRadioCapability ( rc , mRil ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
public void setDataAllowed ( boolean allowed , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_ALLOW_DATA , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " allowed: " ) + allowed ) ) ; } rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( allowed ? 1 : 0 ) ) ; send ( rr ) ; }

Target:
public void setDataAllowed ( boolean allowed , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_ALLOW_DATA , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " allowed: " ) + allowed ) ) ; } rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( allowed ? 1 : 0 ) ) ; send ( rr ) ; }
Source:
public void testInnerClass ( ) throws java.lang.Exception { assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:23: Error: Class referenced in the manifest, test.pkg.Foo.Baz, was not found in the project or the libraries [MissingRegistered]\n" ) + " <activity\n" ) + " ^\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "registration/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "registration/Foo.java.txt=>src/test/pkg/Foo.java" ) ) ; }

Target:
public void testLibraryProjects ( ) throws java.lang.Exception { mScopes = null ; java.io.File master = getProjectDir ( "MasterProject" , "bytecode/AndroidManifestWrongRegs.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "bytecode/.classpath=>.classpath" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "bytecode/OnClickActivity.java.txt=>src/test/pkg/OnClickActivity.java" , "bytecode/OnClickActivity.class.data=>bin/classes/test/pkg/OnClickActivity.class" , "bytecode/TestService.java.txt=>src/test/pkg/TestService.java" , "bytecode/TestService.class.data=>bin/classes/test/pkg/TestService.class" , "bytecode/TestProvider.java.txt=>src/test/pkg/TestProvider.java" , "bytecode/TestProvider.class.data=>bin/classes/test/pkg/TestProvider.class" , "bytecode/TestProvider2.java.txt=>src/test/pkg/TestProvider2.java" , "bytecode/TestProvider2.class.data=>bin/classes/test/pkg/TestProvider2.class" ) ; assertEquals ( ( "MasterProject/AndroidManifest.xml:17: Error: Class referenced in the manifest, test.pkg.TestReceiver, was not found in the project or the libraries [MissingRegistered]\n" + ( ( " <service android:name=\"TestReceiver\" />\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { debugLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : { debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( java.lang.String ) ( msg.obj ) ) , msg.arg1 ) ; } break ; } }

Target:
public void handleMessage ( android.os.Message msg ) { debugLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) , msg.arg1 ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_REGISTERED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_REGISTERED" ) ; registerProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_UNREGISTERED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_UNREGISTERED" ) ; unregisterProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; } }
Source:
public void setUp ( ) throws java.lang.Exception { logd ( "CarrierIdentifierTest +Setup!" ) ; super . setUp ( getClass ( ) . getSimpleName ( ) ) ; ( ( android.test.mock.MockContentResolver ) ( mContext.getContentResolver ( ) ) ) . addProvider ( CarrierIdentification.CONTENT_URI.getAuthority ( ) , new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdContentProvider ( ) ) ; mCarrierIdentifierHandler = new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdentifierHandler ( getClass ( ) . getSimpleName ( ) ) ; mCarrierIdentifierHandler.start ( ) ; waitUntilReady ( ) ; logd ( "CarrierIdentifierTest -Setup!" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { logd ( "CarrierIdentifierTest +Setup!" ) ; super . setUp ( getClass ( ) . getSimpleName ( ) ) ; ( ( android.test.mock.MockContentResolver ) ( mContext.getContentResolver ( ) ) ) . addProvider ( CarrierIdentification.AUTHORITY , new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdContentProvider ( ) ) ; mCarrierIdentifierHandler = new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdentifierHandler ( getClass ( ) . getSimpleName ( ) ) ; mCarrierIdentifierHandler.start ( ) ; waitUntilReady ( ) ; logd ( "CarrierIdentifierTest -Setup!" ) ; }
Source:
public void onUssd ( int var1 , int var2 , java.lang.String var3 ) { }

Target:
public void onUssd ( int indicationType , int ussdModeType , java.lang.String msg ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogMore ( com.android.internal.telephony.RILConstants.RIL_UNSOL_ON_USSD , ( "" + ussdModeType ) ) ; java.lang.String [ ] resp = new java.lang.String [ 2 ] ; resp [ 0 ] = "" + ussdModeType ; resp [ 1 ] = msg ; if ( ( mRil.mUSSDRegistrant ) != null ) { mRil.mUSSDRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , resp , null ) ) ; } }
Source:
public void testRunEnded ( long elapsedTime , java.util.Map < java.lang.String , java.lang.String > runMetrics ) { notifyTestRunEnded ( elapsedTime ) ; com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( mLaunchInfo.getProject ( ) , LaunchMessages.RemoteAdtTestRunner_RunCompleteMsg ) ; }

Target:
public void testRunEnded ( long elapsedTime , java.util.Map < java.lang.String , java.lang.String > runMetrics ) { ( mRunCount ) -- ; if ( ( mRunCount ) > 0 ) { return ; } notifyTestRunEnded ( elapsedTime ) ; com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( mLaunchInfo.getProject ( ) , LaunchMessages.RemoteAdtTestRunner_RunCompleteMsg ) ; }
Source:
protected void renamePackage ( @ com.android.annotations.NonNull java.lang.Object [ ] testData , boolean renameSubpackages , boolean updateReferences , @ com.android.annotations.NonNull java.lang.String newName , @ com.android.annotations.NonNull java.lang.String expected ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( testData ) ; renamePackage ( project , renameSubpackages , updateReferences , newName , expected ) ; }

Target:
protected void renamePackage ( @ com.android.annotations.NonNull java.lang.Object [ ] testData , boolean renameSubpackages , boolean updateReferences , @ com.android.annotations.NonNull java.lang.String newName , @ com.android.annotations.NonNull java.lang.String expected , boolean expectedAppPackageRenameWarning ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( testData ) ; java.lang.String expectedWarnings = ( expectedAppPackageRenameWarning ) ? com.android.ide.eclipse.adt.internal.refactorings.core.AndroidPackageRenameParticipantTest.EXPECTED_WARNINGS_TEMPLATE.replace ( "PROJECTNAME" , project.getName ( ) ) : null ; renamePackage ( project , renameSubpackages , updateReferences , newName , expected , expectedWarnings ) ; }
Source:
public void onStart ( ) { if ( com.android.server.PinnerService.DEBUG ) { android.util.Slog.i ( com.android.server.PinnerService.TAG , "Starting PinnerService" ) ; } mBinderService = new com.android.server.PinnerService.BinderService ( ) ; publishBinderService ( "pinner" , mBinderService ) ; mPinnerHandler.obtainMessage ( com.android.server.PinnerService.PinnerHandler.PIN_ONSTART_MSG ) . sendToTarget ( ) ; mPinnerHandler.obtainMessage ( com.android.server.PinnerService.PinnerHandler.PIN_CAMERA_MSG , UserHandle.USER_SYSTEM , 0 ) . sendToTarget ( ) ; }

Target:
public void onStart ( ) { if ( com.android.server.PinnerService.DEBUG ) { android.util.Slog.i ( com.android.server.PinnerService.TAG , "Starting PinnerService" ) ; } mBinderService = new com.android.server.PinnerService.BinderService ( ) ; publishBinderService ( "pinner" , mBinderService ) ; publishLocalService ( com.android.server.PinnerService.class , this ) ; mPinnerHandler.obtainMessage ( com.android.server.PinnerService.PinnerHandler.PIN_ONSTART_MSG ) . sendToTarget ( ) ; mPinnerHandler.obtainMessage ( com.android.server.PinnerService.PinnerHandler.PIN_CAMERA_MSG , UserHandle.USER_SYSTEM , 0 ) . sendToTarget ( ) ; }
Source:
public void showTab ( int index ) { if ( index == ( com.android.dialer.app.list.DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL ) ) { if ( mAdapter.hasActiveVoicemailProvider ( ) ) { mViewPager.setCurrentItem ( mAdapter.getRtlPosition ( com.android.dialer.app.list.DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL ) ) ; } else if ( ! ( mHasFetchedVoicemailStatus ) ) { mShowVoicemailTabAfterVoicemailStatusIsFetched = true ; } } else if ( index < ( getTabCount ( ) ) ) { mViewPager.setCurrentItem ( mAdapter.getRtlPosition ( index ) ) ; } }

Target:
public void showTab ( int index ) { if ( index == ( DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL ) ) { if ( mAdapter.hasActiveVoicemailProvider ( ) ) { mViewPager.setCurrentItem ( mAdapter.getRtlPosition ( DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL ) ) ; } else if ( ! ( mHasFetchedVoicemailStatus ) ) { mShowVoicemailTabAfterVoicemailStatusIsFetched = true ; } } else if ( index < ( getTabCount ( ) ) ) { mViewPager.setCurrentItem ( mAdapter.getRtlPosition ( index ) ) ; } }
Source:
public java.lang.String describeFirstNonRequestableCapability ( ) { if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED ) ) return "NET_CAPABILITY_VALIDATED" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL ) ) return "NET_CAPABILITY_CAPTIVE_PORTAL" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_FOREGROUND ) ) return "NET_CAPABILITY_FOREGROUND" ; if ( ( ( mNetworkCapabilities ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ) != 0 ) { return "unknown non-requestable capabilities " + ( java.lang.Long.toHexString ( mNetworkCapabilities ) ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }

Target:
public void setEstablishingVpnAppUid ( final int uid ) { mEstablishingVpnAppUid = uid ; }
Source:
public void saveWebArchive ( final java.lang.String basename , final boolean autoname , final android.webkit.ValueCallback < java.lang.String > callback ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { saveWebArchive ( basename , autoname , callback ) ; } } ) ; return ; } mAwContents.saveWebArchive ( basename , autoname , callback ) ; }

Target:
public android.webkit.WebBackForwardList restoreState ( final android.os.Bundle inState ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return restoreState ( inState ) ; } } ) ; return ret ; } if ( inState == null ) return null ; if ( ! ( mAwContents.restoreState ( inState ) ) ) return null ; return copyBackForwardList ( ) ; }
Source:
private static java.io.File getNoConfigProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ) == null ) { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getReferenceToolchain ( ) ; java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsSrcDir = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.annotation.processor.sample.processors" ) ; toolchain.srcToLib ( processorsDir , false , com.android.jack.annotation.processor.AnnotationProcessorTests.ANNOTATIONS_DIR , processorsSrcDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors = processorsDir ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ; }

Target:
private static java.io.File getNoConfigProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ) == null ) { java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsJar = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "processor" , ".jar" ) ; java.io.File processorsSrcDir = com.android.jack.annotation.processor.AnnotationProcessorTests.compileProcessorsToDir ( processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.makeZipFromDir ( processorsDir , processorsJar ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors = processorsJar ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ; }
Source:
public boolean onPreferenceChange ( android.preference.Preference preference , java.lang.Object newValue ) { if ( preference == ( mAutoSelect ) ) { boolean autoSelect = ( ( java.lang.Boolean ) ( newValue ) ) ; selectNetworkAutomatic ( autoSelect ) ; com.android.internal.logging.MetricsLogger.action ( getContext ( ) , MetricsEvent.ACTION_MOBILE_NETWORK_AUTO_SELECT_NETWORK_TOGGLE , autoSelect ) ; return true ; } return false ; }

Target:
public boolean onPreferenceChange ( android.preference.Preference preference , java.lang.Object newValue ) { if ( preference == ( mAutoSelect ) ) { boolean autoSelect = ( ( java.lang.Boolean ) ( newValue ) ) ; logd ( ( "onPreferenceChange autoSelect: " + ( java.lang.String.valueOf ( autoSelect ) ) ) ) ; selectNetworkAutomatic ( autoSelect ) ; com.android.internal.logging.MetricsLogger.action ( getContext ( ) , MetricsEvent.ACTION_MOBILE_NETWORK_AUTO_SELECT_NETWORK_TOGGLE , autoSelect ) ; return true ; } return false ; }
Source:
public int onStartCommand ( android.content.Intent intent , int flags , int startId ) { android.app.Notification notification = new android.app.Notification.Builder ( this , "Foreground Service" ) . setContentTitle ( "CTS Foreground" ) . setSmallIcon ( android.R.drawable.ic_secure ) . build ( ) ; startForeground ( 1 , notification ) ; android.os.Message msg = mServiceHandler.obtainMessage ( ) ; msg.arg1 = startId ; mServiceHandler.sendMessage ( msg ) ; return START_NOT_STICKY ; }

Target:
public int onStartCommand ( android.content.Intent intent , int flags , int startId ) { android.app.Notification notification = new android.app.Notification.Builder ( this , "Foreground Service" ) . setContentTitle ( "CTS Foreground" ) . setSmallIcon ( android.R.drawable.ic_secure ) . build ( ) ; android.util.Log.i ( com.android.server.cts.device.batterystats.SimpleForegroundService.TAG , "Starting Foreground." ) ; startForeground ( 1 , notification ) ; android.os.Message msg = mServiceHandler.obtainMessage ( ) ; msg.arg1 = startId ; mServiceHandler.sendMessage ( msg ) ; return START_NOT_STICKY ; }
Source:
public void execute ( ) throws org.apache.tools.ant.BuildException { if ( ( mConditionIsSet ) == false ) { throw new org.apache.tools.ant.BuildException ( "Condition has not been set." ) ; } if ( ( ( mThen ) == null ) && ( ( mElse ) == null ) ) { throw new org.apache.tools.ant.BuildException ( "Need at least <then> or <else>" ) ; } if ( mCondition ) { if ( ( mThen ) != null ) { mThen.execute ( ) ; } } else { if ( ( mElse ) != null ) { mElse.execute ( ) ; } } }

Target:
public void execute ( ) throws org.apache.tools.ant.BuildException { if ( ( mConditionIsSet ) == false ) { throw new org.apache.tools.ant.BuildException ( "condition or isset attribute is missing" ) ; } if ( ( ( mThen ) == null ) && ( ( mElse ) == null ) ) { throw new org.apache.tools.ant.BuildException ( "Need at least <then> or <else>" ) ; } if ( mCondition ) { if ( ( mThen ) != null ) { mThen.execute ( ) ; } } else { if ( ( mElse ) != null ) { mElse.execute ( ) ; } } }
Source:
public void setVersioncode ( java.lang.String versionCode ) { if ( ( versionCode.length ( ) ) > 0 ) { try { mVersionCode = java.lang.Integer.decode ( versionCode ) ; } catch ( java.lang.NumberFormatException e ) { java.lang.System.out.println ( java.lang.String.format ( "WARNING: Ignoring invalid version code value '%s'." , versionCode ) ) ; } } }

Target:
public void setVersioncode ( java.lang.String versionCode ) { if ( ! ( versionCode.isEmpty ( ) ) ) { try { mVersionCode = java.lang.Integer.decode ( versionCode ) ; } catch ( java.lang.NumberFormatException e ) { java.lang.System.out.println ( java.lang.String.format ( "WARNING: Ignoring invalid version code value '%s'." , versionCode ) ) ; } } }
Source:
public void getDefaultDownloadableSubscriptionList ( android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { getIEuiccController ( ) . getDefaultDownloadableSubscriptionList ( mContext.getOpPackageName ( ) , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void getDownloadableSubscriptionMetadata ( android.telephony.euicc.DownloadableSubscription subscription , android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { android.telephony.euicc.EuiccManager.getIEuiccController ( ) . getDownloadableSubscriptionMetadata ( subscription , mContext.getOpPackageName ( ) , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void onProgressChanged ( android.widget.SeekBar seekBar , int progress , boolean fromUser ) { if ( fromUser ) { mAudioTrack.setAppVolume ( progress ) ; com.android.videoeditor.service.ApiService.setAudioTrackVolume ( getContext ( ) , mProject.getPath ( ) , mAudioTrack.getId ( ) , progress ) ; } }

Target:
public void onProgressChanged ( android.widget.SeekBar seekBar , int progress , boolean fromUser ) { if ( fromUser ) { mProgress = progress ; mAudioTrack.setAppVolume ( mProgress ) ; } }
Source:
private void testAES_ECB_NoPadding_IvParameters_Failure ( java.lang.String provider ) throws java.lang.Exception { javax.crypto.SecretKey key = new javax.crypto.spec.SecretKeySpec ( libcore.javax.crypto.CipherTest.AES_128_KEY , "AES" ) ; javax.crypto.Cipher c = javax.crypto.Cipher.getInstance ( "AES/ECB/NoPadding" , provider ) ; java.security.spec.AlgorithmParameterSpec spec = new javax.crypto.spec.IvParameterSpec ( libcore.javax.crypto.CipherTest.AES_IV_ZEROES ) ; try { c.init ( javax.crypto.Cipher.ENCRYPT_MODE , key , spec ) ; fail ( "Should not accept an IV in ECB mode" ) ; } catch ( java.security.InvalidAlgorithmParameterException expected ) { } }

Target:
private void testAES_ECB_NoPadding_IvParameters_Failure ( java.lang.String provider ) throws java.lang.Exception { javax.crypto.SecretKey key = new javax.crypto.spec.SecretKeySpec ( libcore.javax.crypto.CipherTest.AES_128_KEY , "AES" ) ; javax.crypto.Cipher c = javax.crypto.Cipher.getInstance ( "AES/ECB/NoPadding" , provider ) ; java.security.spec.AlgorithmParameterSpec spec = new javax.crypto.spec.IvParameterSpec ( libcore.javax.crypto.CipherTest.AES_IV_ZEROES ) ; try { c.init ( javax.crypto.Cipher.ENCRYPT_MODE , key , spec ) ; fail ( ( "Should not accept an IV in ECB mode; provider=" + provider ) ) ; } catch ( java.security.InvalidAlgorithmParameterException expected ) { } }
Source:
public synchronized boolean containsKey ( java.lang.Object key ) { java.util.Hashtable.HashtableEntry [ ] tab = table ; int hash = java.util.Hashtable.hash ( key ) ; int index = ( hash & 2147483647 ) % ( tab.length ) ; for ( java.util.Hashtable.HashtableEntry < K , V > e = tab [ index ] ; e != null ; e = e.next ) { if ( ( ( e.hash ) == hash ) && ( e.key.equals ( key ) ) ) { return true ; } } return false ; }

Target:
public synchronized boolean containsKey ( java.lang.Object key ) { java.util.Hashtable.HashtableEntry < ? , ? > [ ] tab = table ; int hash = key.hashCode ( ) ; int index = ( hash & 2147483647 ) % ( tab.length ) ; for ( java.util.Hashtable.HashtableEntry < ? , ? > e = tab [ index ] ; e != null ; e = e.next ) { if ( ( ( e.hash ) == hash ) && ( e.key.equals ( key ) ) ) { return true ; } } return false ; }
Source:
public void run ( ) { try { java.lang.Thread.sleep ( ( ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.TIME_UNIT ) * 5 ) ) ; channel1.configureBlocking ( false ) ; assertFalse ( channel1.isBlocking ( ) ) ; datagramSocket1.close ( ) ; } catch ( java.lang.Exception e ) { } }

Target:
public void testReceive_UnboundBufZero ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; assertFalse ( dc.isConnected ( ) ) ; assertFalse ( dc.socket ( ) . isBound ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ZERO ) ; assertNull ( dc.receive ( dst ) ) ; }
Source:
public void testAesCbcHmacSha1Tcp4UdpEncap ( ) 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_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesCbcHmacSha512Udp6 ( ) 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 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
protected com.google.android.exoplayer.MediaFormat getFormat ( int track ) { com.google.android.exoplayer.util.Assertions.checkArgument ( ( ( track >= 0 ) && ( track < ( mTracksIndex.size ( ) ) ) ) ) ; return mSource.getFormat ( mTracksIndex.get ( track ) ) ; }

Target:
protected void onEnabled ( int track , long positionUs , boolean joining ) { com.google.android.exoplayer.util.Assertions.checkArgument ( ( ( track >= 0 ) && ( track < ( mTracksIndex.size ( ) ) ) ) ) ; mTrackIndex = mTracksIndex.get ( track ) ; mSource.enable ( mTrackIndex , positionUs ) ; seekToInternal ( positionUs ) ; }
Source:
public static com.android.jack.dx.rop.cst.CstNat createSignature ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JFieldId field ) { java.lang.String fieldName = field.getName ( ) ; java.lang.String fieldSignature = com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( field.getType ( ) ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( fieldName ) ; com.android.jack.dx.rop.cst.CstString descriptor = new com.android.jack.dx.rop.cst.CstString ( fieldSignature ) ; com.android.jack.dx.rop.cst.CstNat signature = new com.android.jack.dx.rop.cst.CstNat ( name , descriptor ) ; return signature ; }

Target:
public static com.android.jack.dx.rop.cst.CstFieldRef createFieldRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JFieldId field , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface receiverType ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( receiverType ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( field.getName ( ) ) ; com.android.jack.dx.rop.cst.CstNat nat = com.android.jack.backend.dex.rop.RopHelper.createSignature ( field ) ; com.android.jack.dx.rop.cst.CstFieldRef fieldRef = new com.android.jack.dx.rop.cst.CstFieldRef ( definingClass , name , nat ) ; return fieldRef ; }
Source:
private void addListValue ( java.lang.reflect.Field field , java.lang.Object value , com.google.devtools.common.options.OptionPriority priority , java.lang.String source , java.lang.String implicitDependant , java.lang.String expandedFrom ) { com.google.devtools.common.options.OptionsParser.OptionValueDescription entry = parsedValues.get ( field ) ; if ( entry == null ) { entry = new com.google.devtools.common.options.OptionsParser.OptionValueDescription ( field.getName ( ) , null , com.google.common.collect.ArrayListMultimap.create ( ) , priority , source , implicitDependant , expandedFrom , true ) ; parsedValues.put ( field , entry ) ; maybeAddDeprecationWarning ( field ) ; } entry.addValue ( priority , value ) ; }

Target:
private void addListValue ( java.lang.reflect.Field field , java.lang.String originalName , java.lang.Object value , com.google.devtools.common.options.OptionPriority priority , java.lang.String source , java.lang.String implicitDependant , java.lang.String expandedFrom ) { com.google.devtools.common.options.OptionsParser.OptionValueDescription entry = parsedValues.get ( field ) ; if ( entry == null ) { entry = new com.google.devtools.common.options.OptionsParser.OptionValueDescription ( originalName , null , com.google.common.collect.ArrayListMultimap.create ( ) , priority , source , implicitDependant , expandedFrom , true ) ; parsedValues.put ( field , entry ) ; maybeAddDeprecationWarning ( field ) ; } entry.addValue ( priority , value ) ; }
Source:
public void testRegistrationCallbackSendCurrentStateDisconnected ( ) throws android.os.RemoteException { com.android.ims.ImsReasonInfo info = new com.android.ims.ImsReasonInfo ( com.android.ims.ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; mRegBinder.addRegistrationCallback ( mCallback2 ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; org.mockito.Mockito.verify ( mCallback2 ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; }

Target:
public void testRegistrationCallbackSendCurrentStateDisconnected ( ) throws android.os.RemoteException { android.telephony.ims.ImsReasonInfo info = new android.telephony.ims.ImsReasonInfo ( ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; mRegBinder.addRegistrationCallback ( mCallback2 ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; org.mockito.Mockito.verify ( mCallback2 ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; }
Source:
public com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile getFile ( org.eclipse.core.resources.IFile file ) { if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { com.android.sdklib.io.IAbstractFile abstractFile = f.getFile ( ) ; if ( abstractFile instanceof com.android.ide.eclipse.adt.internal.resources.manager.files.IFileWrapper ) { org.eclipse.core.resources.IFile iFile = ( ( com.android.ide.eclipse.adt.internal.resources.manager.files.IFileWrapper ) ( f.getFile ( ) ) ) . getIFile ( ) ; if ( ( iFile != null ) && ( iFile.equals ( file ) ) ) { return f ; } } } } return null ; }

Target:
public com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile getFile ( org.eclipse.core.resources.IFile file ) { if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { com.android.sdklib.io.IAbstractFile abstractFile = f.getFile ( ) ; if ( abstractFile instanceof com.android.ide.eclipse.adt.io.IFileWrapper ) { org.eclipse.core.resources.IFile iFile = ( ( com.android.ide.eclipse.adt.io.IFileWrapper ) ( f.getFile ( ) ) ) . getIFile ( ) ; if ( ( iFile != null ) && ( iFile.equals ( file ) ) ) { return f ; } } } } return null ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] [ ] cc = org.conscrypt.NativeCrypto.SSL_get_peer_cert_chain ( s ) ; org.conscrypt.NativeCryptoTest.assertEqualCertificateChains ( org.conscrypt.NativeCryptoTest.getServerCertificates ( ) , cc ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { long [ ] cc = org.conscrypt.NativeCrypto.SSL_get_peer_cert_chain ( s ) ; org.conscrypt.NativeCryptoTest.assertEqualCertificateChains ( org.conscrypt.NativeCryptoTest.getServerCertificates ( ) , cc ) ; for ( long ref : cc ) { org.conscrypt.NativeCrypto.X509_free ( ref ) ; } super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
static com.android.ide.common.res2.ResourceSet getBaseResourceSet ( ) throws com.android.ide.common.res2.MergingException , java.io.IOException { java.io.File root = com.android.testutils.TestUtils.getRoot ( "resources" , "baseSet" ) ; com.android.ide.common.res2.ResourceSet resourceSet = new com.android.ide.common.res2.ResourceSet ( "main" ) ; resourceSet.addSource ( root ) ; com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; resourceSet.loadFromFiles ( logger ) ; checkLogger ( logger ) ; return resourceSet ; }

Target:
static com.android.ide.common.res2.ResourceSet getBaseResourceSet ( boolean normalize ) throws com.android.ide.common.res2.MergingException , java.io.IOException { java.io.File root = com.android.testutils.TestUtils.getRoot ( "resources" , "baseSet" ) ; com.android.ide.common.res2.ResourceSet resourceSet = new com.android.ide.common.res2.ResourceSet ( "main" ) ; resourceSet.setNormalizeResources ( normalize ) ; resourceSet.addSource ( root ) ; com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; resourceSet.loadFromFiles ( logger ) ; checkLogger ( logger ) ; return resourceSet ; }
Source:
public void testContainsAll ( ) { java.util.concurrent.CopyOnWriteArraySet full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; java.util.Vector v = new java.util.Vector ( ) ; v.add ( one ) ; v.add ( two ) ; assertTrue ( full.containsAll ( v ) ) ; v.add ( six ) ; assertFalse ( full.containsAll ( v ) ) ; }

Target:
public void testContainsAll ( ) { java.util.Collection full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; assertTrue ( full.containsAll ( java.util.Arrays.asList ( ) ) ) ; assertTrue ( full.containsAll ( java.util.Arrays.asList ( one ) ) ) ; assertTrue ( full.containsAll ( java.util.Arrays.asList ( one , two ) ) ) ; assertFalse ( full.containsAll ( java.util.Arrays.asList ( one , two , six ) ) ) ; assertFalse ( full.containsAll ( java.util.Arrays.asList ( six ) ) ) ; }
Source:
private void placeNewCallWithPhoneAccount ( android.os.Bundle extras , int videoState ) { if ( extras == null ) { extras = new android.os.Bundle ( ) ; } extras.putParcelable ( TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE , android.telecom.cts.BaseTelecomTestWithMockServices.TEST_PHONE_ACCOUNT_HANDLE ) ; if ( ! ( android.telecom.VideoProfile.isAudioOnly ( videoState ) ) ) { extras.putInt ( TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE , videoState ) ; } mTelecomManager.placeCall ( createTestNumber ( ) , extras ) ; }

Target:
private void placeNewCallWithPhoneAccount ( android.os.Bundle extras , int videoState ) { if ( extras == null ) { extras = new android.os.Bundle ( ) ; } extras.putParcelable ( TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE , TestUtils.TEST_PHONE_ACCOUNT_HANDLE ) ; if ( ! ( android.telecom.VideoProfile.isAudioOnly ( videoState ) ) ) { extras.putInt ( TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE , videoState ) ; } mTelecomManager.placeCall ( createTestNumber ( ) , extras ) ; }
Source:
public void sendTerminalResponse ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }

Target:
public void setGsmBroadcastActivation ( boolean activate , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GSM_BROADCAST_ACTIVATION , response , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( activate ? 0 : 1 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public void onStart ( ) { mImpl = new com.android.server.wifi.RttService.RttServiceImpl ( getContext ( ) , mHandlerThread.getLooper ( ) ) ; android.util.Log.i ( com.android.server.wifi.RttService.TAG , ( "Starting " + ( android.content.Context.WIFI_RTT_SERVICE ) ) ) ; publishBinderService ( Context.WIFI_RTT_SERVICE , mImpl ) ; }

Target:
public void onBootPhase ( int phase ) { if ( phase == ( com.android.server.SystemService.PHASE_SYSTEM_SERVICES_READY ) ) { android.util.Log.i ( com.android.server.wifi.RttService.TAG , ( "Registering " + ( android.content.Context.WIFI_RTT_SERVICE ) ) ) ; if ( ( mImpl ) == null ) { mImpl = new com.android.server.wifi.RttService.RttServiceImpl ( getContext ( ) , mHandlerThread.getLooper ( ) , com.android.server.wifi.WifiInjector.getInstance ( ) ) ; } mImpl.startService ( ) ; } }
Source:
public void onDestroy ( ) { super . onDestroy ( ) ; mAdapter.stopRequestProcessing ( ) ; mAdapter.changeCursor ( null ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mCallLogObserver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mContactsObserver ) ; unregisterPhoneCallReceiver ( ) ; }

Target:
public void onDestroy ( ) { super . onDestroy ( ) ; mAdapter.stopRequestProcessing ( ) ; mAdapter.changeCursor ( null ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mCallLogObserver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mContactsObserver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mVoicemailStatusObserver ) ; }
Source:
public void testInvalidCmapFont ( ) { android.graphics.Typeface typeface = android.graphics.Typeface.createFromAsset ( getContext ( ) . getAssets ( ) , "bombfont.ttf" ) ; assertNotNull ( typeface ) ; android.graphics.Paint p = new android.graphics.Paint ( ) ; final java.lang.String testString = "abcde" ; float widthDefaultTypeface = p.measureText ( testString ) ; p.setTypeface ( typeface ) ; float widthCustomTypeface = p.measureText ( testString ) ; assertEquals ( widthDefaultTypeface , widthCustomTypeface , 0.01F ) ; }

Target:
public void testInvalidCmapFont ( ) { android.graphics.Typeface typeface = android.graphics.Typeface.createFromAsset ( getContext ( ) . getAssets ( ) , "bombfont.ttf" ) ; assertNotNull ( typeface ) ; android.graphics.Paint p = new android.graphics.Paint ( ) ; final java.lang.String testString = "abcde" ; float widthDefaultTypeface = p.measureText ( testString ) ; p.setTypeface ( typeface ) ; float widthCustomTypeface = p.measureText ( testString ) ; assertEquals ( widthDefaultTypeface , widthCustomTypeface , 1.0F ) ; }
Source:
public java.lang.String getVoiceMailAlphaTag ( ) { java.lang.String ret ; ret = mIccRecords.getVoiceMailAlphaTag ( ) ; if ( ( ret == null ) || ( ( ret.length ( ) ) == 0 ) ) { return mContext.getText ( com.android.internal.R.string.defaultVoiceMailAlphaTag ) . toString ( ) ; } return ret ; }

Target:
public java.lang.String getVoiceMailAlphaTag ( ) { java.lang.String ret ; com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; ret = ( r != null ) ? r.getVoiceMailAlphaTag ( ) : "" ; if ( ( ret == null ) || ( ( ret.length ( ) ) == 0 ) ) { return mContext.getText ( com.android.internal.R.string.defaultVoiceMailAlphaTag ) . toString ( ) ; } return ret ; }
Source:
public void testMisc ( ) { android.telephony.ServiceState ss = new android.telephony.ServiceState ( ) ; ss.setCssIndicator ( 100 ) ; assertEquals ( 1 , ss.getCssIndicator ( ) ) ; ss.setIsManualSelection ( true ) ; assertTrue ( ss.getIsManualSelection ( ) ) ; ss.setSystemAndNetworkId ( 123 , 456 ) ; assertEquals ( 123 , ss.getSystemId ( ) ) ; assertEquals ( 456 , ss.getNetworkId ( ) ) ; ss.setEmergencyOnly ( true ) ; assertTrue ( ss.isEmergencyOnly ( ) ) ; }

Target:
public void testMisc ( ) { android.telephony.ServiceState ss = new android.telephony.ServiceState ( ) ; ss.setCssIndicator ( 100 ) ; assertEquals ( 1 , ss.getCssIndicator ( ) ) ; ss.setIsManualSelection ( true ) ; assertTrue ( ss.getIsManualSelection ( ) ) ; ss.setCdmaSystemAndNetworkId ( 123 , 456 ) ; assertEquals ( 123 , ss.getCdmaSystemId ( ) ) ; assertEquals ( 456 , ss.getCdmaNetworkId ( ) ) ; ss.setEmergencyOnly ( true ) ; assertTrue ( ss.isEmergencyOnly ( ) ) ; }
Source:
public final float getFloat ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.FLOAT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } float result = java.lang.Float.intBitsToFloat ( this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }

Target:
public java.nio.ByteBuffer putFloat ( float value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.FLOAT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeInt ( ( ( offset ) + ( position ) ) , java.lang.Float.floatToRawIntBits ( value ) , order ) ; position = newPosition ; return this ; }
Source:
public java.lang.String run ( @ javax.annotation.Nonnull java.lang.String mainClass ) throws java.lang.Exception { com.android.jack.test.runner.DalvikRunnerHost runner = ( ( com.android.jack.test.runner.DalvikRunnerHost ) ( com.android.jack.test.runner.RuntimeRunnerFactory.create ( "dalvik-fast-host" ) ) ) ; java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream ( ) ; runner.setOutputStream ( out ) ; junit.framework.Assert.assertEquals ( 0 , runner.run ( new java.lang.String [ 0 ] , new java.lang.String [ ] { mainClass } , dexFile ) ) ; return out.toString ( ) ; }

Target:
public java.lang.String run ( @ javax.annotation.Nonnull java.lang.String mainClass ) throws java.lang.Exception { com.android.jack.test.runner.DalvikRunnerHost runner = ( ( com.android.jack.test.runner.DalvikRunnerHost ) ( com.android.jack.test.runner.RuntimeRunnerFactory.create ( "dalvik-fast-host" ) ) ) ; java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream ( ) ; runner.setOutputStream ( out ) ; junit.framework.Assert.assertEquals ( 0 , runner.runJUnit ( new java.lang.String [ 0 ] , AbstractTestTools.JUNIT_RUNNER_NAME , new java.lang.String [ ] { mainClass } , dexFile ) ) ; return out.toString ( ) ; }
Source:
public void testSocket_Block_BasicStatusAfterConnect ( ) throws java.io.IOException { final java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.connect ( datagramSocket1Address ) ; java.net.DatagramSocket s1 = dc.socket ( ) ; assertSocketAfterConnect ( s1 ) ; java.net.DatagramSocket s2 = dc.socket ( ) ; assertSame ( s1 , s2 ) ; }

Target:
public void testSocket_NonBlock_BasicStatusAfterConnect ( ) throws java.io.IOException { final java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.connect ( datagramSocket1Address ) ; dc.configureBlocking ( false ) ; java.net.DatagramSocket s1 = dc.socket ( ) ; assertSocketAfterConnect ( s1 ) ; java.net.DatagramSocket s2 = dc.socket ( ) ; assertSame ( s1 , s2 ) ; dc.close ( ) ; }