auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean replyReport ( byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( ( ( "replyReport(): type=" + type ) + " id=" ) + id ) ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.replyReport ( type , id , data ) ; }

Target:
public boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.sendReport ( device , id , data ) ; }
Source:
public java.lang.Object [ ] getTestObjects ( ) { android.icu.util.ULocale uloc = android.icu.util.ULocale.forLocale ( java.util.Locale.US ) ; android.icu.text.NumberFormat [ ] formats = new android.icu.text.NumberFormat [ ] { android.icu.dev.test.serializable.FormatTests.getCannedDecimalFormat ( "#,##0.###" , uloc ) , android.icu.dev.test.serializable.FormatTests.getCannedDecimalFormat ( "¤#,##0.00;(¤#,##0.00)" , uloc ) , android.icu.dev.test.serializable.FormatTests.getCannedDecimalFormat ( "#,##0%" , uloc ) , android.icu.dev.test.serializable.FormatTests.getCannedDecimalFormat ( "#E0" , uloc ) } ; return formats ; }

Target:
public java.lang.Object [ ] getTestObjects ( ) { android.icu.util.ULocale uloc = android.icu.util.ULocale.forLocale ( java.util.Locale.US ) ; android.icu.text.NumberFormat [ ] formats = new android.icu.text.NumberFormat [ ] { android.icu.dev.test.serializable.FormatHandler.getCannedDecimalFormat ( "#,##0.###" , uloc ) , android.icu.dev.test.serializable.FormatHandler.getCannedDecimalFormat ( "¤#,##0.00;(¤#,##0.00)" , uloc ) , android.icu.dev.test.serializable.FormatHandler.getCannedDecimalFormat ( "#,##0%" , uloc ) , android.icu.dev.test.serializable.FormatHandler.getCannedDecimalFormat ( "#E0" , uloc ) } ; return formats ; }
Source:
public java.util.Collection < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > getResources ( com.android.resources.ResourceType type , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources projectResources ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem item = projectResources.findResourceItem ( type , mResourceName ) ; java.util.ArrayList < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > items = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > ( ) ; if ( item == null ) { item = new com.android.ide.eclipse.adt.internal.resources.manager.ConfigurableResourceItem ( mResourceName ) ; items.add ( item ) ; } item.add ( this ) ; return items ; }

Target:
protected void load ( ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem item = getRepository ( ) . getResourceItem ( mType , mResourceName ) ; item.add ( this ) ; }
Source:
public boolean process ( @ com.android.annotations.NonNull org.w3c.dom.Document mainDoc , @ com.android.annotations.NonNull org.w3c.dom.Document ... libraryDocs ) { boolean success = true ; mMainDoc = mainDoc ; java.lang.String prefix = com.android.manifmerger.XmlUtils.lookupNsPrefix ( mainDoc , SdkConstants.NS_RESOURCES ) ; mXPath = com.android.sdklib.xml.AndroidXPathFactory.newXPath ( prefix ) ; for ( org.w3c.dom.Document libDoc : libraryDocs ) { if ( ! ( mergeLibDoc ( libDoc ) ) ) { success = false ; } } mXPath = null ; mMainDoc = null ; return success ; }

Target:
public boolean process ( @ com.android.annotations.NonNull org.w3c.dom.Document mainDoc , @ com.android.annotations.NonNull org.w3c.dom.Document ... libraryDocs ) { boolean success = true ; mMainDoc = mainDoc ; com.android.manifmerger.XmlUtils.decorateDocument ( mainDoc , IMergerLog.MAIN_MANIFEST ) ; java.lang.String prefix = com.android.manifmerger.XmlUtils.lookupNsPrefix ( mainDoc , SdkConstants.NS_RESOURCES ) ; mXPath = com.android.sdklib.xml.AndroidXPathFactory.newXPath ( prefix ) ; for ( org.w3c.dom.Document libDoc : libraryDocs ) { com.android.manifmerger.XmlUtils.decorateDocument ( libDoc , IMergerLog.LIBRARY ) ; if ( ! ( mergeLibDoc ( libDoc ) ) ) { success = false ; } } mXPath = null ; mMainDoc = null ; return success ; }
Source:
public boolean contentEquals ( java.lang.CharSequence cs ) { if ( cs == null ) { return false ; } return ( ( this ) == cs ) || ( ( ( cs.length ( ) ) == ( length ) ) && ( contentEquals ( 0 , cs , length ) ) ) ; }

Target:
public boolean contentEquals ( java.lang.CharSequence cs ) { if ( cs == null ) { return false ; } return ( ( this ) == cs ) || ( ( ( cs.length ( ) ) == ( length ) ) && ( regionMatches ( 0 , cs , length ) ) ) ; }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { org.apache.http.HttpResponse response = mServer.getResponse ( mRequest ) ; mConnection.sendResponseHeader ( response ) ; mConnection.sendResponseEntity ( response ) ; mConnection.close ( ) ; return null ; }

Target:
public void run ( ) { try { org.apache.http.HttpResponse response = mServer.getResponse ( mRequest ) ; mConnection.sendResponseHeader ( response ) ; mConnection.sendResponseEntity ( response ) ; mConnection.close ( ) ; synchronized ( mLock ) { this . mSockets.remove ( mSocket ) ; } } catch ( java.lang.Exception e ) { android.util.Log.e ( android.webkit.cts.CtsTestServer.TAG , "Error handling request:" , e ) ; } }
Source:
protected java.util.Map < java.lang.String , java.lang.String > createArgumentMap ( ) { java.util.Map < java.lang.String , java.lang.String > args = super . createArgumentMap ( ) ; args.put ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ChangeLayoutRefactoring.KEY_TYPE , mTypeFqcn ) ; return args ; }

Target:
protected java.util.Map < java.lang.String , java.lang.String > createArgumentMap ( ) { java.util.Map < java.lang.String , java.lang.String > args = super . createArgumentMap ( ) ; args.put ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ChangeLayoutRefactoring.KEY_TYPE , mTypeFqcn ) ; args.put ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ChangeLayoutRefactoring.KEY_FLATTEN , java.lang.Boolean.toString ( mFlatten ) ) ; return args ; }
Source:
public int handleIncomingUser ( int callingPid , int callingUid , int userId , boolean allowAll , boolean requireFull , java.lang.String name , java.lang.String callerPackage ) { return handleIncomingUser ( callingPid , callingUid , userId , allowAll , ( requireFull ? com.android.server.am.ActivityManagerService.ALLOW_FULL_ONLY : com.android.server.am.ActivityManagerService.ALLOW_NON_FULL ) , name , callerPackage ) ; }

Target:
public int handleIncomingUser ( int callingPid , int callingUid , int userId , boolean allowAll , boolean requireFull , java.lang.String name , java.lang.String callerPackage ) { return mUserController.handleIncomingUser ( callingPid , callingUid , userId , allowAll , ( requireFull ? com.android.server.am.ActivityManagerService.ALLOW_FULL_ONLY : com.android.server.am.ActivityManagerService.ALLOW_NON_FULL ) , name , callerPackage ) ; }
Source:
public void compareLibCoreStructure ( ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( null , null , com.android.jack.compile.androidtree.core.CoreCompilationTest.SOURCELIST , false , false , 0.1F , ( ( com.android.jack.JarJarRules ) ( null ) ) , ( ( com.android.jack.ProguardFlags [ ] ) ( null ) ) ) ; }

Target:
public void compareLibCoreStructure ( ) throws java.lang.Exception { com.android.jack.Options options = new com.android.jack.Options ( ) ; options.addProperty ( Options.JAVA_SOURCE_VERSION.getName ( ) , JavaVersion.JAVA_7.toString ( ) ) ; com.android.jack.TestTools.checkStructure ( options , null , null , com.android.jack.compile.androidtree.core.CoreCompilationTest.SOURCELIST , false , false , 0.1F , ( ( com.android.jack.JarJarRules ) ( null ) ) , ( ( com.android.jack.ProguardFlags [ ] ) ( null ) ) ) ; }
Source:
private com.android.cts.appsecurity.AppSecurityTests.CollectingTestRunListener doRunTests ( java.lang.String pkgName ) { com.android.ddmlib.testrunner.RemoteAndroidTestRunner testRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( pkgName , getDevice ( ) ) ; com.android.cts.appsecurity.AppSecurityTests.CollectingTestRunListener listener = new com.android.cts.appsecurity.AppSecurityTests.CollectingTestRunListener ( ) ; testRunner.run ( listener ) ; return listener ; }

Target:
private com.android.cts.appsecurity.AppSecurityTests.CollectingTestRunListener doRunTests ( java.lang.String pkgName , java.lang.String testClassName , java.lang.String testMethodName ) { com.android.ddmlib.testrunner.RemoteAndroidTestRunner testRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( pkgName , getDevice ( ) ) ; if ( ( testClassName != null ) && ( testMethodName != null ) ) { testRunner.setMethodName ( testClassName , testMethodName ) ; } com.android.cts.appsecurity.AppSecurityTests.CollectingTestRunListener listener = new com.android.cts.appsecurity.AppSecurityTests.CollectingTestRunListener ( ) ; testRunner.run ( listener ) ; return listener ; }
Source:
public java.lang.Integer getReasonCode ( ) throws java.io.IOException { java.lang.Object obj = getExtension ( sun.security.x509.PKIXExtensions.ReasonCode_Id ) ; if ( obj == null ) return null ; sun.security.x509.CRLReasonCodeExtension reasonCode = ( ( sun.security.x509.CRLReasonCodeExtension ) ( obj ) ) ; return ( ( java.lang.Integer ) ( reasonCode.get ( reasonCode.REASON ) ) ) ; }

Target:
public java.lang.Integer getReasonCode ( ) throws java.io.IOException { java.lang.Object obj = getExtension ( sun.security.x509.PKIXExtensions.ReasonCode_Id ) ; if ( obj == null ) return null ; sun.security.x509.CRLReasonCodeExtension reasonCode = ( ( sun.security.x509.CRLReasonCodeExtension ) ( obj ) ) ; return reasonCode.get ( sun.security.x509.CRLReasonCodeExtension.REASON ) ; }
Source:
public java.lang.String getType ( android.net.Uri url ) { switch ( com.android.providers.telephony.TelephonyProvider.s_urlMatcher.match ( url ) ) { case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY : case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY_USING_SUBID : return "vnd.android.cursor.dir/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_ID : return "vnd.android.cursor.item/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE : return "vnd.android.cursor.item/telephony-carrier" ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown URL " + url ) ) ; } }

Target:
public java.lang.String getType ( android.net.Uri url ) { switch ( com.android.providers.telephony.TelephonyProvider.s_urlMatcher.match ( url ) ) { case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY : case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY_USING_SUBID : return "vnd.android.cursor.dir/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_ID : case com.android.providers.telephony.TelephonyProvider.URL_FILTERED_ID : return "vnd.android.cursor.item/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE : return "vnd.android.cursor.item/telephony-carrier" ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown URL " + url ) ) ; } }
Source:
public void testConnectWithDisconnectAndSingleExistingNetwork ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; executeAndValidateConnectSequence ( 0 , false , true ) ; }

Target:
public void testConnectFailureDueToNetworkSaveException ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( true ) ; org.mockito.Mockito.doThrow ( new java.lang.IllegalArgumentException ( "Some error!!!" ) ) . when ( mSupplicantStaNetworkMock ) . saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; org.mockito.Mockito.verify ( mISupplicantStaIfaceMock , org.mockito.Mockito.times ( 2 ) ) . removeNetwork ( org.mockito.Matchers.anyInt ( ) ) ; }
Source:
public boolean trackBssid ( java.lang.String bssid , boolean enable , int reasonCode ) { localLog ( ( ( ( ( "trackBssid: " + ( enable ? "enable " : "disable " ) ) + bssid ) + " reason code " ) + reasonCode ) ) ; boolean ret = mNetworkSelector.enableBssidForNetworkSelection ( bssid , enable , reasonCode ) ; if ( ret && ( ! enable ) ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } return ret ; }

Target:
public boolean trackBssid ( java.lang.String bssid , boolean enable , int reasonCode ) { localLog ( ( ( ( ( "trackBssid: " + ( enable ? "enable " : "disable " ) ) + bssid ) + " reason code " ) + reasonCode ) ) ; if ( bssid == null ) { return false ; } boolean updated = updateBssidBlacklist ( bssid , enable , reasonCode ) ; if ( updated && ( ! enable ) ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } return updated ; }
Source:
public static final javax.crypto.Cipher getInstance ( java.lang.String transformation , java.lang.String provider ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException , javax.crypto.NoSuchPaddingException { if ( ( provider == null ) || ( ( provider.length ( ) ) == 0 ) ) { throw new java.lang.IllegalArgumentException ( "Missing provider" ) ; } java.security.Provider p = java.security.Security.getProvider ( provider ) ; if ( p == null ) { throw new java.security.NoSuchProviderException ( ( "No such provider: " + provider ) ) ; } return javax.crypto.Cipher.getInstance ( transformation , p ) ; }

Target:
public static final javax.crypto.Cipher getInstance ( java.lang.String transformation , java.lang.String provider ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException , javax.crypto.NoSuchPaddingException { if ( ( provider == null ) || ( ( provider.length ( ) ) == 0 ) ) { throw new java.lang.IllegalArgumentException ( "Missing provider" ) ; } java.security.Provider p = java.security.Security.getProvider ( provider ) ; if ( p == null ) { throw new java.security.NoSuchProviderException ( ( "No such provider: " + provider ) ) ; } return javax.crypto.Cipher.createCipher ( transformation , p ) ; }
Source:
public void onResume ( ) { if ( com.android.dialer.util.PermissionsUtil.hasPermission ( mActivity , android.Manifest.permission.READ_CONTACTS ) ) { mContactInfoCache.start ( ) ; } mContactsPreferences.refreshValue ( ContactsPreferences.DISPLAY_ORDER_KEY ) ; mIsSpamEnabled = com.android.dialer.spam.Spam.get ( mActivity ) . isSpamEnabled ( ) ; getDuo ( ) . registerListener ( this ) ; notifyDataSetChanged ( ) ; }

Target:
public void onResume ( ) { if ( com.android.dialer.util.PermissionsUtil.hasPermission ( mActivity , android.Manifest.permission.READ_CONTACTS ) ) { mContactInfoCache.start ( ) ; } mContactsPreferences.refreshValue ( ContactsPreferences.DISPLAY_ORDER_KEY ) ; mIsSpamEnabled = com.android.dialer.spam.SpamComponent.get ( mActivity ) . spam ( ) . isSpamEnabled ( ) ; getDuo ( ) . registerListener ( this ) ; notifyDataSetChanged ( ) ; }
Source:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon2 , "tock tock tock" , java.lang.System.currentTimeMillis ( ) ) ; n.setLatestEventInfo ( this , "Persistent #2" , "Notify me!!!" , makeIntent ( ) ) ; mNM.notify ( 2 , n ) ; }

Target:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon1 , ( " " + ( ( ( ( "tick tock tick tock\n\nSometimes notifications can " + "be really long and wrap to more than one line.\n" ) + "Sometimes." ) + "Ohandwhathappensifwehaveonereallylongstringarewesure" ) + "thatwesegmentitcorrectly?\n" ) ) , java.lang.System.currentTimeMillis ( ) ) ; n.setLatestEventInfo ( this , "Still Persistent #1" , "This is still a notification!!!" , makeIntent ( ) ) ; mNM.notify ( 1 , n ) ; }
Source:
public boolean generate ( java.lang.String key ) { try { return ( mBinder.generate ( key , ( - 1 ) ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public java.lang.String [ ] saw ( java.lang.String prefix ) { return saw ( prefix , ( - 1 ) ) ; }
Source:
public static long test_interface ( java.util.Map map ) { java.lang.Integer intobj = new java.lang.Integer ( 0 ) ; java.lang.String s = "asdf" ; long start = java.lang.System.currentTimeMillis ( ) ; for ( int i = 0 ; i < 1000000 ; i ++ ) { map.put ( intobj , s ) ; } long end = java.lang.System.currentTimeMillis ( ) ; return end - start ; }

Target:
public static long test_interface ( java.util.Map map ) { java.lang.Integer intobj = new java.lang.Integer ( 0 ) ; java.lang.String s = "asdf" ; long start = java.lang.System.currentTimeMillis ( ) ; for ( int i = 0 ; i < 10000 ; i ++ ) { map.put ( intobj , s ) ; } long end = java.lang.System.currentTimeMillis ( ) ; return end - start ; }
Source:
protected void onPostExecute ( android.database.Cursor cursor ) { if ( ! ( isCancelled ( ) ) ) { com.android.internal.logging.MetricsLogger.action ( getContext ( ) , MetricsLogger.ACTION_SEARCH_RESULTS , cursor.getCount ( ) ) ; setResultsCursor ( cursor ) ; setResultsVisibility ( ( ( cursor.getCount ( ) ) > 0 ) ) ; } else if ( cursor != null ) { cursor.close ( ) ; } }

Target:
protected void onPostExecute ( android.database.Cursor cursor ) { if ( ! ( isCancelled ( ) ) ) { com.android.internal.logging.MetricsLogger.action ( getContext ( ) , MetricsEvent.ACTION_SEARCH_RESULTS , cursor.getCount ( ) ) ; setResultsCursor ( cursor ) ; setResultsVisibility ( ( ( cursor.getCount ( ) ) > 0 ) ) ; } else if ( cursor != null ) { cursor.close ( ) ; } }
Source:
public java.util.Map < com.android.ide.common.api.INode , com.android.ide.common.api.Rect > measureChildren ( com.android.ide.common.api.INode parent , com.android.ide.common.api.IClientRulesEngine.AttributeFilter filter ) { java.util.Map < com.android.ide.common.api.INode , com.android.ide.common.api.Rect > map = mEditor.measureChildren ( parent , filter ) ; if ( map == null ) { map = java.util.Collections.emptyMap ( ) ; } return map ; }

Target:
public java.util.Map < com.android.ide.common.api.INode , com.android.ide.common.api.Rect > measureChildren ( com.android.ide.common.api.INode parent , com.android.ide.common.api.IClientRulesEngine.AttributeFilter filter ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService renderService = com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.create ( mEditor ) ; java.util.Map < com.android.ide.common.api.INode , com.android.ide.common.api.Rect > map = renderService.measureChildren ( parent , filter ) ; if ( map == null ) { map = java.util.Collections.emptyMap ( ) ; } return map ; }
Source:
public final void init ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { checkMode ( opmode ) ; getSpi ( key ) . engineInit ( opmode , key , params , random ) ; mode = opmode ; }

Target:
public final void init ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { checkMode ( opmode ) ; getSpi ( new javax.crypto.Cipher.InitParams ( javax.crypto.Cipher.InitType.ALGORITHM_PARAM_SPEC , opmode , key , random , params , null ) ) ; mode = opmode ; }
Source:
public void test_newSAXParser ( ) { try { javax.xml.parsers.SAXParser sp = spf.newSAXParser ( ) ; assertTrue ( ( sp instanceof javax.xml.parsers.SAXParser ) ) ; sp.parse ( is1 , new tests.api.javax.xml.parsers.SAXParserFactoryTest.MyHandler ( ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } spf.setValidating ( true ) ; try { javax.xml.parsers.SAXParser sp = spf.newSAXParser ( ) ; } catch ( javax.xml.parsers.ParserConfigurationException e ) { } catch ( org.xml.sax.SAXException e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }

Target:
public void test_newSAXParser ( ) { try { javax.xml.parsers.SAXParser sp = spf.newSAXParser ( ) ; assertTrue ( ( sp instanceof javax.xml.parsers.SAXParser ) ) ; sp.parse ( is1 , new org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest.MyHandler ( ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } spf.setValidating ( true ) ; try { javax.xml.parsers.SAXParser sp = spf.newSAXParser ( ) ; } catch ( javax.xml.parsers.ParserConfigurationException e ) { } catch ( org.xml.sax.SAXException e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }
Source:
private void responseScanStatus ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.NetworkScanResult nsr = new com.android.internal.telephony.NetworkScanResult ( 0 , responseInfo.error , null ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , nsr ) ; mRil.processResponseDone ( rr , responseInfo , nsr ) ; } }

Target:
private void responseScanStatus ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.NetworkScanResult nsr = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { nsr = new com.android.internal.telephony.NetworkScanResult ( NetworkScanResult.SCAN_STATUS_PARTIAL , android.hardware.radio.V1_0.RadioError.NONE , null ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , nsr ) ; } mRil.processResponseDone ( rr , responseInfo , nsr ) ; } }
Source:
public void setLength ( long newLength ) throws java.io.IOException { if ( newLength < 0 ) { throw new java.lang.IllegalArgumentException ( "newLength < 0" ) ; } try { Libcore.os.ftruncate ( fd , newLength ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } long filePointer = getFilePointer ( ) ; if ( filePointer > newLength ) { seek ( newLength ) ; } }

Target:
public void setLength ( long newLength ) throws java.io.IOException { if ( newLength < 0 ) { throw new java.lang.IllegalArgumentException ( "newLength < 0" ) ; } try { Libcore.os.ftruncate ( fd , newLength ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } long filePointer = getFilePointer ( ) ; if ( filePointer > newLength ) { seek ( newLength ) ; } maybeSync ( ) ; }
Source:
public int currentCodePoint ( ) { int ch = current ( ) ; if ( android.icu.text.UTF16.isLeadSurrogate ( ( ( char ) ( ch ) ) ) ) { next ( ) ; int ch2 = current ( ) ; previous ( ) ; if ( android.icu.text.UTF16.isTrailSurrogate ( ( ( char ) ( ch2 ) ) ) ) { return android.icu.impl.UCharacterProperty.getRawSupplementary ( ( ( char ) ( ch ) ) , ( ( char ) ( ch2 ) ) ) ; } } return ch ; }

Target:
public int currentCodePoint ( ) { int ch = current ( ) ; if ( android.icu.text.UTF16.isLeadSurrogate ( ( ( char ) ( ch ) ) ) ) { next ( ) ; int ch2 = current ( ) ; previous ( ) ; if ( android.icu.text.UTF16.isTrailSurrogate ( ( ( char ) ( ch2 ) ) ) ) { return java.lang.Character.toCodePoint ( ( ( char ) ( ch ) ) , ( ( char ) ( ch2 ) ) ) ; } } return ch ; }
Source:
private void updateDeviceNumberRow ( ) { if ( ( deviceNumberTextView ) == null ) { return ; } if ( ( isInMultiWindowMode ) || ( android.text.TextUtils.isEmpty ( primaryCallState.callbackNumber ) ) ) { deviceNumberTextView.setVisibility ( View.GONE ) ; deviceNumberDivider.setVisibility ( View.GONE ) ; return ; } deviceNumberTextView.setText ( context.getString ( R.string.contact_grid_callback_number , primaryCallState.callbackNumber ) ) ; deviceNumberTextView.setVisibility ( View.VISIBLE ) ; if ( primaryInfo.shouldShowLocation ) { deviceNumberDivider.setVisibility ( View.VISIBLE ) ; } }

Target:
private void updateDeviceNumberRow ( ) { if ( ( deviceNumberTextView ) == null ) { return ; } if ( ( isInMultiWindowMode ) || ( android.text.TextUtils.isEmpty ( primaryCallState.callbackNumber ) ) ) { deviceNumberTextView.setVisibility ( View.GONE ) ; deviceNumberDivider.setVisibility ( View.GONE ) ; return ; } deviceNumberTextView.setText ( context.getString ( R.string.contact_grid_callback_number , primaryCallState.callbackNumber ) ) ; deviceNumberTextView.setVisibility ( View.VISIBLE ) ; if ( primaryInfo.shouldShowLocation ( ) ) { deviceNumberDivider.setVisibility ( View.VISIBLE ) ; } }
Source:
public long getSize ( com.android.ahat.InstanceUtils.PathElement element , com.android.tools.perflib.heap.Heap heap ) { if ( element == null ) { return mSnapshot.getHeapSize ( heap ) ; } if ( element.isDominator ) { int index = mSnapshot.getHeapIndex ( heap ) ; return element.instance.getRetainedSize ( index ) ; } return 0 ; }

Target:
public long getSize ( com.android.ahat.heapdump.PathElement element , com.android.ahat.heapdump.AhatHeap heap ) { if ( element == null ) { return heap.getSize ( ) ; } if ( element.isDominator ) { return element.instance.getRetainedSize ( heap ) ; } return 0 ; }
Source:
public void testGoogleAccountLoginWatcher ( ) throws java.lang.Exception { com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( mInstrumentation , "Contacts" ) ; }

Target:
public void testGoogleAccountLoginWatcher ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; android.support.test.uiautomator.UiDevice device = testFramework.getDevice ( ) ; device.registerWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher.class . getName ( ) , new com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher ( device , null , null ) ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Contacts" ) ; device.removeWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher.class . getName ( ) ) ; }
Source:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0004.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JParameterRef jRef = ( ( com.android.jack.ir.ast.JParameterRef ) ( node ) ) ; localId = loader.getVariableSymbols ( ) . getId ( jRef.getParameter ( ) ) ; sourceInfo = jRef.getSourceInfo ( ) ; }

Target:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0004.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JParameterRef jRef = ( ( com.android.jack.ir.ast.JParameterRef ) ( node ) ) ; localId = loader.getVariableSymbols ( ) . getId ( jRef.getParameter ( ) ) ; sourceInfo = jRef.getSourceInfo ( ) ; markers = loader.load ( com.android.jack.jayce.v0004.nodes.NMarker.class , jRef.getAllMarkers ( ) ) ; }
Source:
static java.io.File crunchFile ( @ com.android.annotations.NonNull java.io.File file , com.android.ide.common.internal.PngCruncher aaptCruncher ) throws com.android.ide.common.internal.PngException , java.io.IOException { java.io.File outFile = java.io.File.createTempFile ( "pngWriterTest" , ".png" ) ; outFile.deleteOnExit ( ) ; try { aaptCruncher.crunchPng ( file , outFile ) ; } catch ( com.android.ide.common.internal.PngException e ) { e.printStackTrace ( ) ; throw e ; } java.lang.System.out.println ( ( "crunch " + ( file.getPath ( ) ) ) ) ; return outFile ; }

Target:
static java.io.File crunchFile ( int crunchKey , @ com.android.annotations.NonNull java.io.File file , com.android.ide.common.internal.PngCruncher aaptCruncher ) throws com.android.ide.common.internal.PngException , java.io.IOException { java.io.File outFile = java.io.File.createTempFile ( "pngWriterTest" , ".png" ) ; outFile.deleteOnExit ( ) ; try { aaptCruncher.crunchPng ( crunchKey , file , outFile ) ; } catch ( com.android.ide.common.internal.PngException e ) { e.printStackTrace ( ) ; throw e ; } java.lang.System.out.println ( ( "crunch " + ( file.getPath ( ) ) ) ) ; return outFile ; }
Source:
public void testAdd2_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.add ( "asdasdasd" ) ; c.add ( 100 , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testSubList2_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.subList ( 0 , ( ( list.size ( ) ) + 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID ) ; }

Target:
synchronized void nScriptSetTimeZone ( long script , byte [ ] timeZone , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetTimeZone ( curCon , script , timeZone , mUseInc ) ; }
Source:
private javax.net.ssl.SSLSocketFactory makeSocketFactory ( javax.net.ssl.KeyManager [ ] keyManagers , javax.net.ssl.TrustManager [ ] trustManagers ) { try { org.apache.harmony.xnet.provider.jsse.OpenSSLContextImpl sslContext = new org.apache.harmony.xnet.provider.jsse.OpenSSLContextImpl ( ) ; sslContext.engineInit ( keyManagers , trustManagers , null ) ; sslContext.engineGetClientSessionContext ( ) . setPersistentCache ( mSessionCache ) ; return sslContext.engineGetSocketFactory ( ) ; } catch ( java.security.KeyManagementException e ) { android.util.Log.wtf ( android.net.SSLCertificateSocketFactory.TAG , e ) ; return ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; } }

Target:
private javax.net.ssl.SSLSocketFactory makeSocketFactory ( javax.net.ssl.KeyManager [ ] keyManagers , javax.net.ssl.TrustManager [ ] trustManagers ) { try { com.android.org.conscrypt.OpenSSLContextImpl sslContext = new com.android.org.conscrypt.OpenSSLContextImpl ( ) ; sslContext.engineInit ( keyManagers , trustManagers , null ) ; sslContext.engineGetClientSessionContext ( ) . setPersistentCache ( mSessionCache ) ; return sslContext.engineGetSocketFactory ( ) ; } catch ( java.security.KeyManagementException e ) { android.util.Log.wtf ( android.net.SSLCertificateSocketFactory.TAG , e ) ; return ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; } }
Source:
public void updateReachability ( @ android.support.annotation.NonNull android.content.Context context , @ android.support.annotation.NonNull java.util.List < java.lang.String > numbers ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.Assert.isNotNull ( context ) ; com.android.dialer.common.Assert.isNotNull ( numbers ) ; }

Target:
public com.google.common.util.concurrent.ListenableFuture < com.google.common.collect.ImmutableMap < java.lang.String , com.android.dialer.duo.stub.ReachabilityData > > updateReachability ( @ android.support.annotation.NonNull android.content.Context context , @ android.support.annotation.NonNull java.util.List < java.lang.String > numbers ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.Assert.isNotNull ( context ) ; com.android.dialer.common.Assert.isNotNull ( numbers ) ; return com.google.common.util.concurrent.Futures.immediateFuture ( com.google.common.collect.ImmutableMap.of ( ) ) ; }
Source:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVDir outputVDir , int dexCount ) throws com.android.jack.backend.dex.DexWritingException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( BinaryKind.DEX.getFileExtension ( ) ) ; } try { return outputVDir.createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }

Target:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVDir outputVDir , int dexCount ) throws com.android.jack.backend.dex.DexWritingException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( FileType.DEX.getFileExtension ( ) ) ; } try { return outputVDir.createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }
Source:
private void processLogMessages ( java.util.List < com.android.ddmuilib.logcat.LogCatMessage > newMessages ) { if ( ( newMessages.size ( ) ) > 0 ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > deletedMessages ; synchronized ( mLogMessages ) { deletedMessages = mLogMessages.ensureSpace ( newMessages.size ( ) ) ; mLogMessages.appendMessages ( newMessages ) ; } sendLogChangedEvent ( newMessages , deletedMessages ) ; } }

Target:
public void log ( java.util.List < com.android.ddmlib.logcat.LogCatMessage > newMessages ) { java.util.List < com.android.ddmlib.logcat.LogCatMessage > deletedMessages ; synchronized ( mLogMessages ) { deletedMessages = mLogMessages.ensureSpace ( newMessages.size ( ) ) ; mLogMessages.appendMessages ( newMessages ) ; } sendLogChangedEvent ( newMessages , deletedMessages ) ; }
Source:
public void testEnterSoftApModeActiveWhenAlreadyInSoftApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; enterSoftApActiveMode ( ) ; verify ( mWificond ) . tearDownInterfaces ( ) ; }

Target:
public void testNullConfigFailsSecondCallWithConfigSuccessful ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( null ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.SOFT_AP_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; android.net.wifi.WifiConfiguration config = new android.net.wifi.WifiConfiguration ( ) ; config.SSID = "ThisIsAConfig" ; enterSoftApActiveMode ( config ) ; }
Source:
public void run ( ) { if ( mPhoneStoragePermissionApproved ) { if ( isAmbient ( ) ) { mPhoneStoragePermissionButton.setCompoundDrawablesWithIntrinsicBounds ( R.drawable.ic_permission_approved_bw , 0 , 0 , 0 ) ; } else { mPhoneStoragePermissionButton.setCompoundDrawablesWithIntrinsicBounds ( R.drawable.ic_permission_approved , 0 , 0 , 0 ) ; } } else { if ( isAmbient ( ) ) { mPhoneStoragePermissionButton.setCompoundDrawablesWithIntrinsicBounds ( R.drawable.ic_permission_denied_bw , 0 , 0 , 0 ) ; } else { mPhoneStoragePermissionButton.setCompoundDrawablesWithIntrinsicBounds ( R.drawable.ic_permission_denied , 0 , 0 , 0 ) ; } } }

Target:
public void onResult ( com.google.android.gms.wearable.MessageApi.SendMessageResult sendMessageResult ) { if ( ! ( sendMessageResult.getStatus ( ) . isSuccess ( ) ) ) { updatePhoneButtonOnUiThread ( ) ; logToUi ( "Sending message failed." ) ; } else { android.util.Log.d ( com.example.android.wearable.runtimepermissions.MainWearActivity.TAG , "Message sent successfully." ) ; } }
Source:
public boolean SendPassThruPlay ( android.bluetooth.BluetoothDevice mDevice ) { log ( "SendPassThruPlay + " ) ; com.android.bluetooth.avrcpcontroller.AvrcpControllerService avrcpCtrlService = com.android.bluetooth.avrcpcontroller.AvrcpControllerService.getAvrcpControllerService ( ) ; if ( ( ( avrcpCtrlService != null ) && ( mDevice != null ) ) && ( avrcpCtrlService.getConnectedDevices ( ) . contains ( mDevice ) ) ) { avrcpCtrlService.sendPassThroughCmd ( mDevice , AvrcpControllerService.PASS_THRU_CMD_ID_PLAY , AvrcpControllerService.KEY_STATE_PRESSED ) ; avrcpCtrlService.sendPassThroughCmd ( mDevice , AvrcpControllerService.PASS_THRU_CMD_ID_PLAY , AvrcpControllerService.KEY_STATE_RELEASED ) ; log ( " SendPassThruPlay command sent - " ) ; return true ; } else { log ( "passthru command not sent, connection unavailable" ) ; return false ; } }

Target:
public boolean sendPassThruPlay ( android.bluetooth.BluetoothDevice mDevice ) { log ( "sendPassThruPlay + " ) ; com.android.bluetooth.avrcpcontroller.AvrcpControllerService avrcpCtrlService = com.android.bluetooth.avrcpcontroller.AvrcpControllerService.getAvrcpControllerService ( ) ; if ( ( ( avrcpCtrlService != null ) && ( mDevice != null ) ) && ( avrcpCtrlService.getConnectedDevices ( ) . contains ( mDevice ) ) ) { avrcpCtrlService.sendPassThroughCmd ( mDevice , AvrcpControllerService.PASS_THRU_CMD_ID_PLAY , AvrcpControllerService.KEY_STATE_PRESSED ) ; avrcpCtrlService.sendPassThroughCmd ( mDevice , AvrcpControllerService.PASS_THRU_CMD_ID_PLAY , AvrcpControllerService.KEY_STATE_RELEASED ) ; log ( " sendPassThruPlay command sent - " ) ; return true ; } else { log ( "passthru command not sent, connection unavailable" ) ; return false ; } }
Source:
public void dumpState ( java.io.PrintWriter pw ) { pw.println ( ( " mSavedTime=" + ( mSavedNitzTime ) ) ) ; pw.println ( ( " mNeedCountryCodeForNitz=" + ( mNeedCountryCodeForNitz ) ) ) ; pw.println ( ( " mLatestNitzSignal=" + ( mLatestNitzSignal ) ) ) ; pw.println ( ( " mGotCountryCode=" + ( mGotCountryCode ) ) ) ; pw.println ( ( " mSavedTimeZone=" + ( mSavedTimeZoneId ) ) ) ; pw.println ( ( " mNitzTimeZoneDetectionSuccessful=" + ( mNitzTimeZoneDetectionSuccessful ) ) ) ; pw.println ( ( " mWakeLock=" + ( mWakeLock ) ) ) ; pw.flush ( ) ; }

Target:
public void dumpState ( java.io.PrintWriter pw ) { pw.println ( ( " mSavedTime=" + ( mSavedNitzTime ) ) ) ; pw.println ( ( " mNeedCountryCodeForNitz=" + ( mNeedCountryCodeForNitz ) ) ) ; pw.println ( ( " mLatestNitzSignal=" + ( mLatestNitzSignal ) ) ) ; pw.println ( ( " mGotCountryCode=" + ( mGotCountryCode ) ) ) ; pw.println ( ( " mSavedTimeZoneId=" + ( mSavedTimeZoneId ) ) ) ; pw.println ( ( " mNitzTimeZoneDetectionSuccessful=" + ( mNitzTimeZoneDetectionSuccessful ) ) ) ; pw.println ( ( " mWakeLock=" + ( mWakeLock ) ) ) ; pw.flush ( ) ; }
Source:
public void setDataEnabled ( int subId , boolean enable ) { try { android.util.Log.d ( android.telephony.TelephonyManager.TAG , ( "setDataEnabled: enabled=" + enable ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setDataEnabled ( subId , enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setDataEnabled" , e ) ; } }

Target:
public void setDataEnabled ( boolean enable ) { setUserMobileDataEnabled ( enable ) ; }
Source:
public java.lang.String toHuman ( ) { return toString ( ) ; }

Target:
protected int compareTo0 ( com.android.dx.rop.cst.Constant other ) { com.android.dx.rop.cst.CstMethodHandle otherHandle = ( ( com.android.dx.rop.cst.CstMethodHandle ) ( other ) ) ; if ( ( getType ( ) ) == ( otherHandle.getType ( ) ) ) { return getRef ( ) . compareTo ( otherHandle.getRef ( ) ) ; } else { return java.lang.Integer.compare ( getType ( ) , otherHandle.getType ( ) ) ; } }
Source:
private void disableComponent ( ) { final java.lang.String [ ] components = new java.lang.String [ ] { com.android.cts.verifier.managedprovisioning.ByodHelperActivity.class . getName ( ) , com.android.cts.verifier.managedprovisioning.WorkNotificationTestActivity.class . getName ( ) , com.android.cts.verifier.managedprovisioning.WorkStatusTestActivity.class . getName ( ) , PermissionLockdownTestActivity.ACTIVITY_ALIAS , com.android.cts.verifier.managedprovisioning.AuthenticationBoundKeyTestActivity.class . getName ( ) } ; for ( java.lang.String component : components ) { getPackageManager ( ) . setComponentEnabledSetting ( new android.content.ComponentName ( this , component ) , PackageManager.COMPONENT_ENABLED_STATE_DISABLED , PackageManager.DONT_KILL_APP ) ; } }

Target:
private void enableComponent ( final int enabledState ) { final java.lang.String [ ] components = new java.lang.String [ ] { com.android.cts.verifier.managedprovisioning.ByodHelperActivity.class . getName ( ) , com.android.cts.verifier.managedprovisioning.WorkStatusTestActivity.class . getName ( ) , PermissionLockdownTestActivity.ACTIVITY_ALIAS , com.android.cts.verifier.managedprovisioning.AuthenticationBoundKeyTestActivity.class . getName ( ) , com.android.cts.verifier.managedprovisioning.VpnTestActivity.class . getName ( ) } ; for ( java.lang.String component : components ) { getPackageManager ( ) . setComponentEnabledSetting ( new android.content.ComponentName ( this , component ) , enabledState , PackageManager.DONT_KILL_APP ) ; } }
Source:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile getVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir getVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotDirectoryException { com.android.sched.vfs.BaseVElement element = parent.getFromCache ( name ) ; if ( element != null ) { if ( element.isVDir ( ) ) { return ( ( com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir ) ( element ) ) ; } else { throw new com.android.sched.util.file.NotDirectoryException ( getVDirLocation ( parent , name ) ) ; } } else { throw new com.android.sched.util.file.NoSuchFileException ( getVDirLocation ( parent , name ) ) ; } }
Source:
public void accept ( java.util.List < java.lang.String > result ) { if ( ( ( result != null ) && ( ( result.size ( ) ) > 0 ) ) && ( result.contains ( mTag1 ) ) ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } next ( ) ; }

Target:
void test ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . mPosted ) ; if ( ( ( result.size ( ) ) > 0 ) && ( result.contains ( mTag1 ) ) ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } }
Source:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( fd.isSocket$ ( ) ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } untagSocket ( fd ) ; } } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }

Target:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( fd.isSocket$ ( ) ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } if ( libcore.io.BlockGuardOs.isInetSocket ( fd ) ) { untagSocket ( fd ) ; } } } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; this . localAddr1 = new java.net.InetSocketAddress ( "127.0.0.1" , tests.support.Support_PortManager.getNextPort ( ) ) ; this . channel1 = java.nio.channels.SocketChannel.open ( ) ; this . channel2 = java.nio.channels.SocketChannel.open ( ) ; this . server1 = new java.net.ServerSocket ( localAddr1.getPort ( ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; this . channel1 = java.nio.channels.SocketChannel.open ( ) ; this . channel2 = java.nio.channels.SocketChannel.open ( ) ; this . server1 = new java.net.ServerSocket ( 0 ) ; this . localAddr1 = ( ( java.net.InetSocketAddress ) ( server1.getLocalSocketAddress ( ) ) ) ; }
Source:
public void testEndCallWithNoForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.argThat ( new com.android.server.telecom.tests.TelecomServiceImplTest.IntVarArgMatcher ( ) ) ) ) . thenReturn ( call ) ; assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }

Target:
public void testEndCallWithNoForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( call ) ; assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }
Source:
public void dumpShowsPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }

Target:
public void dumpShowsFailureTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }