auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean performDexOpt ( java.lang.String packageName ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can request dexopt be performed" ) ; if ( ! ( mNoDexOpt ) ) { return false ; } android.content.pm.PackageParser.Package p ; synchronized ( mPackages ) { p = mPackages.get ( packageName ) ; if ( ( p == null ) || ( p.mDidDexOpt ) ) { return false ; } } synchronized ( mInstallLock ) { return ( performDexOptLI ( p , false , false ) ) == ( com.android.server.pm.PackageManagerService.DEX_OPT_PERFORMED ) ; } }

Target:
private void createIdmapsForPackageLI ( android.content.pm.PackageParser.Package pkg ) { java.util.HashMap < java.lang.String , android.content.pm.PackageParser.Package > overlays = mOverlays.get ( pkg.packageName ) ; if ( overlays == null ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( "Unable to create idmap for " + ( pkg.packageName ) ) + ": no overlay packages" ) ) ; return ; } for ( android.content.pm.PackageParser.Package opkg : overlays.values ( ) ) { createIdmapForPackagePairLI ( pkg , opkg ) ; } }
Source:
public void handleMessage ( android.os.Message msg ) { android.widget.TextView tv = ( ( android.widget.TextView ) ( msg.obj ) ) ; int x = tv.getScrollX ( ) ; x = ( x * 3 ) / 4 ; tv.scrollTo ( x , 0 ) ; if ( x == 0 ) { tv.setEllipsize ( TruncateAt.END ) ; } else { android.os.Message newmsg = obtainMessage ( 0 , tv ) ; mLabelScroller.sendMessageDelayed ( newmsg , 15 ) ; } }

Target:
public void handleMessage ( android.os.Message msg ) { com.android.music.TextView tv = ( ( com.android.music.TextView ) ( msg.obj ) ) ; int x = tv.getScrollX ( ) ; x = ( x * 3 ) / 4 ; tv.scrollTo ( x , 0 ) ; if ( x == 0 ) { tv.setEllipsize ( TruncateAt.END ) ; } else { android.os.Message newmsg = obtainMessage ( 0 , tv ) ; mLabelScroller.sendMessageDelayed ( newmsg , 15 ) ; } }
Source:
public void test_sendLjava_net_DatagramPacket2 ( ) throws java.io.IOException { int udp_port = 20000 ; int send_port = 23000 ; java.net.DatagramSocket udpSocket = new java.net.DatagramSocket ( udp_port ) ; byte [ ] data = new byte [ ] { 65 } ; java.net.DatagramPacket sendPacket = new java.net.DatagramPacket ( data , data.length , null , send_port ) ; try { udpSocket.send ( sendPacket ) ; fail ( "Should throw SocketException" ) ; } catch ( java.lang.NullPointerException e ) { } finally { udpSocket.close ( ) ; } }

Target:
public void test_sendLjava_net_DatagramPacket_nullDestination ( ) throws java.io.IOException { java.net.DatagramSocket datagramSocket = new java.net.DatagramSocket ( 0 ) ; byte [ ] data = new byte [ ] { 65 } ; java.net.DatagramPacket sendPacket = new java.net.DatagramPacket ( data , data.length , null , 25000 ) ; try { datagramSocket.send ( sendPacket ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } finally { datagramSocket.close ( ) ; } }
Source:
public void setProfiler ( android.app.ProfilerInfo profilerInfo ) { android.os.ParcelFileDescriptor fd = profilerInfo.profileFd ; if ( profiling ) { if ( fd != null ) { try { fd.close ( ) ; } catch ( java.io.IOException e ) { } } return ; } if ( ( profileFd ) != null ) { try { profileFd.close ( ) ; } catch ( java.io.IOException e ) { } } profileFile = profilerInfo.profileFile ; profileFd = fd ; samplingInterval = profilerInfo.samplingInterval ; autoStopProfiler = profilerInfo.autoStopProfiler ; }

Target:
public void setProfiler ( android.app.ProfilerInfo profilerInfo ) { android.os.ParcelFileDescriptor fd = profilerInfo.profileFd ; if ( profiling ) { if ( fd != null ) { try { fd.close ( ) ; } catch ( java.io.IOException e ) { } } return ; } if ( ( profileFd ) != null ) { try { profileFd.close ( ) ; } catch ( java.io.IOException e ) { } } profileFile = profilerInfo.profileFile ; profileFd = fd ; samplingInterval = profilerInfo.samplingInterval ; autoStopProfiler = profilerInfo.autoStopProfiler ; streamingOutput = profilerInfo.streamingOutput ; }
Source:
public boolean setNetworkRSSIStats ( int networkId , int numUserTriggeredWifiDisableLowRSSI , int numUserTriggeredWifiDisableBadRSSI , int numUserTriggeredWifiDisableNotHighRSSI , int numTicksAtLowRSSI , int numTicksAtBadRSSI , int numTicksAtNotHighRSSI ) { android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.numUserTriggeredWifiDisableLowRSSI = numUserTriggeredWifiDisableLowRSSI ; config.numUserTriggeredWifiDisableBadRSSI = numUserTriggeredWifiDisableBadRSSI ; config.numUserTriggeredWifiDisableNotHighRSSI = numUserTriggeredWifiDisableNotHighRSSI ; config.numTicksAtLowRSSI = numTicksAtLowRSSI ; config.numTicksAtBadRSSI = numTicksAtBadRSSI ; config.numTicksAtNotHighRSSI = numTicksAtNotHighRSSI ; return true ; }

Target:
private void loadInternalData ( java.util.List < android.net.wifi.WifiConfiguration > sharedConfigurations , java.util.List < android.net.wifi.WifiConfiguration > userConfigurations , java.util.Set < java.lang.String > deletedEphemeralSSIDs ) { clearInternalData ( ) ; loadInternalDataFromSharedStore ( sharedConfigurations ) ; loadInternalDataFromUserStore ( userConfigurations , deletedEphemeralSSIDs ) ; if ( ( mConfiguredNetworks.sizeForAllUsers ( ) ) == 0 ) { android.util.Log.w ( com.android.server.wifi.WifiConfigManager.TAG , "No stored networks found." ) ; } sendConfiguredNetworksChangedBroadcast ( ) ; }
Source:
public java.lang.String getAttributeValue ( java.lang.String attrXmlName ) { java.util.HashMap < com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor , com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode > attributeMap = getInternalUiAttributes ( ) ; for ( java.util.Map.Entry < com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor , com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode > entry : attributeMap.entrySet ( ) ) { com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor ui_desc = entry.getKey ( ) ; if ( ui_desc.getXmlLocalName ( ) . equals ( attrXmlName ) ) { com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode ui_attr = entry.getValue ( ) ; return ui_attr.getCurrentValue ( ) ; } } return null ; }

Target:
public java.lang.String getAttributeValue ( java.lang.String attrXmlName ) { java.util.HashMap < com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor , com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode > attributeMap = getInternalUiAttributes ( ) ; for ( java.util.Map.Entry < com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor , com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode > entry : attributeMap.entrySet ( ) ) { com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor uiDesc = entry.getKey ( ) ; if ( uiDesc.getXmlLocalName ( ) . equals ( attrXmlName ) ) { com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode uiAttr = entry.getValue ( ) ; return uiAttr.getCurrentValue ( ) ; } } return null ; }
Source:
public final java.lang.CharSequence subSequence ( int start , int end ) { checkStartEndRemaining ( start , end ) ; java.nio.CharBuffer result = duplicate ( ) ; result.limit ( ( ( position ) + end ) ) ; result.position ( ( ( position ) + start ) ) ; return result ; }

Target:
public java.nio.CharBuffer duplicate ( ) { return java.nio.CharArrayBuffer.copy ( this , mark , isReadOnly ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.io.File dexDir = java.io.File.createTempFile ( "dexDir" , "" ) ; assertTrue ( dexDir.delete ( ) ) ; assertTrue ( dexDir.mkdirs ( ) ) ; classesWithMetadataClassLoader = libcore.java.lang.reflect.ParameterTest.createClassLoaderForDexResource ( dexDir , "parameter_metadata_test_classes.dex" ) ; metadataVariationsClassLoader = libcore.java.lang.reflect.ParameterTest.createClassLoaderForDexResource ( dexDir , "metadata_variations.dex" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.io.File tempDir = java.io.File.createTempFile ( "tempDir" , "" ) ; assertTrue ( tempDir.delete ( ) ) ; assertTrue ( tempDir.mkdirs ( ) ) ; classesWithMetadataClassLoader = libcore.java.lang.reflect.ParameterTest.createClassLoaderForResource ( tempDir , "parameter-metadata-test.jar" ) ; java.lang.String metadataVariationsResourcePath = "libcore/java/lang/reflect/parameter/metadata_variations.dex" ; metadataVariationsClassLoader = libcore.java.lang.reflect.ParameterTest.createClassLoaderForResource ( tempDir , metadataVariationsResourcePath ) ; }
Source:
void test ( ) { if ( ( status ) == ( READY ) ) { com.android.cts.verifier.notifications.MockListener.MockListener.requestRebind ( MockListener.COMPONENT_NAME ) ; status = RETEST ; } else { com.android.cts.verifier.notifications.MockListener.MockListener.probeListenerStatus ( mContext , new com.android.cts.verifier.notifications.MockListener.MockListener.StatusCatcher ( ) { @ java.lang.Override public void accept ( int result ) { if ( result == ( android.app.Activity.RESULT_OK ) ) { status = PASS ; next ( ) ; } else { logFail ( ) ; status = RETEST ; delay ( ) ; } } } ) ; } delay ( ) ; }

Target:
void test ( ) { if ( ( status ) == ( READY ) ) { com.android.cts.verifier.notifications.MockListener.MockListener.requestRebind ( MockListener.COMPONENT_NAME ) ; status = RETEST ; } else { if ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . isConnected ) { status = PASS ; next ( ) ; } else { if ( ( -- ( mRetries ) ) > 0 ) { status = RETEST ; next ( ) ; } else { logFail ( ) ; status = FAIL ; } } } }
Source:
private static com.android.jack.shrob.proguard.ProguardParser createParserFromFile ( @ javax.annotation.Nonnull java.io.File file ) { try { com.android.jack.shrob.proguard.ProguardParser parser = com.android.jack.shrob.proguard.GrammarActions.createParserCommon ( new org.antlr.runtime.ANTLRFileStream ( file.getPath ( ) ) ) ; return parser ; } catch ( java.io.IOException e ) { com.android.jack.shrob.proguard.GrammarActions.logger.log ( java.util.logging.Level.SEVERE , "Error while creating parser for file {0}" , file.getPath ( ) ) ; } return null ; }

Target:
private static com.android.jack.shrob.proguard.ProguardParser createParserFromFile ( @ javax.annotation.Nonnull java.io.File file ) throws com.android.jack.shrob.proguard.ProguardFileParsingException { try { com.android.sched.util.file.AbstractStreamFile.check ( file , new com.android.sched.util.location.FileLocation ( file.getPath ( ) ) ) ; com.android.jack.shrob.proguard.ProguardParser parser = com.android.jack.shrob.proguard.GrammarActions.createParserCommon ( new org.antlr.runtime.ANTLRFileStream ( file.getPath ( ) ) ) ; return parser ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.shrob.proguard.ProguardFileParsingException ( e ) ; } catch ( com.android.sched.util.file.NotFileException e ) { throw new com.android.jack.shrob.proguard.ProguardFileParsingException ( e ) ; } catch ( java.io.IOException e ) { throw new com.android.jack.shrob.proguard.ProguardFileParsingException ( e ) ; } }
Source:
public java.lang.String [ ] getForbiddenPlmns ( int subId , int appType ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getForbiddenPlmns ( subId , appType ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String [ ] getForbiddenPlmns ( int subId , int appType ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; return telephony.getForbiddenPlmns ( subId , appType ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
synchronized boolean unplug ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "unplug(): device=" + device ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return unplugNative ( ) ; }

Target:
synchronized boolean unplug ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "unplug(): device=" + device ) ) ; } return ( ( checkDevice ( device ) ) && ( checkCallingUid ( ) ) ) && ( mHidDeviceNativeInterface.unplug ( ) ) ; }
Source:
public void testSubList3_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.subList ( 3 , 1 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testSubList3_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.subList ( ( ( list.size ( ) ) - 1 ) , 1 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public org.junit.runners.model.Statement apply ( org.junit.runners.model.Statement base , org.junit.runner.Description description ) { if ( ( description.getAnnotation ( libcore.junit.util.ResourceLeakageDetector.DisableResourceLeakageDetection.class ) ) != null ) { return base ; } else { return leakageDetectorRule.apply ( base , description ) ; } }

Target:
public org.junit.runners.model.Statement apply ( org.junit.runners.model.Statement base , org.junit.runner.Description description ) { if ( ( description.getAnnotation ( libcore.junit.util.ResourceLeakageDetector.DisableResourceLeakageDetection.class ) ) != null ) { leakageDetectionEnabledForTest = false ; return base ; } else { leakageDetectionEnabledForTest = true ; return leakageDetectorRule.apply ( base , description ) ; } }
Source:
public com.android.sched.vfs.InputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { typePath.addSuffix ( fileType.getFileExtension ( ) ) ; return libraryVDir.getInputVFile ( typePath ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.VPath clonedPath = typePath.clone ( ) ; clonedPath.addSuffix ( fileType.getFileExtension ( ) ) ; return libraryVDir.getInputVFile ( clonedPath ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public boolean shouldApply ( java.io.File toDir , java.util.Map < java.lang.String , com.intellij.updater.ValidationResult.Option > options ) { com.intellij.updater.ValidationResult.Option option = options.get ( myPath ) ; if ( ( option == ( ValidationResult.Option.KEEP ) ) || ( option == ( ValidationResult.Option.IGNORE ) ) ) return false ; return shouldApplyOn ( getFile ( toDir ) ) ; }

Target:
public boolean shouldApply ( java.io.File toDir , java.util.Map < java.lang.String , com.intellij.updater.ValidationResult.Option > options ) { java.io.File file = getFile ( toDir ) ; com.intellij.updater.ValidationResult.Option option = options.get ( myPath ) ; if ( ( option == ( ValidationResult.Option.KEEP ) ) || ( option == ( ValidationResult.Option.IGNORE ) ) ) return false ; if ( option == ( ValidationResult.Option.KILL_PROCESS ) ) { for ( com.intellij.updater.NativeFileManager.Process process : com.intellij.updater.NativeFileManager.getProcessesUsing ( file ) ) { process.terminate ( ) ; } } return shouldApplyOn ( file ) ; }
Source:
void dispatchMediaKeyWithWakeLockToAudioService ( android.view.KeyEvent event ) { if ( android.app.ActivityManagerNative.isSystemReady ( ) ) { android.media.IAudioService audioService = com.android.internal.policy.impl.PhoneWindowManager.getAudioService ( ) ; if ( audioService != null ) { try { audioService.dispatchMediaKeyEventUnderWakelock ( event ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.internal.policy.impl.PhoneWindowManager.TAG , ( "dispatchMediaKeyEvent threw exception " + e ) ) ; } } } }

Target:
private void toggleRecentApps ( ) { mPreloadedRecentApps = false ; try { com.android.internal.statusbar.IStatusBarService statusbar = getStatusBarService ( ) ; if ( statusbar != null ) { statusbar.toggleRecentApps ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Slog.e ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "RemoteException when toggling recent apps" , e ) ; mStatusBarService = null ; } }
Source:
public final void updateAAD ( byte [ ] input ) { if ( input == null ) { throw new java.lang.IllegalArgumentException ( "input == null" ) ; } if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( ( input.length ) == 0 ) { return ; } spiImpl.engineUpdateAAD ( input , 0 , input.length ) ; }

Target:
public final byte [ ] update ( byte [ ] input ) { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == null ) { throw new java.lang.IllegalArgumentException ( "input == null" ) ; } if ( ( input.length ) == 0 ) { return null ; } return getSpi ( ) . engineUpdate ( input , 0 , input.length ) ; }
Source:
private void validateType ( com.google.gct.testing.dimension.CloudTestingType type ) { if ( ! ( getSupportedDomain ( ) . contains ( type ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( "Type " + type ) + " is not supported in domain: " ) + ( getSupportedDomain ( ) ) ) ) ; } }

Target:
public void setEnabled ( com.google.gct.testing.dimension.CloudTestingType type , boolean isEnabled ) { if ( ! ( getSupportedDomain ( ) . contains ( type ) ) ) { return ; } checkIsEditable ( ) ; if ( isEnabled ) { enableType ( type ) ; } else { enabledTypes.remove ( type ) ; } }
Source:
public com.android.ide.common.layoutlib.LayoutLibrary getLayoutLibrary ( ) { com.android.sdklib.IAndroidTarget target = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTarget ( mEditedFile.getProject ( ) ) ; if ( target != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTargetData ( target ) ; if ( data != null ) { return data.getLayoutLibrary ( ) ; } } return null ; }

Target:
public com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources getFrameworkResources ( com.android.sdklib.IAndroidTarget target ) { if ( target != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTargetData ( target ) ; if ( data != null ) { return data.getFrameworkResources ( ) ; } } return null ; }
Source:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > allAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return new com.google.common.util.concurrent.Futures.ListFuture < V > ( com.google.common.collect.ImmutableList.copyOf ( futures ) , true , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > allAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return com.google.common.util.concurrent.Futures.listFuture ( com.google.common.collect.ImmutableList.copyOf ( futures ) , true , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; }
Source:
public com.android.ide.common.api.Margins getInsets ( java.lang.String fqcn ) { if ( com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository.INSETS_SUPPORTED ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite configComposite = mEditorDelegate.getGraphicalEditor ( ) . getConfigurationComposite ( ) ; java.lang.String theme = configComposite.getThemeName ( ) ; com.android.resources.Density density = configComposite.getDensity ( ) ; return com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository.getInsets ( fqcn , density , theme ) ; } else { return null ; } }

Target:
public com.android.ide.common.api.Margins getInsets ( java.lang.String fqcn ) { if ( com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository.INSETS_SUPPORTED ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationChooser configComposite = mEditorDelegate.getGraphicalEditor ( ) . getConfigurationChooser ( ) ; java.lang.String theme = configComposite.getThemeName ( ) ; com.android.resources.Density density = configComposite.getConfiguration ( ) . getDensity ( ) ; return com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository.getInsets ( fqcn , density , theme ) ; } else { return null ; } }
Source:
public void run ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.InterruptedException , java.lang.reflect.InvocationTargetException { com.android.uiautomator.UiAutomatorHelper.UiAutomatorResult result = null ; try { result = com.android.uiautomator.UiAutomatorHelper.takeSnapshot ( device , monitor ) ; } catch ( com.android.uiautomator.UiAutomatorHelper.UiAutomatorException e ) { monitor.done ( ) ; showError ( e.getMessage ( ) , e ) ; return ; } mViewer.setModel ( result.model , result.uiHierarchy , result.screenshot ) ; monitor.done ( ) ; }

Target:
public void run ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.InterruptedException , java.lang.reflect.InvocationTargetException { com.android.uiautomator.UiAutomatorHelper.UiAutomatorResult result = null ; try { result = com.android.uiautomator.UiAutomatorHelper.takeSnapshot ( device , monitor , mCompressed ) ; } catch ( com.android.uiautomator.UiAutomatorHelper.UiAutomatorException e ) { monitor.done ( ) ; showError ( e.getMessage ( ) , e ) ; return ; } mViewer.setModel ( result.model , result.uiHierarchy , result.screenshot ) ; monitor.done ( ) ; }
Source:
public void testOpenOverflowInActionMode ( ) { android.support.test.espresso.Espresso.onData ( org.hamcrest.Matchers.allOf ( org.hamcrest.Matchers.instanceOf ( java.util.Map.class ) , org.hamcrest.Matchers.hasValue ( android.support.test.testapp.ActionBarTestActivity.class . getSimpleName ( ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; android.support.test.espresso.Espresso.openContextualActionModeOverflowMenu ( ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Key" ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.text_action_bar_result ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Key" ) ) ) ; }

Target:
public void openOverflowInActionMode ( ) { android.support.test.espresso.Espresso.onData ( org.hamcrest.Matchers.allOf ( org.hamcrest.Matchers.instanceOf ( java.util.Map.class ) , org.hamcrest.Matchers.hasValue ( android.support.test.testapp.ActionBarTestActivity.class . getSimpleName ( ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; android.support.test.espresso.Espresso.openContextualActionModeOverflowMenu ( ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Key" ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.text_action_bar_result ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Key" ) ) ) ; }
Source:
private void onAudioStateChanged ( int state , byte [ ] address ) { com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent event = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EVENT_TYPE_AUDIO_STATE_CHANGED ) ; event.valueInt = state ; event.device = getDevice ( address ) ; android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "incoming" + event ) ) ; sendMessage ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.STACK_EVENT , event ) ; }

Target:
private void onAudioStateChanged ( int state , byte [ ] address ) { com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent event = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EVENT_TYPE_AUDIO_STATE_CHANGED ) ; event.valueInt = state ; event.device = getDevice ( address ) ; if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "incoming" + event ) ) ; } sendMessage ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.STACK_EVENT , event ) ; }
Source:
private void removeNetworkAndVerifySuccess ( ) throws java.lang.Exception { when ( mWifiNative.removeNetwork ( 0 ) ) . thenReturn ( true ) ; mLooper.startAutoDispatch ( ) ; org.junit.Assert.assertTrue ( mWsm.syncRemoveNetwork ( mWsmAsyncChannel , 0 ) ) ; mLooper.stopAutoDispatch ( ) ; mLooper.startAutoDispatch ( ) ; org.junit.Assert.assertTrue ( mWsm.syncGetConfiguredNetworks ( ( - 1 ) , mWsmAsyncChannel ) . isEmpty ( ) ) ; mLooper.stopAutoDispatch ( ) ; }

Target:
public void setHasEverConnectedTrueOnConnect ( ) throws java.lang.Exception { connect ( ) ; verify ( mWifiConfigManager , atLeastOnce ( ) ) . updateNetworkAfterConnect ( 0 ) ; }
Source:
private void maybeShowManageConferenceCallButton ( ) { if ( ( mPrimary ) == null ) { getUi ( ) . showManageConferenceCallButton ( false ) ; return ; } final boolean canManageConference = mPrimary.can ( PhoneCapabilities.MANAGE_CONFERENCE ) ; getUi ( ) . showManageConferenceCallButton ( ( ( mPrimary.isConferenceCall ( ) ) && canManageConference ) ) ; }

Target:
public void onDetailsChanged ( com.android.incallui.Call call , com.android.incallui.Call.Details details ) { updatePrimaryCallState ( ) ; if ( ( call.can ( PhoneCapabilities.MANAGE_CONFERENCE ) ) != ( android.telecom.PhoneCapabilities.can ( details.getCallCapabilities ( ) , PhoneCapabilities.MANAGE_CONFERENCE ) ) ) { maybeShowManageConferenceCallButton ( ) ; } }
Source:
private void updateHoverRegion ( int x , int y ) { x = imageXCoordinate ( x ) ; y = imageYCoordinate ( y ) ; com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo verticalUpdateRegion = findVerticalPatch ( x , y ) ; com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo horizontalUpdateRegion = findHorizontalPatch ( x , y ) ; computeHighlightRegions ( verticalUpdateRegion , horizontalUpdateRegion ) ; java.awt.Cursor c = getCursor ( x , y , verticalUpdateRegion , horizontalUpdateRegion ) ; setCursor ( c ) ; }

Target:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo findVerticalPatch ( int x , int y ) { java.util.List < com.android.draw9patch.ui.Pair < java.lang.Integer > > markers ; com.android.draw9patch.ui.ImageViewer.UpdateRegion region ; if ( x < ( ( image.getWidth ( ) ) / 2 ) ) { markers = patchInfo.verticalPatchMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.LEFT_PATCH ; } else { markers = patchInfo.verticalPaddingMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.RIGHT_PADDING ; } return getContainingPatch ( markers , y , region ) ; }
Source:
public void expandAll ( ) { mTreeViewer.expandAll ( ) ; }

Target:
public void expandAll ( ) { mTreeViewer.expandAll ( ) ; if ( ( mExpandedIds ) == null ) { mExpandedIds = new java.util.HashSet < java.lang.String > ( ) ; } org.eclipse.core.resources.IMarker [ ] topMarkers = mContentProvider.getTopMarkers ( ) ; if ( topMarkers != null ) { for ( org.eclipse.core.resources.IMarker marker : topMarkers ) { java.lang.String id = com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.getId ( marker ) ; if ( id != null ) { mExpandedIds.add ( id ) ; } } } }
Source:
protected void readResponse ( java.io.InputStream stream ) throws java.io.IOException { android.util.Log.v ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.TAG , "readResponse" ) ; mResponse = new android.bluetooth.client.pbap.BluetoothPbapVcardList ( stream , mFormat ) ; }

Target:
protected void readResponse ( java.io.InputStream stream ) throws java.io.IOException { android.util.Log.v ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.TAG , "readResponse" ) ; mResponse = new android.bluetooth.client.pbap.BluetoothPbapVcardList ( stream , mFormat ) ; if ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.DBG ) { android.util.Log.d ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.TAG , ( ( "Read " + ( mResponse.getCount ( ) ) ) + " entries." ) ) ; } }
Source:
public com.android.build.gradle.tasks.List < com.android.build.gradle.tasks.File > getOutputFiles ( ) { getOutputSplitFiles ( ) . getOutputFile ( ) ; }

Target:
public java.util.List < java.io.File > getOutputFiles ( ) { com.google.common.collect.ImmutableList.Builder < java.io.File > builder = com.google.common.collect.ImmutableList.builder ( ) ; for ( com.android.build.gradle.api.ApkOutputFile apk : getOutputSplitFiles ( ) ) { builder.add ( apk.getOutputFile ( ) ) ; } return builder.build ( ) ; }
Source:
private static boolean isFollowedByCasedLetter ( java.lang.CharSequence s , int i ) { while ( i < ( s.length ( ) ) ) { int c = java.lang.Character.codePointAt ( s , i ) ; int type = UCaseProps.INSTANCE.getTypeOrIgnorable ( c ) ; if ( ( type & ( UCaseProps.IGNORABLE ) ) != 0 ) { } else if ( type != ( UCaseProps.NONE ) ) { return true ; } else { return false ; } } return false ; }

Target:
private static boolean isFollowedByCasedLetter ( java.lang.CharSequence s , int i ) { while ( i < ( s.length ( ) ) ) { int c = java.lang.Character.codePointAt ( s , i ) ; int type = UCaseProps.INSTANCE.getTypeOrIgnorable ( c ) ; if ( ( type & ( UCaseProps.IGNORABLE ) ) != 0 ) { i += java.lang.Character.charCount ( c ) ; } else if ( type != ( UCaseProps.NONE ) ) { return true ; } else { return false ; } } return false ; }
Source:
public void onPermissionSummaryResult ( int [ ] counts , java.lang.CharSequence [ ] groupLabels ) { if ( ( getActivity ( ) ) == null ) { return ; } mPermissionReceiver = null ; if ( counts != null ) { mAppPermsPreference.setSummary ( getContext ( ) . getString ( R.string.app_permissions_summary , counts [ 0 ] , counts [ 1 ] ) ) ; } else { mAppPermsPreference.setSummary ( null ) ; } }

Target:
public void onAppWithPermissionsCountsResult ( int standardGrantedPermissionAppCount , int standardUsedPermissionAppCount ) { if ( ( getActivity ( ) ) == null ) { return ; } mPermissionReceiver = null ; if ( standardUsedPermissionAppCount != 0 ) { mAppPermsPreference.setSummary ( getContext ( ) . getString ( R.string.app_permissions_summary , standardGrantedPermissionAppCount , standardUsedPermissionAppCount ) ) ; } else { mAppPermsPreference.setSummary ( null ) ; } }
Source:
private void addInternalVolume ( ) { final android.os.storage.VolumeInfo internal = new android.os.storage.VolumeInfo ( android.os.storage.VolumeInfo.ID_PRIVATE_INTERNAL , android.os.storage.VolumeInfo.TYPE_PRIVATE , null , null ) ; internal.state = android.os.storage.VolumeInfo.STATE_MOUNTED ; internal.path = android.os.Environment.getDataDirectory ( ) . getAbsolutePath ( ) ; mVolumes.put ( internal.id , internal ) ; }

Target:
private void addInternalVolumeLocked ( ) { final android.os.storage.VolumeInfo internal = new android.os.storage.VolumeInfo ( android.os.storage.VolumeInfo.ID_PRIVATE_INTERNAL , android.os.storage.VolumeInfo.TYPE_PRIVATE , null , null ) ; internal.state = android.os.storage.VolumeInfo.STATE_MOUNTED ; internal.path = android.os.Environment.getDataDirectory ( ) . getAbsolutePath ( ) ; mVolumes.put ( internal.id , internal ) ; }
Source:
public static float max ( float a , float b ) { if ( a != a ) return a ; if ( ( ( a == 0.0F ) && ( b == 0.0F ) ) && ( ( java.lang.Float.floatToRawIntBits ( a ) ) == ( java.lang.StrictMath.negativeZeroFloatBits ) ) ) { return b ; } return a >= b ? a : b ; }

Target:
public static float max ( float a , float b ) { return java.lang.Math.max ( a , b ) ; }
Source:
final void init ( android.content.res.Resources resources , android.app.ActivityThread mainThread , android.os.UserHandle user ) { mPackageInfo = null ; mBasePackageName = null ; mResources = resources ; mMainThread = mainThread ; mContentResolver = new android.app.ContextImpl.ApplicationContentResolver ( this , mainThread , user ) ; mUser = user ; }

Target:
final void init ( android.content.res.Resources resources , android.app.ActivityThread mainThread , android.os.UserHandle user ) { mPackageInfo = null ; mBasePackageName = null ; mOpPackageName = null ; mResources = resources ; mMainThread = mainThread ; mContentResolver = new android.app.ContextImpl.ApplicationContentResolver ( this , mainThread , user ) ; mUser = user ; }
Source:
public boolean startScreenSaver ( ) { synchronized ( mLock ) { if ( isScreenSaverEnabled ( ) ) { android.service.dreams.IDreamManager dm = getDreamManager ( ) ; if ( dm == null ) return false ; try { if ( com.android.internal.policy.impl.PhoneWindowManager.localLOGV ) android.util.Log.v ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "startScreenSaver: entering dreamland..." ) ; dm.dream ( ) ; return true ; } catch ( android.os.RemoteException ex ) { } } } return false ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( Intent.ACTION_USER_SWITCHED.equals ( intent.getAction ( ) ) ) { mSettingsObserver.onChange ( false ) ; synchronized ( mLock ) { mLastSystemUiFlags = 0 ; updateSystemUiVisibilityLw ( ) ; } } }
Source:
public android.content.ComponentName getDefaultPhoneApp ( ) { try { com.android.server.telecom.Log.startSession ( "TSI.gDPA" ) ; android.content.res.Resources resources = mContext.getResources ( ) ; return new android.content.ComponentName ( resources.getString ( R.string.ui_default_package ) , resources.getString ( R.string.dialer_default_class ) ) ; } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public android.content.ComponentName getDefaultPhoneApp ( ) { try { android.telecom.Log.startSession ( "TSI.gDPA" ) ; android.content.res.Resources resources = mContext.getResources ( ) ; return new android.content.ComponentName ( resources.getString ( R.string.ui_default_package ) , resources.getString ( R.string.dialer_default_class ) ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
static void mapping ( @ javax.annotation.Nonnull com.android.jack.shrob.spec.Flags flags , java.lang.String baseDir , java.lang.String mappingFilename ) { assert mappingFilename != null ; assert baseDir != null ; java.io.File mappingFile = com.android.jack.shrob.proguard.GrammarActions.getFileFromBaseDir ( baseDir , mappingFilename ) ; if ( ! ( mappingFile.exists ( ) ) ) { com.android.jack.shrob.proguard.GrammarActions.logger.log ( java.util.logging.Level.WARNING , "Mapping file {0} not found" , mappingFile.getAbsolutePath ( ) ) ; } else { flags.setObfuscationMapping ( mappingFile ) ; } }

Target:
static void mapping ( @ javax.annotation.Nonnull com.android.jack.shrob.spec.Flags flags , java.lang.String baseDir , java.lang.String mappingFilename ) { assert mappingFilename != null ; assert baseDir != null ; java.io.File mappingFile = com.android.jack.shrob.proguard.GrammarActions.getFileFromBaseDir ( baseDir , mappingFilename ) ; if ( ! ( mappingFile.exists ( ) ) ) { com.android.jack.shrob.proguard.GrammarActions.logger.log ( java.util.logging.Level.WARNING , "Mapping file {0} not found" , mappingFile.getPath ( ) ) ; } else { flags.setObfuscationMapping ( mappingFile ) ; } }
Source:
private static libcore.tzdata.update2.tools.TimeZoneBundleBuilder createValidTimeZoneBundleBuilder ( java.lang.String rulesVersion , java.lang.String androidRevision ) throws java.lang.Exception { byte [ ] bionicTzData = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTzData ( rulesVersion ) ; byte [ ] icuData = new byte [ ] { 'a' } ; return new libcore.tzdata.update2.tools.TimeZoneBundleBuilder ( ) . setRulesVersion ( rulesVersion ) . setAndroidRevision ( androidRevision ) . setTzData ( bionicTzData ) . setIcuData ( icuData ) ; }

Target:
private static libcore.tzdata.update2.tools.TimeZoneBundleBuilder createValidTimeZoneBundleBuilder ( java.lang.String rulesVersion , int revision ) throws java.lang.Exception { byte [ ] bionicTzData = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTzData ( rulesVersion ) ; byte [ ] icuData = new byte [ ] { 'a' } ; libcore.tzdata.update2.BundleVersion bundleVersion = new libcore.tzdata.update2.BundleVersion ( BundleVersion.CURRENT_FORMAT_MAJOR_VERSION , BundleVersion.CURRENT_FORMAT_MINOR_VERSION , rulesVersion , revision ) ; return new libcore.tzdata.update2.tools.TimeZoneBundleBuilder ( ) . setBundleVersion ( bundleVersion ) . setTzData ( bionicTzData ) . setIcuData ( icuData ) ; }
Source:
private static long sqrtFloor ( long x ) { long sqrt0 = ( ( long ) ( java.lang.Math.sqrt ( x ) ) ) ; long sqrt1 = ( sqrt0 + ( x / sqrt0 ) ) > > 1 ; if ( sqrt1 == sqrt0 ) { return sqrt0 ; } do { sqrt0 = sqrt1 ; sqrt1 = ( sqrt0 + ( x / sqrt0 ) ) > > 1 ; } while ( sqrt1 < sqrt0 ) ; return sqrt0 ; }

Target:
static int lessThanBranchFree ( long x , long y ) { return ( ( int ) ( ( ~ ( ~ ( x - y ) ) ) > > > ( ( java.lang.Long.SIZE ) - 1 ) ) ) ; }
Source:
private boolean handleReportAudioStatus ( com.android.server.hdmi.HdmiCecMessage cmd ) { byte [ ] params = cmd.getParams ( ) ; boolean mute = ( ( params [ 0 ] ) & 128 ) == 128 ; int volume = ( params [ 0 ] ) & 127 ; mLastAvrVolume = volume ; mLastAvrMute = mute ; if ( shouldUpdateAudioVolume ( mute ) ) { com.android.server.hdmi.HdmiLogger.debug ( "Force volume change[mute:%b, volume=%d]" , mute , volume ) ; tv ( ) . setAudioStatus ( mute , volume ) ; mLastAvrVolume = com.android.server.hdmi.VolumeControlAction.UNKNOWN_AVR_VOLUME ; mLastAvrMute = false ; } return true ; }

Target:
private boolean handleReportAudioStatus ( com.android.server.hdmi.HdmiCecMessage cmd ) { byte [ ] params = cmd.getParams ( ) ; boolean mute = com.android.server.hdmi.HdmiUtils.isAudioStatusMute ( cmd ) ; int volume = com.android.server.hdmi.HdmiUtils.getAudioStatusVolume ( cmd ) ; mLastAvrVolume = volume ; mLastAvrMute = mute ; if ( shouldUpdateAudioVolume ( mute ) ) { com.android.server.hdmi.HdmiLogger.debug ( "Force volume change[mute:%b, volume=%d]" , mute , volume ) ; tv ( ) . setAudioStatus ( mute , volume ) ; mLastAvrVolume = com.android.server.hdmi.VolumeControlAction.UNKNOWN_AVR_VOLUME ; mLastAvrMute = false ; } return true ; }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { java.io.DataInputStream stream = new java.io.DataInputStream ( new java.io.ByteArrayInputStream ( data ) ) ; com.android.tools.perflib.heap.ClassObj clazz = instance.getClassObj ( ) ; while ( clazz != null ) { for ( com.android.tools.perflib.heap.Field field : clazz.getFields ( ) ) { instance.addField ( field , readValue ( stream , instance , field.getType ( ) ) ) ; } clazz = clazz.getSuperClassObj ( ) ; } return null ; }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { com.android.tools.perflib.heap.ClassObj clazz = instance.getClassObj ( ) ; mInput.setPosition ( position ) ; while ( clazz != null ) { for ( com.android.tools.perflib.heap.Field field : clazz.getFields ( ) ) { instance.addField ( field , readValue ( instance , field.getType ( ) ) ) ; } clazz = clazz.getSuperClassObj ( ) ; } return null ; }
Source:
public org.json.JSONArray queryAttributes ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "uri" , description = "The URI, using the content:// scheme, for the content to retrieve." ) java.lang.String uri ) throws org.json.JSONException { org.json.JSONArray result = new org.json.JSONArray ( ) ; android.database.Cursor cursor = mContentResolver.query ( android.net.Uri.parse ( uri ) , null , "1=0" , null , null ) ; if ( cursor != null ) { java.lang.String [ ] names = cursor.getColumnNames ( ) ; for ( java.lang.String name : names ) { result.put ( name ) ; } cursor.close ( ) ; } return result ; }

Target:
public org.json.JSONArray queryAttributes ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "uri" , description = "The URI, using the content:// scheme, for the content to retrieve." ) java.lang.String uri ) throws org.json.JSONException { org.json.JSONArray columns = new org.json.JSONArray ( ) ; android.database.Cursor cursor = mContentResolver.query ( android.net.Uri.parse ( uri ) , null , "1=0" , null , null ) ; if ( cursor != null ) { java.lang.String [ ] names = cursor.getColumnNames ( ) ; for ( java.lang.String name : names ) { columns.put ( name ) ; } cursor.close ( ) ; } return columns ; }
Source:
private boolean isWindowsExecutable ( org.eclipse.core.runtime.IPath commandPath ) { if ( com.android.ide.eclipse.ndk.internal.build.NdkCommandLauncher.WINDOWS_EXE.equalsIgnoreCase ( commandPath.getFileExtension ( ) ) ) { return true ; } java.io.File exeFile = commandPath.addFileExtension ( com.android.ide.eclipse.ndk.internal.build.NdkCommandLauncher.WINDOWS_EXE ) . toFile ( ) ; if ( exeFile.exists ( ) ) { return true ; } return false ; }

Target:
private java.lang.String findWindowsExecutableExtension ( org.eclipse.core.runtime.IPath command ) { for ( java.lang.String e : com.android.ide.eclipse.ndk.internal.build.NdkCommandLauncher.WINDOWS_NATIVE_EXECUTABLES ) { java.io.File exeFile = command.addFileExtension ( e ) . toFile ( ) ; if ( exeFile.exists ( ) ) { return e ; } } return null ; }
Source:
final void get ( long [ ] dst , int dstOffset , int longCount ) { int byteCount = checkGetBounds ( SizeOf.LONG , dst.length , dstOffset , longCount ) ; this . block.peekLongArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , longCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void get ( int [ ] dst , int dstOffset , int intCount ) { int byteCount = checkGetBounds ( SizeOf.INT , dst.length , dstOffset , intCount ) ; this . block.peekIntArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , intCount , order.needsSwap ) ; position += byteCount ; }
Source:
private void waitForFrames ( int numFrameWait ) { if ( numFrameWait < 0 ) { throw new java.lang.IllegalArgumentException ( ( ( "numFrameWait " + numFrameWait ) + " should be non-negative" ) ) ; } if ( numFrameWait == 0 ) { waitForNumResults ( mZslResultListener , numFrameWait ) ; mCameraZslImageListener.drain ( ) ; } }

Target:
private void closeReaderWriters ( ) { mCameraZslImageListener.drain ( ) ; android.hardware.camera2.cts.CameraTestUtils.closeImageReader ( mCameraZslReader ) ; mCameraZslReader = null ; mJpegListener.drain ( ) ; android.hardware.camera2.cts.CameraTestUtils.closeImageReader ( mJpegReader ) ; mJpegReader = null ; android.hardware.camera2.cts.CameraTestUtils.closeImageWriter ( mWriter ) ; mWriter = null ; }
Source:
private android.graphics.drawable.Drawable getIcon ( java.util.List < com.android.documentsui.model.DocumentInfo > docs ) { if ( ( docs.size ( ) ) == 1 ) { final com.android.documentsui.model.DocumentInfo doc = docs.get ( 0 ) ; return mIconHelper.getDocumentIcon ( mContext , doc.authority , doc.documentId , doc.mimeType , doc.icon ) ; } return mContext.getDrawable ( R.drawable.ic_doc_generic ) ; }

Target:
private android.graphics.drawable.Drawable getIcon ( java.util.List < com.android.documentsui.model.DocumentInfo > docs ) { if ( ( docs.size ( ) ) == 1 ) { final com.android.documentsui.model.DocumentInfo doc = docs.get ( 0 ) ; return mIconHelper.getDocumentIcon ( mContext , doc.authority , doc.documentId , doc.mimeType , doc.icon ) ; } return mContext.getDrawable ( com.android.internal.R.drawable.ic_doc_generic ) ; }
Source:
public void testDismissKeyguard_fromShowWhenLocked_notAllowed ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; executeShellCommand ( "am broadcast -a trigger_broadcast --ez dismissKeyguard true" ) ; assertShowingAndOccluded ( ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; }

Target:
public void testDismissKeyguard_fromShowWhenLocked_notAllowed ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; executeShellCommand ( "am broadcast -a trigger_broadcast --ez dismissKeyguard true" ) ; assertShowingAndOccluded ( ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; }
Source:
public void onFeatureCapabilityChanged ( int serviceClass , int [ ] enabledFeatures , int [ ] disabledFeatures ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( "onFeatureCapabilityChanged" ) ; com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.argi1 = serviceClass ; args.arg1 = enabledFeatures ; args.arg2 = disabledFeatures ; removeMessages ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_ON_FEATURE_CAPABILITY_CHANGED ) ; obtainMessage ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_ON_FEATURE_CAPABILITY_CHANGED , args ) . sendToTarget ( ) ; }

Target:
public void onCapabilitiesStatusChanged ( android.telephony.ims.feature.ImsFeature.Capabilities config ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onCapabilitiesStatusChanged: " + config ) ) ; com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = config ; removeMessages ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_ON_FEATURE_CAPABILITY_CHANGED ) ; obtainMessage ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_ON_FEATURE_CAPABILITY_CHANGED , args ) . sendToTarget ( ) ; }