auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.android.vts.entity.TestSuiteResultEntity.GROUP_TYPE getGroupType ( ) { if ( ( this . getNormalizedVersion ( this . buildSystemFingerprint ) ) != ( this . getNormalizedVersion ( this . buildVendorFingerprint ) ) ) { return com.android.vts.entity.TestSuiteResultEntity.GROUP_TYPE.OTA ; } else if ( this . buildVendorFingerprint.endsWith ( "release-keys" ) ) { return com.android.vts.entity.TestSuiteResultEntity.GROUP_TYPE.SIGNED ; } else { return com.android.vts.entity.TestSuiteResultEntity.GROUP_TYPE.TOT ; } }

Target:
public int getSuiteResultTestType ( int testType ) { if ( testType == ( com.android.vts.entity.TestSuiteResultEntity.TestType.UNKNOWN.value ( ) ) ) { if ( ( this . getNormalizedVersion ( this . buildSystemFingerprint ) ) != ( this . getNormalizedVersion ( this . buildVendorFingerprint ) ) ) { return com.android.vts.entity.TestSuiteResultEntity.TestType.OTA.value ( ) ; } else if ( this . buildVendorFingerprint.endsWith ( "release-keys" ) ) { return com.android.vts.entity.TestSuiteResultEntity.TestType.SIGNED.value ( ) ; } else { return com.android.vts.entity.TestSuiteResultEntity.TestType.TOT.value ( ) ; } } else { return testType ; } }
Source:
public java.lang.String getName ( ) { return com.android.bluetooth.hid.HidHostService.TAG ; }

Target:
private void broadcastIdleTime ( android.bluetooth.BluetoothDevice device , int idleTime ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHidHost.ACTION_IDLE_TIME_CHANGED ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothHidHost.EXTRA_IDLE_TIME , idleTime ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; sendBroadcast ( intent , com.android.bluetooth.hid.BLUETOOTH_PERM ) ; if ( com.android.bluetooth.hid.HidHostService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , ( ( ( "Idle time (" + device ) + "): " ) + idleTime ) ) ; } }
Source:
public void onGeolocationPermissionsShowPrompt ( java.lang.String origin , android.webkit.GeolocationPermissions.Callback callback ) { org.chromium.content.common.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onGeolocationPermissionsShowPrompt" ) ; mWebChromeClient.onGeolocationPermissionsShowPrompt ( origin , callback ) ; } org.chromium.content.common.TraceEvent.end ( ) ; }

Target:
public void onGeolocationPermissionsShowPrompt ( java.lang.String origin , android.webkit.GeolocationPermissions.Callback callback ) { org.chromium.base.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onGeolocationPermissionsShowPrompt" ) ; mWebChromeClient.onGeolocationPermissionsShowPrompt ( origin , callback ) ; } org.chromium.base.TraceEvent.end ( ) ; }
Source:
java.lang.String getSCAddress ( ) { int len ; java.lang.String ret ; len = getByte ( ) ; if ( len == 0 ) { ret = null ; } else { try { ret = android.telephony.PhoneNumberUtils.calledPartyBCDToString ( pdu , cur , len ) ; } catch ( java.lang.RuntimeException tr ) { android.util.Log.d ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "invalid SC address: " , tr ) ; ret = null ; } } cur += len ; return ret ; }

Target:
java.lang.String getSCAddress ( ) { int len ; java.lang.String ret ; len = getByte ( ) ; if ( len == 0 ) { ret = null ; } else { try { ret = android.telephony.PhoneNumberUtils.calledPartyBCDToString ( pdu , cur , len ) ; } catch ( java.lang.RuntimeException tr ) { android.telephony.Rlog.d ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "invalid SC address: " , tr ) ; ret = null ; } } cur += len ; return ret ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { synchronized ( mStatsLock ) { shutdownLocked ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final int userId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , ( - 1 ) ) ; if ( userId == ( - 1 ) ) return ; synchronized ( mStatsLock ) { mWakeLock.acquire ( ) ; try { removeUserLocked ( userId ) ; } finally { mWakeLock.release ( ) ; } } }
Source:
public java.lang.String getIccSimChallengeResponse ( int subId , int appType , java.lang.String data ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIccSimChallengeResponse ( subId , appType , data ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public boolean iccCloseLogicalChannel ( int subId , int channel ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccCloseLogicalChannel ( subId , channel ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return false ; }
Source:
private synchronized void onIntrData ( byte reportId , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onIntrData(): reportId=" + reportId ) ) ; } java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( data ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_INTR_DATA ) ; msg.arg1 = reportId ; msg.obj = bb ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onSetReportFromNative ( byte reportType , byte reportId , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "onSetReport(): reportType=" + reportType ) + " reportId=" ) + reportId ) ) ; } java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( data ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_SET_REPORT ) ; msg.arg1 = reportType ; msg.arg2 = reportId ; msg.obj = bb ; mHandler.sendMessage ( msg ) ; }
Source:
public void TestParseNegativeWithAlternativeMinusSign ( ) { com.ibm.icu.text.DecimalFormat parser = ( ( com.ibm.icu.text.DecimalFormat ) ( com.ibm.icu.text.NumberFormat.getInstance ( new com.ibm.icu.util.ULocale ( "en" ) ) ) ) ; try { double value = parser.parse ( "₋0.5" ) . doubleValue ( ) ; assertEquals ( "Expect -0.5" , ( - 0.5 ) , value ) ; } catch ( java.text.ParseException e ) { this . errln ( "Parsing -0.5 should have succeeded." ) ; } }

Target:
public void TestParseNegativeWithAlternativeMinusSign ( ) { com.ibm.icu.text.DecimalFormat parser = ( ( com.ibm.icu.text.DecimalFormat ) ( com.ibm.icu.text.NumberFormat.getInstance ( new com.ibm.icu.util.ULocale ( "en" ) ) ) ) ; try { double value = parser.parse ( "₋0.5" ) . doubleValue ( ) ; assertEquals ( "Expect -0.5" , ( - 0.5 ) , value ) ; } catch ( java.text.ParseException e ) { com.ibm.icu.dev.test.TestFmwk.errln ( "Parsing -0.5 should have succeeded." ) ; } }
Source:
public void run ( ) { int origX = mWebView.getScrollX ( ) ; int origY = mWebView.getScrollY ( ) ; int half = dimension / 2 ; android.graphics.Rect rect = new android.graphics.Rect ( half , half , ( half + 1 ) , ( half + 1 ) ) ; assertTrue ( mWebView.requestChildRectangleOnScreen ( mWebView , rect , true ) ) ; assertTrue ( ( ( mWebView.getScrollX ( ) ) > origX ) ) ; assertTrue ( ( ( mWebView.getScrollY ( ) ) > origY ) ) ; }

Target:
public void run ( ) { mWebView = new android.webkit.WebView ( getActivity ( ) ) ; getActivity ( ) . setContentView ( mWebView ) ; }
Source:
protected void runImpl ( final java.lang.String javaPkgName ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException , java.io.IOException { try { if ( ! ( mTestStop ) ) { com.android.cts.Log.d ( "run in individual mode..." ) ; runInIndividualMode ( javaPkgName ) ; } } catch ( com.android.cts.DeviceDisconnectedException e ) { cleanUp ( ) ; throw e ; } }

Target:
protected void runImpl ( final java.lang.String javaPkgName , android.annotation.cts.Profile profile ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException , java.io.IOException { try { if ( ! ( mTestStop ) ) { com.android.cts.Log.d ( "run in individual mode..." ) ; runInIndividualMode ( javaPkgName , profile ) ; } } catch ( com.android.cts.DeviceDisconnectedException e ) { cleanUp ( ) ; throw e ; } }
Source:
public synchronized void closeChannels ( ) { java.util.Collection < com.android.se.Channel > col = mChannels.values ( ) ; com.android.se.Channel [ ] channelList = col.toArray ( new com.android.se.Channel [ col.size ( ) ] ) ; for ( com.android.se.Channel channel : channelList ) { closeChannel ( channel ) ; } }

Target:
public void initialize ( ) throws android.os.RemoteException , java.util.NoSuchElementException { synchronized ( mLock ) { mSEHal = android.hardware.secure_element.V1_0.ISecureElement.getService ( mName ) ; if ( ( mSEHal ) == null ) { throw new java.util.NoSuchElementException ( ( "No HAL is provided for " + ( mName ) ) ) ; } mSEHal.init ( mHalCallback ) ; mSEHal.linkToDeath ( mDeathRecipient , 0 ) ; } android.util.Log.i ( mTag , ( ( mName ) + " was initialized" ) ) ; }
Source:
private void verifyStandardDeviation ( ) throws java.lang.Throwable { android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation verifyStdDev = new android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation ( this . getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyStdDev.verifyStandardDeviation ( new float [ ] { 2.0F , 2.0F , 2.0F } ) ; verifyStdDev.execute ( ) ; logSuccess ( ) ; }

Target:
private void verifyStandardDeviation ( ) throws java.lang.Throwable { android.hardware.cts.helpers.sensoroperations.VerifySensorOperation verifyStdDev = new android.hardware.cts.helpers.sensoroperations.VerifySensorOperation ( this . getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyStdDev.verifyStandardDeviation ( new float [ ] { 2.0F , 2.0F , 2.0F } ) ; verifyStdDev.execute ( ) ; logSuccess ( ) ; }
Source:
public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata getMetadataForNonGeographicalRegion ( int countryCallingCode ) { synchronized ( countryCodeToNonGeographicalMetadataMap ) { if ( ! ( countryCodeToNonGeographicalMetadataMap.containsKey ( countryCallingCode ) ) ) { loadMetadataFromFile ( PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY , countryCallingCode ) ; } } return countryCodeToNonGeographicalMetadataMap.get ( countryCallingCode ) ; }

Target:
public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata getMetadataForNonGeographicalRegion ( int countryCallingCode ) { synchronized ( countryCodeToNonGeographicalMetadataMap ) { if ( ! ( countryCodeToNonGeographicalMetadataMap.containsKey ( countryCallingCode ) ) ) { java.util.List < java.lang.String > regionCodes = com.google.i18n.phonenumbers.CountryCodeToRegionCodeMap.getCountryCodeToRegionCodeMap ( ) . get ( countryCallingCode ) ; if ( ( ( regionCodes.size ( ) ) == 1 ) && ( PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY.equals ( regionCodes.get ( 0 ) ) ) ) { loadMetadataFromFile ( PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY , countryCallingCode ) ; } } } return countryCodeToNonGeographicalMetadataMap.get ( countryCallingCode ) ; }
Source:
public int hashCode ( ) { if ( ( mValue ) != null ) { return mValue.hashCode ( ) ; } return 0 ; }

Target:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.DockModeQualifier compareQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.DockModeQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.DockModeQualifier referenceQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.DockModeQualifier ) ( reference ) ) ; if ( ( compareQualifier.getValue ( ) ) == ( referenceQualifier.getValue ( ) ) ) { return false ; } else if ( ( mValue ) == ( com.android.sdklib.resources.DockMode.NONE ) ) { return true ; } return false ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mTelephonyManager = ( ( android.telephony.TelephonyManager ) ( getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; android.telephony.cts.CellInfoTest.mCm = ( ( android.net.ConnectivityManager ) ( getContext ( ) . getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mTelephonyManager = ( ( android.telephony.TelephonyManager ) ( getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; android.telephony.cts.CellInfoTest.mCm = ( ( android.net.ConnectivityManager ) ( getContext ( ) . getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; mPm = getContext ( ) . getPackageManager ( ) ; }
Source:
public static void loadAllClasses ( ) { art.Test988.MethodThrownThrough.class . toString ( ) ; art.Test988.MethodEntry.class . toString ( ) ; art.Test988.MethodReturn.class . toString ( ) ; art.Test988.FibResult.class . toString ( ) ; art.Test988.FibThrow.class . toString ( ) ; art.Test988.Printable.class . toString ( ) ; java.util.ArrayList.class . toString ( ) ; art.Test988.RecurOp.class . toString ( ) ; art.Test988.IterOp.class . toString ( ) ; java.lang.StringBuilder.class . toString ( ) ; }

Target:
public static void loadAllClasses ( ) { art.Test988.MethodThrownThrough.class . toString ( ) ; art.Test988.MethodEntry.class . toString ( ) ; art.Test988.MethodReturn.class . toString ( ) ; art.Test988.FibResult.class . toString ( ) ; art.Test988.FibThrow.class . toString ( ) ; art.Test988.Printable.class . toString ( ) ; java.util.ArrayList.class . toString ( ) ; art.Test988.RecurOp.class . toString ( ) ; art.Test988.IterOp.class . toString ( ) ; java.lang.StringBuilder.class . toString ( ) ; art.Test988.IntrinsicsTest.initialize ( ) ; }
Source:
private static void writeGradleSettingsFile ( java.io.File settingsFile , java.util.List < java.lang.String > projectPaths ) { java.lang.StringBuilder contents = new java.lang.StringBuilder ( ) ; for ( java.lang.String path : projectPaths ) { contents.append ( "include '" ) . append ( path ) . append ( "\'\n" ) ; } com.android.ide.eclipse.adt.AdtPlugin.writeFile ( settingsFile , contents.toString ( ) ) ; }

Target:
private static void writeGradleSettingsFile ( java.io.File settingsFile , java.util.List < java.lang.String > projectPaths ) throws java.io.IOException { java.lang.StringBuilder contents = new java.lang.StringBuilder ( ) ; for ( java.lang.String path : projectPaths ) { contents.append ( "include '" ) . append ( path ) . append ( "\'\n" ) ; } com.google.common.io.Files.write ( contents.toString ( ) , settingsFile , com.google.common.base.Charsets.UTF_8 ) ; }
Source:
private boolean isNanpaNumberWithNationalPrefix ( ) { return ( ( ( ( currentMetadata.countryCode ) == 1 ) && ( ( nationalNumber.charAt ( 0 ) ) == '1' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '0' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '1' ) ; }

Target:
private boolean isNanpaNumberWithNationalPrefix ( ) { return ( ( ( ( currentMetadata.getCountryCode ( ) ) == 1 ) && ( ( nationalNumber.charAt ( 0 ) ) == '1' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '0' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '1' ) ; }
Source:
public boolean isPossibleShortNumber ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.util.List < java.lang.String > regionCodes = getRegionCodesForCountryCode ( number.getCountryCode ( ) ) ; java.lang.String shortNumber = com.google.i18n.phonenumbers.ShortNumberInfo.getNationalSignificantNumber ( number ) ; for ( java.lang.String region : regionCodes ) { com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( region ) ; if ( phoneMetadata == null ) { continue ; } if ( matcherApi.matchesPossibleNumber ( shortNumber , phoneMetadata.generalDesc ) ) { return true ; } } return false ; }

Target:
public boolean isPossibleShortNumber ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.util.List < java.lang.String > regionCodes = getRegionCodesForCountryCode ( number.getCountryCode ( ) ) ; java.lang.String shortNumber = com.google.i18n.phonenumbers.ShortNumberInfo.getNationalSignificantNumber ( number ) ; for ( java.lang.String region : regionCodes ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( region ) ; if ( phoneMetadata == null ) { continue ; } if ( matcherApi.matchesPossibleNumber ( shortNumber , phoneMetadata.getGeneralDesc ( ) ) ) { return true ; } } return false ; }
Source:
public java.lang.String test4SensorPeriod ( ) throws java.lang.Throwable { loadOpenCVSuccessfulOrSkip ( ) ; recordSuccessfulOrSkip ( ) ; analyzeSuccessfulOrSkip ( ) ; java.lang.String message = "Test Sensor Period" ; junit.framework.Assert.assertEquals ( "Sensor sample period stdev." , 0.0 , mReport.sensor_period_stdev , com.android.cts.verifier.sensors.RVCVXCheckTestActivity.Criterion.sensor_period_stdev ) ; return message ; }

Target:
public void onClick ( android.view.View v ) { android.app.AlertDialog dialog = new android.app.AlertDialog.Builder ( this ) . setTitle ( "OpenCV Library BSD License" ) . setMessage ( licenseText ) . setPositiveButton ( "Acknowledged" , new android.content.DialogInterface.OnClickListener ( ) { public void onClick ( android.content.DialogInterface dialog , int id ) { dialog.dismiss ( ) ; } } ) . show ( ) ; android.widget.TextView textView = ( ( android.widget.TextView ) ( dialog.findViewById ( android.R.id.message ) ) ) ; textView.setTextSize ( 9 ) ; }
Source:
private static void checkName ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String displayName ) { if ( name.startsWith ( com.android.builder.core.BuilderConstants.ANDROID_TEST ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot start with '%2$s'" , displayName , com.android.builder.core.BuilderConstants.ANDROID_TEST ) ) ; } if ( name.startsWith ( com.android.builder.core.BuilderConstants.UI_TEST ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot start with %2$s" , displayName , com.android.builder.core.BuilderConstants.UI_TEST ) ) ; } if ( com.android.builder.core.BuilderConstants.LINT.equals ( name ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot be %2$s" , displayName , com.android.builder.core.BuilderConstants.LINT ) ) ; } }

Target:
private static void checkName ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String displayName ) { com.android.build.gradle.internal.VariantManager.checkPrefix ( name , displayName , com.android.builder.core.VariantConfiguration.Type.ANDROID_TEST.getPrefix ( ) ) ; com.android.build.gradle.internal.VariantManager.checkPrefix ( name , displayName , com.android.builder.core.VariantConfiguration.Type.UNIT_TEST.getPrefix ( ) ) ; if ( com.android.builder.core.BuilderConstants.LINT.equals ( name ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot be %2$s" , displayName , com.android.builder.core.BuilderConstants.LINT ) ) ; } }
Source:
public void test8862241 ( ) throws java.lang.Exception { java.util.TimeZone tz = java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; long jan_19_2042 = new java.util.Date ( ( 2042 - 1900 ) , 0 , 19 , 3 , 30 , 15 ) . getTime ( ) ; long oct_4_2046 = new java.util.Date ( ( 2046 - 1900 ) , 9 , 4 , 3 , 30 , 15 ) . getTime ( ) ; assertEquals ( "Jan 19, 2042 – Oct 4, 2046" , formatDateRange ( java.util.Locale.US , tz , jan_19_2042 , oct_4_2046 , ( ( FORMAT_SHOW_DATE ) | ( FORMAT_ABBREV_ALL ) ) ) ) ; }

Target:
public void test10089890 ( ) throws java.lang.Exception { java.util.Locale l = java.util.Locale.US ; java.util.TimeZone utc = java.util.TimeZone.getTimeZone ( "UTC" ) ; java.util.TimeZone pacific = java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; int flags = ( ( ( FORMAT_SHOW_DATE ) | ( FORMAT_ABBREV_ALL ) ) | ( FORMAT_SHOW_TIME ) ) | ( FORMAT_24HOUR ) ; assertEquals ( "Jan 1, 1970, 00:00 – Jan 2, 1970, 00:00" , formatDateRange ( l , utc , 0 , ( ( libcore.icu.DateIntervalFormatTest.DAY ) + 1 ) , flags ) ) ; assertEquals ( "Dec 31, 1969, 16:00 – Jan 1, 1970, 16:00" , formatDateRange ( l , pacific , 0 , libcore.icu.DateIntervalFormatTest.DAY , flags ) ) ; }
Source:
private static com.android.jack.dx.rop.cst.CstNat createSignature ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstString descriptor = new com.android.jack.dx.rop.cst.CstString ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( method ) ) ; com.android.jack.dx.rop.cst.CstNat signature = new com.android.jack.dx.rop.cst.CstNat ( descriptor ) ; return signature ; }

Target:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JReferenceType type , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( type ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( method.getName ( ) ) ; com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( definingClass , name , new com.android.jack.dx.rop.cst.CstString ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( method ) ) ) ; return methodRef ; }
Source:
public void testNoActionView ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( "AndroidManifest.xml:5: Warning: App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more details. [GoogleAppIndexingWarning]\n" + " <application\n" ) + " ^\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + "\n" ) + " <application\n" ) + " android:allowBackup=\"true\"\n" ) + " android:icon=\"@mipmap/ic_launcher\"\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >\n" ) + " <activity\n" ) + " android:name=\".MainActivity\"\n" ) + " android:label=\"@string/app_name\" >\n" ) + " <intent-filter>\n" ) + " <action android:name=\"android.intent.action.MAIN\" />\n" ) + " <category android:name=\"android.intent.category.LAUNCHER\" />\n" ) + " </intent-filter>\n" ) + " </activity>\n" ) + " <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }

Target:
public void testNoActionView ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( "AndroidManifest.xml:5: Warning: App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details. [GoogleAppIndexingWarning]\n" + " <application\n" ) + " ^\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + "\n" ) + " <application\n" ) + " android:allowBackup=\"true\"\n" ) + " android:icon=\"@mipmap/ic_launcher\"\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >\n" ) + " <activity\n" ) + " android:name=\".MainActivity\"\n" ) + " android:label=\"@string/app_name\" >\n" ) + " <intent-filter>\n" ) + " <action android:name=\"android.intent.action.MAIN\" />\n" ) + " <category android:name=\"android.intent.category.LAUNCHER\" />\n" ) + " </intent-filter>\n" ) + " </activity>\n" ) + " <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }
Source:
public void test_setOption ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.setOption ( java.net.StandardSocketOptions.SO_SNDBUF , 1024 ) ; assertEquals ( 1024 , ( ( int ) ( dc.getOption ( java.net.StandardSocketOptions.SO_SNDBUF ) ) ) ) ; assertEquals ( 1024 , dc.socket ( ) . getSendBufferSize ( ) ) ; dc.close ( ) ; try { dc.setOption ( java.net.StandardSocketOptions.SO_SNDBUF , 1024 ) ; fail ( ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }

Target:
public void test_setOption ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.setOption ( java.net.StandardSocketOptions.SO_SNDBUF , 1000 ) ; assertEquals ( 1000 , ( ( int ) ( dc.getOption ( java.net.StandardSocketOptions.SO_SNDBUF ) ) ) ) ; assertEquals ( 1000 , dc.socket ( ) . getSendBufferSize ( ) ) ; dc.close ( ) ; try { dc.setOption ( java.net.StandardSocketOptions.SO_LINGER , 2000 ) ; fail ( ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }
Source:
private boolean isDeadStatement ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JStatement stmt ) { com.android.jack.cfg.BasicBlockMarker bbm = stmt.getMarker ( com.android.jack.cfg.BasicBlockMarker.class ) ; assert bbm != null ; com.android.jack.cfg.BasicBlock basicBlock = bbm.getBasicBlock ( ) ; return ( ( basicBlock != ( exiBlock ) ) && ( ( blockState [ basicBlock.getId ( ) ] ) != 2 ) ) && ( ! ( basicBlockOfVirtualStmt.contains ( basicBlock ) ) ) ; }

Target:
private boolean isDeadStatement ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JStatement stmt ) { com.android.jack.cfg.BasicBlockMarker bbm = stmt.getMarker ( com.android.jack.cfg.BasicBlockMarker.class ) ; assert bbm != null ; com.android.jack.cfg.BasicBlock basicBlock = bbm.getBasicBlock ( ) ; return ( ( basicBlock != ( exiBlock ) ) && ( ( blockState [ basicBlock.getId ( ) ] ) != ( com.android.jack.cfg.CfgBuilder.ACCESSIBLE ) ) ) && ( ! ( basicBlockOfVirtualStmt.contains ( basicBlock ) ) ) ; }
Source:
protected boolean cleanup ( ) { if ( ( mStateMachine ) != null ) { mStateMachine.cleanup ( ) ; } com.android.bluetooth.hfp.HeadsetService.clearHeadsetService ( ) ; return true ; }

Target:
protected synchronized boolean stop ( ) { android.util.Log.i ( com.android.bluetooth.hfp.HeadsetService.TAG , "stop()" ) ; if ( ! ( mStarted ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "stop() called before start()" ) ; return true ; } mStarted = false ; unregisterReceiver ( mHeadsetReceiver ) ; com.android.bluetooth.hfp.HeadsetStateMachine.destroy ( mStateMachine ) ; mStateMachine = null ; mStateMachinesThread.quitSafely ( ) ; mStateMachinesThread = null ; com.android.bluetooth.hfp.HeadsetService.setHeadsetService ( null ) ; return true ; }
Source:
public void onResume ( ) { super . onResume ( ) ; if ( ( ( mLocalManager ) == null ) || ( isUiRestricted ( ) ) ) return ; mLocalManager.setForegroundActivity ( getActivity ( ) ) ; mLocalManager.getEventManager ( ) . registerCallback ( this ) ; updateProgressUi ( mLocalAdapter.isDiscovering ( ) ) ; }

Target:
public void onStart ( ) { super . onStart ( ) ; if ( ( ( mLocalManager ) == null ) || ( isUiRestricted ( ) ) ) return ; mLocalManager.setForegroundActivity ( getActivity ( ) ) ; mLocalManager.getEventManager ( ) . registerCallback ( this ) ; updateProgressUi ( mLocalAdapter.isDiscovering ( ) ) ; }
Source:
public void checkClass ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.ClassContext context , @ com.android.annotations.NonNull org.objectweb.asm.tree.ClassNode classNode ) { if ( ( ( classNode.name.indexOf ( '$' ) ) != ( - 1 ) ) && ( ( ( classNode.access ) & ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) == 0 ) ) { return ; } if ( ( ( classNode.access ) & ( org.objectweb.asm.Opcodes.ACC_ABSTRACT ) ) != 0 ) { return ; } if ( com.android.tools.lint.checks.ViewConstructorDetector.isViewClass ( context , classNode ) ) { com.android.tools.lint.checks.ViewConstructorDetector.checkConstructors ( context , classNode ) ; } }

Target:
public java.util.List < java.lang.Class < ? extends lombok.ast.Node > > getApplicableNodeTypes ( ) { return java.util.Collections.< java.lang.Class < ? extends lombok.ast.Node > > singletonList ( lombok.ast.ClassDeclaration.class ) ; }
Source:
public int compare ( com.android.traceview.MethodData md1 , com.android.traceview.MethodData md2 ) { if ( ( md2.getElapsedInclusive ( ) ) > ( md1.getElapsedInclusive ( ) ) ) return 1 ; if ( ( md2.getElapsedInclusive ( ) ) < ( md1.getElapsedInclusive ( ) ) ) return - 1 ; return md1.getName ( ) . compareTo ( md2.getName ( ) ) ; }

Target:
public int compare ( com.android.traceview.ThreadData td1 , com.android.traceview.ThreadData td2 ) { if ( ( timeBase.getTime ( td2 ) ) > ( timeBase.getTime ( td1 ) ) ) return 1 ; if ( ( timeBase.getTime ( td2 ) ) < ( timeBase.getTime ( td1 ) ) ) return - 1 ; return td2.getName ( ) . compareTo ( td1.getName ( ) ) ; }
Source:
public static com.google.gct.intellij.endpoints.util.PsiFile addOrReplaceFile ( com.google.gct.intellij.endpoints.util.PsiDirectory dir , com.google.gct.intellij.endpoints.util.PsiFile file ) { final com.google.gct.intellij.endpoints.util.PsiFile existingFile = dir.findFile ( file.getName ( ) ) ; if ( existingFile != null ) { existingFile.delete ( ) ; } return ( ( com.google.gct.intellij.endpoints.util.PsiFile ) ( dir.add ( file ) ) ) ; }

Target:
public static com.google.gct.idea.appengine.util.PsiFile addOrReplaceFile ( com.google.gct.idea.appengine.util.PsiDirectory dir , com.google.gct.idea.appengine.util.PsiFile file ) { final com.google.gct.idea.appengine.util.PsiFile existingFile = dir.findFile ( file.getName ( ) ) ; if ( existingFile != null ) { existingFile.delete ( ) ; } return ( ( com.google.gct.idea.appengine.util.PsiFile ) ( dir.add ( file ) ) ) ; }
Source:
public com.android.ims.internal.IImsEcbm getEcbmInterface ( ) throws android.os.RemoteException { return mCompatFeature.getEcbmInterface ( ) ; }

Target:
public void onFeatureReady ( ) { android.util.Log.i ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , "onFeatureReady called!" ) ; android.content.IntentFilter intentFilter = new android.content.IntentFilter ( com.android.ims.ImsManager.ACTION_IMS_INCOMING_CALL ) ; mContext.registerReceiver ( mReceiver , intentFilter ) ; try { mSessionId = mCompatFeature.startSession ( createIncomingCallPendingIntent ( ) , new com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.ImsRegistrationListenerBase ( ) ) ; mCompatFeature.addRegistrationListener ( mListener ) ; mCompatFeature.addRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "Couldn't start compat feature: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public void onResume ( ) { final android.app.Activity activity = getActivity ( ) ; super . onResume ( ) ; removePreference ( "dummy" ) ; if ( ( mWifiEnabler ) != null ) { mWifiEnabler.resume ( activity ) ; } mWifiTracker.startTracking ( ) ; activity.invalidateOptionsMenu ( ) ; }

Target:
public void onStart ( ) { super . onStart ( ) ; mWifiEnabler = createWifiEnabler ( ) ; mWifiTracker.startTracking ( ) ; }
Source:
private com.android.ide.eclipse.gltrace.state.IGLProperty getTextureImageProperty ( com.android.ide.eclipse.gltrace.state.IGLProperty state ) { if ( ( state.getType ( ) ) == ( com.android.ide.eclipse.gltrace.state.GLStateType.TEXTURE_IMAGE ) ) { return state ; } if ( ( state.getType ( ) ) != ( com.android.ide.eclipse.gltrace.state.GLStateType.PER_TEXTURE_LEVEL_STATE ) ) { state = state.getParent ( ) ; } if ( ( state != null ) && ( ( state.getType ( ) ) == ( com.android.ide.eclipse.gltrace.state.GLStateType.PER_TEXTURE_LEVEL_STATE ) ) ) { return ( ( com.android.ide.eclipse.gltrace.state.GLCompositeProperty ) ( state ) ) . getProperty ( GLStateType.TEXTURE_IMAGE ) ; } return null ; }

Target:
private com.android.ide.eclipse.gltrace.state.IGLProperty getImageFromPerTextureLevelState ( com.android.ide.eclipse.gltrace.state.IGLProperty state ) { if ( ( state != null ) && ( ( state.getType ( ) ) != ( com.android.ide.eclipse.gltrace.state.GLStateType.PER_TEXTURE_LEVEL_STATE ) ) ) { state = state.getParent ( ) ; } if ( ( state == null ) || ( ( state.getType ( ) ) != ( com.android.ide.eclipse.gltrace.state.GLStateType.PER_TEXTURE_LEVEL_STATE ) ) ) { return null ; } return ( ( com.android.ide.eclipse.gltrace.state.GLCompositeProperty ) ( state ) ) . getProperty ( GLStateType.TEXTURE_IMAGE ) ; }
Source:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.MethodInfo m = findMethod ( method ) ; if ( m == null ) { return null ; } if ( ( m.annotations ) != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : m.annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }

Target:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedPackage pkg , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findPackage ( pkg ) ; if ( c == null ) { return null ; } java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = c.getAnnotations ( ) ; if ( annotations != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }
Source:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { boolean matches = ( com.android.manifmerger.AttributeModel.BooleanValidator.TRUE_PATTERN.matcher ( value ) . matches ( ) ) || ( com.android.manifmerger.AttributeModel.BooleanValidator.FALSE_PATTERN.matcher ( value ) . matches ( ) ) ; if ( ! matches ) { mergingReport.addError ( java.lang.String.format ( ( "Attribute %1$s at %2$s has an illegal value=(%3$s), " + "expected 'true' or 'false'" ) , attribute.getId ( ) , attribute.printPosition ( ) , value ) ) ; } return matches ; }

Target:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { boolean matches = ( com.android.manifmerger.AttributeModel.BooleanValidator.TRUE_PATTERN.matcher ( value ) . matches ( ) ) || ( com.android.manifmerger.AttributeModel.BooleanValidator.FALSE_PATTERN.matcher ( value ) . matches ( ) ) ; if ( ! matches ) { attribute.addMessage ( mergingReport , MergingReport.Record.Severity.ERROR , java.lang.String.format ( ( "Attribute %1$s at %2$s has an illegal value=(%3$s), " + "expected 'true' or 'false'" ) , attribute.getId ( ) , attribute.printPosition ( ) , value ) ) ; } return matches ; }
Source:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CURRENT ) ) { version = com.android.dex.DexFormat.VERSION_CURRENT ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CONST_METHOD_HANDLE ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_27 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_METHOD_HANDLES ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_26 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_DEFAULT_INTERFACE_METHODS ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.dex.DexFormat.MAGIC_SUFFIX ) ; }

Target:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CURRENT ) ) { version = com.android.dex.DexFormat.VERSION_CURRENT ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_CONST_METHOD_HANDLE ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_28 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_METHOD_HANDLES ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_26 ; } else if ( targetApiLevel >= ( com.android.dex.DexFormat.API_DEFINE_INTERFACE_METHODS ) ) { version = com.android.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.dex.DexFormat.MAGIC_SUFFIX ) ; }
Source:
private void removeMissedCallNotifications ( ) { try { com.android.internal.telephony.ITelephony telephony = ITelephony.Stub.asInterface ( android.os.ServiceManager.getService ( "phone" ) ) ; if ( telephony != null ) { telephony.cancelMissedCallsNotification ( ) ; } else { android.util.Log.w ( com.android.dialer.calllog.CallLogFragment.TAG , ( "Telephony service is null, can't call " + "cancelMissedCallsNotification" ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.dialer.calllog.CallLogFragment.TAG , "Failed to clear missed calls notification due to remote exception" ) ; } }

Target:
private void updateEmptyMessage ( int filterType ) { final java.lang.String message ; switch ( filterType ) { case android.provider.CallLog.Calls.MISSED_TYPE : message = getString ( R.string.recentMissed_empty ) ; break ; case CallLogQueryHandler.CALL_TYPE_ALL : message = getString ( R.string.recentCalls_empty ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Unexpected filter type in CallLogFragment: " + filterType ) ) ; } ( ( android.widget.TextView ) ( getListView ( ) . getEmptyView ( ) ) ) . setText ( message ) ; }
Source:
private boolean runCorrectnessPatterns ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s ) { boolean pass = true ; pass &= patternDuplicateAnonymousResult ( RS , s ) ; pass &= patternInterleavedReduce ( RS , s ) ; pass &= patternRedundantGet ( RS , s ) ; return pass ; }

Target:
private boolean runCorrectnessPatterns ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s ) { boolean pass = true ; pass &= patternDuplicateAnonymousResult ( RS , s ) ; pass &= patternFindMinAndMaxInf ( RS , s ) ; pass &= patternInterleavedReduce ( RS , s ) ; pass &= patternRedundantGet ( RS , s ) ; return pass ; }
Source:
private void rewriteClass ( java.util.jar.JarEntry entry , java.io.InputStream inputStream , java.util.jar.JarOutputStream outputStream ) throws java.io.IOException { org.objectweb.asm.ClassReader classReader = new org.objectweb.asm.ClassReader ( inputStream ) ; org.objectweb.asm.tree.ClassNode classNode = new org.objectweb.asm.tree.ClassNode ( org.objectweb.asm.Opcodes.ASM4 ) ; classReader.accept ( classNode , com.android.builder.testing.MockableJarGenerator.EMPTY_FLAGS ) ; modifyClass ( classNode ) ; org.objectweb.asm.ClassWriter classWriter = new org.objectweb.asm.ClassWriter ( com.android.builder.testing.MockableJarGenerator.EMPTY_FLAGS ) ; classNode.accept ( classWriter ) ; outputStream.putNextEntry ( new java.util.zip.ZipEntry ( entry.getName ( ) ) ) ; outputStream.write ( classWriter.toByteArray ( ) ) ; }

Target:
private void rewriteClass ( java.util.jar.JarEntry entry , java.io.InputStream inputStream , java.util.jar.JarOutputStream outputStream ) throws java.io.IOException { org.objectweb.asm.ClassReader classReader = new org.objectweb.asm.ClassReader ( inputStream ) ; org.objectweb.asm.tree.ClassNode classNode = new org.objectweb.asm.tree.ClassNode ( org.objectweb.asm.Opcodes.ASM5 ) ; classReader.accept ( classNode , com.android.builder.testing.MockableJarGenerator.EMPTY_FLAGS ) ; modifyClass ( classNode ) ; org.objectweb.asm.ClassWriter classWriter = new org.objectweb.asm.ClassWriter ( com.android.builder.testing.MockableJarGenerator.EMPTY_FLAGS ) ; classNode.accept ( classWriter ) ; outputStream.putNextEntry ( new java.util.zip.ZipEntry ( entry.getName ( ) ) ) ; outputStream.write ( classWriter.toByteArray ( ) ) ; }
Source:
public void cleanup ( ) { mRemoteDevices = null ; if ( ( mProfileConnectionState ) != null ) { mProfileConnectionState.clear ( ) ; mProfileConnectionState = null ; } mService = null ; if ( ! ( mBondedDevices.isEmpty ( ) ) ) mBondedDevices.clear ( ) ; }

Target:
public void cleanup ( ) { mRemoteDevices = null ; if ( ( mProfileConnectionState ) != null ) { mProfileConnectionState.clear ( ) ; mProfileConnectionState = null ; } if ( mReceiverRegistered ) { mService.unregisterReceiver ( mReceiver ) ; mReceiverRegistered = false ; } mService = null ; mBondedDevices.clear ( ) ; }
Source:
public void testUpdateBatteryLevel_errorTooLargeValue ( ) { com.android.bluetooth.btservice.RemoteDevices remoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; int batteryLevel = 101 ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; remoteDevices.updateBatteryLevel ( mDevice1 , batteryLevel ) ; org.mockito.Mockito.verify ( mAdapterService , org.mockito.Mockito.never ( ) ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void testUpdateBatteryLevel_errorTooLargeValue ( ) { int batteryLevel = 101 ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.updateBatteryLevel ( mDevice1 , batteryLevel ) ; org.mockito.Mockito.verify ( mAdapterService , org.mockito.Mockito.never ( ) ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }
Source:
public boolean onPreferenceClick ( android.preference.Preference preference ) { final android.content.Intent intent = new android.content.Intent ( android.provider.Settings.ACTION_APN_SETTINGS ) ; intent.putExtra ( ":settings:show_fragment_as_subsetting" , true ) ; intent.putExtra ( com.android.phone.GsmUmtsOptions.EXTRA_SUB_ID , subId ) ; mPrefFragment.startActivity ( intent ) ; return true ; }

Target:
public boolean onPreferenceClick ( android.preference.Preference preference ) { com.android.internal.logging.MetricsLogger.action ( mButtonAPNExpand.getContext ( ) , MetricsEvent.ACTION_MOBILE_NETWORK_APN_SETTINGS ) ; final android.content.Intent intent = new android.content.Intent ( android.provider.Settings.ACTION_APN_SETTINGS ) ; intent.putExtra ( ":settings:show_fragment_as_subsetting" , true ) ; intent.putExtra ( com.android.phone.GsmUmtsOptions.EXTRA_SUB_ID , subId ) ; mPrefFragment.startActivity ( intent ) ; return true ; }
Source:
public java.lang.String apply ( com.android.dialer.calllog.RefreshAnnotatedCallLogWorker.RefreshResult refreshResult ) { switch ( refreshResult ) { case NOT_DIRTY : return com.android.dialer.metrics.Metrics.REFRESH_NOT_DIRTY ; case REBUILT_BUT_NO_CHANGES_NEEDED : return checkDirty ? com.android.dialer.metrics.Metrics.REFRESH_NO_CHANGES_NEEDED : com.android.dialer.metrics.Metrics.FORCE_REFRESH_NO_CHANGES_NEEDED ; case REBUILT_AND_CHANGES_NEEDED : return checkDirty ? com.android.dialer.metrics.Metrics.REFRESH_CHANGES_NEEDED : com.android.dialer.metrics.Metrics.FORCE_REFRESH_CHANGES_NEEDED ; default : throw new java.lang.IllegalStateException ( ( "Unsupported result: " + refreshResult ) ) ; } }

Target:
public java.lang.String apply ( com.android.dialer.calllog.RefreshAnnotatedCallLogWorker.RefreshResult refreshResult ) { switch ( refreshResult ) { case NOT_DIRTY : return com.android.dialer.metrics.Metrics.ANNOTATED_CALL_LOG_NOT_DIRTY ; case REBUILT_BUT_NO_CHANGES_NEEDED : return checkDirty ? com.android.dialer.metrics.Metrics.ANNOTATED_LOG_NO_CHANGES_NEEDED : com.android.dialer.metrics.Metrics.NEW_CALL_LOG_FORCE_REFRESH_NO_CHANGES_NEEDED ; case REBUILT_AND_CHANGES_NEEDED : return checkDirty ? com.android.dialer.metrics.Metrics.ANNOTATED_CALL_LOG_CHANGES_NEEDED : com.android.dialer.metrics.Metrics.ANNOTATED_CALL_LOG_FORCE_REFRESH_CHANGES_NEEDED ; default : throw new java.lang.IllegalStateException ( ( "Unsupported result: " + refreshResult ) ) ; } }
Source:
private void updateLteEarfcnLists ( ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( mPhone.getContext ( ) . getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; android.os.PersistableBundle b = configManager.getConfigForSubId ( mPhone.getSubId ( ) ) ; synchronized ( mLteRsrpBoostLock ) { mLteRsrpBoost = b.getInt ( CarrierConfigManager.KEY_LTE_EARFCNS_RSRP_BOOST_INT , 0 ) ; java.lang.String [ ] earfcnsStringArrayForRsrpBoost = b.getStringArray ( CarrierConfigManager.KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY ) ; mEarfcnPairListForRsrpBoost = convertEarfcnStringArrayToPairList ( earfcnsStringArrayForRsrpBoost ) ; } }

Target:
private void onCarrierConfigChanged ( ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( mPhone.getContext ( ) . getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; android.os.PersistableBundle config = configManager.getConfigForSubId ( mPhone.getSubId ( ) ) ; if ( config != null ) { updateLteEarfcnLists ( config ) ; updateReportingCriteria ( config ) ; } }
Source:
public java.lang.Object getData ( @ org.jetbrains.annotations.NonNls java.lang.String dataId ) { if ( ( PlatformDataKeys.FILE_EDITOR.is ( dataId ) ) && ( ( myDesigner ) != null ) ) { return myDesigner.getEditor ( ) ; } return null ; }

Target:
public java.lang.Object getData ( @ org.jetbrains.annotations.NonNls java.lang.String dataId ) { if ( ( myDesigner ) != null ) { if ( PlatformDataKeys.FILE_EDITOR.is ( dataId ) ) { return myDesigner.getEditor ( ) ; } if ( ( PlatformDataKeys.COPY_PROVIDER.is ( dataId ) ) && ( ! ( isEditing ( ) ) ) ) { return myCopyProvider ; } } return null ; }
Source:
public boolean doesForceHide ( com.android.internal.policy.impl.WindowState win , android.view.WindowManager.LayoutParams attrs ) { return ( attrs.type ) == ( android.view.WindowManager.LayoutParams.LayoutParams.TYPE_KEYGUARD ) ; }

Target:
public boolean isForceHiding ( android.view.WindowManager.LayoutParams attrs ) { return ( ( ( ( attrs.privateFlags ) & ( PRIVATE_FLAG_KEYGUARD ) ) != 0 ) || ( ( isKeyguardHostWindow ( attrs ) ) && ( isKeyguardSecureIncludingHidden ( ) ) ) ) || ( ( attrs.type ) == ( TYPE_KEYGUARD_SCRIM ) ) ; }