auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.android.hierarchyviewerlib.device.Window [ ] getWindows ( com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.device.Window [ ] windows ; synchronized ( mDeviceMap ) { windows = mDeviceMap.get ( device ) ; } return windows ; }

Target:
public com.android.hierarchyviewerlib.device.Window [ ] getWindows ( com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.device.Window [ ] windows = null ; synchronized ( mDeviceMap ) { com.android.hierarchyviewerlib.models.DeviceSelectionModel.DeviceInfo info = mDeviceMap.get ( device ) ; if ( info != null ) { windows = mDeviceMap.get ( device ) . windows ; } } return windows ; }
Source:
public void setVar ( int index , float v ) { mRS.nScriptSetVarF ( getID ( mRS ) , index , v ) ; }

Target:
protected void invoke ( int slot , android.support.v8.renderscript.FieldPacker v ) { if ( v != null ) { mRS.nScriptInvokeV ( getID ( mRS ) , slot , v.getData ( ) , mUseIncSupp ) ; } else { mRS.nScriptInvoke ( getID ( mRS ) , slot , mUseIncSupp ) ; } }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , int [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }

Target:
private void copyTo ( java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { mRS.validate ( ) ; boolean usePadding = false ; if ( ( mAutoPadding ) && ( ( mType.getElement ( ) . getVectorSize ( ) ) == 3 ) ) { usePadding = true ; } mRS.nAllocationRead ( getID ( mRS ) , array , dt , mType.mElement.mType.mSize , usePadding ) ; }
Source:
public static java.lang.String toASCII ( java.lang.String input , int flags ) { return libcore.icu.NativeIDN.toASCII ( input , flags ) ; }

Target:
public static java.lang.String toASCII ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToASCII ( input , result , info ) ; if ( info.hasErrors ( ) ) { throw new java.lang.IllegalArgumentException ( ( "Invalid input to toASCII: " + input ) ) ; } return result.toString ( ) ; }
Source:
public void createUserData ( java.lang.String uuid , int userId , int userSerial , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createUserData ( uuid , userId , userSerial , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void destroyUserData ( java.lang.String uuid , int userId , int flags ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.destroyUserData ( uuid , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public void visitBranchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.BranchInstruction branchInstruction ) { branchInstruction.branchOffset = newBranchOffset ( offset , branchInstruction.branchOffset ) ; }

Target:
public void visitBranchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.BranchInstruction branchInstruction ) { try { branchInstruction.branchOffset = newBranchOffset ( offset , branchInstruction.branchOffset ) ; oldInstructionOffsets [ offset ] = - 1 ; } catch ( java.lang.IllegalArgumentException e ) { if ( ( ( level ) == 0 ) || ( ! ( allowExternalBranchTargets ) ) ) { throw e ; } } }
Source:
public java.util.List < android.telecom.PhoneAccountHandle > getPhoneAccountsForPackage ( java.lang.String packageName ) { synchronized ( mLock ) { final android.os.UserHandle callingUserHandle = android.os.Binder.getCallingUserHandle ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { com.android.server.telecom.Log.startSession ( "TSI.gPAFP" ) ; return mPhoneAccountRegistrar.getPhoneAccountsForPackage ( packageName , callingUserHandle ) ; } catch ( java.lang.Exception e ) { com.android.server.telecom.Log.e ( this , e , "getPhoneAccountsForPackage %s" , packageName ) ; throw e ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } } }

Target:
public java.util.List < android.telecom.PhoneAccountHandle > getPhoneAccountsForPackage ( java.lang.String packageName ) { synchronized ( mLock ) { final android.os.UserHandle callingUserHandle = android.os.Binder.getCallingUserHandle ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { android.telecom.Log.startSession ( "TSI.gPAFP" ) ; return mPhoneAccountRegistrar.getPhoneAccountsForPackage ( packageName , callingUserHandle ) ; } catch ( java.lang.Exception e ) { android.telecom.Log.e ( this , e , "getPhoneAccountsForPackage %s" , packageName ) ; throw e ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } } }
Source:
com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback getProjectCallback ( boolean reset , com.android.ide.common.rendering.LayoutLibrary layoutLibrary ) { if ( ( mProjectCallback ) == null ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager resManager = com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getInstance ( ) ; org.eclipse.core.resources.IProject project = getProject ( ) ; com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources projectRes = resManager.getProjectResources ( project ) ; mProjectCallback = new com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback ( layoutLibrary , projectRes , project ) ; } else if ( reset ) { mProjectCallback.getMissingClasses ( ) . clear ( ) ; mProjectCallback.getUninstantiatableClasses ( ) . clear ( ) ; } return mProjectCallback ; }

Target:
com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback getProjectCallback ( boolean reset , com.android.ide.common.rendering.LayoutLibrary layoutLibrary ) { if ( ( mProjectCallback ) == null ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager resManager = com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getInstance ( ) ; org.eclipse.core.resources.IProject project = getProject ( ) ; com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources projectRes = resManager.getProjectResources ( project ) ; mProjectCallback = new com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback ( layoutLibrary , projectRes , project , mCredential ) ; } else if ( reset ) { mProjectCallback.getMissingClasses ( ) . clear ( ) ; mProjectCallback.getUninstantiatableClasses ( ) . clear ( ) ; } return mProjectCallback ; }
Source:
public void exit ( ) { if ( com.android.bluetooth.a2dp.A2dpStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( ( ( "Exit Connecting(" + ( mDevice ) ) + "): " ) + ( com.android.bluetooth.a2dp.A2dpStateMachine.messageWhatToString ( getCurrentMessage ( ) . what ) ) ) ) ; } mLastConnectionState = android.bluetooth.BluetoothProfile.STATE_CONNECTING ; }

Target:
public void exit ( ) { android.os.Message currentMessage = getCurrentMessage ( ) ; log ( ( ( ( "Exit Connecting(" + ( mDevice ) ) + "): " ) + ( currentMessage == null ? "null" : com.android.bluetooth.a2dp.A2dpStateMachine.messageWhatToString ( currentMessage.what ) ) ) ) ; mLastConnectionState = android.bluetooth.BluetoothProfile.STATE_CONNECTING ; }
Source:
private void testWriteRead ( java.lang.String name , java.security.Key key , boolean authenticated , boolean useBc , boolean blocks ) throws java.lang.Exception { byte [ ] data = new byte [ 1000 ] ; for ( int i = 0 ; i < ( data.length ) ; i ++ ) { data [ i ] = ( ( byte ) ( i % 255 ) ) ; } testWriteRead ( name , key , authenticated , useBc , blocks , data ) ; }

Target:
private void testWriteRead ( java.lang.String name , java.security.Key key , boolean authenticated , boolean useBc , boolean blocks ) throws java.lang.Exception { byte [ ] data = new byte [ streamSize ] ; for ( int i = 0 ; i < ( data.length ) ; i ++ ) { data [ i ] = ( ( byte ) ( i % 255 ) ) ; } testWriteRead ( name , key , authenticated , useBc , blocks , data ) ; }
Source:
private static boolean validateLogDir ( java.lang.String logFolder ) { java.io.File fileLogDir = new java.io.File ( logFolder ) ; if ( ( ( ! ( fileLogDir.exists ( ) ) ) || ( ! ( fileLogDir.canWrite ( ) ) ) ) || ( ( fileLogDir.getUsableSpace ( ) ) < 1000000 ) ) { return false ; } return true ; }

Target:
private static boolean isValidLogDir ( java.lang.String logFolder ) { java.io.File fileLogDir = new java.io.File ( logFolder ) ; return ( ( fileLogDir.isDirectory ( ) ) && ( fileLogDir.canWrite ( ) ) ) && ( ( fileLogDir.getUsableSpace ( ) ) >= 1000000 ) ; }
Source:
public void testGetValues009_ThisObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value thisValue = getStaticFieldValue ( classID , "THIS_OBJECT" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "this" , thisValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testGetValues009_Object ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointObject" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , oldValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public java.nio.charset.Charset charsetForName ( java.lang.String charsetName ) { if ( ( ( "MockCharset00" . equalsIgnoreCase ( charsetName ) ) || ( "MockCharset01" . equalsIgnoreCase ( charsetName ) ) ) || ( "MockCharset02" . equalsIgnoreCase ( charsetName ) ) ) { return new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockCharset00" , new java.lang.String [ ] { "mockCharset01" , "mockCharset02" } ) ; } return null ; }

Target:
public java.nio.charset.Charset charsetForName ( java.lang.String charsetName ) { if ( ( ( "MockCharset00" . equalsIgnoreCase ( charsetName ) ) || ( "MockCharset01" . equalsIgnoreCase ( charsetName ) ) ) || ( "MockCharset02" . equalsIgnoreCase ( charsetName ) ) ) { return tests.api.java.nio.charset.CharsetTest.charset1 ; } else if ( ( ( "MockCharset10" . equalsIgnoreCase ( charsetName ) ) || ( "MockCharset11" . equalsIgnoreCase ( charsetName ) ) ) || ( "MockCharset12" . equalsIgnoreCase ( charsetName ) ) ) { return tests.api.java.nio.charset.CharsetTest.charset2 ; } return null ; }
Source:
public final void update ( final com.intellij.ui.tabs.impl.AnActionEvent e ) { com.intellij.ui.tabs.impl.JBTabsImpl tabs = e.getData ( com.intellij.ui.tabs.impl.JBTabsImpl.NAVIGATION_ACTIONS_KEY ) ; e.getPresentation ( ) . setVisible ( ( tabs != null ) ) ; if ( tabs == null ) return ; tabs = findNavigatableTabs ( tabs ) ; e.getPresentation ( ) . setEnabled ( ( tabs != null ) ) ; if ( tabs != null ) { _update ( e , tabs , tabs.myVisibleInfos.indexOf ( tabs.getSelectedInfo ( ) ) ) ; } }

Target:
public final void update ( final com.intellij.ui.tabs.impl.AnActionEvent e ) { com.intellij.ui.tabs.impl.JBTabsImpl tabs = e.getData ( com.intellij.ui.tabs.impl.JBTabsImpl.NAVIGATION_ACTIONS_KEY ) ; e.getPresentation ( ) . setVisible ( ( tabs != null ) ) ; if ( tabs == null ) return ; tabs = findNavigatableTabs ( tabs ) ; e.getPresentation ( ) . setEnabled ( ( tabs != null ) ) ; if ( tabs != null ) { _update ( e , tabs , tabs.getVisibleInfos ( ) . indexOf ( tabs.getSelectedInfo ( ) ) ) ; } }
Source:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo getHorizontalPatchTop ( int x ) { return getContainingPatch ( patchInfo.horizontalPatchMarkers , x , com.android.draw9patch.ui.ImageViewer.UpdateRegion.TOP_PATCH ) ; }

Target:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo findHorizontalPatch ( int x , int y ) { java.util.List < com.android.draw9patch.ui.Pair < java.lang.Integer > > markers ; com.android.draw9patch.ui.ImageViewer.UpdateRegion region ; if ( y < ( ( image.getHeight ( ) ) / 2 ) ) { markers = patchInfo.horizontalPatchMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.TOP_PATCH ; } else { markers = patchInfo.horizontalPaddingMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.BOTTOM_PADDING ; } return getContainingPatch ( markers , x , region ) ; }
Source:
protected boolean cleanup ( ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , "Stopping Bluetooth HidService" ) ; if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mInputDevices ) != null ) { for ( android.bluetooth.BluetoothDevice device : mInputDevices.keySet ( ) ) { int inputDeviceState = getConnectionState ( device ) ; if ( inputDeviceState != ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { broadcastConnectionState ( device , BluetoothProfile.STATE_DISCONNECTED ) ; } } mInputDevices.clear ( ) ; } com.android.bluetooth.hid.HidService.clearHidService ( ) ; return true ; }

Target:
protected boolean cleanup ( ) { if ( com.android.bluetooth.hid.HidHostService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , "Stopping Bluetooth HidHostService" ) ; if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mInputDevices ) != null ) { for ( android.bluetooth.BluetoothDevice device : mInputDevices.keySet ( ) ) { int inputDeviceState = getConnectionState ( device ) ; if ( inputDeviceState != ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { broadcastConnectionState ( device , BluetoothProfile.STATE_DISCONNECTED ) ; } } mInputDevices.clear ( ) ; } com.android.bluetooth.hid.HidHostService.clearHidHostService ( ) ; return true ; }
Source:
public android.content.pm.UserInfo createUser ( java.lang.String name , int flags ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can create users" ) ; android.content.pm.UserInfo userInfo = com.android.server.pm.PackageManagerService.sUserManager.createUser ( name , flags ) ; if ( userInfo != null ) { android.content.Intent addedIntent = new android.content.Intent ( android.content.Intent.ACTION_USER_ADDED ) ; addedIntent.putExtra ( Intent.EXTRA_USERID , userInfo.id ) ; mContext.sendBroadcast ( addedIntent , android.Manifest.permission.MANAGE_ACCOUNTS ) ; } return userInfo ; }

Target:
public void installPackageWithVerification ( android.net.Uri packageURI , android.content.pm.IPackageInstallObserver observer , int flags , java.lang.String installerPackageName , android.net.Uri verificationURI , android.content.pm.ManifestDigest manifestDigest , android.content.pm.ContainerEncryptionParams encryptionParams ) { android.content.pm.VerificationParams verificationParams = new android.content.pm.VerificationParams ( verificationURI , null , null , android.content.pm.VerificationParams.NO_UID , manifestDigest ) ; installPackageWithVerificationAndEncryption ( packageURI , observer , flags , installerPackageName , verificationParams , encryptionParams ) ; }
Source:
private void initForReal ( ) { mAwContents = new org.chromium.android_webview.AwContents ( mFactory.getBrowserContext ( ) , mWebView , mWebView.getContext ( ) , new com.android.webview.chromium.WebViewChromium.InternalAccessAdapter ( ) , new com.android.webview.chromium.WebViewChromium.WebViewHardwareRendererDelegate ( ) , mContentsClientAdapter , mWebSettings.getAwSettings ( ) ) ; if ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.KITKAT ) ) { org.chromium.android_webview.AwContents.setShouldDownloadFavicons ( ) ; } mAwContents.getAwContentsProxy ( ) . setLayerType ( mWebView.getLayerType ( ) , null ) ; }

Target:
private void initForReal ( ) { mAwContents = new org.chromium.android_webview.AwContents ( mFactory.getBrowserContext ( ) , mWebView , mWebView.getContext ( ) , new com.android.webview.chromium.WebViewChromium.InternalAccessAdapter ( ) , new com.android.webview.chromium.WebViewChromium.WebViewNativeGLDelegate ( ) , mContentsClientAdapter , mWebSettings.getAwSettings ( ) ) ; if ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.KITKAT ) ) { org.chromium.android_webview.AwContents.setShouldDownloadFavicons ( ) ; } mAwContents.setLayerType ( mWebView.getLayerType ( ) , null ) ; }
Source:
public synchronized com.android.jack.ir.ast.JClassOrInterface getPhantomClassOrInterface ( @ javax.annotation.Nonnull java.lang.String typeName ) { try { return getType ( typeName ) ; } catch ( com.android.jack.lookup.JLookupException e ) { for ( com.android.jack.ir.ast.JPhantomClassOrInterface f : phantomTypes ) { if ( f.name.equals ( typeName ) ) { return f ; } } com.android.jack.ir.ast.JPhantomClassOrInterface phantom = new com.android.jack.ir.ast.JPhantomClassOrInterface ( typeName , this ) ; phantomTypes.add ( phantom ) ; session.getTracer ( ) . getStatistic ( com.android.jack.ir.ast.JPackage.PHANTOM_CREATION ) . incValue ( ) ; return phantom ; } }

Target:
public synchronized com.android.jack.ir.ast.JClassOrInterface getPhantomClassOrInterface ( @ javax.annotation.Nonnull java.lang.String typeName ) { try { return getType ( typeName ) ; } catch ( com.android.jack.lookup.JLookupException e ) { for ( com.android.jack.ir.ast.JPhantomClassOrInterface f : phantomTypes ) { if ( f.name.equals ( typeName ) ) { return f ; } } com.android.jack.ir.ast.JPhantomClassOrInterface phantom = new com.android.jack.ir.ast.JPhantomClassOrInterface ( typeName , this ) ; phantomTypes.add ( phantom ) ; com.android.jack.ir.ast.JPackage.tracer.getStatistic ( com.android.jack.ir.ast.JPackage.PHANTOM_CREATION ) . incValue ( ) ; return phantom ; } }
Source:
public synchronized double getMin ( ) { ensureSorted ( ) ; return samples [ 0 ] ; }

Target:
public synchronized void add ( double value , @ javax.annotation.CheckForNull java.lang.Object obj ) { if ( ! ( java.lang.Double.isNaN ( value ) ) ) { ensureCapacity ( validCount ) ; samples [ ( ( validCount ) ++ ) ] = value ; isSorted = false ; if ( value < ( min ) ) { min = value ; minObject = obj ; } if ( value > ( max ) ) { max = value ; maxObject = obj ; } total += value ; } else { ( nanCount ) ++ ; } }
Source:
public void testNotifyResponseTransmitFollowupFail ( ) throws org.json.JSONException { final short transactionId = 45 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiAwareNative.AWARE_STATUS_TIMEOUT ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiAwareNative.AWARE_RESPONSE_TRANSMIT_FOLLOWUP ) ; com.android.server.wifi.aware.WifiAwareHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onMessageSendQueuedFailResponse ( transactionId , WifiAwareNative.AWARE_STATUS_TIMEOUT ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testNotifyResponseTransmitFollowupFail ( ) throws org.json.JSONException { final short transactionId = 45 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; args.putInt ( "response_type" , WifiAwareNative.AWARE_RESPONSE_TRANSMIT_FOLLOWUP ) ; com.android.server.wifi.aware.WifiAwareHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onMessageSendQueuedFailResponse ( transactionId , WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 2 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.SIGNED_16 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { copy1DRangeFromUnchecked ( off , count , ( ( java.lang.Object ) ( d ) ) , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
public void test_fractionalSeconds ( ) throws java.lang.Exception { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.S" ) ; assertEquals ( "1970-01-02 02:17:36.7" , sdf.format ( sdf.parse ( "1970-01-02 02:17:36.7" ) ) ) ; sdf = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.SSSSSS" ) ; assertEquals ( "1970-01-02 02:17:36.789000" , sdf.format ( sdf.parse ( "1970-01-02 02:17:36.789564" ) ) ) ; }

Target:
public void test_fractionalSeconds ( ) throws java.lang.Exception { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.S" ) ; sdf.setTimeZone ( libcore.java.text.SimpleDateFormatTest.UTC ) ; assertEquals ( "1970-01-02 02:17:36.7" , sdf.format ( sdf.parse ( "1970-01-02 02:17:36.7" ) ) ) ; sdf = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.SSSSSS" ) ; sdf.setTimeZone ( libcore.java.text.SimpleDateFormatTest.UTC ) ; assertEquals ( "1970-01-02 02:17:36.789000" , sdf.format ( sdf.parse ( "1970-01-02 02:17:36.789564" ) ) ) ; }
Source:
public com.android.ide.eclipse.adt.editors.layout.gscripts.Point center ( ) { return new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( ( ( x ) + ( ( w ) > 0 ? ( w ) / 2 : 0 ) ) , ( ( y ) + ( ( h ) > 0 ? ( h ) / 2 : 0 ) ) ) ; }

Target:
public com.android.ide.eclipse.adt.editors.layout.gscripts.Point getCenter ( ) { return new com.android.ide.eclipse.adt.editors.layout.gscripts.Point ( ( ( x ) + ( ( w ) > 0 ? ( w ) / 2 : 0 ) ) , ( ( y ) + ( ( h ) > 0 ? ( h ) / 2 : 0 ) ) ) ; }
Source:
protected void tearDown ( ) throws java.lang.Exception { if ( ( ! ( android.net.wifi.cts.WifiFeature.isWifiSupported ( getContext ( ) ) ) ) && ( ! ( android.net.wifi.cts.WifiFeature.isP2pSupported ( getContext ( ) ) ) ) ) { super . tearDown ( ) ; return ; } mContext.unregisterReceiver ( mReceiver ) ; if ( ! ( mWifiManager.isWifiEnabled ( ) ) ) { assertTrue ( mWifiManager.setWifiEnabled ( true ) ) ; java.lang.Thread.sleep ( android.net.wifi.cts.ConcurrencyTest.DURATION ) ; } super . tearDown ( ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( ( ! ( android.net.wifi.cts.WifiFeature.isWifiSupported ( getContext ( ) ) ) ) && ( ! ( android.net.wifi.cts.WifiFeature.isP2pSupported ( getContext ( ) ) ) ) ) { super . tearDown ( ) ; return ; } mContext.unregisterReceiver ( mReceiver ) ; enableWifi ( ) ; super . tearDown ( ) ; }
Source:
void writeUpgradeKeySetsLPr ( org.xmlpull.v1.XmlSerializer serializer , com.android.server.pm.PackageKeySetData data ) throws java.io.IOException { if ( data.isUsingUpgradeKeySets ( ) ) { for ( long id : data.getUpgradeKeySets ( ) ) { serializer.startTag ( null , "upgrade-keyset" ) ; serializer.attribute ( null , "identifier" , java.lang.Long.toString ( id ) ) ; serializer.endTag ( null , "upgrade-keyset" ) ; } } }

Target:
void writeUpgradeKeySetsLPr ( org.xmlpull.v1.XmlSerializer serializer , com.android.server.pm.PackageKeySetData data ) throws java.io.IOException { long properSigning = data.getProperSigningKeySet ( ) ; if ( data.isUsingUpgradeKeySets ( ) ) { for ( long id : data.getUpgradeKeySets ( ) ) { serializer.startTag ( null , "upgrade-keyset" ) ; serializer.attribute ( null , "identifier" , java.lang.Long.toString ( id ) ) ; serializer.endTag ( null , "upgrade-keyset" ) ; } } }
Source:
public void setHttpAuthUsernamePassword ( final java.lang.String host , final java.lang.String realm , final java.lang.String username , final java.lang.String password ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHttpAuthUsernamePassword ( host , realm , username , password ) ; } } ) ; return ; } mAwContents.setHttpAuthUsernamePassword ( host , realm , username , password ) ; }

Target:
public java.lang.String [ ] getHttpAuthUsernamePassword ( final java.lang.String host , final java.lang.String realm ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String [ ] ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String [ ] > ( ) { @ java.lang.Override public java.lang.String [ ] call ( ) { return getHttpAuthUsernamePassword ( host , realm ) ; } } ) ; return ret ; } return mAwContents.getHttpAuthUsernamePassword ( host , realm ) ; }
Source:
private boolean search ( java.lang.String query , com.android.ddmuilib.logcat.LogCatMessage message ) { java.util.List < com.android.ddmuilib.logcat.LogCatFilter > filters = com.android.ddmuilib.logcat.LogCatFilter.fromString ( query , LogLevel.VERBOSE ) ; for ( com.android.ddmuilib.logcat.LogCatFilter f : filters ) { if ( ! ( f.matches ( message ) ) ) { return false ; } } return true ; }

Target:
private boolean search ( java.lang.String query , com.android.ddmlib.logcat.LogCatMessage message ) { java.util.List < com.android.ddmuilib.logcat.LogCatFilter > filters = com.android.ddmuilib.logcat.LogCatFilter.fromString ( query , LogLevel.VERBOSE ) ; for ( com.android.ddmuilib.logcat.LogCatFilter f : filters ) { if ( ! ( f.matches ( message ) ) ) { return false ; } } return true ; }
Source:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUintUintUintUint args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; long min = ( args.inMinValue ) & 4294967295L ; long max = ( args.inMaxValue ) & 4294967295L ; long in = ( args.inValue ) & 4294967295L ; args.out = ( ( int ) ( java.lang.StrictMath.min ( max , java.lang.StrictMath.max ( in , min ) ) ) ) ; }

Target:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsIntIntIntInt args ) { args.out = android.renderscript.cts.CoreMathVerifier.minI32 ( args.inMaxValue , android.renderscript.cts.CoreMathVerifier.maxI32 ( args.inValue , args.inMinValue ) ) ; }
Source:
public void widgetDefaultSelected ( org.eclipse.swt.events.SelectionEvent e ) { java.lang.Object selection = ( ( org.eclipse.swt.widgets.TreeItem ) ( e.item ) ) . getData ( ) ; if ( ( selection instanceof com.android.ddmlib.IDevice ) && ( mDoPixelPerfectStuff ) ) { com.android.hierarchyviewerlib.HierarchyViewerDirector.getDirector ( ) . loadPixelPerfectData ( ( ( com.android.ddmlib.IDevice ) ( selection ) ) ) ; } else if ( ( selection instanceof com.android.hierarchyviewerlib.device.Window ) && ( mDoTreeViewStuff ) ) { com.android.hierarchyviewerlib.HierarchyViewerDirector.getDirector ( ) . loadViewTreeData ( ( ( com.android.hierarchyviewerlib.device.Window ) ( selection ) ) ) ; } }

Target:
public void widgetDefaultSelected ( org.eclipse.swt.events.SelectionEvent e ) { java.lang.Object selection = ( ( org.eclipse.swt.widgets.TreeItem ) ( e.item ) ) . getData ( ) ; if ( ( selection instanceof com.android.hierarchyviewerlib.device.IHvDevice ) && ( mDoPixelPerfectStuff ) ) { com.android.hierarchyviewerlib.HierarchyViewerDirector.getDirector ( ) . loadPixelPerfectData ( ( ( com.android.hierarchyviewerlib.device.IHvDevice ) ( selection ) ) ) ; } else if ( ( selection instanceof com.android.hierarchyviewerlib.models.Window ) && ( mDoTreeViewStuff ) ) { com.android.hierarchyviewerlib.HierarchyViewerDirector.getDirector ( ) . loadViewTreeData ( ( ( com.android.hierarchyviewerlib.models.Window ) ( selection ) ) ) ; } }
Source:
private boolean isDataAllowed ( com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason dataAllowFailReasons ) { try { java.lang.reflect.Method method = com.android.internal.telephony.dataconnection.DcTracker.class . getDeclaredMethod ( "isDataAllowed" , com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason.class ) ; method.setAccessible ( true ) ; return ( ( boolean ) ( method.invoke ( mDct , dataAllowFailReasons ) ) ) ; } catch ( java.lang.Exception e ) { org.junit.Assert.fail ( e.toString ( ) ) ; return false ; } }

Target:
private boolean isDataAllowed ( com.android.internal.telephony.dataconnection.DataConnectionReasons dataConnectionReasons ) { try { java.lang.reflect.Method method = com.android.internal.telephony.dataconnection.DcTracker.class . getDeclaredMethod ( "isDataAllowed" , com.android.internal.telephony.dataconnection.DataConnectionReasons.class ) ; method.setAccessible ( true ) ; return ( ( boolean ) ( method.invoke ( mDct , dataConnectionReasons ) ) ) ; } catch ( java.lang.Exception e ) { org.junit.Assert.fail ( e.toString ( ) ) ; return false ; } }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; HEAD ( 7 ) ; android.backup.cts.ae80c Merge ; android.backup.cts.DO NOT ; android.backup.cts.Add test ; files ( no ) ; android.content.pm.PackageManager packageManager = getInstrumentation ( ) . getContext ( ) . getPackageManager ( ) ; isBackupSupported = ( packageManager != null ) && ( packageManager.hasSystemFeature ( PackageManager.FEATURE_BACKUP ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; android.content.pm.PackageManager packageManager = getInstrumentation ( ) . getContext ( ) . getPackageManager ( ) ; isBackupSupported = ( packageManager != null ) && ( packageManager.hasSystemFeature ( PackageManager.FEATURE_BACKUP ) ) ; if ( ! ( isBackupSupported ) ) { return ; } assertTrue ( "LocalTransport should be available." , hasBackupTransport ( android.backup.cts.BackupQuotaTest.LOCAL_TRANSPORT ) ) ; wasBackupEnabled = enableBackup ( true ) ; oldTransport = setBackupTransport ( android.backup.cts.BackupQuotaTest.LOCAL_TRANSPORT ) ; }
Source:
public void testNoLintWarningOnFlagsInLocalVariable ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( ( "src/test/pkg/GetSignaturesLocalVariableTest.java.txt" + "=>src/test/pkg/GetSignaturesLocalVariableTest.java" ) ) ) ; }

Target:
public void testLintWarningOnGetSignaturesFlagInBitwiseXorExpression ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/GetSignaturesBitwiseXorTest.java:8: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + ( ( " getPackageManager().getPackageInfo(\"some.pkg\", PackageManager.GET_SIGNATURES ^ 0x0);\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( java ( "src/test/pkg/GetSignaturesBitwiseXorTest.java" , ( "" + ( ( ( ( ( ( ( ( ( "package test.pkg;\n" + "\n" ) + "import android.app.Activity;\n" ) + "import android.content.pm.PackageManager;\n" ) + "\n" ) + "public class GetSignaturesBitwiseXorTest extends Activity {\n" ) + " public void failLintCheck() throws Exception {\n" ) + " getPackageManager().getPackageInfo(\"some.pkg\", PackageManager.GET_SIGNATURES ^ 0x0);\n" ) + " }\n" ) + "}" ) ) ) ) ) ; }
Source:
public void testAesCbcHmacSha1Tcp6 ( ) 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_SHA1 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacSha1Udp4 ( ) 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_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public com.android.sdklib.ISystemImage [ ] getSystemImages ( ) { if ( ( mSystemImages ) == null ) { com.android.sdklib.SystemImage si = new com.android.sdklib.SystemImage ( com.android.sdklib.io.FileOp.append ( getLocation ( ) , SdkConstants.OS_IMAGES_FOLDER ) , com.android.sdklib.ISystemImage.LocationType.IN_PLATFORM_LEGACY , com.android.SdkConstants.ABI_ARMEABI ) ; mSystemImages = new com.android.sdklib.SystemImage [ ] { si } ; } return mSystemImages ; }

Target:
public com.android.sdklib.ISystemImage [ ] getSystemImages ( ) { if ( ( mSystemImages ) == null ) { com.android.sdklib.SystemImage si = new com.android.sdklib.SystemImage ( com.android.sdklib.io.FileOp.append ( getLocation ( ) , SdkConstants.OS_IMAGES_FOLDER ) , com.android.sdklib.ISystemImage.LocationType.IN_PLATFORM_LEGACY , com.android.sdklib.SystemImage.DEFAULT_TAG , com.android.SdkConstants.ABI_ARMEABI ) ; mSystemImages = new com.android.sdklib.SystemImage [ ] { si } ; } return mSystemImages ; }
Source:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( boolean emulateStudio_1_0 , java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return buildModel ( connection , new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }

Target:
public com.android.builder.model.AndroidProject executeAndReturnModel ( boolean emulateStudio_1_0 , java.lang.String ... tasks ) { return execute ( java.util.Collections.< java.lang.String > emptyList ( ) , true , emulateStudio_1_0 , com.android.build.gradle.integration.common.fixture.GradleTestProject.ExpectedBuildResult.SUCCESS , tasks ) ; }
Source:
public void testSearch ( ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( "/basic.trace" ) ; java.lang.String thread = "AsyncTask #1" ; com.android.tools.perflib.vmtrace.SearchResult results = traceData.searchFor ( "startMethodTracing" , thread ) ; assertEquals ( 3 , results.getMethods ( ) . size ( ) ) ; assertEquals ( 3 , results.getInstances ( ) . size ( ) ) ; }

Target:
public void testSearch ( ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( "/basic.trace" ) ; com.android.tools.perflib.vmtrace.ThreadInfo thread = traceData.getThread ( "AsyncTask #1" ) ; com.android.tools.perflib.vmtrace.SearchResult results = traceData.searchFor ( "startMethodTracing" , thread ) ; assertEquals ( 3 , results.getMethods ( ) . size ( ) ) ; assertEquals ( 3 , results.getInstances ( ) . size ( ) ) ; }
Source:
public java.util.List < android.service.carrier.CarrierIdentifier > getAllowedCarriers ( int slotId ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getAllowedCarriers ( slotId ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getAllowedCarriers" , e ) ; } catch ( java.lang.NullPointerException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } return new java.util.ArrayList < android.service.carrier.CarrierIdentifier > ( 0 ) ; }

Target:
public int setAllowedCarriers ( int slotIndex , java.util.List < android.service.carrier.CarrierIdentifier > carriers ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.setAllowedCarriers ( slotIndex , carriers ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } catch ( java.lang.NullPointerException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } return - 1 ; }
Source:
public void testAesCbcHmacSha1Udp6 ( ) 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_SHA1 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacSha1Tcp6 ( ) 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_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public final double getDouble ( int index ) { checkIndex ( index , SizeOf.DOUBLE ) ; return java.lang.Double.longBitsToDouble ( this . block.peekLong ( ( ( offset ) + index ) , order ) ) ; }

Target:
final void get ( int [ ] dst , int dstOffset , int intCount ) { int byteCount = checkGetBounds ( SizeOf.INT , dst.length , dstOffset , intCount ) ; this . block.peekIntArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , intCount , order.needsSwap ) ; position += byteCount ; }
Source:
protected java.lang.String constructCommand ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm64 -Xcompiler-option --compiler-backend=Optimizing " ) ; if ( device.noBootImageAvailable ( ) ) { commandBuilder.append ( "-Ximage:/data/art-test/core.art -Xnorelocate " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; return commandBuilder.toString ( ) ; }

Target:
protected java.lang.String constructCommand ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm64 -Xcompiler-option --compiler-backend=Optimizing " ) ; commandBuilder.append ( "-Xno-dex-file-fallback " ) ; if ( device.noBootImageAvailable ( ) ) { commandBuilder.append ( "-Ximage:/data/art-test/core.art -Xnorelocate " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; return commandBuilder.toString ( ) ; }
Source:
public void testNotifyResponseConfigFail ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiNanNative.NAN_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiNanNative.NAN_RESPONSE_ENABLED ) ; com.android.server.wifi.nan.WifiNanHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onConfigFailedResponse ( transactionId , WifiNanNative.NAN_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testNotifyResponseConfigFail ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiAwareNative.AWARE_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiAwareNative.AWARE_RESPONSE_ENABLED ) ; com.android.server.wifi.aware.WifiAwareHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onConfigFailedResponse ( transactionId , WifiAwareNative.AWARE_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public static com.android.sched.scheduler.TagOrMarkerOrComponentSet getJavaSourceInitialTagSet ( @ javax.annotation.Nonnull com.android.sched.scheduler.Scheduler scheduler ) { com.android.sched.scheduler.TagOrMarkerOrComponentSet set = scheduler.createTagOrMarkerOrComponentSet ( ) ; set.add ( com.android.jack.ir.JavaSourceIr.class ) ; set.add ( com.android.jack.shrob.obfuscation.OriginalNames.class ) ; set.add ( com.android.jack.ir.sourceinfo.SourceInfoCreation.class ) ; return set ; }

Target:
public static com.android.sched.scheduler.TagOrMarkerOrComponentSet getJavaSourceInitialTagSet ( @ javax.annotation.Nonnull com.android.sched.scheduler.Scheduler scheduler ) { com.android.sched.scheduler.TagOrMarkerOrComponentSet set = scheduler.createTagOrMarkerOrComponentSet ( ) ; set.add ( com.android.jack.ir.JavaSourceIr.class ) ; set.add ( com.android.jack.shrob.obfuscation.OriginalNames.class ) ; set.add ( com.android.jack.ir.sourceinfo.SourceInfoCreation.class ) ; if ( ( com.android.sched.util.config.ThreadConfig.get ( Options.JAVA_SOURCE_VERSION ) . compareTo ( JavaVersion.JAVA_7 ) ) >= 0 ) { set.add ( JSwitchStatement.SwitchWithString.class ) ; } return set ; }
Source:
public java.lang.String describeFirstNonRequestableCapability ( ) { if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED ) ) return "NET_CAPABILITY_VALIDATED" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL ) ) return "NET_CAPABILITY_CAPTIVE_PORTAL" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_FOREGROUND ) ) return "NET_CAPABILITY_FOREGROUND" ; if ( ( ( mNetworkCapabilities ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ) != 0 ) { return "unknown non-requestable capabilities " + ( java.lang.Long.toHexString ( mNetworkCapabilities ) ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }

Target:
public boolean satisfiedByUids ( android.net.NetworkCapabilities nc ) { if ( null == ( nc.mUids ) ) return true ; if ( null == ( mUids ) ) return false ; for ( android.net.UidRange requiredRange : mUids ) { if ( ! ( nc.appliesToUidRange ( requiredRange ) ) ) { return false ; } } return true ; }
Source:
public void terminate ( ) { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "terminate: called post GC on WifiNanManager" ) ; return ; } mgr.terminateSession ( mClientId , mSessionId ) ; mTerminated = true ; mMgr.clear ( ) ; mCloseGuard.close ( ) ; }

Target:
public void destroy ( ) { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "destroy: called post GC on WifiNanManager" ) ; return ; } mgr.terminateSession ( mClientId , mSessionId ) ; mTerminated = true ; mMgr.clear ( ) ; mCloseGuard.close ( ) ; }
Source:
public void testEmptyApk ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMinSdkVersion ( "empty-unsigned.apk" , 1 ) , Issue.JAR_SIG_NO_MANIFEST ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMinSdkVersion ( "v1-only-empty.apk" , 18 ) , Issue.JAR_SIG_NO_SIGNED_ZIP_ENTRIES ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( "v2-only-empty.apk" , AndroidSdkVersion.N ) ) ; }

Target:
public void testTargetSandboxVersion2AndHigher ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerified ( verify ( "targetSandboxVersion-2.apk" ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "v2-only-targetSandboxVersion-2.apk" ) , Issue.JAR_SIG_NO_MANIFEST ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( "v2-only-targetSandboxVersion-2.apk" , 24 ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "v1-only-targetSandboxVersion-2.apk" ) , Issue.NO_SIG_FOR_TARGET_SANDBOX_VERSION ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "unsigned-targetSandboxVersion-2.apk" ) , Issue.NO_SIG_FOR_TARGET_SANDBOX_VERSION ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verify ( "v2-only-targetSandboxVersion-3.apk" ) ) ; }
Source:
private boolean isDialpadVisible ( ) { com.android.dialer.dialpadview.DialpadFragment fragment = getDialpadFragment ( ) ; return ( ( ( fragment != null ) && ( fragment.isAdded ( ) ) ) && ( ! ( fragment.isHidden ( ) ) ) ) && ( fragment.isDialpadSlideUp ( ) ) ; }

Target:
private boolean isDialpadVisible ( ) { return ( ( ( ( dialpadFragment ) != null ) && ( dialpadFragment.isAdded ( ) ) ) && ( ! ( dialpadFragment.isHidden ( ) ) ) ) && ( dialpadFragment.isDialpadSlideUp ( ) ) ; }
Source:
private void sendDisplayPinIntent ( byte [ ] address , int pin , int variant ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mRemoteDevices.getDevice ( address ) ) ; if ( pin != 0 ) { intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_KEY , pin ) ; } intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , variant ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.setPackage ( mAdapterService.getString ( R.string.pairing_ui_package ) ) ; mAdapterService.sendOrderedBroadcast ( intent , mAdapterService.BLUETOOTH_ADMIN_PERM ) ; }

Target:
private void sendDisplayPinIntent ( byte [ ] address , int pin , int variant ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mRemoteDevices.getDevice ( address ) ) ; if ( pin != 0 ) { intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_KEY , pin ) ; } intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , variant ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.setFlags ( Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND ) ; mAdapterService.sendOrderedBroadcast ( intent , mAdapterService.BLUETOOTH_ADMIN_PERM ) ; }
Source:
private void injectTestString ( java.lang.String result ) { byte [ ] data = result.getBytes ( ) ; mParser.addOutput ( data , 0 , data.length ) ; mParser.flush ( ) ; }

Target:
private void injectAndVerifyTestString ( java.lang.String result ) { org.easymock.EasyMock.replay ( mMockListener ) ; byte [ ] data = result.getBytes ( ) ; mParser.addOutput ( data , 0 , data.length ) ; mParser.flush ( ) ; org.easymock.EasyMock.verify ( mMockListener ) ; }