auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void handle ( com.android.ide.common.api.INode n ) { java.lang.String attribute = ( actionId.equals ( com.android.ide.common.layout.BaseLayoutRule.ACTION_FILL_WIDTH ) ) ? com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH : com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT ; java.lang.String value ; if ( newValue ) { if ( supportsMatchParent ( ) ) { value = com.android.ide.common.layout.LayoutConstants.VALUE_MATCH_PARENT ; } else { value = com.android.ide.common.layout.LayoutConstants.VALUE_FILL_PARENT ; } } else { value = com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT ; } for ( com.android.ide.common.api.INode child : targets ) { child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , attribute , value ) ; } }

Target:
public void handle ( com.android.ide.common.api.INode n ) { java.lang.String attribute = ( actionId.equals ( com.android.ide.common.layout.BaseLayoutRule.ACTION_FILL_WIDTH ) ) ? com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH : com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT ; java.lang.String value ; if ( newValue ) { if ( supportsMatchParent ( ) ) { value = com.android.ide.common.layout.LayoutConstants.VALUE_MATCH_PARENT ; } else { value = com.android.ide.common.layout.LayoutConstants.VALUE_FILL_PARENT ; } } else { value = com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT ; } for ( com.android.ide.common.api.INode child : targets ) { child.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , attribute , value ) ; } }
Source:
protected void onStop ( ) { super . onStop ( ) ; if ( null != ( mSmilPlayer ) ) { if ( isFinishing ( ) ) { mSmilPlayer.stop ( ) ; } else { mSmilPlayer.stopWhenReload ( ) ; } if ( ( mMediaController ) != null ) { mMediaController.hide ( ) ; } } }

Target:
protected void onStop ( ) { super . onStop ( ) ; if ( null != ( mSmilPlayer ) ) { if ( isFinishing ( ) ) { mSmilPlayer.stop ( ) ; } else { mSmilPlayer.stopWhenReload ( ) ; } if ( ( mMediaController ) != null ) { android.widget.SeekBar seeker = ( ( android.widget.SeekBar ) ( mMediaController.findViewById ( com.android.internal.R.id.mediacontroller_progress ) ) ) ; seeker.setOnSeekBarChangeListener ( null ) ; mMediaController.hide ( ) ; } } }
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 run ( long sslSession ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.SSL_shutdown ( sslSession , null , org.conscrypt.NativeCryptoTest.DUMMY_CB ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }
Source:
static java.nio.ByteBuffer getAndroidManifestFromApk ( java.util.List < com.android.apksig.internal.zip.CentralDirectoryRecord > cdRecords , com.android.apksig.util.DataSource lhfSection ) throws com.android.apksig.apk.ApkFormatException , com.android.apksig.zip.ZipFormatException , java.io.IOException { com.android.apksig.internal.zip.CentralDirectoryRecord androidManifestCdRecord = null ; for ( com.android.apksig.internal.zip.CentralDirectoryRecord cdRecord : cdRecords ) { if ( com.android.apksig.ApkSigner.ANDROID_MANIFEST_ZIP_ENTRY_NAME.equals ( cdRecord.getName ( ) ) ) { androidManifestCdRecord = cdRecord ; break ; } } if ( androidManifestCdRecord == null ) { throw new com.android.apksig.apk.ApkFormatException ( ( "Missing " + ( com.android.apksig.ApkSigner.ANDROID_MANIFEST_ZIP_ENTRY_NAME ) ) ) ; } return java.nio.ByteBuffer.wrap ( com.android.apksig.internal.zip.LocalFileRecord.getUncompressedData ( lhfSection , androidManifestCdRecord , lhfSection.size ( ) ) ) ; }

Target:
private static com.android.apksig.internal.zip.CentralDirectoryRecord findCdRecord ( java.util.List < com.android.apksig.internal.zip.CentralDirectoryRecord > cdRecords , java.lang.String name ) { for ( com.android.apksig.internal.zip.CentralDirectoryRecord cdRecord : cdRecords ) { if ( name.equals ( cdRecord.getName ( ) ) ) { return cdRecord ; } } return null ; }
Source:
private static com.ibm.icu.util.Calendar.PatternData make ( com.ibm.icu.util.ULocale loc , java.lang.String calType ) { java.lang.String key = ( ( loc.getBaseName ( ) ) + "+" ) + calType ; com.ibm.icu.util.Calendar.PatternData patternData = com.ibm.icu.util.Calendar.PATTERN_CACHE.get ( key ) ; if ( patternData == null ) { try { patternData = com.ibm.icu.util.Calendar.getPatternData ( loc , calType ) ; } catch ( java.util.MissingResourceException e ) { patternData = new com.ibm.icu.util.Calendar.PatternData ( com.ibm.icu.util.Calendar.DEFAULT_PATTERNS , null ) ; } com.ibm.icu.util.Calendar.PATTERN_CACHE.put ( key , patternData ) ; } return patternData ; }

Target:
private static com.ibm.icu.util.Calendar.PatternData make ( com.ibm.icu.util.Calendar cal , com.ibm.icu.util.ULocale loc ) { java.lang.String calType = cal.getType ( ) ; java.lang.String key = ( ( loc.getBaseName ( ) ) + "+" ) + calType ; com.ibm.icu.util.Calendar.PatternData patternData = com.ibm.icu.util.Calendar.PATTERN_CACHE.get ( key ) ; if ( patternData == null ) { try { patternData = com.ibm.icu.util.Calendar.getPatternData ( loc , calType ) ; } catch ( java.util.MissingResourceException e ) { patternData = new com.ibm.icu.util.Calendar.PatternData ( com.ibm.icu.util.Calendar.DEFAULT_PATTERNS , null ) ; } com.ibm.icu.util.Calendar.PATTERN_CACHE.put ( key , patternData ) ; } return patternData ; }
Source:
public int compareTo ( com.android.dx.merge.TypeList other ) { for ( int i = 0 ; ( i < ( types.length ) ) && ( i < ( other.types.length ) ) ; i ++ ) { if ( ( types [ i ] ) != ( other.types [ i ] ) ) { return com.android.dx.util.Unsigned.compare ( types [ i ] , other.types [ i ] ) ; } } return com.android.dx.util.Unsigned.compare ( types.length , other.types.length ) ; }

Target:
public int compareTo ( com.android.dex.TypeList other ) { for ( int i = 0 ; ( i < ( types.length ) ) && ( i < ( other.types.length ) ) ; i ++ ) { if ( ( types [ i ] ) != ( other.types [ i ] ) ) { return com.android.dex.util.Unsigned.compare ( types [ i ] , other.types [ i ] ) ; } } return com.android.dex.util.Unsigned.compare ( types.length , other.types.length ) ; }
Source:
static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.gsm.GSMPhone phone ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone ) ; ret.message = ussdMessage ; ret.isUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.isPendingUSSD = true ; ret.state = State.PENDING ; } else { ret.state = State.COMPLETE ; } return ret ; }

Target:
static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.gsm.GSMPhone phone , com.android.internal.telephony.gsm.UiccCardApplication app ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone , app ) ; ret.message = ussdMessage ; ret.isUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.isPendingUSSD = true ; ret.state = State.PENDING ; } else { ret.state = State.COMPLETE ; } return ret ; }
Source:
public boolean isPeripheralModeSupported ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return false ; try { return mService.isPeripheralModeSupported ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "failed to get peripheral mode capability: " , e ) ; } return false ; }

Target:
public void requestControllerActivityEnergyInfo ( android.os.ResultReceiver result ) { try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) { mService.requestActivityInfo ( result ) ; result = null ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , ( "getControllerActivityEnergyInfoCallback: " + e ) ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; if ( result != null ) { result.send ( 0 , null ) ; } } }
Source:
public void onClick ( android.view.View v ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailViewHolder.onClick" , "voicemail id: %d" , viewHolderId ) ; if ( isViewHolderExpanded ) { collapseViewHolder ( ) ; } else { expandViewHolder ( ) ; voicemailViewHolderListener.onViewHolderExpanded ( this ) ; } }

Target:
public void onClick ( android.view.View v ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailViewHolder.onClick" , "voicemail id: %d, isViewHolderExpanded:%b" , viewHolderId , isViewHolderExpanded ) ; if ( isViewHolderExpanded ) { collapseViewHolder ( ) ; voicemailViewHolderListener.onViewHolderCollapsed ( this ) ; } else { expandViewHolder ( ) ; voicemailViewHolderListener.onViewHolderExpanded ( this ) ; } }
Source:
public void testAesCbcHmacSha512Tcp4UdpEncap ( ) 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_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testAesCbcHmacSha512Udp4UdpEncap ( ) 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_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }
Source:
public static java.util.List < java.lang.String > runAndGetOutput ( @ com.android.annotations.NonNull com.android.ide.common.internal.CommandLineRunner commandLineRunner , @ com.android.annotations.NonNull java.util.List < java.lang.String > command ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { final java.util.List < java.lang.String > output = com.google.common.collect.Lists.newArrayList ( ) ; commandLineRunner.runCmdLine ( command , new com.android.ide.common.internal.CommandLineRunner.CommandLineOutput ( ) { @ java.lang.Override public void out ( @ org.gradle.api.Nullable java.lang.String line ) { if ( line != null ) { output.add ( line ) ; } } @ java.lang.Override public void err ( @ org.gradle.api.Nullable java.lang.String line ) { super . err ( line ) ; } } , null ) ; return output ; }

Target:
public static java.util.List < java.lang.String > getApkBadging ( @ com.android.annotations.NonNull java.io.File apk ) throws com.android.ide.common.process.ProcessException { java.io.File aapt = com.android.build.gradle.integration.common.utils.SdkHelper.getAapt ( ) ; com.android.ide.common.process.ProcessInfoBuilder builder = new com.android.ide.common.process.ProcessInfoBuilder ( ) ; builder.setExecutable ( aapt ) ; builder.addArgs ( "dump" , "badging" , apk.getPath ( ) ) ; return com.android.build.gradle.integration.common.utils.ApkHelper.runAndGetOutput ( builder.createProcess ( ) ) ; }
Source:
public void bindAllocation ( android.support.v8.renderscript.Allocation va , int slot ) { mRS.validate ( ) ; if ( va != null ) { mRS.nScriptBindAllocation ( getID ( mRS ) , va.getID ( mRS ) , slot ) ; } else { mRS.nScriptBindAllocation ( getID ( mRS ) , 0 , slot ) ; } }

Target:
protected android.support.v8.renderscript.Script.FieldID createFieldID ( int slot , android.support.v8.renderscript.Element e ) { android.support.v8.renderscript.Script.FieldID f = mFIDs.get ( slot ) ; if ( f != null ) { return f ; } long id = mRS.nScriptFieldIDCreate ( getID ( mRS ) , slot , mUseIncSupp ) ; if ( id == 0 ) { throw new android.support.v8.renderscript.RSDriverException ( "Failed to create FieldID" ) ; } f = new android.support.v8.renderscript.Script.FieldID ( id , mRS , this , slot ) ; mFIDs.put ( slot , f ) ; return f ; }
Source:
public void testEnterpriseConfigAdded ( ) { com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfig = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CA_CERT0 } ) ; assertTrue ( com.android.server.wifi.WifiConfigurationUtil.hasEnterpriseConfigChanged ( null , eapConfig.enterpriseConfig ) ) ; }

Target:
public void testEnterpriseConfigAdded ( ) { com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfig = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { FakeKeys.CA_CERT0 } ) ; assertTrue ( com.android.server.wifi.WifiConfigurationUtil.hasEnterpriseConfigChanged ( null , eapConfig.enterpriseConfig ) ) ; }
Source:
private static void waitFor ( com.android.server.ConnectivityServiceTest.Criteria criteria ) { int delays = 0 ; while ( ! ( criteria.get ( ) ) ) { com.android.server.ConnectivityServiceTest.sleepFor ( 50 ) ; if ( ( ++ delays ) == 10 ) fail ( ) ; } }

Target:
private static void waitFor ( com.android.server.ConnectivityServiceTest.Criteria criteria ) { int delays = 0 ; while ( ! ( criteria.get ( ) ) ) { try { java.lang.Thread.sleep ( 50 ) ; } catch ( java.lang.InterruptedException e ) { } if ( ( ++ delays ) == 10 ) fail ( ) ; } }
Source:
private static java.io.File getAutoProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ) == null ) { java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsJar = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "autoProcessor" , ".jar" ) ; java.io.File processorsSrcDir = com.android.jack.annotation.processor.AnnotationProcessorTests.compileProcessorsToDir ( processorsDir ) ; com.android.jack.test.toolchain.AbstractTestTools.copyFileToDir ( new java.io.File ( processorsSrcDir , "javax.annotation.processing.Processor" ) , "META-INF/services/javax.annotation.processing.Processor" , processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.makeZipFromDir ( processorsDir , processorsJar ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors = processorsJar ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ; }

Target:
private static java.io.File getAutoProcessors ( @ javax.annotation.Nonnull java.lang.String processorName ) throws java.lang.Exception { java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsJar = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "autoProcessor" , ".jar" ) ; java.io.File processorsSrcDir = com.android.jack.annotation.processor.AnnotationProcessorTests.compileProcessorsToDir ( processorsDir , processorName ) ; com.android.jack.test.toolchain.AbstractTestTools.copyFileToDir ( new java.io.File ( processorsSrcDir , "javax.annotation.processing.Processor" ) , "META-INF/services/javax.annotation.processing.Processor" , processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.makeZipFromDir ( processorsDir , processorsJar ) ; return processorsJar ; }
Source:
protected java.lang.String apnIdToType ( int id ) { switch ( id ) { case com.android.internal.telephony.DctConstants.APN_DEFAULT_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_DEFAULT ; case com.android.internal.telephony.DctConstants.APN_MMS_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_MMS ; case com.android.internal.telephony.DctConstants.APN_SUPL_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_SUPL ; case com.android.internal.telephony.DctConstants.APN_DUN_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_DUN ; case com.android.internal.telephony.DctConstants.APN_HIPRI_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_HIPRI ; case com.android.internal.telephony.DctConstants.APN_IMS_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_IMS ; case com.android.internal.telephony.DctConstants.APN_FOTA_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_FOTA ; case com.android.internal.telephony.DctConstants.APN_CBS_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_CBS ; default : log ( ( ( "Unknown id (" + id ) + ") in apnIdToType" ) ) ; return com.android.internal.telephony.PhoneConstants.APN_TYPE_DEFAULT ; } }

Target:
protected java.lang.String apnIdToType ( int id ) { switch ( id ) { case com.android.internal.telephony.DctConstants.APN_DEFAULT_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_DEFAULT ; case com.android.internal.telephony.DctConstants.APN_MMS_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_MMS ; case com.android.internal.telephony.DctConstants.APN_SUPL_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_SUPL ; case com.android.internal.telephony.DctConstants.APN_DUN_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_DUN ; case com.android.internal.telephony.DctConstants.APN_HIPRI_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_HIPRI ; case com.android.internal.telephony.DctConstants.APN_IMS_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_IMS ; case com.android.internal.telephony.DctConstants.APN_FOTA_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_FOTA ; case com.android.internal.telephony.DctConstants.APN_CBS_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_CBS ; case com.android.internal.telephony.DctConstants.APN_IA_ID : return com.android.internal.telephony.PhoneConstants.APN_TYPE_IA ; default : log ( ( ( "Unknown id (" + id ) + ") in apnIdToType" ) ) ; return com.android.internal.telephony.PhoneConstants.APN_TYPE_DEFAULT ; } }
Source:
public static com.android.dx.rop.code.RopMethod convert ( com.android.dx.cf.code.ConcreteMethod method , com.android.dx.rop.code.TranslationAdvice advice ) { try { com.android.dx.cf.code.Ropper r = new com.android.dx.cf.code.Ropper ( method , advice ) ; r.doit ( ) ; return r.getRopMethod ( ) ; } catch ( com.android.dx.cf.code.SimException ex ) { ex.addContext ( ( "...while working on method " + ( method.getNat ( ) . toHuman ( ) ) ) ) ; throw ex ; } }

Target:
public static com.android.dx.rop.code.RopMethod convert ( com.android.dx.cf.code.ConcreteMethod method , com.android.dx.rop.code.TranslationAdvice advice , com.android.dx.cf.iface.MethodList methods ) { try { com.android.dx.cf.code.Ropper r = new com.android.dx.cf.code.Ropper ( method , advice , methods ) ; r.doit ( ) ; return r.getRopMethod ( ) ; } catch ( com.android.dx.cf.code.SimException ex ) { ex.addContext ( ( "...while working on method " + ( method.getNat ( ) . toHuman ( ) ) ) ) ; throw ex ; } }
Source:
public void process ( ) { com.android.server.telecom.Log.v ( this , "process" ) ; clearTimeout ( ) ; mAttemptRecords = new java.util.ArrayList < > ( ) ; if ( ( mCall.getTargetPhoneAccount ( ) ) != null ) { mAttemptRecords.add ( new com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord ( mCall.getTargetPhoneAccount ( ) , mCall.getTargetPhoneAccount ( ) ) ) ; } adjustAttemptsForConnectionManager ( ) ; adjustAttemptsForEmergency ( ) ; mAttemptRecordIterator = mAttemptRecords.iterator ( ) ; attemptNextPhoneAccount ( ) ; }

Target:
public void process ( ) { android.telecom.Log.v ( this , "process" ) ; clearTimeout ( ) ; mAttemptRecords = new java.util.ArrayList < > ( ) ; if ( ( mCall.getTargetPhoneAccount ( ) ) != null ) { mAttemptRecords.add ( new com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord ( mCall.getTargetPhoneAccount ( ) , mCall.getTargetPhoneAccount ( ) ) ) ; } adjustAttemptsForConnectionManager ( ) ; adjustAttemptsForEmergency ( ) ; mAttemptRecordIterator = mAttemptRecords.iterator ( ) ; attemptNextPhoneAccount ( ) ; }
Source:
public static void computeLdexp ( android.renderscript.cts.TestLdexp.ArgumentsFloatIntFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 1 , 1 , false ) ; android.renderscript.cts.Target.Floaty inX = t.new32 ( args.inX ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.ldexp ( inX.mid32 ( ) , args.inY ) , android.renderscript.cts.CoreMathVerifier.ldexp ( inX.min32 ( ) , args.inY ) , android.renderscript.cts.CoreMathVerifier.ldexp ( inX.max32 ( ) , args.inY ) ) ; }

Target:
public static void computeLdexp ( android.renderscript.cts.TestLdexp.ArgumentsFloatIntFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 1 , 1 , false ) ; android.renderscript.cts.Target.Floaty inMantissa = t.new32 ( args.inMantissa ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.ldexp ( inMantissa.mid32 ( ) , args.inExponent ) , android.renderscript.cts.CoreMathVerifier.ldexp ( inMantissa.min32 ( ) , args.inExponent ) , android.renderscript.cts.CoreMathVerifier.ldexp ( inMantissa.max32 ( ) , args.inExponent ) ) ; }
Source:
public void test_getProvider ( ) throws java.lang.Exception { if ( ! ( tests.api.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) fail ( tests.api.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; assertEquals ( "Incorrect provider" , tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultProvider , javax.net.ssl.KeyManagerFactory.getInstance ( tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultAlgorithm ) . getProvider ( ) ) ; assertEquals ( "Incorrect provider" , tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultProvider , javax.net.ssl.KeyManagerFactory.getInstance ( tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultAlgorithm , tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultProviderName ) . getProvider ( ) ) ; assertEquals ( "Incorrect provider" , tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultProvider , javax.net.ssl.KeyManagerFactory.getInstance ( tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultAlgorithm , tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultProvider ) . getProvider ( ) ) ; }

Target:
public void test_getProvider ( ) throws java.lang.Exception { if ( ! ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) fail ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; assertEquals ( "Incorrect provider" , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultProvider , javax.net.ssl.KeyManagerFactory.getInstance ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultAlgorithm ) . getProvider ( ) ) ; assertEquals ( "Incorrect provider" , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultProvider , javax.net.ssl.KeyManagerFactory.getInstance ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultAlgorithm , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultProviderName ) . getProvider ( ) ) ; assertEquals ( "Incorrect provider" , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultProvider , javax.net.ssl.KeyManagerFactory.getInstance ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultAlgorithm , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultProvider ) . getProvider ( ) ) ; }
Source:
public byte [ ] [ ] saw ( byte [ ] prefix ) { java.util.ArrayList < byte [ ] > values = execute ( 's' , prefix ) ; return values == null ? null : values.toArray ( new byte [ values.size ( ) ] [ ] ) ; }

Target:
public boolean contains ( java.lang.String key ) { try { return ( mBinder.exist ( key ) ) == ( 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 byte [ ] getIssuerKeyIdentifier ( ) { byte [ ] issuerKeyId = null ; sun.security.x509.AuthorityKeyIdentifierExtension aki = getAuthorityKeyIdentifierExtension ( ) ; if ( aki != null ) { try { sun.security.x509.KeyIdentifier ki = ( ( sun.security.x509.KeyIdentifier ) ( aki.get ( sun.security.x509.AuthorityKeyIdentifierExtension.KEY_ID ) ) ) ; if ( ki != null ) { issuerKeyId = ki.getIdentifier ( ) ; } } catch ( java.io.IOException e ) { } } return issuerKeyId ; }

Target:
public java.lang.String getFingerprint ( java.lang.String algorithm ) { if ( ! ( fingerprints.containsKey ( algorithm ) ) ) { fingerprints.put ( algorithm , getCertificateFingerPrint ( algorithm ) ) ; } return fingerprints.get ( algorithm ) ; }
Source:
private com.android.builder.model.AndroidProject execute ( @ com.android.annotations.NonNull java.util.List < java.lang.String > arguments , boolean returnModel , @ com.android.annotations.NonNull java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( arguments , connection , tasks ) ; if ( returnModel ) { return connection.getModel ( com.android.builder.model.AndroidProject.class ) ; } } finally { connection.close ( ) ; } return null ; }

Target:
private com.android.builder.model.AndroidProject execute ( @ com.android.annotations.NonNull java.util.List < java.lang.String > arguments , boolean returnModel , @ com.android.annotations.NonNull java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( arguments , connection , tasks ) ; if ( returnModel ) { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; return modelMap.get ( ":" ) ; } } finally { connection.close ( ) ; } return null ; }
Source:
public < T extends com.android.sched.marker.Marker > boolean containsMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { assert isValidMarker ( cls ) : ( ( ( "Marker '" + ( com.android.sched.item.Items.getName ( cls ) ) ) + "' is not supported for class '" ) + ( this . getClass ( ) . getName ( ) ) ) + "'" ; if ( ( markers ) == null ) { return false ; } return markers.containsKey ( cls ) ; }

Target:
public < T extends com.android.sched.marker.Marker > boolean containsMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { synchronized ( lock ) { assert isValidMarker ( cls ) : ( ( ( "Marker '" + ( com.android.sched.item.Items.getName ( cls ) ) ) + "' is not supported for class '" ) + ( this . getClass ( ) . getName ( ) ) ) + "'" ; if ( ( markers ) == null ) { return false ; } return markers.containsKey ( cls ) ; } }
Source:
public android.graphics.drawable.Drawable getActivityIcon ( android.content.Intent intent ) throws android.app.NameNotFoundException { if ( ( intent.getComponent ( ) ) != null ) { return getActivityIcon ( intent.getComponent ( ) ) ; } android.content.pm.ResolveInfo info = resolveActivity ( intent , PackageManager.MATCH_DEFAULT_ONLY ) ; if ( info != null ) { return info.activityInfo.loadIcon ( this ) ; } throw new android.app.NameNotFoundException ( intent.toURI ( ) ) ; }

Target:
public android.graphics.drawable.Drawable getActivityIcon ( android.content.Intent intent ) throws android.app.NameNotFoundException { if ( ( intent.getComponent ( ) ) != null ) { return getActivityIcon ( intent.getComponent ( ) ) ; } android.content.pm.ResolveInfo info = resolveActivity ( intent , PackageManager.MATCH_DEFAULT_ONLY ) ; if ( info != null ) { return info.activityInfo.loadIcon ( this ) ; } throw new android.app.NameNotFoundException ( intent.toUri ( 0 ) ) ; }
Source:
public void testDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "build.gradle:5: Warning: Old buildToolsVersion 19.0.0; recommended version is 19.1 or later [GradleDependency]\n" + " buildToolsVersion \"19.0.0\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:24: Warning: A newer version of com.google.guava:guava than 11.0.2 is available: 18.0 [GradleDependency]\n" ) + " freeCompile \'com.google.guava:guava:11.0.2\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:25: Warning: A newer version of com.android.support:appcompat-v7 than 13.0.0 is available: 21.0.2 [GradleDependency]\n" ) + " compile \'com.android.support:appcompat-v7:13.0.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "gradle/Dependencies.gradle=>build.gradle" ) ) ; }

Target:
public void testDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "build.gradle:5: Warning: Old buildToolsVersion 19.0.0; recommended version is 19.1 or later [GradleDependency]\n" + " buildToolsVersion \"19.0.0\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:24: Warning: A newer version of com.google.guava:guava than 11.0.2 is available: 18.0 [GradleDependency]\n" ) + " freeCompile \'com.google.guava:guava:11.0.2\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:25: Warning: A newer version of com.android.support:appcompat-v7 than 13.0.0 is available: 21.0.2 [GradleDependency]\n" ) + " compile \'com.android.support:appcompat-v7:13.0.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:26: Warning: A newer version of com.google.android.support:wearable than 1.2.0 is available: 1.3.0 [GradleDependency]\n" ) + " compile \'com.google.android.support:wearable:1.2.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 4 warnings\n" ) ) , lintProject ( "gradle/Dependencies.gradle=>build.gradle" ) ) ; }
Source:
static int closedFormNestedNN ( int n ) { int closed = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { closed ++ ; } } return closed ; }

Target:
static int closedFormNestedMN ( int m , int n ) { int closed = 0 ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { closed ++ ; } } return closed ; }
Source:
public static boolean contentUriExists ( android.content.Context context , java.lang.String uriString ) { return ( org.chromium.base.ContentUriUtils.getParcelFileDescriptor ( context , uriString ) ) != null ; }

Target:
public static boolean contentUriExists ( android.content.Context context , java.lang.String uriString ) { android.content.res.AssetFileDescriptor asf = null ; try { asf = org.chromium.base.ContentUriUtils.getAssetFileDescriptor ( context , uriString ) ; return asf != null ; } finally { if ( asf != null ) { try { asf.close ( ) ; } catch ( java.io.IOException e ) { } } } }
Source:
private void responseLastCallFailCauseInfo ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.LastCallFailCauseInfo fcInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.LastCallFailCause ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = new com.android.internal.telephony.LastCallFailCause ( ) ; ret.causeCode = fcInfo.causeCode ; ret.vendorCause = fcInfo.vendorCause ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseSignalStrength ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.SignalStrength sigStrength ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { android.telephony.SignalStrength ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalSignalStrength ( sigStrength ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
public void onPrepareOptionsMenu ( android.view.Menu menu ) { final android.view.MenuItem itemDeleteAll = menu.findItem ( R.id.delete_all ) ; if ( itemDeleteAll != null ) { itemDeleteAll.setEnabled ( ( ( ( mAdapter ) != null ) && ( ! ( mAdapter.isEmpty ( ) ) ) ) ) ; showAllFilterMenuOptions ( menu ) ; hideCurrentFilterMenuOption ( menu ) ; if ( ! ( mVoicemailSourcesAvailable ) ) { menu.findItem ( R.id.show_voicemails_only ) . setVisible ( false ) ; } } }

Target:
public void onDestroy ( ) { super . onDestroy ( ) ; mAdapter.stopRequestProcessing ( ) ; mAdapter.changeCursor ( null ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mCallLogObserver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mContactsObserver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mVoicemailStatusObserver ) ; }
Source:
public java.lang.String toString ( ) { return java.util.Arrays.toString ( getArray ( ) ) ; }

Target:
public boolean removeAll ( java.util.Collection < ? > collection ) { synchronized ( this ) { slice.checkConcurrentModification ( elements ) ; int removed = removeOrRetain ( collection , false , slice.from , slice.to ) ; slice = new java.util.concurrent.CopyOnWriteArrayList.Slice ( elements , slice.from , ( ( slice.to ) - removed ) ) ; return removed != 0 ; } }
Source:
public static void testSendEtwsMessageEarthquake ( android.app.Activity activity , int serialNumber ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdu ( com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageNormal , serialNumber , SmsCbConstants.MESSAGE_ID_ETWS_EARTHQUAKE_WARNING ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_EMERGENCY_BROADCAST , AppOpsManager.OP_RECEIVE_EMERGECY_SMS , null , null , Activity.RESULT_OK , null , null ) ; }

Target:
public static void testSendEtwsMessageOther ( android.app.Activity activity , int serialNumber ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdu ( activity , com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageNormal , serialNumber , SmsCbConstants.MESSAGE_ID_ETWS_OTHER_EMERGENCY_TYPE ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_EMERGENCY_BROADCAST , AppOpsManager.OP_RECEIVE_EMERGECY_SMS , null , null , Activity.RESULT_OK , null , null ) ; }
Source:
private byte [ ] getPBSecondaryFolderVersion ( ) { long secondaryVcMsb = 0 ; java.nio.ByteBuffer svc = java.nio.ByteBuffer.allocate ( 16 ) ; svc.putLong ( secondaryVcMsb ) ; android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapObexServer.TAG , ( "BluetoothPbapService.secondaryVersionCounter is " + ( BluetoothPbapService.secondaryVersionCounter ) ) ) ; svc.putLong ( BluetoothPbapService.secondaryVersionCounter ) ; BluetoothPbapService.secondaryVersionCounter = 0 ; return svc.array ( ) ; }

Target:
private byte [ ] getPBSecondaryFolderVersion ( ) { long secondaryVcMsb = 0 ; java.nio.ByteBuffer svc = java.nio.ByteBuffer.allocate ( 16 ) ; svc.putLong ( secondaryVcMsb ) ; android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapObexServer.TAG , ( "secondaryVersionCounter is " + ( BluetoothPbapUtils.secondaryVersionCounter ) ) ) ; svc.putLong ( BluetoothPbapUtils.secondaryVersionCounter ) ; return svc.array ( ) ; }
Source:
private com.android.jack.ir.ast.JExpression maybeCast ( com.android.jack.ir.ast.JType expected , com.android.jack.ir.ast.JExpression expression ) { if ( ! ( expected.equals ( expression.getType ( ) ) ) ) { com.android.jack.ir.ast.JReferenceType toType = ( ( com.android.jack.ir.ast.JReferenceType ) ( expected ) ) ; return new com.android.jack.ir.ast.JDynamicCastOperation ( expression.getSourceInfo ( ) , toType , expression ) ; } else { return expression ; } }

Target:
private com.android.jack.ir.ast.JExpression maybeCast ( com.android.jack.ir.ast.JType expected , com.android.jack.ir.ast.JExpression expression ) { if ( ! ( expected.isSameType ( expression.getType ( ) ) ) ) { com.android.jack.ir.ast.JReferenceType toType = ( ( com.android.jack.ir.ast.JReferenceType ) ( expected ) ) ; return new com.android.jack.ir.ast.JDynamicCastOperation ( expression.getSourceInfo ( ) , toType , expression ) ; } else { return expression ; } }
Source:
public void testSetupDriverForClientModeError ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForClientMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IClientInterface returnedClientInterface = mWifiNative.setupForClientMode ( ) ; org.junit.Assert.assertEquals ( null , returnedClientInterface ) ; org.mockito.Mockito.verify ( mWifiNative ) . startHal ( org.mockito.Mockito.eq ( true ) ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForClientMode ( ) ; }

Target:
public void testTearDown ( ) { org.mockito.Mockito.when ( mWificondControl.tearDownInterfaces ( ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiNative.tearDown ( ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . tearDownInterfaces ( ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . stopVendorHal ( ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( type ) ; dest.writeInt ( role ) ; dest.writeInt ( clientId ) ; dest.writeInt ( sessionId ) ; dest.writeInt ( peerId ) ; dest.writeByteArray ( peerMac ) ; dest.writeByteArray ( pmk ) ; dest.writeString ( passphrase ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( type ) ; dest.writeInt ( role ) ; dest.writeInt ( clientId ) ; dest.writeInt ( sessionId ) ; dest.writeInt ( peerId ) ; dest.writeByteArray ( peerMac ) ; dest.writeByteArray ( pmk ) ; dest.writeString ( passphrase ) ; dest.writeInt ( requestorUid ) ; }
Source:
void expectAvailableCallbacks ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent ) { expectAvailableCallbacks ( agent , false , com.android.server.ConnectivityServiceTest.TestNetworkCallback.TIMEOUT_MS ) ; }

Target:
void expectAvailableCallbacks ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent , boolean expectSuspended , boolean expectValidated , int timeoutMs ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , agent , timeoutMs ) ; if ( expectSuspended ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.SUSPENDED , agent , timeoutMs ) ; } if ( expectValidated ) { expectCapabilitiesWith ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent ) ; } else { expectCapabilitiesWithout ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent ) ; } expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.LINK_PROPERTIES , agent , timeoutMs ) ; }
Source:
private void checkItem ( com.android.builder.resources.Resource item ) throws com.android.builder.resources.DuplicateResourceException { com.android.builder.resources.Resource otherItem = mItems.get ( item.getKey ( ) ) ; if ( otherItem != null ) { throw new com.android.builder.resources.DuplicateResourceException ( item , otherItem ) ; } }

Target:
private com.android.builder.resources.Resource handleSingleResFile ( java.io.File sourceFolder , java.lang.String qualifiers , com.android.resources.ResourceType type , java.io.File file ) { int pos ; java.lang.String name = file.getName ( ) ; pos = name.indexOf ( '.' ) ; name = name.substring ( 0 , pos ) ; com.android.builder.resources.Resource item = new com.android.builder.resources.Resource ( name , type , null ) ; com.android.builder.resources.ResourceFile resourceFile = new com.android.builder.resources.ResourceFile ( file , item , qualifiers ) ; addResourceFile ( sourceFolder , resourceFile ) ; mItems.put ( item.getKey ( ) , item ) ; return item ; }
Source:
public void testGet ( ) { int nCamera = android.hardware.Camera.getNumberOfCameras ( ) ; if ( nCamera != 0 ) { android.media.CamcorderProfile lowProfile = android.media.CamcorderProfile.get ( CamcorderProfile.QUALITY_LOW ) ; android.media.CamcorderProfile highProfile = android.media.CamcorderProfile.get ( CamcorderProfile.QUALITY_HIGH ) ; checkProfile ( lowProfile ) ; checkProfile ( highProfile ) ; } }

Target:
public void testGet ( ) { android.content.pm.PackageManager packageManager = mContext.getPackageManager ( ) ; if ( ! ( packageManager.hasSystemFeature ( PackageManager.FEATURE_CAMERA ) ) ) { return ; } int nCamera = android.hardware.Camera.getNumberOfCameras ( ) ; if ( nCamera != 0 ) { android.media.CamcorderProfile lowProfile = android.media.CamcorderProfile.get ( CamcorderProfile.QUALITY_LOW ) ; android.media.CamcorderProfile highProfile = android.media.CamcorderProfile.get ( CamcorderProfile.QUALITY_HIGH ) ; checkProfile ( lowProfile ) ; checkProfile ( highProfile ) ; } }
Source:
public java.util.List < android.content.pm.PermissionGroupInfo > getAllPermissionGroups ( int flags ) { synchronized ( mPackages ) { final int N = mPermissionGroups.size ( ) ; java.util.ArrayList < android.content.pm.PermissionGroupInfo > out = new java.util.ArrayList < android.content.pm.PermissionGroupInfo > ( N ) ; for ( android.content.pm.PackageParser.PermissionGroup pg : mPermissionGroups.values ( ) ) { out.add ( android.content.pm.PackageParser.generatePermissionGroupInfo ( pg , flags ) ) ; } return out ; } }

Target:
public android.content.pm.ParceledListSlice < android.content.pm.PermissionGroupInfo > getAllPermissionGroups ( int flags ) { synchronized ( mPackages ) { final int N = mPermissionGroups.size ( ) ; java.util.ArrayList < android.content.pm.PermissionGroupInfo > out = new java.util.ArrayList < android.content.pm.PermissionGroupInfo > ( N ) ; for ( android.content.pm.PackageParser.PermissionGroup pg : mPermissionGroups.values ( ) ) { out.add ( android.content.pm.PackageParser.generatePermissionGroupInfo ( pg , flags ) ) ; } return new android.content.pm.ParceledListSlice ( out ) ; } }
Source:
public void testRegisterAppConfiguration ( ) { com.android.bluetooth.hdp.HealthService testService = new com.android.bluetooth.hdp.HealthService ( ) ; testService.attach ( getInstrumentation ( ) . getContext ( ) , null , null , null , null , null ) ; assertEquals ( false , testService.registerAppConfiguration ( null , null ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; org.junit.Assume.assumeTrue ( "Ignore test when HealthService is not enabled" , mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_hdp ) ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.android.bluetooth.TestUtils.setAdapterService ( mAdapterService ) ; com.android.bluetooth.TestUtils.startService ( mServiceRule , com.android.bluetooth.hdp.HealthService.class ) ; mService = com.android.bluetooth.hdp.HealthService.getHealthService ( ) ; org.junit.Assert.assertNotNull ( mService ) ; mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; org.junit.Assert.assertNotNull ( mAdapter ) ; }
Source:
public void getImsRegistrationState ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_IMS_REGISTRATION_STATE , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } send ( rr ) ; }

Target:
private void handleRadioProxyExceptionForRR ( com.android.internal.telephony.RILRequest rr , java.lang.String caller , java.lang.Exception e ) { riljLoge ( caller , e ) ; rr.onError ( com.android.internal.telephony.RADIO_NOT_AVAILABLE , null ) ; decrementWakeLock ( rr ) ; rr.release ( ) ; resetProxyAndRequestList ( ) ; }
Source:
public final void testPkgTypeDoc ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_DOCS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeDoc ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_DOCS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public static void genRandomFloats ( long seed , int max , int offset , float [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = ( ( r.nextFloat ( ) ) * max ) + offset ; } }

Target:
public static void genRandomFloats ( long seed , float min , float max , float [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = min + ( ( r.nextFloat ( ) ) * ( max - min ) ) ; } }
Source:
public void test_SSL_check_private_key_key_then_cert ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getPkeyContext ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }

Target:
public void test_SSL_check_private_key_cert_then_key ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getPkeyContext ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }