auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static int maybeThrowAfterSendto ( boolean isDatagram , libcore.io.ErrnoException errnoException ) throws java.net.SocketException { if ( isDatagram ) { if ( ( ( errnoException.errno ) == ( ECONNRESET ) ) || ( ( errnoException.errno ) == ( ECONNREFUSED ) ) ) { return 0 ; } } else { if ( ( ( errnoException.errno ) == ( EAGAIN ) ) || ( ( errnoException.errno ) == ( EWOULDBLOCK ) ) ) { return 0 ; } } throw errnoException.rethrowAsSocketException ( ) ; }

Target:
private static int maybeThrowAfterSendto ( boolean isDatagram , libcore.io.ErrnoException errnoException ) throws java.net.SocketException { if ( isDatagram ) { if ( ( ( errnoException.errno ) == ( ECONNRESET ) ) || ( ( errnoException.errno ) == ( ECONNREFUSED ) ) ) { return 0 ; } } else { if ( ( errnoException.errno ) == ( EAGAIN ) ) { return 0 ; } } throw errnoException.rethrowAsSocketException ( ) ; }
Source:
private void stopRtt ( java.lang.String callId ) { android.telecom.Log.d ( this , "stopRtt(%s)" , callId ) ; if ( mConnectionById.containsKey ( callId ) ) { findConnectionForAction ( callId , "stopRtt" ) . onStopRtt ( ) ; findConnectionForAction ( callId , "stopRtt" ) . unsetRttProperty ( ) ; } else if ( mConferenceById.containsKey ( callId ) ) { android.telecom.Log.w ( this , "stopRtt called on a conference." ) ; } }

Target:
private void stopRtt ( java.lang.String callId ) { android.telecom.Log.d ( this , "stopRtt(%s)" , callId ) ; if ( mConnectionById.containsKey ( callId ) ) { findConnectionForAction ( callId , "stopRtt" ) . onStopRtt ( ) ; } else if ( mConferenceById.containsKey ( callId ) ) { android.telecom.Log.w ( this , "stopRtt called on a conference." ) ; } }
Source:
public static java.util.List < com.android.sdklib.devices.Device > parse ( @ com.android.annotations.NonNull java.io.File devicesFile ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.io.InputStream stream = null ; try { stream = new java.io.FileInputStream ( devicesFile ) ; return com.android.sdklib.devices.DeviceParser.parseImpl ( stream , devicesFile.getAbsoluteFile ( ) . getParentFile ( ) ) ; } finally { if ( stream != null ) { try { stream.close ( ) ; } catch ( java.io.IOException ignore ) { } } } }

Target:
public static java.util.List < com.android.sdklib.devices.Device > parse ( @ com.android.annotations.NonNull java.io.File devicesFile ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.InputStream stream = new java.io.FileInputStream ( devicesFile ) ; return com.android.sdklib.devices.DeviceParser.parseImpl ( stream , devicesFile.getAbsoluteFile ( ) . getParentFile ( ) ) ; }
Source:
public java.security.PublicKey getPublicKey ( ) throws java.security.NoSuchAlgorithmException { switch ( org.conscrypt.NativeCrypto.EVP_PKEY_type ( ctx ) ) { case NativeCrypto.EVP_PKEY_RSA : return new org.conscrypt.OpenSSLRSAPublicKey ( this ) ; case NativeCrypto.EVP_PKEY_DH : return new org.conscrypt.OpenSSLDHPublicKey ( this ) ; case NativeCrypto.EVP_PKEY_EC : return new org.conscrypt.OpenSSLECPublicKey ( this ) ; default : throw new java.security.NoSuchAlgorithmException ( "unknown PKEY type" ) ; } }

Target:
public java.security.PublicKey getPublicKey ( ) throws java.security.NoSuchAlgorithmException { switch ( org.conscrypt.NativeCrypto.EVP_PKEY_type ( ctx ) ) { case NativeCrypto.EVP_PKEY_RSA : return new org.conscrypt.OpenSSLRSAPublicKey ( this ) ; case NativeCrypto.EVP_PKEY_EC : return new org.conscrypt.OpenSSLECPublicKey ( this ) ; default : throw new java.security.NoSuchAlgorithmException ( "unknown PKEY type" ) ; } }
Source:
public boolean canHandle ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _canHandle ( mUniqueId , path , mimeType ) ; }

Target:
public boolean canHandle ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } return _canHandle ( mUniqueId , path , mimeType ) ; }
Source:
public void testConnectFailureDueToNetworkAddFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( false ) ; org.mockito.Mockito.doAnswer ( new android.app.test.MockAnswerUtil.AnswerWithArguments ( ) { public void answer ( ISupplicantStaIface.addNetworkCallback cb ) throws android.os.RemoteException { cb.onValues ( mStatusFailure , org.mockito.Mockito.mock ( android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork.class ) ) ; return ; } } ) . when ( mISupplicantStaIfaceMock ) . addNetwork ( org.mockito.Matchers.any ( ISupplicantStaIface.addNetworkCallback.class ) ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; }

Target:
public void testConnectFailureDueToNetworkAddFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( false ) ; org.mockito.Mockito.doAnswer ( new android.app.test.MockAnswerUtil.AnswerWithArguments ( ) { public void answer ( ISupplicantStaIface.addNetworkCallback cb ) throws android.os.RemoteException { cb.onValues ( mStatusFailure , org.mockito.Mockito.mock ( android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork.class ) ) ; return ; } } ) . when ( mISupplicantStaIfaceMock ) . addNetwork ( org.mockito.Matchers.any ( ISupplicantStaIface.addNetworkCallback.class ) ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) ) ) ; }
Source:
public void setHotspotBounds ( int left , int top , int right , int bottom ) { if ( ( mHotspotBounds ) == null ) { mHotspotBounds = new android.graphics.Rect ( left , top , bottom , right ) ; } else { mHotspotBounds.set ( left , top , bottom , right ) ; } if ( ( mCurrDrawable ) != null ) { mCurrDrawable.setHotspotBounds ( left , top , right , bottom ) ; } }

Target:
public void setHotspotBounds ( int left , int top , int right , int bottom ) { if ( ( mHotspotBounds ) == null ) { mHotspotBounds = new android.graphics.Rect ( left , top , right , bottom ) ; } else { mHotspotBounds.set ( left , top , right , bottom ) ; } if ( ( mCurrDrawable ) != null ) { mCurrDrawable.setHotspotBounds ( left , top , right , bottom ) ; } }
Source:
public boolean enableNoAutoConnect ( ) { if ( ( isEnabled ( ) ) == true ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enableNoAutoConnect(): BT already enabled!" ) ; return true ; } try { return mManagerService.enableNoAutoConnect ( android.app.ActivityThread.currentPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public boolean enableNoAutoConnect ( ) { if ( isEnabled ( ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enableNoAutoConnect(): BT already enabled!" ) ; return true ; } try { return mManagerService.enableNoAutoConnect ( android.app.ActivityThread.currentPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }
Source:
public static void setFloat ( java.lang.Object array , int index , float value ) throws java.lang.ArrayIndexOutOfBoundsException , java.lang.IllegalArgumentException { if ( array instanceof float [ ] ) { ( ( float [ ] ) ( array ) ) [ index ] = value ; } else if ( array instanceof double [ ] ) { ( ( double [ ] ) ( array ) ) [ index ] = value ; } else { throw java.lang.reflect.Array.badArray ( array ) ; } }

Target:
public static void setFloat ( java.lang.Object array , int index , float f ) throws java.lang.ArrayIndexOutOfBoundsException , java.lang.IllegalArgumentException { if ( array instanceof float [ ] ) { ( ( float [ ] ) ( array ) ) [ index ] = f ; } else if ( array instanceof double [ ] ) { ( ( double [ ] ) ( array ) ) [ index ] = f ; } else { throw java.lang.reflect.Array.badArray ( array ) ; } }
Source:
void doUnbind ( ) { android.util.Log.d ( android.bluetooth.BluetoothHidDevice.TAG , "Unbinding HidDevService" ) ; if ( ( mService ) != null ) { mService = null ; try { mContext.unbindService ( mConnection ) ; } catch ( java.lang.IllegalArgumentException e ) { android.util.Log.e ( android.bluetooth.BluetoothHidDevice.TAG , "Unable to unbind HidDevService" , e ) ; } } }

Target:
void doUnbind ( ) { if ( ( mService ) != null ) { mService = null ; try { mContext.unbindService ( mConnection ) ; } catch ( java.lang.IllegalArgumentException e ) { android.util.Log.e ( android.bluetooth.BluetoothHidDevice.TAG , "Unable to unbind HidDevService" , e ) ; } } }
Source:
public boolean remove ( java.lang.Object o ) { if ( ! ( o instanceof java.util.Map.Entry ) ) return false ; java.util.Map.Entry entry = ( ( java.util.Map.Entry ) ( o ) ) ; return removeMapping ( entry.getKey ( ) , entry.getValue ( ) ) ; }

Target:
public boolean remove ( java.lang.Object o ) { if ( ! ( o instanceof java.util.Map.Entry ) ) return false ; java.util.Map.Entry < ? , ? > entry = ( ( java.util.Map.Entry < ? , ? > ) ( o ) ) ; return removeMapping ( entry.getKey ( ) , entry.getValue ( ) ) ; }
Source:
public void run ( ) { android.webkit.WebViewProviderResponse threadResponse = mWebViewUpdateServiceImpl.waitForAndGetProvider ( ) ; assertEquals ( WebViewFactory.LIBLOAD_SUCCESS , threadResponse.status ) ; assertEquals ( secondPackage , threadResponse.packageInfo.packageName ) ; org.mockito.Mockito.verify ( mTestSystemImpl ) . killPackageDependents ( org.mockito.Mockito.eq ( firstPackage ) ) ; countdown.countDown ( ) ; }

Target:
public void run ( ) { android.webkit.WebViewProviderResponse threadResponse = mWebViewUpdateServiceImpl.waitForAndGetProvider ( ) ; org.junit.Assert.assertEquals ( WebViewFactory.LIBLOAD_SUCCESS , threadResponse.status ) ; org.junit.Assert.assertEquals ( secondPackage , threadResponse.packageInfo.packageName ) ; org.mockito.Mockito.verify ( mTestSystemImpl ) . killPackageDependents ( org.mockito.Mockito.eq ( firstPackage ) ) ; countdown.countDown ( ) ; }
Source:
public void onResume ( ) { super . onResume ( ) ; com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , ( ( ( "onResume - mIsResponseSent[" + ( mIsResponseSent ) ) + "], slot id: " ) + ( mSlotId ) ) ) ; startTimeOut ( ) ; appService.getStkContext ( mSlotId ) . setPendingActivityInstance ( null ) ; if ( mIsResponseSent ) { cancelTimeOut ( ) ; finish ( ) ; } }

Target:
public void onResume ( ) { super . onResume ( ) ; com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , ( ( ( "onResume - mIsResponseSent[" + ( mIsResponseSent ) ) + "], slot id: " ) + ( mSlotId ) ) ) ; startTimeOut ( ) ; if ( mIsResponseSent ) { cancelTimeOut ( ) ; finish ( ) ; } }
Source:
public synchronized void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { mSecureElementService = ISecureElementService.Stub.asInterface ( service ) ; if ( ( mSEListener ) != null ) { try { mSEListener.serviceConnected ( ) ; } catch ( android.os.RemoteException ignore ) { } } android.util.Log.i ( android.se.omapi.SEService.TAG , "Service onServiceConnected" ) ; }

Target:
public synchronized void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { mSecureElementService = ISecureElementService.Stub.asInterface ( service ) ; if ( ( mSEListener ) != null ) { mSEListener.onServiceConnected ( ) ; } android.util.Log.i ( android.se.omapi.SEService.TAG , "Service onServiceConnected" ) ; }
Source:
public int getTargetSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { try { java.lang.Integer value = com.android.xml.AndroidManifest.getTargetSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ; if ( value != null ) { return value ; } else { return - 1 ; } } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } return - 1 ; }

Target:
public java.lang.Object getTargetSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { try { return com.android.xml.AndroidManifest.getTargetSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } return - 1 ; }
Source:
public com.android.jack.dx.dex.file.FieldIdItem intern ( com.android.jack.dx.rop.cst.CstFieldRef field ) { if ( field == null ) { throw new java.lang.NullPointerException ( "field == null" ) ; } throwIfPrepared ( ) ; com.android.jack.dx.dex.file.FieldIdItem result = fieldIds.get ( field ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.FieldIdItem ( field ) ; fieldIds.put ( field , result ) ; } return result ; }

Target:
public com.android.jack.dx.dex.file.FieldIdItem intern ( com.android.jack.dx.rop.cst.CstFieldRef field ) { assert field != null ; throwIfPrepared ( ) ; com.android.jack.dx.dex.file.FieldIdItem result = fieldIds.get ( field ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.FieldIdItem ( field ) ; fieldIds.put ( field , result ) ; } return result ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( ( method.getEnclosingType ( ) . isExternal ( ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } solve ( method ) ; checker.check ( method ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } solve ( method ) ; checker.check ( method ) ; }
Source:
private void closeEffects ( ) { android.util.Log.v ( com.android.camera.VideoCamera.TAG , "Closing effects" ) ; if ( ( mEffectsRecorder ) == null ) { android.util.Log.d ( com.android.camera.VideoCamera.TAG , "Effects are already closed. Nothing to do" ) ; } mEffectsRecorder.release ( ) ; mEffectType = EffectsRecorder.EFFECT_NONE ; }

Target:
private void closeEffects ( ) { android.util.Log.v ( com.android.camera.VideoCamera.TAG , "Closing effects" ) ; mEffectType = EffectsRecorder.EFFECT_NONE ; if ( ( mEffectsRecorder ) == null ) { android.util.Log.d ( com.android.camera.VideoCamera.TAG , "Effects are already closed. Nothing to do" ) ; return ; } mEffectsRecorder.release ( ) ; mEffectsRecorder = null ; }
Source:
public void test_d2i_SSL_SESSION ( ) throws java.lang.Exception { try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_SSL_SESSION ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } assertEquals ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_SSL_SESSION ( new byte [ 0 ] ) ) ; assertEquals ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_SSL_SESSION ( new byte [ 1 ] ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.assertNoErrors ( ) ; }

Target:
public void test_d2i_SSL_SESSION ( ) throws java.lang.Exception { try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_SSL_SESSION ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } assertEquals ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_SSL_SESSION ( new byte [ 0 ] ) ) ; assertEquals ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_SSL_SESSION ( new byte [ 1 ] ) ) ; }
Source:
public boolean equals ( java.lang.Object ob ) { if ( ob == ( this ) ) return true ; if ( ! ( ob instanceof sun.nio.fs.UnixFileStore ) ) return false ; sun.nio.fs.UnixFileStore other = ( ( sun.nio.fs.UnixFileStore ) ( ob ) ) ; return ( ( this . dev ) == ( other.dev ) ) && ( java.util.Arrays.equals ( this . entry.dir ( ) , other.entry.dir ( ) ) ) ; }

Target:
public boolean equals ( java.lang.Object ob ) { if ( ob == ( this ) ) return true ; if ( ! ( ob instanceof sun.nio.fs.UnixFileStore ) ) return false ; sun.nio.fs.UnixFileStore other = ( ( sun.nio.fs.UnixFileStore ) ( ob ) ) ; return ( ( ( this . dev ) == ( other.dev ) ) && ( java.util.Arrays.equals ( this . entry.dir ( ) , other.entry.dir ( ) ) ) ) && ( this . entry.name ( ) . equals ( other.entry.name ( ) ) ) ; }
Source:
private static com.android.server.wifi.WifiConfigStore.StoreFile createFile ( java.io.File storeBaseDir ) { java.io.File storeDir = new java.io.File ( storeBaseDir , com.android.server.wifi.WifiConfigStore.STORE_DIRECTORY_NAME ) ; if ( ! ( storeDir.exists ( ) ) ) { if ( ! ( storeDir.mkdir ( ) ) ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigStore.TAG , ( "Could not create store directory " + storeDir ) ) ; return null ; } } return new com.android.server.wifi.WifiConfigStore.StoreFile ( new java.io.File ( storeDir , com.android.server.wifi.WifiConfigStore.STORE_FILE_NAME ) ) ; }

Target:
private static com.android.server.wifi.WifiConfigStore.StoreFile createFile ( java.io.File storeBaseDir ) { java.io.File storeDir = new java.io.File ( storeBaseDir , com.android.server.wifi.WifiConfigStore.STORE_DIRECTORY_NAME ) ; if ( ! ( storeDir.exists ( ) ) ) { if ( ! ( storeDir.mkdir ( ) ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigStore.TAG , ( "Could not create store directory " + storeDir ) ) ; } } return new com.android.server.wifi.WifiConfigStore.StoreFile ( new java.io.File ( storeDir , com.android.server.wifi.WifiConfigStore.STORE_FILE_NAME ) ) ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , java.lang.Object array ) { try { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; } finally { android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; } }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , short [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 2 ) ) ; }

Target:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , long [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 8 ) ) ; }
Source:
public < T > T record ( @ com.android.annotations.NonNull com.android.builder.profile.ExecutionType executionType , @ com.android.annotations.NonNull com.android.builder.profile.Block < T > block , com.android.builder.profile.Property ... properties ) { try { return block.call ( ) ; } catch ( java.lang.Exception e ) { block.handleException ( e ) ; } return null ; }

Target:
public < T > T record ( @ com.android.annotations.NonNull com.android.builder.profile.ExecutionType executionType , @ com.android.annotations.NonNull com.android.builder.profile.Block < T > block , @ com.android.annotations.NonNull java.util.List < com.android.builder.profile.Property > properties ) { try { return block.call ( ) ; } catch ( java.lang.Exception e ) { block.handleException ( e ) ; } return null ; }
Source:
public void testGetMergedDocument ( ) { com.android.manifmerger.XmlDocument xmlDocument = new com.android.manifmerger.XmlDocument ( new com.android.utils.PositionXmlParser ( ) , mSourceLocation , mKeyResolver , mPropertyResolver , mElement , XmlDocument.Type.MAIN , com.google.common.base.Optional.< java.lang.String > absent ( ) ) ; com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . setMergedDocument ( xmlDocument ) . build ( ) ; assertTrue ( mergingReport.getMergedDocument ( ) . isPresent ( ) ) ; assertEquals ( xmlDocument , mergingReport.getMergedDocument ( ) . get ( ) ) ; }

Target:
public void testGetMergedDocument ( ) { com.android.manifmerger.XmlDocument xmlDocument = new com.android.manifmerger.XmlDocument ( mSourceLocation , mKeyResolver , mPropertyResolver , mElement , XmlDocument.Type.MAIN , com.google.common.base.Optional.< java.lang.String > absent ( ) ) ; com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . setMergedDocument ( xmlDocument ) . build ( ) ; assertTrue ( mergingReport.getMergedDocument ( ) . isPresent ( ) ) ; assertEquals ( xmlDocument , mergingReport.getMergedDocument ( ) . get ( ) ) ; }
Source:
private java.lang.String localeIdName ( java.lang.String localeId ) { if ( ( nameLength ) == ( android.icu.text.DisplayContext.LENGTH_SHORT ) ) { java.lang.String locIdName = langData.get ( "Languages%short" , localeId ) ; if ( ! ( locIdName.equals ( localeId ) ) ) { return locIdName ; } } return langData.get ( "Languages" , localeId ) ; }

Target:
private java.lang.String localeIdName ( java.lang.String localeId ) { if ( ( nameLength ) == ( android.icu.text.DisplayContext.LENGTH_SHORT ) ) { java.lang.String locIdName = langData.get ( "Languages%short" , localeId ) ; if ( ( locIdName != null ) && ( ! ( locIdName.equals ( localeId ) ) ) ) { return locIdName ; } } return langData.get ( "Languages" , localeId ) ; }
Source:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; loadedMerger.loadFromBlob ( folder ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }

Target:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; loadedMerger.loadFromBlob ( folder , true ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }
Source:
public void copyTo ( float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsFloat32 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyTo ( float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsFloat32 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.FLOAT_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private boolean acquireWakeLock ( java.lang.String lockName ) { if ( ( mWakeLock ) != null ) { if ( ! ( lockName.equals ( mWakeLockName ) ) ) { errorLog ( ( "Multiple wake lock acquisition attempted; aborting: " + lockName ) ) ; return false ; } if ( mWakeLock.isHeld ( ) ) { return true ; } } mWakeLockName = lockName ; mWakeLock = mPowerManager.newWakeLock ( PowerManager.PARTIAL_WAKE_LOCK , lockName ) ; mWakeLock.acquire ( ) ; return true ; }

Target:
private boolean acquireWakeLock ( java.lang.String lockName ) { synchronized ( this ) { if ( ( mWakeLock ) == null ) { mWakeLockName = lockName ; mWakeLock = mPowerManager.newWakeLock ( PowerManager.PARTIAL_WAKE_LOCK , lockName ) ; } if ( ! ( mWakeLock.isHeld ( ) ) ) mWakeLock.acquire ( ) ; } return true ; }
Source:
public boolean onPrepareOptionsMenu ( com.android.internal.telephony.cat.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean mainVisible = false ; if ( ( ( mState ) == ( com.android.stk.StkMenuActivity.STATE_SECONDARY ) ) && ( mAcceptUsersInput ) ) { mainVisible = true ; } menu.findItem ( StkApp.MENU_ID_END_SESSION ) . setVisible ( mainVisible ) ; return true ; }

Target:
public boolean onPrepareOptionsMenu ( com.android.internal.telephony.cat.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean mainVisible = false ; if ( ( ( mState ) == ( com.android.stk.StkMenuActivity.STATE_SECONDARY ) ) && ( mAcceptUsersInput ) ) { mainVisible = true ; } menu.findItem ( StkApp.MENU_ID_END_SESSION ) . setVisible ( mainVisible ) ; return mainVisible ; }
Source:
private void runConfigMatchTest ( java.lang.String refConfig , int resultIndex , java.lang.String ... configs ) { com.android.ide.common.resources.configuration.FolderConfiguration reference = com.android.ide.common.resources.configuration.FolderConfiguration.getConfig ( com.android.ide.common.resources.configuration.FolderConfigurationTest.getFolderSegments ( refConfig ) ) ; assertNotNull ( reference ) ; java.util.List < ? extends com.android.ide.common.resources.configuration.Configurable > list = getConfigurable ( configs ) ; com.android.ide.common.resources.configuration.Configurable match = reference.findMatchingConfigurable ( list ) ; java.lang.System.out.println ( match.toString ( ) ) ; assertEquals ( resultIndex , list.indexOf ( match ) ) ; }

Target:
private void runConfigMatchTest ( java.lang.String refConfig , int resultIndex , java.lang.String ... configs ) { com.android.ide.common.resources.configuration.FolderConfiguration reference = com.android.ide.common.resources.configuration.FolderConfiguration.getConfig ( com.android.ide.common.resources.configuration.FolderConfigurationTest.getFolderSegments ( refConfig ) ) ; assertNotNull ( reference ) ; java.util.List < ? extends com.android.ide.common.resources.configuration.Configurable > list = getConfigurable ( configs ) ; com.android.ide.common.resources.configuration.Configurable match = reference.findMatchingConfigurable ( list ) ; assertEquals ( resultIndex , list.indexOf ( match ) ) ; }
Source:
public void testWifiFeature ( ) throws java.lang.Exception { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI ) ) ) { return ; } boolean enabled = mWifiManager.isWifiEnabled ( ) ; try { if ( mWifiManager.setWifiEnabled ( true ) ) { assertAvailable ( PackageManager.FEATURE_WIFI ) ; } } finally { if ( ! enabled ) { mWifiManager.setWifiEnabled ( false ) ; } } }

Target:
public void testWifiFeature ( ) throws java.lang.Exception { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI ) ) ) { return ; } boolean enabled = mWifiManager.isWifiEnabled ( ) ; try { assertTrue ( mWifiManager.setWifiEnabled ( ( ! enabled ) ) ) ; } finally { mWifiManager.setWifiEnabled ( enabled ) ; } }
Source:
public void testSingleSequentialUpdate ( ) throws java.lang.Exception { final long fileSize = android.filesystem.cts.FileUtil.getFileSizeExceedingMemory ( getContext ( ) , android.filesystem.cts.SequentialRWTest.BUFFER_SIZE ) ; if ( fileSize == 0 ) { return ; } final int NUMBER_REPETITION = 6 ; java.lang.String streamName = "test_single_sequential_update" ; android.filesystem.cts.FileUtil.doSequentialUpdateTest ( getContext ( ) , android.filesystem.cts.SequentialRWTest.DIR_SEQ_UPDATE , fileSize , android.filesystem.cts.SequentialRWTest.BUFFER_SIZE , NUMBER_REPETITION , android.filesystem.cts.SequentialRWTest.REPORT_LOG_NAME , streamName ) ; }

Target:
public void testSingleSequentialUpdate ( ) throws java.lang.Exception { final long fileSize = android.filesystem.cts.FileUtil.getFileSizeExceedingMemory ( getContext ( ) , android.filesystem.cts.SequentialRWTest.BUFFER_SIZE ) ; if ( fileSize == 0 ) { return ; } final int NUMBER_REPETITION = 3 ; java.lang.String streamName = "test_single_sequential_update" ; android.filesystem.cts.FileUtil.doSequentialUpdateTest ( getContext ( ) , android.filesystem.cts.SequentialRWTest.DIR_SEQ_UPDATE , fileSize , android.filesystem.cts.SequentialRWTest.BUFFER_SIZE , NUMBER_REPETITION , android.filesystem.cts.SequentialRWTest.REPORT_LOG_NAME , streamName ) ; }
Source:
protected org.eclipse.swt.widgets.Control createControl ( org.eclipse.swt.widgets.Composite parent ) { parent.setLayout ( new org.eclipse.swt.layout.GridLayout ( 1 , false ) ) ; org.eclipse.swt.widgets.Composite c = new org.eclipse.swt.widgets.Composite ( parent , org.eclipse.swt.SWT.NONE ) ; c.setLayout ( new org.eclipse.swt.layout.GridLayout ( 1 , false ) ) ; c.setLayoutData ( new org.eclipse.swt.layout.GridData ( org.eclipse.swt.layout.GridData.FILL_BOTH ) ) ; createControlsSection ( c ) ; createDetailsSection ( c ) ; clientSelected ( ) ; return c ; }

Target:
protected org.eclipse.swt.widgets.Control createControl ( org.eclipse.swt.widgets.Composite parent ) { org.eclipse.swt.widgets.Composite c = new org.eclipse.swt.widgets.Composite ( parent , org.eclipse.swt.SWT.NONE ) ; c.setLayout ( new org.eclipse.swt.layout.GridLayout ( 1 , false ) ) ; c.setLayoutData ( new org.eclipse.swt.layout.GridData ( org.eclipse.swt.layout.GridData.FILL_BOTH ) ) ; createControlsSection ( c ) ; createDetailsSection ( c ) ; clientSelected ( ) ; return c ; }
Source:
private static javax.swing.Icon [ ] findStepIcons ( java.lang.String prefix ) { javax.swing.Icon [ ] icons = new javax.swing.Icon [ icons.GoogleCloudToolsIcons.STEPS_COUNT ] ; for ( int i = 0 ; i <= ( ( icons.GoogleCloudToolsIcons.STEPS_COUNT ) - 1 ) ; i ++ ) { icons [ i ] = com.intellij.openapi.util.IconLoader.getIcon ( ( ( prefix + ( i + 1 ) ) + ".png" ) ) ; } return icons ; }

Target:
private static javax.swing.Icon [ ] findStepIcons ( java.lang.String prefix ) { javax.swing.Icon [ ] icons = new javax.swing.Icon [ icons.GoogleCloudToolsIcons.STEPS_COUNT ] ; for ( int i = 0 ; i < ( icons.GoogleCloudToolsIcons.STEPS_COUNT ) ; i ++ ) { icons [ i ] = com.intellij.openapi.util.IconLoader.getIcon ( ( ( prefix + ( i + 1 ) ) + ".png" ) ) ; } return icons ; }
Source:
public void push ( final float value ) { int bits = java.lang.Float.floatToIntBits ( value ) ; if ( ( ( bits == 0L ) || ( bits == 1065353216 ) ) || ( bits == 1073741824 ) ) { mv.visitInsn ( ( ( org.objectweb.asm.Opcodes.FCONST_0 ) + ( ( int ) ( value ) ) ) ) ; } else { mv.visitLdcInsn ( new java.lang.Float ( value ) ) ; } }

Target:
public void push ( final float value ) { int bits = java.lang.Float.floatToIntBits ( value ) ; if ( ( ( bits == 0L ) || ( bits == 1065353216 ) ) || ( bits == 1073741824 ) ) { mv.visitInsn ( ( ( org.objectweb.asm.Opcodes.FCONST_0 ) + ( ( int ) ( value ) ) ) ) ; } else { mv.visitLdcInsn ( value ) ; } }
Source:
private boolean isNetworkInConfigStoreData ( android.net.wifi.WifiConfiguration configuration ) { com.android.server.wifi.WifiConfigStoreData storeData = captureWriteStoreData ( ) ; if ( storeData == null ) { return false ; } boolean foundNetworkInStoreData = false ; for ( android.net.wifi.WifiConfiguration retrievedConfig : storeData.getConfigurations ( ) ) { if ( retrievedConfig.configKey ( ) . equals ( configuration.configKey ( ) ) ) { foundNetworkInStoreData = true ; } } return foundNetworkInStoreData ; }

Target:
private boolean isNetworkInConfigStoreData ( android.net.wifi.WifiConfiguration configuration , com.android.server.wifi.WifiConfigStoreData storeData ) { boolean foundNetworkInStoreData = false ; for ( android.net.wifi.WifiConfiguration retrievedConfig : storeData.getConfigurations ( ) ) { if ( retrievedConfig.configKey ( ) . equals ( configuration.configKey ( ) ) ) { foundNetworkInStoreData = true ; break ; } } return foundNetworkInStoreData ; }
Source:
public boolean disconnect ( ) { if ( android.bluetooth.BluetoothPbap.DBG ) android.bluetooth.BluetoothPbap.log ( "disconnect()" ) ; final android.bluetooth.IBluetoothPbap service = mService ; if ( service != null ) { try { service.disconnect ( ) ; return true ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothPbap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothPbap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothPbap.DBG ) android.bluetooth.BluetoothPbap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }

Target:
public boolean disconnect ( android.bluetooth.BluetoothDevice device ) { android.bluetooth.BluetoothPbap.log ( "disconnect()" ) ; final android.bluetooth.IBluetoothPbap service = mService ; if ( service == null ) { android.util.Log.w ( android.bluetooth.BluetoothPbap.TAG , "Proxy not attached to service" ) ; return false ; } try { service.disconnect ( device ) ; return true ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothPbap.TAG , e.toString ( ) ) ; } return false ; }
Source:
private java.lang.Object waitForObject ( ) { while ( true ) { java.lang.Object object = java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingObject ; if ( object != null ) { return object ; } synchronized ( this ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { return null ; } } } }

Target:
private boolean waitForObject ( ) { while ( true ) { java.lang.Object object = java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingObject ; if ( object != null ) { return true ; } synchronized ( this ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { return false ; } } } }
Source:
public void testIndividualNativeFields ( ) { android.net.UidRange original = new android.net.UidRange ( 286348920 , 572670753 ) ; byte [ ] originalBytes = android.net.UidRangeTest.marshall ( original ) ; assertEquals ( original.start , android.net.UidRangeTest.getStart ( originalBytes ) ) ; assertEquals ( original.stop , android.net.UidRangeTest.getStop ( originalBytes ) ) ; }

Target:
public void testIndividualNativeFields ( ) { android.net.UidRange original = new android.net.UidRange ( 286348920 , 572670753 ) ; byte [ ] originalBytes = android.net.UidRangeTest.marshall ( original ) ; org.junit.Assert.assertEquals ( original.start , android.net.UidRangeTest.getStart ( originalBytes ) ) ; org.junit.Assert.assertEquals ( original.stop , android.net.UidRangeTest.getStop ( originalBytes ) ) ; }
Source:
public java.lang.Boolean bluetoothToggleState ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "enabled" ) java.lang.Boolean enabled , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "prompt" , description = "Prompt the user to confirm changing the Bluetooth state." ) java.lang.Boolean prompt ) { mService.registerReceiver ( mStateReceiver , new android.content.IntentFilter ( android.bluetooth.BluetoothAdapter.ACTION_STATE_CHANGED ) ) ; if ( enabled == null ) { enabled = ! ( bluetoothCheckState ( ) ) ; } if ( enabled ) { mBluetoothAdapter.enable ( ) ; } else { shutdown ( ) ; mBluetoothAdapter.disable ( ) ; } return enabled ; }

Target:
public java.lang.Boolean bluetoothToggleState ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "enabled" ) java.lang.Boolean enabled , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "prompt" , description = "Prompt the user to confirm changing the Bluetooth state." ) java.lang.Boolean prompt ) { mService.registerReceiver ( mStateReceiver , new android.content.IntentFilter ( android.bluetooth.BluetoothAdapter.ACTION_STATE_CHANGED ) ) ; if ( enabled == null ) { enabled = ! ( bluetoothCheckState ( ) ) ; } if ( enabled ) { return mBluetoothAdapter.enable ( ) ; } else { shutdown ( ) ; return mBluetoothAdapter.disable ( ) ; } }
Source:
private void addStreamToTests ( com.android.cts.verifier.ArrayTestListAdapter streams , com.android.cts.verifier.streamquality.StreamingVideoActivity.Stream stream ) { android.content.Intent i = new android.content.Intent ( this , com.android.cts.verifier.streamquality.PlayVideoActivity.class ) ; i.putExtra ( PlayVideoActivity.EXTRA_STREAM , stream ) ; streams.add ( com.android.cts.verifier.TestListAdapter.TestListItem.newTest ( stream.name , com.android.cts.verifier.streamquality.PlayVideoActivity.getTestId ( stream.code ) , i ) ) ; }

Target:
private void addStreamToTests ( com.android.cts.verifier.ArrayTestListAdapter streams , com.android.cts.verifier.streamquality.StreamingVideoActivity.Stream stream ) { android.content.Intent i = new android.content.Intent ( this , com.android.cts.verifier.streamquality.PlayVideoActivity.class ) ; i.putExtra ( PlayVideoActivity.EXTRA_STREAM , stream ) ; streams.add ( com.android.cts.verifier.TestListAdapter.TestListItem.newTest ( stream.name , com.android.cts.verifier.streamquality.PlayVideoActivity.getTestId ( stream.code ) , i , null ) ) ; }
Source:
public void stopHal ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { mWifiVendorHal.stopVendorHal ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.stopHalNative ( ) ; try { com.android.server.wifi.WifiNative.sThread.join ( com.android.server.wifi.WifiNative.STOP_HAL_TIMEOUT_MS ) ; android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "HAL event thread stopped successfully" ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "Could not stop HAL cleanly" ) ; } com.android.server.wifi.WifiNative.sThread = null ; com.android.server.wifi.WifiNative.sWifiHalHandle = 0 ; com.android.server.wifi.WifiNative.sWifiIfaceHandles = null ; com.android.server.wifi.WifiNative.sWlan0Index = - 1 ; } } } }

Target:
public void stopHal ( ) { mWifiVendorHal.stopVendorHal ( ) ; }
Source:
private static java.nio.file.Path createAndRegisterLambdaDumpDirectory ( ) throws java.io.IOException { java.lang.String propertyValue = java.lang.System.getProperty ( LambdaClassMaker.LAMBDA_METAFACTORY_DUMPER_PROPERTY ) ; java.nio.file.Path dumpDirectory ; if ( propertyValue != null ) { dumpDirectory = java.nio.file.Paths.get ( propertyValue ) ; } else { dumpDirectory = java.nio.file.Files.createTempDirectory ( "lambdas" ) ; java.lang.System.setProperty ( LambdaClassMaker.LAMBDA_METAFACTORY_DUMPER_PROPERTY , dumpDirectory.toString ( ) ) ; } com.google.devtools.build.android.desugar.Desugar.deleteTreeOnExit ( dumpDirectory ) ; return dumpDirectory ; }

Target:
private static java.nio.file.Path createAndRegisterLambdaDumpDirectory ( ) throws java.io.IOException { java.lang.String propertyValue = java.lang.System.getProperty ( LambdaClassMaker.LAMBDA_METAFACTORY_DUMPER_PROPERTY ) ; if ( propertyValue != null ) { return java.nio.file.Paths.get ( propertyValue ) ; } java.nio.file.Path dumpDirectory = java.nio.file.Files.createTempDirectory ( "lambdas" ) ; java.lang.System.setProperty ( LambdaClassMaker.LAMBDA_METAFACTORY_DUMPER_PROPERTY , dumpDirectory.toString ( ) ) ; com.google.devtools.build.android.desugar.Desugar.deleteTreeOnExit ( dumpDirectory ) ; return dumpDirectory ; }
Source:
public void testPrimaryOtherPackageWriteAccess ( ) throws java.lang.Exception { com.android.cts.externalstorageapp.CommonExternalStorageTest.deleteContents ( android.os.Environment.getExternalStorageDirectory ( ) ) ; final java.io.File ourCache = getContext ( ) . getExternalCacheDir ( ) ; final java.io.File otherCache = new java.io.File ( ourCache.getAbsolutePath ( ) . replace ( getContext ( ) . getPackageName ( ) , com.android.cts.externalstorageapp.CommonExternalStorageTest.PACKAGE_NONE ) ) ; assertTrue ( otherCache.mkdirs ( ) ) ; com.android.cts.externalstorageapp.CommonExternalStorageTest.assertDirReadWriteAccess ( otherCache ) ; }

Target:
public void testPrimaryOtherPackageWriteAccess ( ) throws java.lang.Exception { final java.io.File ourCache = getContext ( ) . getExternalCacheDir ( ) ; final java.io.File otherCache = new java.io.File ( ourCache.getAbsolutePath ( ) . replace ( getContext ( ) . getPackageName ( ) , com.android.cts.externalstorageapp.CommonExternalStorageTest.PACKAGE_NONE ) ) ; com.android.cts.externalstorageapp.CommonExternalStorageTest.deleteContents ( otherCache ) ; assertTrue ( otherCache.mkdirs ( ) ) ; com.android.cts.externalstorageapp.CommonExternalStorageTest.assertDirReadWriteAccess ( otherCache ) ; }
Source:
private void evaluateBinding ( java.lang.String carrierPackageName , boolean forceUnbind ) { for ( com.android.internal.telephony.CarrierServiceBindHelper.AppBinding appBinding : mBindings ) { java.lang.String appBindingPackage = appBinding.getPackage ( ) ; boolean isBindingForPackage = carrierPackageName.equals ( appBindingPackage ) ; if ( isBindingForPackage ) { com.android.internal.telephony.CarrierServiceBindHelper.log ( ( carrierPackageName + " changed and corresponds to a phone. Rebinding." ) ) ; } if ( ( appBindingPackage == null ) || isBindingForPackage ) { if ( forceUnbind ) { appBinding.unbind ( ) ; } appBinding.rebind ( ) ; } } }

Target:
private void evaluateBinding ( java.lang.String carrierPackageName , boolean forceUnbind ) { for ( com.android.internal.telephony.CarrierServiceBindHelper.AppBinding appBinding : mBindings ) { java.lang.String appBindingPackage = appBinding.getPackage ( ) ; boolean isBindingForPackage = carrierPackageName.equals ( appBindingPackage ) ; if ( isBindingForPackage ) { com.android.internal.telephony.CarrierServiceBindHelper.log ( ( carrierPackageName + " changed and corresponds to a phone. Rebinding." ) ) ; } if ( ( appBindingPackage == null ) || isBindingForPackage ) { if ( forceUnbind ) { appBinding.unbind ( true ) ; } appBinding.rebind ( ) ; } } }
Source:
static com.android.ide.common.res2.ResourceMerger.MergedResourceItem getMergedResourceItem ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.NonNull java.lang.String qualifiers ) { com.android.resources.ResourceType type = com.android.ide.common.res2.ValueResourceParser2.getType ( node , null ) ; java.lang.String name = com.android.ide.common.res2.ValueResourceParser2.getName ( node ) ; if ( name != null ) { if ( type != null ) { return new com.android.ide.common.res2.ResourceMerger.MergedResourceItem ( name , type , qualifiers , node ) ; } } return null ; }

Target:
static com.android.ide.common.res2.ResourceMerger.MergedResourceItem getMergedResourceItem ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.NonNull java.lang.String qualifiers ) { com.android.resources.ResourceType type = com.android.ide.common.res2.ValueResourceParser2.getType ( node , null ) ; java.lang.String name = com.android.ide.common.res2.ValueResourceParser2.getName ( node ) ; if ( ( name != null ) && ( type != null ) ) { return new com.android.ide.common.res2.ResourceMerger.MergedResourceItem ( name , type , qualifiers , node ) ; } return null ; }
Source:
public boolean inDaylightTime ( java.util.Date time ) { long when = time.getTime ( ) ; int unix = ( ( int ) ( when / 1000 ) ) ; int transition = java.util.Arrays.binarySearch ( mTransitions , unix ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return false ; } } return ( mIsDsts [ ( ( mTypes [ transition ] ) & 255 ) ] ) == 1 ; }

Target:
public boolean inDaylightTime ( java.util.Date time ) { long when = time.getTime ( ) ; long unix = when / 1000 ; int transition = java.util.Arrays.binarySearch ( mTransitions , unix ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return false ; } } return ( mIsDsts [ ( ( mTypes [ transition ] ) & 255 ) ] ) == 1 ; }
Source:
private static com.android.jack.ir.ast.JMethodIdWide getStaticMethodOrReportFailure ( com.android.jack.ir.ast.JClass cls , java.lang.String name , com.android.sched.util.config.id.PropertyId < java.lang.String > prop ) { try { return cls.getMethodIdWide ( name , java.util.Collections.< com.android.jack.ir.ast.JType > emptyList ( ) , MethodKind.STATIC ) ; } catch ( java.lang.Throwable e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , new com.android.jack.transformations.ast.BoostLockedRegionPriority.BadBoostLockedRegionPriorityConfigurationException ( prop , e ) ) ; com.android.jack.Jack.getSession ( ) . abortEventually ( ) ; return null ; } }

Target:
private static com.android.jack.ir.ast.JMethodIdWide getStaticMethodOrReportFailure ( com.android.jack.ir.ast.JClass cls , java.lang.String name , java.lang.String prop ) { try { return cls.getMethodIdWide ( name , java.util.Collections.< com.android.jack.ir.ast.JType > emptyList ( ) , MethodKind.STATIC ) ; } catch ( java.lang.Throwable e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , new com.android.jack.transformations.ast.BoostLockedRegionPriority.BadBoostLockedRegionPriorityConfigurationException ( prop , e ) ) ; com.android.jack.Jack.getSession ( ) . abortEventually ( ) ; return null ; } }
Source:
public com.android.layoutlib.api.LayoutScene render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes , boolean transparentBackground ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.layoutlib.LayoutLibrary layoutLib = getReadyLayoutLib ( ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes , transparentBackground ) ; }

Target:
public com.android.layoutlib.api.LayoutScene render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes , boolean transparentBackground ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.layoutlib.LayoutLibrary layoutLib = getReadyLayoutLib ( true ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes , transparentBackground ) ; }
Source:
public void run ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.progress.ProgressIndicator indicator ) { indicator.setIndeterminate ( true ) ; if ( ! ( indicator instanceof com.intellij.openapi.wm.ex.ProgressIndicatorEx ) ) { return ; } ( ( com.intellij.openapi.wm.ex.ProgressIndicatorEx ) ( indicator ) ) . addStateDelegate ( new com.intellij.openapi.progress.util.ProgressIndicatorBase ( ) { @ java.lang.Override public void cancel ( ) { assert ( uiFacade ) != null ; uiFacade.stop ( ) ; super . cancel ( ) ; } } ) ; loggedIn = ( state != null ) && ( state.logInWithLocalServer ( message ) ) ; }

Target:
public void run ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.progress.ProgressIndicator indicator ) { indicator.setIndeterminate ( true ) ; if ( ! ( indicator instanceof com.intellij.openapi.wm.ex.ProgressIndicatorEx ) ) { return ; } ( ( com.intellij.openapi.wm.ex.ProgressIndicatorEx ) ( indicator ) ) . addStateDelegate ( new com.intellij.openapi.progress.util.ProgressIndicatorBase ( ) { @ java.lang.Override public void cancel ( ) { assert ( uiFacade ) != null ; uiFacade.stop ( ) ; super . cancel ( ) ; } } ) ; loggedIn = state.logInWithLocalServer ( message ) ; }