auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static byte [ ] getKeyBytes ( java.lang.String string ) { try { int utfCount = ( ( int ) ( java.nio.charset.ModifiedUtf8.countBytes ( string , false ) ) ) ; byte [ ] result = new byte [ utfCount ] ; java.nio.charset.ModifiedUtf8.encode ( result , 0 , string ) ; return result ; } catch ( java.io.UTFDataFormatException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public boolean ungrant ( java.lang.String key , int uid ) { try { return ( mBinder.ungrant ( key , uid ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( ( description.getTestClass ( ) . isAnnotationPresent ( mAnnotationClass ) ) || ( ( description.getAnnotation ( mAnnotationClass ) ) != null ) ) { return false ; } else { return true ; } }

Target:
public boolean shouldRun ( org.junit.runner.Description description ) { final java.lang.Class < ? > testClass = description.getTestClass ( ) ; if ( testClass == null ) { return true ; } if ( ( testClass.isAnnotationPresent ( mAnnotationClass ) ) || ( ( description.getAnnotation ( mAnnotationClass ) ) != null ) ) { return false ; } else { return true ; } }
Source:
protected int getCombinedRegState ( ) { int regState = mSS.getVoiceRegState ( ) ; int dataRegState = mSS.getDataRegState ( ) ; if ( ( regState == ( android.telephony.ServiceState.STATE_OUT_OF_SERVICE ) ) && ( dataRegState == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) ) { log ( "getCombinedRegState: return STATE_IN_SERVICE as Data is in service" ) ; regState = dataRegState ; } return regState ; }

Target:
protected int getCombinedRegState ( ) { int regState = mSS.getVoiceRegState ( ) ; int dataRegState = mSS.getDataRegState ( ) ; if ( ( ( regState == ( android.telephony.ServiceState.STATE_OUT_OF_SERVICE ) ) || ( regState == ( android.telephony.ServiceState.STATE_POWER_OFF ) ) ) && ( dataRegState == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) ) { log ( "getCombinedRegState: return STATE_IN_SERVICE as Data is in service" ) ; regState = dataRegState ; } return regState ; }
Source:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FQDN ; config.homeSp.friendlyName = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FRIENDLY_NAME ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.realm = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_REALM ; config.credential.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; config.credential.simCredential.imsi = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ; config.credential.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( new com.android.server.wifi.IMSIParameter ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ) ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }

Target:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FQDN ; config.homeSp.friendlyName = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FRIENDLY_NAME ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.realm = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_REALM ; config.credential.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; config.credential.simCredential.imsi = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ; config.credential.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI_PARAM ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }
Source:
void foo2 ( int [ ] array , int start , int end ) { for ( int i = start ; i <= end ; i ++ ) { array [ i ] = 1 ; sum += array [ i ] ; } }

Target:
void foo2 ( int [ ] array , int start , int end , boolean expectInterpreter ) { for ( int i = start ; i <= end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }
Source:
private static void recordCustomTimesHistogramMilliseconds ( java.lang.String name , long duration , long min , long max , int numBuckets ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordCustomTimesHistogramMilliseconds ( name , key , org.chromium.base.metrics.RecordHistogram.clampToInt ( duration ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( min ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( max ) , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void initialize ( ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; org.chromium.base.metrics.RecordHistogram.nativeInitialize ( ) ; }
Source:
public void onLinkPropertiesChanged ( android.net.Network network , android.net.LinkProperties linkProperties ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLinkPropertiesChanged" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) { mEventFacade.postEvent ( TelephonyConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.telephony.TelephonyEvents.NetworkCallbackEvent ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE ) ) ; } }

Target:
public void onLinkPropertiesChanged ( android.net.Network network , android.net.LinkProperties linkProperties ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLinkPropertiesChanged" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) { mEventFacade.postEvent ( ConnectivityConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.ConnectivityEvents.NetworkCallbackEventBase ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) ) ; } }
Source:
public android.database.Cursor query ( @ android.support.annotation.NonNull android.net.Uri uri , @ android.support.annotation.Nullable java.lang.String [ ] projection , @ android.support.annotation.Nullable java.lang.String selection , @ android.support.annotation.Nullable java.lang.String [ ] selectionArgs , @ android.support.annotation.Nullable java.lang.String sortOrder ) { checkReadContactsPermission ( ) ; return databaseHelper.getReadableDatabase ( ) . query ( PreferredSimDatabaseHelper.TABLE , projection , selection , selectionArgs , null , null , sortOrder ) ; }

Target:
public android.database.Cursor query ( @ android.support.annotation.NonNull android.net.Uri uri , @ android.support.annotation.Nullable java.lang.String [ ] projection , @ android.support.annotation.Nullable java.lang.String selection , @ android.support.annotation.Nullable java.lang.String [ ] selectionArgs , @ android.support.annotation.Nullable java.lang.String sortOrder ) { checkReadContactsPermission ( ) ; android.database.sqlite.SQLiteQueryBuilder queryBuilder = new android.database.sqlite.SQLiteQueryBuilder ( ) ; queryBuilder.setStrict ( true ) ; queryBuilder.setProjectionMap ( com.android.dialer.preferredsim.impl.PreferredSimFallbackProvider.PROJECTION_MAP ) ; queryBuilder.setTables ( PreferredSimDatabaseHelper.TABLE ) ; return queryBuilder.query ( databaseHelper.getReadableDatabase ( ) , projection , selection , selectionArgs , null , null , sortOrder ) ; }
Source:
private static com.android.sdklib.util.Pair < com.android.ide.eclipse.adt.internal.resources.ResourceType , java.lang.String > parseResource ( java.lang.String url ) { if ( ! ( url.startsWith ( "@" ) ) ) { return null ; } int typeEnd = url.indexOf ( '/' , 1 ) ; if ( typeEnd == ( - 1 ) ) { return null ; } int nameBegin = typeEnd + 1 ; int typeBegin = ( url.startsWith ( "@+" ) ) ? 2 : 1 ; int colon = url.lastIndexOf ( ':' , typeEnd ) ; if ( colon != ( - 1 ) ) { typeBegin = colon + 1 ; } java.lang.String typeName = url.substring ( typeBegin , typeEnd ) ; com.android.ide.eclipse.adt.internal.resources.ResourceType type = com.android.ide.eclipse.adt.internal.resources.ResourceType.getEnum ( typeName ) ; if ( type == null ) { return null ; } java.lang.String name = url.substring ( nameBegin ) ; return com.android.sdklib.util.Pair.of ( type , name ) ; }

Target:
private static com.android.sdklib.util.Pair < com.android.resources.ResourceType , java.lang.String > parseResource ( java.lang.String url ) { if ( ! ( url.startsWith ( "@" ) ) ) { return null ; } int typeEnd = url.indexOf ( '/' , 1 ) ; if ( typeEnd == ( - 1 ) ) { return null ; } int nameBegin = typeEnd + 1 ; int typeBegin = ( url.startsWith ( "@+" ) ) ? 2 : 1 ; int colon = url.lastIndexOf ( ':' , typeEnd ) ; if ( colon != ( - 1 ) ) { typeBegin = colon + 1 ; } java.lang.String typeName = url.substring ( typeBegin , typeEnd ) ; com.android.resources.ResourceType type = com.android.resources.ResourceType.getEnum ( typeName ) ; if ( type == null ) { return null ; } java.lang.String name = url.substring ( nameBegin ) ; return com.android.sdklib.util.Pair.of ( type , name ) ; }
Source:
private static < E > com.google.common.collect.Multiset.Entry < E > entryFromMapEntry ( java.util.Map.Entry < E , java.lang.Integer > entry ) { return com.google.common.collect.Multisets.immutableEntry ( entry.getKey ( ) , entry.getValue ( ) ) ; }

Target:
com.google.common.collect.Multiset.Entry < E > getEntry ( int index ) { java.util.Map.Entry < E , java.lang.Integer > mapEntry = map.entrySet ( ) . asList ( ) . get ( index ) ; return com.google.common.collect.Multisets.immutableEntry ( mapEntry.getKey ( ) , mapEntry.getValue ( ) ) ; }
Source:
private android.content.Intent waitForIntent ( int timeoutMs , java.util.concurrent.BlockingQueue < android.content.Intent > queue ) { try { android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNotNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( "Cannot obtain an Intent from the queue: " + ( e.getMessage ( ) ) ) ) ; } return null ; }

Target:
private void verifyNoConnectionStateIntent ( int timeoutMs , android.bluetooth.BluetoothDevice device ) { android.content.Intent intent = waitForNoIntent ( timeoutMs , mDeviceQueueMap.get ( device ) ) ; org.junit.Assert.assertNull ( intent ) ; }
Source:
private void updateTestProject ( ) { com.android.sdklib.internal.project.ProjectCreator creator = new com.android.sdklib.internal.project.ProjectCreator ( mSdkManager , mOsSdkFolder , ( mSdkCommandLine.isVerbose ( ) ? com.android.sdklib.internal.project.ProjectCreator.OutputLevel.VERBOSE : mSdkCommandLine.isSilent ( ) ? com.android.sdklib.internal.project.ProjectCreator.OutputLevel.SILENT : com.android.sdklib.internal.project.ProjectCreator.OutputLevel.NORMAL ) , mSdkLog ) ; java.lang.String projectDir = getProjectLocation ( mSdkCommandLine.getParamLocationPath ( ) ) ; creator.updateTestProject ( projectDir , mSdkCommandLine.getParamTestProjectMain ( ) , mSdkManager ) ; }

Target:
private com.android.sdklib.internal.project.ProjectCreator getProjectCreator ( ) { com.android.sdklib.internal.project.ProjectCreator creator = new com.android.sdklib.internal.project.ProjectCreator ( mSdkManager , mOsSdkFolder , ( mSdkCommandLine.isVerbose ( ) ? com.android.sdklib.internal.project.ProjectCreator.OutputLevel.VERBOSE : mSdkCommandLine.isSilent ( ) ? com.android.sdklib.internal.project.ProjectCreator.OutputLevel.SILENT : com.android.sdklib.internal.project.ProjectCreator.OutputLevel.NORMAL ) , mSdkLog ) ; return creator ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , int [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , byte [ ] data ) { validateIsInt8 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_8 , data.length ) ; }
Source:
public void testBadOfferWithoutACookie ( ) throws java.lang.Exception { final byte [ ] packet = com.android.internal.util.HexDump.hexStringToByteArray ( ( "450001518d0600004011144dc0a82b01c0a82bf7" + ( ( ( ( ( ( ( ( "00430044013d9ac7" + "02010600dfc23d1f0002000000000000c0a82bf7c0a82b0100000000" ) + "30766ff2a90c00000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) ) ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket offerPacket = android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , packet.length , android.net.dhcp.ENCAP_L3 ) ; } catch ( android.net.dhcp.DhcpPacket.DhcpPacket expected ) { assertDhcpErrorCodes ( DhcpErrorEvent.DHCP_NO_COOKIE , expected.errorCode ) ; return ; } fail ( "Dhcp packet parsing should have failed" ) ; }

Target:
public void testBadOfferWithoutACookie ( ) throws java.lang.Exception { final byte [ ] packet = com.android.internal.util.HexDump.hexStringToByteArray ( ( "450001518d0600004011144dc0a82b01c0a82bf7" + ( ( ( ( ( ( ( ( "00430044013d9ac7" + "02010600dfc23d1f0002000000000000c0a82bf7c0a82b0100000000" ) + "30766ff2a90c00000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) ) ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket offerPacket = android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , packet.length , android.net.dhcp.ENCAP_L3 ) ; } catch ( android.net.dhcp.DhcpPacket.DhcpPacket expected ) { assertDhcpErrorCodes ( DhcpErrorEvent.DHCP_NO_COOKIE , expected.errorCode ) ; return ; } org.junit.Assert.fail ( "Dhcp packet parsing should have failed" ) ; }
Source:
public void invocationEnded ( long elapsedTime ) { if ( isShardResultReporter ( ) ) { mMasterResultReporter.invocationEnded ( elapsedTime ) ; return ; } synchronized ( this ) { if ( ( ++ ( invocationEndedCount ) ) < ( mMasterBuildInfos.size ( ) ) ) { return ; } finalizeResults ( elapsedTime ) ; mFinalized.countDown ( ) ; } }

Target:
public void invocationEnded ( long elapsedTime ) { if ( isShardResultReporter ( ) ) { mMasterResultReporter.invocationEnded ( elapsedTime ) ; return ; } synchronized ( this ) { if ( ( ++ ( invocationEndedCount ) ) < ( mMasterBuildInfos.size ( ) ) ) { return ; } mElapsedTime = elapsedTime ; finalizeResults ( ) ; mFinalized.countDown ( ) ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JLambda x ) { expression = new com.android.jack.ir.ast.JLambda ( x.getSourceInfo ( ) , x.getMethod ( ) , x.getType ( ) , x.needToCaptureInstance ( ) , x.getInterfaceBounds ( ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JLambda x ) { expression = new com.android.jack.ir.ast.JLambda ( x.getSourceInfo ( ) , x.getMethodIdToImplement ( ) , x.getMethod ( ) , x.getType ( ) , x.needToCaptureInstance ( ) , x.getInterfaceBounds ( ) ) ; return false ; }
Source:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Object [ ] params ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr , bundleName ) ; }
Source:
public void testQueryWithWrongURI ( ) { try { mContext.getContentResolver ( ) . query ( android.net.Uri.withAppendedPath ( CarrierIdentification.CONTENT_URI , "invalid" ) , new java.lang.String [ ] { android.provider.Telephony.CarrierIdentification.CID , android.provider.Telephony.CarrierIdentification.NAME } , null , null ) ; org.junit.Assert.fail ( "should throw an exception for wrong uri" ) ; } catch ( java.lang.IllegalArgumentException ex ) { } }

Target:
public void testQueryWithWrongURI ( ) { try { mContext.getContentResolver ( ) . query ( android.net.Uri.withAppendedPath ( CarrierId.CONTENT_URI , "invalid" ) , new java.lang.String [ ] { android.provider.Telephony.CarrierId.CARRIER_ID , android.provider.Telephony.CarrierId.CARRIER_NAME } , null , null ) ; org.junit.Assert.fail ( "should throw an exception for wrong uri" ) ; } catch ( java.lang.IllegalArgumentException ex ) { } }
Source:
public void notifyTreeChanged ( ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.ImageChangeListener [ ] listeners = getImageChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . treeChanged ( ) ; } } }

Target:
public void notifyTreeChanged ( ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.IImageChangeListener [ ] listeners = getImageChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . treeChanged ( ) ; } } }
Source:
public V remove ( java.lang.Object key ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; return segmentFor ( hash ) . remove ( key , hash , null ) ; }

Target:
public V remove ( java.lang.Object key ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; java.util.concurrent.ConcurrentHashMap.Segment < K , V > s = segmentForHash ( hash ) ; return s == null ? null : s.remove ( key , hash , null ) ; }
Source:
public void testAesCbcHmacMd5Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesCbcHmacMd5Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , android.net.cts.IpSecManagerTest.getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
public void onConfigurationChanged ( android.content.res.Configuration newConfig ) { mCachedOverlappingActionModeHeight = - 1 ; if ( ( mSelectingText ) && ( ( mOrientation ) != ( newConfig.orientation ) ) ) { selectionDone ( ) ; } mOrientation = newConfig.orientation ; if ( ( ( mWebViewCore ) != null ) && ( ! ( mBlockWebkitViewMessages ) ) ) { mWebViewCore.sendMessage ( EventHub.CLEAR_CONTENT ) ; } }

Target:
public void onConfigurationChanged ( android.content.res.Configuration newConfig ) { mCachedOverlappingActionModeHeight = - 1 ; if ( ( mSelectingText ) && ( ( mOrientation ) != ( newConfig.orientation ) ) ) { clearSelection ( ) ; } mOrientation = newConfig.orientation ; if ( ( ( mWebViewCore ) != null ) && ( ! ( mBlockWebkitViewMessages ) ) ) { mWebViewCore.sendMessage ( EventHub.CLEAR_CONTENT ) ; } }
Source:
private void setScale ( float scale ) { mScale = scale ; scale = java.lang.Math.round ( ( scale * 100 ) ) ; scale /= 100.0F ; if ( scale == 0.0F ) { mScaleField.setText ( "default" ) ; } else { mScaleField.setText ( java.lang.String.format ( "%.2f" , scale ) ) ; } }

Target:
private void setScale ( float scale ) { mScale = scale ; scale = java.lang.Math.round ( ( scale * 100 ) ) ; scale /= 100.0F ; if ( scale == 0.0F ) { mScaleField.setText ( "default" ) ; } else { mScaleField.setText ( java.lang.String.format ( java.util.Locale.getDefault ( ) , "%.2f" , scale ) ) ; } }
Source:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.lang.String hostname ) throws java.security.cert.CertificateException { return checkTrusted ( chain , authType , hostname , false ) ; }

Target:
public java.util.List < java.security.cert.X509Certificate > getTrustedChainForServer ( java.security.cert.X509Certificate [ ] certs , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = null ; javax.net.ssl.SSLParameters parameters = null ; if ( socket instanceof javax.net.ssl.SSLSocket ) { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( socket ) ) ; session = org.conscrypt.TrustManagerImpl.getHandshakeSessionOrThrow ( sslSocket ) ; parameters = sslSocket.getSSLParameters ( ) ; } return checkTrusted ( certs , authType , session , parameters , false ) ; }
Source:
public synchronized void setMaximumSignificantDigits ( int value ) { properties.setMaximumSignificantDigits ( value ) ; refreshFormatter ( ) ; }

Target:
public synchronized void setMinimumSignificantDigits ( int value ) { int max = properties.getMaximumSignificantDigits ( ) ; if ( ( max >= 0 ) && ( max < value ) ) { properties.setMaximumSignificantDigits ( value ) ; } properties.setMinimumSignificantDigits ( value ) ; refreshFormatter ( ) ; }
Source:
private void setChildPgid ( int pid ) { try { com.android.internal.os.ZygoteInit.setpgid ( pid , com.android.internal.os.ZygoteInit.getpgid ( peer.getPid ( ) ) ) ; } catch ( java.io.IOException ex ) { android.util.Log.i ( com.android.internal.os.ZygoteConnection.TAG , ( "Zygote: setpgid failed. This is " + "normal if peer is not in our session" ) ) ; } }

Target:
private void setChildPgid ( int pid ) { try { android.system.Os.setpgid ( pid , android.system.Os.getpgid ( peer.getPid ( ) ) ) ; } catch ( android.system.ErrnoException ex ) { android.util.Log.i ( com.android.internal.os.ZygoteConnection.TAG , ( "Zygote: setpgid failed. This is " + "normal if peer is not in our session" ) ) ; } }
Source:
public void onSdkChange ( ) { com.android.sdklib.IAndroidTarget target = getRenderingTarget ( ) ; if ( target != null ) { mConfigComposite.onSdkLoaded ( target ) ; mConfigListener.onConfigurationChange ( ) ; } }

Target:
private void preRenderingTargetChangeCleanUp ( com.android.sdklib.IAndroidTarget oldTarget ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = currentSdk.getTargetData ( oldTarget ) ; if ( data != null ) { com.android.ide.common.layoutlib.LayoutLibrary layoutLib = data.getLayoutLibrary ( ) ; com.android.layoutlib.api.LayoutBridge bridge = layoutLib.getBridge ( ) ; if ( bridge != null ) { bridge.clearCaches ( mEditedFile.getProject ( ) ) ; } } } }
Source:
public boolean isSpeakEasyEligible ( ) { return com.android.dialer.configprovider.ConfigProviderBindings.get ( context ) . getBoolean ( "speak_easy_enabled" , false ) ; }

Target:
public boolean isSpeakEasyEligible ( ) { if ( ! ( com.android.incallui.speakeasy.runtime.Constraints.isAvailable ( context ) ) ) { return false ; } return ( ( ( ( ( ! ( isPotentialEmergencyCallback ( ) ) ) && ( ! ( isEmergencyCall ( ) ) ) ) && ( ! ( isActiveRttCall ( ) ) ) ) && ( ! ( isConferenceCall ( ) ) ) ) && ( ! ( isVideoCall ( ) ) ) ) && ( ! ( isVoiceMailNumber ( ) ) ) ; }
Source:
public void idmap ( java.lang.String targetApkPath , java.lang.String overlayApkPath , int uid ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.idmap ( targetApkPath , overlayApkPath , uid ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public boolean dumpProfiles ( int uid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return false ; try { return mInstalld.dumpProfiles ( uid , packageName , codePaths ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public static java.lang.String clearProperty ( java.lang.String key ) { if ( key == null ) { throw new java.lang.NullPointerException ( "key == null" ) ; } if ( key.isEmpty ( ) ) { throw new java.lang.IllegalArgumentException ( ) ; } return ( ( java.lang.String ) ( java.lang.System.getProperties ( ) . remove ( key ) ) ) ; }

Target:
private static void checkPropertyName ( java.lang.String name ) { if ( name == null ) { throw new java.lang.NullPointerException ( "name == null" ) ; } if ( name.isEmpty ( ) ) { throw new java.lang.IllegalArgumentException ( "name is empty" ) ; } }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "<BuildToolInfo rev=" ) . append ( mRevision ) ; builder.append ( ", mPath=" ) . append ( mPath ) ; builder.append ( ", mPaths=" ) . append ( mPaths ) ; builder.append ( ">" ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "<BuildToolInfo rev=" ) . append ( mRevision ) ; builder.append ( ", mPath=" ) . append ( mPath ) ; builder.append ( ", mPaths=" ) . append ( getPathString ( ) ) ; builder.append ( ">" ) ; return builder.toString ( ) ; }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "isConnected(): not allowed for non-active user" ) ; return false ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) && ( mRemoteDevice.equals ( device ) ) ; }

Target:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return false ; return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }
Source:
private void ensureMap ( ) { synchronized ( lock ) { if ( ( markers ) == null ) { markers = new java.util.concurrent.ConcurrentHashMap < java.lang.Class < ? extends com.android.sched.marker.Marker > , com.android.sched.marker.Marker > ( ) ; } } }

Target:
public < T extends com.android.sched.marker.Marker > T removeMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { synchronized ( lock ) { if ( ( markers ) == null ) { return null ; } T result = ( ( T ) ( markers.remove ( cls ) ) ) ; if ( markers.isEmpty ( ) ) { markers = null ; } return result ; } }
Source:
private boolean parentDefinesSelectableItem ( org.w3c.dom.Element element ) { java.lang.String background = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_BACKGROUND ) ; if ( com.android.SdkConstants.VALUE_SELECTABLE_ITEM_BACKGROUND.equals ( background ) ) { return true ; } org.w3c.dom.Node parent = element.getParentNode ( ) ; if ( ( parent != null ) && ( ( parent.getNodeType ( ) ) == ( org.w3c.dom.Node.ELEMENT_NODE ) ) ) { return parentDefinesSelectableItem ( ( ( org.w3c.dom.Element ) ( parent ) ) ) ; } return false ; }

Target:
private static boolean parentDefinesSelectableItem ( org.w3c.dom.Element element ) { java.lang.String background = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_BACKGROUND ) ; if ( com.android.SdkConstants.VALUE_SELECTABLE_ITEM_BACKGROUND.equals ( background ) ) { return true ; } org.w3c.dom.Node parent = element.getParentNode ( ) ; if ( ( parent != null ) && ( ( parent.getNodeType ( ) ) == ( org.w3c.dom.Node.ELEMENT_NODE ) ) ) { return com.android.tools.lint.checks.ButtonDetector.parentDefinesSelectableItem ( ( ( org.w3c.dom.Element ) ( parent ) ) ) ; } return false ; }
Source:
public void markBootComplete ( java.lang.String instructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; checkLock ( ) ; try { mInstalld.markBootComplete ( instructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void markBootComplete ( java.lang.String instructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.markBootComplete ( instructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void setUp ( com.android.tradefed.invoker.IInvocationContext context ) throws com.android.tradefed.device.DeviceNotAvailableException , com.android.tradefed.targetprep.BuildError , com.android.tradefed.targetprep.TargetSetupError { mBuildInfo = context.getBuildInfos ( ) . get ( 0 ) ; startVirtualenv ( mBuildInfo ) ; setLocalPypiPath ( ) ; installDeps ( mBuildInfo ) ; }

Target:
public synchronized void setUp ( com.android.tradefed.invoker.IInvocationContext context ) throws com.android.tradefed.device.DeviceNotAvailableException , com.android.tradefed.targetprep.BuildError , com.android.tradefed.targetprep.TargetSetupError { ++ ( mNumOfInstances ) ; mBuildInfo = context.getBuildInfos ( ) . get ( 0 ) ; if ( ( mNumOfInstances ) == 1 ) { com.android.tradefed.device.ITestDevice device = context.getDevices ( ) . get ( 0 ) ; mDescriptor = device.getDeviceDescriptor ( ) ; createVirtualenv ( mBuildInfo ) ; setLocalPypiPath ( ) ; installDeps ( ) ; } addPathToBuild ( mBuildInfo ) ; }
Source:
private static android.icu.impl.DayPeriodRules.DayPeriodRulesData loadData ( ) { android.icu.impl.DayPeriodRules.DayPeriodRulesData data = new android.icu.impl.DayPeriodRules.DayPeriodRulesData ( ) ; android.icu.impl.ICUResourceBundle rb = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.impl.ICUResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , "dayPeriods" , ICUResourceBundle.ICU_DATA_CLASS_LOADER , true ) ) ) ; android.icu.impl.DayPeriodRules.DayPeriodRulesCountSink countSink = new android.icu.impl.DayPeriodRules.DayPeriodRulesCountSink ( data ) ; rb.getAllTableItemsWithFallback ( "rules" , countSink ) ; data.rules = new android.icu.impl.DayPeriodRules [ ( data.maxRuleSetNum ) + 1 ] ; android.icu.impl.DayPeriodRules.DayPeriodRulesDataSink sink = new android.icu.impl.DayPeriodRules.DayPeriodRulesDataSink ( data ) ; rb.getAllTableItemsWithFallback ( "" , sink ) ; return data ; }

Target:
private static android.icu.impl.DayPeriodRules.DayPeriodRulesData loadData ( ) { android.icu.impl.DayPeriodRules.DayPeriodRulesData data = new android.icu.impl.DayPeriodRules.DayPeriodRulesData ( ) ; android.icu.impl.ICUResourceBundle rb = android.icu.impl.ICUResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , "dayPeriods" , ICUResourceBundle.ICU_DATA_CLASS_LOADER , true ) ; android.icu.impl.DayPeriodRules.DayPeriodRulesCountSink countSink = new android.icu.impl.DayPeriodRules.DayPeriodRulesCountSink ( data ) ; rb.getAllItemsWithFallback ( "rules" , countSink ) ; data.rules = new android.icu.impl.DayPeriodRules [ ( data.maxRuleSetNum ) + 1 ] ; android.icu.impl.DayPeriodRules.DayPeriodRulesDataSink sink = new android.icu.impl.DayPeriodRules.DayPeriodRulesDataSink ( data ) ; rb.getAllItemsWithFallback ( "" , sink ) ; return data ; }
Source:
public java.lang.String getShortDescription ( ) { if ( mVersion.isPreview ( ) ) { return java.lang.String.format ( "Sources for Android '%1$s' Preview SDK, revision %2$s%3$s" , mVersion.getCodename ( ) , getRevision ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } else { return java.lang.String.format ( "Sources for Android SDK, API %1$d, revision %2$s%3$s" , mVersion.getApiLevel ( ) , getRevision ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } }

Target:
public java.lang.String getShortDescription ( ) { if ( mVersion.isPreview ( ) ) { return java.lang.String.format ( "Sources for Android '%1$s' Preview SDK, revision %2$s%3$s" , mVersion.getCodename ( ) , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } else { return java.lang.String.format ( "Sources for Android SDK, API %1$d, revision %2$s%3$s" , mVersion.getApiLevel ( ) , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } }
Source:
public void testSrcPause ( ) { streamHandler.handleMessage ( streamHandler.obtainMessage ( A2dpSinkStreamHandler.SRC_PLAY ) ) ; org.mockito.Mockito.verify ( mockAudioManager , org.mockito.Mockito.times ( 0 ) ) . requestAudioFocus ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyInt ( ) , org.mockito.Mockito.anyInt ( ) ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 0 ) ) . informAudioFocusStateNative ( 1 ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 0 ) ) . informAudioTrackGainNative ( 1.0F ) ; }

Target:
public void testFocusGain ( ) { testSnkPlay ( ) ; streamHandler.handleMessage ( streamHandler.obtainMessage ( A2dpSinkStreamHandler.AUDIO_FOCUS_CHANGE , AudioManager.AUDIOFOCUS_GAIN ) ) ; org.mockito.Mockito.verify ( mockAudioManager , org.mockito.Mockito.times ( 1 ) ) . requestAudioFocus ( org.mockito.Mockito.any ( ) ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 2 ) ) . informAudioFocusStateNative ( 1 ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 2 ) ) . informAudioTrackGainNative ( 1.0F ) ; }
Source:
public static < E > com.google.common.collect.ImmutableMultiset < E > of ( E e1 , E e2 , E e3 , E e4 , E e5 , E e6 , E ... others ) { int size = ( others.length ) + 6 ; java.util.List < E > all = new java.util.ArrayList < E > ( size ) ; java.util.Collections.addAll ( all , e1 , e2 , e3 , e4 , e5 , e6 ) ; java.util.Collections.addAll ( all , others ) ; return com.google.common.collect.ImmutableMultiset.copyOf ( all ) ; }

Target:
public static < E > com.google.common.collect.ImmutableMultiset < E > of ( E e1 , E e2 , E e3 , E e4 , E e5 , E e6 , E ... others ) { return new com.google.common.collect.ImmutableMultiset.Builder < E > ( ) . add ( e1 ) . add ( e2 ) . add ( e3 ) . add ( e4 ) . add ( e5 ) . add ( e6 ) . add ( others ) . build ( ) ; }
Source:
public void junit ( ) throws java.lang.Exception { java.io.File junitJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "junit" , ".zip" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.addToClasspath ( com.android.jack.toolchain.ToolchainTest.corePath ) . addToClasspath ( com.android.jack.TestTools.getFromAndroidTree ( "out/host/common/obj/JAVA_LIBRARIES/hamcrest-core-hostdex-jack_intermediates/classes.jack" ) ) . srcToLib ( junitJack , true , com.android.jack.toolchain.ToolchainTest.JUNIT_SOURCELIST ) ; java.io.File junitOutFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.libToExe ( junitJack , junitOutFolder , false ) ; }

Target:
public void junit ( ) throws java.lang.Exception { java.io.File junitJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "junit" , ".zip" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.addToClasspath ( com.android.jack.toolchain.ToolchainTest.coreOut ) . addToClasspath ( com.android.jack.TestTools.getFromAndroidTree ( "out/host/common/obj/JAVA_LIBRARIES/hamcrest-core-hostdex-jack_intermediates/classes.jack" ) ) . srcToLib ( junitJack , true , com.android.jack.toolchain.ToolchainTest.JUNIT_SOURCELIST ) ; java.io.File junitOutFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.libToExe ( junitJack , junitOutFolder , false ) ; }
Source:
public static java.lang.String toHex ( byte [ ] octets ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ( ( octets.length ) * 2 ) ) ; for ( byte o : octets ) { sb.append ( java.lang.String.format ( "%02x" , ( o & ( com.android.server.wifi.anqp.Constants.BYTE_MASK ) ) ) ) ; } return sb.toString ( ) ; }

Target:
public static java.lang.String toHex ( byte [ ] octets ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ( ( octets.length ) * 2 ) ) ; for ( byte o : octets ) { sb.append ( java.lang.String.format ( "%02x" , ( o & ( com.android.server.wifi.hotspot2.anqp.Constants.BYTE_MASK ) ) ) ) ; } return sb.toString ( ) ; }
Source:
private void initCapitalizationContextInfo ( android.icu.util.ULocale theLocale ) { android.icu.impl.ICUResourceBundle rb = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , theLocale ) ) ) ; try { android.icu.impl.ICUResourceBundle rdb = rb.getWithFallback ( "contextTransforms/number-spellout" ) ; int [ ] intVector = rdb.getIntVector ( ) ; if ( ( intVector.length ) >= 2 ) { capitalizationForListOrMenu = ( intVector [ 0 ] ) != 0 ; capitalizationForStandAlone = ( intVector [ 1 ] ) != 0 ; } } catch ( java.util.MissingResourceException e ) { } }

Target:
private void initCapitalizationContextInfo ( android.icu.util.ULocale theLocale ) { android.icu.impl.ICUResourceBundle rb = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , theLocale ) ) ) ; try { android.icu.impl.ICUResourceBundle rdb = rb.getWithFallback ( "contextTransforms/number-spellout" ) ; int [ ] intVector = rdb.getIntVector ( ) ; if ( ( intVector.length ) >= 2 ) { capitalizationForListOrMenu = ( intVector [ 0 ] ) != 0 ; capitalizationForStandAlone = ( intVector [ 1 ] ) != 0 ; } } catch ( java.util.MissingResourceException e ) { } }
Source:
public void run ( ) { try { java.net.InetSocketAddress unreachableIp = new java.net.InetSocketAddress ( "192.0.2.0" , 80 ) ; s.connect ( unreachableIp , 0 ) ; fail ( ( "Connect returned unexpectedly for: " + unreachableIp ) ) ; } catch ( java.net.SocketException expected ) { assertTrue ( expected.getMessage ( ) . contains ( "Socket closed" ) ) ; signal.countDown ( ) ; } catch ( java.io.IOException e ) { fail ( ( "Unexpected exception: " + e ) ) ; } }

Target:
public void connectFailed ( java.net.URI uri , java.net.SocketAddress sa , java.io.IOException ioe ) { fail ( "ProxySelector#connectFail was called" ) ; }
Source:
public com.android.jack.test.toolchain.JackApiV02Toolchain setVerbose ( boolean isVerbose ) { super . setVerbose ( isVerbose ) ; try { if ( isVerbose ) { apiV02Config.setVerbosityLevel ( VerbosityLevel.DEBUG ) ; } else { apiV02Config.setVerbosityLevel ( VerbosityLevel.WARNING ) ; } return this ; } catch ( com.android.jack.api.v01.ConfigurationException e ) { throw new com.android.jack.test.TestConfigurationException ( e ) ; } }

Target:
public com.android.jack.test.toolchain.JackApiV02Toolchain setVerbose ( boolean isVerbose ) { super . setVerbose ( isVerbose ) ; try { if ( isVerbose ) { apiV02Config.setVerbosityLevel ( VerbosityLevel.INFO ) ; } else { apiV02Config.setVerbosityLevel ( VerbosityLevel.WARNING ) ; } return this ; } catch ( com.android.jack.api.v01.ConfigurationException e ) { throw new com.android.jack.test.TestConfigurationException ( e ) ; } }
Source:
public void dispose ( ) { if ( com.android.internal.telephony.DataConnectionTracker.DBG ) log ( "DCT.dispose" ) ; for ( com.android.internal.telephony.DataConnectionAc dcac : mDataConnectionAsyncChannels.values ( ) ) { dcac.disconnect ( ) ; } mDataConnectionAsyncChannels.clear ( ) ; mIsDisposed = true ; mPhone.getContext ( ) . unregisterReceiver ( this . mIntentReceiver ) ; mDataRoamingSettingObserver.unregister ( mPhone.getContext ( ) ) ; }

Target:
public void dispose ( ) { if ( com.android.internal.telephony.DataConnectionTracker.DBG ) log ( "DCT.dispose" ) ; for ( com.android.internal.telephony.DataConnectionAc dcac : mDataConnectionAsyncChannels.values ( ) ) { dcac.disconnect ( ) ; } mDataConnectionAsyncChannels.clear ( ) ; mIsDisposed = true ; mPhone.getContext ( ) . unregisterReceiver ( this . mIntentReceiver ) ; mDataRoamingSettingObserver.unregister ( mPhone.getContext ( ) ) ; mUiccController.unregisterForIccChanged ( this ) ; }
Source:
private com.android.dx.io.DexBuffer mergeDexBuffers ( ) throws java.io.IOException { mergeStringIds ( ) ; mergeTypeIds ( ) ; mergeTypeLists ( ) ; mergeProtoIds ( ) ; mergeFieldIds ( ) ; mergeMethodIds ( ) ; mergeAnnotations ( ) ; unionAnnotationSetsAndDirectories ( ) ; mergeClassDefs ( ) ; contentsOut.header.off = 0 ; contentsOut.header.size = 1 ; contentsOut.fileSize = dexOut.getLength ( ) ; contentsOut.computeSizesFromOffsets ( ) ; contentsOut.writeHeader ( headerOut ) ; contentsOut.writeMap ( mapListOut ) ; new com.android.dx.io.DexHasher ( ) . writeHashes ( dexOut ) ; return dexOut ; }

Target:
private com.android.dex.Dex mergeDexes ( ) throws java.io.IOException { mergeStringIds ( ) ; mergeTypeIds ( ) ; mergeTypeLists ( ) ; mergeProtoIds ( ) ; mergeFieldIds ( ) ; mergeMethodIds ( ) ; mergeAnnotations ( ) ; unionAnnotationSetsAndDirectories ( ) ; mergeClassDefs ( ) ; contentsOut.header.off = 0 ; contentsOut.header.size = 1 ; contentsOut.fileSize = dexOut.getLength ( ) ; contentsOut.computeSizesFromOffsets ( ) ; contentsOut.writeHeader ( headerOut ) ; contentsOut.writeMap ( mapListOut ) ; new com.android.dx.io.DexHasher ( ) . writeHashes ( dexOut ) ; return dexOut ; }
Source:
private void writeAndReadBack ( ) { try { java.io.StringWriter writer = new java.io.StringWriter ( ) ; mPackageDexUsage.write ( writer ) ; mPackageDexUsage = new com.android.server.pm.dex.PackageDexUsage ( ) ; mPackageDexUsage.read ( new java.io.StringReader ( writer.toString ( ) ) ) ; } catch ( java.io.IOException e ) { org.junit.Assert.fail ( ( "Unexpected IOException: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
private boolean record ( com.android.server.pm.dex.PackageDexUsageTests.TestData testData ) { return mPackageDexUsage.record ( testData.mPackageName , testData.mDexFile , testData.mOwnerUserId , testData.mLoaderIsa , testData.mUsedByOtherApps , testData.mPrimaryOrSplit , testData.mUsedBy ) ; }
Source:
public void test2 ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "res/values-cs/plurals3.xml:3: Error: For locale \"cs\" the following quantities should also be defined: few [MissingQuantity]\n" + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:3: Warning: For language \"zh\" the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:7: Warning: For language \"zh\" the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"title_day_dialog_content\">\n" ) + " ^\n" ) + "1 errors, 2 warnings\n" ) ) , lintProject ( "res/values-zh-rCN/plurals3.xml" , "res/values-cs/plurals3.xml" ) ) ; }

Target:
public void test2 ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "res/values-cs/plurals3.xml:3: Error: For locale \"cs\" the following quantities should also be defined: few, many [MissingQuantity]\n" + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:3: Warning: For language \"zh\" the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"draft\">\n" ) + " ^\n" ) + "res/values-zh-rCN/plurals3.xml:7: Warning: For language \"zh\" the following quantities are not relevant: one [UnusedQuantity]\n" ) + " <plurals name=\"title_day_dialog_content\">\n" ) + " ^\n" ) + "1 errors, 2 warnings\n" ) ) , lintProject ( "res/values-zh-rCN/plurals3.xml" , "res/values-cs/plurals3.xml" ) ) ; }