auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testWarningWhenAddJavascriptInterfaceCalledOnWebViewChild ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/AddJavascriptInterfaceTest.java:23: Warning: WebView.addJavascriptInterface should not be called [AddJavascriptInterface]\n" + ( ( " webView.addJavascriptInterface(object, string);\n" + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/AddJavascriptInterfaceTest.java.txt=>src/test/pkg/AddJavascriptInterfaceTest.java" , "bytecode/AddJavascriptInterfaceTest.class.data=>bin/classes/test/pkg/AddJavascriptInterfaceTest.class" , ( "bytecode/AddJavascriptInterfaceTest$WebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$WebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class" ) ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/AddJavascriptInterfaceTest.java:16: Warning: WebView.addJavascriptInterface should not be called [AddJavascriptInterface]\n" + ( ( ( ( ( " webView.addJavascriptInterface(object, string);\n" + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/AddJavascriptInterfaceTest.java:23: Warning: WebView.addJavascriptInterface should not be called [AddJavascriptInterface]\n" ) + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/AddJavascriptInterfaceTest.java.txt=>src/test/pkg/AddJavascriptInterfaceTest.java" , "bytecode/AddJavascriptInterfaceTest.class.data=>bin/classes/test/pkg/AddJavascriptInterfaceTest.class" , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$WebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$WebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$NonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$NonWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class" ) ) ) ; }
Source:
public void end ( ) throws java.lang.InterruptedException { long startTime = java.lang.System.currentTimeMillis ( ) ; try { waitForAll ( ) ; mLogger.verbose ( "Job finished in %1$d" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; } finally { mCrunchingRequests.shutdown ( ) ; mLogger.verbose ( "Shutdown finished in %1$d" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; } }

Target:
public void end ( ) throws java.lang.InterruptedException { long startTime = java.lang.System.currentTimeMillis ( ) ; try { waitForAll ( ) ; mOutstandingJobs.clear ( ) ; mLogger.verbose ( "Job finished in %1$d" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; } finally { mCrunchingRequests.shutdown ( ) ; mLogger.verbose ( "Shutdown finished in %1$d" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; } }
Source:
private com.android.internal.telephony.NitzStateMachineTest.TestNitzSignal createUsTestNitzSignal ( ) { long receivedRealtimeMillis = mDeviceState.elapsedRealtime ( ) ; long nitzTimeMillis = com.android.internal.telephony.NitzStateMachineTest.createTime ( com.android.internal.telephony.NitzStateMachineTest.US_TIME_ZONE , 2017 , 1 , 2 , 12 , 45 , 25 ) ; return new com.android.internal.telephony.NitzStateMachineTest.TestNitzSignal ( receivedRealtimeMillis , com.android.internal.telephony.NitzStateMachineTest.US_TIME_ZONE , nitzTimeMillis ) ; }

Target:
private com.android.internal.telephony.NitzStateMachineTest.TestNitzSignal createTestNitzSignal ( ) { long receivedRealtimeMillis = mDeviceState.elapsedRealtime ( ) ; long timeMillis = com.android.internal.telephony.NitzStateMachineTest.createTime ( java.util.TimeZone.getTimeZone ( "UTC" ) , 2017 , 1 , 2 , 12 , 45 , 25 ) ; com.android.internal.telephony.NitzData nitzData = com.android.internal.telephony.NitzData.createForTests ( 1000 , 2000 , timeMillis , null ) ; return new com.android.internal.telephony.NitzStateMachineTest.TestNitzSignal ( nitzData , receivedRealtimeMillis ) ; }
Source:
public void testAesCbcHmacSha256Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , android.net.cts.IpSecManagerTest.getKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testCryptTcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , true , 1 , true ) ; }
Source:
public void testCheckReadPhoneState_hasPermissionWithoutAppOp ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PHONE_STATE , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.assertFalse ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }

Target:
public void testCheckReadPhoneState_hasCarrierPrivileges ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockTelephony.getCarrierPrivilegeStatusForUid ( org.mockito.ArgumentMatchers.eq ( com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID ) , org.mockito.ArgumentMatchers.eq ( com.android.internal.telephony.TelephonyPermissionsTest.UID ) ) ) . thenReturn ( TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
boolean connectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ! ( mStateMachine.isConnected ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "connectAudio: profile not connected" ) ; return false ; } if ( mStateMachine.isAudioOn ( ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "connectAudio: audio is already ON" ) ; return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO ) ; return true ; }

Target:
boolean connectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mStateMachine.getConnectionState ( mStateMachine.getCurrentDevice ( ) ) ) != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "connectAudio: profile not connected" ) ; return false ; } if ( isAudioOn ( ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , ( "connectAudio: audio is not idle, current state " + ( mStateMachine.getAudioState ( ) ) ) ) ; return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO , mStateMachine.getCurrentDevice ( ) ) ; return true ; }
Source:
public void invokeinterface ( final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) { mv.visitMethodInsn ( Opcodes.INVOKEINTERFACE , owner , name , desc ) ; }

Target:
public void invokevirtual ( final java.lang.String owner , final java.lang.String name , final java.lang.String desc , final boolean itf ) { if ( ( api ) < ( org.objectweb.asm.Opcodes.ASM5 ) ) { if ( itf ) { throw new java.lang.IllegalArgumentException ( "INVOKEVIRTUAL on interfaces require ASM 5" ) ; } invokevirtual ( owner , name , desc ) ; return ; } mv.visitMethodInsn ( Opcodes.INVOKEVIRTUAL , owner , name , desc , itf ) ; }
Source:
public static com.google.common.util.concurrent.Striped < java.util.concurrent.Semaphore > lazyWeakSemaphore ( int stripes , final int permits ) { return new com.google.common.util.concurrent.Striped.LazyStriped < java.util.concurrent.Semaphore > ( stripes , new com.google.common.base.Supplier < java.util.concurrent.Semaphore > ( ) { public java.util.concurrent.Semaphore get ( ) { return new java.util.concurrent.Semaphore ( permits , false ) ; } } ) ; }

Target:
public static com.google.common.util.concurrent.Striped < java.util.concurrent.Semaphore > lazyWeakSemaphore ( int stripes , final int permits ) { return com.google.common.util.concurrent.Striped.lazy ( stripes , new com.google.common.base.Supplier < java.util.concurrent.Semaphore > ( ) { @ java.lang.Override public java.util.concurrent.Semaphore get ( ) { return new java.util.concurrent.Semaphore ( permits , false ) ; } } ) ; }
Source:
public void testDiff2 ( ) throws java.lang.Exception { java.lang.String reference = "" + ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" " ) + " android:configChanges=\"locale\"/>\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String other = "" + ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/apk/res/android/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" " ) + " android:configChanges=\"mcc\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument refDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "testDiff2()" ) , reference ) ; com.android.manifmerger.XmlDocument otherDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "testDiff2()" ) , other ) ; assertFalse ( refDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) . compareTo ( otherDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) , mergingReport ) ) ; }

Target:
public void testDiff2 ( ) throws java.lang.Exception { java.lang.String reference = "" + ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" " ) + " android:configChanges=\"locale\"/>\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String other = "" + ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/apk/res/android/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" " ) + " android:configChanges=\"mcc\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument refDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "testDiff2()" ) , reference ) ; com.android.manifmerger.XmlDocument otherDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "testDiff2()" ) , other ) ; assertTrue ( refDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) . compareTo ( otherDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) ) . isPresent ( ) ) ; }
Source:
public void loadViewTreeData ( final com.android.hierarchyviewerlib.device.Window window ) { executeInBackground ( "Loading view hierarchy" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mFilterText = "" ; com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( window ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileData ( window , viewNode ) ; viewNode.setViewCount ( ) ; com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . setData ( window , viewNode ) ; } } } ) ; }

Target:
public void showCapture ( final org.eclipse.swt.widgets.Shell shell , final com.android.hierarchyviewerlib.models.ViewNode viewNode ) { executeInBackground ( "Capturing node" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { final org.eclipse.swt.graphics.Image image = loadCapture ( viewNode ) ; if ( image != null ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.ui.CaptureDisplay.show ( shell , viewNode , image ) ; } } ) ; } } } ) ; }
Source:
synchronized void nAllocationData3D ( int dstAlloc , int dstXoff , int dstYoff , int dstZoff , int dstMip , int width , int height , int depth , int srcAlloc , int srcXoff , int srcYoff , int srcZoff , int srcMip ) { validate ( ) ; rsnAllocationData3D ( mContext , dstAlloc , dstXoff , dstYoff , dstZoff , dstMip , width , height , depth , srcAlloc , srcXoff , srcYoff , srcZoff , srcMip ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , int [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
public com.android.server.wifi.hotspot2.PasspointMatch match ( java.util.Map < com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType , com.android.server.wifi.hotspot2.anqp.ANQPElement > anqpElements ) { com.android.server.wifi.hotspot2.PasspointMatch providerMatch = matchProvider ( anqpElements ) ; int authMatch = com.android.server.wifi.hotspot2.ANQPMatcher.matchNAIRealm ( ( ( com.android.server.wifi.hotspot2.anqp.NAIRealmElement ) ( anqpElements.get ( ANQPElementType.ANQPNAIRealm ) ) ) , mConfig.credential.realm , mEAPMethodID , mAuthParam ) ; if ( authMatch == ( AuthMatch.NONE ) ) { return PasspointMatch.None ; } if ( ( authMatch & ( AuthMatch.REALM ) ) == 0 ) { return providerMatch ; } return providerMatch == ( PasspointMatch.None ) ? PasspointMatch.RoamingProvider : providerMatch ; }

Target:
public com.android.server.wifi.hotspot2.PasspointMatch match ( java.util.Map < com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType , com.android.server.wifi.hotspot2.anqp.ANQPElement > anqpElements ) { com.android.server.wifi.hotspot2.PasspointMatch providerMatch = matchProvider ( anqpElements ) ; int authMatch = com.android.server.wifi.hotspot2.ANQPMatcher.matchNAIRealm ( ( ( com.android.server.wifi.hotspot2.anqp.NAIRealmElement ) ( anqpElements.get ( ANQPElementType.ANQPNAIRealm ) ) ) , mConfig.getCredential ( ) . getRealm ( ) , mEAPMethodID , mAuthParam ) ; if ( authMatch == ( AuthMatch.NONE ) ) { return PasspointMatch.None ; } if ( ( authMatch & ( AuthMatch.REALM ) ) == 0 ) { return providerMatch ; } return providerMatch == ( PasspointMatch.None ) ? PasspointMatch.RoamingProvider : providerMatch ; }
Source:
public void setHs20 ( boolean hs20 ) { if ( hs20 ) { doBooleanCommand ( "SET HS20 1" ) ; } else { doBooleanCommand ( "SET HS20 0" ) ; } }

Target:
public boolean startWpsRegistrar ( java.lang.String bssid , java.lang.String pin ) { if ( ( android.text.TextUtils.isEmpty ( bssid ) ) || ( android.text.TextUtils.isEmpty ( pin ) ) ) return false ; if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.startWpsRegistrar ( bssid , pin ) ; } else { return doBooleanCommand ( ( ( ( "WPS_REG " + bssid ) + " " ) + pin ) ) ; } }
Source:
private void readOutstandingMessages ( ) { org.chromium.mojo.system.ResultAnd < java.lang.Boolean > result ; do { try { result = org.chromium.mojo.bindings.Connector.readAndDispatchMessage ( mMessagePipeHandle , mIncomingMessageReceiver ) ; } catch ( org.chromium.mojo.system.MojoException e ) { onError ( e ) ; return ; } } while ( result.getValue ( ) ) ; if ( ( result.getMojoResult ( ) ) != ( org.chromium.mojo.system.MojoResult.SHOULD_WAIT ) ) { onError ( new org.chromium.mojo.system.MojoException ( result.getMojoResult ( ) ) ) ; } }

Target:
private void readOutstandingMessages ( ) { org.chromium.mojo.system.ResultAnd < java.lang.Boolean > result ; do { try { result = org.chromium.mojo.bindings.Connector.readAndDispatchMessage ( mMessagePipeHandle , mIncomingMessageReceiver ) ; } catch ( org.chromium.mojo.system.MojoException e ) { onError ( e ) ; return ; } } while ( result.getValue ( ) ) ; if ( ( result.getMojoResult ( ) ) == ( org.chromium.mojo.system.MojoResult.SHOULD_WAIT ) ) { registerAsyncWaiterForRead ( ) ; } else { onError ( new org.chromium.mojo.system.MojoException ( result.getMojoResult ( ) ) ) ; } }
Source:
public static java.util.concurrent.ExecutorService getExitingExecutorService ( java.util.concurrent.ThreadPoolExecutor executor , long terminationTimeout , java.util.concurrent.TimeUnit timeUnit ) { executor.setThreadFactory ( new com.google.common.util.concurrent.ThreadFactoryBuilder ( ) . setDaemon ( true ) . setThreadFactory ( executor.getThreadFactory ( ) ) . build ( ) ) ; java.util.concurrent.ExecutorService service = java.util.concurrent.Executors.unconfigurableExecutorService ( executor ) ; com.google.common.util.concurrent.MoreExecutors.addDelayedShutdownHook ( service , terminationTimeout , timeUnit ) ; return service ; }

Target:
public static java.util.concurrent.ExecutorService getExitingExecutorService ( java.util.concurrent.ThreadPoolExecutor executor ) { return new com.google.common.util.concurrent.MoreExecutors.Application ( ) . getExitingExecutorService ( executor ) ; }
Source:
public void testSkipAndroidSupportInAospHalf ( ) throws java.lang.Exception { java.lang.String expected ; if ( ( java.lang.System.getenv ( "ANDROID_BUILD_TOP" ) ) != null ) { expected = "No warnings." ; } else { expected = "bin/classes/android/support/foo/Foo.class: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMError [NewApi]\n" + "1 errors, 0 warnings\n" ; } assertEquals ( expected , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/ApiCallTest2.java.txt=>src/src/android/support/foo/Foo.java" , "apicheck/ApiCallTest2.class.data=>bin/classes/android/support/foo/Foo.class" ) ) ; }

Target:
public void testDateFormat ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/ApiCallTest12.java:18: Error: Call requires API level 9 (current min is 4): java.text.DateFormatSymbols#getInstance [NewApi]\n" + ( ( ( ( ( ( ( ( " new SimpleDateFormat(\"yyyy-MM-dd\", DateFormatSymbols.getInstance());\n" + " ~~~~~~~~~~~\n" ) + "src/test/pkg/ApiCallTest12.java:23: Error: The pattern character \'L\' requires API level 9 (current min is 4) : \"yyyy-MM-dd LL\" [NewApi]\n" ) + " new SimpleDateFormat(\"yyyy-MM-dd LL\", Locale.US);\n" ) + " ^\n" ) + "src/test/pkg/ApiCallTest12.java:25: Error: The pattern character \'c\' requires API level 9 (current min is 4) : \"cc yyyy-MM-dd\" [NewApi]\n" ) + " SimpleDateFormat format = new SimpleDateFormat(\"cc yyyy-MM-dd\");\n" ) + " ^\n" ) + "3 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk4.xml=>AndroidManifest.xml" , "project.properties1=>project.properties" , "apicheck/ApiCallTest12.java.txt=>src/test/pkg/ApiCallTest12.java" , "apicheck/ApiCallTest12.class.data=>bin/classes/test/pkg/ApiCallTest12.class" ) ) ; }
Source:
static java.net.InetSocketAddress validateAddress ( java.net.SocketAddress socketAddress ) { if ( socketAddress == null ) { throw new java.lang.IllegalArgumentException ( ) ; } if ( ! ( socketAddress instanceof java.net.InetSocketAddress ) ) { throw new java.nio.channels.UnsupportedAddressTypeException ( ) ; } java.net.InetSocketAddress inetSocketAddress = ( ( java.net.InetSocketAddress ) ( socketAddress ) ) ; if ( inetSocketAddress.isUnresolved ( ) ) { throw new java.nio.channels.UnresolvedAddressException ( ) ; } return inetSocketAddress ; }

Target:
static java.net.InetSocketAddress validateAddress ( java.net.SocketAddress socketAddress ) { if ( socketAddress == null ) { throw new java.lang.IllegalArgumentException ( "socketAddress == null" ) ; } if ( ! ( socketAddress instanceof java.net.InetSocketAddress ) ) { throw new java.nio.channels.UnsupportedAddressTypeException ( ) ; } java.net.InetSocketAddress inetSocketAddress = ( ( java.net.InetSocketAddress ) ( socketAddress ) ) ; if ( inetSocketAddress.isUnresolved ( ) ) { throw new java.nio.channels.UnresolvedAddressException ( ) ; } return inetSocketAddress ; }
Source:
public void java7Switches004 ( ) throws java.lang.Exception { java.io.File jackZipFile = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "tmp" , ".zip" ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . srcToLib ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , jackZipFile , true , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.java7.switches.test001.jack" ) ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . libToExe ( jackZipFile , com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false ) ; }

Target:
public void java7Switches004 ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; java.io.File jackZipFile = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "tmp" , toolchain.getLibraryExtension ( ) ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . srcToLib ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , jackZipFile , true , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.java7.switches.test001.jack" ) ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . libToExe ( jackZipFile , com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false ) ; }
Source:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "startRanging: called post GC on WifiAwareManager" ) ; return ; } mgr.startRanging ( mClientId , mSessionId , params , listener ) ; } }

Target:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.DiscoverySession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.DiscoverySession.TAG , "startRanging: called post GC on WifiAwareManager" ) ; return ; } mgr.startRanging ( mClientId , mSessionId , params , listener ) ; } }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSource ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SOURCES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } } ; }

Target:
public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; }
Source:
public org.eclipse.swt.graphics.Image getIcon ( ) { com.android.ide.eclipse.adt.internal.editors.IconFactory factory = com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) ; java.lang.String name = mXmlName ; if ( ( name.indexOf ( '.' ) ) != ( - 1 ) ) { name = name.substring ( ( ( name.lastIndexOf ( '.' ) ) + 1 ) ) ; } org.eclipse.swt.graphics.Image icon = factory.getIcon ( name ) ; if ( icon == null ) { icon = com.android.ide.eclipse.adt.AdtPlugin.getAndroidLogo ( ) ; } return icon ; }

Target:
public org.eclipse.swt.graphics.Image getGenericIcon ( ) { com.android.ide.eclipse.adt.internal.editors.IconFactory factory = com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) ; java.lang.String name = mXmlName ; if ( ( name.indexOf ( '.' ) ) != ( - 1 ) ) { name = name.substring ( ( ( name.lastIndexOf ( '.' ) ) + 1 ) ) ; } org.eclipse.swt.graphics.Image icon = factory.getIcon ( name ) ; if ( icon == null ) { icon = com.android.ide.eclipse.adt.AdtPlugin.getAndroidLogo ( ) ; } return icon ; }
Source:
public com.android.tools.perflib.heap.Heap getHeap ( int id ) { return mHeaps.get ( id ) ; }

Target:
public com.android.tools.perflib.heap.Heap setHeapTo ( int id , @ com.android.annotations.NonNull java.lang.String name ) { com.android.tools.perflib.heap.Heap heap = getHeap ( id ) ; if ( heap == null ) { heap = new com.android.tools.perflib.heap.Heap ( id , name ) ; heap.mSnapshot = this ; mHeaps.add ( heap ) ; } mCurrentHeap = heap ; return mCurrentHeap ; }
Source:
public void testSetLinkPropertiesInvalidAddress ( ) throws java.lang.Exception { mDcResponse.addresses = new java.lang.String [ ] { "224.224.224.224" } ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.ERR_UnacceptableParameter , mDcResponse.setLinkProperties ( linkProperties , true ) ) ; }

Target:
public void testSetLinkPropertiesInvalidAddress ( ) throws java.lang.Exception { mDcResponse = new com.android.internal.telephony.dataconnection.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , "224.224.224.224" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS , 1440 ) ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.ERR_UnacceptableParameter , mDcResponse.setLinkProperties ( linkProperties , true ) ) ; }
Source:
public java.lang.String toString ( int significantDigits ) { long nanos = elapsedNanos ( ) ; java.util.concurrent.TimeUnit unit = com.google.common.base.Stopwatch.chooseUnit ( nanos ) ; double value = ( ( double ) ( nanos ) ) / ( java.util.concurrent.TimeUnit.NANOSECONDS.convert ( 1 , unit ) ) ; return java.lang.String.format ( ( ( "%." + significantDigits ) + "g %s" ) , value , com.google.common.base.Stopwatch.abbreviate ( unit ) ) ; }

Target:
public java.lang.String toString ( ) { long nanos = elapsedNanos ( ) ; java.util.concurrent.TimeUnit unit = com.google.common.base.Stopwatch.chooseUnit ( nanos ) ; double value = ( ( double ) ( nanos ) ) / ( java.util.concurrent.TimeUnit.NANOSECONDS.convert ( 1 , unit ) ) ; return java.lang.String.format ( "%.4g %s" , value , com.google.common.base.Stopwatch.abbreviate ( unit ) ) ; }
Source:
public void release ( java.nio.channels.FileLock lock ) throws java.io.IOException { checkOpen ( ) ; libcore.io.StructFlock flock = new libcore.io.StructFlock ( ) ; flock.l_type = ( ( short ) ( F_UNLCK ) ) ; flock.l_whence = ( ( short ) ( SEEK_SET ) ) ; flock.l_start = lock.position ( ) ; flock.l_len = java.nio.FileChannelImpl.translateLockLength ( lock.size ( ) ) ; try { Libcore.os.fcntlFlock ( fd , java.nio.F_SETLKW64 , flock ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } removeLock ( lock ) ; }

Target:
public void release ( java.nio.channels.FileLock lock ) throws java.io.IOException { checkOpen ( ) ; android.system.StructFlock flock = new android.system.StructFlock ( ) ; flock.l_type = ( ( short ) ( F_UNLCK ) ) ; flock.l_whence = ( ( short ) ( SEEK_SET ) ) ; flock.l_start = lock.position ( ) ; flock.l_len = java.nio.FileChannelImpl.translateLockLength ( lock.size ( ) ) ; try { Libcore.os.fcntlFlock ( fd , java.nio.F_SETLKW64 , flock ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } removeLock ( lock ) ; }
Source:
public void test_destroy ( ) throws java.lang.Exception { java.lang.String [ ] commands = new java.lang.String [ ] { "ls" } ; java.lang.Process process = java.lang.Runtime.getRuntime ( ) . exec ( commands , null , null ) ; process.destroy ( ) ; process.destroy ( ) ; process.destroy ( ) ; }

Target:
public void test_destroy ( ) throws java.lang.Exception { java.lang.String [ ] commands = new java.lang.String [ ] { "sh" , "-c" , "exit 0" } ; java.lang.Process process = java.lang.Runtime.getRuntime ( ) . exec ( commands , null , null ) ; process.destroy ( ) ; process.destroy ( ) ; process.destroy ( ) ; }
Source:
public com.android.tools.perflib.heap.Heap setHeapTo ( int id , java.lang.String name ) { com.android.tools.perflib.heap.Heap heap = mHeaps.get ( id ) ; if ( heap == null ) { heap = new com.android.tools.perflib.heap.Heap ( name ) ; heap.mState = this ; mHeaps.put ( id , heap ) ; } mCurrentHeap = heap ; return mCurrentHeap ; }

Target:
public com.android.tools.perflib.heap.Heap setHeapTo ( int id , java.lang.String name ) { com.android.tools.perflib.heap.Heap heap = mHeaps.get ( id ) ; if ( heap == null ) { heap = new com.android.tools.perflib.heap.Heap ( name ) ; heap.mSnapshot = this ; mHeaps.put ( id , heap ) ; } mCurrentHeap = heap ; return mCurrentHeap ; }
Source:
private void assertResult ( java.lang.String resultKey , java.lang.String expectedResult ) { if ( expectedResult == null ) { if ( mResults.containsKey ( resultKey ) ) { fail ( ( ( ( "Unexpected " + resultKey ) + "=" ) + ( mResults.get ( resultKey ) ) ) ) ; } } else { assertTrue ( ( "Missing " + resultKey ) , mResults.containsKey ( resultKey ) ) ; assertEquals ( expectedResult , mResults.get ( resultKey ) ) ; } }

Target:
private void assertResult ( java.lang.String resultKey , java.lang.String expectedResult ) { if ( ! ( supportsMultiWindowMode ( ) ) ) { return ; } if ( expectedResult == null ) { if ( mResults.containsKey ( resultKey ) ) { fail ( ( ( ( "Unexpected " + resultKey ) + "=" ) + ( mResults.get ( resultKey ) ) ) ) ; } } else { assertTrue ( ( "Missing " + resultKey ) , mResults.containsKey ( resultKey ) ) ; assertEquals ( expectedResult , mResults.get ( resultKey ) ) ; } }
Source:
public static android.hardware.cts.helpers.sensorverification.EventOrderingVerification getDefault ( android.hardware.cts.helpers.TestSensorEnvironment environment ) { int reportingMode = environment.getSensor ( ) . getReportingMode ( ) ; if ( ( reportingMode != ( android.hardware.Sensor.REPORTING_MODE_CONTINUOUS ) ) && ( reportingMode != ( android.hardware.Sensor.REPORTING_MODE_ON_CHANGE ) ) ) { return null ; } return new android.hardware.cts.helpers.sensorverification.EventOrderingVerification ( ) ; }

Target:
public static android.hardware.cts.helpers.sensorverification.EventOrderingVerification getDefault ( android.hardware.cts.helpers.TestSensorEnvironment environment ) { int reportingMode = environment.getSensor ( ) . getReportingMode ( ) ; if ( reportingMode == ( android.hardware.Sensor.REPORTING_MODE_ONE_SHOT ) ) return null ; return new android.hardware.cts.helpers.sensorverification.EventOrderingVerification ( ) ; }
Source:
void removeRequestedPss ( com.android.server.am.ProcessRecord proc ) { java.lang.Runnable callback = null ; synchronized ( this ) { if ( mRequestPssList.remove ( proc ) ) { if ( ( mRequestPssList.size ( ) ) == 0 ) { callback = mRequestPssCallback ; mRequestPssCallback = null ; } } } if ( callback != null ) { callback.run ( ) ; } }

Target:
private void stopProfilerLocked ( com.android.server.am.ProcessRecord proc , java.lang.String path , int profileType ) { if ( ( proc == null ) || ( proc == ( mProfileProc ) ) ) { proc = mProfileProc ; path = mProfileFile ; profileType = mProfileType ; clearProfilerLocked ( ) ; } if ( proc == null ) { return ; } try { proc.thread.profilerControl ( false , path , null , profileType ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.IllegalStateException ( "Process disappeared" ) ; } }
Source:
public void testProviderService_supportsParameter_UnknownService_Success ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Fake.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Fake" , "FOO" ) ; assertTrue ( service.supportsParameter ( new java.lang.Object ( ) ) ) ; } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }

Target:
public void testProviderService_supportsParameter_SupportedKeyFormats_Failure ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Signature.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; put ( "Signature.FOO SupportedKeyFormats" , "Invalid" ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Signature" , "FOO" ) ; assertFalse ( service.supportsParameter ( new libcore.javax.crypto.MockKey ( ) ) ) ; } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }
Source:
private static boolean shouldShowNumber ( com.android.incallui.incall.protocol.PrimaryInfo primaryInfo , boolean isIncoming ) { if ( primaryInfo.nameIsNumber ) { return false ; } if ( ( ( primaryInfo.location ) == null ) && isIncoming ) { return false ; } if ( ( primaryInfo.isLocalContact ) && ( ! isIncoming ) ) { return false ; } if ( android.text.TextUtils.isEmpty ( primaryInfo.number ) ) { return false ; } return true ; }

Target:
private static boolean shouldShowNumber ( com.android.incallui.incall.protocol.PrimaryInfo primaryInfo , boolean isIncoming ) { if ( primaryInfo.nameIsNumber ( ) ) { return false ; } if ( ( ( primaryInfo.location ( ) ) == null ) && isIncoming ) { return false ; } if ( ( primaryInfo.isLocalContact ( ) ) && ( ! isIncoming ) ) { return false ; } if ( android.text.TextUtils.isEmpty ( primaryInfo.number ( ) ) ) { return false ; } return true ; }
Source:
public boolean process ( java.lang.String countryIso , java.lang.String defaultTimeZoneId , boolean everUsesUtc , java.util.List < java.lang.String > countryTimeZoneIds , java.lang.String debugInfo ) { countryIso = libcore.util.TimeZoneFinder.normalizeCountryIso ( countryIso ) ; if ( ! ( countryCodeToMatch.equals ( countryIso ) ) ) { return libcore.util.TimeZoneFinder.CountryZonesProcessor.CONTINUE ; } validatedCountryTimeZones = libcore.util.CountryTimeZones.createValidated ( countryIso , defaultTimeZoneId , everUsesUtc , countryTimeZoneIds , debugInfo ) ; return libcore.util.TimeZoneFinder.CountryZonesProcessor.HALT ; }

Target:
public boolean processCountryZones ( java.lang.String countryIso , java.lang.String defaultTimeZoneId , boolean everUsesUtc , java.util.List < java.lang.String > countryTimeZoneIds , java.lang.String debugInfo ) { countryIso = libcore.util.TimeZoneFinder.normalizeCountryIso ( countryIso ) ; if ( ! ( countryCodeToMatch.equals ( countryIso ) ) ) { return libcore.util.TimeZoneFinder.TimeZonesProcessor.CONTINUE ; } validatedCountryTimeZones = libcore.util.CountryTimeZones.createValidated ( countryIso , defaultTimeZoneId , everUsesUtc , countryTimeZoneIds , debugInfo ) ; return libcore.util.TimeZoneFinder.TimeZonesProcessor.HALT ; }
Source:
public boolean requestFocus ( final int direction , final android.graphics.Rect previouslyFocusedRect ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestFocus ( direction , previouslyFocusedRect ) ; } } ) ; return ret ; } mAwContents.requestFocus ( ) ; return mWebViewPrivate.super_requestFocus ( direction , previouslyFocusedRect ) ; }

Target:
public boolean requestChildRectangleOnScreen ( final android.view.View child , final android.graphics.Rect rect , final boolean immediate ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestChildRectangleOnScreen ( child , rect , immediate ) ; } } ) ; return ret ; } return mAwContents.requestChildRectangleOnScreen ( child , rect , immediate ) ; }
Source:
static int scopeForUnicastAddress ( java.net.InetAddress addr ) { if ( addr.isAnyLocalAddress ( ) ) { return libcore.io.OsConstants.RT_SCOPE_HOST ; } if ( ( addr.isLoopbackAddress ( ) ) || ( addr.isLinkLocalAddress ( ) ) ) { return libcore.io.OsConstants.RT_SCOPE_LINK ; } if ( ( ! ( addr instanceof java.net.Inet4Address ) ) && ( addr.isSiteLocalAddress ( ) ) ) { return libcore.io.OsConstants.RT_SCOPE_SITE ; } return libcore.io.OsConstants.RT_SCOPE_UNIVERSE ; }

Target:
static int scopeForUnicastAddress ( java.net.InetAddress addr ) { if ( addr.isAnyLocalAddress ( ) ) { return android.system.OsConstants.RT_SCOPE_HOST ; } if ( ( addr.isLoopbackAddress ( ) ) || ( addr.isLinkLocalAddress ( ) ) ) { return android.system.OsConstants.RT_SCOPE_LINK ; } if ( ( ! ( addr instanceof java.net.Inet4Address ) ) && ( addr.isSiteLocalAddress ( ) ) ) { return android.system.OsConstants.RT_SCOPE_SITE ; } return android.system.OsConstants.RT_SCOPE_UNIVERSE ; }
Source:
public final void testMoveTo ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r2 = r.moveTo ( 100 , 200 ) ; assertSame ( r2 , r ) ; assertEquals ( 100 , r.x ) ; assertEquals ( 200 , r.y ) ; assertEquals ( 20 , r.w ) ; assertEquals ( 30 , r.h ) ; }

Target:
public final void testMoveTo ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.common.api.Rect r2 = r.moveTo ( 100 , 200 ) ; assertSame ( r2 , r ) ; assertEquals ( 100 , r.x ) ; assertEquals ( 200 , r.y ) ; assertEquals ( 20 , r.w ) ; assertEquals ( 30 , r.h ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( ( com.android.cts.verifier.usb.UsbAccessoryTestActivity.ACTION_USB_PERMISSION.equals ( intent.getAction ( ) ) ) || ( UsbManager.ACTION_USB_ACCESSORY_ATTACHED.equals ( intent.getAction ( ) ) ) ) { android.hardware.usb.UsbAccessory accessory = intent.getParcelableExtra ( UsbManager.EXTRA_ACCESSORY ) ; if ( intent.getBooleanExtra ( UsbManager.EXTRA_PERMISSION_GRANTED , false ) ) { openAccessory ( accessory ) ; } else { android.util.Log.i ( com.android.cts.verifier.usb.UsbAccessoryTestActivity.TAG , "Permission denied..." ) ; } mPermissionRequestPending = false ; } }

Target:
public void onNewIntent ( android.content.Intent intent ) { super . onNewIntent ( intent ) ; if ( UsbManager.ACTION_USB_ACCESSORY_ATTACHED.equals ( intent.getAction ( ) ) ) { android.hardware.usb.UsbAccessory accessory = intent.getParcelableExtra ( UsbManager.EXTRA_ACCESSORY ) ; openAccessory ( accessory ) ; } }
Source:
public android.net.wifi.hotspot2.pps.HomeSP createFromParcel ( android.os.Parcel in ) { android.net.wifi.hotspot2.pps.HomeSP homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; homeSp.fqdn = in.readString ( ) ; homeSp.friendlyName = in.readString ( ) ; homeSp.roamingConsortiumOIs = in.createLongArray ( ) ; return homeSp ; }

Target:
public android.net.wifi.hotspot2.pps.HomeSP createFromParcel ( android.os.Parcel in ) { android.net.wifi.hotspot2.pps.HomeSP homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; homeSp.fqdn = in.readString ( ) ; homeSp.friendlyName = in.readString ( ) ; homeSp.iconUrl = in.readString ( ) ; homeSp.homeNetworkIds = readHomeNetworkIds ( in ) ; homeSp.matchAllOIs = in.createLongArray ( ) ; homeSp.matchAnyOIs = in.createLongArray ( ) ; homeSp.otherHomePartners = in.createStringArray ( ) ; homeSp.roamingConsortiumOIs = in.createLongArray ( ) ; return homeSp ; }
Source:
public boolean connect ( android.bluetooth.BluetoothDevice device ) { if ( ( mService ) == null ) return false ; java.util.List < android.bluetooth.BluetoothDevice > sinks = getConnectedDevices ( ) ; if ( sinks != null ) { for ( android.bluetooth.BluetoothDevice sink : sinks ) { mService.disconnect ( sink ) ; } } return mService.connect ( device ) ; }

Target:
public boolean connect ( android.bluetooth.BluetoothDevice device ) { if ( ( mService ) == null ) return false ; java.util.List < android.bluetooth.BluetoothDevice > sinks = getConnectedDevices ( ) ; if ( sinks != null ) { for ( android.bluetooth.BluetoothDevice sink : sinks ) { if ( sink.equals ( device ) ) { android.util.Log.w ( com.android.settingslib.bluetooth.A2dpProfile.TAG , ( ( "Connecting to device " + device ) + " : disconnect skipped" ) ) ; continue ; } mService.disconnect ( sink ) ; } } return mService.connect ( device ) ; }
Source:
public void onInitializeAccessibilityNodeInfo ( final android.view.accessibility.AccessibilityNodeInfo info ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onInitializeAccessibilityNodeInfo ( info ) ; } } ) ; return ; } mAwContents.onInitializeAccessibilityNodeInfo ( info ) ; }

Target:
public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { android.view.accessibility.AccessibilityNodeProvider ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.view.accessibility.AccessibilityNodeProvider > ( ) { @ java.lang.Override public android.view.accessibility.AccessibilityNodeProvider call ( ) { return getAccessibilityNodeProvider ( ) ; } } ) ; return ret ; } return mAwContents.getAccessibilityNodeProvider ( ) ; }
Source:
public java.net.Socket createSocket ( ) throws java.io.IOException { com.android.org.conscrypt.OpenSSLSocketImpl s = ( ( com.android.org.conscrypt.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; return s ; }

Target:
public java.net.Socket createSocket ( ) throws java.io.IOException { com.android.org.conscrypt.OpenSSLSocketImpl s = ( ( com.android.org.conscrypt.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setAlpnProtocols ( mAlpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; return s ; }
Source:
public android.security.keymaster.ExportResult exportKey ( java.lang.String alias , int format , byte [ ] clientId , byte [ ] appId ) { try { return mBinder.exportKey ( alias , format , clientId , appId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return null ; } }

Target:
public android.security.keymaster.ExportResult exportKey ( java.lang.String alias , int format , android.security.keymaster.KeymasterBlob clientId , android.security.keymaster.KeymasterBlob appId ) { try { return mBinder.exportKey ( alias , format , clientId , appId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return null ; } }
Source:
public void testCallMethodWithNoCreatedFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsServiceBinder.isConnected ( android.telephony.ims.ImsServiceTest.TEST_SLOT_1 , ImsFeature.MMTEL , 0 , 0 ) ; org.mockito.Mockito.verify ( mTestImsService.mMockMMTelFeature , org.mockito.Mockito.never ( ) ) . isConnected ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) ) ; }

Target:
public void testCallMethodWithNoCreatedFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsServiceBinder.isConnected ( android.telephony.ims.ImsServiceTest.TEST_SLOT_1 , ImsFeature.MMTEL , 0 , 0 ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature , org.mockito.Mockito.never ( ) ) . isConnected ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) ) ; }
Source:
public void clear ( ) { multimap ( ) . clear ( ) ; }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object o ) { if ( o instanceof com.google.common.collect.Multiset.Entry ) { com.google.common.collect.Multiset.Entry < ? > entry = ( ( com.google.common.collect.Multiset.Entry < ? > ) ( o ) ) ; java.util.Collection < V > collection = multimap.asMap ( ) . get ( entry.getElement ( ) ) ; return ( collection != null ) && ( ( collection.size ( ) ) == ( entry.getCount ( ) ) ) ; } return false ; }