auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void verifyCallbackTracksChanged ( ) { android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; assertNotNull ( session ) ; java.util.ArrayList < android.media.tv.TvTrackInfo > tracks = new java.util.ArrayList < > ( ) ; tracks.add ( android.media.tv.cts.TvInputServiceTest.mDummyTrack ) ; session.notifyTracksChanged ( tracks ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { return ( mCallback.mTrackChangedCount ) > 0 ; } } . run ( ) ; }

Target:
public void verifyCallbackTracksChanged ( ) { resetCounts ( ) ; android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; assertNotNull ( session ) ; java.util.ArrayList < android.media.tv.TvTrackInfo > tracks = new java.util.ArrayList < > ( ) ; tracks.add ( android.media.tv.cts.TvInputServiceTest.mDummyTrack ) ; session.notifyTracksChanged ( tracks ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { return ( mCallback.mTrackChangedCount ) > 0 ; } } . run ( ) ; }
Source:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = createTestConfigWithSimCredential ( ) ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI_PARAM ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }

Target:
public void addLegacyPasspointConfigWithCertCredentialWithoutCaCert ( ) throws java.lang.Exception { java.lang.String fqdn = "test.com" ; java.lang.String friendlyName = "Friendly Name" ; long [ ] rcOIs = new long [ ] { 4660L , 9029L } ; java.lang.String realm = "realm.com" ; java.lang.String clientCertificateAlias = "ClientCert" ; android.net.wifi.WifiConfiguration wifiConfig = new android.net.wifi.WifiConfiguration ( ) ; wifiConfig.FQDN = fqdn ; wifiConfig.providerFriendlyName = friendlyName ; wifiConfig.roamingConsortiumIds = rcOIs ; wifiConfig.enterpriseConfig.setRealm ( realm ) ; wifiConfig.enterpriseConfig.setEapMethod ( WifiEnterpriseConfig.Eap.TLS ) ; wifiConfig.enterpriseConfig.setClientCertificateAlias ( clientCertificateAlias ) ; org.junit.Assert.assertFalse ( com.android.server.wifi.hotspot2.PasspointManager.addLegacyPasspointConfig ( wifiConfig ) ) ; }
Source:
public void testHasHostDoesNotMatch ( ) { java.lang.String host = "www.android.com" ; assertFalse ( "HasHost Matched, But it shouldn't have" , android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( host ) . matches ( uri ) ) ; assertFalse ( "HasHost Matched, But it shouldn't have" , android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( org.hamcrest.CoreMatchers.equalTo ( host ) ) . matches ( uri ) ) ; }

Target:
public void hasHostDoesNotMatch ( ) { java.lang.String host = "www.android.com" ; org.junit.Assert.assertFalse ( "HasHost Matched, But it shouldn't have" , android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( host ) . matches ( uri ) ) ; org.junit.Assert.assertFalse ( "HasHost Matched, But it shouldn't have" , android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( org.hamcrest.CoreMatchers.equalTo ( host ) ) . matches ( uri ) ) ; }
Source:
public void testCipherInputStream_TruncatedInput_Failure ( ) throws java.lang.Exception { javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance ( "AES/CBC/PKCS5Padding" ) ; cipher.init ( javax.crypto.Cipher.DECRYPT_MODE , new javax.crypto.spec.SecretKeySpec ( new byte [ 16 ] , "AES" ) , new javax.crypto.spec.IvParameterSpec ( new byte [ 16 ] ) ) ; java.io.InputStream is = new javax.crypto.CipherInputStream ( new java.io.ByteArrayInputStream ( new byte [ 31 ] ) , cipher ) ; is.read ( new byte [ 4 ] ) ; is.close ( ) ; }

Target:
public void testCipherInputStream_TruncatedInput_Failure ( ) throws java.lang.Exception { javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance ( "AES/CBC/PKCS5Padding" ) ; cipher.init ( javax.crypto.Cipher.DECRYPT_MODE , key , iv ) ; java.io.InputStream is = new javax.crypto.CipherInputStream ( new java.io.ByteArrayInputStream ( new byte [ 31 ] ) , cipher ) ; is.read ( new byte [ 4 ] ) ; is.close ( ) ; }
Source:
public java.lang.String getNewName ( @ javax.annotation.Nonnull java.lang.String oldName ) { java.lang.String newName = nameProvider.getNewName ( oldName ) ; while ( names.contains ( newName ) ) { java.lang.String candidate = nameProvider.getNewName ( oldName ) ; assert ! ( candidate.equals ( newName ) ) ; newName = candidate ; } names.add ( newName ) ; return newName ; }

Target:
public java.lang.String getNewName ( @ javax.annotation.Nonnull com.android.jack.shrob.obfuscation.key.Key key ) { java.lang.String newName = nameProvider.getNewName ( key ) ; while ( names.contains ( newName ) ) { java.lang.String candidate = nameProvider.getNewName ( key ) ; assert ! ( candidate.equals ( newName ) ) ; newName = candidate ; } names.add ( newName ) ; return newName ; }
Source:
public void run ( ) { boolean allResultsArrived = false ; stopTime = ( java.lang.System.currentTimeMillis ( ) ) + ( com.google.gct.testing.CloudResultsAdapter.PollingTicker.INITIAL_TIMEOUT ) ; while ( ( java.lang.System.currentTimeMillis ( ) ) < ( stopTime ) ) { allResultsArrived = poll ( ) ; if ( allResultsArrived ) { break ; } try { java.lang.Thread.sleep ( com.google.gct.testing.CloudResultsAdapter.PollingTicker.POLLING_INTERVAL ) ; } catch ( java.lang.InterruptedException e ) { } } timeoutResultProcessing ( allResultsArrived ) ; }

Target:
public void run ( ) { boolean allResultsArrived = false ; stopTime = ( java.lang.System.currentTimeMillis ( ) ) + ( com.google.gct.testing.CloudResultsAdapter.PollingTicker.INITIAL_TIMEOUT ) ; while ( ( java.lang.System.currentTimeMillis ( ) ) < ( stopTime ) ) { if ( ( ( matrixExecutionCancellator ) != null ) && ( matrixExecutionCancellator.isCancelled ( ) ) ) { break ; } allResultsArrived = poll ( ) ; if ( allResultsArrived ) { break ; } try { java.lang.Thread.sleep ( com.google.gct.testing.CloudResultsAdapter.PollingTicker.POLLING_INTERVAL ) ; } catch ( java.lang.InterruptedException e ) { } } timeoutResultProcessing ( allResultsArrived ) ; }
Source:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onPageSelected" ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( getActivity ( ) ) instanceof com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ) { ( ( com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ( getActivity ( ) ) ) . enableFloatingButton ( ( ( ( mModalAlertManager ) == null ) || ( mModalAlertManager.isEmpty ( ) ) ) ) ; } }

Target:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onPageSelected" ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( getActivity ( ) ) instanceof com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ) { ( ( com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ( getActivity ( ) ) ) . enableFloatingButton ( ( ! ( isModalAlertVisible ( ) ) ) ) ; } }
Source:
public void dispose ( ) { mDestroyed.set ( true ) ; auth_rsp = null ; synchronized ( mLock ) { mLock.notifyAll ( ) ; } mCi.unregisterForIccRefresh ( this ) ; mParentApp = null ; mFh = null ; mCi = null ; mContext = null ; if ( ( mAdnCache ) != null ) { mAdnCache.reset ( ) ; } }

Target:
public void dispose ( ) { mDestroyed.set ( true ) ; auth_rsp = null ; synchronized ( mLock ) { mLock.notifyAll ( ) ; } mCi.unregisterForIccRefresh ( this ) ; mParentApp = null ; mFh = null ; mCi = null ; mContext = null ; if ( ( mAdnCache ) != null ) { mAdnCache.reset ( ) ; } mLoaded.set ( false ) ; }
Source:
protected java.lang.Object make ( java.lang.Object o ) { com.google.doclava.Type t = ( ( com.google.doclava.Type ) ( o ) ) ; java.lang.String simpleTypeName ; if ( t instanceof com.google.doclava.ClassDoc ) { simpleTypeName = ( ( com.google.doclava.ClassDoc ) ( t ) ) . name ( ) ; } else { simpleTypeName = t.simpleTypeName ( ) ; } com.google.doclava.TypeInfo ti = new com.google.doclava.TypeInfo ( t.isPrimitive ( ) , t.dimension ( ) , simpleTypeName , t.qualifiedTypeName ( ) , com.google.doclava.Converter.obtainClass ( t.asClassDoc ( ) ) ) ; return ti ; }

Target:
protected java.lang.Object make ( java.lang.Object o ) { com.sun.javadoc.Type t = ( ( com.sun.javadoc.Type ) ( o ) ) ; java.lang.String simpleTypeName ; if ( t instanceof com.sun.javadoc.ClassDoc ) { simpleTypeName = ( ( com.sun.javadoc.ClassDoc ) ( t ) ) . name ( ) ; } else { simpleTypeName = t.simpleTypeName ( ) ; } com.google.doclava.TypeInfo ti = new com.google.doclava.TypeInfo ( t.isPrimitive ( ) , t.dimension ( ) , simpleTypeName , t.qualifiedTypeName ( ) , com.google.doclava.Converter.obtainClass ( t.asClassDoc ( ) ) ) ; return ti ; }
Source:
public void getCallBarring ( java.lang.String facility , android.os.Message onComplete ) { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( "getCallBarring facility=" + facility ) ) ; android.os.Message resp ; resp = obtainMessage ( com.android.internal.telephony.imsphone.ImsPhone.EVENT_GET_CALL_BARRING_DONE , onComplete ) ; try { com.android.ims.ImsUtInterface ut = mCT.getUtInterface ( ) ; ut.queryCallBarring ( getCBTypeFromFacility ( facility ) , resp ) ; } catch ( com.android.ims.ImsException e ) { sendErrorResponse ( onComplete , e ) ; } }

Target:
public void getCallBarring ( java.lang.String facility , java.lang.String password , android.os.Message onComplete , int serviceClass ) { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( ( ( "getCallBarring facility=" + facility ) + ", serviceClass = " ) + serviceClass ) ) ; } android.os.Message resp ; resp = obtainMessage ( com.android.internal.telephony.imsphone.ImsPhone.EVENT_GET_CALL_BARRING_DONE , onComplete ) ; try { com.android.ims.ImsUtInterface ut = mCT.getUtInterface ( ) ; ut.queryCallBarring ( getCBTypeFromFacility ( facility ) , resp , serviceClass ) ; } catch ( com.android.ims.ImsException e ) { sendErrorResponse ( onComplete , e ) ; } }
Source:
private static < K , V > java.util.Map.Entry < K , V > createEntry ( final com.google.common.collect.LinkedListMultimap.Node < K , V > node ) { return new com.google.common.collect.AbstractMapEntry < K , V > ( ) { @ java.lang.Override public K getKey ( ) { return node.key ; } @ java.lang.Override public V getValue ( ) { return node.value ; } @ java.lang.Override public V setValue ( V value ) { V oldValue = node.value ; node.value = value ; return oldValue ; } } ; }

Target:
public java.util.List < java.util.Map.Entry < K , V > > entries ( ) { return ( ( java.util.List < java.util.Map.Entry < K , V > > ) ( super . entries ( ) ) ) ; }
Source:
private void recordMedia ( long maxFileSize ) throws java.lang.Exception { mMediaRecorder.setMaxFileSize ( maxFileSize ) ; mMediaRecorder.prepare ( ) ; mMediaRecorder.start ( ) ; java.lang.Thread.sleep ( android.media.cts.MediaRecorderTest.RECORD_TIME ) ; mMediaRecorder.stop ( ) ; assertTrue ( mOutFile.exists ( ) ) ; assertTrue ( ( ( mOutFile.length ( ) ) < ( 1.1 * maxFileSize ) ) ) ; assertTrue ( ( ( mOutFile.length ( ) ) > 0 ) ) ; }

Target:
private void recordMedia ( long maxFileSize , java.io.File outFile ) throws java.lang.Exception { mMediaRecorder.setMaxFileSize ( maxFileSize ) ; mMediaRecorder.prepare ( ) ; mMediaRecorder.start ( ) ; java.lang.Thread.sleep ( android.media.cts.MediaRecorderTest.RECORD_TIME ) ; mMediaRecorder.stop ( ) ; assertTrue ( outFile.exists ( ) ) ; assertTrue ( ( ( outFile.length ( ) ) < ( 1.1 * maxFileSize ) ) ) ; assertTrue ( ( ( outFile.length ( ) ) > 0 ) ) ; }
Source:
private static org.eclipse.core.resources.IResource findFileByConfig ( com.android.ide.eclipse.adt.internal.resources.ResourceType type , java.lang.String name , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration configuration ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile > sourceFiles = resources.getSourceFiles ( type , name , configuration ) ; if ( sourceFiles != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile resourceFile : sourceFiles ) { if ( ( resourceFile.getFile ( ) ) instanceof com.android.ide.eclipse.adt.io.IFileWrapper ) { return ( ( com.android.ide.eclipse.adt.io.IFileWrapper ) ( resourceFile.getFile ( ) ) ) . getIFile ( ) ; } } } return null ; }

Target:
private static org.eclipse.core.resources.IResource findFileByConfig ( com.android.resources.ResourceType type , java.lang.String name , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration configuration ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile > sourceFiles = resources.getSourceFiles ( type , name , configuration ) ; if ( sourceFiles != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile resourceFile : sourceFiles ) { if ( ( resourceFile.getFile ( ) ) instanceof com.android.ide.eclipse.adt.io.IFileWrapper ) { return ( ( com.android.ide.eclipse.adt.io.IFileWrapper ) ( resourceFile.getFile ( ) ) ) . getIFile ( ) ; } } } return null ; }
Source:
protected void close ( ) { if ( ( ( mSources ) != null ) && ( ( mSourcesChangeListener ) != null ) ) { mSources.removeChangeListener ( mSourcesChangeListener ) ; } com.android.sdklib.internal.repository.SdkSourceProperties p = new com.android.sdklib.internal.repository.SdkSourceProperties ( ) ; p.save ( ) ; super . close ( ) ; }

Target:
protected void close ( ) { if ( ( ( mSources ) != null ) && ( ( mSourcesChangeListener ) != null ) ) { mSources.removeChangeListener ( mSourcesChangeListener ) ; } com.android.sdklib.internal.repository.sources.SdkSourceProperties p = new com.android.sdklib.internal.repository.sources.SdkSourceProperties ( ) ; p.save ( ) ; super . close ( ) ; }
Source:
public void fillOval ( com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r ) { checkGC ( ) ; int x = mHScale.translate ( r.x ) ; int y = mVScale.translate ( r.y ) ; int w = mHScale.scale ( r.w ) ; int h = mVScale.scale ( r.h ) ; getGc ( ) . fillOval ( x , y , w , h ) ; }

Target:
public void fillOval ( int x1 , int y1 , int x2 , int y2 ) { checkGC ( ) ; useFillAlpha ( ) ; int x = mHScale.translate ( x1 ) ; int y = mVScale.translate ( y1 ) ; int w = mHScale.scale ( ( x2 - x1 ) ) ; int h = mVScale.scale ( ( y2 - y1 ) ) ; getGc ( ) . fillOval ( x , y , w , h ) ; }
Source:
public void test_Constructor ( ) { java.text.DecimalFormat format1 = new java.text.DecimalFormat ( ) ; format1.applyPattern ( "'$'1000.0000" ) ; java.text.DecimalFormat format2 = new java.text.DecimalFormat ( ) ; format2.applyPattern ( "'$'1000.0000" ) ; assertTrue ( "Constructed format did not match applied format object" , format2.equals ( format1 ) ) ; java.text.DecimalFormat format3 = new java.text.DecimalFormat ( "'$'1000.0000" ) ; assertTrue ( "Constructed format did not match applied format object" , format3.equals ( format1 ) ) ; java.text.DecimalFormat format4 = new java.text.DecimalFormat ( "'$'8000.0000" ) ; assertTrue ( "Constructed format did not match applied format object" , ( ! ( format4.equals ( format1 ) ) ) ) ; }

Target:
public void testConstructor_noArg ( ) { java.text.DecimalFormat format1 = new java.text.DecimalFormat ( ) ; format1.applyPattern ( "'$'1000.0000" ) ; java.text.DecimalFormat format2 = new java.text.DecimalFormat ( ) ; format2.applyPattern ( "'$'1000.0000" ) ; assertTrue ( "Constructed format did not match applied format object" , format2.equals ( format1 ) ) ; java.text.DecimalFormat format3 = new java.text.DecimalFormat ( "'$'1000.0000" ) ; assertTrue ( "Constructed format did not match applied format object" , format3.equals ( format1 ) ) ; java.text.DecimalFormat format4 = new java.text.DecimalFormat ( "'$'8000.0000" ) ; assertTrue ( "Constructed format did not match applied format object" , ( ! ( format4.equals ( format1 ) ) ) ) ; }
Source:
public void sendUSSD ( java.lang.String ussdString , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_USSD , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { java.lang.String logUssdString = "*******" ; if ( com.android.internal.telephony.RIL.RILJ_LOGV ) logUssdString = ussdString ; riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + logUssdString ) ) ; } rr.mParcel.writeString ( ussdString ) ; send ( rr ) ; }

Target:
public void sendUSSD ( java.lang.String ussdString , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_USSD , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { java.lang.String logUssdString = "*******" ; if ( com.android.internal.telephony.RIL.RILJ_LOGV ) logUssdString = ussdString ; riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + logUssdString ) ) ; } rr.mParcel.writeString ( ussdString ) ; send ( rr ) ; }
Source:
public void testCubemapFaces ( ) { android.renderscript.Type.Builder b = new android.renderscript.Type.Builder ( mRS , android.renderscript.Element.U8 ( mRS ) ) ; b.setX ( 8 ) . setY ( 8 ) . setFaces ( true ) ; android.renderscript.Allocation cubemap = android.renderscript.Allocation.createTyped ( mRS , b.create ( ) , MipmapControl.MIPMAP_NONE , Allocation.USAGE_SCRIPT ) ; android.renderscript.AllocationAdapter adapter = android.renderscript.AllocationAdapter.create2D ( mRS , cubemap ) ; for ( android.renderscript.Type.CubemapFace cf : Type.CubemapFace.values ( ) ) { adapter.setFace ( cf ) ; } }

Target:
public void testCubemapFaces ( ) { android.renderscript.Type.Builder b = new android.renderscript.Type.Builder ( mRS , android.renderscript.Element.U8 ( mRS ) ) ; b.setX ( 8 ) . setY ( 8 ) . setFaces ( true ) ; android.renderscript.Allocation cubemap = android.renderscript.Allocation.createTyped ( mRS , b.create ( ) , MipmapControl.MIPMAP_NONE , Allocation.USAGE_SCRIPT ) ; android.renderscript.AllocationAdapter adapter = android.renderscript.AllocationAdapter.create2D ( mRS , cubemap ) ; for ( android.renderscript.Type.CubemapFace cf : Type.CubemapFace.values ( ) ) { adapter.setFace ( cf ) ; } cubemap.destroy ( ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( permissions.get ( 0 ) ) ; for ( int i = 1 ; i < ( permissions.size ( ) ) ; i ++ ) { com.android.tools.lint.checks.PermissionRequirement.appendOperator ( sb , operator ) ; sb.append ( permissions.get ( i ) ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String describeMissingPermissions ( @ com.android.annotations.NonNull com.android.tools.lint.checks.PermissionHolder available ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; boolean first = true ; for ( com.android.tools.lint.checks.PermissionRequirement requirement : permissions ) { if ( ! ( requirement.isSatisfied ( available ) ) ) { if ( first ) { first = false ; } else { com.android.tools.lint.checks.PermissionRequirement.appendOperator ( sb , operator ) ; } sb.append ( requirement.describeMissingPermissions ( available ) ) ; } } return sb.toString ( ) ; }
Source:
public void testE3 ( ) { dot.junit.opcodes.aget.d.T_aget_1 t = new dot.junit.opcodes.aget.d.T_aget_1 ( ) ; int [ ] arr = new int [ 2 ] ; try { t.run ( arr , ( - 1 ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testVFE4 ( ) { load ( "dot.junit.opcodes.aget.d.T_aget_5" , java.lang.VerifyError.class ) ; }
Source:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.pbap.PbapStateMachine.AUTHORIZED : transitionTo ( mConnected ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.REJECTED : rejectConnection ( ) ; transitionTo ( mFinished ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.DISCONNECT : mServiceHandler.removeMessages ( BluetoothPbapService.USER_TIMEOUT ) ; android.os.Message msg = mServiceHandler.obtainMessage ( BluetoothPbapService.USER_TIMEOUT ) ; msg.obj = mRemoteDevice ; msg.sendToTarget ( ) ; transitionTo ( mFinished ) ; break ; } return HANDLED ; }

Target:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.pbap.PbapStateMachine.REQUEST_PERMISSION : mService.checkOrGetPhonebookPermission ( this ) ; case com.android.bluetooth.pbap.PbapStateMachine.AUTHORIZED : transitionTo ( mConnected ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.REJECTED : rejectConnection ( ) ; transitionTo ( mFinished ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.DISCONNECT : mServiceHandler.removeMessages ( BluetoothPbapService.USER_TIMEOUT , this ) ; mServiceHandler.obtainMessage ( BluetoothPbapService.USER_TIMEOUT , this ) . sendToTarget ( ) ; transitionTo ( mFinished ) ; break ; } return HANDLED ; }
Source:
private void logEvent ( int probeType , int errorCode ) { int eventType = probeType | ( errorCode & 255 ) ; mMetricsLog.log ( new android.net.metrics.IpReachabilityEvent ( mInterfaceName , eventType ) ) ; }

Target:
private void logNudFailed ( android.net.LinkProperties.ProvisioningChange delta ) { long duration = ( android.os.SystemClock.elapsedRealtime ( ) ) - ( mLastProbeTimeMs ) ; boolean isFromProbe = duration < ( android.net.ip.IpReachabilityMonitor.getProbeWakeLockDuration ( ) ) ; boolean isProvisioningLost = delta == ( android.net.LinkProperties.ProvisioningChange.LOST_PROVISIONING ) ; int eventType = android.net.metrics.IpReachabilityEvent.nudFailureEventType ( isFromProbe , isProvisioningLost ) ; mMetricsLog.log ( mInterfaceName , new android.net.metrics.IpReachabilityEvent ( eventType ) ) ; }
Source:
public void createMockableJar ( ) throws java.io.IOException { com.android.builder.testing.MockableJarGenerator generator = new com.android.builder.testing.MockableJarGenerator ( getReturnDefaultValues ( ) ) ; getOutputFile ( ) . delete ( ) ; getLogger ( ) . info ( java.lang.String.format ( "Creating %s from $s." , getOutputFile ( ) . getAbsolutePath ( ) , getAndroidJar ( ) . getAbsolutePath ( ) ) ) ; generator.createMockableJar ( getAndroidJar ( ) , getOutputFile ( ) ) ; }

Target:
public java.io.File call ( ) throws java.lang.Exception { com.google.common.base.Preconditions.checkNotNull ( scope.getAndroidBuilder ( ) . getTarget ( ) , "ensureTargetSetup not called" ) ; return new java.io.File ( scope.getAndroidBuilder ( ) . getTarget ( ) . getPath ( IAndroidTarget.ANDROID_JAR ) ) ; }
Source:
private int moveDexFilesLI ( android.content.pm.PackageParser.Package newPackage ) { if ( ( ( newPackage.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_HAS_CODE ) ) != 0 ) { final java.lang.String instructionSet = getAppInstructionSet ( newPackage.applicationInfo ) ; int retCode = mInstaller.movedex ( newPackage.mScanPath , newPackage.mPath , instructionSet ) ; if ( retCode != 0 ) { newPackage.mDexOptNeeded = true ; mInstaller.rmdex ( newPackage.mScanPath , instructionSet ) ; mInstaller.rmdex ( newPackage.mPath , instructionSet ) ; } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }

Target:
private int moveDexFilesLI ( android.content.pm.PackageParser.Package newPackage ) { if ( ( ( newPackage.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_HAS_CODE ) ) != 0 ) { final java.lang.String instructionSet = getAppInstructionSet ( newPackage.applicationInfo ) ; final java.lang.String dexCodeInstructionSet = com.android.server.pm.PackageManagerService.getDexCodeInstructionSet ( instructionSet ) ; int retCode = mInstaller.movedex ( newPackage.mScanPath , newPackage.mPath , dexCodeInstructionSet ) ; if ( retCode != 0 ) { newPackage.mDexOptNeeded = true ; mInstaller.rmdex ( newPackage.mScanPath , dexCodeInstructionSet ) ; mInstaller.rmdex ( newPackage.mPath , dexCodeInstructionSet ) ; } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }
Source:
public static java.lang.invoke.MethodHandle foldArguments ( java.lang.invoke.MethodHandle target , java.lang.invoke.MethodHandle combiner ) { int foldPos = 0 ; java.lang.invoke.MethodType targetType = target.type ( ) ; java.lang.invoke.MethodType combinerType = combiner.type ( ) ; java.lang.Class < ? > rtype = java.lang.invoke.MethodHandles.foldArgumentChecks ( foldPos , targetType , combinerType ) ; throw new java.lang.UnsupportedOperationException ( "MethodHandles.foldArguments is not implemented" ) ; }

Target:
public static java.lang.invoke.MethodHandle foldArguments ( java.lang.invoke.MethodHandle target , java.lang.invoke.MethodHandle combiner ) { int foldPos = 0 ; java.lang.invoke.MethodType targetType = target.type ( ) ; java.lang.invoke.MethodType combinerType = combiner.type ( ) ; java.lang.Class < ? > rtype = java.lang.invoke.MethodHandles.foldArgumentChecks ( foldPos , targetType , combinerType ) ; return new java.lang.invoke.Transformers.FoldArguments ( target , combiner ) ; }
Source:
public void testDelete ( ) throws java.lang.Exception { assertFalse ( mKeyStore.delete ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertFalse ( mKeyStore.delete ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( java.util.Arrays.equals ( android.security.KeyStoreTest.TEST_KEYVALUE , mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ) ; assertTrue ( mKeyStore.delete ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; }

Target:
public void testDelete ( ) throws java.lang.Exception { assertFalse ( mKeyStore.delete ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertFalse ( mKeyStore.delete ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( java.util.Arrays.equals ( android.security.KeyStoreTest.TEST_KEYVALUE , mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ) ; assertTrue ( mKeyStore.delete ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; }
Source:
public java.lang.String isValid ( ) { if ( ! ( initCalled ) ) { return "init not called" ; } for ( com.android.tests.basic.buildscript.FakeDevice device : devices ) { java.lang.String error = device.isValid ( ) ; if ( error != null ) { return error ; } } return null ; }

Target:
public java.lang.String isValid ( ) { if ( ! ( initCalled ) ) { return "init not called" ; } if ( ! ( terminateCalled ) ) { return "terminate not called" ; } for ( com.android.tests.basic.buildscript.FakeDevice device : devices ) { java.lang.String error = device.isValid ( ) ; if ( error != null ) { return error ; } } return null ; }
Source:
public void onEventDetected ( com.android.tv.tuner.data.TunerChannel channel , java.util.List < com.android.tv.tuner.data.PsipData.EitItem > items ) { if ( ( ( mChannel ) == null ) || ( ( mChannel.compareTo ( channel ) ) != 0 ) ) { return ; } mChannelDataManager.notifyEventDetected ( channel , items ) ; }

Target:
public void onEventDetected ( com.android.tv.tuner.data.TunerChannel channel , java.util.List < com.android.tv.tuner.data.PsipData.EitItem > items ) { if ( ( ( mChannel ) == null ) || ( ( mChannel.compareTo ( channel ) ) != 0 ) ) { return ; } mHandler.obtainMessage ( com.android.tv.tuner.tvinput.TunerRecordingSessionWorker.MSG_UPDATE_CC_INFO , new android.util.Pair ( channel , items ) ) . sendToTarget ( ) ; mChannelDataManager.notifyEventDetected ( channel , items ) ; }
Source:
protected void readResponse ( java.io.InputStream stream ) throws java.io.IOException { android.util.Log.v ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.TAG , "readResponse" ) ; mResponse = new android.bluetooth.client.pbap.BluetoothPbapVcardList ( stream , mFormat ) ; if ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.DBG ) { android.util.Log.d ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.TAG , ( ( "Read " + ( mResponse.getCount ( ) ) ) + " entries." ) ) ; } }

Target:
protected void readResponse ( java.io.InputStream stream ) throws java.io.IOException { android.util.Log.v ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.TAG , "readResponse" ) ; mResponse = new android.bluetooth.client.pbap.BluetoothPbapVcardList ( mAccount , stream , mFormat ) ; if ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.DBG ) { android.util.Log.d ( android.bluetooth.client.pbap.BluetoothPbapRequestPullPhoneBook.TAG , ( ( "Read " + ( mResponse.getCount ( ) ) ) + " entries." ) ) ; } }
Source:
public void testGetRegionNames ( ) { assertEquals ( "United States" , com.android.ide.common.resources.LocaleManager.getRegionName ( "US" ) ) ; assertEquals ( "Norway" , com.android.ide.common.resources.LocaleManager.getRegionName ( "NO" ) ) ; assertEquals ( "France" , com.android.ide.common.resources.LocaleManager.getRegionName ( "FR" ) ) ; assertEquals ( "India" , com.android.ide.common.resources.LocaleManager.getRegionName ( "IN" ) ) ; }

Target:
public void testGetRegionNames ( ) { assertEquals ( "United States" , com.android.ide.common.resources.LocaleManager.getRegionName ( "US" ) ) ; assertEquals ( "Norway" , com.android.ide.common.resources.LocaleManager.getRegionName ( "NO" ) ) ; assertEquals ( "France" , com.android.ide.common.resources.LocaleManager.getRegionName ( "FR" ) ) ; assertEquals ( "India" , com.android.ide.common.resources.LocaleManager.getRegionName ( "IN" ) ) ; assertEquals ( "United States" , com.android.ide.common.resources.LocaleManager.getRegionName ( "USA" ) ) ; assertEquals ( "Norway" , com.android.ide.common.resources.LocaleManager.getRegionName ( "NOR" ) ) ; assertEquals ( "France" , com.android.ide.common.resources.LocaleManager.getRegionName ( "FRA" ) ) ; }
Source:
public void systemReady ( ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onSystemReady ( ) ; } synchronized ( mLock ) { updateOrientationListenerLp ( ) ; mSystemReady = true ; mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { updateSettings ( ) ; } } ) ; } }

Target:
public void run ( ) { if ( mKeyguardMediator.isDismissable ( ) ) { mKeyguardMediator.keyguardDone ( false , true ) ; } else { mKeyguardMediator.dismiss ( ) ; } }
Source:
public void stopScreenSaver ( ) { synchronized ( mLock ) { android.service.dreams.IDreamManager dm = getDreamManager ( ) ; if ( dm == null ) return ; try { if ( com.android.internal.policy.impl.PhoneWindowManager.localLOGV ) android.util.Log.v ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "startScreenSaver: awakening..." ) ; dm.awaken ( ) ; } catch ( android.os.RemoteException ex ) { } } }

Target:
private void performAuditoryFeedbackForAccessibilityIfNeed ( ) { if ( ! ( isGlobalAccessibilityGestureEnabled ( ) ) ) { return ; } android.media.AudioManager audioManager = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; if ( audioManager.isSilentMode ( ) ) { return ; } android.media.Ringtone ringTone = android.media.RingtoneManager.getRingtone ( mContext , Settings.System.DEFAULT_NOTIFICATION_URI ) ; ringTone.setStreamType ( AudioManager.STREAM_MUSIC ) ; ringTone.play ( ) ; }
Source:
public synchronized void add ( long time , int type , float ... values ) { assert ( values.length ) == ( myStreams ) ; float total = 0.0F ; for ( float value : values ) { total += value ; } mMaxTotal = java.lang.Math.max ( mMaxTotal , total ) ; mSamples.add ( new com.android.tools.chartlib.TimelineData.Sample ( ( ( time - ( mStart ) ) / 1000.0F ) , type , values ) ) ; }

Target:
private void add ( com.android.tools.chartlib.TimelineData.Sample sample ) { float [ ] values = sample.values ; assert ( values.length ) == ( myStreams ) ; float total = 0.0F ; for ( float value : values ) { total += value ; } mMaxTotal = java.lang.Math.max ( mMaxTotal , total ) ; mSamples.add ( sample ) ; }
Source:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidCompatibilityChecker.N_API_LEVEL ) ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }

Target:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidApiLevel.ReleasedLevel.N.getLevel ( ) ) ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }
Source:
private void writeBluetoothMaxConnectedAudioDevices ( java.lang.Object newValue ) { android.os.SystemProperties.set ( com.android.settings.development.DevelopmentSettings.BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY , newValue.toString ( ) ) ; int index = mBluetoothSelectMaxConnectedAudioDevices.findIndexOfValue ( newValue.toString ( ) ) ; if ( index >= 0 ) { java.lang.String [ ] titles = getResources ( ) . getStringArray ( R.array.bluetooth_max_connected_audio_devices ) ; mBluetoothSelectMaxConnectedAudioDevices.setSummary ( titles [ index ] ) ; } }

Target:
private void updateBluetoothMaxConnectedAudioDevicesPreference ( ) { final java.lang.CharSequence [ ] entries = mBluetoothSelectMaxConnectedAudioDevices.getEntries ( ) ; final java.lang.String currentValue = android.os.SystemProperties.get ( com.android.settings.development.DevelopmentSettings.BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY ) ; int index = 0 ; if ( ! ( currentValue.isEmpty ( ) ) ) { index = mBluetoothSelectMaxConnectedAudioDevices.findIndexOfValue ( currentValue ) ; if ( index < 0 ) { android.os.SystemProperties.set ( com.android.settings.development.DevelopmentSettings.BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY , "" ) ; index = 0 ; } } mBluetoothSelectMaxConnectedAudioDevices.setValueIndex ( index ) ; mBluetoothSelectMaxConnectedAudioDevices.setSummary ( entries [ index ] ) ; }
Source:
public void testEnums ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/TestEnum.java:26: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( " case OVERLAY: {\n" + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:37: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " case OVERLAY: {\n" ) + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:58: Error: Class requires API level 11 (current min is 4): android.renderscript.Element.DataType [NewApi]\n" ) + " public static void test4(final android.renderscript.Element.DataType type) {\n" ) + " ~~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:61: Error: Enum for switch requires API level 11 (current min is 4): android.renderscript.Element.DataType [NewApi]\n" ) + " switch (type) {\n" ) + " ^\n" ) + "4 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk4.xml=>AndroidManifest.xml" , "apicheck/TestEnum.java.txt=>src/test/pkg/TestEnum.java" , "apicheck/TestEnum.class.data=>bin/classes/test/pkg/TestEnum.class" ) ) ; }

Target:
public void testEnums ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/TestEnum.java:26: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" + ( ( ( ( ( ( ( ( " case OVERLAY: {\n" + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:37: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " case OVERLAY: {\n" ) + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:61: Error: Enum for switch requires API level 11 (current min is 4): android.renderscript.Element.DataType [NewApi]\n" ) + " switch (type) {\n" ) + " ^\n" ) + "3 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk4.xml=>AndroidManifest.xml" , "apicheck/TestEnum.java.txt=>src/test/pkg/TestEnum.java" , "apicheck/TestEnum.class.data=>bin/classes/test/pkg/TestEnum.class" ) ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , short [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 2 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , int [ ] data ) { validateIsInt32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_32 , data.length ) ; }
Source:
public void testStackList ( ) throws java.lang.Exception { executeShellCommand ( getAmStartCmd ( android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME ) ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertDoesNotContainStack ( "Must not contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }

Target:
public void testStackList ( ) throws java.lang.Exception { if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no split multi-window support" ) ; return ; } executeShellCommand ( getAmStartCmd ( android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME ) ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertDoesNotContainStack ( "Must not contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }
Source:
public static byte [ ] convertToPem ( java.security.cert.Certificate ... objects ) throws java.io.IOException , java.security.cert.CertificateEncodingException { java.io.ByteArrayOutputStream bao = new java.io.ByteArrayOutputStream ( ) ; java.io.Writer writer = new java.io.OutputStreamWriter ( bao , java.nio.charset.Charsets.US_ASCII ) ; com.android.org.bouncycastle.util.io.pem.PemWriter pw = new com.android.org.bouncycastle.util.io.pem.PemWriter ( writer ) ; for ( java.security.cert.Certificate o : objects ) { pw.writeObject ( new com.android.org.bouncycastle.util.io.pem.PemObject ( "CERTIFICATE" , o.getEncoded ( ) ) ) ; } pw.close ( ) ; return bao.toByteArray ( ) ; }

Target:
public static byte [ ] convertToPem ( java.security.cert.Certificate ... objects ) throws java.io.IOException , java.security.cert.CertificateEncodingException { java.io.ByteArrayOutputStream bao = new java.io.ByteArrayOutputStream ( ) ; java.io.Writer writer = new java.io.OutputStreamWriter ( bao , java.nio.charset.StandardCharsets.US_ASCII ) ; com.android.org.bouncycastle.util.io.pem.PemWriter pw = new com.android.org.bouncycastle.util.io.pem.PemWriter ( writer ) ; for ( java.security.cert.Certificate o : objects ) { pw.writeObject ( new com.android.org.bouncycastle.util.io.pem.PemObject ( "CERTIFICATE" , o.getEncoded ( ) ) ) ; } pw.close ( ) ; return bao.toByteArray ( ) ; }
Source:
public int getProfileConnectionState ( com.android.settingslib.bluetooth.LocalBluetoothProfile profile ) { if ( ( ( mProfileConnectionState ) == null ) || ( ( mProfileConnectionState.get ( profile ) ) == null ) ) { int state = profile.getConnectionStatus ( mDevice ) ; mProfileConnectionState.put ( profile , state ) ; } return mProfileConnectionState.get ( profile ) ; }

Target:
public java.lang.String getAddress ( ) { return mDevice.getAddress ( ) ; }
Source:
protected com.android.jack.library.OutputJackLibrary getOutputJackLibraryFromVfs ( ) { com.android.sched.vfs.VFS vfs ; com.android.sched.vfs.Container containerType = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_CONTAINER_TYPE ) ; if ( containerType == ( com.android.sched.vfs.Container.DIR ) ) { vfs = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_DIR ) ; } else { vfs = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_ZIP ) ; } return com.android.jack.library.JackLibraryFactory.getOutputLibrary ( vfs , com.android.jack.Jack.getEmitterId ( ) , com.android.jack.Jack.getVersionString ( ) ) ; }

Target:
protected com.android.jack.library.OutputJackLibrary getOutputJackLibraryFromVfs ( ) { com.android.sched.vfs.VFS vfs ; com.android.sched.vfs.Container containerType = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_CONTAINER_TYPE ) ; if ( containerType == ( com.android.sched.vfs.Container.DIR ) ) { vfs = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_DIR ) ; } else { vfs = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_ZIP ) ; } return com.android.jack.library.JackLibraryFactory.getOutputLibrary ( vfs , com.android.jack.Jack.getEmitterId ( ) , com.android.jack.Jack.getVersion ( ) . getVerboseVersion ( ) ) ; }
Source:
public void removeUpdatesPI ( android.app.PendingIntent intent , java.lang.String packageName ) { try { synchronized ( mLock ) { removeUpdatesLocked ( getReceiver ( intent , packageName ) ) ; } } catch ( java.lang.SecurityException se ) { throw se ; } catch ( java.lang.IllegalArgumentException iae ) { throw iae ; } catch ( java.lang.Exception e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "removeUpdates got exception:" , e ) ; } }

Target:
public com.android.internal.location.ProviderProperties getProviderProperties ( java.lang.String provider ) { if ( ( mProvidersByName.get ( provider ) ) == null ) { return null ; } checkResolutionLevelIsSufficientForProviderUse ( getCallerAllowedResolutionLevel ( ) , provider ) ; com.android.server.location.LocationProviderInterface p ; synchronized ( mLock ) { p = mProvidersByName.get ( provider ) ; } if ( p == null ) return null ; return p.getProperties ( ) ; }
Source:
public boolean hasSystemFeature ( java.lang.String name ) { synchronized ( mPackages ) { return mAvailableFeatures.containsKey ( name ) ; } }

Target:
public boolean hasSystemFeature ( java.lang.String name , int version ) { synchronized ( mPackages ) { final android.content.pm.FeatureInfo feat = mAvailableFeatures.get ( name ) ; if ( feat == null ) { return false ; } else { return ( feat.version ) >= version ; } } }
Source:
public static com.android.sdklib.xml.ManifestData parse ( com.android.sdklib.io.IAbstractFolder projectFolder ) throws com.android.sdklib.io.StreamException , java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { com.android.sdklib.io.IAbstractFile manifestFile = com.android.sdklib.xml.AndroidManifestParser.getManifest ( projectFolder ) ; if ( manifestFile == null ) { throw new java.io.FileNotFoundException ( ) ; } return com.android.sdklib.xml.AndroidManifestParser.parse ( manifestFile , true , null ) ; }

Target:
public static com.android.sdklib.xml.ManifestData parse ( com.android.sdklib.io.IAbstractFolder projectFolder ) throws com.android.sdklib.io.StreamException , java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { com.android.sdklib.io.IAbstractFile manifestFile = com.android.sdklib.xml.AndroidManifest.getManifest ( projectFolder ) ; if ( manifestFile == null ) { throw new java.io.FileNotFoundException ( ) ; } return com.android.sdklib.xml.AndroidManifestParser.parse ( manifestFile , true , null ) ; }
Source:
private static void reportMismatch ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Attr idNode , org.w3c.dom.Attr inputTypeNode , java.lang.String message ) { com.android.tools.lint.detector.api.Location location ; if ( inputTypeNode != null ) { location = context.getLocation ( inputTypeNode ) ; com.android.tools.lint.detector.api.Location secondary = context.getLocation ( idNode ) ; secondary.setMessage ( "id defined here" ) ; location.setSecondary ( secondary ) ; } else { location = context.getLocation ( idNode ) ; } context.report ( com.android.tools.lint.checks.TextFieldDetector.ISSUE , idNode.getOwnerElement ( ) , location , message , null ) ; }

Target:
private static void reportMismatch ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Attr idNode , org.w3c.dom.Node inputTypeNode , java.lang.String message ) { com.android.tools.lint.detector.api.Location location ; if ( inputTypeNode != null ) { location = context.getLocation ( inputTypeNode ) ; com.android.tools.lint.detector.api.Location secondary = context.getLocation ( idNode ) ; secondary.setMessage ( "id defined here" ) ; location.setSecondary ( secondary ) ; } else { location = context.getLocation ( idNode ) ; } context.report ( com.android.tools.lint.checks.TextFieldDetector.ISSUE , idNode.getOwnerElement ( ) , location , message , null ) ; }
Source:
public void requestBugReport ( ) { enforceCallingPermission ( android.Manifest.permission.DUMP , "requestBugReport" ) ; android.os.SystemProperties.set ( "ctl.start" , "bugreport" ) ; }

Target:
public void requestBugReport ( int bugreportType ) { java.lang.String service = null ; switch ( bugreportType ) { case android.app.ActivityManager.BUGREPORT_OPTION_FULL : service = "bugreport" ; break ; case android.app.ActivityManager.BUGREPORT_OPTION_INTERACTIVE : service = "bugreportplus" ; break ; case android.app.ActivityManager.BUGREPORT_OPTION_REMOTE : service = "bugreportremote" ; break ; } if ( service == null ) { throw new java.lang.IllegalArgumentException ( ( "Provided bugreport type is not correct, value: " + bugreportType ) ) ; } enforceCallingPermission ( android.Manifest.permission.DUMP , "requestBugReport" ) ; android.os.SystemProperties.set ( "ctl.start" , service ) ; }