auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean isConditional ( ) { java.lang.Object o = annotation.getValue ( com.android.tools.lint.checks.SupportAnnotationDetector.ATTR_CONDITIONAL ) ; if ( o instanceof java.lang.Boolean ) { return ( ( java.lang.Boolean ) ( o ) ) ; } else if ( o instanceof com.android.tools.lint.client.api.JavaParser.ResolvedField ) { o = ( ( com.android.tools.lint.client.api.JavaParser.ResolvedField ) ( o ) ) . getValue ( ) ; if ( o instanceof java.lang.Boolean ) { return ( ( java.lang.Boolean ) ( o ) ) ; } } return false ; }

Target:
public static java.lang.Boolean getAnnotationBooleanValue ( @ com.android.annotations.Nullable com.intellij.psi.PsiAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name ) { if ( annotation != null ) { com.intellij.psi.PsiAnnotationMemberValue attributeValue = annotation.findAttributeValue ( name ) ; if ( ( attributeValue == null ) && ( com.android.SdkConstants.ATTR_VALUE.equals ( name ) ) ) { attributeValue = annotation.findAttributeValue ( null ) ; } if ( attributeValue != null ) { java.lang.Object o = com.android.tools.lint.detector.api.ConstantEvaluator.evaluate ( null , attributeValue ) ; if ( o instanceof java.lang.Boolean ) { return ( ( java.lang.Boolean ) ( o ) ) ; } } } return null ; }
Source:
private static long getLongAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name , long defaultValue ) { java.lang.Object value = annotation.getValue ( name ) ; if ( value instanceof java.lang.Number ) { return ( ( java.lang.Number ) ( value ) ) . longValue ( ) ; } return defaultValue ; }

Target:
static long getLongAttribute ( @ com.android.annotations.NonNull com.intellij.psi.PsiAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name , long defaultValue ) { java.lang.Long value = com.android.tools.lint.checks.PermissionRequirement.getAnnotationLongValue ( annotation , name ) ; if ( value != null ) { return value ; } return defaultValue ; }
Source:
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.getKey ( 256 ) ) ; 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 ) ; }

Target:
public void testCryptTcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , null , false , 1 , true ) ; }
Source:
public java.util.List < ? extends com.android.jack.library.InputLibrary > getImportedLibrary ( ) { com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; if ( needFullBuild ( ) ) { session.setFileDependencies ( new com.android.jack.analysis.dependency.file.FileDependencies ( ) ) ; session.setTypeDependencies ( new com.android.jack.analysis.dependency.type.TypeDependencies ( ) ) ; return importedLibrariesFromCommandLine ; } try { updateIncrementalState ( ) ; } catch ( com.android.jack.incremental.IncrementalException e ) { session.getReporter ( ) . report ( Severity.FATAL , e ) ; throw new com.android.jack.JackAbortException ( e ) ; } return java.util.Collections.singletonList ( incrementalInputLibrary ) ; }

Target:
public java.util.List < ? extends com.android.jack.library.InputLibrary > getImportedLibraries ( ) { com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; if ( needFullBuild ( ) ) { session.setFileDependencies ( new com.android.jack.analysis.dependency.file.FileDependencies ( ) ) ; session.setTypeDependencies ( new com.android.jack.analysis.dependency.type.TypeDependencies ( ) ) ; return importedLibrariesFromCommandLine ; } try { updateIncrementalState ( ) ; } catch ( com.android.jack.incremental.IncrementalException e ) { session.getReporter ( ) . report ( Severity.FATAL , e ) ; throw new com.android.jack.JackAbortException ( e ) ; } return java.util.Collections.singletonList ( incrementalInputLibrary ) ; }
Source:
public void run ( ) { while ( ! ( Main.finish ) ) { for ( int i = 0 ; i < 188 ; i ++ ) { byte [ ] b = new byte [ ( i * 100 ) + 10 ] ; } try { java.lang.Thread.sleep ( 10 ) ; } catch ( java.lang.Exception e ) { } } }

Target:
public void run ( ) { while ( ! ( Main.finish ) ) { for ( int i = 0 ; i < 188 ; i ++ ) { try { byte [ ] b = new byte [ ( i * 100 ) + 10 ] ; } catch ( java.lang.OutOfMemoryError e ) { } } try { java.lang.Thread.sleep ( 10 ) ; } catch ( java.lang.Exception e ) { } } }
Source:
public java.lang.String getClassName ( ) { if ( ( className ) == null ) { if ( ! ( ( isReference ( ) ) || ( isClosure ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( ( "not an object type: " + ( descriptor ) ) ) ; } if ( ( descriptor.charAt ( 0 ) ) == '[' ) { className = descriptor ; } else { className = descriptor.substring ( 1 , ( ( descriptor.length ( ) ) - 1 ) ) ; } } return className ; }

Target:
public int getWordCount ( ) { if ( isCategory2 ( ) ) { return 2 ; } return 1 ; }
Source:
public boolean equals ( @ javax.annotation.Nullable java.lang.Object obj ) { if ( obj == ( this ) ) { return true ; } else if ( obj instanceof com.google.common.collect.Table ) { com.google.common.collect.Table < ? , ? , ? > that = ( ( com.google.common.collect.Table < ? , ? , ? > ) ( obj ) ) ; return this . cellSet ( ) . equals ( that.cellSet ( ) ) ; } else { return false ; } }

Target:
public com.google.common.collect.ImmutableMap < C , V > row ( R rowKey ) { com.google.common.base.Preconditions.checkNotNull ( rowKey ) ; return com.google.common.base.MoreObjects.firstNonNull ( ( ( com.google.common.collect.ImmutableMap < C , V > ) ( rowMap ( ) . get ( rowKey ) ) ) , com.google.common.collect.ImmutableMap.< C , V > of ( ) ) ; }
Source:
public java.lang.String getAlgorithmName ( int index , int codepoint ) { java.lang.String result = null ; synchronized ( m_utilStringBuffer_ ) { m_utilStringBuffer_.delete ( 0 , m_utilStringBuffer_.length ( ) ) ; m_algorithm_ [ index ] . appendName ( codepoint , m_utilStringBuffer_ ) ; result = m_utilStringBuffer_.toString ( ) ; } return result ; }

Target:
public java.lang.String getAlgorithmName ( int index , int codepoint ) { java.lang.String result = null ; synchronized ( m_utilStringBuffer_ ) { m_utilStringBuffer_.setLength ( 0 ) ; m_algorithm_ [ index ] . appendName ( codepoint , m_utilStringBuffer_ ) ; result = m_utilStringBuffer_.toString ( ) ; } return result ; }
Source:
public final void testEquals_Point ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Point p = new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( 1 , 2 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Point p1 = new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( 1 , 2 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Point p2 = new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( ( - 3 ) , ( - 4 ) ) ; assertNotSame ( p1 , p ) ; assertTrue ( p.equals ( p1 ) ) ; assertFalse ( p.equals ( p2 ) ) ; }

Target:
public final void testEquals_Point ( ) { com.android.ide.common.api.Point p = new com.android.ide.common.api.Point ( 1 , 2 ) ; com.android.ide.common.api.Point p1 = new com.android.ide.common.api.Point ( 1 , 2 ) ; com.android.ide.common.api.Point p2 = new com.android.ide.common.api.Point ( ( - 3 ) , ( - 4 ) ) ; assertNotSame ( p1 , p ) ; assertTrue ( p.equals ( p1 ) ) ; assertFalse ( p.equals ( p2 ) ) ; }
Source:
public void dumpShowsFailureTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }

Target:
public void dumpShowsFailureTraceEvenIfConnectionIdIncreases ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( ( ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID ) + 1 ) , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "--- Last failed" ) ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }
Source:
public boolean isDataConnectivityPossible ( ) { int subId = mSubscriptionController.getDefaultDataSubId ( ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.isDataConnectivityPossible ( ) ; } else { return false ; } }

Target:
public void setVoiceActivationState ( int subId , int activationState ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { phone.setVoiceActivationState ( activationState ) ; } else { com.android.phone.PhoneInterfaceManager.loge ( ( "setVoiceActivationState fails with invalid subId: " + subId ) ) ; } }
Source:
private void setCurrentAppType ( boolean isGsm ) { synchronized ( mLock ) { boolean isLteOnCdmaMode = ( android.telephony.TelephonyManager.getLteOnCdmaModeStatic ( ) ) == ( com.android.internal.telephony.PhoneConstants.LTE_ON_CDMA_TRUE ) ; if ( isGsm || isLteOnCdmaMode ) { mCurrentAppType = UiccController.APP_FAM_3GPP ; } else { mCurrentAppType = UiccController.APP_FAM_3GPP2 ; } initializeCurrentApp ( ) ; } }

Target:
private void setCurrentAppType ( boolean isGsm ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) log ( "setCurrentAppType" ) ; synchronized ( mLock ) { boolean isLteOnCdmaMode = ( android.telephony.TelephonyManager.getLteOnCdmaModeStatic ( ) ) == ( com.android.internal.telephony.PhoneConstants.LTE_ON_CDMA_TRUE ) ; if ( isGsm || isLteOnCdmaMode ) { mCurrentAppType = UiccController.APP_FAM_3GPP ; } else { mCurrentAppType = UiccController.APP_FAM_3GPP2 ; } } }
Source:
synchronized void nAllocationRead2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationRead2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID ) ; }

Target:
native void rsnAllocationElementRead ( long con , long id , int xoff , int yoff , int zoff , int mip , int compIdx , byte [ ] d , int sizeBytes ) ;
Source:
public final void writeTo ( com.android.dx.dex.file.DexFile file , com.android.dx.util.AnnotatedOutput out ) { out.alignTo ( alignment ) ; try { if ( ( writeSize ) < 0 ) { throw new java.lang.UnsupportedOperationException ( "writeSize is unknown" ) ; } out.assertCursor ( getAbsoluteOffset ( ) ) ; } catch ( java.lang.RuntimeException ex ) { throw com.android.dx.util.ExceptionWithContext.withContext ( ex , ( "...while writing " + ( this ) ) ) ; } writeTo0 ( file , out ) ; }

Target:
public final void writeTo ( com.android.dx.dex.file.DexFile file , com.android.dx.util.AnnotatedOutput out ) { out.alignTo ( alignment ) ; try { if ( ( writeSize ) < 0 ) { throw new java.lang.UnsupportedOperationException ( "writeSize is unknown" ) ; } out.assertCursor ( getAbsoluteOffset ( ) ) ; } catch ( java.lang.RuntimeException ex ) { throw com.android.dex.util.ExceptionWithContext.withContext ( ex , ( "...while writing " + ( this ) ) ) ; } writeTo0 ( file , out ) ; }
Source:
public com.android.ims.ImsMultiEndpoint getMultiEndpointInterface ( int serviceId ) throws com.android.ims.ImsException { if ( ( ( mMultiEndpoint ) == null ) || ( ! ( mImsServiceProxy.isBinderAlive ( ) ) ) ) { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsMultiEndpoint iImsMultiEndpoint = mImsServiceProxy.getMultiEndpointInterface ( serviceId ) ; if ( iImsMultiEndpoint == null ) { throw new com.android.ims.ImsException ( "getMultiEndpointInterface()" , ImsReasonInfo.CODE_MULTIENDPOINT_NOT_SUPPORTED ) ; } mMultiEndpoint = new com.android.ims.ImsMultiEndpoint ( iImsMultiEndpoint ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getMultiEndpointInterface()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } } return mMultiEndpoint ; }

Target:
public com.android.ims.ImsEcbm getEcbmInterface ( int serviceId ) throws com.android.ims.ImsException { if ( ( ( mEcbm ) == null ) || ( ! ( mImsServiceProxy.isBinderAlive ( ) ) ) ) { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsEcbm iEcbm = mImsServiceProxy.getEcbmInterface ( ) ; if ( iEcbm == null ) { throw new com.android.ims.ImsException ( "getEcbmInterface()" , ImsReasonInfo.CODE_ECBM_NOT_SUPPORTED ) ; } mEcbm = new com.android.ims.ImsEcbm ( iEcbm ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getEcbmInterface()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } } return mEcbm ; }
Source:
private boolean sample ( long timeStamp ) { if ( timeStamp < ( mLatestSeen ) ) { return false ; } else if ( timeStamp == ( mLatestSeen ) ) { return true ; } else { mElapsedTimes.add ( ( timeStamp - ( mLatestSeen ) ) ) ; mLatestSeen = timeStamp ; return false ; } }

Target:
private boolean sample ( long timeStamp ) { if ( timeStamp == ( java.lang.Long.MAX_VALUE ) ) { return true ; } else if ( timeStamp < ( mLatestSeen ) ) { return false ; } else if ( timeStamp == ( mLatestSeen ) ) { return true ; } else { mElapsedTimes.add ( ( timeStamp - ( mLatestSeen ) ) ) ; mLatestSeen = timeStamp ; return false ; } }
Source:
private synchronized void initGenericType ( ) { if ( ! ( genericTypesAreInitialized ) ) { java.lang.String signatureAttribute = getSignatureAttribute ( ) ; org.apache.harmony.luni.lang.reflect.GenericSignatureParser parser = new org.apache.harmony.luni.lang.reflect.GenericSignatureParser ( declaringClass.getClassLoader ( ) ) ; parser.parseForField ( this . declaringClass , signatureAttribute ) ; genericType = parser.fieldType ; if ( ( genericType ) == null ) { genericType = getType ( ) ; } genericTypesAreInitialized = true ; } }

Target:
private synchronized void initGenericType ( ) { if ( ! ( genericTypesAreInitialized ) ) { java.lang.String signatureAttribute = getSignatureAttribute ( ) ; libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( declaringClass.getClassLoader ( ) ) ; parser.parseForField ( this . declaringClass , signatureAttribute ) ; genericType = parser.fieldType ; if ( ( genericType ) == null ) { genericType = getType ( ) ; } genericTypesAreInitialized = true ; } }
Source:
public void mark ( int markLimit ) throws java.io.IOException { if ( markLimit < 0 ) { throw new java.lang.IllegalArgumentException ( ( "markLimit < 0:" + markLimit ) ) ; } synchronized ( lock ) { checkNotClosed ( ) ; this . markLimit = markLimit ; mark = pos ; } }

Target:
public void mark ( int markLimit ) throws java.io.IOException { if ( markLimit < 0 ) { throw new java.lang.IllegalArgumentException ( ( "markLimit < 0:" + markLimit ) ) ; } synchronized ( lock ) { checkNotClosed ( ) ; this . markLimit = markLimit ; this . mark = pos ; this . markedLastWasCR = lastWasCR ; } }
Source:
public void testTelephonyFeatures ( ) { int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : assertTelephonyFeatures ( PackageManager.FEATURE_TELEPHONY , PackageManager.FEATURE_TELEPHONY_GSM ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : assertTelephonyFeatures ( PackageManager.FEATURE_TELEPHONY , PackageManager.FEATURE_TELEPHONY_CDMA ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : assertTelephonyFeatures ( ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }

Target:
public void testTelephonyFeatures ( ) { int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : assertAvailable ( PackageManager.FEATURE_TELEPHONY ) ; assertAvailable ( PackageManager.FEATURE_TELEPHONY_GSM ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : assertAvailable ( PackageManager.FEATURE_TELEPHONY ) ; assertAvailable ( PackageManager.FEATURE_TELEPHONY_CDMA ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : assertNotAvailable ( PackageManager.FEATURE_TELEPHONY ) ; assertNotAvailable ( PackageManager.FEATURE_TELEPHONY_CDMA ) ; assertNotAvailable ( PackageManager.FEATURE_TELEPHONY_GSM ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }
Source:
public void beforeCheckFile ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( com.android.tools.lint.detector.api.LintUtils.endsWith ( context.file.getName ( ) , com.android.SdkConstants.DOT_XML ) ) { java.io.File parent = context.file.getParentFile ( ) ; com.android.resources.ResourceFolderType type = com.android.resources.ResourceFolderType.getFolderType ( parent.getName ( ) ) ; if ( type == ( com.android.resources.ResourceFolderType.DRAWABLE ) ) { if ( ( mValidDrawables ) == null ) { mValidDrawables = new java.util.ArrayList < java.lang.String > ( ) ; } java.lang.String resource = getDrawableResource ( context.file ) ; mValidDrawables.add ( resource ) ; } } }

Target:
public void beforeCheckFile ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( com.android.tools.lint.detector.api.LintUtils.endsWith ( context.file.getName ( ) , com.android.SdkConstants.DOT_XML ) ) { java.io.File parent = context.file.getParentFile ( ) ; com.android.resources.ResourceFolderType type = com.android.resources.ResourceFolderType.getFolderType ( parent.getName ( ) ) ; if ( type == ( com.android.resources.ResourceFolderType.DRAWABLE ) ) { if ( ( mValidDrawables ) == null ) { mValidDrawables = new java.util.ArrayList < java.lang.String > ( ) ; } java.lang.String resource = com.android.tools.lint.checks.OverdrawDetector.getDrawableResource ( context.file ) ; mValidDrawables.add ( resource ) ; } } }
Source:
public void testRoamFailureDueToBssidSet ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; int connectedNetworkId = 5 ; executeAndValidateConnectSequence ( connectedNetworkId , false , false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( false ) ; android.net.wifi.WifiConfiguration roamingConfig = new android.net.wifi.WifiConfiguration ( ) ; roamingConfig.networkId = connectedNetworkId ; roamingConfig.getNetworkSelectionStatus ( ) . setNetworkSelectionBSSID ( "45:34:23:23:ab:ed" ) ; assertFalse ( mDut.roamToNetwork ( roamingConfig ) ) ; }

Target:
public void testConnectFailureDueToNetworkSelectFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.select ( ) ) . thenReturn ( false ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) ) ) ; }
Source:
private java.lang.CharSequence getImsErrorMessage ( android.os.AsyncResult ar ) { com.android.ims.ImsException error = ( ( com.android.ims.ImsException ) ( ar.exception ) ) ; if ( ( error.getCode ( ) ) == ( com.android.ims.ImsReasonInfo.CODE_FDN_BLOCKED ) ) { return mContext.getText ( com.android.internal.R.string.mmiFdnError ) ; } else if ( ( error.getMessage ( ) ) != null ) { return error.getMessage ( ) ; } else { return getErrorMessage ( ar ) ; } }

Target:
private java.lang.CharSequence getImsErrorMessage ( android.os.AsyncResult ar ) { com.android.ims.ImsException error = ( ( com.android.ims.ImsException ) ( ar.exception ) ) ; java.lang.CharSequence errorMessage ; if ( ( errorMessage = getMmiErrorMessage ( ar ) ) != null ) { return errorMessage ; } else if ( ( error.getMessage ( ) ) != null ) { return error.getMessage ( ) ; } else { return getErrorMessage ( ar ) ; } }
Source:
protected void done ( ) { try { com.android.hierarchyviewer.ui.Workspace.WindowsResult result = get ( ) ; protocolVersion = result.protocolVersion ; serverVersion = result.serverVersion ; windowsTableModel.clear ( ) ; windowsTableModel.addWindows ( result.windows ) ; } catch ( java.util.concurrent.ExecutionException e ) { e.printStackTrace ( ) ; } catch ( java.lang.InterruptedException e ) { e.printStackTrace ( ) ; } finally { endTask ( ) ; } }

Target:
protected void done ( ) { try { com.android.hierarchyviewer.ui.Workspace.WindowsResult result = get ( ) ; protocolVersion = result.protocolVersion ; serverVersion = result.serverVersion ; setupProtocolDependentToolbar ( ) ; windowsTableModel.clear ( ) ; windowsTableModel.addWindows ( result.windows ) ; } catch ( java.util.concurrent.ExecutionException e ) { e.printStackTrace ( ) ; } catch ( java.lang.InterruptedException e ) { e.printStackTrace ( ) ; } finally { endTask ( ) ; } }
Source:
public void test_bind_unresolvedAddress ( ) throws java.io.IOException { java.nio.channels.SocketChannel sc = java.nio.channels.SocketChannel.open ( ) ; try { sc.bind ( new java.net.InetSocketAddress ( "unresolvedname" , 31415 ) ) ; fail ( ) ; } catch ( java.nio.channels.UnresolvedAddressException expected ) { } assertNull ( sc.getLocalAddress ( ) ) ; assertTrue ( sc.isOpen ( ) ) ; assertFalse ( sc.isConnected ( ) ) ; sc.close ( ) ; }

Target:
public void test_bind_unresolvedAddress ( ) throws java.io.IOException { java.nio.channels.SocketChannel sc = java.nio.channels.SocketChannel.open ( ) ; try { sc.socket ( ) . bind ( new java.net.InetSocketAddress ( "unresolvedname" , 31415 ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNull ( sc.socket ( ) . getLocalSocketAddress ( ) ) ; assertTrue ( sc.isOpen ( ) ) ; assertFalse ( sc.isConnected ( ) ) ; sc.close ( ) ; }
Source:
public void assign ( java.net.HttpCookie cookie , java.lang.String attrName , java.lang.String attrValue ) { if ( ( cookie.getMaxAge ( ) ) == ( java.net.HttpCookie.MAX_AGE_UNSPECIFIED ) ) { cookie.setMaxAge ( cookie.expiryDate2DeltaSeconds ( attrValue ) ) ; } }

Target:
public void assign ( java.net.HttpCookie cookie , java.lang.String attrName , java.lang.String attrValue ) { if ( ( cookie.getMaxAge ( ) ) == ( java.net.HttpCookie.MAX_AGE_UNSPECIFIED ) ) { java.util.Date date = libcore.net.http.HttpDate.parse ( attrValue ) ; if ( date != null ) { cookie.setMaxAge ( ( ( ( date.getTime ( ) ) - ( java.lang.System.currentTimeMillis ( ) ) ) / 1000 ) ) ; } else { cookie.setMaxAge ( 0 ) ; } } }
Source:
public void testEquals ( ) throws java.lang.Exception { android.telephony.data.DataProfile dp1 = com.android.internal.telephony.dataconnection.DcTracker.createDataProfile ( mApn1 , mApn1.profileId ) ; android.telephony.data.DataProfile dp2 = com.android.internal.telephony.dataconnection.DcTracker.createDataProfile ( mApn1 , mApn1.profileId ) ; assertEquals ( dp1 , dp2 ) ; dp2 = com.android.internal.telephony.dataconnection.DcTracker.createDataProfile ( mApn2 , mApn2.profileId ) ; assertFalse ( dp1.equals ( dp2 ) ) ; }

Target:
public void testEquals ( ) throws java.lang.Exception { com.android.internal.telephony.dataconnection.DataProfile dp1 = new com.android.internal.telephony.dataconnection.DataProfile ( mApn1 ) ; com.android.internal.telephony.dataconnection.DataProfile dp2 = new com.android.internal.telephony.dataconnection.DataProfile ( mApn1 ) ; assertEquals ( dp1 , dp2 ) ; dp2 = new com.android.internal.telephony.dataconnection.DataProfile ( mApn2 ) ; assertFalse ( dp1.equals ( dp2 ) ) ; }
Source:
public void onSdkLoaded ( ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( ( currentSdk != null ) && ( ( mEditedFile ) != null ) ) { com.android.sdklib.IAndroidTarget target = currentSdk.getTarget ( mEditedFile.getProject ( ) ) ; if ( target != null ) { mConfigComposite.onSdkLoaded ( target ) ; mConfigListener.onConfigurationChange ( ) ; } } }

Target:
public void onSdkLoaded ( ) { com.android.sdklib.IAndroidTarget target = getRenderingTarget ( ) ; if ( target != null ) { mConfigComposite.onSdkLoaded ( target ) ; mConfigListener.onConfigurationChange ( ) ; } }
Source:
public java.util.Collection < com.android.tradefed.testtype.IRemoteTest > split ( int shardCountHint ) { java.util.List < com.android.tradefed.testtype.IRemoteTest > tests = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < shardCountHint ; i ++ ) { tests.add ( new com.android.tradefed.testtype.StubTest ( ) ) ; } return tests ; }

Target:
public void run ( com.android.tradefed.result.ITestInvocationListener listener ) throws com.android.tradefed.device.DeviceNotAvailableException { }
Source:
public java.lang.String getDisplayScript ( java.util.Locale locale ) { java.lang.String scriptCode = baseLocale.getScript ( ) ; if ( scriptCode.isEmpty ( ) ) { return "" ; } java.lang.String result = libcore.icu.ICU.getDisplayScript ( this , locale ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayScript ( this , java.util.Locale.getDefault ( ) ) ; } return result ; }

Target:
public java.lang.String getDisplayScript ( java.util.Locale inLocale ) { java.lang.String scriptCode = baseLocale.getScript ( ) ; if ( scriptCode.isEmpty ( ) ) { return "" ; } java.lang.String result = libcore.icu.ICU.getDisplayScript ( this , inLocale ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayScript ( this , java.util.Locale.getDefault ( java.util.Locale.Category.DISPLAY ) ) ; } return result ; }
Source:
private void doClean ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; if ( ( mGenFolder ) != null ) { removeDerivedResources ( mGenFolder , monitor ) ; } removeMarkersFromContainer ( project , AdtConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_XML ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_AIDL ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_RENDERSCRIPT ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_ANDROID ) ; }

Target:
private void doClean ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; if ( ( mGenFolder ) != null ) { mGenFolder.setDerived ( false ) ; removeDerivedResources ( mGenFolder , monitor ) ; } removeMarkersFromContainer ( project , AdtConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_XML ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_AIDL ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_RENDERSCRIPT ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_ANDROID ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( "from" , "to" , myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testApplyingWithoutCriticalFiles ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertTrue ( com.intellij.updater.PatchFileCreator.apply ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) , com.intellij.updater.TEST_UI ) ) ; }
Source:
public void reportConnectionFailureFetchesFatesInVerboseMode ( ) { final boolean verbosityToggle = true ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionFailure ( ) ; org.mockito.Mockito.verify ( mWifiNative ) . getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; }

Target:
public void reportConnectionFailureFetchesFatesInVerboseMode ( ) { final boolean verbosityToggle = true ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.mockito.Mockito.verify ( mWifiNative ) . getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; }
Source:
public void copyFromUnchecked ( byte [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , java.lang.Object array ) { copy1DRangeFromUnchecked ( off , count , array , validateObjectIsPrimitiveArray ( array , false ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { com.android.server.telecom.Log.startSession ( "TSSwR.oR" ) ; try { synchronized ( mLock ) { int userHandleId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; android.os.UserHandle currentUserHandle = new android.os.UserHandle ( userHandleId ) ; mPhoneAccountRegistrar.setCurrentUserHandle ( currentUserHandle ) ; mCallsManager.onUserSwitch ( currentUserHandle ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.telecom.Log.startSession ( "TSSwR.oR" ) ; try { synchronized ( mLock ) { int userHandleId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; android.os.UserHandle currentUserHandle = new android.os.UserHandle ( userHandleId ) ; mPhoneAccountRegistrar.setCurrentUserHandle ( currentUserHandle ) ; mCallsManager.onUserSwitch ( currentUserHandle ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setView ( view ) ; mDialog = mBuilder.show ( ) ; mFrameLayout = ( ( android.widget.FrameLayout ) ( mDialog.getWindow ( ) . findViewById ( R.id.custom ) ) ) ; mView = mFrameLayout.getChildAt ( 0 ) ; }

Target:
public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setView ( view , viewSpacingLeft , viewSpacingTop , viewSpacingRight , viewSpacingBottom ) ; mDialog = mBuilder.show ( ) ; mView = mDialog.getWindow ( ) . findViewById ( 100 ) ; }
Source:
public static java.lang.String getLogFormatString ( com.android.ddmlib.Log.LogLevel logLevel , java.lang.String tag , java.lang.String message ) { long msec ; msec = java.lang.System.currentTimeMillis ( ) ; return java.lang.String.format ( "%02d:%02d %c/%s: %s\n" , ( ( msec / 60000 ) % 60 ) , ( ( msec / 1000 ) % 60 ) , logLevel.getPriorityLetter ( ) , tag , message ) ; }

Target:
public static java.lang.String getLogFormatString ( com.android.ddmlib.Log.LogLevel logLevel , java.lang.String tag , java.lang.String message ) { java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat ( "hh:mm:ss" ) ; return java.lang.String.format ( "%s %c/%s: %s\n" , formatter.format ( new java.util.Date ( ) ) , logLevel.getPriorityLetter ( ) , tag , message ) ; }
Source:
private java.lang.String getDefaultPath ( com.google.gct.idea.appengine.validation.PsiMethod psiMethod ) { java.lang.String apiDefaultResource = getResourceProperty ( psiMethod ) ; if ( apiDefaultResource != null ) { return apiDefaultResource.toLowerCase ( ) ; } return psiMethod.getName ( ) ; }

Target:
private java.lang.String getDefaultPath ( com.google.gct.idea.appengine.validation.PsiMethod psiMethod ) { java.lang.String apiDefaultResource = getResourceProperty ( psiMethod ) ; if ( apiDefaultResource != null ) { return ( apiDefaultResource.toLowerCase ( ) ) + ( getPathParameter ( psiMethod ) ) ; } java.lang.String guessedResourceName = guessResourceName ( psiMethod ) ; if ( guessedResourceName != null ) { return guessedResourceName + ( getPathParameter ( psiMethod ) ) ; } return ( psiMethod.getName ( ) ) + ( getPathParameter ( psiMethod ) ) ; }
Source:
public int remove ( java.lang.String name , int userId ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "remove" ) ; builder.append ( ' ' ) ; builder.append ( name ) ; builder.append ( ' ' ) ; builder.append ( userId ) ; return mInstaller.execute ( builder.toString ( ) ) ; }

Target:
public int remove ( java.lang.String uuid , java.lang.String name , int userId ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "remove" ) ; builder.append ( ' ' ) ; builder.append ( com.android.server.pm.Installer.escapeNull ( uuid ) ) ; builder.append ( ' ' ) ; builder.append ( name ) ; builder.append ( ' ' ) ; builder.append ( userId ) ; return mInstaller.execute ( builder.toString ( ) ) ; }
Source:
synchronized void nScriptSetVarI ( long id , int slot , int val ) { validate ( ) ; rsnScriptSetVarI ( mContext , id , slot , val ) ; }

Target:
synchronized long nScriptKernelIDCreate ( long sid , int slot , int sig , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } return rsnScriptKernelIDCreate ( curCon , sid , slot , sig , mUseInc ) ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] id = org.conscrypt.NativeCrypto.SSL_SESSION_session_id ( session ) ; assertNotNull ( id ) ; assertEquals ( 32 , id.length ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] id = org.conscrypt.NativeCrypto.SSL_SESSION_session_id ( session ) ; org.junit.Assert.assertNotNull ( id ) ; org.junit.Assert.assertEquals ( 32 , id.length ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
public static void help ( java.io.PrintStream out ) { out.println ( "java -jar ahat.jar [-p port] FILE" ) ; out.println ( ( " Launch an http server for viewing " + "the given Android heap-dump FILE." ) ) ; out.println ( "" ) ; out.println ( "Options:" ) ; out.println ( " -p <port>" ) ; out.println ( " Serve pages on the given port. Defaults to 7100." ) ; out.println ( "" ) ; }

Target:
public static void help ( java.io.PrintStream out ) { out.println ( "java -jar ahat.jar [-p port] [--proguard-map FILE] FILE" ) ; out.println ( ( " Launch an http server for viewing " + "the given Android heap-dump FILE." ) ) ; out.println ( "" ) ; out.println ( "Options:" ) ; out.println ( " -p <port>" ) ; out.println ( " Serve pages on the given port. Defaults to 7100." ) ; out.println ( " --proguard-map FILE" ) ; out.println ( " Use the proguard map FILE to deobfuscate the heap dump." ) ; out.println ( "" ) ; }
Source:
public static void assertEquals ( java.lang.String message , double expected , double actual , double delta ) { if ( ( java.lang.Double.compare ( expected , actual ) ) == 0 ) return ; if ( ! ( ( java.lang.Math.abs ( ( expected - actual ) ) ) <= delta ) ) org.junit.Assert.failNotEquals ( message , new java.lang.Double ( expected ) , new java.lang.Double ( actual ) ) ; }

Target:
public static void assertNull ( java.lang.String message , java.lang.Object object ) { if ( object == null ) { return ; } org.junit.Assert.failNotNull ( message , object ) ; }
Source:
public void setSoWriteTimeout ( int writeTimeoutMilliseconds ) throws java.net.SocketException { this . writeTimeoutMilliseconds = writeTimeoutMilliseconds ; libcore.io.StructTimeval tv = libcore.io.StructTimeval.fromMillis ( writeTimeoutMilliseconds ) ; try { Libcore.os.setsockoptTimeval ( getFileDescriptor$ ( ) , org.conscrypt.SOL_SOCKET , org.conscrypt.SO_SNDTIMEO , tv ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }

Target:
public void setSoWriteTimeout ( int writeTimeoutMilliseconds ) throws java.net.SocketException { this . writeTimeoutMilliseconds = writeTimeoutMilliseconds ; libcore.io.StructTimeval tv = libcore.io.StructTimeval.fromMillis ( writeTimeoutMilliseconds ) ; try { Libcore.os.setsockoptTimeval ( getFileDescriptor$ ( ) , libcore.io.OsConstants.SOL_SOCKET , libcore.io.OsConstants.SO_SNDTIMEO , tv ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
public void testDescendingAddAll3 ( ) { try { java.util.NavigableSet q = jsr166.ConcurrentSkipListSubSetTest.dset0 ( ) ; java.lang.Integer [ ] ints = new java.lang.Integer [ SIZE ] ; for ( int i = 0 ; i < ( ( SIZE ) - 1 ) ; ++ i ) ints [ i ] = new java.lang.Integer ( ( i + ( SIZE ) ) ) ; q.addAll ( java.util.Arrays.asList ( ints ) ) ; shouldThrow ( ) ; } catch ( java.lang.NullPointerException success ) { } }

Target:
public void testDescendingAddNull ( ) { java.util.NavigableSet q = jsr166.ConcurrentSkipListSubSetTest.dset0 ( ) ; try { q.add ( null ) ; shouldThrow ( ) ; } catch ( java.lang.NullPointerException success ) { } }
Source:
public void testNoResidualPermissionsOnUninstall ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part1" ) ; assertNull ( getDevice ( ) . uninstallPackage ( android.appsecurity.cts.PermissionsHostTest.PKG ) ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part2" ) ; }

Target:
public void testUpgradeKeepsPermissions ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testAllPermissionsGrantedByDefault" ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testAllPermissionsGrantedOnUpgrade" ) ; }
Source:
public void testApplyingWithCriticalFiles ( ) throws java.lang.Exception { myPatchSpec.setCriticalFiles ( java.util.Arrays.asList ( "lib/annotations.jar" ) ) ; com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertTrue ( com.intellij.updater.PatchFileCreator.apply ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) , com.intellij.updater.TEST_UI ) ) ; assertAppliedCorrectly ( ) ; }

Target:
public void testApplyingWithCriticalFiles ( ) throws java.lang.Exception { myPatchSpec.setCriticalFiles ( java.util.Arrays.asList ( "lib/annotations.jar" ) ) ; com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; assertAppliedAndRevertedCorrectly ( patch , com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }
Source:
private android.view.ViewGroup.LayoutParams getNavigationBarLayoutParams ( ) { android.view.WindowManager.LayoutParams lp = new android.view.WindowManager.LayoutParams ( android.view.ViewGroup.LayoutParams.MATCH_PARENT , android.view.ViewGroup.LayoutParams.MATCH_PARENT , android.view.ViewGroup.LayoutParams.TYPE_NAVIGATION_BAR , ( ( ( ( ( 0 | ( android.view.ViewGroup.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_NOT_FOCUSABLE ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_NOT_TOUCH_MODAL ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_SPLIT_TOUCH ) ) , android.graphics.PixelFormat.OPAQUE ) ; if ( android.app.ActivityManager.isHighEndGfx ( ) ) { lp.flags |= android.view.ViewGroup.LayoutParams.FLAG_HARDWARE_ACCELERATED ; } lp.setTitle ( "NavigationBar" ) ; lp.windowAnimations = 0 ; return lp ; }

Target:
private android.view.ViewGroup.LayoutParams getNavigationBarLayoutParams ( ) { android.view.WindowManager.LayoutParams lp = new android.view.WindowManager.LayoutParams ( android.view.ViewGroup.LayoutParams.MATCH_PARENT , android.view.ViewGroup.LayoutParams.MATCH_PARENT , android.view.ViewGroup.LayoutParams.TYPE_NAVIGATION_BAR , ( ( ( ( ( 0 | ( android.view.ViewGroup.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_NOT_FOCUSABLE ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_NOT_TOUCH_MODAL ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_SPLIT_TOUCH ) ) , android.graphics.PixelFormat.TRANSLUCENT ) ; if ( android.app.ActivityManager.isHighEndGfx ( ) ) { lp.flags |= android.view.ViewGroup.LayoutParams.FLAG_HARDWARE_ACCELERATED ; } lp.setTitle ( "NavigationBar" ) ; lp.windowAnimations = 0 ; return lp ; }
Source:
public com.android.dx.merge.TypeList adjustTypeList ( com.android.dx.merge.TypeList typeList ) { if ( typeList == ( TypeList.EMPTY ) ) { return typeList ; } short [ ] types = typeList.getTypes ( ) . clone ( ) ; for ( int i = 0 ; i < ( types.length ) ; i ++ ) { types [ i ] = ( ( short ) ( adjustType ( types [ i ] ) ) ) ; } return new com.android.dx.merge.TypeList ( target , types ) ; }

Target:
public com.android.dex.TypeList adjustTypeList ( com.android.dex.TypeList typeList ) { if ( typeList == ( com.android.dex.TypeList.EMPTY ) ) { return typeList ; } short [ ] types = typeList.getTypes ( ) . clone ( ) ; for ( int i = 0 ; i < ( types.length ) ; i ++ ) { types [ i ] = ( ( short ) ( adjustType ( types [ i ] ) ) ) ; } return new com.android.dex.TypeList ( target , types ) ; }
Source:
public static java.util.List < junitparams.internal.TestMethod > listFrom ( java.util.List < org.junit.runners.model.FrameworkMethod > annotatedMethods , org.junit.runners.model.TestClass testClass ) { java.util.List < junitparams.internal.TestMethod > methods = new java.util.ArrayList < junitparams.internal.TestMethod > ( ) ; for ( org.junit.runners.model.FrameworkMethod frameworkMethod : annotatedMethods ) methods.add ( new junitparams.internal.TestMethod ( frameworkMethod , testClass ) ) ; return methods ; }

Target:
public static java.util.List < org.junit.runners.model.FrameworkMethod > listFrom ( org.junit.runners.model.TestClass testClass ) { java.util.List < org.junit.runners.model.FrameworkMethod > methods = new java.util.ArrayList < org.junit.runners.model.FrameworkMethod > ( ) ; for ( org.junit.runners.model.FrameworkMethod frameworkMethod : testClass.getAnnotatedMethods ( org.junit.Test.class ) ) { junitparams.internal.TestMethod testMethod = new junitparams.internal.TestMethod ( frameworkMethod , testClass ) ; methods.add ( testMethod.describableFrameworkMethod ( ) ) ; } return methods ; }
Source:
public static com.android.server.NsdService create ( android.content.Context context ) throws java.lang.InterruptedException { com.android.server.NsdService service = new com.android.server.NsdService ( context ) ; service.mNativeDaemonConnected.await ( ) ; return service ; }

Target:
public static com.android.server.NsdService create ( android.content.Context context ) throws java.lang.InterruptedException { com.android.server.NsdService.NsdSettings settings = com.android.server.NsdService.NsdSettings.makeDefault ( context ) ; android.os.HandlerThread thread = new android.os.HandlerThread ( com.android.server.NsdService.TAG ) ; thread.start ( ) ; android.os.Handler handler = new android.os.Handler ( thread.getLooper ( ) ) ; com.android.server.NsdService service = new com.android.server.NsdService ( context , settings , handler ) ; service.mNativeDaemonConnected.await ( ) ; return service ; }
Source:
public final java.nio.MappedByteBuffer force ( ) { checkIsMapped ( ) ; if ( ( mapMode ) == ( java.nio.channels.FileChannel.MapMode.READ_WRITE ) ) { try { Libcore.os.msync ( block.toLong ( ) , block.getSize ( ) , java.nio.MS_SYNC ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } } return this ; }

Target:
public final java.nio.MappedByteBuffer force ( ) { checkIsMapped ( ) ; if ( ( mapMode ) == ( java.nio.channels.FileChannel.MapMode.READ_WRITE ) ) { try { Libcore.os.msync ( block.toLong ( ) , block.getSize ( ) , libcore.io.OsConstants.MS_SYNC ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } } return this ; }
Source:
public static com.google.common.truth.TestVerb assertWithMessage ( java.lang.String message ) { return com.google.common.truth.Truth.assert_ ( ) . withFailureMessage ( message ) ; }

Target:
public static < K , V , M extends com.google.common.collect.Multimap < K , V > > com.google.common.truth.MultimapSubject < ? extends com.google.common.truth.MultimapSubject < ? , K , V , M > , K , V , M > assertThat ( @ com.android.annotations.Nullable com.google.common.collect.Multimap < K , V > target ) { return com.google.common.truth.Truth.assert_ ( ) . that ( target ) ; }