auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private int deleteMessageFromSim ( java.lang.String messageIndexString ) { android.telephony.gsm.SmsManager smsManager = android.telephony.gsm.SmsManager.getDefault ( ) ; try { return smsManager.deleteMessageFromSim ( java.lang.Integer.parseInt ( messageIndexString ) ) ? 1 : 0 ; } catch ( java.lang.NumberFormatException exception ) { throw new java.lang.IllegalArgumentException ( ( "Bad SMS SIM ID: " + messageIndexString ) ) ; } finally { android.content.ContentResolver cr = getContext ( ) . getContentResolver ( ) ; cr.notifyChange ( com.android.providers.telephony.SmsProvider.SIM_URI , null ) ; } }

Target:
private int deleteMessageFromIcc ( java.lang.String messageIndexString ) { android.telephony.SmsManager smsManager = android.telephony.SmsManager.getDefault ( ) ; try { return smsManager.deleteMessageFromIcc ( java.lang.Integer.parseInt ( messageIndexString ) ) ? 1 : 0 ; } catch ( java.lang.NumberFormatException exception ) { throw new java.lang.IllegalArgumentException ( ( "Bad SMS ICC ID: " + messageIndexString ) ) ; } finally { android.content.ContentResolver cr = getContext ( ) . getContentResolver ( ) ; cr.notifyChange ( com.android.providers.telephony.SmsProvider.ICC_URI , null ) ; } }
Source:
public void test_nullLocale ( ) { assertCalendarConfigEquals ( java.util.Calendar.getInstance ( java.util.Locale.getDefault ( ) ) , java.util.Calendar.getInstance ( ( ( java.util.Locale ) ( null ) ) ) ) ; assertCalendarConfigEquals ( java.util.Calendar.getInstance ( java.util.TimeZone.getDefault ( ) , java.util.Locale.getDefault ( ) ) , java.util.Calendar.getInstance ( java.util.TimeZone.getDefault ( ) , null ) ) ; assertCalendarConfigEquals ( new java.util.GregorianCalendar ( java.util.Locale.getDefault ( ) ) , new java.util.GregorianCalendar ( ( ( java.util.Locale ) ( null ) ) ) ) ; }

Target:
public void test_nullLocale_GregorianCalendar_Locale ( ) { assertCalendarConfigEquals ( new java.util.GregorianCalendar ( java.util.Locale.getDefault ( ) ) , new java.util.GregorianCalendar ( ( ( java.util.Locale ) ( null ) ) ) ) ; }
Source:
public static java.lang.String formatProgressText ( long totalBytes , long currentBytes ) { if ( totalBytes <= 0 ) { return "0%" ; } long progress = ( currentBytes * 100 ) / totalBytes ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( progress ) ; sb.append ( '%' ) ; return sb.toString ( ) ; }

Target:
static android.net.Uri originalUri ( android.net.Uri uri ) { java.lang.String mUri = uri.toString ( ) ; int atIndex = mUri.lastIndexOf ( "@" ) ; if ( atIndex != ( - 1 ) ) { mUri = mUri.substring ( 0 , atIndex ) ; uri = android.net.Uri.parse ( mUri ) ; } if ( com.android.bluetooth.opp.BluetoothOppUtility.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppUtility.TAG , ( "originalUri: " + uri ) ) ; return uri ; }
Source:
synchronized boolean connect ( ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , "connect()" ) ; return connectNative ( ) ; }

Target:
private boolean checkDevice ( android.bluetooth.BluetoothDevice device ) { if ( ( ( mHidDevice ) == null ) || ( ! ( mHidDevice.equals ( device ) ) ) ) { android.util.Log.w ( com.android.bluetooth.hid.HidDevService.TAG , ( "Unknown device: " + device ) ) ; return false ; } return true ; }
Source:
public void currentSignalStrength ( int indicationType , com.android.internal.telephony.V1_0.SignalStrength signalStrength ) { mRil.processIndication ( indicationType ) ; }

Target:
public void currentSignalStrength ( int indicationType , com.android.internal.telephony.V1_0.SignalStrength signalStrength ) { mRil.processIndication ( indicationType ) ; android.telephony.SignalStrength ss = new android.telephony.SignalStrength ( signalStrength.gw.signalStrength , signalStrength.gw.bitErrorRate , signalStrength.cdma.dbm , signalStrength.cdma.ecio , signalStrength.evdo.dbm , signalStrength.evdo.ecio , signalStrength.evdo.signalNoiseRatio , signalStrength.lte.signalStrength , signalStrength.lte.rsrp , signalStrength.lte.rsrq , signalStrength.lte.rssnr , signalStrength.lte.cqi , signalStrength.tdScdma.rscp , false ) ; if ( RIL.RILJ_LOGV ) mRil.unsljLogvRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_SIGNAL_STRENGTH , ss ) ; if ( ( mRil.mSignalStrengthRegistrant ) != null ) { mRil.mSignalStrengthRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , ss , null ) ) ; } }
Source:
protected boolean cleanup ( ) { if ( ( mConnectionStateChangedReceiver ) != null ) { unregisterReceiver ( mConnectionStateChangedReceiver ) ; mConnectionStateChangedReceiver = null ; } if ( ( mStateMachine ) != null ) { mStateMachine.cleanup ( ) ; mStateMachine = null ; } if ( ( mAvrcp ) != null ) { mAvrcp.cleanup ( ) ; mAvrcp = null ; } com.android.bluetooth.a2dp.A2dpService.clearA2dpService ( ) ; return true ; }

Target:
protected boolean cleanup ( ) { if ( com.android.bluetooth.a2dp.A2dpService.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpService.TAG , "cleanup()" ) ; } if ( ( mConnectionStateChangedReceiver ) != null ) { unregisterReceiver ( mConnectionStateChangedReceiver ) ; mConnectionStateChangedReceiver = null ; } if ( ( mStateMachine ) != null ) { mStateMachine.cleanup ( ) ; mStateMachine = null ; } if ( ( mAvrcp ) != null ) { mAvrcp.cleanup ( ) ; mAvrcp = null ; } com.android.bluetooth.a2dp.A2dpService.clearA2dpService ( ) ; return true ; }
Source:
public boolean hasIccCardUsingSlotIndex ( int slotIndex ) { int [ ] subId = mSubscriptionController.getSubIdUsingSlotIndex ( slotIndex ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId [ 0 ] ) ; if ( ( subId != null ) && ( phone != null ) ) { return phone.getIccCard ( ) . hasIccCard ( ) ; } else { return false ; } }

Target:
public boolean isDataConnectivityPossible ( ) { int subId = mSubscriptionController.getDefaultDataSubId ( ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.isDataConnectivityPossible ( ) ; } else { return false ; } }
Source:
public void test_initWithSecureRandom ( ) throws java.lang.Exception { java.security.SecureRandom sr = new java.security.SecureRandom ( ) ; javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance ( ( ( org.apache.harmony.crypto.tests.javax.crypto.CipherTest.algorithm ) + "/ECB/PKCS5Padding" ) ) ; cipher.init ( javax.crypto.Cipher.ENCRYPT_MODE , org.apache.harmony.crypto.tests.javax.crypto.CipherTest.cipherKey , sr ) ; cipher = javax.crypto.Cipher.getInstance ( "DES/CBC/NoPadding" ) ; try { cipher.init ( javax.crypto.Cipher.ENCRYPT_MODE , org.apache.harmony.crypto.tests.javax.crypto.CipherTest.cipherKey , sr ) ; fail ( ) ; } catch ( java.security.InvalidKeyException expected ) { } }

Target:
public void test_initWithSecureRandom ( ) throws java.lang.Exception { java.security.SecureRandom sr = new java.security.SecureRandom ( ) ; javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance ( ( ( org.apache.harmony.crypto.tests.javax.crypto.CipherTest.ALGORITHM_3DES ) + "/ECB/PKCS5Padding" ) ) ; cipher.init ( javax.crypto.Cipher.ENCRYPT_MODE , org.apache.harmony.crypto.tests.javax.crypto.CipherTest.CIPHER_KEY_3DES , sr ) ; cipher = javax.crypto.Cipher.getInstance ( "DES/CBC/NoPadding" ) ; try { cipher.init ( javax.crypto.Cipher.ENCRYPT_MODE , org.apache.harmony.crypto.tests.javax.crypto.CipherTest.CIPHER_KEY_3DES , sr ) ; fail ( ) ; } catch ( java.security.InvalidKeyException expected ) { } }
Source:
public java.util.Iterator keys ( ) { return nameValuePairs.keySet ( ) . iterator ( ) ; }

Target:
void writeTo ( org.json.JSONStringer stringer ) throws org.json.JSONException { stringer.object ( ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.Object > entry : nameValuePairs.entrySet ( ) ) { stringer.key ( entry.getKey ( ) ) . value ( entry.getValue ( ) ) ; } stringer.endObject ( ) ; }
Source:
public void snapshotJackFilesModificationDate ( ) { java.util.Iterator < com.android.sched.vfs.InputVFile > jayceIter = getJayceIterator ( ) ; while ( jayceIter.hasNext ( ) ) { com.android.sched.vfs.InputVFile jayceFile = jayceIter.next ( ) ; fileModificationDate.put ( jayceFile.getPathFromRoot ( ) , java.lang.Long.valueOf ( jayceFile.getLastModified ( ) ) ) ; } }

Target:
public void snapshotJackFilesModificationDate ( ) throws com.android.jack.library.LibraryIOException { com.android.jack.library.InputJackLibrary compilerStateLib = null ; try { compilerStateLib = com.android.jack.test.toolchain.AbstractTestTools.getInputJackLibraryFromDir ( compilerStateFolder ) ; java.util.Iterator < com.android.sched.vfs.InputVFile > jayceIter = compilerStateLib.iterator ( FileType.JAYCE ) ; while ( jayceIter.hasNext ( ) ) { com.android.sched.vfs.InputVFile jayceFile = jayceIter.next ( ) ; fileModificationDate.put ( jayceFile.getPathFromRoot ( ) , java.lang.Long.valueOf ( jayceFile.getLastModified ( ) ) ) ; } } finally { if ( compilerStateLib != null ) { compilerStateLib.close ( ) ; } } }
Source:
public int peek ( ) { if ( ( type ) == ( com.android.dx.io.EncodedValueReader.MUST_READ ) ) { int argAndType = ( in.readByte ( ) ) & 255 ; type = argAndType & 31 ; arg = ( argAndType & 224 ) > > 5 ; } return type ; }

Target:
public int peek ( ) { if ( ( type ) == ( com.android.dex.EncodedValueReader.MUST_READ ) ) { int argAndType = ( in.readByte ( ) ) & 255 ; type = argAndType & 31 ; arg = ( argAndType & 224 ) > > 5 ; } return type ; }
Source:
public void testNonBlockingAccept ( ) throws java.lang.Exception { java.nio.channels.ServerSocketChannel ssc = java.nio.channels.ServerSocketChannel.open ( ) ; try { ssc.configureBlocking ( false ) ; ssc.bind ( null ) ; assertNull ( ssc.accept ( ) ) ; } finally { ssc.close ( ) ; } }

Target:
public void testNonBlockingAccept ( ) throws java.lang.Exception { java.nio.channels.ServerSocketChannel ssc = java.nio.channels.ServerSocketChannel.open ( ) ; try { ssc.configureBlocking ( false ) ; ssc.socket ( ) . bind ( null ) ; assertNull ( ssc.accept ( ) ) ; } finally { ssc.close ( ) ; } }
Source:
public void release ( ) { if ( android.support.v17.leanback.app.BackgroundManager.DEBUG ) android.util.Log.v ( android.support.v17.leanback.app.BackgroundManager.TAG , ( "release " + ( this ) ) ) ; if ( ( mLayerDrawable ) != null ) { mLayerDrawable.clearDrawable ( R.id.background_imagein , mContext ) ; mLayerDrawable.clearDrawable ( R.id.background_imageout , mContext ) ; mLayerDrawable = null ; } if ( ( mChangeRunnable ) != null ) { mHandler.removeCallbacks ( mChangeRunnable ) ; mChangeRunnable = null ; } mBackgroundDrawable = null ; }

Target:
public void release ( ) { if ( android.support.v17.leanback.app.BackgroundManager.DEBUG ) android.util.Log.v ( android.support.v17.leanback.app.BackgroundManager.TAG , ( "release " + ( this ) ) ) ; if ( ( mChangeRunnable ) != null ) { mHandler.removeCallbacks ( mChangeRunnable ) ; mChangeRunnable = null ; } if ( mAnimator.isStarted ( ) ) { mAnimator.cancel ( ) ; } if ( ( mLayerDrawable ) != null ) { mLayerDrawable.clearDrawable ( R.id.background_imagein , mContext ) ; mLayerDrawable.clearDrawable ( R.id.background_imageout , mContext ) ; mLayerDrawable = null ; } mBackgroundDrawable = null ; }
Source:
public void testUniversal ( ) { com.android.build.gradle.internal.dsl.DensitySplitOptions options = new com.android.build.gradle.internal.dsl.DensitySplitOptions ( ) ; options.setEnable ( true ) ; java.util.Set < java.lang.String > values = options.getApplicableFilters ( ) ; org.junit.Assert.assertEquals ( OutputFile.NO_FILTER , values.iterator ( ) . next ( ) ) ; }

Target:
public void testUniversal ( ) { com.android.build.gradle.internal.dsl.DensitySplitOptions options = new com.android.build.gradle.internal.dsl.DensitySplitOptions ( ) ; options.setEnable ( true ) ; java.util.Set < java.lang.String > values = options.getApplicableFilters ( ) ; org.junit.Assert.assertTrue ( ( ( values.size ( ) ) >= 6 ) ) ; }
Source:
public void deriveValues ( java.util.Set < com.android.tools.idea.wizard.ScopedStateStore.Key > modified ) { super . deriveValues ( modified ) ; for ( com.android.tools.idea.wizard.ScopedStateStore.Key key : modified ) { if ( key == ( NewCloudModuleDynamicWizardPath.KEY_SELECTED_TEMPLATE_FILE ) ) { java.io.File templateFile = myState.get ( NewCloudModuleDynamicWizardPath.KEY_SELECTED_TEMPLATE_FILE ) ; if ( templateFile != null ) { setModuleDescriptionText ( templateFile ) ; setModuleTypeIcon ( templateFile ) ; } } } }

Target:
public void deriveValues ( java.util.Set < com.android.tools.idea.wizard.dynamic.ScopedStateStore.Key > modified ) { super . deriveValues ( modified ) ; for ( com.android.tools.idea.wizard.dynamic.ScopedStateStore.Key key : modified ) { if ( key == ( NewCloudModuleDynamicWizardPath.KEY_SELECTED_TEMPLATE_FILE ) ) { java.io.File templateFile = myState.get ( NewCloudModuleDynamicWizardPath.KEY_SELECTED_TEMPLATE_FILE ) ; if ( templateFile != null ) { setModuleDescriptionText ( templateFile ) ; setModuleTypeIcon ( templateFile ) ; } } } }
Source:
public com.google.common.util.concurrent.Service.State get ( long timeout , java.util.concurrent.TimeUnit unit ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException , java.util.concurrent.TimeoutException { try { return super . get ( timeout , unit ) ; } catch ( java.util.concurrent.TimeoutException e ) { throw new java.util.concurrent.TimeoutException ( this . toString ( ) ) ; } }

Target:
public final void awaitTerminated ( long timeout , java.util.concurrent.TimeUnit unit ) throws java.util.concurrent.TimeoutException { if ( monitor.enterWhenUninterruptibly ( isStopped , timeout , unit ) ) { try { checkCurrentState ( com.google.common.util.concurrent.Service.State.TERMINATED ) ; } finally { monitor.leave ( ) ; } } else { throw new java.util.concurrent.TimeoutException ( ( ( ( ( "Timed out waiting for " + ( this ) ) + " to reach a terminal state. " ) + "Current state: " ) + ( state ( ) ) ) ) ; } }
Source:
public boolean equals ( java.lang.Object object ) { if ( ( object == null ) || ( ( this . getClass ( ) ) != ( object.getClass ( ) ) ) ) { return false ; } proguard.evaluation.TracedStack other = ( ( proguard.evaluation.TracedStack ) ( object ) ) ; return ( super . equals ( object ) ) && ( this . producerStack.equals ( other.producerStack ) ) ; }

Target:
public boolean equals ( java.lang.Object object ) { if ( ( object == null ) || ( ( this . getClass ( ) ) != ( object.getClass ( ) ) ) ) { return false ; } proguard.evaluation.TracedStack other = ( ( proguard.evaluation.TracedStack ) ( object ) ) ; return ( ( super . equals ( object ) ) && ( this . producerStack.equals ( other.producerStack ) ) ) && ( this . actualProducerStack.equals ( other.actualProducerStack ) ) ; }
Source:
public void replacedJar ( @ com.android.annotations.NonNull java.io.File jar , @ com.android.annotations.NonNull com.android.ide.common.repository.GradleCoordinate dependency ) { mJarDependencies.put ( jar , dependency ) ; }

Target:
public void reportReplacedJar ( @ com.android.annotations.NonNull java.io.File jar , @ com.android.annotations.NonNull com.android.ide.common.repository.GradleCoordinate dependency ) { mJarDependencies.put ( jar , dependency ) ; if ( jar.equals ( mLastGuessedJar ) ) { boolean replaced = mGuessedDependencyVersions.remove ( jar.getName ( ) ) ; if ( replaced ) { mGuessedDependencyVersions.add ( ( ( ( ( ( jar.getName ( ) ) + " => version " ) + ( dependency.getFullRevision ( ) ) ) + " in " ) + ( dependency.toString ( ) ) ) ) ; } mLastGuessedJar = null ; } }
Source:
protected com.android.ide.common.internal.PngCruncher getCruncher ( ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.ide.common.process.ProcessExecutor processExecutor = new com.android.ide.common.process.DefaultProcessExecutor ( logger ) ; com.android.ide.common.process.ProcessOutputHandler processOutputHandler = new com.android.ide.common.process.LoggedProcessOutputHandler ( logger ) ; java.io.File aapt = getAapt ( ) ; return new com.android.ide.common.internal.AaptCruncher ( aapt.getAbsolutePath ( ) , processExecutor , processOutputHandler ) ; }

Target:
private static com.android.ide.common.internal.PngCruncher getCruncher ( ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.ide.common.process.ProcessExecutor processExecutor = new com.android.ide.common.process.DefaultProcessExecutor ( logger ) ; com.android.ide.common.process.ProcessOutputHandler processOutputHandler = new com.android.ide.common.process.LoggedProcessOutputHandler ( logger ) ; java.io.File aapt = com.android.builder.png.NinePatchAaptProcessorTestUtils.getAapt ( com.android.sdklib.repository.FullRevision.parseRevision ( "21" ) ) ; return new com.android.ide.common.internal.AaptCruncher ( aapt.getAbsolutePath ( ) , processExecutor , processOutputHandler ) ; }
Source:
private static void startFifo ( ) { com.android.jack.server.Server.logger.log ( java.util.logging.Level.FINE , "Start FIFO" ) ; try { assert ( com.android.jack.server.Server.fifo ) != null ; com.android.sched.util.file.FileOrDirectory.setPermissions ( com.android.jack.server.Server.fifo , new com.android.sched.util.location.FileLocation ( com.android.jack.server.Server.fifo ) , ( ( com.android.sched.util.file.FileOrDirectory.Permission.READ ) | ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) , ChangePermission.OWNER ) ; } catch ( com.android.sched.util.file.CannotSetPermissionException e ) { com.android.jack.server.Server.logger.log ( java.util.logging.Level.SEVERE , e.getMessage ( ) , e ) ; com.android.jack.server.Server.abort ( ) ; } }

Target:
private static void shutdownFifo ( ) { com.android.jack.server.Server.logger.log ( java.util.logging.Level.FINE , "Shutdown FIFO" ) ; com.android.jack.server.Server.stop = true ; com.android.jack.server.Server.Unblocker unblocker = new com.android.jack.server.Server.Unblocker ( ) ; unblocker.setName ( "Unblocker" ) ; unblocker.setDaemon ( true ) ; unblocker.start ( ) ; }
Source:
private void resetCdmaRoamingModeToDefault ( ) { int cdmaRoamingMode = com.android.phone.CdmaOptions.preferredCdmaRoamingMode ; int statusCdmaRoamingMode = com.android.internal.telephony.Phone.CDMA_RM_HOME ; mButtonCdmaRoam.setValue ( java.lang.Integer.toString ( cdmaRoamingMode ) ) ; android.provider.Settings.System.putInt ( mPhone.getContext ( ) . getContentResolver ( ) , android.provider.Settings.System.CDMA_ROAMING_MODE , cdmaRoamingMode ) ; mPhone.setCdmaRoamingPreference ( statusCdmaRoamingMode , this . obtainMessage ( com.android.phone.CdmaOptions.MyHandler.MESSAGE_SET_ROAMING_PREFERENCE ) ) ; }

Target:
private void resetCdmaRoamingModeToDefault ( ) { mPhone = com.android.internal.telephony.PhoneFactory.getDefaultPhone ( ) ; int cdmaRoamingMode = com.android.phone.CdmaOptions.preferredCdmaRoamingMode ; int statusCdmaRoamingMode = com.android.internal.telephony.Phone.CDMA_RM_HOME ; mButtonCdmaRoam.setValue ( java.lang.Integer.toString ( cdmaRoamingMode ) ) ; android.provider.Settings.System.putInt ( mPhone.getContext ( ) . getContentResolver ( ) , android.provider.Settings.System.CDMA_ROAMING_MODE , cdmaRoamingMode ) ; mPhone.setCdmaRoamingPreference ( statusCdmaRoamingMode , this . obtainMessage ( com.android.phone.CdmaOptions.MyHandler.MESSAGE_SET_ROAMING_PREFERENCE ) ) ; }
Source:
public void testPreconditions ( ) { assertNotNull ( mTextView ) ; assertEquals ( 1 , mTextView.size ( ) ) ; assertNotNull ( mTextView.get ( 0 ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; final com.android.tests.basic.Main a = getActivity ( ) ; assertNotNull ( a ) ; mTextView = ( ( android.widget.TextView ) ( a.findViewById ( R.id.text ) ) ) ; solo = new com.jayway.android.robotium.solo.Solo ( getInstrumentation ( ) , getActivity ( ) ) ; }
Source:
public android.os.Bundle getApplicationRestrictions ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "getApplicationRestrictions" ) ; if ( ( mService ) != null ) { try { return mService.getApplicationRestrictions ( admin , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }

Target:
public android.os.Bundle getApplicationRestrictions ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "getApplicationRestrictions" ) ; if ( ( mService ) != null ) { try { return mService.getApplicationRestrictions ( admin , mContext.getPackageName ( ) , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }
Source:
public static com.android.sdklib.internal.project.ProjectProperties load ( java.lang.String projectFolderOsPath , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { java.io.File projectFolder = new java.io.File ( projectFolderOsPath ) ; if ( projectFolder.isDirectory ( ) ) { java.io.File defaultFile = new java.io.File ( projectFolder , type.mFilename ) ; if ( defaultFile.isFile ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.SdkManager.parsePropertyFile ( defaultFile , null ) ; if ( map != null ) { return new com.android.sdklib.internal.project.ProjectProperties ( projectFolderOsPath , map , type ) ; } } } return null ; }

Target:
public static com.android.sdklib.internal.project.ProjectProperties load ( com.android.sdklib.io.IAbstractFolder projectFolder , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { if ( projectFolder.exists ( ) ) { com.android.sdklib.io.IAbstractFile propFile = projectFolder.getFile ( type.mFilename ) ; if ( propFile.exists ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.SdkManager.parsePropertyFile ( propFile , null ) ; if ( map != null ) { return new com.android.sdklib.internal.project.ProjectProperties ( projectFolder , map , type ) ; } } } return null ; }
Source:
public void testCanReadPeersMacAddressCurrentProfileAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mMockUserInfo.id = mCallingUser ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testCanReadPeersMacAddressCurrentProfileAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mMockUserInfo.id = mCallingUser ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScorerAppManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( "IccIoResult sw1:0x" + ( java.lang.Integer.toHexString ( sw1 ) ) ) + " sw2:0x" ) + ( java.lang.Integer.toHexString ( sw2 ) ) ) + ( ! ( success ( ) ) ? " Error: " + ( getErrorString ( ) ) : "" ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( "IccIoResult sw1:0x" + ( java.lang.Integer.toHexString ( sw1 ) ) ) + " sw2:0x" ) + ( java.lang.Integer.toHexString ( sw2 ) ) ) + " Payload: " ) + ( ( android.os.Build.IS_DEBUGGABLE ) && ( android.os.Build.IS_ENG ) ? payload : "*******" ) ) + ( ! ( success ( ) ) ? " Error: " + ( getErrorString ( ) ) : "" ) ; }
Source:
protected java.util.List < com.android.tools.lint.detector.api.Issue > getIssues ( ) { java.util.List < com.android.tools.lint.detector.api.Issue > issues = new java.util.ArrayList < com.android.tools.lint.detector.api.Issue > ( ) ; java.lang.Class < ? extends com.android.tools.lint.detector.api.Detector > detectorClass = getDetector ( ) . getClass ( ) ; java.util.List < com.android.tools.lint.detector.api.Issue > candidates = new com.android.tools.lint.checks.BuiltinIssueRegistry ( ) . getIssues ( ) ; for ( com.android.tools.lint.detector.api.Issue issue : candidates ) { if ( ( issue.getDetectorClass ( ) ) == detectorClass ) { issues.add ( issue ) ; } } return issues ; }

Target:
private com.android.tools.lint.detector.api.Detector getDetectorInstance ( ) { if ( ( mDetector ) == null ) { mDetector = getDetector ( ) ; } return mDetector ; }
Source:
public void tearDown ( ) throws java.lang.Exception { if ( testSystemTzDataDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( testInstallDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( tempDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( tempDir ) ; } super . tearDown ( ) ; }

Target:
public void testStageInstallWithErrorCode_withBadlyFormedRevision ( ) throws java.lang.Exception { com.android.timezone.distro.DistroVersion validDistroVersion = new com.android.timezone.distro.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRevisionBytes = validDistroVersion.toBytes ( ) ; invalidRevisionBytes [ ( ( invalidRevisionBytes.length ) - 3 ) ] = 'A' ; com.android.timezone.distro.TimeZoneDistro distro = createTimeZoneDistroWithVersionBytes ( invalidRevisionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public void test_nullLocale ( ) { assertCalendarConfigEquals ( java.util.Calendar.getInstance ( java.util.Locale.getDefault ( ) ) , java.util.Calendar.getInstance ( ( ( java.util.Locale ) ( null ) ) ) ) ; assertCalendarConfigEquals ( java.util.Calendar.getInstance ( java.util.TimeZone.getDefault ( ) , java.util.Locale.getDefault ( ) ) , java.util.Calendar.getInstance ( java.util.TimeZone.getDefault ( ) , null ) ) ; assertCalendarConfigEquals ( new java.util.GregorianCalendar ( java.util.Locale.getDefault ( ) ) , new java.util.GregorianCalendar ( ( ( java.util.Locale ) ( null ) ) ) ) ; }

Target:
public void test_nullLocale_getInstance_TimeZone_Locale ( ) { assertCalendarConfigEquals ( java.util.Calendar.getInstance ( java.util.TimeZone.getDefault ( ) , java.util.Locale.getDefault ( ) ) , java.util.Calendar.getInstance ( java.util.TimeZone.getDefault ( ) , null ) ) ; }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mIntent = new android.content.Intent ( this , com.android.cts.verifier.bluetooth.BleClientService.class ) ; mIntent.setAction ( BleClientService.BLE_CLIENT_ACTION_CLIENT_CONNECT ) ; startService ( mIntent ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setInfoResources ( R.string.ble_client_test_name , R.string.ble_insecure_client_test_info , ( - 1 ) ) ; mIntent = new android.content.Intent ( this , com.android.cts.verifier.bluetooth.BleClientService.class ) ; mIntent.setAction ( BleClientService.BLE_CLIENT_ACTION_CLIENT_CONNECT ) ; startService ( mIntent ) ; }
Source:
void scheduleWritePackageRestrictionsLocked ( int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; mDirtyUsers.add ( userId ) ; if ( ! ( mHandler.hasMessages ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS ) ) ) { mHandler.sendEmptyMessageDelayed ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS , com.android.server.pm.PackageManagerService.WRITE_SETTINGS_DELAY ) ; } }

Target:
public void flushPackageRestrictionsAsUser ( int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) { return ; } enforceCrossUserPermission ( android.os.Binder.getCallingUid ( ) , userId , false , false , "flushPackageRestrictions" ) ; synchronized ( mPackages ) { mSettings.writePackageRestrictionsLPr ( userId ) ; mDirtyUsers.remove ( userId ) ; if ( mDirtyUsers.isEmpty ( ) ) { mHandler.removeMessages ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS ) ; } } }
Source:
public void stopStreaming ( java.lang.String serviceId ) { com.android.phone.testapps.embmsmw.AppActiveStreams.StreamCallbackWithState entry = mStreamStates.get ( serviceId ) ; if ( entry != null ) { try { if ( ( entry.getState ( ) ) != ( android.telephony.mbms.StreamingService.STATE_STOPPED ) ) { entry.setState ( StreamingService.STATE_STOPPED ) ; entry.getCallback ( ) . streamStateChanged ( StreamingService.STATE_STOPPED ) ; } } catch ( android.os.RemoteException e ) { dispose ( serviceId ) ; } } }

Target:
public void stopStreaming ( java.lang.String serviceId ) { com.android.phone.testapps.embmsmw.AppActiveStreams.StreamCallbackWithState entry = mStreamStates.get ( serviceId ) ; if ( entry != null ) { try { if ( ( entry.getState ( ) ) != ( android.telephony.mbms.StreamingService.STATE_STOPPED ) ) { entry.setState ( StreamingService.STATE_STOPPED ) ; entry.getCallback ( ) . streamStateUpdated ( StreamingService.STATE_STOPPED ) ; } } catch ( android.os.RemoteException e ) { dispose ( serviceId ) ; } } }
Source:
private java.lang.String sanitizePaths ( java.lang.String str ) { if ( str != null ) { java.lang.String osPath = getSdkManager ( ) . getLocation ( ) ; str = str.replace ( osPath , "@SDK" ) ; try { osPath = getAvdManager ( ) . getBaseAvdFolder ( ) ; str = str.replace ( osPath , "@AVD" ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException ignore ) { } str = str.replace ( java.io.File.separatorChar , '/' ) ; } return str ; }

Target:
private java.lang.String sanitizePaths ( java.lang.String str ) { if ( str != null ) { java.lang.String osPath = getSdkManager ( ) . getLocation ( ) ; str = str.replace ( osPath , "@SDK" ) ; try { osPath = getAvdManager ( ) . getBaseAvdFolder ( ) ; str = str.replace ( osPath , "@AVD" ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException ignore ) { } str = str.replace ( java.io.File.separatorChar , '/' ) ; str = str.replace ( com.android.SdkConstants.mkSdCardCmdName ( ) , "mksdcard" ) ; } return str ; }
Source:
public void onDestroy ( ) { super . onDestroy ( ) ; if ( ( mThread ) != null ) { mThread.quit ( ) ; } try { if ( ( mHttpResponseCache ) != null ) { mHttpResponseCache.delete ( ) ; } } catch ( java.io.IOException e ) { android.util.Log.i ( com.android.statementservice.DirectStatementService.TAG , ( "HTTP(S) response cache deletion failed:" + e ) ) ; } }

Target:
public void onDestroy ( ) { super . onDestroy ( ) ; final android.net.http.HttpResponseCache responseCache = mHttpResponseCache ; mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { try { if ( responseCache != null ) { responseCache.delete ( ) ; } } catch ( java.io.IOException e ) { android.util.Log.i ( com.android.statementservice.DirectStatementService.TAG , ( "HTTP(S) response cache deletion failed:" + e ) ) ; } android.os.Looper.myLooper ( ) . quit ( ) ; } } ) ; mHttpResponseCache = null ; }
Source:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeParcelable ( new android.os.ParcelUuid ( mUuid ) , 0 ) ; out.writeInt ( mInstance ) ; out.writeInt ( mProperties ) ; out.writeInt ( mPermissions ) ; out.writeTypedList ( mDescriptors ) ; }

Target:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeParcelable ( new android.os.ParcelUuid ( mUuid ) , 0 ) ; out.writeInt ( mInstance ) ; out.writeInt ( mProperties ) ; out.writeInt ( mPermissions ) ; out.writeInt ( mKeySize ) ; out.writeInt ( mWriteType ) ; out.writeTypedList ( mDescriptors ) ; }
Source:
public void testDistanceRecorder_unprocessedChildThrowsException ( ) { final android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > distanceRecorder = new android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > ( android.support.test.espresso.util.TreeIterablesTest.complexTree , new android.support.test.espresso.util.TreeIterablesTest.TestElementTreeViewer ( ) ) ; try { distanceRecorder.getDistance ( android.support.test.espresso.util.TreeIterablesTest.complexTree.children.iterator ( ) . next ( ) ) ; fail ( "distance recorder hasnt processed this child yet, cannot know distance" ) ; } catch ( java.lang.RuntimeException expected ) { } }

Target:
public void distanceRecorder_unprocessedChildThrowsException ( ) { final android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > distanceRecorder = new android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > ( android.support.test.espresso.util.TreeIterablesTest.complexTree , new android.support.test.espresso.util.TreeIterablesTest.TestElementTreeViewer ( ) ) ; expectedException.expect ( java.lang.RuntimeException.class ) ; distanceRecorder.getDistance ( android.support.test.espresso.util.TreeIterablesTest.complexTree.children.iterator ( ) . next ( ) ) ; }
Source:
public final void change ( T item ) { int oldIndex = indexWithTypeAndId ( item ) ; if ( oldIndex != ( - 1 ) ) { T old = ( ( T ) ( com.android.tv.dvr.ui.SortedArrayAdapter.get ( oldIndex ) ) ) ; if ( ( mComparator.compare ( old , item ) ) == 0 ) { com.android.tv.dvr.ui.SortedArrayAdapter.replace ( oldIndex , item ) ; return ; } com.android.tv.dvr.ui.SortedArrayAdapter.removeItems ( oldIndex , 1 ) ; } add ( item ) ; }

Target:
public final void change ( T item ) { int oldIndex = indexWithId ( item ) ; if ( oldIndex != ( - 1 ) ) { T old = ( ( T ) ( com.android.tv.dvr.ui.SortedArrayAdapter.get ( oldIndex ) ) ) ; if ( ( mComparator.compare ( old , item ) ) == 0 ) { replace ( oldIndex , item ) ; return ; } remove ( old ) ; } add ( item ) ; }
Source:
public void onClick ( android.view.View view ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.speakerButtonListener" , "speaker request for voicemailUri: %s" , voicemailUri.toString ( ) ) ; }

Target:
public void onClick ( android.view.View view ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.speakerButtonListener" , "speaker request for voicemailUri: %s" , voicemailUri.toString ( ) ) ; android.media.AudioManager audioManager = ( ( android.media.AudioManager ) ( getContext ( ) . getSystemService ( android.media.AudioManager.class ) ) ) ; audioManager.setMode ( AudioManager.STREAM_MUSIC ) ; if ( audioManager.isSpeakerphoneOn ( ) ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.phoneButtonListener" , "speaker was on, turning it off" ) ; audioManager.setSpeakerphoneOn ( false ) ; } else { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.phoneButtonListener" , "speaker was off, turning it on" ) ; audioManager.setSpeakerphoneOn ( true ) ; } }
Source:
public void moveAb ( java.lang.String apkPath , java.lang.String instructionSet , java.lang.String outputPath ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.moveAb ( apkPath , instructionSet , outputPath ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void linkNativeLibraryDirectory ( java.lang.String uuid , java.lang.String packageName , java.lang.String nativeLibPath32 , int userId ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.linkNativeLibraryDirectory ( uuid , packageName , nativeLibPath32 , userId ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
private static boolean isCustomView ( org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; if ( tag.equals ( com.android.SdkConstants.VIEW_TAG ) ) { return true ; } return ( ( tag.indexOf ( '.' ) ) != ( - 1 ) ) && ( ! ( tag.startsWith ( com.android.SdkConstants.ANDROID_PKG_PREFIX ) ) ) ; }

Target:
private static boolean isCustomView ( org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; if ( tag.equals ( com.android.SdkConstants.VIEW_TAG ) ) { return true ; } return ( ( tag.indexOf ( '.' ) ) != ( - 1 ) ) && ( ( ! ( tag.startsWith ( com.android.SdkConstants.ANDROID_PKG_PREFIX ) ) ) || ( tag.startsWith ( com.android.SdkConstants.ANDROID_SUPPORT_PKG_PREFIX ) ) ) ; }
Source:
public android.net.NetworkScorerAppManager.NetworkScorerAppData getScorer ( java.lang.String packageName ) { if ( android.text.TextUtils.isEmpty ( packageName ) ) { return null ; } java.util.Collection < android.net.NetworkScorerAppManager.NetworkScorerAppData > applications = getAllValidScorers ( ) ; for ( android.net.NetworkScorerAppManager.NetworkScorerAppData app : applications ) { if ( packageName.equals ( app.mPackageName ) ) { return app ; } } return null ; }

Target:
private boolean isNetworkRecommendationsDisabled ( ) { final android.content.ContentResolver cr = mContext.getContentResolver ( ) ; return ( Settings.Global.getInt ( cr , Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED , 0 ) ) != 1 ; }
Source:
public boolean getRoamingCapabilities ( com.android.server.wifi.WifiNative.RoamingCapabilities capabilities ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "getRoamingCapabilities " ) ; try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.getRoamingCapabilities ( capabilities ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } return false ; }

Target:
public boolean resetPnoList ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "resetPnoList not supported" ) ; return false ; } else { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "resetPnoList cmd " + ( com.android.server.wifi.WifiNative.sPnoCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.sPnoCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; com.android.server.wifi.WifiNative.sPnoEventHandler = null ; if ( com.android.server.wifi.WifiNative.resetPnoListNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sPnoCmdId ) ) { return true ; } } return false ; } } }
Source:
void registerDisconnected ( ) { if ( ( mLastNetworkId ) != ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) { android.net.wifi.WifiConfiguration config = mWifiConfigManager.getWifiConfiguration ( mLastNetworkId ) ; if ( config != null ) { config.lastDisconnected = mClock.getWallClockMillis ( ) ; if ( config.ephemeral ) { mWifiConfigManager.forgetNetwork ( mLastNetworkId ) ; } } } }

Target:
public android.net.wifi.WifiConfiguration getCurrentWifiConfiguration ( ) { if ( ( mLastNetworkId ) == ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) { return null ; } return mWifiConfigManager.getConfiguredNetwork ( mLastNetworkId ) ; }
Source:
public void onServiceConnected ( android.content.ComponentName componentName , android.os.IBinder service ) { com.android.server.telecom.Log.startSession ( "CSCR.oSC" ) ; try { synchronized ( mTelecomLock ) { com.android.server.telecom.Log.event ( mCall , Log.Events.SCREENING_BOUND , componentName ) ; if ( ! ( mHasFinished ) ) { onServiceBound ( ICallScreeningService.Stub.asInterface ( service ) ) ; } } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void onServiceConnected ( android.content.ComponentName componentName , android.os.IBinder service ) { android.telecom.Log.startSession ( "CSCR.oSC" ) ; try { synchronized ( mTelecomLock ) { android.telecom.Log.addEvent ( mCall , LogUtils.Events.SCREENING_BOUND , componentName ) ; if ( ! ( mHasFinished ) ) { onServiceBound ( ICallScreeningService.Stub.asInterface ( service ) ) ; } } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
protected java.lang.String lintFiles ( java.lang.String ... relativePaths ) throws java.lang.Exception { java.util.List < java.io.File > files = new java.util.ArrayList < java.io.File > ( ) ; java.io.File targetDir = getTargetDir ( ) ; for ( java.lang.String relativePath : relativePaths ) { java.io.File file = getTestfile ( targetDir , relativePath ) ; assertNotNull ( file ) ; files.add ( file ) ; } addManifestFile ( targetDir ) ; return checkLint ( files ) ; }

Target:
protected java.lang.String lintFiles ( java.lang.String ... relativePaths ) throws java.lang.Exception { java.util.List < java.io.File > files = new java.util.ArrayList < java.io.File > ( ) ; java.io.File targetDir = getTargetDir ( ) ; for ( java.lang.String relativePath : relativePaths ) { java.io.File file = getTestfile ( targetDir , relativePath ) ; assertNotNull ( file ) ; files.add ( file ) ; } com.android.tools.lint.checks.AbstractCheckTest.addManifestFile ( targetDir ) ; return checkLint ( files ) ; }
Source:
private int getPid ( java.nio.file.Path proc ) throws java.io.IOException { try { return java.lang.Integer.valueOf ( new java.lang.String ( java.nio.file.Files.readAllBytes ( proc.resolve ( "stat" ) ) ) . split ( " " ) [ 0 ] ) ; } catch ( java.io.IOException e ) { return - 1 ; } }

Target:
private int getPid ( java.nio.file.Path proc ) throws java.io.IOException { try { return java.lang.Integer.valueOf ( new java.lang.String ( java.nio.file.Files.readAllBytes ( proc.resolve ( "stat" ) ) ) . split ( " " ) [ 0 ] ) ; } catch ( java.io.IOException e ) { logWriter.printError ( "Failed to find real pid of process:" , e ) ; return - 1 ; } }
Source:
public void update ( ) { clear ( ) ; final java.util.List < android.support.v7.media.MediaRouter.RouteInfo > routes = mRouter.getRoutes ( ) ; final int count = routes.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { android.support.v7.media.MediaRouter.RouteInfo route = routes.get ( i ) ; if ( onFilterRoute ( route ) ) { add ( route ) ; } } sort ( android.support.v7.app.MediaRouteChooserDialog.RouteComparator.sInstance ) ; notifyDataSetChanged ( ) ; }

Target:
public void refreshRoutes ( ) { if ( mAttachedToWindow ) { mRoutes.clear ( ) ; mRoutes.addAll ( mRouter.getRoutes ( ) ) ; onFilterRoutes ( mRoutes ) ; java.util.Collections.sort ( mRoutes , android.support.v7.app.MediaRouteChooserDialog.RouteComparator.sInstance ) ; mAdapter.notifyDataSetChanged ( ) ; } }
Source:
private boolean shouldShowCallSubject ( com.android.incallui.call.DialerCall call ) { if ( call == null ) { return false ; } boolean isIncomingOrWaiting = ( ( primary.getState ( ) ) == ( com.android.incallui.call.DialerCall.State.INCOMING ) ) || ( ( primary.getState ( ) ) == ( com.android.incallui.call.DialerCall.State.CALL_WAITING ) ) ; return ( ( isIncomingOrWaiting && ( ! ( android.text.TextUtils.isEmpty ( call.getCallSubject ( ) ) ) ) ) && ( ( call.getNumberPresentation ( ) ) == ( android.telecom.TelecomManager.PRESENTATION_ALLOWED ) ) ) && ( call.isCallSubjectSupported ( ) ) ; }

Target:
private boolean shouldShowCallSubject ( com.android.incallui.call.DialerCall call ) { if ( call == null ) { return false ; } boolean isIncomingOrWaiting = ( ( primary.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.INCOMING ) ) || ( ( primary.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.CALL_WAITING ) ) ; return ( ( isIncomingOrWaiting && ( ! ( android.text.TextUtils.isEmpty ( call.getCallSubject ( ) ) ) ) ) && ( ( call.getNumberPresentation ( ) ) == ( android.telecom.TelecomManager.PRESENTATION_ALLOWED ) ) ) && ( call.isCallSubjectSupported ( ) ) ; }
Source:
public void setVideoProvider ( java.lang.String callId , com.android.internal.telecom.IVideoProvider videoProvider , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.RemoteConnection.VideoProvider remoteVideoProvider = null ; if ( videoProvider != null ) { remoteVideoProvider = new android.telecom.RemoteConnection.VideoProvider ( videoProvider ) ; } findConnectionForAction ( callId , "setVideoProvider" ) . setVideoProvider ( remoteVideoProvider ) ; }

Target:
public void setVideoProvider ( java.lang.String callId , com.android.internal.telecom.IVideoProvider videoProvider , android.telecom.Logging.Session.Info sessionInfo ) { java.lang.String callingPackage = mOurConnectionServiceImpl.getApplicationContext ( ) . getOpPackageName ( ) ; android.telecom.RemoteConnection.VideoProvider remoteVideoProvider = null ; if ( videoProvider != null ) { remoteVideoProvider = new android.telecom.RemoteConnection.VideoProvider ( videoProvider , callingPackage ) ; } findConnectionForAction ( callId , "setVideoProvider" ) . setVideoProvider ( remoteVideoProvider ) ; }
Source:
public final java.lang.String getClassName ( com.android.tools.perflib.heap.State state ) { com.android.tools.perflib.heap.ClassObj theClass ; if ( ( mType ) == ( RootType.SYSTEM_CLASS ) ) { theClass = state.findClass ( mId ) ; } else { com.android.tools.perflib.heap.Instance instance = state.findReference ( mId ) ; theClass = state.findClass ( instance.mClassId ) ; } if ( theClass == null ) { return "no class defined!!" ; } return theClass.mClassName ; }

Target:
public final java.lang.String getClassName ( com.android.tools.perflib.heap.State state ) { com.android.tools.perflib.heap.ClassObj theClass ; if ( ( mType ) == ( RootType.SYSTEM_CLASS ) ) { theClass = state.findClass ( mId ) ; } else { theClass = state.findReference ( mId ) . getClassObj ( ) ; } if ( theClass == null ) { return "no class defined!!" ; } return theClass.mClassName ; }
Source:
private void createNewContactForRawContact ( android.database.sqlite.SQLiteDatabase db , long rawContactId ) { mSelectionArgs1 [ 0 ] = java.lang.String.valueOf ( rawContactId ) ; computeAggregateData ( db , mRawContactsQueryByRawContactId , mSelectionArgs1 , mContactInsert ) ; long contactId = mContactInsert.executeInsert ( ) ; setContactIdAndMarkAggregated ( rawContactId , contactId ) ; mDbHelper.updateContactVisible ( contactId ) ; setPresenceContactId ( rawContactId , contactId ) ; updateAggregatedPresence ( contactId ) ; }

Target:
private void createNewContactForRawContact ( com.android.providers.contacts.TransactionContext txContext , android.database.sqlite.SQLiteDatabase db , long rawContactId ) { mSelectionArgs1 [ 0 ] = java.lang.String.valueOf ( rawContactId ) ; computeAggregateData ( db , mRawContactsQueryByRawContactId , mSelectionArgs1 , mContactInsert ) ; long contactId = mContactInsert.executeInsert ( ) ; setContactIdAndMarkAggregated ( rawContactId , contactId ) ; mDbHelper.updateContactVisible ( txContext , contactId ) ; setPresenceContactId ( rawContactId , contactId ) ; updateAggregatedStatusUpdate ( contactId ) ; }
Source:
public boolean isCallerApplicationRestrictionsManagingPackage ( ) { throwIfParentInstance ( "isCallerApplicationRestrictionsManagingPackage" ) ; if ( ( mService ) != null ) { try { return mService.isCallerApplicationRestrictionsManagingPackage ( ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }

Target:
public void setKeepUninstalledPackages ( @ android.annotation.Nullable android.content.ComponentName admin , @ android.annotation.NonNull java.util.List < java.lang.String > packageNames ) { throwIfParentInstance ( "setKeepUninstalledPackages" ) ; if ( ( mService ) != null ) { try { mService.setKeepUninstalledPackages ( admin , mContext.getPackageName ( ) , packageNames ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }