auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void transformAnnotationDirectories ( com.android.dx.io.DexBuffer in , com.android.dx.merge.IndexMap indexMap ) { com.android.dx.dex.TableOfContents.Section section = in.getTableOfContents ( ) . annotationsDirectories ; if ( section.exists ( ) ) { com.android.dx.io.DexBuffer.Section directoryIn = in.open ( section.off ) ; for ( int i = 0 ; i < ( section.size ) ; i ++ ) { transformAnnotationDirectory ( directoryIn , indexMap ) ; } } }

Target:
private void transformAnnotationDirectories ( com.android.dex.Dex in , com.android.dx.merge.IndexMap indexMap ) { com.android.dex.TableOfContents.Section section = in.getTableOfContents ( ) . annotationsDirectories ; if ( section.exists ( ) ) { com.android.dex.Dex.Section directoryIn = in.open ( section.off ) ; for ( int i = 0 ; i < ( section.size ) ; i ++ ) { transformAnnotationDirectory ( directoryIn , indexMap ) ; } } }
Source:
public synchronized void printStackTrace ( java.lang.Throwable receiver , java.io.PrintWriter writer ) { receiver.printStackTrace ( writer ) ; for ( java.lang.Throwable suppressed : getSuppressed ( receiver ) ) { writer.print ( com.google.devtools.build.android.desugar.runtime.ThrowableExtension.MimicDesugaringStrategy.SUPPRESSED_PREFIX ) ; suppressed.printStackTrace ( writer ) ; } }

Target:
public void printStackTrace ( java.lang.Throwable receiver , java.io.PrintWriter writer ) { receiver.printStackTrace ( writer ) ; java.util.List < java.lang.Throwable > suppressedList = map.get ( receiver , false ) ; if ( suppressedList == null ) { return ; } synchronized ( suppressedList ) { for ( java.lang.Throwable suppressed : suppressedList ) { writer.print ( com.google.devtools.build.android.desugar.runtime.ThrowableExtension.MimicDesugaringStrategy.SUPPRESSED_PREFIX ) ; suppressed.printStackTrace ( writer ) ; } } }
Source:
public void testStageInstallWithErrorCode_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { com.android.timezone.distro.DistroVersion validDistroVersion = new com.android.timezone.distro.DistroVersion ( 1 , 1 , com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRulesVersionBytes = validDistroVersion.toBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; com.android.timezone.distro.TimeZoneDistro distro = createTimeZoneDistroWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { byte [ ] invalidRulesVersionBytes = com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . buildUnvalidatedBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; com.android.timezone.distro.TimeZoneDistro distro = createTimeZoneDistroWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public void unregisterListener ( ) { if ( ( mTestSensorEventListener ) == null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "No listener registered, returning." ) ; return ; } mSensorManager.unregisterListener ( mTestSensorEventListener , mSensor ) ; mTestSensorEventListener = null ; }

Target:
public void registerListener ( android.hardware.cts.helpers.TestSensorEventListener listener ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } mTestSensorEventListener = ( listener != null ) ? listener : new android.hardware.cts.helpers.TestSensorEventListener ( ) ; mTestSensorEventListener.setSensorInfo ( mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; java.lang.String message = android.hardware.cts.helpers.SensorCtsHelper.formatAssertionMessage ( mSensor , "registerListener" ) ; boolean result = mSensorManager.registerListener ( mTestSensorEventListener , mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; junit.framework.Assert.assertTrue ( message , result ) ; }
Source:
private android.bluetooth.BluetoothGattDescriptor getDescriptor ( java.util.UUID cuid , java.util.UUID duid ) { android.bluetooth.BluetoothGattDescriptor descriptor = null ; android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( cuid ) ; if ( characteristic != null ) { descriptor = characteristic.getDescriptor ( duid ) ; if ( descriptor == null ) { showMessage ( "Descriptor not found" ) ; } } return descriptor ; }

Target:
private android.bluetooth.BluetoothGattDescriptor getDescriptor ( ) { android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleClientService.CHARACTERISTIC_UUID ) ; if ( characteristic == null ) return null ; android.bluetooth.BluetoothGattDescriptor descriptor = characteristic.getDescriptor ( com.android.cts.verifier.bluetooth.BleClientService.DESCRIPTOR_UUID ) ; if ( descriptor == null ) { showMessage ( "Descriptor not found" ) ; return null ; } return descriptor ; }
Source:
private static java.io.File storeMergedConfigFile ( java.util.Map < java.lang.String , java.util.List < java.lang.String > > configMap , java.lang.String moduleName ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { HEAD ( 9.0 ) ; }

Target:
private static java.io.File storeMergedConfigFile ( java.util.Map < java.lang.String , java.util.List < java.lang.String > > configMap , java.lang.String moduleName ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { java.io.File mergedConfigFile = com.android.tradefed.util.FileUtil.createTempFile ( moduleName , com.android.compatibility.common.util.DynamicConfigHandler.FILE_EXT ) ; java.io.OutputStream stream = new java.io.FileOutputStream ( mergedConfigFile ) ; org.xmlpull.v1.XmlSerializer serializer = org.xmlpull.v1.XmlPullParserFactory.newInstance ( ) . newSerializer ( ) ; serializer.setOutput ( stream , com.android.compatibility.common.util.DynamicConfigHandler.ENCODING ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; serializer.startDocument ( com.android.compatibility.common.util.DynamicConfigHandler.ENCODING , false ) ; serializer.startTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.CONFIG_TAG ) ; for ( java.lang.String key : configMap.keySet ( ) ) { serializer.startTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.ENTRY_TAG ) ; serializer.attribute ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.KEY_ATTR , key ) ; for ( java.lang.String value : configMap.get ( key ) ) { serializer.startTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.VALUE_TAG ) ; serializer.text ( value ) ; serializer.endTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.VALUE_TAG ) ; } serializer.endTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.ENTRY_TAG ) ; } serializer.endTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.CONFIG_TAG ) ; serializer.endDocument ( ) ; return mergedConfigFile ; }
Source:
public void testGet ( ) throws java.lang.Exception { assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( java.util.Arrays.equals ( android.security.KeyStoreTest.TEST_KEYVALUE , mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( java.util.Arrays.equals ( android.security.KeyStoreTest.TEST_KEYVALUE , mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ) ; }
Source:
public static void finalizeAllEnqueued ( ) throws java.lang.InterruptedException { java.lang.ref.FinalizerReference.Sentinel sentinel = new java.lang.ref.FinalizerReference.Sentinel ( ) ; java.lang.ref.FinalizerReference < java.lang.Object > reference = new java.lang.ref.FinalizerReference < java.lang.Object > ( null , java.lang.ref.FinalizerReference.queue ) ; reference.zombie = sentinel ; reference.enqueueInternal ( ) ; sentinel.awaitFinalization ( ) ; }

Target:
private static void enqueueSentinelReference ( java.lang.ref.FinalizerReference.Sentinel sentinel ) { synchronized ( java.lang.ref.FinalizerReference.LIST_LOCK ) { for ( java.lang.ref.FinalizerReference r = java.lang.ref.FinalizerReference.head ; r != null ; r = r.next ) { if ( ( r.referent ) == sentinel ) { r.referent = null ; r.zombie = sentinel ; r.enqueueInternal ( ) ; return ; } } } throw new java.lang.AssertionError ( "newly-created live Sentinel not on list!" ) ; }
Source:
com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig getNextDeviceConfig ( com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig config ) { com.android.ide.eclipse.adt.internal.sdk.LayoutDevice device = getSelectedDevice ( ) ; java.util.List < com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig > configs = device.getConfigs ( ) ; for ( int i = 0 ; i < ( configs.size ( ) ) ; i ++ ) { if ( ( configs.get ( i ) ) == config ) { return configs.get ( ( ( i + 1 ) % ( configs.size ( ) ) ) ) ; } } return null ; }

Target:
com.android.sdklib.devices.State getNextDeviceState ( com.android.sdklib.devices.State state ) { com.android.sdklib.devices.Device device = getSelectedDevice ( ) ; java.util.List < com.android.sdklib.devices.State > states = device.getAllStates ( ) ; for ( int i = 0 ; i < ( states.size ( ) ) ; i ++ ) { if ( ( states.get ( i ) ) == state ) { return states.get ( ( ( i + 1 ) % ( states.size ( ) ) ) ) ; } } return null ; }
Source:
public final int doFinal ( java.nio.ByteBuffer input , java.nio.ByteBuffer output ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == output ) { throw new java.lang.IllegalArgumentException ( "input == output" ) ; } return spiImpl.engineDoFinal ( input , output ) ; }

Target:
public final byte [ ] doFinal ( ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } return getSpi ( ) . engineDoFinal ( null , 0 , 0 ) ; }
Source:
public void dispose ( ) { }

Target:
public void onServiceConnected ( android.content.ComponentName name , android.os.IBinder service ) { if ( service != null ) { android.util.Log.i ( android.telephony.MbmsStreamingManager.LOG_TAG , java.lang.String.format ( "Connected to service %s" , name ) ) ; synchronized ( this ) { mService = IMbmsStreamingService.Stub.asInterface ( service ) ; mServiceListeners.forEach ( android.telephony.MbmsStreamingManager.ServiceListener :: onServiceConnected ) ; } } }
Source:
public void run ( ) { try { java.io.File output = java.io.File.createTempFile ( "predex" , ".jar" ) ; output.deleteOnExit ( ) ; outputFiles [ ii ] = output ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( input , output , false , dexOptions , mBuildToolInfo , false , clr ) ; } catch ( java.lang.Exception ignored ) { } }

Target:
public void run ( ) { try { java.io.File output = java.io.File.createTempFile ( "predex" , ".jar" ) ; output.deleteOnExit ( ) ; outputFiles [ ii ] = output ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( input , output , false , dexOptions , mBuildToolInfo , false , javaProcessExecutor , new com.android.builder.internal.compiler.PreDexCacheTest.FakeProcessOutputHandler ( ) ) ; } catch ( java.lang.Exception ignored ) { } }
Source:
protected void dumpFilter ( java.io.PrintWriter out , java.lang.String prefix , android.content.pm.PackageParser.ActivityIntentInfo filter ) { out.print ( prefix ) ; out.print ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( filter.activity ) ) ) ; out.print ( ' ' ) ; out.print ( filter.activity.getComponentShortName ( ) ) ; out.print ( " filter " ) ; out.println ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( filter ) ) ) ; }

Target:
protected void dumpFilter ( java.io.PrintWriter out , java.lang.String prefix , android.content.pm.PackageParser.ActivityIntentInfo filter ) { out.print ( prefix ) ; out.print ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( filter.activity ) ) ) ; out.print ( ' ' ) ; filter.activity.printComponentShortName ( out ) ; out.print ( " filter " ) ; out.println ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( filter ) ) ) ; }
Source:
public void addReplyTo ( java.lang.String name , java.lang.String address ) { if ( ( this . mReplyTo ) == null ) this . mReplyTo = new java.util.ArrayList < android.text.util.Rfc822Token > ( 1 ) ; this . mReplyTo.add ( new android.text.util.Rfc822Token ( name , address , null ) ) ; }

Target:
public void addReplyTo ( java.lang.String name , java.lang.String address ) { if ( ( this . replyTo ) == null ) this . replyTo = new java.util.ArrayList < android.text.util.Rfc822Token > ( 1 ) ; this . replyTo.add ( new android.text.util.Rfc822Token ( name , address , null ) ) ; }
Source:
public void testStructArrays ( ) { mRS.setErrorHandler ( mRsError ) ; android.renderscript.cts.ScriptC_struct_array pad = new android.renderscript.cts.ScriptC_struct_array ( mRS ) ; android.renderscript.cts.ScriptField_ArrayMe S = new android.renderscript.cts.ScriptField_ArrayMe ( mRS , 1 ) ; int [ ] values = new int [ ] { 0 , 1 , 2 , 3 , 4 } ; S.set_i ( 0 , values , true ) ; pad.bind_s ( S ) ; pad.invoke_verify ( ) ; waitForMessage ( ) ; checkForErrors ( ) ; }

Target:
public void testStructArrays ( ) { mRS.setErrorHandler ( mRsError ) ; android.renderscript.cts.ScriptC_struct_array pad = new android.renderscript.cts.ScriptC_struct_array ( mRS ) ; android.renderscript.cts.ScriptField_ArrayMe S = new android.renderscript.cts.ScriptField_ArrayMe ( mRS , 1 ) ; int [ ] values = new int [ ] { 0 , 1 , 2 , 3 , 4 } ; S.set_i ( 0 , values , true ) ; pad.bind_s ( S ) ; pad.invoke_verify ( ) ; waitForMessage ( ) ; pad.destroy ( ) ; checkForErrors ( ) ; }
Source:
private boolean getProvisionedBool ( com.android.ims.ImsConfig config , int item ) throws com.android.ims.ImsException { int value = config.getProvisionedValue ( item ) ; if ( value == ( ImsConfig.FeatureValueConstants.ERROR ) ) { throw new com.android.ims.ImsException ( ( "getProvisionedBool failed with error for item: " + item ) , ImsReasonInfo.CODE_LOCAL_INTERNAL_ERROR ) ; } return ( config.getProvisionedValue ( item ) ) == ( ImsConfig.FeatureValueConstants.ON ) ; }

Target:
private boolean getProvisionedBool ( com.android.ims.ImsConfig config , int item ) throws com.android.ims.ImsException { int value = config.getProvisionedValue ( item ) ; if ( value == ( ImsConfig.FeatureValueConstants.ERROR ) ) { throw new com.android.ims.ImsException ( ( "getProvisionedBool failed with error for item: " + item ) , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_INTERNAL_ERROR ) ; } return ( config.getProvisionedValue ( item ) ) == ( ImsConfig.FeatureValueConstants.ON ) ; }
Source:
public int hashCode ( java.lang.Object element ) { if ( element instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode key = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( element ) ) . getUiViewKey ( ) ; if ( key != null ) { return key.hashCode ( ) ; } } if ( element != null ) { return element.hashCode ( ) ; } return 0 ; }

Target:
public int hashCode ( java.lang.Object element ) { if ( element instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode key = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( element ) ) . getUiViewNode ( ) ; if ( key != null ) { return key.hashCode ( ) ; } } if ( element != null ) { return element.hashCode ( ) ; } return 0 ; }
Source:
public static java.io.File getCanonicalFolder ( java.lang.String sdkOsPath , com.android.sdklib.AndroidVersion platformVersion , java.lang.String abiType ) { java.io.File root = com.android.sdklib.io.FileOp.append ( sdkOsPath , SdkConstants.FD_SYSTEM_IMAGES , ( ( com.android.sdklib.SystemImage.ANDROID_PREFIX ) + ( platformVersion.getApiString ( ) ) ) ) ; if ( abiType == null ) { return root ; } else { return com.android.sdklib.io.FileOp.append ( root , abiType ) ; } }

Target:
public static java.io.File getCanonicalFolder ( java.lang.String sdkOsPath , com.android.sdklib.AndroidVersion platformVersion , java.lang.String tagId , java.lang.String abiType ) { java.io.File root = com.android.sdklib.io.FileOp.append ( sdkOsPath , SdkConstants.FD_SYSTEM_IMAGES , ( ( com.android.sdklib.SystemImage.ANDROID_PREFIX ) + ( platformVersion.getApiString ( ) ) ) ) ; if ( tagId != null ) { root = com.android.sdklib.io.FileOp.append ( root , tagId ) ; } if ( abiType == null ) { return root ; } else { return com.android.sdklib.io.FileOp.append ( root , abiType ) ; } }
Source:
public int hashCode ( ) { int lockWord = shadow$_monitor_ ; final int lockWordMask = - 1073741824 ; final int lockWordStateHash = - 2147483648 ; if ( ( lockWord & lockWordMask ) == lockWordStateHash ) { return lockWord & ( ~ lockWordMask ) ; } return java.lang.System.identityHashCode ( this ) ; }

Target:
public int hashCode ( ) { int lockWord = shadow$_monitor_ ; final int lockWordStateMask = - 1073741824 ; final int lockWordStateHash = - 2147483648 ; final int lockWordHashMask = 268435455 ; if ( ( lockWord & lockWordStateMask ) == lockWordStateHash ) { return lockWord & lockWordHashMask ; } return java.lang.System.identityHashCode ( this ) ; }
Source:
public java.net.Socket createSocket ( java.lang.String host , int port , java.net.InetAddress localAddr , int localPort ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( host , port , localAddr , localPort ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }

Target:
public java.net.Socket createSocket ( java.lang.String host , int port , java.net.InetAddress localAddr , int localPort ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( host , port , localAddr , localPort ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }
Source:
boolean isPartialView ( ) { return ( ( offset ) != 0 ) || ( ( size ) != ( array.length ) ) ; }

Target:
public int indexOf ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object == null ) { return - 1 ; } for ( int i = 0 ; i < ( size ) ; i ++ ) { if ( array [ ( ( offset ) + i ) ] . equals ( object ) ) { return i ; } } return - 1 ; }
Source:
com.google.common.collect.ContiguousSet < C > subSetImpl ( C fromElement , boolean fromInclusive , C toElement , boolean toInclusive ) { if ( ( ( ( fromElement.compareTo ( toElement ) ) == 0 ) && ( ! fromInclusive ) ) && ( ! toInclusive ) ) { return new com.google.common.collect.EmptyContiguousSet < C > ( domain ) ; } return intersectionInCurrentDomain ( com.google.common.collect.Ranges.range ( fromElement , com.google.common.collect.BoundType.forBoolean ( fromInclusive ) , toElement , com.google.common.collect.BoundType.forBoolean ( toInclusive ) ) ) ; }

Target:
com.google.common.collect.ContiguousSet < C > subSetImpl ( C fromElement , boolean fromInclusive , C toElement , boolean toInclusive ) { if ( ( ( ( fromElement.compareTo ( toElement ) ) == 0 ) && ( ! fromInclusive ) ) && ( ! toInclusive ) ) { return new com.google.common.collect.EmptyContiguousSet < C > ( domain ) ; } return intersectionInCurrentDomain ( com.google.common.collect.Range.range ( fromElement , com.google.common.collect.BoundType.forBoolean ( fromInclusive ) , toElement , com.google.common.collect.BoundType.forBoolean ( toInclusive ) ) ) ; }
Source:
private static org.w3c.dom.Element getFirstChildElement ( org.w3c.dom.Element element ) { org.w3c.dom.Node child = element.getFirstChild ( ) ; while ( ( child.getNodeType ( ) ) != ( org.w3c.dom.Node.ELEMENT_NODE ) ) { child = child.getNextSibling ( ) ; } return ( ( org.w3c.dom.Element ) ( child ) ) ; }

Target:
public com.google.gson.JsonElement serialize ( com.android.manifmerger.Actions.ActionLocation src , java.lang.reflect.Type typeOfSrc , com.google.gson.JsonSerializationContext context ) { com.google.gson.JsonObject jsonObject = new com.google.gson.JsonObject ( ) ; jsonObject.add ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.POSITION_ELEMENT , context.serialize ( src.getSourceLocation ( ) ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.LINE_ATTRIBUTE , src.getPosition ( ) . getLine ( ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.COLUMN_ATTRIBUTE , src.getPosition ( ) . getColumn ( ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.OFFSET_ATTRIBUTE , src.getPosition ( ) . getOffset ( ) ) ; return jsonObject ; }
Source:
public void testRequestRouteToHost ( ) { android.net.NetworkInfo [ ] ni = mCm.getAllNetworkInfo ( ) ; for ( android.net.NetworkInfo n : ni ) { if ( n.isConnected ( ) ) { assertTrue ( mCm.requestRouteToHost ( n.getType ( ) , android.net.cts.ConnectivityManagerTest.HOST_ADDRESS ) ) ; } } assertFalse ( mCm.requestRouteToHost ( ( - 1 ) , android.net.cts.ConnectivityManagerTest.HOST_ADDRESS ) ) ; }

Target:
public void testRequestRouteToHost ( ) { android.net.NetworkInfo [ ] ni = mCm.getAllNetworkInfo ( ) ; for ( android.net.NetworkInfo n : ni ) { if ( ( n.isConnected ( ) ) && ( ( n.getType ( ) ) != ( android.net.cts.ConnectivityManagerTest.TYPE_WIFI ) ) ) { assertTrue ( mCm.requestRouteToHost ( n.getType ( ) , android.net.cts.ConnectivityManagerTest.HOST_ADDRESS ) ) ; } } assertFalse ( mCm.requestRouteToHost ( ( - 1 ) , android.net.cts.ConnectivityManagerTest.HOST_ADDRESS ) ) ; }
Source:
public boolean isIconUniqueBlocking ( com.android.documentsui.model.RootInfo root ) { waitForFirstLoad ( ) ; loadStoppedAuthorities ( ) ; synchronized ( mLock ) { final int rootIcon = ( ( root.derivedIcon ) != 0 ) ? root.derivedIcon : root.icon ; for ( com.android.documentsui.model.RootInfo test : mRoots.get ( root.authority ) ) { if ( com.android.internal.util.Objects.equal ( test.rootId , root.rootId ) ) { continue ; } final int testIcon = ( ( test.derivedIcon ) != 0 ) ? test.derivedIcon : test.icon ; if ( testIcon == rootIcon ) { return false ; } } return true ; } }

Target:
public boolean isIconUniqueBlocking ( com.android.documentsui.model.RootInfo root ) { waitForFirstLoad ( ) ; loadStoppedAuthorities ( ) ; synchronized ( mLock ) { final int rootIcon = ( ( root.derivedIcon ) != 0 ) ? root.derivedIcon : root.icon ; for ( com.android.documentsui.model.RootInfo test : mRoots.get ( root.authority ) ) { if ( java.util.Objects.equals ( test.rootId , root.rootId ) ) { continue ; } final int testIcon = ( ( test.derivedIcon ) != 0 ) ? test.derivedIcon : test.icon ; if ( testIcon == rootIcon ) { return false ; } } return true ; } }
Source:
public void testStaging_install_currentDirIsFile ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataStagedDir , distro ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; java.nio.file.Files.write ( dataCurrentDir.hostPath , new byte [ ] { 'a' } ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distro ) ; }

Target:
public void testStaging_install_currentDirIsFile ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; byte [ ] distroBytes = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . buildBytes ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataStagedDir , distroBytes ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; java.nio.file.Files.write ( dataCurrentDir.hostPath , new byte [ ] { 'a' } ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distroBytes ) ; }
Source:
public void onResume ( ) { super . onResume ( ) ; loadInstalledServices ( ) ; updateAllPreferences ( ) ; if ( ( mServicesCategory.getPreference ( 0 ) ) == ( mNoServicesMessagePreference ) ) { offerInstallAccessibilitySerivceOnce ( ) ; } mSettingsPackageMonitor.register ( getActivity ( ) , false ) ; }

Target:
public void onResume ( ) { super . onResume ( ) ; loadInstalledServices ( ) ; updateAllPreferences ( ) ; offerInstallAccessibilitySerivceOnce ( ) ; mSettingsPackageMonitor.register ( getActivity ( ) , getActivity ( ) . getMainLooper ( ) , false ) ; com.android.internal.view.RotationPolicy.registerRotationPolicyListener ( getActivity ( ) , mRotationPolicyListener ) ; }
Source:
private void onRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRoamingOff" ) ; setInitialAttachApn ( ) ; setDataProfilesAsNeeded ( ) ; 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 onDataRoamingOnOrSettingsChanged ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOnOrSettingsChanged" ) ; if ( ! ( mPhone.getServiceState ( ) . getDataRoaming ( ) ) ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "device is not roaming. ignored the request." ) ; return ; } if ( getDataRoamingEnabled ( ) ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOnOrSettingsChanged: setup data on roaming" ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_ON ) ; notifyDataConnection ( Phone.REASON_ROAMING_ON ) ; } else { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOnOrSettingsChanged: Tear down data connection on roaming." ) ; cleanUpAllConnections ( true , Phone.REASON_ROAMING_ON ) ; notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_ON ) ; } }
Source:
public void testGetInputStream ( ) throws java.io.IOException { java.lang.String resourceName = "org/apache/harmony/luni/tests/" + "test.rtf" ; java.net.URL url = java.lang.ClassLoader.getSystemClassLoader ( ) . getResource ( resourceName ) ; java.net.URL anchorUrl = new java.net.URL ( url , "#anchor" ) ; assertNotNull ( ( "Cannot find test resource " + resourceName ) , anchorUrl ) ; libcore.net.url.FileURLConnection conn = new libcore.net.url.FileURLConnection ( anchorUrl ) ; assertNotNull ( conn.getInputStream ( ) ) ; java.lang.String localURLString = "file://localhost/" + ( url.getFile ( ) ) ; java.net.URL localURL = new java.net.URL ( localURLString ) ; conn = new libcore.net.url.FileURLConnection ( localURL ) ; assertNotNull ( conn.getInputStream ( ) ) ; assertEquals ( "file" , conn.getURL ( ) . getProtocol ( ) ) ; }

Target:
public void testGetInputStream ( ) throws java.io.IOException { java.lang.String resourceName = "resources/" + "test.rtf" ; java.net.URL url = java.lang.ClassLoader.getSystemClassLoader ( ) . getResource ( resourceName ) ; assertNotNull ( url ) ; java.net.URL anchorUrl = new java.net.URL ( url , "#anchor" ) ; assertNotNull ( ( "Cannot find test resource " + resourceName ) , anchorUrl ) ; libcore.net.url.FileURLConnection conn = new libcore.net.url.FileURLConnection ( anchorUrl ) ; assertNotNull ( conn.getInputStream ( ) ) ; java.lang.String localURLString = "file://localhost/" + ( url.getFile ( ) ) ; java.net.URL localURL = new java.net.URL ( localURLString ) ; conn = new libcore.net.url.FileURLConnection ( localURL ) ; assertNotNull ( conn.getInputStream ( ) ) ; assertEquals ( "file" , conn.getURL ( ) . getProtocol ( ) ) ; }
Source:
public android.drm.DrmInfo acquireDrmInfo ( android.drm.DrmInfoRequest drmInfoRequest ) { if ( ( null == drmInfoRequest ) || ( ! ( drmInfoRequest.isValid ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Given drmInfoRequest is invalid/null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _acquireDrmInfo ( mUniqueId , drmInfoRequest ) ; }

Target:
public int getDrmObjectType ( android.net.Uri uri , java.lang.String mimeType ) { if ( ( ( null == uri ) || ( ( android.net.Uri.EMPTY ) == uri ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Uri or the mimetype should be non null" ) ; } java.lang.String path = "" ; try { path = convertUriToPath ( uri ) ; } catch ( java.lang.Exception e ) { android.util.Log.w ( android.drm.DrmManagerClient.TAG , "Given Uri could not be found in media store" ) ; } return getDrmObjectType ( path , mimeType ) ; }
Source:
public boolean updateSourcePackages ( com.android.sdklib.internal.repository.SdkSource source , java.lang.Package [ ] newPackages ) { if ( source != null ) { java.util.List < com.android.sdkuilib.internal.repository.sdkman2.PkgCategory > cats = getCategories ( ) ; java.lang.Object catKey = source ; com.android.sdkuilib.internal.repository.sdkman2.PkgCategory cat = findCurrentCategory ( cats , catKey ) ; if ( cat == null ) { cat = createCategory ( catKey ) ; synchronized ( cats ) { cats.add ( cat ) ; } sortCategoryList ( ) ; } keep ( cat ) ; } return super . updateSourcePackages ( source , newPackages ) ; }

Target:
public boolean updateSourcePackages ( com.android.sdklib.internal.repository.sources.SdkSource source , java.lang.Package [ ] newPackages ) { if ( source != null ) { java.util.List < com.android.sdkuilib.internal.repository.sdkman2.PkgCategory > cats = getCategories ( ) ; java.lang.Object catKey = source ; com.android.sdkuilib.internal.repository.sdkman2.PkgCategory cat = findCurrentCategory ( cats , catKey ) ; if ( cat == null ) { cat = createCategory ( catKey ) ; synchronized ( cats ) { cats.add ( cat ) ; } sortCategoryList ( ) ; } keep ( cat ) ; } return super . updateSourcePackages ( source , newPackages ) ; }
Source:
final void internalAddCall ( android.telecom.ParcelableCall parcelableCall ) { android.telecom.Call call = new android.telecom.Call ( this , parcelableCall.getId ( ) , mInCallAdapter , parcelableCall.getState ( ) , mCallingPackage ) ; mCallByTelecomCallId.put ( parcelableCall.getId ( ) , call ) ; mCalls.add ( call ) ; checkCallTree ( parcelableCall ) ; call.internalUpdate ( parcelableCall , mCallByTelecomCallId ) ; fireCallAdded ( call ) ; }

Target:
final void internalAddCall ( android.telecom.ParcelableCall parcelableCall ) { android.telecom.Call call = new android.telecom.Call ( this , parcelableCall.getId ( ) , mInCallAdapter , parcelableCall.getState ( ) , mCallingPackage , mTargetSdkVersion ) ; mCallByTelecomCallId.put ( parcelableCall.getId ( ) , call ) ; mCalls.add ( call ) ; checkCallTree ( parcelableCall ) ; call.internalUpdate ( parcelableCall , mCallByTelecomCallId ) ; fireCallAdded ( call ) ; }
Source:
public boolean find ( int start ) { if ( ( start < 0 ) || ( start > ( input.length ( ) ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "start=" + start ) + "; length=" ) + ( input.length ( ) ) ) ) ; } synchronized ( this ) { matchFound = java.util.regex.Matcher.findImpl ( address , start , matchOffsets ) ; } return matchFound ; }

Target:
public boolean find ( int start ) { reset ( ) ; if ( ( start < 0 ) || ( start > ( input.length ( ) ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "start=" + start ) + "; length=" ) + ( input.length ( ) ) ) ) ; } synchronized ( this ) { matchFound = java.util.regex.Matcher.findImpl ( address , start , matchOffsets ) ; } return matchFound ; }
Source:
public void enter ( ) { mService.checkOrGetPhonebookPermission ( mRemoteDevice ) ; }

Target:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.pbap.PbapStateMachine.REQUEST_PERMISSION : mService.checkOrGetPhonebookPermission ( this ) ; case com.android.bluetooth.pbap.PbapStateMachine.AUTHORIZED : transitionTo ( mConnected ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.REJECTED : rejectConnection ( ) ; transitionTo ( mFinished ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.DISCONNECT : mServiceHandler.removeMessages ( BluetoothPbapService.USER_TIMEOUT , this ) ; mServiceHandler.obtainMessage ( BluetoothPbapService.USER_TIMEOUT , this ) . sendToTarget ( ) ; transitionTo ( mFinished ) ; break ; } return HANDLED ; }
Source:
public org.gradle.api.tasks.bundling.Zip getPackageLibrary ( ) { return variantData.packageLibTask ; }

Target:
public org.gradle.api.tasks.bundling.Zip getPackageLibrary ( ) { if ( ( outputs.size ( ) ) > 1 ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "More than one output on variant '%s', cannot call getPackageLibrary() on it. Call it on one of its outputs instead." , getName ( ) ) ) ; } plugin.displayDeprecationWarning ( "variant.getPackageLibrary() is deprecated. Call it on one of variant.getOutputs() instead." ) ; return ( ( com.android.build.gradle.api.LibraryVariantOutput ) ( outputs.get ( 0 ) ) ) . getPackageLibrary ( ) ; }
Source:
private synchronized boolean unregisterAppUid ( int uid ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "unregisterAppUid(): uid=" + uid ) ) ; } if ( uid == ( mUserUid ) ) { mUserUid = 0 ; return mHidDeviceNativeInterface.unregisterApp ( ) ; } return false ; }

Target:
synchronized boolean unregisterApp ( ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , "unregisterApp()" ) ; } int callingUid = android.os.Binder.getCallingUid ( ) ; return unregisterAppUid ( callingUid ) ; }
Source:
private void updateA2dpAudioState ( int state ) { boolean isPlaying = state == ( android.bluetooth.BluetoothA2dp.STATE_PLAYING ) ; if ( isPlaying != ( isPlayingState ( mCurrentPlayState ) ) ) { if ( isPlaying && ( ! ( mAudioManager.isMusicActive ( ) ) ) ) return ; updatePlayPauseState ( ( isPlaying ? android.media.RemoteControlClient.PLAYSTATE_PLAYING : android.media.RemoteControlClient.PLAYSTATE_PAUSED ) , RemoteControlClient.PLAYBACK_POSITION_INVALID ) ; } }

Target:
private void updateA2dpAudioState ( int state ) { boolean isPlaying = state == ( android.bluetooth.BluetoothA2dp.STATE_PLAYING ) ; if ( isPlaying != ( isPlayingState ( mCurrentPlayState ) ) ) { if ( isPlaying && ( ! ( mAudioManager.isMusicActive ( ) ) ) ) return ; android.media.session.PlaybackState.Builder builder = new android.media.session.PlaybackState.Builder ( ) ; if ( isPlaying ) { builder.setState ( PlaybackState.STATE_PLAYING , PlaybackState.PLAYBACK_POSITION_UNKNOWN , 1.0F ) ; } else { builder.setState ( PlaybackState.STATE_PAUSED , PlaybackState.PLAYBACK_POSITION_UNKNOWN , 0.0F ) ; } updatePlayPauseState ( builder.build ( ) ) ; } }
Source:
public java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > getConfiguredResources ( @ com.android.annotations.NonNull com.android.ide.common.resources.configuration.FolderConfiguration referenceConfig ) { java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > map = com.google.common.collect.Maps.newEnumMap ( com.android.resources.ResourceType.class ) ; synchronized ( mItems ) { for ( com.android.resources.ResourceType key : com.android.resources.ResourceType.values ( ) ) { map.put ( key , getConfiguredResources ( key , referenceConfig ) ) ; } } return map ; }

Target:
protected com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > getMap ( com.android.resources.ResourceType type , boolean create ) { com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > multimap = mItems.get ( type ) ; if ( ( multimap == null ) && create ) { multimap = com.google.common.collect.ArrayListMultimap.create ( ) ; mItems.put ( type , multimap ) ; } return multimap ; }
Source:
public void onReceive ( android.content.Context content , android.content.Intent intent ) { updateToggles ( mUsbManager.getDefaultFunction ( ) ) ; }

Target:
public void onReceive ( android.content.Context content , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( action.equals ( UsbManager.ACTION_USB_STATE ) ) { mUsbAccessoryMode = intent.getBooleanExtra ( UsbManager.USB_FUNCTION_ACCESSORY , false ) ; android.util.Log.e ( com.android.settings.deviceinfo.UsbSettings.TAG , ( "UsbAccessoryMode " + ( mUsbAccessoryMode ) ) ) ; } updateToggles ( mUsbManager.getDefaultFunction ( ) ) ; }
Source:
public void mouseMove ( org.eclipse.swt.events.MouseEvent e ) { if ( ( ( mModel ) != null ) && ( mModel.isExploreMode ( ) ) ) { com.android.uiautomator.tree.BasicTreeNode node = mModel.updateSelectionForCoordinates ( getInverseScaledSize ( ( ( e.x ) - ( mDx ) ) ) , getInverseScaledSize ( ( ( e.y ) - ( mDy ) ) ) ) ; if ( node != null ) { updateTreeSelection ( node ) ; } } }

Target:
public void keyReleased ( org.eclipse.swt.events.KeyEvent event ) { if ( ( event.keyCode ) == ( org.eclipse.swt.SWT.CR ) ) { java.lang.String term = searchTextarea.getText ( ) ; if ( ! ( term.isEmpty ( ) ) ) { if ( term.equals ( mLastSearchedTerm ) ) { nextSearchResult ( ) ; return ; } clearSearchResult ( ) ; mSearchResult = mModel.searchNode ( term ) ; if ( ! ( mSearchResult.isEmpty ( ) ) ) { mSearchResultIndex = 0 ; updateSearchResultSelection ( ) ; mLastSearchedTerm = term ; } } } }
Source:
boolean stopVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientService.TAG , "stopVoiceRecognition API not available" ) ; return false ; }

Target:
boolean startVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfpclient.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; com.android.bluetooth.hfpclient.HeadsetClientStateMachine sm = getStateMachine ( device ) ; if ( sm == null ) { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientService.TAG , ( "Cannot allocate SM for device " + device ) ) ; return false ; } int connectionState = sm.getConnectionState ( device ) ; if ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) { return false ; } sm.sendMessage ( HeadsetClientStateMachine.VOICE_RECOGNITION_START ) ; return true ; }
Source:
private synchronized void msgGetPlayStatusNative ( ) { android.util.Log.d ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , "msgGetPlayStatusNative" ) ; if ( ( mA2dpDevice ) == null ) { android.util.Log.e ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , "Already disconnected ignoring." ) ; return ; } mAvrcpCtrlSrvc.getPlaybackState ( mA2dpDevice , false ) ; }

Target:
private synchronized void msgPassThru ( int cmd ) { if ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.DBG ) android.util.Log.d ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , ( "msgPassThru " + cmd ) ) ; if ( ( mA2dpDevice ) == null ) { android.util.Log.w ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , "Already disconnected ignoring." ) ; return ; } mAvrcpCtrlSrvc.sendPassThroughCmd ( mA2dpDevice , cmd , AvrcpControllerService.KEY_STATE_PRESSED ) ; mAvrcpCtrlSrvc.sendPassThroughCmd ( mA2dpDevice , cmd , AvrcpControllerService.KEY_STATE_RELEASED ) ; }
Source:
private static boolean nodeNeedsUniquePredecessor ( com.android.jack.ir.ast.cfg.JBasicBlock block ) { if ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) { throw new java.lang.RuntimeException ( "exit bblock doesn't need unique pred" ) ; } int countPredecessors = com.android.jack.transformations.ssa.SsaUtil.getNumPredecessor ( block ) ; int countSuccessors = com.android.jack.transformations.ssa.SsaUtil.getNumSuccessor ( block ) ; boolean needsUniquePredecessor = ( countPredecessors > 1 ) && ( countSuccessors > 1 ) ; assert ( ! needsUniquePredecessor ) || ( ! ( ( block instanceof com.android.jack.ir.ast.cfg.JCaseBasicBlock ) || ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) ) ; return needsUniquePredecessor ; }

Target:
private static boolean nodeNeedsUniquePredecessor ( com.android.jack.ir.ast.cfg.JBasicBlock block ) { if ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) { throw new java.lang.RuntimeException ( "exit bblock doesn't need unique pred" ) ; } int countPredecessors = block.getPredecessorCount ( ) ; int countSuccessors = block.getSuccessors ( ) . size ( ) ; boolean needsUniquePredecessor = ( countPredecessors > 1 ) && ( countSuccessors > 1 ) ; assert ( ! needsUniquePredecessor ) || ( ! ( ( block instanceof com.android.jack.ir.ast.cfg.JCaseBasicBlock ) || ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) ) ; return needsUniquePredecessor ; }
Source:
public boolean enableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.disableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { return false ; } }

Target:
public boolean disableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.disableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to disable supplicant due to remote exception" ) ; } return false ; }
Source:
public static < W extends java.lang.Appendable & java.io.Closeable > void copy ( java.io.File from , java.nio.charset.Charset charset , com.google.common.io.OutputSupplier < W > to ) throws java.io.IOException { com.google.common.io.CharStreams.copy ( com.google.common.io.Files.newReaderSupplier ( from , charset ) , to ) ; }

Target:
public java.lang.Iterable < java.io.File > children ( java.io.File file ) { if ( file.isDirectory ( ) ) { java.io.File [ ] files = file.listFiles ( ) ; if ( files != null ) { return java.util.Collections.unmodifiableList ( java.util.Arrays.asList ( files ) ) ; } } return java.util.Collections.emptyList ( ) ; }
Source:
private static java.lang.String getLogDir ( java.lang.String logFolder ) { if ( ! ( com.intellij.updater.Runner.validateLogDir ( logFolder ) ) ) { logFolder = java.lang.System.getProperty ( "java.io.tmpdir" ) ; if ( ! ( com.intellij.updater.Runner.validateLogDir ( logFolder ) ) ) { logFolder = java.lang.System.getProperty ( "user.home" ) ; } } java.lang.System.out.println ( ( "Log dir: " + logFolder ) ) ; return logFolder ; }

Target:
private static java.lang.String getLogDir ( java.lang.String logFolder ) { if ( ( logFolder == null ) || ( ! ( com.intellij.updater.Runner.isValidLogDir ( logFolder ) ) ) ) { logFolder = java.lang.System.getProperty ( "java.io.tmpdir" ) ; if ( ! ( com.intellij.updater.Runner.isValidLogDir ( logFolder ) ) ) { logFolder = java.lang.System.getProperty ( "user.home" ) ; } } return logFolder ; }
Source:
protected void onResume ( ) { super . onResume ( ) ; activePeer.onActivityResume ( ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( this ) . registerReceiver ( showBlockReportSpamDialogReceiver , com.android.dialer.blockreportspam.ShowBlockReportSpamDialogReceiver.getIntentFilter ( ) ) ; }

Target:
protected void onResume ( ) { super . onResume ( ) ; activePeer.onActivityResume ( ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( this ) . registerReceiver ( showBlockReportSpamDialogReceiver , com.android.dialer.blockreportspam.ShowBlockReportSpamDialogReceiver.getIntentFilter ( ) ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( this ) . registerReceiver ( placeDuoCallReceiver , com.android.dialer.duo.PlaceDuoCallReceiver.getIntentFilter ( ) ) ; }