auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void establishZygoteConnectionForAbi ( java.lang.String abi ) { try { android.os.Process.openZygoteSocketIfNeeded ( abi ) ; } catch ( android.os.ZygoteStartFailedEx ex ) { throw new java.lang.RuntimeException ( ( "Unable to connect to zygote for abi: " + abi ) , ex ) ; } }

Target:
public static final boolean isThreadInProcess ( int tid , int pid ) { android.os.StrictMode.ThreadPolicy oldPolicy = android.os.StrictMode.allowThreadDiskReads ( ) ; try { if ( android.system.Os.access ( ( ( ( "/proc/" + tid ) + "/task/" ) + pid ) , OsConstants.F_OK ) ) { return true ; } else { return false ; } } catch ( java.lang.Exception e ) { return false ; } finally { android.os.StrictMode.setThreadPolicy ( oldPolicy ) ; } }
Source:
public java.util.SortedSet < java.lang.String > getLanguages ( ) { java.util.SortedSet < java.lang.String > set = new java.util.TreeSet < java.lang.String > ( ) ; java.util.Collection < java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > > folderList = mFolderMap.values ( ) ; for ( java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > folderSubList : folderList ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder folder : folderSubList ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = folder.getConfiguration ( ) ; com.android.ide.eclipse.adt.internal.resources.configurations.LanguageQualifier lang = config.getLanguageQualifier ( ) ; if ( lang != null ) { set.add ( lang.getShortDisplayValue ( ) ) ; } } } return set ; }

Target:
public java.util.SortedSet < java.lang.String > getLanguages ( ) { java.util.SortedSet < java.lang.String > set = new java.util.TreeSet < java.lang.String > ( ) ; java.util.Collection < java.util.List < com.android.ide.common.resources.ResourceFolder > > folderList = mFolderMap.values ( ) ; for ( java.util.List < com.android.ide.common.resources.ResourceFolder > folderSubList : folderList ) { for ( com.android.ide.common.resources.ResourceFolder folder : folderSubList ) { com.android.ide.common.resources.configuration.FolderConfiguration config = folder.getConfiguration ( ) ; com.android.ide.common.resources.configuration.LanguageQualifier lang = config.getLanguageQualifier ( ) ; if ( lang != null ) { set.add ( lang.getShortDisplayValue ( ) ) ; } } } return set ; }
Source:
public void fileChanged ( org.eclipse.core.resources.IProject project , com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile file , int eventType ) { if ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder.sRefreshing ) { return ; } if ( ( eventType & ( ( ( ( org.eclipse.core.resources.IResourceDelta.CHANGED ) | ( org.eclipse.core.resources.IResourceDelta.ADDED ) ) | ( org.eclipse.core.resources.IResourceDelta.REMOVED ) ) | ( org.eclipse.core.resources.IResourceDelta.CONTENT ) ) ) == 0 ) { return ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder finder = com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder.get ( project ) ; if ( finder != null ) { if ( finder.updateFileIncludes ( file , true ) ) { finder.saveSettings ( ) ; } } }

Target:
public void fileChanged ( org.eclipse.core.resources.IProject project , com.android.ide.common.resources.ResourceFile file , int eventType ) { if ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder.sRefreshing ) { return ; } if ( ( eventType & ( ( ( ( org.eclipse.core.resources.IResourceDelta.CHANGED ) | ( org.eclipse.core.resources.IResourceDelta.ADDED ) ) | ( org.eclipse.core.resources.IResourceDelta.REMOVED ) ) | ( org.eclipse.core.resources.IResourceDelta.CONTENT ) ) ) == 0 ) { return ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder finder = com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder.get ( project ) ; if ( finder != null ) { if ( finder.updateFileIncludes ( file , true ) ) { finder.saveSettings ( ) ; } } }
Source:
private com.android.ims.internal.IImsMMTelFeature createMMTelFeatureInternal ( int slotId , com.android.ims.internal.IImsFeatureStatusCallback c ) { android.telephony.ims.feature.MMTelFeature f = onCreateMMTelImsFeature ( slotId ) ; if ( f != null ) { setupFeature ( f , slotId , ImsFeature.MMTEL , c ) ; return f.getBinder ( ) ; } else { return null ; } }

Target:
public android.telephony.ims.feature.RcsFeature createRcsFeature ( int slotId ) { return null ; }
Source:
public void onSdkLoaded ( ) { com.android.sdklib.IAndroidTarget target = getRenderingTarget ( ) ; if ( target != null ) { mConfigComposite.onSdkLoaded ( target ) ; mConfigListener.onConfigurationChange ( ) ; } }

Target:
public void onSdkLoaded ( ) { com.android.sdklib.IAndroidTarget oldTarget = getRenderingTarget ( ) ; preRenderingTargetChangeCleanUp ( oldTarget ) ; com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk != null ) { com.android.sdklib.IAndroidTarget target = currentSdk.getTarget ( mEditedFile.getProject ( ) ) ; if ( target != null ) { mConfigComposite.onSdkLoaded ( target ) ; mConfigListener.onConfigurationChange ( ) ; } } }
Source:
public void validateCertCredentialWithoutClientCertChain ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.certCredential = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; cred.certCredential.certType = "x509v3" ; cred.certCredential.certSha256FingerPrint = java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; cred.clientPrivateKey = android.net.wifi.FakeKeys.RSA_KEY1 ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateCertCredentialWithoutClientCertChain ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithCertificateCredential ( ) ; cred.setClientCertificateChain ( null ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
public void clearCache ( final boolean includeDiskFiles ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearCache ( includeDiskFiles ) ; } } ) ; return ; } mAwContents.clearCache ( includeDiskFiles ) ; }

Target:
public android.webkit.WebBackForwardList copyBackForwardList ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return copyBackForwardList ( ) ; } } ) ; return ret ; } return new com.android.webview.chromium.WebBackForwardListChromium ( mAwContents.getNavigationHistory ( ) ) ; }
Source:
public void testBuildConfigFieldMerge ( ) { com.android.builder.model.ProductFlavor productFlavor = mCustom.mergeOver ( mCustom2 ) ; java.util.Map < java.lang.String , com.android.builder.model.ClassField > buildConfigFields = productFlavor.getBuildConfigFields ( ) ; assertEquals ( 3 , buildConfigFields.size ( ) ) ; assertEquals ( "oneValue" , buildConfigFields.get ( "one" ) . getValue ( ) ) ; assertEquals ( "twoValue" , buildConfigFields.get ( "two" ) . getValue ( ) ) ; assertEquals ( "threeValue" , buildConfigFields.get ( "three" ) . getValue ( ) ) ; }

Target:
public void testResValuesMerge ( ) { com.android.builder.model.ProductFlavor flavor = com.android.builder.core.DefaultProductFlavor.mergeFlavors ( mCustom2 , mCustom ) ; java.util.Map < java.lang.String , com.android.builder.model.ClassField > resValues = flavor.getResValues ( ) ; assertEquals ( 3 , resValues.size ( ) ) ; assertEquals ( "oneValue" , resValues.get ( "one" ) . getValue ( ) ) ; assertEquals ( "twoValue" , resValues.get ( "two" ) . getValue ( ) ) ; assertEquals ( "threeValue" , resValues.get ( "three" ) . getValue ( ) ) ; }
Source:
public void setLocalRepository ( @ org.jetbrains.annotations.Nullable final java.lang.String overridenLocalRepository ) { if ( overridenLocalRepository == null ) return ; if ( ! ( com.intellij.openapi.util.Comparing.equal ( this . overriddenLocalRepository , overridenLocalRepository ) ) ) { this . overriddenLocalRepository = overridenLocalRepository ; changed ( ) ; } }

Target:
public void setLocalRepository ( @ org.jetbrains.annotations.Nullable final java.lang.String overridenLocalRepository ) { if ( overridenLocalRepository == null ) return ; if ( ! ( com.intellij.openapi.util.Comparing.equal ( this . overriddenLocalRepository , overridenLocalRepository ) ) ) { this . overriddenLocalRepository = overridenLocalRepository ; org.jetbrains.idea.maven.server.MavenServerManager.getInstance ( ) . shutdown ( true ) ; changed ( ) ; } }
Source:
void setAudioRoute ( java.lang.String callId , int audioRoute ) { android.telecom.Log.v ( this , "setAudioRoute: %s %s" , callId , android.telecom.CallAudioState.audioRouteToString ( audioRoute ) ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.setAudioRoute ( callId , audioRoute , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void setAudioRoute ( java.lang.String callId , int audioRoute , java.lang.String bluetoothAddress ) { android.telecom.Log.v ( this , "setAudioRoute: %s %s %s" , callId , android.telecom.CallAudioState.audioRouteToString ( audioRoute ) , bluetoothAddress ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.setAudioRoute ( callId , audioRoute , bluetoothAddress , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public void testWrongSeparator2 ( ) throws java.lang.Exception { mScopes = null ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:15: Warning: Use \'$\' instead of \'.\' for inner classes (or use only lowercase letters in package names) [InnerclassSeparator]\n" ) + " android:name=\".Foo.Bar\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong2.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }

Target:
public void testWrongSeparator2 ( ) throws java.lang.Exception { mScopes = null ; mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING , com.android.tools.lint.checks.MissingClassDetector.INSTANTIATABLE , com.android.tools.lint.checks.MissingClassDetector.INNERCLASS ) ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:15: Warning: Use \'$\' instead of \'.\' for inner classes (or use only lowercase letters in package names) [InnerclassSeparator]\n" ) + " android:name=\".Foo.Bar\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong2.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }
Source:
private void printHashMap ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailAdapter.printHashMap" , "hashMapSize: %d, currentlyExpandedViewHolderId:%d" , newVoicemailViewHolderArrayMap.size ( ) , currentlyExpandedViewHolderId ) ; if ( ! ( newVoicemailViewHolderArrayMap.isEmpty ( ) ) ) { java.lang.String ids = "" ; for ( int id : newVoicemailViewHolderArrayMap.keySet ( ) ) { ids = ( id + ( java.lang.String.valueOf ( id ) ) ) + " " ; } com.android.dialer.common.LogUtil.i ( "NewVoicemailAdapter.printHashMap" , ( "ids are " + ids ) ) ; } }

Target:
private void printArrayMap ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailAdapter.printArrayMap" , "hashMapSize: %d, currentlyExpandedViewHolderId:%d" , newVoicemailViewHolderArrayMap.size ( ) , currentlyExpandedViewHolderId ) ; if ( ! ( newVoicemailViewHolderArrayMap.isEmpty ( ) ) ) { java.lang.String ids = "" ; for ( int id : newVoicemailViewHolderArrayMap.keySet ( ) ) { ids = ( ids + id ) + " " ; } com.android.dialer.common.LogUtil.i ( "NewVoicemailAdapter.printArrayMap" , ( "ids are " + ids ) ) ; } }
Source:
private void rejectCallAndLog ( com.android.server.telecom.Call incomingCall ) { incomingCall.reject ( false , null ) ; mCallLogManager.logCall ( incomingCall , Calls.MISSED_TYPE , true ) ; }

Target:
private void rejectCallAndLog ( com.android.server.telecom.Call incomingCall ) { if ( ( incomingCall.getConnectionService ( ) ) != null ) { incomingCall.reject ( false , null ) ; } else { android.telecom.Log.i ( this , "rejectCallAndLog - call already destroyed." ) ; } mCallLogManager.logCall ( incomingCall , Calls.MISSED_TYPE , true ) ; }
Source:
private void markStackProducers ( proguard.optimize.evaluation.Clazz clazz , int consumerOffset , proguard.optimize.evaluation.Instruction consumer ) { proguard.optimize.evaluation.TracedStack tracedStack = partialEvaluator.getStackBefore ( consumerOffset ) ; int stackSize = tracedStack.size ( ) ; int popCount = consumer.stackPopCount ( clazz ) ; for ( int stackIndex = stackSize - popCount ; stackIndex < stackSize ; stackIndex ++ ) { markStackEntryProducers ( consumerOffset , stackIndex ) ; } }

Target:
private void markStackProducers ( proguard.optimize.evaluation.Clazz clazz , int consumerOffset , proguard.optimize.evaluation.Instruction consumer ) { proguard.evaluation.TracedStack tracedStack = partialEvaluator.getStackBefore ( consumerOffset ) ; int stackSize = tracedStack.size ( ) ; int popCount = consumer.stackPopCount ( clazz ) ; for ( int stackIndex = stackSize - popCount ; stackIndex < stackSize ; stackIndex ++ ) { markStackEntryProducers ( consumerOffset , stackIndex ) ; } }
Source:
void setInternetAccessState ( boolean enabled ) { com.android.server.wifi.WifiConfiguration config = getCurrentWifiConfiguration ( ) ; if ( config != null ) { config.noInternetAccess = enabled ; } }

Target:
private void handleSuccessfulIpConfiguration ( ) { mLastSignalLevel = - 1 ; android.net.wifi.WifiConfiguration c = getCurrentWifiConfiguration ( ) ; if ( c != null ) { c.getNetworkSelectionStatus ( ) . clearDisableReasonCounter ( WifiConfiguration.NetworkSelectionStatus.DISABLED_DHCP_FAILURE ) ; updateCapabilities ( c ) ; } if ( c != null ) { android.net.wifi.ScanResult result = getCurrentScanResult ( ) ; if ( result == null ) { logd ( ( "WifiStateMachine: handleSuccessfulIpConfiguration and no scan results" + ( c.configKey ( ) ) ) ) ; } else { result.numIpConfigFailures = 0 ; } } }
Source:
public void testToXmlAttributeValue ( ) throws java.lang.Exception { assertEquals ( "" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.toXmlAttributeValue ( "" ) ) ; assertEquals ( "foo" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.toXmlAttributeValue ( "foo" ) ) ; assertEquals ( "foo<bar" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.toXmlAttributeValue ( "foo<bar" ) ) ; assertEquals ( "&quot;" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.toXmlAttributeValue ( "\"" ) ) ; assertEquals ( "&apos;" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.toXmlAttributeValue ( "'" ) ) ; assertEquals ( "foo&quot;b&apos;&apos;ar" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.toXmlAttributeValue ( "foo\"b\'\'ar" ) ) ; }

Target:
public void testCapitalize ( ) { assertEquals ( "UPPER" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "UPPER" ) ) ; assertEquals ( "Lower" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "lower" ) ) ; assertEquals ( "Capital" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "Capital" ) ) ; assertEquals ( "CamelCase" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "camelCase" ) ) ; assertEquals ( "" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "" ) ) ; assertSame ( "Foo" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "Foo" ) ) ; }
Source:
public void calculateAndReportScoreSucceeds ( ) throws java.lang.Exception { int aggressiveHandover = 0 ; mWifiInfo.setRssi ( ( - 77 ) ) ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , aggressiveHandover , mWifiMetrics ) ; org.mockito.Mockito.verify ( mNetworkAgent ) . sendNetworkScore ( org.mockito.Mockito.anyInt ( ) ) ; org.mockito.Mockito.verify ( mWifiMetrics ) . incrementWifiScoreCount ( org.mockito.Mockito.anyInt ( ) ) ; }

Target:
public void calculateAndReportScoreSucceeds ( ) throws java.lang.Exception { mWifiInfo.setRssi ( ( - 77 ) ) ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , mAggr , mWifiMetrics ) ; org.mockito.Mockito.verify ( mNetworkAgent ) . sendNetworkScore ( org.mockito.Mockito.anyInt ( ) ) ; org.mockito.Mockito.verify ( mWifiMetrics ) . incrementWifiScoreCount ( org.mockito.Mockito.anyInt ( ) ) ; }
Source:
public boolean process ( java.io.File outputFile , java.io.File mainFile , java.io.File [ ] libraryFiles ) { org.w3c.dom.Document mainDoc = com.android.manifmerger.XmlUtils.parseDocument ( mainFile , mLog ) ; if ( mainDoc == null ) { return false ; } boolean success = process ( mainDoc , libraryFiles ) ; if ( ! ( com.android.manifmerger.XmlUtils.printXmlFile ( mainDoc , outputFile , mLog ) ) ) { success = false ; } return success ; }

Target:
public boolean process ( java.io.File outputFile , java.io.File mainFile , java.io.File [ ] libraryFiles , java.util.Map < java.lang.String , java.lang.String > injectAttributes ) { org.w3c.dom.Document mainDoc = com.android.manifmerger.XmlUtils.parseDocument ( mainFile , mLog ) ; if ( mainDoc == null ) { return false ; } boolean success = process ( mainDoc , libraryFiles , injectAttributes ) ; if ( ! ( com.android.manifmerger.XmlUtils.printXmlFile ( mainDoc , outputFile , mLog ) ) ) { success = false ; } return success ; }
Source:
private void broadcastDefaultSmsSubIdChanged ( int subId ) { if ( com.android.internal.telephony.SubscriptionController.DBG ) logdl ( ( "[broadcastDefaultSmsSubIdChanged] subId=" + subId ) ) ; android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( PhoneConstants.SUBSCRIPTION_KEY , subId ) ; mContext.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }

Target:
private void broadcastDefaultSmsSubIdChanged ( int subId ) { if ( com.android.internal.telephony.SubscriptionController.DBG ) logdl ( ( "[broadcastDefaultSmsSubIdChanged] subId=" + subId ) ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED ) ; intent.addFlags ( ( ( android.content.Intent.FLAG_RECEIVER_REPLACE_PENDING ) | ( android.content.Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND ) ) ) ; intent.putExtra ( PhoneConstants.SUBSCRIPTION_KEY , subId ) ; intent.putExtra ( Intent.EXTRA_SUBSCRIPTION_INDEX , subId ) ; mContext.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }
Source:
public com.android.tv.menu.ItemListRowView.ItemListAdapter.MyViewHolder onCreateViewHolder ( android.view.ViewGroup parent , int viewType ) { android.view.View view = mLayoutInflater.inflate ( getLayoutResId ( viewType ) , parent , false ) ; return new com.android.tv.menu.ItemListRowView.ItemListAdapter.MyViewHolder ( view ) ; }

Target:
public com.android.tv.menu.ItemListRowView.ItemListAdapter.MyViewHolder onCreateViewHolder ( android.view.ViewGroup parent , int viewType ) { int resId = getLayoutResId ( viewType ) ; android.view.View view = com.android.tv.util.ViewCache.getInstance ( ) . getView ( resId ) ; if ( view == null ) { view = mLayoutInflater.inflate ( resId , parent , false ) ; } return new com.android.tv.menu.ItemListRowView.ItemListAdapter.MyViewHolder ( view ) ; }
Source:
public void startLockTaskModeOnCurrent ( ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "startLockTaskModeOnCurrent" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { com.android.server.am.ActivityRecord r = mStackSupervisor.topRunningActivityLocked ( ) ; if ( r != null ) { startLockTaskModeLocked ( r.task ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }

Target:
public boolean moveTopActivityToPinnedStack ( int stackId , android.graphics.Rect bounds ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "moveTopActivityToPinnedStack()" ) ; synchronized ( this ) { if ( ! ( mSupportsPictureInPicture ) ) { throw new java.lang.IllegalStateException ( ( "moveTopActivityToPinnedStack:" + "Device doesn't support picture-in-pciture mode" ) ) ; } long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return mStackSupervisor.moveTopStackActivityToPinnedStackLocked ( stackId , bounds ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }
Source:
private void onServiceBound ( com.android.internal.telecom.ICallScreeningService service ) { mService = service ; try { mService.screenCall ( new com.android.server.telecom.callfiltering.CallScreeningServiceFilter.CallScreeningAdapter ( ) , mParcelableCallUtilsConverter.toParcelableCall ( mCall , false , mPhoneAccountRegistrar ) ) ; } catch ( android.os.RemoteException e ) { com.android.server.telecom.Log.e ( this , e , "Failed to set the call screening adapter." ) ; finishCallScreening ( ) ; } }

Target:
private void onServiceBound ( com.android.internal.telecom.ICallScreeningService service ) { mService = service ; try { mService.screenCall ( new com.android.server.telecom.callfiltering.CallScreeningServiceFilter.CallScreeningAdapter ( ) , mParcelableCallUtilsConverter.toParcelableCall ( mCall , false , mPhoneAccountRegistrar ) ) ; } catch ( android.os.RemoteException e ) { android.telecom.Log.e ( this , e , "Failed to set the call screening adapter." ) ; finishCallScreening ( ) ; } }
Source:
private java.util.ArrayList < android.hardware.Camera.Size > splitSize ( java.lang.String str ) { if ( str == null ) return null ; java.util.StringTokenizer tokenizer = new java.util.StringTokenizer ( str , "," ) ; java.util.ArrayList < android.hardware.Camera.Size > sizeList = new java.util.ArrayList < android.hardware.Camera.Size > ( ) ; while ( tokenizer.hasMoreElements ( ) ) { android.hardware.Camera.Size size = strToSize ( tokenizer.nextToken ( ) ) ; if ( size != null ) sizeList.add ( size ) ; } if ( ( sizeList.size ( ) ) == 0 ) return null ; return sizeList ; }

Target:
public void setWhiteBalance ( java.lang.String value ) { java.lang.String oldValue = get ( android.hardware.Camera.Parameters.KEY_WHITE_BALANCE ) ; if ( same ( value , oldValue ) ) return ; set ( android.hardware.Camera.Parameters.KEY_WHITE_BALANCE , value ) ; set ( android.hardware.Camera.Parameters.KEY_AUTO_WHITEBALANCE_LOCK , android.hardware.Camera.Parameters.FALSE ) ; }
Source:
protected void onStop ( ) { super . onStop ( ) ; com.android.mms.util.DraftCache.getInstance ( ) . removeOnDraftChangedListener ( this ) ; getListView ( ) . setChoiceMode ( ListView.CHOICE_MODE_MULTIPLE_MODAL ) ; android.database.Cursor cursor = mListAdapter.getCursor ( ) ; if ( ( cursor != null ) && ( ! ( cursor.isClosed ( ) ) ) ) { cursor.close ( ) ; } mListAdapter.changeCursor ( null ) ; }

Target:
protected void onStop ( ) { super . onStop ( ) ; stopAsyncQuery ( ) ; com.android.mms.util.DraftCache.getInstance ( ) . removeOnDraftChangedListener ( this ) ; getListView ( ) . setChoiceMode ( ListView.CHOICE_MODE_MULTIPLE_MODAL ) ; android.database.Cursor cursor = mListAdapter.getCursor ( ) ; if ( ( cursor != null ) && ( ! ( cursor.isClosed ( ) ) ) ) { cursor.close ( ) ; } mListAdapter.changeCursor ( null ) ; }
Source:
public void test_handshake_failsWithInvalidSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { cert , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; connection.serverHooks.sctTLSExtension = org.conscrypt.TestUtils.readTestFile ( "ct-signed-timestamp-list-invalid" ) ; try { connection.doHandshake ( ) ; fail ( "SSLHandshakeException not thrown" ) ; } catch ( java.util.concurrent.ExecutionException e ) { assertEquals ( javax.net.ssl.SSLHandshakeException.class , e.getCause ( ) . getClass ( ) ) ; assertEquals ( java.security.cert.CertificateException.class , e.getCause ( ) . getCause ( ) . getClass ( ) ) ; } }

Target:
public void test_handshake_failsWithInvalidSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { cert , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; connection.serverHooks.sctTLSExtension = org.conscrypt.TestUtils.readTestFile ( "ct-signed-timestamp-list-invalid" ) ; connection.doHandshake ( ) ; assertTrue ( ( ( connection.clientException ) instanceof javax.net.ssl.SSLHandshakeException ) ) ; assertTrue ( ( ( connection.clientException.getCause ( ) ) instanceof java.security.cert.CertificateException ) ) ; }
Source:
public java.lang.String getLongDescription ( ) { java.lang.String s = mLongDescription ; if ( ( s != null ) && ( ( s.length ( ) ) != 0 ) ) { return s ; } s = getDescription ( ) ; if ( ( s != null ) && ( ( s.length ( ) ) != 0 ) ) { return s ; } return getShortDescription ( ) ; }

Target:
public java.lang.String getLongDescription ( ) { java.lang.String s = mLongDescription ; if ( ( s != null ) && ( ! ( s.isEmpty ( ) ) ) ) { return s ; } s = getDescription ( ) ; if ( ( s != null ) && ( ! ( s.isEmpty ( ) ) ) ) { return s ; } return getShortDescription ( ) ; }
Source:
public void setKeepUninstalledPackages ( @ android.annotation.NonNull android.content.ComponentName admin , @ android.annotation.NonNull java.util.List < java.lang.String > packageNames ) { throwIfParentInstance ( "setKeepUninstalledPackages" ) ; if ( ( mService ) != null ) { try { mService.setKeepUninstalledPackages ( admin , packageNames ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }

Target:
public void setKeepUninstalledPackages ( @ android.annotation.Nullable android.content.ComponentName admin , @ android.annotation.NonNull java.util.List < java.lang.String > packageNames ) { throwIfParentInstance ( "setKeepUninstalledPackages" ) ; if ( ( mService ) != null ) { try { mService.setKeepUninstalledPackages ( admin , mContext.getPackageName ( ) , packageNames ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
protected void doRevert ( java.io.File toFile , java.io.File backupFile ) throws java.io.IOException { if ( ( ! ( toFile.exists ( ) ) ) || ( isModified ( toFile ) ) ) { com.intellij.updater.Utils.delete ( toFile ) ; com.intellij.updater.Utils.copy ( backupFile , toFile ) ; } }

Target:
protected void doRevert ( java.io.File toFile , java.io.File backupFile ) throws java.io.IOException { if ( ( ( ! ( toFile.exists ( ) ) ) || ( toFile.isDirectory ( ) ) ) || ( isModified ( toFile ) ) ) { com.intellij.updater.Utils.delete ( toFile ) ; com.intellij.updater.Utils.copy ( backupFile , toFile ) ; } }
Source:
public void testManifestPlaceholdersMerge ( ) { com.android.builder.model.ProductFlavor productFlavor = mCustom.mergeOver ( mCustom2 ) ; java.util.Map < java.lang.String , java.lang.String > manifestPlaceholders = productFlavor.getManifestPlaceholders ( ) ; assertEquals ( 3 , manifestPlaceholders.size ( ) ) ; assertEquals ( "oneValue" , manifestPlaceholders.get ( "one" ) ) ; assertEquals ( "twoValue" , manifestPlaceholders.get ( "two" ) ) ; assertEquals ( "threeValue" , manifestPlaceholders.get ( "three" ) ) ; }

Target:
public void testManifestPlaceholdersMerge ( ) { com.android.builder.model.ProductFlavor flavor = com.android.builder.core.DefaultProductFlavor.mergeFlavors ( mCustom2 , mCustom ) ; java.util.Map < java.lang.String , java.lang.String > manifestPlaceholders = flavor.getManifestPlaceholders ( ) ; assertEquals ( 3 , manifestPlaceholders.size ( ) ) ; assertEquals ( "oneValue" , manifestPlaceholders.get ( "one" ) ) ; assertEquals ( "twoValue" , manifestPlaceholders.get ( "two" ) ) ; assertEquals ( "threeValue" , manifestPlaceholders.get ( "three" ) ) ; }
Source:
public boolean updateNetworkAfterDisconnect ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( "Update network after disconnect for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.lastDisconnected = mClock.getWallClockMillis ( ) ; if ( ( config.status ) == ( WifiConfiguration.Status.CURRENT ) ) { setNetworkStatus ( config , WifiConfiguration.Status.ENABLED ) ; } return true ; }

Target:
public boolean updateNetworkAfterDisconnect ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Update network after disconnect for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.lastDisconnected = mClock.getWallClockMillis ( ) ; if ( ( config.status ) == ( WifiConfiguration.Status.CURRENT ) ) { setNetworkStatus ( config , WifiConfiguration.Status.ENABLED ) ; } return true ; }
Source:
public void testInterfaceCountersUdp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1000 , false ) ; }

Target:
public void testAesCbcHmacSha512Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
public void onUserRestrictionsChanged ( int userId , android.os.Bundle newRestrictions , android.os.Bundle prevRestrictions ) { final boolean bluetoothDisallowed = newRestrictions.getBoolean ( UserManager.DISALLOW_BLUETOOTH ) ; if ( ( ( mEnable ) || ( mEnableExternal ) ) && bluetoothDisallowed ) { disable ( true ) ; } }

Target:
public void onUserRestrictionsChanged ( int userId , android.os.Bundle newRestrictions , android.os.Bundle prevRestrictions ) { final boolean bluetoothDisallowed = newRestrictions.getBoolean ( UserManager.DISALLOW_BLUETOOTH ) ; if ( ( ( mEnable ) || ( mEnableExternal ) ) && bluetoothDisallowed ) { try { disable ( "android.os.UserManagerInternal" , true ) ; } catch ( android.os.RemoteException e ) { } } }
Source:
protected static void addSourceLevel ( @ javax.annotation.Nonnull com.android.jack.test.toolchain.SourceLevel level , @ javax.annotation.Nonnull java.util.List < java.lang.String > args ) { args.add ( "-source" ) ; switch ( level ) { case JAVA_6 : args.add ( "1.6" ) ; break ; case JAVA_7 : args.add ( "1.7" ) ; break ; case JAVA_8 : args.add ( "1.8" ) ; break ; default : throw new java.lang.AssertionError ( ( ( "Unkown level: '" + ( level.toString ( ) ) ) + "'" ) ) ; } }

Target:
protected static void addSourceLevel ( @ javax.annotation.Nonnull com.android.jack.test.toolchain.SourceLevel level , @ javax.annotation.Nonnull java.util.List < java.lang.String > commandLine ) { commandLine.add ( "-source" ) ; switch ( level ) { case JAVA_6 : commandLine.add ( "1.6" ) ; break ; case JAVA_7 : commandLine.add ( "1.7" ) ; break ; case JAVA_8 : commandLine.add ( "1.8" ) ; break ; default : throw new java.lang.AssertionError ( ( ( "Unkown level: '" + ( level.toString ( ) ) ) + "'" ) ) ; } }
Source:
public com.google.common.collect.ImmutableMultimap.Builder < K , V > putAll ( K key , java.lang.Iterable < ? extends V > values ) { java.util.Collection < V > valueList = builderMultimap.get ( com.google.common.base.Preconditions.checkNotNull ( key ) ) ; for ( V value : values ) { valueList.add ( com.google.common.base.Preconditions.checkNotNull ( value ) ) ; } return this ; }

Target:
public com.google.common.collect.ImmutableMultimap.Builder < K , V > putAll ( K key , java.lang.Iterable < ? extends V > values ) { if ( key == null ) { throw new java.lang.NullPointerException ( ( "null key in entry: null=" + ( com.google.common.collect.Iterables.toString ( values ) ) ) ) ; } java.util.Collection < V > valueList = builderMultimap.get ( key ) ; for ( V value : values ) { com.google.common.collect.CollectPreconditions.checkEntryNotNull ( key , value ) ; valueList.add ( value ) ; } return this ; }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; return service.getState ( ) ; }

Target:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ; } return service.getState ( ) ; }
Source:
public byte [ ] addCustomExtension ( int ext_type ) { return new byte [ 0 ] ; }

Target:
public void afterHandshake ( long session , long ssl , long context , java.net.Socket socket , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { org.conscrypt.NativeCryptoTest.assertEqualByteArrays ( OCSP_TEST_DATA , org.conscrypt.NativeCrypto.SSL_get_ocsp_response ( ssl ) ) ; super . afterHandshake ( session , ssl , context , socket , fd , callback ) ; }
Source:
private java.util.Properties readInfo ( java.io.File info ) { if ( info.exists ( ) ) { java.util.Properties props = new java.util.Properties ( ) ; java.io.InputStream is = null ; try { is = new java.io.FileInputStream ( info ) ; props.load ( is ) ; return props ; } catch ( java.io.IOException ignore ) { } finally { if ( is != null ) { try { is.close ( ) ; } catch ( java.io.IOException ignore ) { } } } } return null ; }

Target:
private java.util.Properties readInfo ( @ com.android.annotations.NonNull java.io.File info ) { if ( mFileOp.exists ( info ) ) { return mFileOp.loadProperties ( info ) ; } return null ; }
Source:
public void testPinEntryNull ( ) throws java.lang.Exception { java.lang.String entry = null ; try { new org.conscrypt.PinListEntry ( entry , new org.conscrypt.TrustedCertificateStore ( ) ) ; fail ( "Accepted a basically wholly bogus entry." ) ; } catch ( java.lang.NullPointerException expected ) { } }

Target:
public void testHostnameProvided ( ) throws java.lang.Exception { final java.lang.String expectedHostname = "example.com" ; class TestCertPinManager implements org.conscrypt.CertPinManager { public boolean hostnameMatched = false ; @ java.lang.Override public void checkChainPinning ( java.lang.String hostname , java.util.List < java.security.cert.X509Certificate > chain ) throws java.security.cert.CertificateException { hostnameMatched = expectedHostname.equals ( hostname ) ; } } TestCertPinManager manager = new TestCertPinManager ( ) ; callCheckServerTrusted ( expectedHostname , manager ) ; assertTrue ( manager.hostnameMatched ) ; }
Source:
public void handleCreateConnectionComplete ( java.lang.String callId , android.telecom.ConnectionRequest request , android.telecom.ParcelableConnection connection ) { com.android.server.telecom.Log.startSession ( "CSW.hCCC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "handleCreateConnectionComplete %s" , callId ) ; this . handleCreateConnectionComplete ( callId , request , connection ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void handleCreateConnectionComplete ( java.lang.String callId , android.telecom.ConnectionRequest request , android.telecom.ParcelableConnection connection ) { android.telecom.Log.startSession ( "CSW.hCCC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "handleCreateConnectionComplete %s" , callId ) ; this . handleCreateConnectionComplete ( callId , request , connection ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public < T > T [ ] toArray ( T [ ] other ) { if ( ( other.length ) < ( size ) ) { other = com.google.common.collect.ObjectArrays.newArray ( other , size ) ; } else if ( ( other.length ) > ( size ) ) { other [ size ] = null ; } java.lang.System.arraycopy ( array , offset , other , 0 , size ) ; return other ; }

Target:
public int indexOf ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object == null ) { return - 1 ; } for ( int i = 0 ; i < ( size ) ; i ++ ) { if ( array [ ( ( offset ) + i ) ] . equals ( object ) ) { return i ; } } return - 1 ; }
Source:
public void visitAnySwitchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.SwitchInstruction switchInstruction ) { switchInstruction.defaultOffset = newBranchOffset ( offset , switchInstruction.defaultOffset ) ; updateJumpOffsets ( offset , switchInstruction.jumpOffsets ) ; }

Target:
public void visitAnySwitchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.SwitchInstruction switchInstruction ) { try { switchInstruction.defaultOffset = newBranchOffset ( offset , switchInstruction.defaultOffset ) ; updateJumpOffsets ( offset , switchInstruction.jumpOffsets ) ; oldInstructionOffsets [ offset ] = - 1 ; } catch ( java.lang.IllegalArgumentException e ) { if ( ( ( level ) == 0 ) || ( ! ( allowExternalBranchTargets ) ) ) { throw e ; } } }
Source:
public void dispose ( ) throws android.telephony.mbms.MbmsException { try { mService.disposeStream ( mAppName , mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , ( "Caught remote exception calling disposeStream: " + e ) ) ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_UNKNOWN_REMOTE_EXCEPTION ) ; } }

Target:
public void dispose ( ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new java.lang.IllegalStateException ( "No streaming service attached" ) ; } try { mService.disposeStream ( mAppName , mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.DeadObjectException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , "Remote process died" ) ; mService = null ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_SERVICE_LOST ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , ( "Caught remote exception calling dispose: " + e ) ) ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_UNKNOWN_REMOTE_EXCEPTION ) ; } }
Source:
public static java.lang.String getAndroidName ( int api ) { java.lang.String codeName = com.android.sdklib.SdkVersionInfo.getCodeName ( api ) ; return codeName == null ? java.lang.String.format ( "API %1$d: Android %2$s" , api , com.android.sdklib.SdkVersionInfo.getVersionString ( api ) ) : java.lang.String.format ( "API %1$d: Android %2$s (%3$s)" , api , com.android.sdklib.SdkVersionInfo.getVersionString ( api ) , codeName ) ; }

Target:
public static java.lang.String getAndroidName ( int api ) { java.lang.String codeName = com.android.sdklib.SdkVersionInfo.getCodeName ( api ) ; java.lang.String name = com.android.sdklib.SdkVersionInfo.getVersionString ( api ) ; if ( name == null ) { return java.lang.String.format ( "API %1$d" , api ) ; } else if ( codeName == null ) { return java.lang.String.format ( "API %1$d: Android %2$s" , api , name ) ; } else { return java.lang.String.format ( "API %1$d: Android %2$s (%3$s)" , api , name , codeName ) ; } }
Source:
public void testSendSms ( ) { doReturn ( mServiceState ) . when ( mPhone ) . getServiceState ( ) ; mCdmaSmsDispatcher.sendSms ( mSmsTracker ) ; verify ( mSimulatedCommandsVerifier ) . sendCdmaSms ( any ( byte [ ] . class ) , any ( android.os.Message.class ) ) ; }

Target:
public void testSendSms ( ) { doReturn ( mServiceState ) . when ( mPhone ) . getServiceState ( ) ; mCdmaSmsDispatcher.sendSms ( mSmsTracker ) ; verify ( mSimulatedCommandsVerifier ) . sendCdmaSms ( nullable ( byte [ ] . class ) , any ( android.os.Message.class ) ) ; }
Source:
public void test_Inserted_Entry_Manifest_with_DigestCode ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Inserted_Entry_Manifest_with_DigestCode.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_Modified_Manifest_EntryAttributes ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_Manifest_EntryAttributes.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 ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; try { jarFile.getInputStream ( zipEntry ) ; fail ( "should throw Security Exception" ) ; } catch ( java.lang.SecurityException e ) { } } } }
Source:
public java.lang.String performSanityCheck ( com.intellij.openapi.project.Project project , java.lang.String cloudProjectId ) { com.google.api.services.storage.model.Buckets buckets = null ; java.lang.String message = null ; try { com.google.api.services.storage.Storage.Buckets.List listBuckets = com.google.gct.testing.launcher.CloudAuthenticator.getStorage ( ) . buckets ( ) . list ( cloudProjectId ) ; buckets = listBuckets.execute ( ) ; } catch ( java.lang.Throwable t ) { message = t.getMessage ( ) ; } finally { if ( buckets == null ) { return "Failed to authorize to Google Cloud project, message= " + message ; } } return null ; }

Target:
public java.lang.String performSanityCheck ( com.intellij.openapi.project.Project project , java.lang.String cloudProjectId ) { com.google.api.services.storage.model.Buckets buckets = null ; java.lang.String message = null ; try { com.google.api.services.storage.Storage.Buckets.List listBuckets = com.google.gct.testing.launcher.CloudAuthenticator.getStorage ( ) . buckets ( ) . list ( cloudProjectId ) ; buckets = listBuckets.execute ( ) ; } catch ( java.lang.Throwable t ) { message = t.getMessage ( ) ; } finally { if ( buckets == null ) { return ( "Failed to authorize to Google Cloud project! Please select a project you are authorized to use.\n" + "Exception while performing a pre-trigger sanity check\n\n" ) + message ; } } return null ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; pRS.setMessageHandler ( mRsMessage ) ; com.android.rs.test.ScriptC_refcount s = new com.android.rs.test.ScriptC_refcount ( pRS ) ; initializeGlobals ( pRS , s ) ; s.invoke_refcount_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; pRS.setMessageHandler ( mRsMessage ) ; com.android.rs.test.ScriptC_refcount s = new com.android.rs.test.ScriptC_refcount ( pRS ) ; initializeGlobals ( pRS , s ) ; s.invoke_refcount_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; mA.destroy ( ) ; mT.destroy ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public void controlResized ( org.eclipse.swt.events.ControlEvent e ) { org.eclipse.swt.graphics.Rectangle r = scrolledComposite.getClientArea ( ) ; org.eclipse.swt.widgets.Control content = scrolledComposite.getContent ( ) ; if ( ( content != null ) && ( r != null ) ) { org.eclipse.swt.graphics.Point minSize = content.computeSize ( r.width , SWT.DEFAULT ) ; scrolledComposite.setMinSize ( minSize ) ; } }

Target:
public void controlResized ( org.eclipse.swt.events.ControlEvent e ) { org.eclipse.swt.graphics.Rectangle r = scrolledComposite.getClientArea ( ) ; org.eclipse.swt.widgets.Control content = scrolledComposite.getContent ( ) ; if ( ( content != null ) && ( r != null ) ) { org.eclipse.swt.graphics.Point minSize = content.computeSize ( r.width , SWT.DEFAULT ) ; scrolledComposite.setMinSize ( minSize ) ; org.eclipse.swt.widgets.ScrollBar vBar = scrolledComposite.getVerticalBar ( ) ; vBar.setPageIncrement ( r.height ) ; } }
Source:
private void notifySelectionChanged ( com.android.ddmlib.IDevice device , com.android.hierarchyviewerlib.device.Window window ) { com.android.hierarchyviewerlib.models.DeviceSelectionModel.WindowChangeListener [ ] listeners = getWindowChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . selectionChanged ( device , window ) ; } } }

Target:
private void notifySelectionChanged ( com.android.ddmlib.IDevice device , com.android.hierarchyviewerlib.device.Window window ) { com.android.hierarchyviewerlib.models.DeviceSelectionModel.IWindowChangeListener [ ] listeners = getWindowChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . selectionChanged ( device , window ) ; } } }