auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onCreateView" ) ; android.view.View view = inflater.inflate ( R.layout.new_call_log_fragment , container , false ) ; recyclerView = view.findViewById ( R.id.new_call_log_recycler_view ) ; recyclerView.addOnScrollListener ( new com.android.dialer.metrics.jank.RecyclerViewJankLogger ( com.android.dialer.metrics.MetricsComponent.get ( getContext ( ) ) . metrics ( ) , com.android.dialer.logging.LoggingBindings.NEW_CALL_LOG_JANK_EVENT_NAME ) ) ; getLoaderManager ( ) . restartLoader ( 0 , null , this ) ; return view ; }

Target:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onCreateView" ) ; android.view.View view = inflater.inflate ( R.layout.new_call_log_fragment , container , false ) ; recyclerView = view.findViewById ( R.id.new_call_log_recycler_view ) ; recyclerView.addOnScrollListener ( new com.android.dialer.metrics.jank.RecyclerViewJankLogger ( com.android.dialer.metrics.MetricsComponent.get ( getContext ( ) ) . metrics ( ) , com.android.dialer.metrics.Metrics.NEW_CALL_LOG_JANK_EVENT_NAME ) ) ; getLoaderManager ( ) . restartLoader ( 0 , null , this ) ; return view ; }
Source:
boolean setBluetoothClass ( android.bluetooth.BluetoothClass bluetoothClass ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_PRIVILEGED , "Need BLUETOOTH PRIVILEGED permission" ) ; boolean result = mAdapterProperties.setBluetoothClass ( bluetoothClass ) ; if ( ! result ) { android.util.Log.e ( com.android.bluetooth.btservice.AdapterService.TAG , ( ( "Failed to set BluetoothClass (" + bluetoothClass ) + ") on local Bluetooth adapter." ) ) ; } return result && ( storeBluetoothClassConfig ( bluetoothClass.getClassOfDevice ( ) ) ) ; }

Target:
boolean setBluetoothClass ( android.bluetooth.BluetoothClass bluetoothClass ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_PRIVILEGED , "Need BLUETOOTH PRIVILEGED permission" ) ; debugLog ( ( "setBluetoothClass() to " + bluetoothClass ) ) ; boolean result = mAdapterProperties.setBluetoothClass ( bluetoothClass ) ; if ( ! result ) { android.util.Log.e ( com.android.bluetooth.btservice.AdapterService.TAG , ( ( "setBluetoothClass() to " + bluetoothClass ) + " failed" ) ) ; } return result && ( storeBluetoothClassConfig ( bluetoothClass.getClassOfDevice ( ) ) ) ; }
Source:
public boolean isConnected ( int slotId , int featureType , int callSessionType , int callType ) throws android.os.RemoteException { enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , "isConnected" ) ; synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isConnected ( callSessionType , callType ) ; } } return false ; }

Target:
public boolean isConnected ( int slotId , int featureType , int callSessionType , int callType ) throws android.os.RemoteException { enforceReadPhoneStatePermission ( "isConnected" ) ; synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isConnected ( callSessionType , callType ) ; } } return false ; }
Source:
public void testBitstreamsConformance ( ) { if ( ! ( android.media.cts.bitstreams.MediaBitstreamsTest.mResults.containsKey ( mPath ) ) ) { try { testBitstreamsConformance ( mPrefix ) ; } catch ( com.android.tradefed.device.DeviceNotAvailableException | java.io.IOException e ) { java.lang.String curMethod = getCurrentMethod ( ) ; addConformanceEntry ( curMethod , mPath , MediaBitstreams.K_UNAVAILABLE , e.toString ( ) ) ; } } }

Target:
public void testBitstreamsConformance ( ) { java.io.File bitstreamFile = new java.io.File ( mHostBitstreamsPath , mPath ) ; if ( ! ( bitstreamFile.exists ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.w ( ( bitstreamFile + " not found; skipping" ) ) ; return ; } if ( ! ( android.media.cts.bitstreams.MediaBitstreamsTest.mResults.containsKey ( mPath ) ) ) { try { testBitstreamsConformance ( mPrefix ) ; } catch ( com.android.tradefed.device.DeviceNotAvailableException | java.io.IOException e ) { java.lang.String curMethod = getCurrentMethod ( ) ; addConformanceEntry ( curMethod , mPath , MediaBitstreams.K_UNAVAILABLE , e.toString ( ) ) ; } } }
Source:
private void prepareProject ( java.lang.String path , com.android.sdklib.IAndroidTarget target ) { if ( target.getVersion ( ) . isPreview ( ) ) { final java.lang.String manifestPath = ( path + ( java.io.File.separatorChar ) ) + ( com.android.ide.eclipse.adt.AndroidConstants.FN_ANDROID_MANIFEST ) ; com.android.ide.eclipse.tests.functests.sampleProjects.AndroidManifestWriter manifestWriter = com.android.ide.eclipse.tests.functests.sampleProjects.AndroidManifestWriter.parse ( manifestPath ) ; assertNotNull ( java.lang.String.format ( "could not read manifest %s" , manifestPath ) , manifestWriter ) ; assertTrue ( manifestWriter.setMinSdkVersion ( target.getVersion ( ) . getApiString ( ) ) ) ; } }

Target:
private void prepareProject ( java.lang.String path , com.android.sdklib.IAndroidTarget target ) { if ( target.getVersion ( ) . isPreview ( ) ) { final java.lang.String manifestPath = ( path + ( java.io.File.separatorChar ) ) + ( com.android.sdklib.SdkConstants.FN_ANDROID_MANIFEST_XML ) ; com.android.ide.eclipse.tests.functests.sampleProjects.AndroidManifestWriter manifestWriter = com.android.ide.eclipse.tests.functests.sampleProjects.AndroidManifestWriter.parse ( manifestPath ) ; assertNotNull ( java.lang.String.format ( "could not read manifest %s" , manifestPath ) , manifestWriter ) ; assertTrue ( manifestWriter.setMinSdkVersion ( target.getVersion ( ) . getApiString ( ) ) ) ; } }
Source:
public java.lang.String ipSecAllocateSecurityParameterIndex ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "addr" ) java.lang.String addr , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "requestedSpi" ) java.lang.Integer requestedSpi ) { java.net.InetAddress inetAddr = android.net.NetworkUtils.numericToInetAddress ( addr ) ; android.net.IpSecManager.SecurityParameterIndex spi = null ; if ( requestedSpi == null ) { spi = ipSecAllocateSpi ( inetAddr ) ; } else { spi = ipSecAllocateSpi ( inetAddr , requestedSpi.intValue ( ) ) ; } if ( spi == null ) return null ; java.lang.String id = getSpiId ( spi ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.sSpiHashMap.put ( id , spi ) ; return id ; }

Target:
public java.lang.String ipSecAllocateSecurityParameterIndex ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "addr" ) java.lang.String addr , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "requestedSpi" ) java.lang.Integer requestedSpi ) { java.net.InetAddress inetAddr = android.net.NetworkUtils.numericToInetAddress ( addr ) ; android.net.IpSecManager.SecurityParameterIndex spi = null ; if ( requestedSpi == null ) { spi = allocateSpi ( inetAddr ) ; } else { spi = allocateSpi ( inetAddr , requestedSpi.intValue ( ) ) ; } if ( spi == null ) return null ; java.lang.String id = getSpiId ( spi ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.sSpiHashMap.put ( id , spi ) ; return id ; }
Source:
protected void onRoamingOn ( ) { if ( ( mUserDataEnabled ) == false ) return ; if ( getDataOnRoamingEnabled ( ) ) { if ( DBG ) log ( "onRoamingOn: setup data on roaming" ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_ON ) ; notifyDataConnection ( Phone.REASON_ROAMING_ON ) ; } else { if ( DBG ) log ( "onRoamingOn: Tear down data connection on roaming." ) ; cleanUpAllConnections ( true , Phone.REASON_ROAMING_ON ) ; notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_ON ) ; } }

Target:
protected void onRoamingOff ( ) { if ( DBG ) log ( "onRoamingOff" ) ; if ( ! ( mUserDataEnabled ) ) return ; if ( ( getDataOnRoamingEnabled ( ) ) == false ) { notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }
Source:
public < V > java.util.concurrent.ScheduledFuture < V > schedule ( java.util.concurrent.Callable < V > callable , long delay , java.util.concurrent.TimeUnit unit ) { return delegate.schedule ( callable , delay , unit ) ; }

Target:
public com.google.common.util.concurrent.ListenableScheduledFuture < ? > scheduleAtFixedRate ( java.lang.Runnable command , long initialDelay , long period , java.util.concurrent.TimeUnit unit ) { com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.NeverSuccessfulListenableFutureTask task = new com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.NeverSuccessfulListenableFutureTask ( command ) ; java.util.concurrent.ScheduledFuture < ? > scheduled = delegate.scheduleAtFixedRate ( task , initialDelay , period , unit ) ; return new com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.ListenableScheduledTask < java.lang.Void > ( task , scheduled ) ; }
Source:
public void doesNotContainClass ( java.lang.String className ) throws com.android.ide.common.process.ProcessException , java.io.IOException { java.io.File apk = getSubject ( ) ; if ( com.android.build.gradle.integration.common.utils.ApkHelper.checkForClass ( apk , className ) ) { failWithRawMessage ( "'%s' unexpectedly contain '%s'" , apk.getName ( ) , className ) ; } }

Target:
public com.google.common.truth.ListSubject locales ( ) throws com.android.ide.common.process.ProcessException { java.io.File apk = getSubject ( ) ; java.util.List < java.lang.String > locales = com.android.build.gradle.integration.common.utils.ApkHelper.getLocales ( apk ) ; if ( locales == null ) { junit.framework.Assert.fail ( java.lang.String.format ( "locales not found in badging output for %s" , apk ) ) ; } return com.google.common.truth.Truth.assertThat ( locales ) ; }
Source:
public void testSetLinkPropertiesInvalidAddress ( ) throws java.lang.Exception { com.android.internal.telephony.dataconnection.DataCallResponse response = new com.android.internal.telephony.dataconnection.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , "224.224.224.224" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS , 1440 ) ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.ERR_UnacceptableParameter , setLinkProperties ( response , linkProperties ) ) ; }

Target:
public void testSetLinkPropertiesInvalidAddress ( ) throws java.lang.Exception { android.telephony.data.DataCallResponse response = new android.telephony.data.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , java.util.Arrays.asList ( new android.telephony.data.InterfaceAddress ( "224.224.224.224" , 0 ) ) , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS ) ) , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY ) ) , java.util.Arrays.asList ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS ) , 1440 ) ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.ERR_UnacceptableParameter , setLinkProperties ( response , linkProperties ) ) ; }
Source:
boolean enableWBS ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ! ( mStateMachine.isConnected ( ) ) ) { return false ; } if ( mStateMachine.isAudioOn ( ) ) { return false ; } for ( android.bluetooth.BluetoothDevice device : getConnectedDevices ( ) ) { mStateMachine.sendMessage ( HeadsetStateMachine.ENABLE_WBS , device ) ; } return true ; }

Target:
int getAudioState ( android.bluetooth.BluetoothDevice device ) { return mStateMachine.getAudioState ( ) ; }
Source:
public android.net.NetworkCapabilities removeTransportType ( int transportType ) { if ( ( transportType < ( android.net.NetworkCapabilities.MIN_TRANSPORT ) ) || ( transportType > ( android.net.NetworkCapabilities.MAX_TRANSPORT ) ) ) { throw new java.lang.IllegalArgumentException ( "TransportType out of range" ) ; } mTransportTypes &= ~ ( 1 << transportType ) ; setNetworkSpecifier ( mNetworkSpecifier ) ; return this ; }

Target:
public android.net.NetworkCapabilities removeTransportType ( int transportType ) { android.net.NetworkCapabilities.checkValidTransportType ( transportType ) ; mTransportTypes &= ~ ( 1 << transportType ) ; setNetworkSpecifier ( mNetworkSpecifier ) ; return this ; }
Source:
public final int getSize ( ) { com.android.tools.perflib.heap.Instance instance = null ; if ( ( mType ) == ( RootType.SYSTEM_CLASS ) ) { instance = mHeap.mState.findClass ( mId ) ; } else { instance = mHeap.mState.findReference ( mId ) ; } if ( instance == null ) { return 0 ; } return instance.getSize ( ) ; }

Target:
public final int getSize ( ) { com.android.tools.perflib.heap.Instance instance = getReferredInstance ( ) ; return instance != null ? instance.getSize ( ) : 0 ; }
Source:
public java.lang.String getText ( java.lang.Object element ) { return super . getText ( element ) ; }

Target:
private void selectCompatibleArchives ( java.lang.Object pkg , org.eclipse.jface.viewers.ITreeContentProvider provider ) { for ( java.lang.Object archive : provider.getChildren ( pkg ) ) { if ( archive instanceof com.android.sdklib.internal.repository.Archive ) { mTreeViewer.setChecked ( archive , ( ( com.android.sdklib.internal.repository.Archive ) ( archive ) ) . isCompatible ( ) ) ; } } }
Source:
public java.lang.String getConfigString ( int item ) throws com.android.ims.ImsException { java.lang.String ret = "Unknown" ; try { ret = miConfig.getConfigString ( item ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getConfigString()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } if ( DBG ) android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( ( ( "getConfigString(): item = " + item ) + ", ret =" ) + ret ) ) ; return ret ; }

Target:
public java.lang.String getConfigString ( int item ) throws com.android.ims.ImsException { java.lang.String ret = "Unknown" ; try { ret = miConfig.getConfigString ( item ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getConfigString()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } if ( DBG ) android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( ( ( "getConfigString(): item = " + item ) + ", ret =" ) + ret ) ) ; return ret ; }
Source:
public void setFromFieldPacker ( int xoff , android.support.v8.renderscript.FieldPacker fp ) { try { android.support.v8.renderscript.FieldPacker nfp = new android.support.v8.renderscript.FieldPacker ( fp.getData ( ) ) ; mN.setFromFieldPacker ( xoff , nfp ) ; } catch ( android.support.v8.renderscript.android.renderscript e ) { throw android.support.v8.renderscript.ExceptionThunker.convertException ( e ) ; } }

Target:
public void setFromFieldPacker ( int xoff , android.support.v8.renderscript.FieldPacker fp ) { try { byte [ ] data = fp.getData ( ) ; int fp_length = fp.getPos ( ) ; android.support.v8.renderscript.FieldPacker nfp = new android.support.v8.renderscript.FieldPacker ( fp_length ) ; for ( int i = 0 ; i < fp_length ; i ++ ) { nfp.addI8 ( data [ i ] ) ; } mN.setFromFieldPacker ( xoff , nfp ) ; } catch ( android.support.v8.renderscript.android.renderscript e ) { throw android.support.v8.renderscript.ExceptionThunker.convertException ( e ) ; } }
Source:
public com.android.builder.ProductFlavor getFirstFlavor ( ) { return mFlavorConfigs.get ( 0 ) ; }

Target:
public java.lang.Iterable < java.lang.Object > getConfigObjects ( ) { java.util.List < java.lang.Object > list = com.google.common.collect.Lists.newArrayListWithExpectedSize ( ( ( mFlavorConfigs.size ( ) ) + 2 ) ) ; list.add ( mDefaultConfig ) ; list.add ( mBuildType ) ; list.addAll ( mFlavorConfigs ) ; return list ; }
Source:
public void testLoadTzData_badIdOrder ( ) throws java.lang.Exception { libcore.util.ZoneInfoTestHelper.TzDataBuilder builder = new libcore.util.ZoneInfoTestHelper.TzDataBuilder ( ) . initializeToValid ( ) ; builder.clearZicData ( ) ; byte [ ] validZicData = new libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) . initializeToValid ( ) . build ( ) ; builder.addZicData ( "Europe/Zurich" , validZicData ) ; builder.addZicData ( "Europe/London" , validZicData ) ; libcore.util.ZoneInfoDBTest.checkInvalidDataDetected ( builder.build ( ) ) ; }

Target:
public void testLoadTzData_badIdOrder ( ) throws java.lang.Exception { libcore.tzdata.testing.ZoneInfoTestHelper.TzDataBuilder builder = new libcore.tzdata.testing.ZoneInfoTestHelper.TzDataBuilder ( ) . initializeToValid ( ) ; builder.clearZicData ( ) ; byte [ ] validZicData = new libcore.tzdata.testing.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) . initializeToValid ( ) . build ( ) ; builder.addZicData ( "Europe/Zurich" , validZicData ) ; builder.addZicData ( "Europe/London" , validZicData ) ; libcore.util.ZoneInfoDBTest.checkInvalidDataDetected ( builder.build ( ) ) ; }
Source:
public java.util.List < java.lang.Class < ? extends com.android.sched.schedulable.RunnableSchedulable < ? extends com.android.sched.item.Component > > > getSortedRunners ( ) { return java.util.Arrays.< java.lang.Class < ? extends com.android.sched.schedulable.RunnableSchedulable < ? extends com.android.sched.item.Component > > > asList ( com.android.jack.coverage.CodeCoverageSelector.class , com.android.jack.coverage.CodeCoverageAnalyzer.class , com.android.jack.coverage.CodeCoverageTransformer.class , com.android.jack.coverage.CodeCoverageMetadataFileWriter.class , com.android.jack.cfg.CfgMarkerRemover.class ) ; }

Target:
public java.util.List < java.lang.Class < ? extends com.android.sched.schedulable.RunnableSchedulable < ? extends com.android.sched.item.Component > > > getSortedRunners ( ) { return java.util.Arrays.< java.lang.Class < ? extends com.android.sched.schedulable.RunnableSchedulable < ? extends com.android.sched.item.Component > > > asList ( com.android.jack.coverage.CodeCoverageSelector.class , com.android.jack.coverage.CodeCoverageAnalyzer.class , com.android.jack.coverage.CodeCoverageTransformer.class , com.android.jack.coverage.CodeCoverageMetadataFileWriter.class , com.android.jack.cfg.CfgMarkerRemover.class , com.android.jack.cfg.CfgBuilder.class ) ; }
Source:
private void cleanUpTonePlayer ( ) { mMainThreadHandler.post ( new java.lang.Runnable ( "ICTP.cUTP" ) { @ java.lang.Override public void loggedRun ( ) { synchronized ( mLock ) { if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 0 ) { com.android.server.telecom.Log.wtf ( this , "Over-releasing focus for tone player." ) ; } else if ( ( -- ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ) == 0 ) { mCallAudioManager.setIsTonePlaying ( false ) ; } } } } . prepare ( ) ) ; }

Target:
private void cleanUpTonePlayer ( ) { mMainThreadHandler.post ( new java.lang.Runnable ( "ICTP.cUTP" ) { @ java.lang.Override public void loggedRun ( ) { synchronized ( mLock ) { if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 0 ) { android.telecom.Log.wtf ( this , "Over-releasing focus for tone player." ) ; } else if ( ( -- ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ) == 0 ) { mCallAudioManager.setIsTonePlaying ( false ) ; } } } } . prepare ( ) ) ; }
Source:
public void onImsResumed ( ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( "onImsResumed" ) ; mPhone.setServiceState ( ServiceState.STATE_IN_SERVICE ) ; mMetrics.writeOnImsConnectionState ( mPhone.getPhoneId ( ) , ImsConnectionState.State.RESUMED , null ) ; }

Target:
public void onVoiceMessageCountUpdate ( int count ) { if ( ( ( mPhone ) != null ) && ( ( mPhone.mDefaultPhone ) != null ) ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onVoiceMessageCountChanged :: count=" + count ) ) ; mPhone.mDefaultPhone.setVoiceMessageCount ( count ) ; } else { loge ( "onVoiceMessageCountUpdate: null phone" ) ; } }
Source:
private boolean loadData ( java.lang.String path ) { try { mappedFile = libcore.io.MemoryMappedFile.mmapRO ( path ) ; } catch ( android.system.ErrnoException errnoException ) { return false ; } try { readHeader ( ) ; return true ; } catch ( java.lang.Exception ex ) { try { mappedFile.close ( ) ; } catch ( android.system.ErrnoException ignored ) { } java.lang.System.logE ( ( ( "tzdata file \"" + path ) + "\" was present but invalid!" ) , ex ) ; return false ; } }

Target:
public void close ( ) { if ( ! ( closed ) ) { closed = true ; ids = null ; byteOffsets = null ; rawUtcOffsetsCache = null ; mappedFile = null ; cache.evictAll ( ) ; if ( ( mappedFile ) != null ) { try { mappedFile.close ( ) ; } catch ( android.system.ErrnoException ignored ) { } } } }
Source:
static boolean isBooleanField ( java.lang.reflect.Field field ) { return ( ( field.getType ( ) . equals ( boolean . class ) ) || ( field.getType ( ) . equals ( com.google.devtools.common.options.TriState.class ) ) ) || ( ( com.google.devtools.common.options.IsolatedOptionsData.findConverter ( field ) ) instanceof com.google.devtools.common.options.BoolOrEnumConverter ) ; }

Target:
private static boolean isBooleanField ( java.lang.reflect.Field field , com.google.devtools.common.options.Converter < ? > converter ) { return ( ( field.getType ( ) . equals ( boolean . class ) ) || ( field.getType ( ) . equals ( com.google.devtools.common.options.TriState.class ) ) ) || ( converter instanceof com.google.devtools.common.options.BoolOrEnumConverter ) ; }
Source:
public boolean removeAll ( final java.util.Collection < ? > collection ) { com.google.common.base.Preconditions.checkNotNull ( collection ) ; com.google.common.base.Predicate < E > combinedPredicate = new com.google.common.base.Predicate < E > ( ) { @ java.lang.Override public boolean apply ( E input ) { return ( predicate.apply ( input ) ) && ( collection.contains ( input ) ) ; } } ; return com.google.common.collect.Iterables.removeIf ( unfiltered , combinedPredicate ) ; }

Target:
static boolean safeRemove ( java.util.Collection < ? > collection , @ javax.annotation.Nullable java.lang.Object object ) { com.google.common.base.Preconditions.checkNotNull ( collection ) ; try { return collection.remove ( object ) ; } catch ( java.lang.ClassCastException e ) { return false ; } catch ( java.lang.NullPointerException e ) { return false ; } }
Source:
public static java.lang.String readFile ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile file ) { java.io.InputStream contents = null ; try { contents = file.getFile ( ) . getContents ( ) ; return com.android.ide.eclipse.adt.AdtPlugin.readFile ( new java.io.InputStreamReader ( contents ) ) ; } catch ( com.android.io.StreamException e ) { } finally { try { if ( contents != null ) { contents.close ( ) ; } } catch ( java.io.IOException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "Can't read layout file" ) ; } } return null ; }

Target:
public static java.lang.String readFile ( com.android.ide.common.resources.ResourceFile file ) { java.io.InputStream contents = null ; try { contents = file.getFile ( ) . getContents ( ) ; return com.android.ide.eclipse.adt.AdtPlugin.readFile ( new java.io.InputStreamReader ( contents ) ) ; } catch ( com.android.io.StreamException e ) { } finally { try { if ( contents != null ) { contents.close ( ) ; } } catch ( java.io.IOException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "Can't read layout file" ) ; } } return null ; }
Source:
public void parseCacheHeaders_cacheControlMustRevalidateNoMaxAge ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now + ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; headers.put ( "Cache-Control" , "must-revalidate" ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNotNull ( entry ) ; assertNull ( entry.etag ) ; assertEqualsWithin ( now , entry.ttl , com.android.volley.toolbox.HttpHeaderParserTest.ONE_MINUTE_MILLIS ) ; assertEquals ( entry.softTtl , entry.ttl ) ; }

Target:
public void parseCacheHeaders_cacheControlMustRevalidateNoMaxAge ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now + ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; headers.put ( "Cache-Control" , "must-revalidate" ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; org.junit.Assert.assertNotNull ( entry ) ; org.junit.Assert.assertNull ( entry.etag ) ; assertEqualsWithin ( now , entry.ttl , com.android.volley.toolbox.HttpHeaderParserTest.ONE_MINUTE_MILLIS ) ; org.junit.Assert.assertEquals ( entry.softTtl , entry.ttl ) ; }
Source:
public long getAppDataInode ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { return mInstalld.getAppDataInode ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public long getAppDataInode ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return - 1 ; try { return mInstalld.getAppDataInode ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void customize ( com.android.tools.gradle.eclipse.GradleImport importer ) { importer.setGradleNameStyle ( false ) ; importer.setSdkLocation ( null ) ; importer.setReplaceJars ( false ) ; importer.setReplaceLibs ( false ) ; }

Target:
public void customize ( com.android.tools.gradle.eclipse.GradleImport importer ) { assertFalse ( importer.isImportIntoExisting ( ) ) ; assertFalse ( importer.isPerModuleRepositories ( ) ) ; importer.setGradleNameStyle ( false ) ; importer.setSdkLocation ( null ) ; importer.setReplaceJars ( false ) ; importer.setReplaceLibs ( false ) ; }
Source:
public static void set ( java.lang.String key , java.lang.String val ) { if ( ( val != null ) && ( ( val.length ( ) ) > ( android.os.SystemProperties.PROP_VALUE_MAX ) ) ) { throw android.os.SystemProperties.newValueTooLargeException ( key , val ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; android.os.SystemProperties.native_set ( key , val ) ; }

Target:
public static void set ( @ android.annotation.NonNull java.lang.String key , @ android.annotation.Nullable java.lang.String val ) { if ( ( val != null ) && ( ( val.length ( ) ) > ( android.os.SystemProperties.PROP_VALUE_MAX ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( ( ( "value of system property '" + key ) + "' is longer than " ) + ( android.os.SystemProperties.PROP_VALUE_MAX ) ) + " characters: " ) + val ) ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; android.os.SystemProperties.native_set ( key , val ) ; }
Source:
private void onRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRoamingOff" ) ; if ( ! ( mDataEnabledSettings.isUserDataEnabled ( ) ) ) return ; if ( ( getDataOnRoamingEnabled ( ) ) == false ) { notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }

Target:
private void onRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRoamingOff" ) ; setDataProfilesAsNeeded ( ) ; if ( ! ( mDataEnabledSettings.isUserDataEnabled ( ) ) ) return ; if ( ( getDataOnRoamingEnabled ( ) ) == false ) { notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }
Source:
public final byte [ ] getIV ( ) { chooseFirstProvider ( ) ; return spi.engineGetIV ( ) ; }

Target:
public final int doFinal ( java.nio.ByteBuffer input , java.nio.ByteBuffer output ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { checkCipherState ( ) ; if ( ( input == null ) || ( output == null ) ) { throw new java.lang.IllegalArgumentException ( "Buffers must not be null" ) ; } if ( input == output ) { throw new java.lang.IllegalArgumentException ( ( "Input and output buffers must " + "not be the same object, consider using buffer.duplicate()" ) ) ; } if ( output.isReadOnly ( ) ) { throw new java.nio.ReadOnlyBufferException ( ) ; } updateProviderIfNeeded ( ) ; return spi.engineDoFinal ( input , output ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { debugLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) , msg.arg1 ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_REGISTERED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_REGISTERED" ) ; registerProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_UNREGISTERED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_UNREGISTERED" ) ; unregisterProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; } }

Target:
public void handleMessage ( android.os.Message msg ) { verboseLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : verboseLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) , msg.arg1 ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_REGISTERED : verboseLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_REGISTERED" ) ; registerProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_UNREGISTERED : verboseLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_UNREGISTERED" ) ; unregisterProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; } }
Source:
public void stopTimer ( java.lang.String timerEventName ) { }

Target:
public void stopTimer ( java.lang.String timerEventName ) { com.android.dialer.metrics.StubMetrics.StubTimerEvent stubTimerEvent = namedEvents.remove ( timerEventName ) ; if ( stubTimerEvent == null ) { return ; } com.android.dialer.common.LogUtil.d ( "StubMetrics.stopTimer" , "%s took %dms" , timerEventName , ( ( android.os.SystemClock.elapsedRealtime ( ) ) - ( stubTimerEvent.startTime ) ) ) ; }
Source:
public boolean visitNode ( lombok.ast.Node node ) { return ( mEscapes ) || ( super . visitNode ( node ) ) ; }

Target:
public void visitMethodCallExpression ( com.intellij.psi.PsiMethodCallExpression expression ) { super . visitMethodCallExpression ( expression ) ; com.intellij.psi.PsiReferenceExpression methodExpression = expression.getMethodExpression ( ) ; com.intellij.psi.PsiExpression qualifier = methodExpression.getQualifierExpression ( ) ; com.intellij.psi.PsiField dataBinder = com.android.tools.lint.checks.RecyclerViewDetector.getDataBinderReference ( qualifier ) ; if ( dataBinder != null ) { if ( ( mDataBinders ) == null ) { mDataBinders = com.google.common.collect.Lists.newArrayList ( ) ; } mDataBinders.add ( expression ) ; } }
Source:
private java.lang.String localeIdName ( java.lang.String localeId ) { if ( ( nameLength ) == ( com.ibm.icu.text.DisplayContext.LENGTH_SHORT ) ) { java.lang.String locIdName = langData.get ( "LanguagesShort" , localeId ) ; if ( ! ( locIdName.equals ( localeId ) ) ) { return locIdName ; } } return langData.get ( "Languages" , localeId ) ; }

Target:
private java.lang.String localeIdName ( java.lang.String localeId ) { if ( ( nameLength ) == ( com.ibm.icu.text.DisplayContext.LENGTH_SHORT ) ) { java.lang.String locIdName = langData.get ( "Languages%short" , localeId ) ; if ( ! ( locIdName.equals ( localeId ) ) ) { return locIdName ; } } return langData.get ( "Languages" , localeId ) ; }
Source:
private static boolean isShutdownRequest ( org.apache.http.HttpRequest request ) { org.apache.http.RequestLine requestLine = request.getRequestLine ( ) ; java.lang.String uriString = requestLine.getUri ( ) ; java.net.URI uri = java.net.URI.create ( uriString ) ; java.lang.String path = uri.getPath ( ) ; return path.equals ( android.webkit.cts.CtsTestServer.SHUTDOWN_PREFIX ) ; }

Target:
public void shutDownOnClientThread ( ) { try { mWillShutDown = true ; mExecutorService.shutdown ( ) ; mExecutorService.awaitTermination ( 1L , java.util.concurrent.TimeUnit.MINUTES ) ; mSocket.close ( ) ; synchronized ( mLock ) { for ( java.net.Socket socket : mSockets ) { socket.close ( ) ; } } } catch ( java.io.IOException ignored ) { } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( android.webkit.cts.CtsTestServer.TAG , "Shutting down threads" , e ) ; } }
Source:
public boolean isInHomeStack ( int taskId ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "getStackInfo()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { com.android.server.am.TaskRecord tr = mStackSupervisor.anyTaskForIdLocked ( taskId , false ) ; return ( ( tr != null ) && ( ( tr.stack ) != null ) ) && ( tr.stack.isHomeStack ( ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }

Target:
public boolean isInHomeStack ( int taskId ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "getStackInfo()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { final com.android.server.am.TaskRecord tr = mStackSupervisor.anyTaskForIdLocked ( taskId , ( ! ( com.android.server.am.ActivityStackSupervisor.RESTORE_FROM_RECENTS ) ) , StackId.INVALID_STACK_ID ) ; return ( ( tr != null ) && ( ( tr.stack ) != null ) ) && ( tr.stack.isHomeStack ( ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
public java.util.Properties getProjectProperties ( ) throws java.io.IOException { if ( ( mProjectProperties ) == null ) { assert isAndroidProject ( ) ; java.io.File file = getProjectPropertiesFile ( ) ; if ( file.exists ( ) ) { mProjectProperties = com.android.tools.gradle.eclipse.GradleImport.getProperties ( file ) ; } else { mImporter.reportError ( this , mDir , ( "No project.project file found in " + ( mDir.getPath ( ) ) ) ) ; return null ; } } return mProjectProperties ; }

Target:
private void initAndroidProject ( ) throws java.io.IOException { mAndroidProject = hasNature ( "com.android.ide.eclipse.adt.AndroidNature" ) ; if ( ( ! ( mAndroidProject ) ) && ( ( getProjectDocument ( ) ) == null ) ) { mAndroidProject = com.android.tools.gradle.eclipse.GradleImport.isAdtProjectDir ( mDir ) ; } mNdkProject = ( mAndroidProject ) && ( ( ( hasNature ( "org.eclipse.cdt.core.cnature" ) ) || ( hasNature ( "org.eclipse.cdt.core.ccnature" ) ) ) || ( new java.io.File ( mDir , ( ( "jni" + ( java.io.File.separator ) ) + "Android.mk" ) ) . exists ( ) ) ) ; }
Source:
public static com.ibm.icu.util.ULocale forLocale ( java.util.Locale loc ) { if ( loc == null ) { return null ; } com.ibm.icu.util.ULocale result = com.ibm.icu.util.ULocale.CACHE.get ( loc ) ; if ( result == null ) { result = com.ibm.icu.util.ULocale.JDKLocaleHelper.toULocale ( loc ) ; com.ibm.icu.util.ULocale.CACHE.put ( loc , result ) ; } return result ; }

Target:
public static com.ibm.icu.util.ULocale forLocale ( java.util.Locale loc ) { if ( loc == null ) { return null ; } return com.ibm.icu.util.ULocale.CACHE.getInstance ( loc , null ) ; }
Source:
private static java.io.File createInputFile ( java.lang.String content ) throws java.io.IOException { java.io.File input = java.io.File.createTempFile ( "predex" , ".jar" ) ; input.deleteOnExit ( ) ; com.google.common.io.Files.write ( content , input , com.google.common.base.Charsets.UTF_8 ) ; return input ; }

Target:
private static java.io.File createInputFile ( java.lang.String content ) throws java.io.IOException { java.io.File input = java.io.File.createTempFile ( "predex" , ".jar" ) ; input.deleteOnExit ( ) ; java.util.jar.JarOutputStream jarOutputStream = new java.util.jar.JarOutputStream ( new java.io.FileOutputStream ( input ) ) ; try { jarOutputStream.putNextEntry ( new java.util.zip.ZipEntry ( "content.class" ) ) ; jarOutputStream.write ( content.getBytes ( com.google.common.base.Charsets.UTF_8 ) ) ; jarOutputStream.closeEntry ( ) ; } finally { jarOutputStream.close ( ) ; } return input ; }
Source:
protected android.graphics.Point runRenderSpec ( android.uirendering.cts.testinfrastructure.ActivityTestBase.TestCase testCase ) { android.graphics.Point testOffset = getActivity ( ) . enqueueRenderSpecAndWait ( testCase.layoutID , testCase.canvasClient , null , testCase.viewInitializer , testCase.useHardware ) ; testCase.wasTestRan = true ; if ( ( testCase.readyFence ) != null ) { try { testCase.readyFence.await ( 5 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( "readyFence didn't signal within 5 seconds" ) ; } } return testOffset ; }

Target:
protected android.uirendering.cts.testinfrastructure.ActivityTestBase.TestPositionInfo runRenderSpec ( android.uirendering.cts.testinfrastructure.ActivityTestBase.TestCase testCase ) { android.uirendering.cts.testinfrastructure.ActivityTestBase.TestPositionInfo testPositionInfo = getActivity ( ) . enqueueRenderSpecAndWait ( testCase.layoutID , testCase.canvasClient , null , testCase.viewInitializer , testCase.useHardware ) ; testCase.wasTestRan = true ; if ( ( testCase.readyFence ) != null ) { try { testCase.readyFence.await ( 5 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( "readyFence didn't signal within 5 seconds" ) ; } } return testPositionInfo ; }
Source:
public void run ( ) { try { vfs.close ( ) ; } catch ( java.io.IOException e ) { com.android.jack.Jack.logger.log ( java.util.logging.Level.FINE , ( ( "Failed to close vfs for '" + dirOrZip ) + "'." ) , e ) ; } }

Target:
public static com.android.jack.Version getVersion ( ) { if ( ( com.android.jack.Jack.version ) == null ) { java.io.InputStream is = com.android.jack.Jack.class . getClassLoader ( ) . getResourceAsStream ( com.android.jack.Jack.PROPERTIES_FILE ) ; if ( is != null ) { com.android.jack.Jack.version = new com.android.jack.Version ( is ) ; } else { com.android.jack.Jack.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to open Jack properties file " + ( com.android.jack.Jack.PROPERTIES_FILE ) ) ) ; throw new java.lang.AssertionError ( ) ; } } return com.android.jack.Jack.version ; }
Source:
public void subscriptionStatusChanged ( int indicationType , boolean var2 ) { }

Target:
public void subscriptionStatusChanged ( int indicationType , boolean activate ) { mRil.processIndication ( indicationType ) ; int [ ] response = new int [ 1 ] ; response [ 0 ] = ( activate ) ? 1 : 0 ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED , response ) ; mRil.mSubscriptionStatusRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public void testListItem ( ) throws java.lang.Throwable { android.content.IntentFilter filter = new android.content.IntentFilter ( android.content.Intent.ACTION_MAIN ) ; filter.addCategory ( TestListActivity.CATEGORY_MANUAL_TEST ) ; android.app.Instrumentation.ActivityMonitor monitor = new android.app.Instrumentation.ActivityMonitor ( filter , null , false ) ; mInstrumentation.addMonitor ( monitor ) ; sendKeys ( KeyEvent.KEYCODE_ENTER ) ; android.app.Activity activity = mInstrumentation.waitForMonitorWithTimeout ( monitor , java.util.concurrent.TimeUnit.SECONDS.toMillis ( 10 ) ) ; assertNotNull ( activity ) ; activity.finish ( ) ; }

Target:
private android.app.Activity launchTestActivity ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( android.content.Intent.ACTION_MAIN ) ; filter.addCategory ( TestListAdapter.CATEGORY_MANUAL_TEST ) ; android.app.Instrumentation.ActivityMonitor monitor = new android.app.Instrumentation.ActivityMonitor ( filter , null , false ) ; mInstrumentation.addMonitor ( monitor ) ; sendKeys ( KeyEvent.KEYCODE_ENTER ) ; android.app.Activity activity = mInstrumentation.waitForMonitorWithTimeout ( monitor , java.util.concurrent.TimeUnit.SECONDS.toMillis ( 1 ) ) ; assertNotNull ( activity ) ; return activity ; }
Source:
private void addNewConfiguration ( com.google.gct.testing.CloudTestConfigurationImpl newConfiguration ) { newConfiguration.setIcon ( CloudTestConfigurationProviderImpl.DEFAULT_ICON ) ; int addIndex = ( ( selectedConfiguration ) == null ) ? editableConfigurations.size ( ) : ( editableConfigurations.indexOf ( selectedConfiguration ) ) + 1 ; editableConfigurations.add ( addIndex , newConfiguration ) ; addConfigurationToTree ( addIndex , newConfiguration , true ) ; selectedConfiguration = newConfiguration ; updateConfigurationTree ( ) ; }

Target:
private void moveConfigurationToIndex ( int index , com.google.gct.testing.CloudConfigurationImpl configuration ) { editableConfigurations.remove ( configuration ) ; editableConfigurations.add ( index , configuration ) ; removeConfigurationFromTree ( configuration ) ; addConfigurationToTree ( index , configuration , true ) ; updateConfigurationTree ( ) ; }
Source:
public android.database.Cursor loadInBackground ( ) { android.database.Cursor cursor = super . loadInBackground ( ) ; com.android.dialer.searchfragment.cp2.ContactFilterCursor contactFilterCursor = new com.android.dialer.searchfragment.cp2.ContactFilterCursor ( cursor , query , getContext ( ) ) ; return com.android.dialer.searchfragment.cp2.SearchContactsCursor.newInstance ( getContext ( ) , contactFilterCursor ) ; }

Target:
static com.android.dialer.searchfragment.cp2.SearchContactsCursorLoader.RegularSearchCursor newInstance ( android.content.Context context , android.database.Cursor regularSearchCursor ) { if ( ( regularSearchCursor.getCount ( ) ) == 0 ) { return new com.android.dialer.searchfragment.cp2.SearchContactsCursorLoader.RegularSearchCursor ( 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.RegularSearchCursor ( new android.database.Cursor [ ] { headerCursor , regularSearchCursor } ) ; }
Source:
private void processInstrumentationNode ( org.xml.sax.Attributes attributes ) { java.lang.String instrumentationName = getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_NAME , true ) ; if ( instrumentationName != null ) { java.lang.String instrClassName = com.android.sdklib.xml.AndroidManifest.combinePackageAndClassName ( mManifestData.mPackage , instrumentationName ) ; java.lang.String targetPackage = getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_TARGET_PACKAGE , true ) ; mManifestData.mInstrumentations.add ( new com.android.sdklib.xml.AndroidManifestParser.Instrumentation ( instrClassName , targetPackage ) ) ; if ( ( mErrorHandler ) != null ) { mErrorHandler.checkClass ( mLocator , instrClassName , SdkConstants.CLASS_INSTRUMENTATION , true ) ; } } }

Target:
private void processInstrumentationNode ( org.xml.sax.Attributes attributes ) { java.lang.String instrumentationName = getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_NAME , true ) ; if ( instrumentationName != null ) { java.lang.String instrClassName = com.android.sdklib.xml.AndroidManifest.combinePackageAndClassName ( mManifestData.mPackage , instrumentationName ) ; java.lang.String targetPackage = getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_TARGET_PACKAGE , true ) ; mManifestData.mInstrumentations.add ( new com.android.sdklib.xml.ManifestData.Instrumentation ( instrClassName , targetPackage ) ) ; if ( ( mErrorHandler ) != null ) { mErrorHandler.checkClass ( mLocator , instrClassName , SdkConstants.CLASS_INSTRUMENTATION , true ) ; } } }
Source:
public android.icu.text.DateIntervalInfo.PatternInfo getIntervalPattern ( java.lang.String skeleton , int field ) { if ( field > ( android.icu.text.DateIntervalInfo.MINIMUM_SUPPORTED_CALENDAR_FIELD ) ) { throw new java.lang.IllegalArgumentException ( "no support for field less than MINUTE" ) ; } java.util.Map < java.lang.String , android.icu.text.DateIntervalInfo.PatternInfo > patternsOfOneSkeleton = fIntervalPatterns.get ( skeleton ) ; if ( patternsOfOneSkeleton != null ) { android.icu.text.DateIntervalInfo.PatternInfo intervalPattern = patternsOfOneSkeleton.get ( android.icu.text.DateIntervalInfo.CALENDAR_FIELD_TO_PATTERN_LETTER [ field ] ) ; if ( intervalPattern != null ) { return intervalPattern ; } } return null ; }

Target:
public android.icu.text.DateIntervalInfo.PatternInfo getIntervalPattern ( java.lang.String skeleton , int field ) { if ( field > ( android.icu.text.DateIntervalInfo.MINIMUM_SUPPORTED_CALENDAR_FIELD ) ) { throw new java.lang.IllegalArgumentException ( "no support for field less than SECOND" ) ; } java.util.Map < java.lang.String , android.icu.text.DateIntervalInfo.PatternInfo > patternsOfOneSkeleton = fIntervalPatterns.get ( skeleton ) ; if ( patternsOfOneSkeleton != null ) { android.icu.text.DateIntervalInfo.PatternInfo intervalPattern = patternsOfOneSkeleton.get ( android.icu.text.DateIntervalInfo.CALENDAR_FIELD_TO_PATTERN_LETTER [ field ] ) ; if ( intervalPattern != null ) { return intervalPattern ; } } return null ; }