auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onPackageChanged ( java.lang.String packageName , android.os.UserHandle user ) { synchronized ( com.android.cts.launchertests.support.LauncherCallbackTestsService.mPackagesLock ) { com.android.cts.launchertests.support.LauncherCallbackTestsService.mPackagesChanged.add ( new android.util.Pair < java.lang.String , android.os.UserHandle > ( packageName , user ) ) ; } }

Target:
public void onPackageRemoved ( java.lang.String packageName , android.os.UserHandle user ) { android.util.Log.i ( com.android.cts.launchertests.support.LauncherCallbackTestsService.TAG , ( ( ( "package removed event " + packageName ) + " " ) + user ) ) ; try { com.android.cts.launchertests.support.LauncherCallbackTestsService.mPackagesRemoved.put ( new android.util.Pair ( packageName , user ) ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( com.android.cts.launchertests.support.LauncherCallbackTestsService.TAG , "Failed saving event" , e ) ; } }
Source:
public void render ( @ org.jetbrains.annotations.NotNull com.intellij.ui.ColoredTreeCellRenderer renderer , boolean isSelected , boolean isActive ) { java.lang.String targetText = myDestTargetPanel.getText ( ) ; if ( com.intellij.openapi.util.text.StringUtil.isEmptyOrSpaces ( targetText ) ) { renderer.append ( org.zmlx.hg4idea.push.HgPushTargetPanel.ENTER_REMOTE , SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES , this ) ; } myTargetRenderedComponent.setSelected ( isSelected ) ; myTargetRenderedComponent.setTransparent ( ( ! isActive ) ) ; myTargetRenderedComponent.render ( renderer ) ; }

Target:
public void render ( @ org.jetbrains.annotations.NotNull com.intellij.ui.ColoredTreeCellRenderer renderer , boolean isSelected , boolean isActive , @ org.jetbrains.annotations.Nullable java.lang.String forceRenderedText ) { if ( forceRenderedText != null ) { myDestTargetPanel.setText ( forceRenderedText ) ; renderer.append ( forceRenderedText ) ; return ; } java.lang.String targetText = myDestTargetPanel.getText ( ) ; if ( com.intellij.openapi.util.text.StringUtil.isEmptyOrSpaces ( targetText ) ) { renderer.append ( org.zmlx.hg4idea.push.HgPushTargetPanel.ENTER_REMOTE , SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES , this ) ; } myTargetRenderedComponent.setSelected ( isSelected ) ; myTargetRenderedComponent.setTransparent ( ( ! isActive ) ) ; myTargetRenderedComponent.render ( renderer ) ; }
Source:
public void testGetSubscriberNumber ( ) throws java.lang.Exception { com.android.server.telecom.Call mockCall = createForegroundCall ( ) ; android.telecom.PhoneAccount fakePhoneAccount = makeQuickAccount ( "id0" , com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ; org.mockito.Mockito.when ( mMockPhoneAccountRegistrar.getPhoneAccountOfCurrentUser ( org.mockito.Matchers.any ( android.telecom.PhoneAccountHandle.class ) ) ) . thenReturn ( fakePhoneAccount ) ; java.lang.String subscriberNumber = mBluetoothPhoneService.mBinder.getSubscriberNumber ( ) ; assertEquals ( subscriberNumber , ( ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_ADDRESS ) + ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ) ) ; }

Target:
public void testGetSubscriberNumber ( ) throws java.lang.Exception { com.android.server.telecom.Call mockCall = createForegroundCall ( ) ; android.telecom.PhoneAccount fakePhoneAccount = makeQuickAccount ( "id0" , com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ; org.mockito.Mockito.when ( mMockPhoneAccountRegistrar.getPhoneAccountOfCurrentUser ( org.mockito.ArgumentMatchers.nullable ( android.telecom.PhoneAccountHandle.class ) ) ) . thenReturn ( fakePhoneAccount ) ; java.lang.String subscriberNumber = mBluetoothPhoneService.mBinder.getSubscriberNumber ( ) ; assertEquals ( subscriberNumber , ( ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_ADDRESS ) + ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ) ) ; }
Source:
public int getBasicConstraints ( ) { if ( ( ( org.conscrypt.NativeCrypto.get_X509_ex_flags ( mContext ) ) & ( NativeCrypto.EXFLAG_CA ) ) == 0 ) { return - 1 ; } final int pathLen = org.conscrypt.NativeCrypto.get_X509_ex_pathlen ( mContext ) ; if ( pathLen == ( - 1 ) ) { return java.lang.Integer.MAX_VALUE ; } return pathLen ; }

Target:
public int getBasicConstraints ( ) { if ( ( ( org.conscrypt.NativeCrypto.get_X509_ex_flags ( mContext ) ) & ( NativeConstants.EXFLAG_CA ) ) == 0 ) { return - 1 ; } final int pathLen = org.conscrypt.NativeCrypto.get_X509_ex_pathlen ( mContext ) ; if ( pathLen == ( - 1 ) ) { return java.lang.Integer.MAX_VALUE ; } return pathLen ; }
Source:
static android.app.ContextImpl createSystemContext ( android.app.ActivityThread mainThread ) { android.app.LoadedApk packageInfo = new android.app.LoadedApk ( mainThread ) ; android.app.ContextImpl context = new android.app.ContextImpl ( null , mainThread , packageInfo , null , null , null , 0 , null ) ; context.setResources ( packageInfo.getResources ( ) ) ; context.mResources.updateConfiguration ( context.mResourcesManager.getConfiguration ( ) , context.mResourcesManager.getDisplayMetrics ( ) ) ; return context ; }

Target:
static android.app.ContextImpl createSystemContext ( android.app.ActivityThread mainThread ) { android.app.LoadedApk loadedApk = new android.app.LoadedApk ( mainThread ) ; android.app.ContextImpl context = new android.app.ContextImpl ( null , mainThread , loadedApk , null , null , null , 0 , null ) ; context.setResources ( loadedApk.getResources ( ) ) ; context.mResources.updateConfiguration ( context.mResourcesManager.getConfiguration ( ) , context.mResourcesManager.getDisplayMetrics ( ) ) ; return context ; }
Source:
public void testCompare0 ( ) throws java.lang.Exception { android.text.format.Time a = new android.text.format.Time ( android.text.format.Time.TIMEZONE_UTC ) ; android.text.format.Time b = new android.text.format.Time ( "America/Los_Angeles" ) ; assertTrue ( ( ( android.text.format.Time.compare ( a , b ) ) < 0 ) ) ; assertTrue ( ( ( android.text.format.Time.compare ( b , a ) ) > 0 ) ) ; assertTrue ( ( ( android.text.format.Time.compare ( b , b ) ) == 0 ) ) ; assertTrue ( ( ( android.text.format.Time.compare ( a , a ) ) == 0 ) ) ; }

Target:
public void testClear ( ) throws java.lang.Exception { android.text.format.Time t = new android.text.format.Time ( "America/Los_Angeles" ) ; android.text.format.cts.TimeTest.Fields.set ( t , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ) ; t.clear ( Time.TIMEZONE_UTC ) ; android.text.format.Time expected = new android.text.format.Time ( android.text.format.Time.TIMEZONE_UTC ) ; android.text.format.cts.TimeTest.Fields.set ( expected , 0 , 0 , 0 , 0 , 0 , 0 , ( - 1 ) , 0 , 0 , 0 ) ; android.text.format.cts.TimeTest.Fields.assertTimeEquals ( expected , t ) ; }
Source:
void stopDtmfTone ( ) { if ( ( mConnectionService ) == null ) { com.android.server.telecom.Log.w ( this , "stopDtmfTone() request on a call without a connection service." ) ; } else { com.android.server.telecom.Log.i ( this , "Send stopDtmfTone to connection service for call %s" , this ) ; com.android.server.telecom.Log.event ( this , Log.Events.STOP_DTMF ) ; mConnectionService.stopDtmfTone ( this ) ; } }

Target:
void stopDtmfTone ( ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "stopDtmfTone() request on a call without a connection service." ) ; } else { android.telecom.Log.i ( this , "Send stopDtmfTone to connection service for call %s" , this ) ; android.telecom.Log.addEvent ( this , LogUtils.Events.STOP_DTMF ) ; mConnectionService.stopDtmfTone ( this ) ; } }
Source:
private void selectContext ( int context ) { if ( ( mCurrentlyDisplayedContext ) == context ) { return ; } mCurrentlyDisplayedContext = context ; refreshTree ( mCallStartIndex , mCallEndIndex , mCurrentlyDisplayedContext ) ; }

Target:
protected org.eclipse.core.runtime.IStatus run ( org.eclipse.core.runtime.IProgressMonitor monitor ) { final int start ; final int end ; final int context ; synchronized ( mTreeRefresherLock ) { start = mCallStartIndex ; end = mCallEndIndex ; context = mCurrentlyDisplayedContext ; mTreeRefresherJob = null ; } org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { refreshTree ( start , end , context ) ; if ( ( mFrameSummaryViewPage ) != null ) { mFrameSummaryViewPage.setSelectedFrame ( mCurrentFrame ) ; } } } ) ; return org.eclipse.core.runtime.Status.OK_STATUS ; }
Source:
public java.lang.String [ ] getIsimPcscf ( ) throws android.os.RemoteException { com.android.internal.telephony.Phone phone = getPhone ( getDefaultSubscription ( ) ) ; mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimPcscf ( ) ; } else { return null ; } }

Target:
public java.lang.String [ ] getIsimPcscf ( int subId ) throws android.os.RemoteException { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimPcscf ( ) ; } else { return null ; } } else { loge ( ( "getIsimPcscf phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
public java.lang.Object callClosure ( groovy.lang.Closure closure , java.lang.Object ... params ) { try { return closure.call ( params ) ; } catch ( java.lang.Exception e ) { logError ( "invokeClosure %s failed: %s" , closure.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } return null ; }

Target:
public java.lang.String isValid ( java.lang.String newText ) { try { return filter.validate ( newText ) ; } catch ( java.lang.Exception e ) { logError ( "Custom validator failed: %s" , e.toString ( ) ) ; return "" ; } }
Source:
public void reloadConfig ( ) throws com.android.jack.server.api.v01.ServerException , com.android.sched.util.file.NotFileException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { shutdownConnections ( ) ; try { loadConfig ( ) ; buildInstalledJackCache ( ) ; start ( new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ) ; } catch ( java.io.IOException e ) { shutdown ( ) ; throw e ; } }

Target:
public void reloadConfig ( ) throws com.android.jack.server.api.v01.ServerException , com.android.sched.util.file.NotFileException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { shutdownConnections ( ) ; try { checkAccess ( serverDir , java.util.EnumSet.of ( java.nio.file.attribute.PosixFilePermission.OWNER_READ , java.nio.file.attribute.PosixFilePermission.OWNER_WRITE , java.nio.file.attribute.PosixFilePermission.OWNER_EXECUTE ) ) ; loadConfig ( ) ; } catch ( java.io.IOException e ) { shutdown ( ) ; throw e ; } start ( new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ) ; }
Source:
private void autoConnectA2dpSink ( ) { com.android.bluetooth.a2dp.A2dpSinkService a2dpSinkService = com.android.bluetooth.a2dp.A2dpSinkService.getA2dpSinkService ( ) ; android.bluetooth.BluetoothDevice [ ] bondedDevices = getBondedDevices ( ) ; if ( ( bondedDevices == null ) || ( a2dpSinkService == null ) ) { return ; } for ( android.bluetooth.BluetoothDevice device : bondedDevices ) { debugLog ( ( "autoConnectA2dp() - Connecting A2DP Sink with " + ( device.toString ( ) ) ) ) ; a2dpSinkService.connect ( device ) ; } }

Target:
private void autoConnectA2dpSink ( ) { com.android.bluetooth.a2dpsink.A2dpSinkService a2dpSinkService = com.android.bluetooth.a2dpsink.A2dpSinkService.getA2dpSinkService ( ) ; android.bluetooth.BluetoothDevice [ ] bondedDevices = getBondedDevices ( ) ; if ( ( bondedDevices == null ) || ( a2dpSinkService == null ) ) { return ; } for ( android.bluetooth.BluetoothDevice device : bondedDevices ) { if ( ( a2dpSinkService.getPriority ( device ) ) == ( android.bluetooth.BluetoothProfile.PRIORITY_AUTO_CONNECT ) ) { debugLog ( ( "autoConnectA2dpSink() - Connecting A2DP Sink with " + ( device.toString ( ) ) ) ) ; a2dpSinkService.connect ( device ) ; } } }
Source:
static java.lang.String encodeUrl ( java.lang.String url ) { try { url = url.replace ( '\\' , '/' ) ; return java.net.URLEncoder.encode ( url , "UTF-8" ) . replace ( "%2F" , "/" ) ; } catch ( java.io.UnsupportedEncodingException e ) { java.lang.System.err.println ( ( "Invalid string " + ( e.getLocalizedMessage ( ) ) ) ) ; return url ; } }

Target:
static java.lang.String encodeUrl ( java.lang.String url ) { try { url = url.replace ( '\\' , '/' ) ; return java.net.URLEncoder.encode ( url , com.android.SdkConstants.UTF_8 ) . replace ( "%2F" , "/" ) ; } catch ( java.io.UnsupportedEncodingException e ) { java.lang.System.err.println ( ( "Invalid string " + ( e.getLocalizedMessage ( ) ) ) ) ; return url ; } }
Source:
public void testGetRestrictBackgroundStatus_disabled ( ) throws java.lang.Exception { if ( ! ( isSupported ( ) ) ) return ; assertDataSaverStatusOnBackground ( android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED ) ; addRestrictBackgroundWhitelist ( mUid ) ; assertRestrictBackgroundChangedReceived ( 0 ) ; assertDataSaverStatusOnBackground ( android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED ) ; assertsForegroundAlwaysHasNetworkAccess ( ) ; assertDataSaverStatusOnBackground ( android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED ) ; }

Target:
protected boolean isSupported ( ) throws java.lang.Exception { if ( ! ( mIsDataSaverSupported ) ) { android.util.Log.i ( com.android.cts.net.hostside.TAG , ( ( ( ( "Skipping " + ( getClass ( ) ) ) + "." ) + ( getName ( ) ) ) + "() because device does not support Data Saver Mode" ) ) ; } return ( mIsDataSaverSupported ) && ( super . isSupported ( ) ) ; }
Source:
public void visitConstant ( int opcode , int offset , int length , com.android.dx.rop.cst.Constant cst , int value ) { visitCommon ( offset , length , true ) ; if ( ( ( ( cst instanceof com.android.dx.rop.cst.CstMemberRef ) || ( cst instanceof com.android.dx.rop.cst.CstType ) ) || ( cst instanceof com.android.dx.rop.cst.CstString ) ) || ( cst instanceof com.android.dx.rop.cst.CstInvokeDynamic ) ) { visitThrowing ( offset , length , true ) ; } }

Target:
public void visitConstant ( int opcode , int offset , int length , com.android.dx.rop.cst.Constant cst , int value ) { visitCommon ( offset , length , true ) ; if ( ( ( ( cst instanceof com.android.dx.rop.cst.CstMemberRef ) || ( cst instanceof com.android.dx.rop.cst.CstType ) ) || ( cst instanceof com.android.dx.rop.cst.CstString ) ) || ( cst instanceof com.android.dx.rop.cst.CstCallSiteRef ) ) { visitThrowing ( offset , length , true ) ; } }
Source:
private static boolean isMutableGranularPermission ( java.lang.String name ) { if ( ! ( android.os.Build.PERMISSIONS_REVIEW_REQUIRED ) ) { return false ; } switch ( name ) { case Manifest.permission.READ_CONTACTS : case Manifest.permission.WRITE_CONTACTS : case Manifest.permission.READ_SMS : case Manifest.permission.READ_CALL_LOG : case Manifest.permission.CALL_PHONE : { return true ; } } return false ; }

Target:
private boolean isMutableGranularPermission ( java.lang.String name ) { if ( ( ! ( getResources ( ) . getBoolean ( com.android.internal.R.bool.config_permissionReviewRequired ) ) ) && ( ! ( android.os.Build.PERMISSIONS_REVIEW_REQUIRED ) ) ) { return false ; } switch ( name ) { case Manifest.permission.READ_CONTACTS : case Manifest.permission.WRITE_CONTACTS : case Manifest.permission.READ_SMS : case Manifest.permission.READ_CALL_LOG : case Manifest.permission.CALL_PHONE : { return true ; } } return false ; }
Source:
public void testHasTypeDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ; intent.addCategory ( "category" ) ; intent.setDataAndType ( uri , Context.ACTIVITY_SERVICE ) ; intent.putExtra ( "key1" , "value1" ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasType ( Context.ACCOUNT_SERVICE ) . matches ( intent ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasType ( org.hamcrest.Matchers.equalTo ( Context.ACCOUNT_SERVICE ) ) . matches ( intent ) ) ; }

Target:
public void hasTypeDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ; intent.addCategory ( "category" ) ; intent.setDataAndType ( uri , Context.ACTIVITY_SERVICE ) ; intent.putExtra ( "key1" , "value1" ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasType ( Context.ACCOUNT_SERVICE ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasType ( org.hamcrest.Matchers.equalTo ( Context.ACCOUNT_SERVICE ) ) . matches ( intent ) ) ; }
Source:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , id , slot , ain , aout ) ; } else { rsnScriptForEach ( mContext , id , slot , ain , aout , params ) ; } }

Target:
synchronized void nScriptSetVarObj ( long id , int slot , long val , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetVarObj ( curCon , id , slot , val , mUseInc ) ; }
Source:
protected void finishMerge ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFile out ) throws com.android.jack.backend.dex.DexWritingException { java.io.OutputStream os = null ; try { try { os = new java.io.BufferedOutputStream ( out.getOutputStream ( ) ) ; merger.finish ( os ) ; } finally { if ( os != null ) { os.close ( ) ; } } } catch ( java.io.IOException | com.android.sched.util.file.WrongPermissionException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }

Target:
protected void finishMerge ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFile out ) throws com.android.jack.backend.dex.DexWritingException { try ( com.android.sched.util.log.Event event = tracer.open ( JackEventType.DEX_MERGER_FINISH ) ) { java.io.OutputStream os = null ; try { try { os = new java.io.BufferedOutputStream ( out.getOutputStream ( ) ) ; merger.finish ( os ) ; } finally { if ( os != null ) { os.close ( ) ; } } } catch ( java.io.IOException | com.android.sched.util.file.WrongPermissionException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } } }
Source:
public void test_getResourceAsStreamLjava_lang_String ( ) { java.io.InputStream is = null ; assertNotNull ( "Failed to find resource: hyts_Foo.c" , ( is = java.lang.ClassLoader.getSystemClassLoader ( ) . getResourceAsStream ( "hyts_Foo.c" ) ) ) ; try { is.close ( ) ; } catch ( java.io.IOException e ) { fail ( ( "Exception during getResourceAsStream: " + ( e.toString ( ) ) ) ) ; } }

Target:
private static void assertGetResourceAsStreamNotNull ( java.lang.ClassLoader classLoader , java.lang.String resourceName ) throws java.io.IOException { java.io.InputStream is = null ; try { is = classLoader.getResourceAsStream ( resourceName ) ; assertNotNull ( is ) ; } finally { if ( is != null ) { is.close ( ) ; } } }
Source:
synchronized boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return sendReportNative ( id , data ) ; }

Target:
synchronized boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; } return ( ( checkDevice ( device ) ) && ( checkCallingUid ( ) ) ) && ( mHidDeviceNativeInterface.reportError ( error ) ) ; }
Source:
public boolean matchesNationalNumber ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc , boolean allowPrefixMatch ) { java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.getNationalNumberPattern ( ) ) . matcher ( nationalNumber ) ; return ( nationalNumberPatternMatcher.matches ( ) ) || ( allowPrefixMatch && ( nationalNumberPatternMatcher.lookingAt ( ) ) ) ; }

Target:
public boolean matchNationalNumber ( java.lang.CharSequence number , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc , boolean allowPrefixMatch ) { java.lang.String nationalNumberPattern = numberDesc.getNationalNumberPattern ( ) ; if ( ( nationalNumberPattern.length ( ) ) == 0 ) { return false ; } return com.google.i18n.phonenumbers.internal.RegexBasedMatcher.match ( number , regexCache.getPatternForRegex ( nationalNumberPattern ) , allowPrefixMatch ) ; }
Source:
public static void computeNativePowr ( android.renderscript.cts.TestNativePowr.ArgumentsFloatFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 32000 , 32000 , true ) ; if ( ( java.lang.Math.abs ( args.inV ) ) < 1.0E-20 ) { args.out = android.renderscript.cts.CoreMathVerifier.any32 ( t ) ; } else { args.out = android.renderscript.cts.CoreMathVerifier.powr ( args.inV , args.inY , t ) ; } }

Target:
public static void computeFabs ( android.renderscript.cts.TestFabs.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 0 , 0 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inV ) ; args.out = t.new32 ( java.lang.Math.abs ( args.inV ) , java.lang.Math.abs ( in.min32 ( ) ) , java.lang.Math.abs ( in.max32 ( ) ) ) ; }
Source:
public void testHashCode_DiffCharsetClass ( ) { tests.api.java.nio.charset.CharsetTest.MockCharset c1 = new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mock" , null ) ; assertEquals ( c1.hashCode ( ) , "mock" . hashCode ( ) ) ; final java.lang.String mockName = "mockChar1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:-_" ; c1 = new tests.api.java.nio.charset.CharsetTest.MockCharset ( mockName , new java.lang.String [ ] { "mockChar" , "mock" , mockName , "mock" , "mockChar" , "mock" , "mock2" } ) ; assertEquals ( mockName.hashCode ( ) , c1.hashCode ( ) ) ; }

Target:
public void testHashCode_DiffCharsetClass ( ) { org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset c1 = new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ( "mock" , null ) ; assertEquals ( c1.hashCode ( ) , "mock" . hashCode ( ) ) ; final java.lang.String mockName = "mockChar1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:-_" ; c1 = new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ( mockName , new java.lang.String [ ] { "mockChar" , "mock" , mockName , "mock" , "mockChar" , "mock" , "mock2" } ) ; assertEquals ( mockName.hashCode ( ) , c1.hashCode ( ) ) ; }
Source:
public com.google.common.base.CharMatcher precomputed ( ) { return this ; }

Target:
private static com.google.common.base.CharMatcher isEither ( final char match1 , final char match2 ) { java.lang.String description = ( ( "CharMatcher.anyOf(\"" + ( com.google.common.base.CharMatcher.showCharacter ( match1 ) ) ) + ( com.google.common.base.CharMatcher.showCharacter ( match2 ) ) ) + "\")" ; return new com.google.common.base.CharMatcher.FastMatcher ( description ) { @ java.lang.Override public boolean matches ( char c ) { return ( c == match1 ) || ( c == match2 ) ; } @ com.google.common.annotations.GwtIncompatible ( value = "java.util.BitSet" ) @ java.lang.Override void setBits ( java.util.BitSet table ) { table.set ( match1 ) ; table.set ( match2 ) ; } } ; }
Source:
public void run ( ) { int TARGET = 42 ; while ( continueBusyLoop ) { inBusyLoop = true ; } int i = 0 ; while ( ( Main.isInterpreted ( ) ) && ( i < 10000 ) ) { Main.ensureJitCompiled ( Main.IntRunner.class , "run" ) ; i ++ ; } java.lang.System.out.println ( ( "isInterpreted? " + ( Main.isInterpreted ( ) ) ) ) ; Main.reportValue ( TARGET ) ; }

Target:
public void run ( ) { int TARGET = 42 ; while ( continueBusyLoop ) { inBusyLoop = true ; } int i = 0 ; while ( ( Main.isInterpreted ( ) ) && ( i < 10000 ) ) { Main.ensureJitCompiled ( Main.IntRunner.class , "run" ) ; i ++ ; } java.lang.System.out.println ( ( "isInOsrCode? " + ( ( Main.hasJit ( ) ) && ( Main.isInOsrCode ( "run" ) ) ) ) ) ; Main.reportValue ( TARGET ) ; }
Source:
public final byte [ ] generateSecret ( ) throws java.lang.IllegalStateException { return spiImpl.engineGenerateSecret ( ) ; }

Target:
private javax.crypto.KeyAgreementSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( ( spiImpl ) != null ) && ( key == null ) ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.KeyAgreement.tryAlgorithm ( key , specifiedProvider , algorithm ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( getAlgorithm ( ) ) ) ) ; } spiImpl = ( ( javax.crypto.KeyAgreementSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
public void visitMethod ( com.google.gct.intellij.endpoints.validation.PsiMethod psiMethod ) { if ( ! ( isEndpointClass ( psiMethod ) ) ) { return ; } if ( hasTransformer ( psiMethod ) ) { return ; } if ( ! ( isApiMethod ( psiMethod ) ) ) { return ; } com.google.gct.intellij.endpoints.validation.PsiParameterList parameterList = psiMethod.getParameterList ( ) ; java.util.Map < java.lang.String , com.google.gct.intellij.endpoints.validation.PsiParameter > methodNames = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.google.gct.intellij.endpoints.validation.PsiParameter aParameter : parameterList.getParameters ( ) ) { validateMethodNameUnique ( aParameter , methodNames ) ; } }

Target:
public void visitMethod ( com.intellij.psi.PsiMethod psiMethod ) { if ( ! ( isEndpointClass ( psiMethod ) ) ) { return ; } if ( hasTransformer ( psiMethod ) ) { return ; } if ( ! ( isApiMethod ( psiMethod ) ) ) { return ; } com.intellij.psi.PsiParameterList parameterList = psiMethod.getParameterList ( ) ; java.util.Map < java.lang.String , com.intellij.psi.PsiParameter > methodNames = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.intellij.psi.PsiParameter aParameter : parameterList.getParameters ( ) ) { validateMethodNameUnique ( aParameter , methodNames ) ; } }
Source:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject ) throws com.android.ide.eclipse.adt.internal.build.builders.AbortBuildException { super . abortOnBadSetup ( javaProject ) ; org.eclipse.core.resources.IProject iProject = getProject ( ) ; stopOnMarker ( iProject , null , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AAPT_COMPILE , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AIDL , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_ANDROID , IResource.DEPTH_ZERO ) ; }

Target:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject ) throws com.android.ide.eclipse.adt.internal.build.builders.AbortBuildException { super . abortOnBadSetup ( javaProject ) ; org.eclipse.core.resources.IProject iProject = getProject ( ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AAPT_COMPILE , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AIDL , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_RENDERSCRIPT , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_ANDROID , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.BUILDPATH_PROBLEM_MARKER , IResource.DEPTH_INFINITE ) ; }
Source:
private void sendBleStateChanged ( int prevState , int newState ) { if ( com.android.server.BluetoothManagerService.DBG ) android.util.Slog.d ( com.android.server.BluetoothManagerService.TAG , ( ( ( "BLE State Change Intent: " + prevState ) + " -> " ) + newState ) ) ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothAdapter.ACTION_BLE_STATE_CHANGED ) ; intent.putExtra ( BluetoothAdapter.EXTRA_PREVIOUS_STATE , prevState ) ; intent.putExtra ( BluetoothAdapter.EXTRA_STATE , newState ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.ALL , com.android.server.BluetoothManagerService.BLUETOOTH_PERM ) ; }

Target:
private void sendBleStateChanged ( int prevState , int newState ) { if ( com.android.server.BluetoothManagerService.DBG ) android.util.Slog.d ( com.android.server.BluetoothManagerService.TAG , ( ( ( "Sending BLE State Change: " + ( android.bluetooth.BluetoothAdapter.nameForState ( prevState ) ) ) + " > " ) + ( android.bluetooth.BluetoothAdapter.nameForState ( newState ) ) ) ) ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothAdapter.ACTION_BLE_STATE_CHANGED ) ; intent.putExtra ( BluetoothAdapter.EXTRA_PREVIOUS_STATE , prevState ) ; intent.putExtra ( BluetoothAdapter.EXTRA_STATE , newState ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.ALL , com.android.server.BluetoothManagerService.BLUETOOTH_PERM ) ; }
Source:
public java.lang.Object [ ] getTestObjects ( ) { java.util.Locale [ ] locales = android.icu.dev.test.serializable.SerializableTest.getLocales ( ) ; android.icu.util.TimeZone kst = android.icu.util.TimeZone.getTimeZone ( "Asia/Seoul" ) ; android.icu.util.DangiCalendar [ ] calendars = new android.icu.util.DangiCalendar [ locales.length ] ; for ( int i = 0 ; i < ( locales.length ) ; i += 1 ) { calendars [ i ] = new android.icu.util.DangiCalendar ( kst , android.icu.util.ULocale.forLocale ( locales [ i ] ) ) ; } return calendars ; }

Target:
public java.lang.Object [ ] getTestObjects ( ) { java.util.Locale [ ] locales = android.icu.dev.test.serializable.SerializableTestUtility.getLocales ( ) ; android.icu.util.TimeZone kst = android.icu.util.TimeZone.getTimeZone ( "Asia/Seoul" ) ; android.icu.util.DangiCalendar [ ] calendars = new android.icu.util.DangiCalendar [ locales.length ] ; for ( int i = 0 ; i < ( locales.length ) ; i += 1 ) { calendars [ i ] = new android.icu.util.DangiCalendar ( kst , android.icu.util.ULocale.forLocale ( locales [ i ] ) ) ; } return calendars ; }
Source:
public void done ( org.eclipse.core.runtime.jobs.IJobChangeEvent event ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart graphicalEditor = getGraphicalEditor ( ) ; if ( graphicalEditor != null ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutActionBar bar = graphicalEditor.getLayoutActionBar ( ) ; if ( ! ( bar.isDisposed ( ) ) ) { bar.updateErrorIndicator ( ) ; } } }

Target:
public void selectionChanged ( org.eclipse.jface.viewers.SelectionChangedEvent event ) { org.eclipse.jface.viewers.ISelection selection = event.getSelection ( ) ; getEditor ( ) . getSite ( ) . getSelectionProvider ( ) . setSelection ( selection ) ; if ( getEditor ( ) . getIgnoreXmlUpdate ( ) ) { return ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager manager = mGraphicalEditor.getCanvasControl ( ) . getSelectionManager ( ) ; manager.setSelection ( selection ) ; }
Source:
public void tesNoSplitsNullClassLoaderName ( ) { android.content.pm.ApplicationInfo ai = createMockApplicationInfo ( null , false , false ) ; java.lang.String [ ] sharedLibrary = new java.lang.String [ ] { "a.dex" , "b.dex" } ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( ai , sharedLibrary ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "PCL[a.dex:b.dex]" , contexts [ 0 ] ) ; }

Target:
public void tesNoSplitsNullClassLoaderName ( ) { com.android.server.pm.dex.DexoptUtilsTest.TestData data = createMockApplicationInfo ( null , false , false ) ; java.lang.String [ ] sharedLibrary = new java.lang.String [ ] { "a.dex" , "b.dex" } ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( data.info , sharedLibrary , data.pathsWithCode ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "PCL[a.dex:b.dex]" , contexts [ 0 ] ) ; }
Source:
public boolean remove ( java.lang.Object o ) { java.util.Iterator < java.util.Map.Entry < K , V > > iterator = unfiltered.entrySet ( ) . iterator ( ) ; while ( iterator.hasNext ( ) ) { java.util.Map.Entry < K , V > entry = iterator.next ( ) ; if ( ( com.google.common.base.Objects.equal ( o , entry.getValue ( ) ) ) && ( predicate.apply ( entry ) ) ) { iterator.remove ( ) ; return true ; } } return false ; }

Target:
public java.util.Map.Entry < K , V2 > apply ( final java.util.Map.Entry < K , V1 > entry ) { return com.google.common.collect.Maps.transformEntry ( transformer , entry ) ; }
Source:
public void addI32 ( android.support.v8.renderscript.Int3 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI32 ( new android.support.v8.renderscript.Int3 ( v.x , v.y , v.z ) ) ; return ; } addI32 ( v.x ) ; addI32 ( v.y ) ; addI32 ( v.z ) ; }

Target:
public void addU32 ( android.support.v8.renderscript.Long4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU32 ( v ) ; return ; } addU32 ( v.x ) ; addU32 ( v.y ) ; addU32 ( v.z ) ; addU32 ( v.w ) ; }
Source:
public boolean endCall ( ) { try { if ( isServiceConnected ( ) ) { return getTelecomService ( ) . endCall ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telecom.TelecomManager.TAG , "Error calling ITelecomService#endCall" , e ) ; } return false ; }

Target:
public boolean endCall ( ) { try { if ( isServiceConnected ( ) ) { return getTelecomService ( ) . endCall ( mContext.getPackageName ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telecom.TelecomManager.TAG , "Error calling ITelecomService#endCall" , e ) ; } return false ; }
Source:
public java.lang.String getName ( ) { if ( ( mName ) == null ) { mName = mId ; int index = mName.lastIndexOf ( com.android.ide.eclipse.adt.AndroidConstants.WS_SEP ) ; if ( index != ( - 1 ) ) { mName = mName.substring ( ( index + 1 ) ) ; } } return mName ; }

Target:
public java.lang.String getName ( ) { if ( ( mName ) == null ) { mName = mId ; int index = mName.lastIndexOf ( com.android.ide.eclipse.adt.AdtConstants.WS_SEP ) ; if ( index != ( - 1 ) ) { mName = mName.substring ( ( index + 1 ) ) ; } } return mName ; }
Source:
V readValueUnderLock ( java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > e ) { lock ( ) ; try { return e.value ; } finally { unlock ( ) ; } }

Target:
static final < K , V > void setEntryAt ( java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > [ ] tab , int i , java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > e ) { java.util.concurrent.ConcurrentHashMap.UNSAFE.putOrderedObject ( tab , ( ( ( ( long ) ( i ) ) << ( java.util.concurrent.ConcurrentHashMap.TSHIFT ) ) + ( java.util.concurrent.ConcurrentHashMap.TBASE ) ) , e ) ; }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "SharedPrefsTest.java:54: Warning: SharedPreferences.edit() without a corresponding commit() or apply() call\n" + "SharedPrefsTest.java:62: Warning: SharedPreferences.edit() without a corresponding commit() or apply() call" ) , lintProject ( ( "src/test/pkg/SharedPrefsTest.java.txt=>" + "src/test/pkg/SharedPrefsTest.java" ) ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/SharedPrefsTest.java:54: Warning: SharedPreferences.edit() without a corresponding commit() or apply() call [CommitPrefEdits]\n" + ( ( ( ( ( ( " SharedPreferences.Editor editor = preferences.edit();\n" + " ~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/SharedPrefsTest.java:62: Warning: SharedPreferences.edit() without a corresponding commit() or apply() call [CommitPrefEdits]\n" ) + " SharedPreferences.Editor editor = preferences.edit();\n" ) + " ~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) + "" ) ) , lintProject ( ( "src/test/pkg/SharedPrefsTest.java.txt=>" + "src/test/pkg/SharedPrefsTest.java" ) ) ) ; }
Source:
static java.util.TimeZone guessZoneByNitzStatic ( com.android.internal.telephony.NitzData nitzData ) { int utcOffsetMillis = nitzData.getLocalOffsetMillis ( ) ; boolean isDst = nitzData.isDst ( ) ; long timeMillis = nitzData.getCurrentTimeInMillis ( ) ; java.util.TimeZone guess = com.android.internal.telephony.TimeZoneLookupHelper.guessByInstantOffsetDst ( timeMillis , utcOffsetMillis , isDst ) ; if ( guess == null ) { guess = com.android.internal.telephony.TimeZoneLookupHelper.guessByInstantOffsetDst ( timeMillis , utcOffsetMillis , ( ! isDst ) ) ; } return guess ; }

Target:
private static com.android.internal.telephony.TimeZoneLookupHelper.OffsetResult lookupByNitzStatic ( com.android.internal.telephony.NitzData nitzData ) { int utcOffsetMillis = nitzData.getLocalOffsetMillis ( ) ; boolean isDst = nitzData.isDst ( ) ; long timeMillis = nitzData.getCurrentTimeInMillis ( ) ; com.android.internal.telephony.TimeZoneLookupHelper.OffsetResult match = com.android.internal.telephony.TimeZoneLookupHelper.lookupByInstantOffsetDst ( timeMillis , utcOffsetMillis , isDst ) ; if ( match == null ) { match = com.android.internal.telephony.TimeZoneLookupHelper.lookupByInstantOffsetDst ( timeMillis , utcOffsetMillis , ( ! isDst ) ) ; } return match ; }
Source:
public com.android.internal.telephony.IccCard getIccCard ( ) { com.android.internal.telephony.IccCard iccCard = getUiccProfile ( ) ; return iccCard != null ? iccCard : new com.android.internal.telephony.IccCard ( ) ; }

Target:
public com.android.internal.telephony.IccCard getIccCard ( ) { com.android.internal.telephony.IccCard card = getUiccProfile ( ) ; if ( card != null ) { return card ; } else { com.android.internal.telephony.uicc.UiccSlot slot = mUiccController.getUiccSlotForPhone ( mPhoneId ) ; if ( ( slot == null ) || ( slot.isStateUnknown ( ) ) ) { return new com.android.internal.telephony.IccCard ( IccCardConstants.State.UNKNOWN ) ; } else { return new com.android.internal.telephony.IccCard ( IccCardConstants.State.ABSENT ) ; } } }
Source:
public void dragFinished ( org.eclipse.swt.dnd.DragSourceEvent e ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "dragFinished" ) ; if ( ( e.detail ) == ( org.eclipse.swt.dnd.DND.DROP_MOVE ) ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "dragFinished => MOVE" ) ; } mDragSelection.clear ( ) ; mDragElements = null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.GlobalCanvasDragInfo.getInstance ( ) . stopDrag ( ) ; }

Target:
public void run ( ) { mLayoutEditor.editXmlModel ( new java.lang.Runnable ( ) { public void run ( ) { cutDragSelection ( ) ; } } ) ; }
Source:
private void readDescriptor ( ) { android.bluetooth.BluetoothGattDescriptor descriptor = getDescriptor ( ) ; if ( descriptor != null ) mBluetoothGatt.readDescriptor ( descriptor ) ; }

Target:
public void onCreate ( ) { super . onCreate ( ) ; registerReceiver ( mBondStatusReceiver , new android.content.IntentFilter ( android.bluetooth.BluetoothDevice.ACTION_BOND_STATE_CHANGED ) ) ; mBluetoothManager = ( ( android.bluetooth.BluetoothManager ) ( getSystemService ( Context.BLUETOOTH_SERVICE ) ) ) ; mBluetoothAdapter = mBluetoothManager.getAdapter ( ) ; mScanner = mBluetoothAdapter.getBluetoothLeScanner ( ) ; mHandler = new android.os.Handler ( ) ; mContext = this ; mNotifyCount = 0 ; mTaskQueue = new com.android.cts.verifier.bluetooth.TestTaskQueue ( ( ( getClass ( ) . getName ( ) ) + "_taskHandlerThread" ) ) ; }
Source:
public void onOpen ( android.database.sqlite.SQLiteDatabase db ) { com.android.providers.tv.TvProvider.initOnOpenIfNeeded ( com.android.providers.tv.TvProvider.DatabaseHelper.mContext , db ) ; }

Target:
private void buildProjectionMap ( android.database.sqlite.SQLiteDatabase db ) { updateProjectionMap ( db , com.android.providers.tv.TvProvider.CHANNELS_TABLE , com.android.providers.tv.TvProvider.sChannelProjectionMap ) ; updateProjectionMap ( db , com.android.providers.tv.TvProvider.PROGRAMS_TABLE , com.android.providers.tv.TvProvider.sProgramProjectionMap ) ; updateProjectionMap ( db , com.android.providers.tv.TvProvider.WATCHED_PROGRAMS_TABLE , com.android.providers.tv.TvProvider.sWatchedProgramProjectionMap ) ; updateProjectionMap ( db , com.android.providers.tv.TvProvider.RECORDED_PROGRAMS_TABLE , com.android.providers.tv.TvProvider.sRecordedProgramProjectionMap ) ; updateProjectionMap ( db , com.android.providers.tv.TvProvider.PREVIEW_PROGRAMS_TABLE , com.android.providers.tv.TvProvider.sPreviewProgramProjectionMap ) ; updateProjectionMap ( db , com.android.providers.tv.TvProvider.WATCH_NEXT_PROGRAMS_TABLE , com.android.providers.tv.TvProvider.sWatchNextProgramProjectionMap ) ; }
Source:
public void testDhcpClientEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.DhcpClientEvent.class ) , com.android.server.connectivity.MetricsTestUtil.aString ( "wlan0" ) , com.android.server.connectivity.MetricsTestUtil.aString ( "SomeState" ) , com.android.server.connectivity.MetricsTestUtil.anInt ( 192 ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " time_ms: 1" , " transport: 0" , " dhcp_event <" , " duration_ms: 192" , " if_name: \"wlan0\"" , " state_transition: \"SomeState\"" , " >" , ">" , "version: 2" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }

Target:
public void testDhcpClientEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.DhcpClientEvent.class ) , com.android.server.connectivity.MetricsTestUtil.aString ( "wlan0" ) , com.android.server.connectivity.MetricsTestUtil.aString ( "SomeState" ) , com.android.server.connectivity.MetricsTestUtil.anInt ( 192 ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " dhcp_event <" , " duration_ms: 192" , " error_code: 0" , " if_name: \"wlan0\"" , " state_transition: \"SomeState\"" , " >" , " time_ms: 1" , " transport: 0" , ">" , "version: 2" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }
Source:
public void iccTransmitApduLogicalChannel ( int channel , int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data , android.os.Message response ) { if ( channel <= 0 ) { throw new java.lang.RuntimeException ( ( "Invalid channel in iccTransmitApduLogicalChannel: " + channel ) ) ; } iccTransmitApduHelper ( com.android.internal.telephony.RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL , channel , cla , instruction , p1 , p2 , p3 , data , response ) ; }

Target:
void writeMetricsCallRing ( char [ ] response ) { mMetrics.writeRilCallRing ( mPhoneId , response ) ; }
Source:
private void savePreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APPNAME , mActivityToTrace ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , mTraceFilePath ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , mSelectedDevice ) ; try { prefs.flush ( ) ; } catch ( org.osgi.service.prefs.BackingStoreException e ) { } }

Target:
private void savePreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APP_PACKAGE , mAppPackageToTrace ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_ACTIVITY , mActivityToTrace ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , mTraceFilePath ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , mSelectedDevice ) ; try { prefs.flush ( ) ; } catch ( org.osgi.service.prefs.BackingStoreException e ) { } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JThrowBasicBlock bb ) { com.android.jack.dx.rop.code.InsnList il = createInsnList ( instructions , 0 ) ; il.setImmutable ( ) ; com.android.jack.dx.util.IntList successors = new com.android.jack.dx.util.IntList ( ) ; int primarySuccessor = - 1 ; if ( ! ( bb.getCatchBlocks ( ) . isEmpty ( ) ) ) { addCatchBlockSuccessors ( bb.getCatchBlocks ( ) , successors ) ; } successors.setImmutable ( ) ; ropBb.createBasicBlock ( getBlockId ( bb ) , il , successors , primarySuccessor ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JThrowBasicBlock bb ) { java.util.List < com.android.jack.dx.ssa.SsaInsn > il = createInsnList ( instructions , 0 ) ; com.android.jack.dx.util.IntList successors = new com.android.jack.dx.util.IntList ( ) ; int primarySuccessor = - 1 ; if ( ! ( bb.getCatchBlocks ( ) . isEmpty ( ) ) ) { addCatchBlockSuccessors ( bb.getCatchBlocks ( ) , successors ) ; } successors.setImmutable ( ) ; ssaBb.setRopLabel ( getBlockId ( bb ) ) ; ssaBb.setInsns ( il ) ; ssaBb.setSuccessors ( successors , primarySuccessor ) ; return false ; }
Source:
private void filterSelectionChanged ( ) { int idx = mFiltersTableViewer.getTable ( ) . getSelectionIndex ( ) ; if ( idx == ( - 1 ) ) { idx = 0 ; mFiltersTableViewer.getTable ( ) . setSelection ( idx ) ; } mCurrentSelectedFilterIndex = idx ; resetUnreadCountForSelectedFilter ( ) ; updateFiltersToolBar ( ) ; updateAppliedFilters ( ) ; }

Target:
private void filterSelectionChanged ( ) { int idx = mFiltersTableViewer.getTable ( ) . getSelectionIndex ( ) ; if ( idx == ( - 1 ) ) { idx = 0 ; mFiltersTableViewer.getTable ( ) . setSelection ( idx ) ; } mCurrentSelectedFilterIndex = idx ; resetUnreadCountForAllFilters ( ) ; updateFiltersToolBar ( ) ; updateAppliedFilters ( ) ; }
Source:
public void testToStrings ( ) { com.android.ide.common.resources.configuration.FolderConfiguration configForFolder = com.android.ide.common.resources.configuration.FolderConfiguration.getConfigForFolder ( "values-en-rUS" ) ; assertNotNull ( configForFolder ) ; assertEquals ( "Locale Language en_Region US" , configForFolder.toDisplayString ( ) ) ; assertEquals ( "en,US" , configForFolder.toShortDisplayString ( ) ) ; assertEquals ( "layout-en-rUS" , configForFolder.getFolderName ( ResourceFolderType.LAYOUT ) ) ; assertEquals ( "-en-rUS" , configForFolder.getUniqueKey ( ) ) ; }

Target:
public void testToStrings ( ) { com.android.ide.common.resources.configuration.FolderConfiguration configForFolder = com.android.ide.common.resources.configuration.FolderConfiguration.getConfigForFolder ( "values-en-rUS" ) ; assertNotNull ( configForFolder ) ; assertEquals ( "Locale en_US" , configForFolder.toDisplayString ( ) ) ; assertEquals ( "en,US" , configForFolder.toShortDisplayString ( ) ) ; assertEquals ( "layout-en-rUS" , configForFolder.getFolderName ( ResourceFolderType.LAYOUT ) ) ; assertEquals ( "-en-rUS" , configForFolder.getUniqueKey ( ) ) ; }