auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onStateChange ( boolean state ) { synchronized ( mLock ) { android.util.Log.i ( mTag , ( "OnStateChange:" + state ) ) ; mIsConnected = state ; if ( ! state ) { if ( ( mAccessControlEnforcer ) != null ) { mAccessControlEnforcer.reset ( ) ; } } else { try { initializeAccessControl ( ) ; } catch ( java.lang.Exception e ) { } synchronized ( mLock ) { mDefaultApplicationSelectedOnBasicChannel = true ; } } } }

Target:
public void serviceDied ( long cookie ) { android.util.Log.e ( mTag , ( ( mName ) + " died" ) ) ; synchronized ( mLock ) { mIsConnected = false ; if ( ( mAccessControlEnforcer ) != null ) { mAccessControlEnforcer.reset ( ) ; } } mHandler.sendMessageDelayed ( mHandler.obtainMessage ( com.android.se.Terminal.EVENT_GET_HAL , 0 ) , com.android.se.Terminal.GET_SERVICE_DELAY_MILLIS ) ; }
Source:
private static java.lang.Number toNumber ( java.lang.String s ) { if ( s.equals ( "NaN" ) ) { return java.lang.Double.NaN ; } else if ( s.equals ( "-Inf" ) ) { return java.lang.Double.NEGATIVE_INFINITY ; } else if ( s.equals ( "Inf" ) ) { return java.lang.Double.POSITIVE_INFINITY ; } return new android.icu.math.BigDecimal ( s ) ; }

Target:
public void Test10354 ( ) { android.icu.text.DecimalFormatSymbols dfs = new android.icu.text.DecimalFormatSymbols ( ) ; dfs.setNaN ( "" ) ; android.icu.text.DecimalFormat df = new android.icu.text.DecimalFormat ( ) ; df.setDecimalFormatSymbols ( dfs ) ; try { df.formatToCharacterIterator ( java.lang.Double.NaN ) ; } catch ( java.lang.IllegalArgumentException e ) { throw new java.lang.AssertionError ( e ) ; } }
Source:
void setFragmentManager ( android.app.FragmentManager fragmentManager ) { this . fragmentManager = fragmentManager ; }

Target:
private void sendIntent ( android.support.v4.util.Pair < java.lang.String , android.net.Uri > booleanUriPair ) { java.lang.String sourcePackage = booleanUriPair.first ; android.net.Uri uri = booleanUriPair.second ; com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.sendIntent" , "srcPkg:%s, uri:%%s" , sourcePackage , java.lang.String.valueOf ( uri ) ) ; android.content.Intent intent = new android.content.Intent ( android.provider.VoicemailContract.ACTION_FETCH_VOICEMAIL , uri ) ; intent.setPackage ( sourcePackage ) ; voicemailLoadingStatusView.setVisibility ( com.android.dialer.voicemail.listui.VISIBLE ) ; getContext ( ) . sendBroadcast ( intent ) ; }
Source:
public static boolean isProfileSet ( android.content.Context context ) { android.database.Cursor c = context.getContentResolver ( ) . query ( Profile.CONTENT_VCARD_URI , new java.lang.String [ ] { android.provider.ContactsContract.Profile._ID } , null , null , null ) ; boolean isSet = ( c != null ) && ( ( c.getCount ( ) ) > 0 ) ; if ( c != null ) { c.close ( ) ; c = null ; } return isSet ; }

Target:
public static java.lang.String getProfileName ( android.content.Context context ) { android.database.Cursor c = context.getContentResolver ( ) . query ( Profile.CONTENT_URI , new java.lang.String [ ] { android.provider.ContactsContract.Profile.DISPLAY_NAME } , null , null , null ) ; java.lang.String ownerName = null ; if ( ( c != null ) && ( c.moveToFirst ( ) ) ) { ownerName = c.getString ( 0 ) ; } if ( c != null ) { c.close ( ) ; } return ownerName ; }
Source:
public void testInterceptedSIMCommandsToTelephony ( ) { android.content.Intent intent = new android.content.Intent ( ) ; intent.setAction ( "android.intent.action.stk.command" ) ; intent.putExtra ( "STK CMD" , "test" ) ; android.content.ComponentName cn = android.content.ComponentName.unflattenFromString ( "com.android.stk/com.android.stk.StkCmdReceiver" ) ; intent.setComponent ( cn ) ; try { mContext.sendBroadcast ( intent ) ; fail ( ( "Able to send broadcast which can be received by any app which has registered " + ( "broadcast for action 'android.intent.action.stk.command' since it is not " + "protected with any permission. Device is vulnerable to CVE-2015-3843." ) ) ) ; } catch ( java.lang.SecurityException e ) { } }

Target:
public void testInterceptedSIMCommandsToTelephony ( ) { if ( ! ( mHasTelephony ) ) { return ; } android.content.Intent intent = new android.content.Intent ( ) ; intent.setAction ( "android.intent.action.stk.command" ) ; intent.putExtra ( "STK CMD" , "test" ) ; android.content.ComponentName cn = android.content.ComponentName.unflattenFromString ( "com.android.stk/com.android.stk.StkCmdReceiver" ) ; intent.setComponent ( cn ) ; try { mContext.sendBroadcast ( intent ) ; fail ( ( "Able to send broadcast which can be received by any app which has registered " + ( "broadcast for action 'android.intent.action.stk.command' since it is not " + "protected with any permission. Device is vulnerable to CVE-2015-3843." ) ) ) ; } catch ( java.lang.SecurityException e ) { } }
Source:
public final synchronized android.os.CountDownTimer start ( ) { if ( ( mMillisInFuture ) <= 0 ) { onFinish ( ) ; return this ; } mStopTimeInFuture = ( android.os.SystemClock.elapsedRealtime ( ) ) + ( mMillisInFuture ) ; mHandler.sendMessage ( mHandler.obtainMessage ( android.os.CountDownTimer.MSG ) ) ; return this ; }

Target:
public final synchronized android.os.CountDownTimer start ( ) { mCancelled = false ; if ( ( mMillisInFuture ) <= 0 ) { onFinish ( ) ; return this ; } mStopTimeInFuture = ( android.os.SystemClock.elapsedRealtime ( ) ) + ( mMillisInFuture ) ; mHandler.sendMessage ( mHandler.obtainMessage ( android.os.CountDownTimer.MSG ) ) ; return this ; }
Source:
public void testParseArabic ( ) throws java.lang.Exception { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" , new java.util.Locale ( "ar" , "EG" ) ) ; sdf.setTimeZone ( java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ) ; java.util.Date d = sdf.parse ( "2012-08-29 10:02:45" ) ; assertEquals ( 1346259765000L , d.getTime ( ) ) ; java.lang.String formatted = sdf.format ( d ) ; assertEquals ( "٢٠١٢-٠٨-٢٩ ١٠:٠٢:٤٥" , formatted ) ; java.util.Date d2 = sdf.parse ( formatted ) ; assertEquals ( d , d2 ) ; }

Target:
public void testParseArabic ( ) throws java.lang.Exception { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" , new java.util.Locale ( "ar" , "EG" ) ) ; sdf.setTimeZone ( libcore.java.text.SimpleDateFormatTest.AMERICA_LOS_ANGELES ) ; java.util.Date d = sdf.parse ( "2012-08-29 10:02:45" ) ; assertEquals ( 1346259765000L , d.getTime ( ) ) ; java.lang.String formatted = sdf.format ( d ) ; assertEquals ( "٢٠١٢-٠٨-٢٩ ١٠:٠٢:٤٥" , formatted ) ; java.util.Date d2 = sdf.parse ( formatted ) ; assertEquals ( d , d2 ) ; }
Source:
java.lang.Object [ ] [ ] data_of_calendarDisplayNames ( ) { return new java.lang.Object [ ] [ ] { new java.lang.Object [ ] { "Hijrah" , "Islamic Umm al-Qura Calendar" } , new java.lang.Object [ ] { "ISO" , "ISO" } , new java.lang.Object [ ] { "Japanese" , "Japanese Calendar" } , new java.lang.Object [ ] { "Minguo" , "Minguo Calendar" } , new java.lang.Object [ ] { "ThaiBuddhist" , "Buddhist Calendar" } } ; }

Target:
java.lang.Object [ ] [ ] data_of_calendarDisplayNames ( ) { return new java.lang.Object [ ] [ ] { new java.lang.Object [ ] { "Hijrah" , "Islamic Calendar (Umm al-Qura)" } , new java.lang.Object [ ] { "ISO" , "ISO-8601 Calendar" } , new java.lang.Object [ ] { "Japanese" , "Japanese Calendar" } , new java.lang.Object [ ] { "Minguo" , "Minguo Calendar" } , new java.lang.Object [ ] { "ThaiBuddhist" , "Buddhist Calendar" } } ; }
Source:
private void initLayout ( ) { findViewById ( R.id.fab ) . setOnClickListener ( this ) ; android.support.v4.view.ViewPager pager = findViewById ( R.id.pager ) ; com.android.dialer.main.impl.MainPagerAdapter pagerAdapter = new com.android.dialer.main.impl.MainPagerAdapter ( this , getSupportFragmentManager ( ) ) ; pager.setAdapter ( pagerAdapter ) ; android.support.design.widget.TabLayout tabLayout = findViewById ( R.id.tab_layout ) ; tabLayout.setupWithViewPager ( pager ) ; android.support.v7.widget.Toolbar toolbar = findViewById ( R.id.toolbar ) ; toolbar.setPopupTheme ( android.R.style.Theme_Material_Light ) ; setSupportActionBar ( toolbar ) ; }

Target:
private void initLayout ( ) { findViewById ( R.id.fab ) . setOnClickListener ( this ) ; com.android.dialer.main.impl.BottomNavBar navBar = findViewById ( R.id.bottom_nav_bar ) ; navBar.setOnTabSelectedListener ( new com.android.dialer.main.impl.MainActivity.MainBottomNavBarBottomNavTabListener ( ) ) ; navBar.selectTab ( BottomNavBar.TabIndex.SPEED_DIAL ) ; android.support.v7.widget.Toolbar toolbar = findViewById ( R.id.toolbar ) ; toolbar.setPopupTheme ( android.R.style.Theme_Material_Light ) ; setSupportActionBar ( toolbar ) ; }
Source:
private void continueTest ( ) { new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.TestDevicePluggedInConstraint ( ) . execute ( ) ; }

Target:
public void startTestImpl ( ) { android.os.BatteryManager bm = ( ( android.os.BatteryManager ) ( getSystemService ( com.android.cts.verifier.jobscheduler.BATTERY_SERVICE ) ) ) ; if ( bm.isCharging ( ) ) { new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.TestDevicePluggedInConstraint ( ) . execute ( ) ; } else if ( isDevicePluggedIn ( ) ) { mTestState = com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.STATE_WAITING_TO_START_ON_CHARGING_TEST ; showWaitingForStableChargingViews ( ) ; } }
Source:
public boolean p2pGroupAdd ( boolean persistent ) { if ( persistent ) { return doBooleanCommand ( "P2P_GROUP_ADD persistent" ) ; } return doBooleanCommand ( "P2P_GROUP_ADD" ) ; }

Target:
public boolean p2pGroupAdd ( boolean persistent ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.groupAdd ( persistent ) ; } else { if ( persistent ) { return doBooleanCommand ( "P2P_GROUP_ADD persistent" ) ; } return doBooleanCommand ( "P2P_GROUP_ADD" ) ; } }
Source:
protected static void waitForStart ( android.transition.cts.SimpleTransitionListener listener ) throws java.lang.InterruptedException { long endTime = ( android.os.SystemClock.uptimeMillis ( ) ) + 50 ; synchronized ( listener ) { while ( ! ( listener.started ) ) { long now = android.os.SystemClock.uptimeMillis ( ) ; long waitTime = endTime - now ; if ( waitTime <= 0 ) { throw new java.lang.InterruptedException ( ) ; } listener.wait ( waitTime ) ; } } }

Target:
protected static void waitForStart ( android.transition.cts.SimpleTransitionListener listener ) throws java.lang.InterruptedException { long endTime = ( android.os.SystemClock.uptimeMillis ( ) ) + 4000 ; synchronized ( listener ) { while ( ! ( listener.started ) ) { long now = android.os.SystemClock.uptimeMillis ( ) ; long waitTime = endTime - now ; if ( waitTime <= 0 ) { throw new java.lang.InterruptedException ( ) ; } listener.wait ( waitTime ) ; } } }
Source:
public org.w3c.dom.Document getMetadataDocument ( ) { java.lang.String xml = readTemplateTextResource ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.TEMPLATE_XML ) ; if ( xml != null ) { return com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.parseDocument ( xml , true ) ; } else { return null ; } }

Target:
public com.android.ide.eclipse.adt.internal.wizards.templates.TemplateMetadata getTemplate ( ) { if ( ( mTemplate ) == null ) { java.lang.String xml = readTemplateTextResource ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.TEMPLATE_XML ) ; if ( xml != null ) { org.w3c.dom.Document doc = com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.parseDocument ( xml , true ) ; if ( ( doc != null ) && ( ( doc.getDocumentElement ( ) ) != null ) ) { mTemplate = new com.android.ide.eclipse.adt.internal.wizards.templates.TemplateMetadata ( doc ) ; } } } return mTemplate ; }
Source:
public void consume ( org.jetbrains.plugins.groovy.mvc.ModifiableRootModel model ) { for ( final org.jetbrains.plugins.groovy.mvc.ContentEntry entry : toRemoveContent ) { model.removeContentEntry ( entry ) ; } for ( org.jetbrains.plugins.groovy.mvc.ContentEntry entry : model.getContentEntries ( ) ) { for ( org.jetbrains.plugins.groovy.mvc.SourceFolder folder : entry.getSourceFolders ( ) ) { if ( toRemove.remove ( folder ) ) { entry.removeSourceFolder ( folder ) ; } } } }

Target:
public void consume ( org.jetbrains.plugins.groovy.mvc.ModifiableRootModel model ) { for ( org.jetbrains.plugins.groovy.mvc.ContentEntry entry : model.getContentEntries ( ) ) { if ( toRemoveContent.remove ( entry.getUrl ( ) ) ) { model.removeContentEntry ( entry ) ; } else { for ( org.jetbrains.plugins.groovy.mvc.SourceFolder folder : entry.getSourceFolders ( ) ) { if ( toRemove.remove ( folder ) ) { entry.removeSourceFolder ( folder ) ; } } } } }
Source:
public void unregisterOnActivityPausedListener ( android.app.Activity activity , android.app.OnActivityPausedListener listener ) { synchronized ( mOnPauseListeners ) { java.util.ArrayList < android.app.OnActivityPausedListener > list = mOnPauseListeners.get ( activity ) ; if ( list != null ) { list.remove ( listener ) ; } } }

Target:
public void registerOnActivityPausedListener ( android.app.Activity activity , android.app.OnActivityPausedListener listener ) { synchronized ( mOnPauseListeners ) { java.util.ArrayList < android.app.OnActivityPausedListener > list = mOnPauseListeners.get ( activity ) ; if ( list == null ) { list = new java.util.ArrayList < android.app.OnActivityPausedListener > ( ) ; mOnPauseListeners.put ( activity , list ) ; } list.add ( listener ) ; } }
Source:
public static com.android.dx.util.ExceptionWithContext withContext ( java.lang.Throwable ex , java.lang.String str ) { com.android.dx.util.ExceptionWithContext ewc ; if ( ex instanceof com.android.dx.util.ExceptionWithContext ) { ewc = ( ( com.android.dx.util.ExceptionWithContext ) ( ex ) ) ; } else { ewc = new com.android.dx.util.ExceptionWithContext ( ex ) ; } ewc.addContext ( str ) ; return ewc ; }

Target:
public static com.android.dex.util.ExceptionWithContext withContext ( java.lang.Throwable ex , java.lang.String str ) { com.android.dex.util.ExceptionWithContext ewc ; if ( ex instanceof com.android.dex.util.ExceptionWithContext ) { ewc = ( ( com.android.dex.util.ExceptionWithContext ) ( ex ) ) ; } else { ewc = new com.android.dex.util.ExceptionWithContext ( ex ) ; } ewc.addContext ( str ) ; return ewc ; }
Source:
public void connectionEventStartedDoesNotCrashIfEnableFileIsMissing ( ) throws java.lang.Exception { mTraceEnableFile.delete ( ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; }

Target:
public void dumpDoesNotClearPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; getDumpString ( ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect" ) ) ; }
Source:
private void getIntValueFromCursor ( android.content.ContentValues cv , android.database.Cursor c , java.lang.String key ) { java.lang.String fromCursor = c.getString ( c.getColumnIndex ( key ) ) ; if ( ! ( android.text.TextUtils.isEmpty ( fromCursor ) ) ) { try { cv.put ( key , new java.lang.Integer ( fromCursor ) ) ; } catch ( java.lang.NumberFormatException nfe ) { } } }

Target:
private void getIntValueFromCursor ( android.content.ContentValues cv , android.database.Cursor c , java.lang.String key ) { int columnIndex = c.getColumnIndex ( key ) ; if ( columnIndex != ( - 1 ) ) { java.lang.String fromCursor = c.getString ( columnIndex ) ; if ( ! ( android.text.TextUtils.isEmpty ( fromCursor ) ) ) { try { cv.put ( key , new java.lang.Integer ( fromCursor ) ) ; } catch ( java.lang.NumberFormatException nfe ) { } } } }
Source:
public boolean replace ( K key , V oldValue , V newValue ) { if ( ( oldValue == null ) || ( newValue == null ) ) throw new java.lang.NullPointerException ( ) ; int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; return segmentFor ( hash ) . replace ( key , hash , oldValue , newValue ) ; }

Target:
public boolean replace ( K key , V oldValue , V newValue ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; if ( ( oldValue == null ) || ( newValue == null ) ) throw new java.lang.NullPointerException ( ) ; java.util.concurrent.ConcurrentHashMap.Segment < K , V > s = segmentForHash ( hash ) ; return ( s != null ) && ( s.replace ( key , hash , oldValue , newValue ) ) ; }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput_short.d.T_aput_short_1 t = new dot.junit.opcodes.aput_short.d.T_aput_short_1 ( ) ; short [ ] arr = new short [ 2 ] ; try { t.run ( arr , 2 , ( ( short ) ( 10000 ) ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aput_short.d.T_aput_short_1" , java.lang.NullPointerException.class , null , 2 , ( ( short ) ( 10000 ) ) ) ; }
Source:
public void remove ( com.android.sdklib.internal.repository.SdkSource source ) { mSources.remove ( source ) ; }

Target:
public void add ( com.android.sdklib.internal.repository.SdkSourceCategory category , com.android.sdklib.internal.repository.SdkSource source ) { java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list = mSources.get ( category ) ; if ( list == null ) { list = new java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > ( ) ; mSources.put ( category , list ) ; } list.add ( source ) ; }
Source:
protected void renameResource ( @ com.android.annotations.NonNull java.lang.Object [ ] testData , @ com.android.annotations.NonNull java.lang.Object resource , boolean updateReferences , @ com.android.annotations.NonNull java.lang.String newName , @ com.android.annotations.NonNull java.lang.String expected ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( testData ) ; renameResource ( project , resource , updateReferences , newName , expected ) ; }

Target:
protected void renameResource ( @ com.android.annotations.NonNull java.lang.Object [ ] testData , @ com.android.annotations.NonNull java.lang.Object resource , boolean updateReferences , @ com.android.annotations.NonNull java.lang.String newName , @ com.android.annotations.NonNull java.lang.String expected , @ com.android.annotations.NonNull java.lang.String expectedWarnings ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( testData ) ; renameResource ( project , resource , updateReferences , newName , expected , expectedWarnings ) ; }
Source:
public void stop ( ) { if ( ! ( mStarted.compareAndSet ( true , false ) ) ) { return ; } mContext.unregisterReceiver ( mBroadcastReceiver ) ; mContentResolver.unregisterContentObserver ( mContentObserver ) ; }

Target:
public void stop ( ) { if ( ! ( mStarted.compareAndSet ( true , false ) ) ) { return ; } if ( com.android.networkrecommendation.WifiWakeupController.DEBUG ) { android.util.Log.d ( com.android.networkrecommendation.WifiWakeupController.TAG , "Stopping WifiWakeupController." ) ; } mContext.unregisterReceiver ( mBroadcastReceiver ) ; mContentResolver.unregisterContentObserver ( mContentObserver ) ; }
Source:
private int pinLocY ( int y ) { return android.webkit.WebView.pinLoc ( y , getViewHeight ( ) , computeVerticalScrollRange ( ) ) ; }

Target:
private int pinLocY ( int y ) { int titleH = getTitleHeight ( ) ; if ( y <= titleH ) { return java.lang.Math.max ( y , 0 ) ; } return ( android.webkit.WebView.pinLoc ( ( y - titleH ) , getViewHeight ( ) , computeVerticalScrollRange ( ) ) ) + titleH ; }
Source:
private static Breakpoint.Manager.BP BP ( java.lang.reflect.Executable m ) { return new art.Breakpoint.Manager.BP ( m ) ; }

Target:
private static Breakpoint.Manager.BP BP ( java.lang.reflect.Executable m ) { return new art.Breakpoint.Manager.BP ( m ) { public java.lang.String toString ( ) { if ( method.getDeclaringClass ( ) . getPackage ( ) . equals ( art.Test993.class . getPackage ( ) ) ) { return super . toString ( ) ; } else { return ( method.toString ( ) ) + " @ <NON-DETERMINISTIC>" ; } } } ; }
Source:
static int extractLineNumber ( @ com.android.annotations.Nullable org.w3c.dom.Node xmlNode ) { if ( xmlNode != null ) { java.lang.Object data = xmlNode.getUserData ( com.android.manifmerger.XmlUtils.DATA_LINE_NUMBER ) ; if ( data instanceof java.lang.Integer ) { return ( ( java.lang.Integer ) ( data ) ) . intValue ( ) ; } } return 0 ; }

Target:
static int extractLineNumber ( @ com.android.annotations.Nullable org.w3c.dom.Node xmlNode ) { if ( xmlNode != null ) { java.lang.Object data = xmlNode.getUserData ( com.android.manifmerger.MergerXmlUtils.DATA_LINE_NUMBER ) ; if ( data instanceof java.lang.Integer ) { return ( ( java.lang.Integer ) ( data ) ) . intValue ( ) ; } } return 0 ; }
Source:
private synchronized void ensureInitialization ( ) { try { maybeInstantiateVerifier ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } if ( ( ( jv ) != null ) && ( ! ( jvInitialized ) ) ) { initializeVerifier ( ) ; jvInitialized = true ; } }

Target:
private synchronized java.util.jar.Manifest getManifestFromReference ( ) throws java.io.IOException { if ( ( manifest ) == null ) { java.util.jar.JarEntry manEntry = getManEntry ( ) ; if ( manEntry != null ) { if ( verify ) { byte [ ] b = getBytes ( manEntry ) ; manifest = new java.util.jar.Manifest ( new java.io.ByteArrayInputStream ( b ) ) ; if ( ! ( jvInitialized ) ) { jv = new java.util.jar.JarVerifier ( b ) ; } } else { manifest = new java.util.jar.Manifest ( super . getInputStream ( manEntry ) ) ; } } } return manifest ; }
Source:
private static java.lang.String whereStatement ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( android.provider.ContactsContract.CommonDataKinds.Phone.NUMBER ) + " IS NOT NULL" ) + " AND " ) + ( ( android.provider.ContactsContract.Data.DISPLAY_NAME_PRIMARY ) + " IS NOT NULL" ) ) + " AND " ) + ( android.provider.ContactsContract.Data.MIMETYPE ) ) + " IN (\'" ) + ( android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE ) ) + "\')" ; }

Target:
static com.android.dialer.searchfragment.cp2.SearchContactsCursorLoader.SmartDialCursor newInstance ( android.content.Context context , android.database.Cursor smartDialCursor ) { if ( ( smartDialCursor.getCount ( ) ) == 0 ) { return new com.android.dialer.searchfragment.cp2.SearchContactsCursorLoader.SmartDialCursor ( new android.database.Cursor [ ] { new android.database.MatrixCursor ( com.android.dialer.searchfragment.common.Projections.CP2_PROJECTION ) } ) ; } android.database.MatrixCursor headerCursor = new android.database.MatrixCursor ( HEADER_PROJECTION ) ; headerCursor.addRow ( new java.lang.String [ ] { context.getString ( R.string.all_contacts ) } ) ; return new com.android.dialer.searchfragment.cp2.SearchContactsCursorLoader.SmartDialCursor ( new android.database.Cursor [ ] { headerCursor , com.android.dialer.searchfragment.cp2.SearchContactsCursorLoader.SmartDialCursor.convertSmartDialCursorToSearchCursor ( smartDialCursor ) } ) ; }
Source:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method , int parameterIndex , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.MethodInfo m = findMethod ( method ) ; if ( m == null ) { return null ; } if ( ( m.parameterAnnotations ) != null ) { java.util.Collection < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = m.parameterAnnotations.get ( parameterIndex ) ; if ( annotations != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : 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.ResolvedClass cls , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findClass ( cls ) ; 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 void testOverlay1Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay1" , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; manualDir = new java.io.File ( testDir , FOLDER_TEST_MANUAL ) ; regularDir = new java.io.File ( testDir , FOLDER_TEST_REGULAR ) ; }
Source:
public static final void enforceTetherChangePermission ( android.content.Context context ) { if ( ( context.getResources ( ) . getStringArray ( com.android.internal.R.array.config_mobile_hotspot_provision_app ) . length ) == 2 ) { context.enforceCallingOrSelfPermission ( android.net.android.Manifest.permission.TETHER_PRIVILEGED , "ConnectivityService" ) ; } else { int uid = android.os.Binder.getCallingUid ( ) ; android.provider.Settings.checkAndNoteWriteSettingsOperation ( context , uid , android.provider.Settings.getPackageNameForUid ( context , uid ) , true ) ; } }

Target:
public static final void enforceTetherChangePermission ( android.content.Context context , java.lang.String callingPkg ) { if ( ( null == context ) || ( null == callingPkg ) ) { throw new java.lang.IllegalArgumentException ( "arguments should not be null" ) ; } if ( ( context.getResources ( ) . getStringArray ( com.android.internal.R.array.config_mobile_hotspot_provision_app ) . length ) == 2 ) { context.enforceCallingOrSelfPermission ( android.net.android.Manifest.permission.TETHER_PRIVILEGED , "ConnectivityService" ) ; } else { int uid = android.os.Binder.getCallingUid ( ) ; android.provider.Settings.checkAndNoteWriteSettingsOperation ( context , uid , callingPkg , true ) ; } }
Source:
public void testInheritCompatLibrary ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "src/test/pkg/MyActivityImpl.java:8: Error: Call requires API level 11 (current min is 1): android.app.Activity#isChangingConfigurations [NewApi]\n" + " boolean isChanging = super.isChangingConfigurations();\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/MyActivityImpl.java:13: Error: Call requires API level 11 (current min is 1): android.app.Activity#isChangingConfigurations [NewApi]\n" ) + " return super.isChangingConfigurations();\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/MyActivityImpl.java:12: Error: This method is not overriding anything with the current build target, but will in API level 11 (current target is 3): test.pkg.MyActivityImpl#isChangingConfigurations [Override]\n" ) + " public boolean isChangingConfigurations() {\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "3 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "project.properties1=>project.properties" , "apicheck/MyActivityImpl.java.txt=>src/test/pkg/MyActivityImpl.java" , "apicheck/MyActivityImpl.class.data=>bin/classes/test/pkg/MyActivityImpl.class" , "apicheck/android-support-v4.jar.data=>libs/android-support-v4.jar" ) ) ; }

Target:
public void testInheritCompatLibrary ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/MyActivityImpl.java:8: Error: Call requires API level 11 (current min is 1): android.app.Activity#isChangingConfigurations [NewApi]\n" + " boolean isChanging = super.isChangingConfigurations();\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/MyActivityImpl.java:12: Error: This method is not overriding anything with the current build target, but will in API level 11 (current target is 3): test.pkg.MyActivityImpl#isChangingConfigurations [Override]\n" ) + " public boolean isChangingConfigurations() {\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "project.properties1=>project.properties" , "apicheck/MyActivityImpl.java.txt=>src/test/pkg/MyActivityImpl.java" , "apicheck/MyActivityImpl.class.data=>bin/classes/test/pkg/MyActivityImpl.class" , "apicheck/android-support-v4.jar.data=>libs/android-support-v4.jar" ) ) ; }
Source:
public java.lang.String getDeviceId ( int slotId ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getDeviceIdForPhone ( slotId , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getDeviceId ( int slotIndex ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getDeviceIdForPhone ( slotIndex , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
private void compileJava7Test ( @ javax.annotation.Nonnull java.lang.String name ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( ( ( "com.android.jack.java7.switches." + name ) + ".jack" ) ) ) ; }

Target:
public void java7Switches002 ( ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( TEST002 ) . setSourceLevel ( SourceLevel.JAVA_7 ) . compileAndRunTest ( ) ; }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getClient" + ( mRemoteDevice ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getClient(): not allowed for non-active user" ) ; return null ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ) ) { return null ; } return mRemoteDevice ; }

Target:
protected boolean stop ( ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "stop()" ) ; if ( ( mContactChangeObserver ) == null ) { android.util.Log.i ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Avoid unregister when receiver it is not registered" ) ; return true ; } try { unregisterReceiver ( mPbapReceiver ) ; getContentResolver ( ) . unregisterContentObserver ( mContactChangeObserver ) ; mContactChangeObserver = null ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Unable to unregister pbap receiver" , e ) ; } mSessionStatusHandler.obtainMessage ( com.android.bluetooth.pbap.BluetoothPbapService.SHUTDOWN ) . sendToTarget ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; return true ; }
Source:
public static < V > com.google.common.util.concurrent.ListenableFuture < V > immediateFuture ( @ javax.annotation.Nullable V value ) { com.google.common.util.concurrent.SettableFuture < V > future = com.google.common.util.concurrent.SettableFuture.create ( ) ; future.set ( value ) ; return future ; }

Target:
public void addListener ( java.lang.Runnable listener , java.util.concurrent.Executor executor ) { com.google.common.base.Preconditions.checkNotNull ( listener , "Runnable was null." ) ; com.google.common.base.Preconditions.checkNotNull ( executor , "Executor was null." ) ; try { executor.execute ( listener ) ; } catch ( java.lang.RuntimeException e ) { com.google.common.util.concurrent.Futures.ImmediateFuture.log.log ( java.util.logging.Level.SEVERE , ( ( ( "RuntimeException while executing runnable " + listener ) + " with executor " ) + executor ) , e ) ; } }
Source:
public void testInstallManifestSdcardUnmount ( ) { boolean origState = checkMediaState ( Environment.MEDIA_MOUNTED ) ; try { assertTrue ( unmountMedia ( ) ) ; android.content.pm.PackageManagerTests.InstallParams ip = new android.content.pm.PackageManagerTests.InstallParams ( "install.apk" , R.raw.install_loc_sdcard ) ; installFromRawResource ( ip , 0 , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; } finally { if ( origState ) { mountMedia ( ) ; } else { unmountMedia ( ) ; } } }

Target:
public void testInstallManifestSdcardUnmount ( ) { if ( android.os.Environment.isExternalStorageEmulated ( ) ) { return ; } boolean origState = checkMediaState ( Environment.MEDIA_MOUNTED ) ; try { assertTrue ( unmountMedia ( ) ) ; android.content.pm.PackageManagerTests.InstallParams ip = new android.content.pm.PackageManagerTests.InstallParams ( "install.apk" , R.raw.install_loc_sdcard ) ; installFromRawResource ( ip , 0 , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; } finally { if ( origState ) { mountMedia ( ) ; } else { unmountMedia ( ) ; } } }
Source:
public java.lang.Object [ ] getTestObjects ( ) { java.util.Locale [ ] locales = android.icu.dev.test.serializable.SerializableTest.getLocales ( ) ; android.icu.util.TimeZone pst = android.icu.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; android.icu.util.Calendar [ ] calendars = new android.icu.util.Calendar [ locales.length ] ; for ( int i = 0 ; i < ( locales.length ) ; i += 1 ) { calendars [ i ] = android.icu.util.Calendar.getInstance ( pst , 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 pst = android.icu.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; android.icu.util.Calendar [ ] calendars = new android.icu.util.Calendar [ locales.length ] ; for ( int i = 0 ; i < ( locales.length ) ; i += 1 ) { calendars [ i ] = android.icu.util.Calendar.getInstance ( pst , locales [ i ] ) ; } return calendars ; }
Source:
public static android.icu.util.VersionInfo getDataVersion ( ) { android.icu.util.UResourceBundle icudatares = null ; try { icudatares = android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , android.icu.impl.ICUDataVersion.U_ICU_VERSION_BUNDLE , ICUResourceBundle.ICU_DATA_CLASS_LOADER ) ; icudatares = icudatares.get ( android.icu.impl.ICUDataVersion.U_ICU_DATA_KEY ) ; } catch ( java.util.MissingResourceException ex ) { return null ; } return android.icu.util.VersionInfo.getInstance ( icudatares.getString ( ) ) ; }

Target:
public static android.icu.util.VersionInfo getDataVersion ( ) { android.icu.util.UResourceBundle icudatares = null ; try { icudatares = android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , android.icu.impl.ICUDataVersion.U_ICU_VERSION_BUNDLE , ICUResourceBundle.ICU_DATA_CLASS_LOADER ) ; icudatares = icudatares.get ( android.icu.impl.ICUDataVersion.U_ICU_DATA_KEY ) ; } catch ( java.util.MissingResourceException ex ) { return null ; } return android.icu.util.VersionInfo.getInstance ( icudatares.getString ( ) ) ; }
Source:
private ActivityManager.ProcessErrorStateInfo generateProcessError ( com.android.server.am.ProcessRecord app , int condition , java.lang.String tag , java.lang.String shortMsg , java.lang.String longMsg , byte [ ] crashData ) { android.app.ActivityManager.ProcessErrorStateInfo report = new android.app.ActivityManager.ProcessErrorStateInfo ( ) ; report.condition = condition ; report.processName = app.processName ; report.pid = app.pid ; report.uid = app.info.uid ; report.tag = tag ; report.shortMsg = shortMsg ; report.longMsg = longMsg ; report.crashData = crashData ; return report ; }

Target:
private ActivityManager.ProcessErrorStateInfo generateProcessError ( com.android.server.am.ProcessRecord app , int condition , java.lang.String activity , java.lang.String shortMsg , java.lang.String longMsg , java.lang.String stackTrace ) { android.app.ActivityManager.ProcessErrorStateInfo report = new android.app.ActivityManager.ProcessErrorStateInfo ( ) ; report.condition = condition ; report.processName = app.processName ; report.pid = app.pid ; report.uid = app.info.uid ; report.tag = activity ; report.shortMsg = shortMsg ; report.longMsg = longMsg ; report.stackTrace = stackTrace ; return report ; }
Source:
public java.util.Collection < com.android.ide.common.resources.ResourceItem > getResourceItemsOfType ( @ com.android.annotations.NonNull com.android.resources.ResourceType type ) { java.util.Map < java.lang.String , com.android.ide.common.resources.ResourceItem > map = mResourceMap.get ( type ) ; if ( map == null ) { return java.util.Collections.emptyList ( ) ; } java.util.Collection < com.android.ide.common.resources.ResourceItem > roList = mReadOnlyListMap.get ( map ) ; if ( roList == null ) { roList = java.util.Collections.unmodifiableCollection ( map.values ( ) ) ; mReadOnlyListMap.put ( map , roList ) ; } return roList ; }

Target:
public java.util.Collection < com.android.ide.common.resources.ResourceItem > getResourceItemsOfType ( @ com.android.annotations.NonNull com.android.resources.ResourceType type ) { ensureInitialized ( ) ; java.util.Map < java.lang.String , com.android.ide.common.resources.ResourceItem > map = mResourceMap.get ( type ) ; if ( map == null ) { return java.util.Collections.emptyList ( ) ; } java.util.Collection < com.android.ide.common.resources.ResourceItem > roList = mReadOnlyListMap.get ( map ) ; if ( roList == null ) { roList = java.util.Collections.unmodifiableCollection ( map.values ( ) ) ; mReadOnlyListMap.put ( map , roList ) ; } return roList ; }
Source:
public org.bouncycastle.math.ec.ECFieldElement subtract ( org.bouncycastle.math.ec.ECFieldElement b ) { java.math.BigInteger x2 = b.toBigInteger ( ) ; java.math.BigInteger x3 = x.subtract ( x2 ) ; if ( ( x3.signum ( ) ) < 0 ) { x3 = x3.add ( q ) ; } return new org.bouncycastle.math.ec.ECFieldElement.Fp ( q , r , x3 ) ; }

Target:
public org.bouncycastle.math.ec.ECFieldElement multiplyPlusProduct ( org.bouncycastle.math.ec.ECFieldElement b , org.bouncycastle.math.ec.ECFieldElement x , org.bouncycastle.math.ec.ECFieldElement y ) { java.math.BigInteger ax = this . x ; java.math.BigInteger bx = b.toBigInteger ( ) ; java.math.BigInteger xx = x.toBigInteger ( ) ; java.math.BigInteger yx = y.toBigInteger ( ) ; java.math.BigInteger ab = ax.multiply ( bx ) ; java.math.BigInteger xy = xx.multiply ( yx ) ; return new org.bouncycastle.math.ec.ECFieldElement.Fp ( q , r , modReduce ( ab.add ( xy ) ) ) ; }
Source:
void cleanupDevice ( android.bluetooth.BluetoothDevice device ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , ( "Cleanup device: " + device ) ) ; synchronized ( mPbapClientStateMachineMap ) { com.android.bluetooth.pbapclient.PbapClientStateMachine pbapClientStateMachine = mPbapClientStateMachineMap.get ( device ) ; if ( pbapClientStateMachine != null ) { mPbapClientStateMachineMap.remove ( device ) ; } } }

Target:
void cleanupDevice ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbapclient.PbapClientService.DBG ) android.util.Log.d ( com.android.bluetooth.pbapclient.PbapClientService.TAG , ( "Cleanup device: " + device ) ) ; synchronized ( mPbapClientStateMachineMap ) { com.android.bluetooth.pbapclient.PbapClientStateMachine pbapClientStateMachine = mPbapClientStateMachineMap.get ( device ) ; if ( pbapClientStateMachine != null ) { mPbapClientStateMachineMap.remove ( device ) ; } } }
Source:
public void run ( ) { android.util.Log.i ( com.android.server.cts.device.batterystats.SimpleJobService.TAG , "Running job" ) ; try { java.lang.Thread.sleep ( 1000 ) ; } catch ( java.lang.InterruptedException e ) { } jobFinished ( mRunningParams , false ) ; if ( ( com.android.server.cts.device.batterystats.SimpleJobService.sLatch ) != null ) { com.android.server.cts.device.batterystats.SimpleJobService.sLatch.countDown ( ) ; } android.util.Log.i ( com.android.server.cts.device.batterystats.SimpleJobService.TAG , "Finished job." ) ; }

Target:
public void run ( ) { android.util.Log.i ( com.android.server.cts.device.batterystats.SimpleJobService.TAG , "Running job" ) ; try { java.lang.Thread.sleep ( com.android.server.cts.device.batterystats.SimpleJobService.JOB_EXECUTION_MS ) ; } catch ( java.lang.InterruptedException e ) { } jobFinished ( mRunningParams , false ) ; if ( ( com.android.server.cts.device.batterystats.SimpleJobService.sLatch ) != null ) { com.android.server.cts.device.batterystats.SimpleJobService.sLatch.countDown ( ) ; } android.util.Log.i ( com.android.server.cts.device.batterystats.SimpleJobService.TAG , "Finished job" ) ; }
Source:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "libapp/build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/bundles/release/AndroidManifest.xml" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_TEST_VERSION , project , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }

Target:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "libapp/build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/bundles/release/AndroidManifest.xml" ) ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }
Source:
public void testGetConfig1 ( ) { com.android.ide.common.resources.configuration.FolderConfiguration configForFolder = com.android.ide.common.resources.configuration.FolderConfiguration.getConfig ( new java.lang.String [ ] { "values" , "en" , "rUS" } ) ; assertNotNull ( configForFolder ) ; assertEquals ( "en" , configForFolder.getLanguageQualifier ( ) . getValue ( ) ) ; assertEquals ( "US" , configForFolder.getRegionQualifier ( ) . getValue ( ) ) ; assertNull ( configForFolder.getScreenDimensionQualifier ( ) ) ; assertNull ( configForFolder.getLayoutDirectionQualifier ( ) ) ; }

Target:
public void testIsMatchFor ( ) { com.android.ide.common.resources.configuration.FolderConfiguration en = com.android.ide.common.resources.configuration.FolderConfiguration.getConfigForFolder ( "values-en" ) ; com.android.ide.common.resources.configuration.FolderConfiguration enUs = com.android.ide.common.resources.configuration.FolderConfiguration.getConfigForFolder ( "values-en-rUS" ) ; assertNotNull ( en ) ; assertNotNull ( enUs ) ; assertTrue ( enUs.isMatchFor ( enUs ) ) ; assertTrue ( en.isMatchFor ( en ) ) ; assertTrue ( enUs.isMatchFor ( en ) ) ; assertTrue ( en.isMatchFor ( enUs ) ) ; }
Source:
private java.lang.String getFeatures ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; for ( java.lang.String feature : android.tests.getinfo.DeviceInfoInstrument.FEATURES_TO_CHECK ) { boolean hasFeature = packageManager.hasSystemFeature ( feature ) ; builder.append ( feature ) . append ( ':' ) . append ( hasFeature ) . append ( ';' ) ; } return builder.toString ( ) ; }

Target:
private static java.lang.String getProcesses ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; try { java.lang.String [ ] rootProcesses = android.tests.getinfo.RootProcessScanner.getRootProcesses ( ) ; for ( java.lang.String rootProcess : rootProcesses ) { builder.append ( rootProcess ) . append ( ';' ) ; } } catch ( java.io.FileNotFoundException notFound ) { builder.append ( notFound.getMessage ( ) ) ; } catch ( android.tests.getinfo.RootProcessScanner.MalformedStatMException malformedStatM ) { builder.append ( malformedStatM.getMessage ( ) ) ; } return builder.toString ( ) ; }
Source:
public static void execStandalone ( java.lang.String invokeWith , java.lang.String classPath , java.lang.String className , java.lang.String [ ] args ) { java.lang.StringBuilder command = new java.lang.StringBuilder ( invokeWith ) ; command.append ( " /system/bin/dalvikvm -classpath '" ) . append ( classPath ) ; command.append ( "' " ) . append ( className ) ; dalvik.system.Zygote.appendQuotedShellArgs ( command , args ) ; dalvik.system.Zygote.execShell ( command.toString ( ) ) ; }

Target:
public static void execStandalone ( java.lang.String invokeWith , java.lang.String classPath , java.lang.String className , java.lang.String [ ] args ) { java.lang.StringBuilder command = new java.lang.StringBuilder ( invokeWith ) ; command.append ( " /system/bin/dalvikvm -classpath '" ) . append ( classPath ) ; command.append ( "' " ) . append ( className ) ; com.android.internal.os.Zygote.appendQuotedShellArgs ( command , args ) ; com.android.internal.os.Zygote.execShell ( command.toString ( ) ) ; }
Source:
public void testDeserializeUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200376c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( ( "3742453657269616c697a61626c65436f6e7461696e657200000000000000000200014c000e756e7" + "3657269616c697a61626c657400124c6a6176612f6c616e672f4f626a6563743b7870737200316c6" ) + "962636f72652e6a6176612e696f2e53657269616c697a6174696f6e5465737424576173536572696" ) + "16c697a61626c65000000000000000002000149000169787000000000" ) ; libcore.java.io.SerializationTest.serializableContainerInitializedFlag = false ; libcore.java.io.SerializationTest.wasSerializableInitializedFlag = false ; try { libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertFalse ( libcore.java.io.SerializationTest.serializableContainerInitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }

Target:
public void testDeserializeUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( ( ( "3742453657269616c697a61626c65436f6e7461696e65723200000000000000000200014c000e7" + "56e73657269616c697a61626c657400334c6c6962636f72652f6a6176612f696f2f53657269616" ) + "c697a6174696f6e546573742457617353657269616c697a61626c653b7870737200316c6962636" ) + "f72652e6a6176612e696f2e53657269616c697a6174696f6e546573742457617353657269616c6" ) + "97a61626c65000000000000000002000149000169787000000000" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; try { libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertTrue ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }