auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testDefaultNetworkIsTracked ( ) throws java.lang.Exception { org.junit.Assert.assertEquals ( 0 , mCM.trackingDefault.size ( ) ) ; mUNM.start ( ) ; org.junit.Assert.assertEquals ( 1 , mCM.trackingDefault.size ( ) ) ; mUNM.stop ( ) ; org.junit.Assert.assertTrue ( mCM.isEmpty ( ) ) ; }

Target:
public void testDefaultNetworkIsTracked ( ) throws java.lang.Exception { org.junit.Assert.assertEquals ( 0 , mCM.trackingDefault.size ( ) ) ; mUNM.start ( ) ; org.junit.Assert.assertEquals ( 1 , mCM.trackingDefault.size ( ) ) ; mUNM.stop ( ) ; org.junit.Assert.assertTrue ( mCM.hasNoCallbacks ( ) ) ; }
Source:
public void testDisableAllBrowsers ( ) { android.content.pm.PackageManager pm = ( ( android.content.pm.PackageManager ) ( getContext ( ) . getPackageManager ( ) ) ) ; android.app.admin.DevicePolicyManager dpm = ( ( android.app.admin.DevicePolicyManager ) ( getContext ( ) . getSystemService ( Context.DEVICE_POLICY_SERVICE ) ) ) ; android.content.Intent webIntent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ; webIntent.setData ( android.net.Uri.parse ( "http://com.android.cts.intent.receiver" ) ) ; java.util.List < android.content.pm.ResolveInfo > ris = pm.queryIntentActivities ( webIntent , 0 ) ; for ( android.content.pm.ResolveInfo ri : ris ) { android.util.Log.d ( com.android.cts.managedprofile.CrossProfileUtils.TAG , ( "Hiding " + ( ri.activityInfo.packageName ) ) ) ; dpm.setApplicationHidden ( com.android.cts.managedprofile.BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT , ri.activityInfo.packageName , true ) ; } }

Target:
public void testDisableAllBrowsers ( ) { android.content.pm.PackageManager pm = ( ( android.content.pm.PackageManager ) ( getContext ( ) . getPackageManager ( ) ) ) ; android.app.admin.DevicePolicyManager dpm = ( ( android.app.admin.DevicePolicyManager ) ( getContext ( ) . getSystemService ( Context.DEVICE_POLICY_SERVICE ) ) ) ; android.content.Intent webIntent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ; webIntent.setData ( android.net.Uri.parse ( "http://com.android.cts.intent.receiver" ) ) ; java.util.List < android.content.pm.ResolveInfo > ris = pm.queryIntentActivities ( webIntent , PackageManager.MATCH_ALL ) ; for ( android.content.pm.ResolveInfo ri : ris ) { android.util.Log.d ( com.android.cts.managedprofile.CrossProfileUtils.TAG , ( "Hiding " + ( ri.activityInfo.packageName ) ) ) ; dpm.setApplicationHidden ( com.android.cts.managedprofile.BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT , ri.activityInfo.packageName , true ) ; } }
Source:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.nan.WifiNanManager.DataPathRole int role , int peerId , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiNanManager" ) ; return null ; } return mgr.createNetworkSpecifier ( mClientId , role , mSessionId , peerId , token ) ; } }

Target:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.nan.WifiNanManager.DataPathRole int role , java.lang.Object peerHandle , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiNanManager" ) ; return null ; } return mgr.createNetworkSpecifier ( mClientId , role , mSessionId , peerHandle , token ) ; } }
Source:
private static android.net.wifi.hotspot2.pps.Credential createCredentialWithUserCredential ( ) { android.net.wifi.hotspot2.pps.Credential.UserCredential userCred = new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ; userCred.username = "username" ; userCred.password = "password" ; userCred.eapType = 1 ; userCred.nonEapInnerMethod = "MS-CHAP" ; return android.net.wifi.hotspot2.pps.CredentialTest.createCredential ( userCred , null , null , FakeKeys.CA_CERT0 , new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } , FakeKeys.RSA_KEY1 ) ; }

Target:
private static android.net.wifi.hotspot2.pps.Credential createCredentialWithUserCredential ( ) { android.net.wifi.hotspot2.pps.Credential.UserCredential userCred = new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ; userCred.username = "username" ; userCred.password = "password" ; userCred.eapType = android.net.wifi.EAPConstants.EAP_TTLS ; userCred.nonEapInnerMethod = "MS-CHAP" ; return android.net.wifi.hotspot2.pps.CredentialTest.createCredential ( userCred , null , null , FakeKeys.CA_CERT0 , new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } , FakeKeys.RSA_KEY1 ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { org.chromium.base.PowerMonitor.onBatteryChargingChanged ( intent ) ; }

Target:
public void onApplicationStateChange ( int newState ) { if ( newState == ( ApplicationState.HAS_RUNNING_ACTIVITIES ) ) { mHandler.removeCallbacks ( org.chromium.base.PowerMonitor.sSuspendTask ) ; org.chromium.base.PowerMonitor.nativeOnMainActivityResumed ( ) ; } else if ( newState == ( ApplicationState.HAS_PAUSED_ACTIVITIES ) ) { mHandler.postDelayed ( org.chromium.base.PowerMonitor.sSuspendTask , org.chromium.base.PowerMonitor.SUSPEND_DELAY_MS ) ; } }
Source:
public boolean enterIf ( com.google.common.util.concurrent.Monitor.Guard guard , long time , java.util.concurrent.TimeUnit unit ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( enter ( time , unit ) ) ) { return false ; } boolean satisfied = false ; try { satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } return satisfied ; }

Target:
public boolean enterIfInterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard ) throws java.lang.InterruptedException { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; boolean satisfied = false ; try { return satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } }
Source:
public static java.net.URL getResource ( java.lang.String resourceName ) { java.net.URL url = com.google.common.io.Resources.class . getClassLoader ( ) . getResource ( resourceName ) ; com.google.common.base.Preconditions.checkArgument ( ( url != null ) , "resource %s not found." , resourceName ) ; return url ; }

Target:
public static java.net.URL getResource ( java.lang.String resourceName ) { java.lang.ClassLoader loader = com.google.common.base.MoreObjects.firstNonNull ( java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , com.google.common.io.Resources.class . getClassLoader ( ) ) ; java.net.URL url = loader.getResource ( resourceName ) ; com.google.common.base.Preconditions.checkArgument ( ( url != null ) , "resource %s not found." , resourceName ) ; return url ; }
Source:
public void destroy ( ) { validate ( ) ; nContextFinish ( ) ; nContextDeinitToClient ( mContext ) ; mMessageThread.mRun = false ; try { mMessageThread.join ( ) ; } catch ( java.lang.InterruptedException e ) { } nContextDestroy ( ) ; nDeviceDestroy ( mDev ) ; mDev = 0 ; }

Target:
public void destroy ( ) { validate ( ) ; nContextFinish ( ) ; if ( ( mIncCon ) != 0 ) { nIncContextFinish ( ) ; nIncContextDestroy ( ) ; mIncCon = 0 ; } nContextDeinitToClient ( mContext ) ; mMessageThread.mRun = false ; try { mMessageThread.join ( ) ; } catch ( java.lang.InterruptedException e ) { } nContextDestroy ( ) ; nDeviceDestroy ( mDev ) ; if ( ( mIncDev ) != 0 ) { nIncDeviceDestroy ( mIncDev ) ; mIncDev = 0 ; } mDev = 0 ; }
Source:
public void testGetSize ( ) { java.util.Locale.setDefault ( java.util.Locale.ENGLISH ) ; android.view.View view = new android.view.View ( getContext ( ) ) ; assertTrue ( ( ( android.text.AutoText.getSize ( view ) ) > 0 ) ) ; }

Target:
public void testGetSize ( ) { java.util.Locale.setDefault ( java.util.Locale.ENGLISH ) ; android.content.res.Configuration config = getContext ( ) . getResources ( ) . getConfiguration ( ) ; if ( ! ( config.locale.equals ( java.util.Locale.getDefault ( ) ) ) ) { config.locale = java.util.Locale.getDefault ( ) ; getContext ( ) . getResources ( ) . updateConfiguration ( config , null ) ; } android.view.View view = new android.view.View ( getContext ( ) ) ; assertTrue ( ( ( android.text.AutoText.getSize ( view ) ) > 0 ) ) ; }
Source:
protected void onOverScrolled ( int scrollX , int scrollY , boolean clampedX , boolean clampedY ) { if ( ! ( mScroller.isFinished ( ) ) ) { mScrollX = scrollX ; mScrollY = scrollY ; if ( clampedX ) { mScroller.springBack ( mScrollX , mScrollY , 0 , getScrollRange ( ) , 0 , 0 ) ; } } else { super . scrollTo ( scrollX , scrollY ) ; } awakenScrollBars ( ) ; }

Target:
protected void onOverScrolled ( int scrollX , int scrollY , boolean clampedX , boolean clampedY ) { if ( ! ( mScroller.isFinished ( ) ) ) { mScrollX = scrollX ; mScrollY = scrollY ; invalidateParentIfNeeded ( ) ; if ( clampedX ) { mScroller.springBack ( mScrollX , mScrollY , 0 , getScrollRange ( ) , 0 , 0 ) ; } } else { super . scrollTo ( scrollX , scrollY ) ; } awakenScrollBars ( ) ; }
Source:
private com.android.resources.ResourceType getType ( org.w3c.dom.Node node ) { java.lang.String nodeName = node.getLocalName ( ) ; java.lang.String typeString = null ; if ( com.android.builder.resources.ValueResourceParser.NODE_ITEM.equals ( nodeName ) ) { org.w3c.dom.Attr attribute = ( ( org.w3c.dom.Attr ) ( node.getAttributes ( ) . getNamedItemNS ( null , com.android.builder.resources.ValueResourceParser.ATTR_TYPE ) ) ) ; if ( attribute != null ) { typeString = attribute.getValue ( ) ; } } else { typeString = nodeName ; } if ( typeString != null ) { return com.android.resources.ResourceType.getEnum ( typeString ) ; } return null ; }

Target:
private com.android.resources.ResourceType getType ( org.w3c.dom.Node node ) { java.lang.String nodeName = node.getLocalName ( ) ; java.lang.String typeString = null ; if ( com.android.SdkConstants.TAG_ITEM.equals ( nodeName ) ) { org.w3c.dom.Attr attribute = ( ( org.w3c.dom.Attr ) ( node.getAttributes ( ) . getNamedItemNS ( null , com.android.SdkConstants.ATTR_TYPE ) ) ) ; if ( attribute != null ) { typeString = attribute.getValue ( ) ; } } else { typeString = nodeName ; } if ( typeString != null ) { return com.android.resources.ResourceType.getEnum ( typeString ) ; } return null ; }
Source:
void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection ) { android.telecom.Log.v ( this , "addExistingConnection: %s" , callId ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.addExistingConnection ( callId , connection ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void setConferenceableConnections ( java.lang.String callId , java.util.List < java.lang.String > conferenceableCallIds ) { android.telecom.Log.v ( this , "setConferenceableConnections: %s, %s" , callId , conferenceableCallIds ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.setConferenceableConnections ( callId , conferenceableCallIds , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public void test_SSL_check_private_key_key_then_cert ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getPkeyContext ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }

Target:
public void test_SSL_check_private_key_key_then_cert ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getNativeRef ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }
Source:
private final void doFinishedKeyLocked ( boolean doRecycle ) { if ( ( mLastWin ) != null ) { releasePendingPointerLocked ( mLastWin.mSession ) ; releasePendingTrackballLocked ( mLastWin.mSession ) ; } if ( ( ( ( mLastWin ) == null ) || ( ! ( mLastWin.mToken.paused ) ) ) || ( ! ( mLastWin.isVisibleLw ( ) ) ) ) { mLastWin = null ; mLastBinder = null ; } mFinished = true ; notifyAll ( ) ; }

Target:
private final void doFinishedKeyLocked ( boolean force ) { if ( ( mLastWin ) != null ) { releasePendingPointerLocked ( mLastWin.mSession ) ; releasePendingTrackballLocked ( mLastWin.mSession ) ; } if ( ( ( force || ( ( mLastWin ) == null ) ) || ( ! ( mLastWin.mToken.paused ) ) ) || ( ! ( mLastWin.isVisibleLw ( ) ) ) ) { mLastWin = null ; mLastBinder = null ; } mFinished = true ; notifyAll ( ) ; }
Source:
private static < T > com.android.build.gradle.tasks.Set < T > removeAllNullEntries ( com.android.build.gradle.tasks.Set < T > input ) { com.android.build.gradle.tasks.HashSet < T > output = new com.android.build.gradle.tasks.HashSet < T > ( ) ; for ( T element : input ) { if ( element != null ) { output.add ( element ) ; } } return output ; }

Target:
public java.util.Collection < java.lang.String > call ( ) throws java.lang.Exception { java.util.Collection < java.lang.String > resConfigs = config.getMergedFlavor ( ) . getResourceConfigurations ( ) ; if ( ( ( resConfigs.size ( ) ) == 1 ) && ( com.google.common.collect.Iterators.getOnlyElement ( resConfigs.iterator ( ) ) . equals ( "auto" ) ) ) { return variantData.discoverListOfResourceConfigs ( ) ; } return config.getMergedFlavor ( ) . getResourceConfigurations ( ) ; }
Source:
private java.io.File createDex ( vogar.Action action , java.io.File actionJar ) { java.io.File dex = run.localFile ( action , "classes.dex" ) ; vogar.Classpath classesToDex = vogar.Classpath.of ( actionJar ) ; classesToDex.addAll ( run.classpath ) ; if ( run.useJack ) { throw new java.lang.UnsupportedOperationException ( "Jack support for --mode=activity not yet implemented" ) ; } run.androidSdk.dex ( dex , classesToDex ) ; return dex ; }

Target:
private java.io.File createDex ( vogar.Action action , java.io.File actionJar ) { java.io.File dex = run.localFile ( action , "classes.dex" ) ; vogar.Classpath classesToDex = vogar.Classpath.of ( actionJar ) ; classesToDex.addAll ( run.classpath ) ; if ( run.useJack ) { throw new java.lang.UnsupportedOperationException ( "Jack support for --mode=activity not yet implemented" ) ; } run.androidSdk.dex ( run.multidex , dex , classesToDex ) ; return dex ; }
Source:
public static java.lang.String externalMethodArguments ( java.lang.String internalMethodDescriptor ) { java.lang.StringBuffer externalMethodNameAndArguments = new java.lang.StringBuffer ( ) ; proguard.classfile.util.InternalTypeEnumeration internalTypeEnumeration = new proguard.classfile.util.InternalTypeEnumeration ( internalMethodDescriptor ) ; while ( internalTypeEnumeration.hasMoreTypes ( ) ) { externalMethodNameAndArguments.append ( proguard.classfile.util.ClassUtil.externalType ( internalTypeEnumeration.nextType ( ) ) ) ; if ( internalTypeEnumeration.hasMoreTypes ( ) ) { externalMethodNameAndArguments.append ( ClassConstants.EXTERNAL_METHOD_ARGUMENTS_SEPARATOR ) ; } } return externalMethodNameAndArguments.toString ( ) ; }

Target:
public static java.lang.String externalMethodArguments ( java.lang.String internalMethodDescriptor ) { java.lang.StringBuffer externalMethodNameAndArguments = new java.lang.StringBuffer ( ) ; proguard.classfile.util.InternalTypeEnumeration internalTypeEnumeration = new proguard.classfile.util.InternalTypeEnumeration ( internalMethodDescriptor ) ; while ( internalTypeEnumeration.hasMoreTypes ( ) ) { externalMethodNameAndArguments.append ( proguard.classfile.util.ClassUtil.externalType ( internalTypeEnumeration.nextType ( ) ) ) ; if ( internalTypeEnumeration.hasMoreTypes ( ) ) { externalMethodNameAndArguments.append ( JavaConstants.METHOD_ARGUMENTS_SEPARATOR ) ; } } return externalMethodNameAndArguments.toString ( ) ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_kernel2d_oldstyle s = new com.android.rs.test.ScriptC_kernel2d_oldstyle ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_init_vars ( A ) ; s.forEach_xform ( A , B ) ; s.invoke_verify_xform ( ) ; s.invoke_kernel_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_kernel2d_oldstyle s = new com.android.rs.test.ScriptC_kernel2d_oldstyle ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_init_vars ( A ) ; s.forEach_xform ( A , B ) ; s.invoke_verify_xform ( ) ; s.invoke_kernel_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
public char getSeparator ( ) { return java.io.File.separatorChar ; }

Target:
public com.android.sched.vfs.InputVDir getInputVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotFileOrDirectoryException { java.io.File file = new java.io.File ( dir , path.getPathAsString ( java.io.File.separatorChar ) ) ; if ( ! ( file.exists ( ) ) ) { throw new com.android.sched.util.file.NoSuchFileException ( new com.android.sched.util.location.FileLocation ( file ) ) ; } if ( file.isFile ( ) ) { throw new com.android.sched.util.file.NotFileOrDirectoryException ( new com.android.sched.util.location.FileLocation ( file ) ) ; } return new com.android.sched.vfs.DirectDir ( file , vfs ) ; }
Source:
public boolean removeTask ( int taskId ) { synchronized ( this ) { enforceCallingPermission ( android.Manifest.permission.REMOVE_TASKS , "removeTask()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return removeTaskByIdLocked ( taskId , true ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }

Target:
public void resizeDockedStack ( android.graphics.Rect dockedBounds , android.graphics.Rect tempDockedTaskBounds , android.graphics.Rect tempDockedTaskInsetBounds , android.graphics.Rect tempOtherTaskBounds , android.graphics.Rect tempOtherTaskInsetBounds ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "resizeDockedStack()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { mStackSupervisor.resizeDockedStackLocked ( dockedBounds , tempDockedTaskBounds , tempDockedTaskInsetBounds , tempOtherTaskBounds , tempOtherTaskInsetBounds , com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0004.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JNewInstance jNewInstance = ( ( com.android.jack.ir.ast.JNewInstance ) ( node ) ) ; receiverType = com.android.jack.jayce.v0004.io.ImportHelper.getSignatureName ( jNewInstance.getReceiverType ( ) ) ; methodArgsType = com.android.jack.jayce.v0004.io.ImportHelper.getMethodArgsSignature ( jNewInstance.getMethodId ( ) ) ; args = loader.load ( com.android.jack.jayce.v0004.nodes.NExpression.class , jNewInstance.getArgs ( ) ) ; sourceInfo = jNewInstance.getSourceInfo ( ) ; }

Target:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0004.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JNewInstance jNewInstance = ( ( com.android.jack.ir.ast.JNewInstance ) ( node ) ) ; receiverType = com.android.jack.jayce.v0004.io.ImportHelper.getSignatureName ( jNewInstance.getReceiverType ( ) ) ; methodArgsType = com.android.jack.jayce.v0004.io.ImportHelper.getMethodArgsSignature ( jNewInstance.getMethodIdWide ( ) ) ; args = loader.load ( com.android.jack.jayce.v0004.nodes.NExpression.class , jNewInstance.getArgs ( ) ) ; sourceInfo = jNewInstance.getSourceInfo ( ) ; }
Source:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_DPAD_LEFT : if ( movePrevious ( ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_LEFT ) ; return true ; } break ; case android.view.KeyEvent.KEYCODE_DPAD_RIGHT : if ( moveNext ( ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_RIGHT ) ; return true ; } break ; case android.view.KeyEvent.KEYCODE_DPAD_CENTER : case android.view.KeyEvent.KEYCODE_ENTER : mReceivedInvokeKeyDown = true ; } return super . onKeyDown ( keyCode , event ) ; }

Target:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_DPAD_LEFT : if ( moveDirection ( ( - 1 ) ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_LEFT ) ; return true ; } break ; case android.view.KeyEvent.KEYCODE_DPAD_RIGHT : if ( moveDirection ( 1 ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_RIGHT ) ; return true ; } break ; case android.view.KeyEvent.KEYCODE_DPAD_CENTER : case android.view.KeyEvent.KEYCODE_ENTER : mReceivedInvokeKeyDown = true ; } return super . onKeyDown ( keyCode , event ) ; }
Source:
public boolean setNetworkPriority ( android.net.wifi.WifiConfiguration config , int priority ) { if ( config == null ) { return false ; } if ( mVerboseLoggingEnabled ) localLog ( ( "setNetworkPriority: " + ( config.networkId ) ) ) ; if ( ! ( mWifiNative.setNetworkVariable ( config.networkId , WifiConfiguration.priorityVarName , java.lang.Integer.toString ( priority ) ) ) ) { loge ( ( "Set priority of network in wpa_supplicant failed on " + ( config.networkId ) ) ) ; return false ; } config.priority = priority ; return true ; }

Target:
public int getFrameworkNetworkId ( int supplicantNetworkId ) { if ( ( mSupplicantNetworkId ) == supplicantNetworkId ) { return mFrameworkNetworkId ; } else { android.util.Log.e ( com.android.server.wifi.WifiSupplicantControl.TAG , ( ( ( "Unknown wpa_supplicant network ID " + supplicantNetworkId ) + " Current wpa_supplicant network ID " ) + ( mSupplicantNetworkId ) ) ) ; return android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ; } }
Source:
void set ( android.icu.text.PluralRules.StandardPluralCategories start , android.icu.text.PluralRules.StandardPluralCategories end , android.icu.text.PluralRules.StandardPluralCategories result ) { data [ ( ( ( start.ordinal ( ) ) * ( android.icu.text.PluralRules.StandardPluralCategories.COUNT ) ) + ( end.ordinal ( ) ) ) ] = ( result == null ) ? ( ( byte ) ( - 1 ) ) : ( ( byte ) ( result.ordinal ( ) ) ) ; }

Target:
void set ( android.icu.impl.StandardPlural start , android.icu.impl.StandardPlural end , android.icu.impl.StandardPlural result ) { data [ ( ( ( start.ordinal ( ) ) * ( android.icu.impl.StandardPlural.COUNT ) ) + ( end.ordinal ( ) ) ) ] = ( result == null ) ? ( ( byte ) ( - 1 ) ) : ( ( byte ) ( result.ordinal ( ) ) ) ; }
Source:
native void socketShutdown ( int howto ) throws java.io.IOException ;

Target:
private java.io.FileDescriptor getMarkerFD ( ) throws java.net.SocketException { java.io.FileDescriptor fd1 = new java.io.FileDescriptor ( ) ; java.io.FileDescriptor fd2 = new java.io.FileDescriptor ( ) ; try { Libcore.os.socketpair ( android.system.OsConstants.AF_UNIX , android.system.OsConstants.SOCK_STREAM , 0 , fd1 , fd2 ) ; Libcore.os.shutdown ( fd1 , android.system.OsConstants.SHUT_RDWR ) ; Libcore.os.close ( fd2 ) ; } catch ( android.system.ErrnoException errnoException ) { return null ; } return fd1 ; }
Source:
public java.lang.Object call ( ) throws java.lang.Exception { com.android.builder.resources.AssetFile assetFile = item.getSource ( ) ; java.io.File file = assetFile.getFile ( ) ; java.lang.String filename = file.getName ( ) ; java.io.File outFile = new java.io.File ( rootFolder , filename ) ; com.google.common.io.Files.copy ( file , outFile ) ; return null ; }

Target:
public java.lang.Object call ( ) throws java.lang.Exception { com.android.builder.resources.AssetFile assetFile = item.getSource ( ) ; java.io.File fromFile = assetFile.getFile ( ) ; java.io.File toFile = new java.io.File ( rootFolder , item.getKey ( ) . replace ( '/' , java.io.File.separatorChar ) ) ; toFile.getParentFile ( ) . mkdirs ( ) ; com.google.common.io.Files.copy ( fromFile , toFile ) ; return null ; }
Source:
public void run ( ) { boolean loggedIn = state.logInWithLocalServer ( message ) ; if ( loggedIn ) { com.google.gct.login.IGoogleLoginUpdateUser callback = new com.google.gct.login.IGoogleLoginUpdateUser ( ) { @ java.lang.Override public void updateUser ( ) { uiFacade.notifyStatusIndicator ( ) ; } } ; users.addUser ( new com.google.gct.login.CredentialedUser ( state , callback ) ) ; } }

Target:
public void run ( ) { boolean loggedIn = state.logInWithLocalServer ( message ) ; if ( loggedIn ) { com.google.gct.login.IGoogleLoginCompletedCallback localCallback = new com.google.gct.login.IGoogleLoginCompletedCallback ( ) { @ java.lang.Override public void onLoginCompleted ( ) { uiFacade.notifyStatusIndicator ( ) ; if ( callback != null ) { callback.onLoginCompleted ( ) ; } } } ; users.addUser ( new com.google.gct.login.CredentialedUser ( state , localCallback ) ) ; } }
Source:
public java.lang.String getIccSimChallengeResponse ( int appType , java.lang.String data ) { return getIccSimChallengeResponse ( android.telephony.TelephonyManager.getDefaultSubscription ( ) , appType , data ) ; }

Target:
public java.lang.String getIccAuthentication ( int subId , int appType , int authType , java.lang.String data ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIccSimChallengeResponse ( subId , appType , authType , data ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
public com.ibm.icu.impl.Relation < K , V > addAllInverted ( java.util.Map < V , K > source ) { for ( V value : source.keySet ( ) ) { put ( source.get ( value ) , value ) ; } return this ; }

Target:
public com.ibm.icu.impl.Relation < K , V > addAllInverted ( java.util.Map < V , K > source ) { for ( java.util.Map.Entry < V , K > entry : source.entrySet ( ) ) { put ( entry.getValue ( ) , entry.getKey ( ) ) ; } return this ; }
Source:
public void testKeyguardHidesActivity ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } launchActivity ( "TestActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "TestActivity" } ) ; mAmWmState.assertVisibility ( "TestActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; assertShowingAndNotOccluded ( ) ; mAmWmState.assertVisibility ( "TestActivity" , false ) ; unlockDevice ( ) ; }

Target:
public void testKeyguardHidesActivity ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } launchActivity ( "TestActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "TestActivity" } ) ; mAmWmState.assertVisibility ( "TestActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; assertShowingAndNotOccluded ( ) ; mAmWmState.assertVisibility ( "TestActivity" , false ) ; unlockDevice ( ) ; }
Source:
final void get ( float [ ] dst , int dstOffset , int floatCount ) { int byteCount = checkGetBounds ( SizeOf.FLOAT , dst.length , dstOffset , floatCount ) ; this . block.peekFloatArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , floatCount , order.needsSwap ) ; position += byteCount ; }

Target:
public java.nio.ByteBuffer slice ( ) { return new java.nio.DirectByteBuffer ( block , remaining ( ) , ( ( offset ) + ( position ) ) , isReadOnly , mapMode ) ; }
Source:
com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoAt ( int x , int y ) { if ( ( mLastValidViewInfoRoot ) == null ) { return null ; } else { return findViewInfoAt ( x , y , mLastValidViewInfoRoot ) ; } }

Target:
private com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoAt_Recursive ( int x , int y , com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo canvasViewInfo ) { if ( canvasViewInfo == null ) { return null ; } org.eclipse.swt.graphics.Rectangle r = canvasViewInfo.getSelectionRect ( ) ; if ( r.contains ( x , y ) ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo child : canvasViewInfo.getChildren ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo v = findViewInfoAt_Recursive ( x , y , child ) ; if ( v != null ) { return v ; } } return canvasViewInfo ; } return null ; }
Source:
public void trackingEnabled_packageUpdate_badUpdateAppManifestEntry ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureValidApplications ( ) ; mPackageTracker.start ( ) ; checkIntentHelperInitializedAndReliabilityTrackingEnabled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; com.android.server.timezone.PackageVersions packageVersions = new com.android.server.timezone.PackageVersions ( 2 , 3 ) ; configureUpdateAppManifestBad ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME ) ; configureDataAppManifestOk ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME ) ; configureUpdateAppPackageVersion ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME , packageVersions.mUpdateAppVersion ) ; configureDataAppPackageVersion ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME , packageVersions.mDataAppVersion ) ; mFakeIntentHelper.simulatePackageUpdatedEvent ( ) ; mFakeIntentHelper.assertUpdateNotTriggered ( ) ; mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; }

Target:
public void trackingEnabled_packageUpdate_badUpdateAppManifestEntry ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureValidApplications ( ) ; mPackageTracker.start ( ) ; checkIntentHelperInitializedAndReliabilityTrackingEnabled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; com.android.server.timezone.PackageVersions packageVersions = new com.android.server.timezone.PackageVersions ( 2 , 3 ) ; configureUpdateAppManifestBad ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME ) ; configureDataAppManifestOk ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME ) ; configureUpdateAppPackageVersion ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME , packageVersions.mUpdateAppVersion ) ; configureDataAppPackageVersion ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME , packageVersions.mDataAppVersion ) ; mFakeIntentHelper.simulatePackageUpdatedEvent ( ) ; mFakeIntentHelper.assertUpdateNotTriggered ( ) ; mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; }
Source:
public com.android.build.gradle.internal.dsl.Map < java.lang.String , java.lang.Integer > getSeverityOverrides ( ) { if ( ( ( severities ) == null ) || ( severities.isEmpty ( ) ) ) { return null ; } com.android.build.gradle.internal.dsl.Map < java.lang.String , java.lang.Integer > map = com.google.common.collect.Maps.newHashMapWithExpectedSize ( severities.size ( ) ) ; for ( com.android.build.gradle.internal.dsl.Map.Entry < java.lang.String , com.android.tools.lint.detector.api.Severity > entry : severities.entrySet ( ) ) { map.put ( entry.key , com.android.build.gradle.internal.dsl.LintOptions.convert ( entry.value ) ) ; } return map ; }

Target:
public void error ( java.lang.String id ) { severities.put ( id , com.android.tools.lint.detector.api.Severity.ERROR ) ; }
Source:
public void setEncoding ( java.lang.String encoding ) throws java.io.UnsupportedEncodingException { this . flush ( ) ; super . setEncoding ( encoding ) ; if ( ( this . writer ) != null ) { if ( ( getEncoding ( ) ) == null ) { this . writer = new java.io.OutputStreamWriter ( this . os ) ; } else { try { this . writer = new java.io.OutputStreamWriter ( this . os , getEncoding ( ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.AssertionError ( e ) ; } } } }

Target:
public void setEncoding ( java.lang.String charsetName ) throws java.io.UnsupportedEncodingException { this . flush ( ) ; super . setEncoding ( charsetName ) ; if ( ( this . writer ) != null ) { if ( ( getEncoding ( ) ) == null ) { this . writer = new java.io.OutputStreamWriter ( this . os ) ; } else { try { this . writer = new java.io.OutputStreamWriter ( this . os , getEncoding ( ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.AssertionError ( e ) ; } } } }
Source:
public java.lang.String getTree ( com.android.sdkuilib.internal.repository.sdkman2.PackagesDiffLogic l , boolean displaySortByApi ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategory cat : m.getCategories ( displaySortByApi ) ) { sb.append ( cat.toString ( ) ) . append ( '\n' ) ; for ( com.android.sdkuilib.internal.repository.sdkman2.PkgItem item : cat.getItems ( ) ) { sb.append ( "-- " ) . append ( item.toString ( ) ) . append ( '\n' ) ; } } return sb.toString ( ) ; }

Target:
public java.lang.String getTree ( com.android.sdkuilib.internal.repository.core.PackagesDiffLogic l , boolean displaySortByApi ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : m.getCategories ( displaySortByApi ) ) { sb.append ( cat.toString ( ) ) . append ( '\n' ) ; for ( com.android.sdkuilib.internal.repository.core.PkgItem item : cat.getItems ( ) ) { sb.append ( "-- " ) . append ( item.toString ( ) ) . append ( '\n' ) ; } } return sb.toString ( ) ; }
Source:
public java.lang.Integer wifiNanAttach ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "nanConfig" ) org.json.JSONObject nanConfig ) throws android.os.RemoteException , org.json.JSONException { synchronized ( mLock ) { int sessionId = getNextSessionId ( ) ; mMgr.attach ( null , com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.getConfigRequest ( nanConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.NanAttachCallbackPostsEvents ( sessionId ) , new com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.NanIdentityChangeListenerPostsEvents ( sessionId ) ) ; return sessionId ; } }

Target:
public java.lang.Integer wifiAwareAttach ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "awareConfig" ) org.json.JSONObject awareConfig ) throws android.os.RemoteException , org.json.JSONException { synchronized ( mLock ) { int sessionId = getNextSessionId ( ) ; mMgr.attach ( null , com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.getConfigRequest ( awareConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.AwareAttachCallbackPostsEvents ( sessionId ) , new com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.AwareIdentityChangeListenerPostsEvents ( sessionId ) ) ; return sessionId ; } }
Source:
public void run ( com.android.tradefed.result.ITestInvocationListener listener ) throws com.android.tradefed.device.DeviceNotAvailableException { for ( com.android.gfx.benchmark.ApkInfo apk : com.android.gfx.benchmark.ApkInfo.values ( ) ) { getDevice ( ) . installPackage ( new java.io.File ( mApkDir , apk.getFileName ( ) ) , true ) ; runDeviceTests ( com.android.tradefed.testtype.GraphicsBenchmarkHostsideController.PACKAGE , com.android.tradefed.testtype.GraphicsBenchmarkHostsideController.CLASS , ( ( "run[" + ( apk.name ( ) ) ) + "]" ) ) ; } }

Target:
public void run ( com.android.tradefed.result.ITestInvocationListener listener ) throws com.android.tradefed.device.DeviceNotAvailableException { for ( com.android.gfx.benchmark.ApkInfo apk : mApks ) { getDevice ( ) . installPackage ( new java.io.File ( mApkDir , apk.getFileName ( ) ) , true ) ; runDeviceTests ( com.android.tradefed.testtype.GraphicsBenchmarkHostsideController.PACKAGE , com.android.tradefed.testtype.GraphicsBenchmarkHostsideController.CLASS , ( ( "run[" + ( apk.name ( ) ) ) + "]" ) ) ; } }
Source:
public void test_getInstanceLjava_lang_StringLjava_lang_String01 ( ) throws java.lang.Exception { for ( java.lang.String validValue : tests.api.javax.net.ssl.TrustManagerFactory1Test.getValidValues ( ) ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( validValue , ( ( java.lang.String ) ( null ) ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { javax.net.ssl.TrustManagerFactory.getInstance ( validValue , "" ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } } }

Target:
public void test_getInstanceLjava_lang_StringLjava_lang_String01 ( ) throws java.lang.Exception { for ( java.lang.String validValue : org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.getValidValues ( ) ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( validValue , ( ( java.lang.String ) ( null ) ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { javax.net.ssl.TrustManagerFactory.getInstance ( validValue , "" ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } } }
Source:
public void testDhcpErrorEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.DhcpErrorEvent.class ) , com.android.server.connectivity.MetricsTestUtil.aString ( "wlan0" ) , com.android.server.connectivity.MetricsTestUtil.anInt ( DhcpErrorEvent.L4_NOT_UDP ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " dhcp_event <" , " duration_ms: 0" , " error_code: 50397184" , " if_name: \"wlan0\"" , " state_transition: \"\"" , " >" , " time_ms: 1" , ">" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }

Target:
public void testDhcpErrorEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.DhcpErrorEvent.class ) , com.android.server.connectivity.MetricsTestUtil.aString ( "wlan0" ) , com.android.server.connectivity.MetricsTestUtil.anInt ( DhcpErrorEvent.L4_NOT_UDP ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " dhcp_event <" , " duration_ms: 0" , " error_code: 50397184" , " if_name: \"wlan0\"" , " state_transition: \"\"" , " >" , " time_ms: 1" , ">" , "version: 2" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { mDelivery = new com.android.volley.mock.MockResponseDelivery ( ) ; mNetworkQueue = new com.android.volley.mock.WaitableQueue ( ) ; mNetwork = new com.android.volley.mock.MockNetwork ( ) ; mCache = new com.android.volley.mock.MockCache ( ) ; mRequest = new com.android.volley.mock.MockRequest ( ) ; mDispatcher = new com.android.volley.NetworkDispatcher ( mNetworkQueue , mNetwork , mCache , mDelivery ) ; mDispatcher.start ( ) ; }

Target:
public void shouldCacheFalse ( ) throws java.lang.Exception { mRequest.setShouldCache ( false ) ; mDispatcher.processRequest ( mRequest ) ; org.mockito.Mockito.verify ( mCache , org.mockito.Mockito.never ( ) ) . put ( org.mockito.ArgumentMatchers.anyString ( ) , org.mockito.ArgumentMatchers.any ( Cache.Entry.class ) ) ; }
Source:
private static com.android.jack.dx.rop.cst.CstNat createSignature ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( method.getName ( ) ) ; com.android.jack.dx.rop.cst.CstString descriptor = new com.android.jack.dx.rop.cst.CstString ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( method ) ) ; com.android.jack.dx.rop.cst.CstNat signature = new com.android.jack.dx.rop.cst.CstNat ( name , descriptor ) ; return signature ; }

Target:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JReferenceType type , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( type ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( method.getName ( ) ) ; com.android.jack.dx.rop.cst.CstNat nat = com.android.jack.backend.dex.rop.RopHelper.createSignature ( method ) ; com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( definingClass , name , nat ) ; return methodRef ; }
Source:
public void testPolicyChangeTriggersBroadcast ( ) throws java.lang.Exception { mService.setUidPolicy ( com.android.server.NetworkPolicyManagerServiceTest.APP_ID_A , android.net.NetworkPolicyManager.POLICY_NONE ) ; final java.util.concurrent.Future < android.content.Intent > backgroundChanged = mServiceContext.nextBroadcastIntent ( ConnectivityManager.ACTION_BACKGROUND_DATA_SETTING_CHANGED ) ; mService.setUidPolicy ( com.android.server.NetworkPolicyManagerServiceTest.APP_ID_A , android.net.NetworkPolicyManager.POLICY_REJECT_METERED_BACKGROUND ) ; backgroundChanged.get ( ) ; }

Target:
public void testPolicyChangeTriggersListener ( ) throws java.lang.Exception { mPolicyListener.expect ( ) . onRestrictBackgroundBlacklistChanged ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyBoolean ( ) ) ; mService.setUidPolicy ( com.android.server.NetworkPolicyManagerServiceTest.APP_ID_A , android.net.NetworkPolicyManager.POLICY_NONE ) ; mService.setUidPolicy ( com.android.server.NetworkPolicyManagerServiceTest.APP_ID_A , android.net.NetworkPolicyManager.POLICY_REJECT_METERED_BACKGROUND ) ; mPolicyListener.waitAndVerify ( ) . onRestrictBackgroundBlacklistChanged ( com.android.server.NetworkPolicyManagerServiceTest.APP_ID_A , true ) ; }
Source:
public java.util.List < java.io.File > getJniSourceList ( ) { java.util.List < com.android.builder.model.SourceProvider > providers = getSortedSourceProviders ( ) ; java.util.List < java.io.File > sourceList = com.google.common.collect.Lists.newArrayListWithExpectedSize ( providers.size ( ) ) ; for ( com.android.builder.model.SourceProvider provider : providers ) { sourceList.addAll ( provider.getJniDirectories ( ) ) ; } return sourceList ; }

Target:
public java.util.List < java.io.File > getJniSourceList ( ) { java.util.List < com.android.builder.model.SourceProvider > providers = getSortedSourceProviders ( ) ; java.util.List < java.io.File > sourceList = com.google.common.collect.Lists.newArrayListWithExpectedSize ( providers.size ( ) ) ; for ( com.android.builder.model.SourceProvider provider : providers ) { sourceList.addAll ( provider.getCDirectories ( ) ) ; } return sourceList ; }
Source:
public static java.io.File createTempDir ( ) throws java.io.IOException { try { final java.io.File tmpDir = com.google.common.io.Files.createTempDir ( ) ; java.lang.Runtime.getRuntime ( ) . addShutdownHook ( new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { com.android.jack.test.toolchain.AbstractTestTools.deleteTempDir ( tmpDir ) ; } catch ( java.io.IOException e ) { java.lang.System.err.println ( e.getMessage ( ) ) ; } } } ) ; return tmpDir ; } catch ( java.lang.IllegalStateException e ) { throw new java.io.IOException ( e ) ; } }

Target:
public static java.io.File createTempDir ( ) throws java.io.IOException { try { final java.io.File tmpDir = com.android.sched.util.file.Files.createTempDir ( ) ; java.lang.Runtime.getRuntime ( ) . addShutdownHook ( new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { com.android.jack.test.toolchain.AbstractTestTools.deleteTempDir ( tmpDir ) ; } catch ( java.io.IOException e ) { java.lang.System.err.println ( e.getMessage ( ) ) ; } } } ) ; return tmpDir ; } catch ( java.lang.IllegalStateException e ) { throw new java.io.IOException ( e ) ; } }
Source:
public static java.lang.String getLogFormatString ( com.android.ddmlib.Log.LogLevel logLevel , java.lang.String tag , java.lang.String message ) { java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat ( "hh:mm:ss" ) ; return java.lang.String.format ( "%s %c/%s: %s\n" , formatter.format ( new java.util.Date ( ) ) , logLevel.getPriorityLetter ( ) , tag , message ) ; }

Target:
public static java.lang.String getLogFormatString ( com.android.ddmlib.Log.LogLevel logLevel , java.lang.String tag , java.lang.String message ) { java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat ( "hh:mm:ss" , java.util.Locale.getDefault ( ) ) ; return java.lang.String.format ( "%s %c/%s: %s\n" , formatter.format ( new java.util.Date ( ) ) , logLevel.getPriorityLetter ( ) , tag , message ) ; }
Source:
java.lang.Object newInstance ( ) throws java.lang.InstantiationException , java.lang.UnsupportedOperationException , java.lang.reflect.InvocationTargetException { if ( ( cons ) != null ) { try { return cons.newInstance ( ) ; } catch ( java.lang.IllegalAccessException ex ) { throw new java.lang.InternalError ( ex ) ; } } else { throw new java.lang.UnsupportedOperationException ( ) ; } }

Target:
java.lang.Object newInstance ( ) throws java.lang.InstantiationException , java.lang.UnsupportedOperationException , java.lang.reflect.InvocationTargetException { requireInitialized ( ) ; if ( ( cons ) != null ) { try { return cons.newInstance ( ) ; } catch ( java.lang.IllegalAccessException ex ) { throw new java.lang.InternalError ( ex ) ; } } else { throw new java.lang.UnsupportedOperationException ( ) ; } }
Source:
private boolean saveUpdatedPhoto ( long rawContactId , android.net.Uri photoUri ) { final android.net.Uri outputUri = android.net.Uri.withAppendedPath ( android.content.ContentUris.withAppendedId ( RawContacts.CONTENT_URI , rawContactId ) , RawContacts.DisplayPhoto.CONTENT_DIRECTORY ) ; return com.android.contacts.util.ContactPhotoUtils.savePhotoFromUriToUri ( this , photoUri , outputUri , true ) ; }

Target:
private boolean saveUpdatedPhoto ( long rawContactId , android.net.Uri photoUri , int saveMode ) { final android.net.Uri outputUri = android.net.Uri.withAppendedPath ( android.content.ContentUris.withAppendedId ( RawContacts.CONTENT_URI , rawContactId ) , RawContacts.DisplayPhoto.CONTENT_DIRECTORY ) ; return com.android.contacts.util.ContactPhotoUtils.savePhotoFromUriToUri ( this , photoUri , outputUri , ( saveMode == 0 ) ) ; }