auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setWifiEnabled ( boolean enable ) { localLog ( ( "Set WiFi " + ( enable ? "enabled" : "disabled" ) ) ) ; mWifiEnabled = enable ; if ( ! ( mWifiEnabled ) ) { stopConnectivityScan ( ) ; resetLastPeriodicSingleScanTimeStamp ( ) ; mLastConnectionAttemptBssid = null ; } else if ( mWifiConnectivityManagerEnabled ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } }

Target:
public void enable ( boolean enable ) { localLog ( ( "Set WiFiConnectivityManager " + ( enable ? "enabled" : "disabled" ) ) ) ; mWifiConnectivityManagerEnabled = enable ; if ( ! ( mWifiConnectivityManagerEnabled ) ) { stopConnectivityScan ( ) ; resetLastPeriodicSingleScanTimeStamp ( ) ; mLastConnectionAttemptBssid = null ; mWaitForFullBandScanResults = false ; } else if ( mWifiEnabled ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } }
Source:
public android.telecom.PhoneAccountHandle getSimCallManager ( ) { try { com.android.server.telecom.Log.startSession ( "TSI.gSCM" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; int user ; try { user = android.app.ActivityManager.getCurrentUser ( ) ; return getSimCallManagerForUser ( user ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public android.telecom.PhoneAccountHandle getSimCallManager ( ) { try { android.telecom.Log.startSession ( "TSI.gSCM" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; int user ; try { user = android.app.ActivityManager.getCurrentUser ( ) ; return getSimCallManagerForUser ( user ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void test_containsValueLjava_lang_Object ( ) { assertTrue ( "Returned false for valid value" , hm.containsValue ( tests.api.java.util.IdentityHashMap2Test.objArray [ 19 ] ) ) ; assertTrue ( "Returned true for invalid valie" , ( ! ( hm.containsValue ( new java.lang.Integer ( ( - 9 ) ) ) ) ) ) ; }

Target:
public void test_containsKey_copies ( ) throws java.lang.Exception { tests.api.java.util.IdentityHashMap2Test.TestKey a = new tests.api.java.util.IdentityHashMap2Test.TestKey ( "a" ) ; hm.put ( a , new java.lang.Object ( ) ) ; assertTrue ( hm.containsKey ( a ) ) ; assertFalse ( hm.containsKey ( a.clone ( ) ) ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , short [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 2 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , short [ ] d ) { copy1DRangeFromUnchecked ( off , count , ( ( java.lang.Object ) ( d ) ) , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
public void setInput ( android.support.v8.renderscript.Script.KernelID s , android.support.v8.renderscript.Allocation a ) { for ( int ct = 0 ; ct < ( mInputs.length ) ; ct ++ ) { if ( ( mInputs [ ct ] . mKID ) == s ) { mInputs [ ct ] . mAllocation = a ; mRS.nScriptGroupSetInput ( getID ( mRS ) , s.getID ( mRS ) , mRS.safeID ( a ) ) ; return ; } } throw new android.support.v8.renderscript.RSIllegalArgumentException ( "Script not found" ) ; }

Target:
public void setInput ( android.support.v8.renderscript.Script.KernelID s , android.support.v8.renderscript.Allocation a ) { for ( int ct = 0 ; ct < ( mInputs.length ) ; ct ++ ) { if ( ( mInputs [ ct ] . mKID ) == s ) { mInputs [ ct ] . mAllocation = a ; if ( ! ( mUseIncSupp ) ) { mRS.nScriptGroupSetInput ( getID ( mRS ) , s.getID ( mRS ) , mRS.safeID ( a ) ) ; } return ; } } throw new android.support.v8.renderscript.RSIllegalArgumentException ( "Script not found" ) ; }
Source:
public void autoConnect ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { errorLog ( "autoConnect() - BT is not ON. Exiting autoConnect" ) ; return ; } if ( ( isQuietModeEnabled ( ) ) == false ) { debugLog ( "autoConnect() - Initiate auto connection on BT on..." ) ; autoConnectHeadset ( ) ; autoConnectA2dp ( ) ; } else { debugLog ( "autoConnect() - BT is in quiet mode. Not initiating auto connections" ) ; } }

Target:
public void autoConnect ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { errorLog ( "autoConnect() - BT is not ON. Exiting autoConnect" ) ; return ; } if ( ( isQuietModeEnabled ( ) ) == false ) { debugLog ( "autoConnect() - Initiate auto connection on BT on..." ) ; autoConnectHeadset ( ) ; autoConnectA2dp ( ) ; autoConnectA2dpSink ( ) ; } else { debugLog ( "autoConnect() - BT is in quiet mode. Not initiating auto connections" ) ; } }
Source:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { final com.intellij.openapi.project.Project project = e.getProject ( ) ; com.google.gct.idea.appengine.wizard.AppEngineModuleWizard dialog = new com.google.gct.idea.appengine.wizard.AppEngineModuleWizard ( project ) ; dialog.show ( ) ; if ( dialog.isOK ( ) ) { doAction ( project , dialog ) ; } }

Target:
static void populateEndpointParameters ( java.util.Map < java.lang.String , java.lang.Object > replacementMap , java.lang.String rootPackage ) { replacementMap.put ( com.google.gct.idea.appengine.wizard.CloudModuleUtils.ATTR_ENDPOINTS_OWNER , com.intellij.openapi.util.text.StringUtil.join ( com.intellij.util.ArrayUtil.reverseArray ( rootPackage.split ( "\\." ) ) , "." ) ) ; replacementMap.put ( com.google.gct.idea.appengine.wizard.CloudModuleUtils.ATTR_ENDPOINTS_PACKAGE , "" ) ; }
Source:
private static android.net.Uri getContactUri ( com.android.dialer.searchfragment.common.SearchCursor cursor ) { java.lang.String businessInfoJson = cursor.getString ( Projections.PHONE_LOOKUP_KEY ) ; return Contacts.CONTENT_LOOKUP_URI.buildUpon ( ) . appendPath ( Constants.LOOKUP_URI_ENCODED ) . appendQueryParameter ( ContactsContract.DIRECTORY_PARAM_KEY , java.lang.String.valueOf ( cursor.getDirectoryId ( ) ) ) . encodedFragment ( businessInfoJson ) . build ( ) ; }

Target:
private static android.net.Uri getContactUri ( com.android.dialer.searchfragment.common.SearchCursor cursor ) { java.lang.String businessInfoJson = cursor.getString ( Projections.LOOKUP_KEY ) ; return Contacts.CONTENT_LOOKUP_URI.buildUpon ( ) . appendPath ( Constants.LOOKUP_URI_ENCODED ) . appendQueryParameter ( ContactsContract.DIRECTORY_PARAM_KEY , java.lang.String.valueOf ( cursor.getDirectoryId ( ) ) ) . encodedFragment ( businessInfoJson ) . build ( ) ; }
Source:
public void test_unmodifiableList_sort ( ) { try { java.util.Collections.unmodifiableList ( new java.util.ArrayList < > ( ) ) . sort ( ( k1 , k2 ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } try { java.util.ArrayList l = new java.util.ArrayList ( ) ; l.add ( 1 ) ; l.add ( 2 ) ; java.util.Collections.unmodifiableList ( l ) . sort ( ( k1 , k2 ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } }

Target:
public void test_unmodifiableList_replaceAll ( ) { try { java.util.Collections.unmodifiableList ( new java.util.ArrayList < > ( ) ) . replaceAll ( ( k ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } try { java.util.ArrayList l = new java.util.ArrayList ( ) ; l.add ( 1 ) ; l.add ( 2 ) ; java.util.Collections.unmodifiableList ( l ) . replaceAll ( ( k ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } }
Source:
public void testGradle ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "multiproject/library.properties=>build.gradle" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" ) ; checkDriver ( ( "" + ( ( ( ( ( "\n" + "Scanning MainTest_testGradle: \n" ) + "MainTest_testGradle: Error: \"MainTest_testGradle\" is a Gradle project. " ) + "To correctly analyze Gradle projects, you should run \"gradlew :lint\" " ) + "instead. [LintError]\n" ) + "1 errors, 0 warnings\n" ) ) , "" , new java.lang.String [ ] { "--check" , "HardcodedText" , project.getPath ( ) } ) ; }

Target:
public void testGradle ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "multiproject/library.properties=>build.gradle" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" ) ; checkDriver ( ( "" + ( ( ( ( ( "\n" + "Scanning MainTest_testGradle: \n" ) + "MainTest_testGradle: Error: \"MainTest_testGradle\" is a Gradle project. " ) + "To correctly analyze Gradle projects, you should run \"gradlew :lint\" " ) + "instead. [LintError]\n" ) + "1 errors, 0 warnings\n" ) ) , "" , com.android.tools.lint.LintCliFlags.ERRNO_SUCCESS , new java.lang.String [ ] { "--check" , "HardcodedText" , project.getPath ( ) } ) ; }
Source:
private void updateConfigurationDetailsPanel ( com.google.gct.testing.GoogleCloudTestingConfiguration configuration ) { myConfigurationEditorPanel.removeAll ( ) ; if ( configuration != null ) { myConfigurationInfoPanel.setVisible ( true ) ; try { myConfigurationEditorPanel.add ( dimensionTreeCache.get ( configuration ) . getPanel ( ) ) ; } catch ( java.util.concurrent.ExecutionException e ) { e.printStackTrace ( ) ; } myConfigurationEditorPanel.updateUI ( ) ; } else { myConfigurationInfoPanel.setVisible ( false ) ; } }

Target:
private void updateConfigurationDetailsPanel ( com.google.gct.testing.GoogleCloudTestingConfigurationImpl configuration ) { myConfigurationEditorPanel.removeAll ( ) ; if ( configuration != null ) { myConfigurationInfoPanel.setVisible ( true ) ; try { myConfigurationEditorPanel.add ( dimensionTreeCache.get ( configuration ) . getPanel ( ) ) ; } catch ( java.util.concurrent.ExecutionException e ) { e.printStackTrace ( ) ; } myConfigurationEditorPanel.updateUI ( ) ; } else { myConfigurationInfoPanel.setVisible ( false ) ; } }
Source:
public static java.io.File getNewFile ( android.content.Context context , android.net.Uri sourceUri ) { java.io.File saveDirectory = com.android.gallery3d.filtershow.tools.SaveCopyTask.getFinalSaveDirectory ( context , sourceUri ) ; java.lang.String filename = new java.text.SimpleDateFormat ( com.android.gallery3d.filtershow.tools.SaveCopyTask.TIME_STAMP_NAME ) . format ( new java.sql.Date ( java.lang.System.currentTimeMillis ( ) ) ) ; return new java.io.File ( saveDirectory , ( filename + ".JPG" ) ) ; }

Target:
public static java.io.File getNewFile ( android.content.Context context , android.net.Uri sourceUri ) { java.io.File saveDirectory = com.android.gallery3d.filtershow.tools.SaveCopyTask.getFinalSaveDirectory ( context , sourceUri ) ; java.lang.String filename = new java.text.SimpleDateFormat ( com.android.gallery3d.filtershow.tools.SaveCopyTask.TIME_STAMP_NAME ) . format ( new java.util.Date ( ) ) ; return new java.io.File ( saveDirectory , ( filename + ".JPG" ) ) ; }
Source:
public void addMatrix ( android.support.v8.renderscript.Matrix2f v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addMatrix ( new android.support.v8.renderscript.Matrix2f ( v.getArray ( ) ) ) ; return ; } for ( int i = 0 ; i < ( v.mMat.length ) ; i ++ ) { addF32 ( v.mMat [ i ] ) ; } }

Target:
public void addI16 ( android.support.v8.renderscript.Short4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI16 ( v ) ; return ; } addI16 ( v.x ) ; addI16 ( v.y ) ; addI16 ( v.z ) ; addI16 ( v.w ) ; }
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 ) ; } com.android.tools.lint.checks.AbstractCheckTest.addManifestFile ( targetDir ) ; return checkLint ( files ) ; }

Target:
public int compare ( java.io.File file1 , java.io.File file2 ) { com.android.resources.ResourceFolderType folder1 = com.android.resources.ResourceFolderType.getFolderType ( file1.getParentFile ( ) . getName ( ) ) ; com.android.resources.ResourceFolderType folder2 = com.android.resources.ResourceFolderType.getFolderType ( file2.getParentFile ( ) . getName ( ) ) ; if ( ( ( folder1 != null ) && ( folder2 != null ) ) && ( folder1 != folder2 ) ) { return folder1.compareTo ( folder2 ) ; } return file1.compareTo ( file2 ) ; }
Source:
public void testStageInstallWithErrorCode_withBadlyFormedRevision ( ) throws java.lang.Exception { com.android.timezone.distro.DistroVersion validDistroVersion = new com.android.timezone.distro.DistroVersion ( 1 , 1 , com.android.timezone.distro.installer.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 ( ) ; }

Target:
public void testStageInstallWithErrorCode_withBadlyFormedRevision ( ) throws java.lang.Exception { byte [ ] invalidRevisionBytes = com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . buildUnvalidatedBytes ( ) ; 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 testUngrant_DoubleGrantUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to grant key to other user a second time" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_DoubleGrantUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , 1024 , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to grant key to other user a second time" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
private org.eclipse.jface.text.hyperlink.IHyperlink [ ] createTypeLink ( org.eclipse.jdt.core.IJavaElement element , org.eclipse.jdt.core.IJavaElement type , org.eclipse.jface.text.IRegion wordRegion , boolean isFrameworkResource ) { java.lang.String typeName = type.getElementName ( ) ; if ( isFrameworkResource ) { typeName = ( ( com.android.ide.eclipse.adt.AndroidConstants.ANDROID_PKG ) + ':' ) + typeName ; } java.lang.String elementName = element.getElementName ( ) ; java.lang.String url = ( ( '@' + typeName ) + '/' ) + elementName ; return new org.eclipse.jface.text.hyperlink.IHyperlink [ ] { new com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.DeferredResolutionLink ( url , null , wordRegion ) } ; }

Target:
private org.eclipse.jface.text.hyperlink.IHyperlink [ ] createTypeLink ( org.eclipse.jdt.core.IJavaElement element , org.eclipse.jdt.core.IJavaElement type , org.eclipse.jface.text.IRegion wordRegion , boolean isFrameworkResource ) { java.lang.String typeName = type.getElementName ( ) ; if ( isFrameworkResource ) { typeName = ( ( com.android.ide.eclipse.adt.AndroidConstants.ANDROID_PKG ) + ':' ) + typeName ; } java.lang.String elementName = element.getElementName ( ) ; java.lang.String url = ( ( '@' + typeName ) + '/' ) + elementName ; return com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getResourceLinks ( wordRegion , url ) ; }
Source:
public void testParceling ( ) { android.net.LinkAddress l ; l = new android.net.LinkAddress ( android.net.LinkAddressTest.V6_ADDRESS , 64 ) ; assertParcelingIsLossless ( l ) ; l = new android.net.LinkAddress ( ( ( android.net.LinkAddressTest.V4 ) + "/28" ) ) ; assertParcelingIsLossless ( l ) ; }

Target:
public void testParceling ( ) { android.net.LinkAddress l ; l = new android.net.LinkAddress ( android.net.LinkAddressTest.V6_ADDRESS , 64 , 123 , 456 ) ; assertParcelingIsLossless ( l ) ; l = new android.net.LinkAddress ( ( ( android.net.LinkAddressTest.V4 ) + "/28" ) , libcore.io.OsConstants.IFA_F_PERMANENT , libcore.io.OsConstants.RT_SCOPE_LINK ) ; assertParcelingIsLossless ( l ) ; }
Source:
private void verifyHierarchy ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass t ) { com.android.jack.ir.ast.JClass superClass = t.getSuperClass ( ) ; if ( superClass instanceof com.android.jack.ir.ast.JPhantomClass ) { t.addMarker ( new com.android.jack.shrob.shrink.PartialTypeHierarchy ( ( ( com.android.jack.ir.ast.JPhantomClass ) ( superClass ) ) ) ) ; } else if ( superClass != null ) { verifyHierarchy ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( superClass ) ) ) ; } verifyImplementedInterfaces ( t ) ; }

Target:
private void findUnknownTypes ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass t , @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JPhantomClassOrInterface > unknownTypes ) { com.android.jack.ir.ast.JClass superClass = t.getSuperClass ( ) ; if ( superClass instanceof com.android.jack.ir.ast.JPhantomClass ) { unknownTypes.add ( ( ( com.android.jack.ir.ast.JPhantomClass ) ( superClass ) ) ) ; } else if ( superClass != null ) { findUnknownTypes ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( superClass ) ) , unknownTypes ) ; } findUnknownTypes ( t.getImplements ( ) , unknownTypes ) ; }
Source:
public void onMMIDone ( com.android.internal.telephony.MmiCode mmi ) { if ( ( mPendingMMIs.remove ( mmi ) ) || ( ( isPhoneTypeGsm ( ) ) && ( ( mmi.isUssdRequest ( ) ) || ( ( ( com.android.internal.telephony.gsm.GsmMmiCode ) ( mmi ) ) . isSsInfo ( ) ) ) ) ) { mMmiCompleteRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; } }

Target:
private void onNetworkInitiatedUssd ( com.android.internal.telephony.MmiCode mmi ) { android.telephony.Rlog.v ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , ( "onNetworkInitiatedUssd: mmi=" + mmi ) ) ; mMmiCompleteRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; }
Source:
public boolean onConnect ( android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothSocket socket ) { if ( com.android.bluetooth.opp.BluetoothOppService.D ) { android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppService.TAG , ( ( ( " onConnect BluetoothSocket :" + socket ) + " \n :device :" ) + device ) ) ; } com.android.bluetooth.BluetoothObexTransport transport = new com.android.bluetooth.BluetoothObexTransport ( socket ) ; android.os.Message msg = android.os.Message.obtain ( ) ; msg.setTarget ( mHandler ) ; msg.what = com.android.bluetooth.opp.BluetoothOppService.MSG_INCOMING_BTOPP_CONNECTION ; msg.obj = transport ; msg.sendToTarget ( ) ; return true ; }

Target:
public boolean onConnect ( android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothSocket socket ) { if ( com.android.bluetooth.opp.BluetoothOppService.D ) { android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppService.TAG , ( ( ( " onConnect BluetoothSocket :" + socket ) + " \n :device :" ) + device ) ) ; } com.android.bluetooth.BluetoothObexTransport transport = new com.android.bluetooth.BluetoothObexTransport ( socket ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.opp.BluetoothOppService.MSG_INCOMING_BTOPP_CONNECTION ) ; msg.obj = transport ; msg.sendToTarget ( ) ; return true ; }
Source:
public com.android.jack.test.toolchain.JackBasedToolchain setSourceLevel ( @ javax.annotation.Nonnull com.android.jack.test.toolchain.SourceLevel sourceLevel ) { super . setSourceLevel ( sourceLevel ) ; switch ( sourceLevel ) { case JAVA_6 : addProperty ( "jack.java.source.version" , "1.6" ) ; break ; case JAVA_7 : addProperty ( "jack.java.source.version" , "1.7" ) ; break ; default : throw new java.lang.AssertionError ( ( ( "Unkown level: '" + ( sourceLevel.toString ( ) ) ) + "'" ) ) ; } return this ; }

Target:
public abstract void setOutputJack ( @ javax.annotation.Nonnull java.io.File outputJack , boolean zipFiles ) throws java.lang.Exception ;
Source:
public com.android.ide.eclipse.adt.internal.resources.ResourceItem [ ] getResources ( com.android.ide.eclipse.adt.internal.resources.ResourceType type ) { if ( ( mResourcesMap ) != null ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.ResourceItem > items = mResourcesMap.get ( type ) ; if ( items != null ) { return items.toArray ( new com.android.ide.eclipse.adt.internal.resources.ResourceItem [ items.size ( ) ] ) ; } } return null ; }

Target:
public com.android.ide.eclipse.adt.internal.resources.ResourceItem [ ] getResources ( com.android.resources.ResourceType type ) { if ( ( mResourcesMap ) != null ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.ResourceItem > items = mResourcesMap.get ( type ) ; if ( items != null ) { return items.toArray ( new com.android.ide.eclipse.adt.internal.resources.ResourceItem [ items.size ( ) ] ) ; } } return null ; }
Source:
public static java.security.Signature getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { if ( algorithm == null ) { throw new java.lang.NullPointerException ( "algorithm == null" ) ; } if ( provider == null ) { throw new java.lang.IllegalArgumentException ( "provider == null" ) ; } return java.security.Signature.getSignatureInstance ( algorithm , provider ) ; }

Target:
public static java.security.Signature getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { if ( algorithm == null ) { throw new java.lang.NullPointerException ( "algorithm == null" ) ; } if ( provider == null ) { throw new java.lang.IllegalArgumentException ( "provider == null" ) ; } return java.security.Signature.getSignature ( algorithm , provider ) ; }
Source:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull final com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; putProperty ( fileType.buildPropertyName ( null ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; return baseVFS.getRootInputOutputVDir ( ) . createOutputVFile ( fileType.buildFileVPath ( typePath ) ) ; }

Target:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull final com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.NotFileOrDirectoryException { assert ! ( isClosed ( ) ) ; putProperty ( fileType.buildPropertyName ( null ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; return getSectionVFS ( fileType ) . getOutputVFS ( ) . getRootOutputVDir ( ) . createOutputVFile ( buildFileVPath ( fileType , typePath ) ) ; }
Source:
public int hashCode ( ) { return com.google.common.collect.Lists.hashCodeImpl ( this ) ; }

Target:
int copyIntoArray ( java.lang.Object [ ] dst , int offset ) { int size = size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { dst [ ( offset + i ) ] = get ( i ) ; } return offset + size ; }
Source:
private void playItemRequestFromNative ( byte [ ] address , byte scope , int uidCounter , byte [ ] uid ) { android.os.Bundle data = new android.os.Bundle ( ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_PLAY_ITEM ) ; data.putByteArray ( "BdAddress" , address ) ; data.putByteArray ( "uid" , uid ) ; data.putInt ( "uidCounter" , uidCounter ) ; data.putByte ( "scope" , scope ) ; msg.setData ( data ) ; mHandler.sendMessage ( msg ) ; }

Target:
private void getTotalNumOfItemsRequestFromNative ( byte [ ] address , byte scope ) { final com.android.bluetooth.avrcp.Avrcp.AvrcpMessageHandler handler = mHandler ; if ( handler == null ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "getTotalNumOfItemsRequestFromNative: mHandler is already null" ) ; return ; } android.os.Bundle data = new android.os.Bundle ( ) ; android.os.Message msg = handler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_GET_TOTAL_NUM_OF_ITEMS ) ; msg.arg1 = scope ; msg.obj = address ; handler.sendMessage ( msg ) ; }
Source:
public static void doTest ( ) throws java.lang.Exception { Main.testMethod ( "java.lang.Object" , "toString" ) ; Main.testMethod ( "java.lang.String" , "charAt" , int . class ) ; Main.testMethod ( "java.lang.Math" , "sqrt" , double . class ) ; Main.testMethod ( "java.util.List" , "add" , java.lang.Object.class ) ; Main.testMethod ( Main.getProxyClass ( ) , "run" ) ; }

Target:
public static void doTest ( ) throws java.lang.Exception { Main.testMethod ( "java.lang.Object" , "toString" ) ; Main.testMethod ( "java.lang.String" , "charAt" , int . class ) ; Main.testMethod ( "java.lang.Math" , "sqrt" , double . class ) ; Main.testMethod ( "java.util.List" , "add" , java.lang.Object.class ) ; Main.testMethod ( Main.getProxyClass ( ) , "run" ) ; Main.testMethod ( Main.findSyntheticMethod ( ) , Main.NestedSynthetic.class , false ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , long [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 8 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
private void copy1DRangeFromUnchecked ( int off , int count , java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { final int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( arrayLen * ( dt.mSize ) ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , array , dataSize , dt ) ; }
Source:
public void enableSystemApp ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "enableSystemApp" ) ; if ( ( mService ) != null ) { try { mService.enableSystemApp ( admin , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }

Target:
public boolean setPermittedCrossProfileNotificationListeners ( @ android.annotation.NonNull android.content.ComponentName admin , @ android.annotation.Nullable java.util.List < java.lang.String > packageList ) { throwIfParentInstance ( "setPermittedCrossProfileNotificationListeners" ) ; if ( ( mService ) != null ) { try { return mService.setPermittedCrossProfileNotificationListeners ( admin , packageList ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
private android.net.Uri insertVideo ( android.content.Context context ) throws java.io.IOException { java.io.File file = new java.io.File ( android.os.Environment.getExternalStorageDirectory ( ) , "testVideo.3gp" ) ; new android.cts.util.FileCopyHelper ( context ) . copyToExternalStorage ( R.raw.testvideo , file ) ; android.content.ContentValues values = new android.content.ContentValues ( ) ; values.put ( VideoColumns.DATA , file.getAbsolutePath ( ) ) ; return context.getContentResolver ( ) . insert ( Media.EXTERNAL_CONTENT_URI , values ) ; }

Target:
private android.net.Uri insertVideo ( android.content.Context context ) throws java.io.IOException { java.io.File file = new java.io.File ( android.os.Environment.getExternalStorageDirectory ( ) , "testVideo.3gp" ) ; cleanExternalMediaFile ( file.getAbsolutePath ( ) ) ; new android.cts.util.FileCopyHelper ( context ) . copyToExternalStorage ( R.raw.testvideo , file ) ; android.content.ContentValues values = new android.content.ContentValues ( ) ; values.put ( VideoColumns.DATA , file.getAbsolutePath ( ) ) ; return context.getContentResolver ( ) . insert ( Media.EXTERNAL_CONTENT_URI , values ) ; }
Source:
public void test_JarFile_InsertEntry_in_Manifest_Jar ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Inserted_Entry_Manifest.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; int count = 0 ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; count ++ ; } assertEquals ( 5 , count ) ; }

Target:
public void test_JarFile_InsertEntry_in_Manifest_Jar ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Inserted_Entry_Manifest.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; try ( java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ) { java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; int count = 0 ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; count ++ ; } assertEquals ( 5 , count ) ; } }
Source:
public boolean isTestCoverageEnabled ( ) { return testVariantConfig.isTestCoverageEnabled ( ) ; }

Target:
public java.util.List < java.io.File > getTestDirectories ( ) { com.android.build.gradle.internal.core.GradleVariantConfiguration variantConfiguration = testVariantData.getVariantConfiguration ( ) ; com.google.common.collect.ImmutableList.Builder < java.io.File > javaDirectories = com.google.common.collect.ImmutableList.builder ( ) ; for ( com.android.builder.model.SourceProvider sourceProvider : variantConfiguration.getSortedSourceProviders ( ) ) { javaDirectories.addAll ( sourceProvider.getJavaDirectories ( ) ) ; } return javaDirectories.build ( ) ; }
Source:
private void readSourceFolder ( java.io.File sourceFolder ) throws com.android.builder.resources.DuplicateResourceException , java.io.IOException { java.io.File [ ] folders = sourceFolder.listFiles ( ) ; if ( folders != null ) { for ( java.io.File folder : folders ) { if ( folder.isDirectory ( ) ) { parseFolder ( sourceFolder , folder ) ; } } } }

Target:
private void readSourceFolder ( java.io.File sourceFolder ) throws com.android.builder.resources.DuplicateResourceException , java.io.IOException { java.io.File [ ] folders = sourceFolder.listFiles ( ) ; if ( folders != null ) { for ( java.io.File folder : folders ) { if ( ( folder.isDirectory ( ) ) && ( com.android.builder.internal.packaging.PackagingUtils.checkFolderForPackaging ( folder.getName ( ) ) ) ) { parseFolder ( sourceFolder , folder ) ; } } } }
Source:
public static < K , V > com.google.common.collect.ImmutableBiMap < K , V > of ( K k1 , V v1 , K k2 , V v2 , K k3 , V v3 ) { return new com.google.common.collect.RegularImmutableBiMap < K , V > ( com.google.common.collect.ImmutableMap.of ( k1 , v1 , k2 , v2 , k3 , v3 ) ) ; }

Target:
public static < K , V > com.google.common.collect.ImmutableBiMap < K , V > of ( K k1 , V v1 , K k2 , V v2 , K k3 , V v3 ) { return new com.google.common.collect.RegularImmutableBiMap < K , V > ( com.google.common.collect.ImmutableMap.entryOf ( k1 , v1 ) , com.google.common.collect.ImmutableMap.entryOf ( k2 , v2 ) , com.google.common.collect.ImmutableMap.entryOf ( k3 , v3 ) ) ; }
Source:
public android.app.admin.DevicePolicyManager getParentProfileInstance ( @ android.annotation.NonNull android.content.ComponentName admin ) { throwIfParentInstance ( "getParentProfileInstance" ) ; try { if ( ! ( mService.isManagedProfile ( admin ) ) ) { throw new java.lang.SecurityException ( "The current user does not have a parent profile." ) ; } return new android.app.admin.DevicePolicyManager ( mContext , true ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void setUninstallBlocked ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName , boolean uninstallBlocked ) { throwIfParentInstance ( "setUninstallBlocked" ) ; if ( ( mService ) != null ) { try { mService.setUninstallBlocked ( admin , mContext.getPackageName ( ) , packageName , uninstallBlocked ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } } }
Source:
public void onPageFinished ( android.webkit.WebView view , java.lang.String url ) { ( mPagesLoaded ) ++ ; getProgressBar ( ) . setVisibility ( View.INVISIBLE ) ; if ( ( mPagesLoaded ) == 1 ) { setWebViewProxy ( ) ; view.loadUrl ( mUrl.toString ( ) ) ; return ; } else if ( ( mPagesLoaded ) == 2 ) { view.requestFocus ( ) ; view.clearHistory ( ) ; } testForCaptivePortal ( ) ; }

Target:
public void onPageFinished ( android.webkit.WebView view , java.lang.String url ) { ( mPagesLoaded ) ++ ; getProgressBar ( ) . setVisibility ( View.INVISIBLE ) ; mSwipeRefreshLayout.setRefreshing ( false ) ; if ( ( mPagesLoaded ) == 1 ) { setWebViewProxy ( ) ; view.loadUrl ( mUrl.toString ( ) ) ; return ; } else if ( ( mPagesLoaded ) == 2 ) { view.requestFocus ( ) ; view.clearHistory ( ) ; } testForCaptivePortal ( ) ; }
Source:
public static float ulp ( float f ) { return sun.misc.FpUtils.ulp ( f ) ; }

Target:
public static float scalb ( float f , int scaleFactor ) { final int MAX_SCALE = ( ( ( sun.misc.FloatConsts.MAX_EXPONENT ) + ( - ( sun.misc.FloatConsts.MIN_EXPONENT ) ) ) + ( sun.misc.FloatConsts.SIGNIFICAND_WIDTH ) ) + 1 ; scaleFactor = java.lang.Math.max ( java.lang.Math.min ( scaleFactor , MAX_SCALE ) , ( - MAX_SCALE ) ) ; return ( ( float ) ( ( ( double ) ( f ) ) * ( java.lang.Math.powerOfTwoD ( scaleFactor ) ) ) ) ; }
Source:
public static java.lang.String getMethodSignatureWithoutName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( '(' ) ; for ( com.android.jack.ir.ast.JType p : call.getMethodId ( ) . getParamTypes ( ) ) { sb.append ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( p ) ) ; } sb.append ( ')' ) ; sb.append ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( call.getType ( ) ) ) ; return sb.toString ( ) ; }

Target:
public static java.lang.String getMethodSignatureWithoutName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( '(' ) ; for ( com.android.jack.ir.ast.JType p : call.getMethodIdWide ( ) . getParamTypes ( ) ) { sb.append ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( p ) ) ; } sb.append ( ')' ) ; sb.append ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( call.getType ( ) ) ) ; return sb.toString ( ) ; }
Source:
void delete ( @ javax.annotation.Nonnull com.android.sched.vfs.DirectFS.DirectVFile file ) throws com.android.sched.util.file.CannotDeleteFileException { assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File rawFile = file.getNativePath ( ) ; if ( ( ! ( rawFile.delete ( ) ) ) || ( rawFile.exists ( ) ) ) { throw new com.android.sched.util.file.CannotDeleteFileException ( file.getLocation ( ) ) ; } }

Target:
com.android.sched.vfs.ParentVFile createVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File path = getNativeFile ( parent.getPath ( ) , name ) ; try { com.android.sched.util.file.AbstractStreamFile.create ( path , new com.android.sched.util.location.FileLocation ( path ) ) ; } catch ( com.android.sched.util.file.FileAlreadyExistsException e ) { } return new com.android.sched.vfs.ParentVFile ( this , parent , name ) ; }
Source:
public void delete ( java.lang.String name ) throws java.io.IOException { if ( name.equalsIgnoreCase ( sun.security.x509.SubjectInfoAccessExtension.DESCRIPTIONS ) ) { accessDescriptions = new java.util.ArrayList < sun.security.x509.AccessDescription > ( ) ; } else { throw new java.io.IOException ( ( ( ( "Attribute name [" + name ) + "] not recognized by " ) + "CertAttrSet:SubjectInfoAccessExtension." ) ) ; } encodeThis ( ) ; }

Target:
public void delete ( java.lang.String name ) throws java.io.IOException { if ( name.equalsIgnoreCase ( sun.security.x509.SubjectInfoAccessExtension.DESCRIPTIONS ) ) { accessDescriptions = java.util.Collections.< sun.security.x509.AccessDescription > emptyList ( ) ; } else { throw new java.io.IOException ( ( ( ( "Attribute name [" + name ) + "] not recognized by " ) + "CertAttrSet:SubjectInfoAccessExtension." ) ) ; } encodeThis ( ) ; }
Source:
native void rsnScriptForEachClipped ( long con , long id , int slot , long ain , long aout , byte [ ] params , int xstart , int xend , int ystart , int yend , int zstart , int zend ) ;

Target:
synchronized long nScriptKernelIDCreate ( long sid , int slot , int sig , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } return rsnScriptKernelIDCreate ( curCon , sid , slot , sig , mUseInc ) ; }
Source:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , getFillParentValueName ( ) ) ; node.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , getFillParentValueName ( ) ) ; }

Target:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , getFillParentValueName ( ) ) ; node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , getFillParentValueName ( ) ) ; }
Source:
public com.android.sdklib.IAndroidTarget getTargetFromHashString ( @ com.android.annotations.Nullable java.lang.String hash ) { if ( hash != null ) { com.android.sdklib.IAndroidTarget [ ] targets = getTargets ( ) ; for ( com.android.sdklib.IAndroidTarget target : targets ) { if ( ( target != null ) && ( hash.equals ( com.android.sdklib.AndroidTargetHash.getTargetHashString ( target ) ) ) ) { return target ; } } } return null ; }

Target:
public com.android.sdklib.repository.local.IAndroidTarget getTargetFromHashString ( @ com.android.annotations.Nullable java.lang.String hash ) { if ( hash != null ) { com.android.sdklib.repository.local.IAndroidTarget [ ] targets = getTargets ( true ) ; for ( com.android.sdklib.repository.local.IAndroidTarget target : targets ) { if ( ( target != null ) && ( hash.equals ( com.android.sdklib.repository.local.AndroidTargetHash.getTargetHashString ( target ) ) ) ) { return target ; } } } return null ; }
Source:
public void start ( ) { android.util.Log.i ( com.android.server.ethernet.EthernetServiceImpl.TAG , "Starting Ethernet service" ) ; android.os.HandlerThread handlerThread = new android.os.HandlerThread ( "EthernetServiceThread" ) ; handlerThread.start ( ) ; mHandler = new android.os.Handler ( handlerThread.getLooper ( ) ) ; mTracker.start ( mContext , mHandler ) ; mStarted.set ( true ) ; }

Target:
public void start ( ) { android.util.Log.i ( com.android.server.ethernet.EthernetServiceImpl.TAG , "Starting Ethernet service" ) ; android.os.HandlerThread handlerThread = new android.os.HandlerThread ( "EthernetServiceThread" ) ; handlerThread.start ( ) ; mHandler = new android.os.Handler ( handlerThread.getLooper ( ) ) ; mTracker = new com.android.server.ethernet.EthernetTracker ( mContext , mHandler ) ; mTracker.start ( ) ; mStarted.set ( true ) ; }
Source:
private static void printUsage ( ) { java.lang.System.err.println ( "\nGenerates a single API file from the content of an SDK." ) ; java.lang.System.err.println ( "Usage:" ) ; java.lang.System.err.println ( "\tApiCheck [--min-api=1] OutFile [SdkFolder | --pattern sdk/%/android.jar]+" ) ; java.lang.System.err.println ( "Options:" ) ; java.lang.System.err.println ( "--min-api <int> : The first API level to consider (>=1)." ) ; java.lang.System.err.println ( ( "--pattern <pattern>: Path pattern to find per-API android.jar files, where\n" + " '%' is replaced by the API level." ) ) ; java.lang.System.err.println ( "--current-jar <path>: Path pattern to find the current android.jar" ) ; java.lang.System.err.println ( "--current-version <int>: The API level for the current API" ) ; java.lang.System.err.println ( "--current-codename <name>: REL, if a release, or codename for previews" ) ; java.lang.System.err.println ( ( "SdkFolder: if given, this adds the pattern\n" + " '$SdkFolder/platforms/android-%/android.jar'" ) ) ; java.lang.System.err.println ( "If multiple --pattern are specified, they are tried in the order given.\n" ) ; }

Target:
private static void printUsage ( ) { java.lang.System.err.println ( "\nGenerates a single API file from the content of an SDK." ) ; java.lang.System.err.println ( "Usage:" ) ; java.lang.System.err.println ( "\tApiCheck [--min-api=1] OutFile [SdkFolder | --pattern sdk/%/public/android.jar]+" ) ; java.lang.System.err.println ( "Options:" ) ; java.lang.System.err.println ( "--min-api <int> : The first API level to consider (>=1)." ) ; java.lang.System.err.println ( ( "--pattern <pattern>: Path pattern to find per-API android.jar files, where\n" + " '%' is replaced by the API level." ) ) ; java.lang.System.err.println ( "--current-jar <path>: Path pattern to find the current android.jar" ) ; java.lang.System.err.println ( "--current-version <int>: The API level for the current API" ) ; java.lang.System.err.println ( "--current-codename <name>: REL, if a release, or codename for previews" ) ; java.lang.System.err.println ( ( "SdkFolder: if given, this adds the pattern\n" + " '$SdkFolder/platforms/android-%/android.jar'" ) ) ; java.lang.System.err.println ( "If multiple --pattern are specified, they are tried in the order given.\n" ) ; }
Source:
public boolean isConferenceHost ( ) { if ( ( mConferenceHost ) == null ) { return false ; } android.telecom.Connection originalConnection = mConferenceHost.getOriginalConnection ( ) ; if ( ! ( originalConnection instanceof com.android.internal.telephony.imsphone.ImsPhoneConnection ) ) { return false ; } com.android.internal.telephony.imsphone.ImsPhoneConnection imsPhoneConnection = ( ( com.android.internal.telephony.imsphone.ImsPhoneConnection ) ( originalConnection ) ) ; return ( imsPhoneConnection.isMultiparty ( ) ) && ( imsPhoneConnection.isConferenceHost ( ) ) ; }

Target:
private boolean isParticipantHost ( android.net.Uri [ ] hostHandles , android.net.Uri handle ) { if ( ( ( hostHandles == null ) || ( ( hostHandles.length ) == 0 ) ) || ( handle == null ) ) { android.telecom.Log.v ( this , "isParticipantHost(N) : host or participant uri null" ) ; return false ; } java.lang.String number = handle.getSchemeSpecificPart ( ) ; java.lang.String [ ] numberParts = number.split ( "[@;:]" ) ; if ( ( numberParts.length ) == 0 ) { android.telecom.Log.v ( this , "isParticipantHost(N) : no number in participant handle" ) ; return false ; } number = numberParts [ 0 ] ; for ( android.net.Uri hostHandle : hostHandles ) { if ( hostHandle == null ) { continue ; } java.lang.String hostNumber = hostHandle.getSchemeSpecificPart ( ) ; boolean isHost = android.telephony.PhoneNumberUtils.compare ( hostNumber , number ) ; android.telecom.Log.v ( this , "isParticipantHost(%s) : host: %s, participant %s" , ( isHost ? "Y" : "N" ) , android.telecom.Log.pii ( hostNumber ) , android.telecom.Log.pii ( number ) ) ; if ( isHost ) { return true ; } } return false ; }
Source:
public int getScanMode ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.getScanMode ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; }

Target:
public android.os.ParcelUuid [ ] getUuids ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return null ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.getUuids ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return null ; }
Source:
public void testEmptyOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; libcore.util.ZoneInfoDB.TzData dataWithEmptyOverride = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) , libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; assertEquals ( data.getVersion ( ) , dataWithEmptyOverride.getVersion ( ) ) ; assertEquals ( data.getAvailableIDs ( ) . length , dataWithEmptyOverride.getAvailableIDs ( ) . length ) ; }

Target:
public void testEmptyOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; java.lang.String emptyFilePath = libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) . getPath ( ) ; libcore.util.ZoneInfoDB.TzData dataWithEmptyOverride = new libcore.util.ZoneInfoDB.TzData ( emptyFilePath , libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; assertEquals ( data.getVersion ( ) , dataWithEmptyOverride.getVersion ( ) ) ; assertEquals ( data.getAvailableIDs ( ) . length , dataWithEmptyOverride.getAvailableIDs ( ) . length ) ; }
Source:
protected boolean stop ( ) { if ( ( mStateMachine ) != null ) { mStateMachine.doQuit ( ) ; } if ( ( mAvrcp ) != null ) { mAvrcp.doQuit ( ) ; } return true ; }

Target:
protected boolean stop ( ) { if ( com.android.bluetooth.a2dp.A2dpService.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpService.TAG , "stop()" ) ; } if ( ( mStateMachine ) != null ) { mStateMachine.doQuit ( ) ; } if ( ( mAvrcp ) != null ) { mAvrcp.doQuit ( ) ; } if ( ( mStateMachinesThread ) != null ) { mStateMachinesThread.quit ( ) ; mStateMachinesThread = null ; } return true ; }