auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean retainAll ( final java.util.Collection < ? > collection ) { com.google.common.base.Preconditions.checkNotNull ( collection ) ; com.google.common.base.Predicate < E > combinedPredicate = new com.google.common.base.Predicate < E > ( ) { @ java.lang.Override public boolean apply ( E input ) { return ( predicate.apply ( input ) ) && ( ! ( collection.contains ( input ) ) ) ; } } ; return com.google.common.collect.Iterables.removeIf ( unfiltered , combinedPredicate ) ; }

Target:
static boolean safeContains ( java.util.Collection < ? > collection , @ javax.annotation.Nullable java.lang.Object object ) { com.google.common.base.Preconditions.checkNotNull ( collection ) ; try { return collection.contains ( object ) ; } catch ( java.lang.ClassCastException e ) { return false ; } catch ( java.lang.NullPointerException e ) { return false ; } }
Source:
public static com.google.gct.testing.GoogleCloudTestingConfigurationImpl getConfigurationById ( int id , org.jetbrains.android.facet.AndroidFacet facet ) { for ( com.android.tools.idea.run.GoogleCloudTestingConfiguration configuration : com.google.gct.testing.GoogleCloudTestingUtils.TESTING_CONFIGURATION_FACTORY.getTestingConfigurations ( facet ) ) { if ( ( configuration.getId ( ) ) == id ) { return ( ( com.google.gct.testing.GoogleCloudTestingConfigurationImpl ) ( configuration ) ) ; } } return null ; }

Target:
public static com.google.gct.testing.CloudTestConfigurationImpl getConfigurationById ( int id , org.jetbrains.android.facet.AndroidFacet facet ) { for ( com.android.tools.idea.run.CloudTestConfiguration configuration : com.google.gct.testing.GoogleCloudTestingUtils.TESTING_CONFIGURATION_FACTORY.getTestingConfigurations ( facet ) ) { if ( ( configuration.getId ( ) ) == id ) { return ( ( com.google.gct.testing.CloudTestConfigurationImpl ) ( configuration ) ) ; } } return null ; }
Source:
protected void done ( ) { try { showImageEditor ( get ( ) , file.getAbsolutePath ( ) ) ; } catch ( java.lang.InterruptedException e ) { e.printStackTrace ( ) ; } catch ( java.util.concurrent.ExecutionException e ) { e.printStackTrace ( ) ; } }

Target:
protected void done ( ) { try { showImageEditor ( get ( ) , file.getAbsolutePath ( ) ) ; this . setTitle ( java.lang.String.format ( "Draw 9-patch: %s" , file.getAbsolutePath ( ) ) ) ; } catch ( java.lang.InterruptedException e ) { e.printStackTrace ( ) ; } catch ( java.util.concurrent.ExecutionException e ) { e.printStackTrace ( ) ; } }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.main ) ; findViewById ( R.id.continue_button ) . setOnClickListener ( new android.view.View.OnClickListener ( ) { @ java.lang.Override public void onClick ( android.view.View v ) { startActivity ( new android.content.Intent ( com.android.cts.verifier.CtsVerifierActivity.this , com.android.cts.verifier.TestListActivity.class ) ) ; } } ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; requestWindowFeature ( Window.FEATURE_NO_TITLE ) ; setContentView ( R.layout.main ) ; android.view.View.OnClickListener clickListener = new android.view.View.OnClickListener ( ) { @ java.lang.Override public void onClick ( android.view.View v ) { startActivity ( new android.content.Intent ( com.android.cts.verifier.CtsVerifierActivity.this , com.android.cts.verifier.TestListActivity.class ) ) ; } } ; findViewById ( R.id.detective_logo ) . setOnClickListener ( clickListener ) ; findViewById ( R.id.continue_button ) . setOnClickListener ( clickListener ) ; }
Source:
public org.hamcrest.Matcher < android.view.View > getConstraints ( ) { return android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom ( android.support.v4.widget.DrawerLayout.class ) ; }

Target:
public static android.support.test.espresso.ViewAction open ( final int gravity ) { return new android.support.test.espresso.contrib.DrawerActions.DrawerAction ( ) { @ java.lang.Override public java.lang.String getDescription ( ) { return "open drawer with gravity " + gravity ; } @ java.lang.Override protected org.hamcrest.Matcher < android.view.View > checkAction ( ) { return android.support.test.espresso.contrib.DrawerMatchers.isClosed ( gravity ) ; } @ java.lang.Override protected void performAction ( android.support.v4.widget.DrawerLayout view ) { view.openDrawer ( gravity ) ; } } ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
private void copyTo ( java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , array , dt ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public java.lang.String getTestedPackageName ( ) { if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { assert ( mTestedConfig ) != null ; if ( ( mTestedConfig.mType ) == ( com.android.builder.core.VariantConfiguration.Type.LIBRARY ) ) { return getPackageName ( ) ; } else { return mTestedConfig.getPackageName ( ) ; } } return null ; }

Target:
public java.lang.String getTestedApplicationId ( ) { if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { assert ( mTestedConfig ) != null ; if ( ( mTestedConfig.mType ) == ( com.android.builder.core.VariantConfiguration.Type.LIBRARY ) ) { return getApplicationId ( ) ; } else { return mTestedConfig.getApplicationId ( ) ; } } return null ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JSwitchBasicBlock block ) { tracer.getStatistic ( com.android.jack.ir.ast.cfg.CfgBasicBlockTracker.TOTAL_COUNT ) . add ( block.elements ( true ) . size ( ) ) ; tracer.getStatistic ( com.android.jack.ir.ast.cfg.CfgBasicBlockTracker.SWITCH_COUNT ) . add ( block.elements ( true ) . size ( ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JThrowingExpressionBasicBlock block ) { tracer.getStatistic ( com.android.jack.ir.ast.cfg.CfgBasicBlockTracker.TOTAL_COUNT ) . add ( block.getElementCount ( ) ) ; tracer.getStatistic ( com.android.jack.ir.ast.cfg.CfgBasicBlockTracker.THROWING_EXPR_COUNT ) . add ( block.getElementCount ( ) ) ; return false ; }
Source:
private void cleanup ( ) { mWifiMonitor.stopAllMonitoring ( ) ; mDeathRecipient.unlinkToDeath ( ) ; mWifiNative.tearDownInterfaces ( ) ; mWifiNative.stopHal ( ) ; }

Target:
public void enter ( ) { handleNetworkDisconnect ( ) ; java.lang.String suppState = java.lang.System.getProperty ( "init.svc.wpa_supplicant" ) ; if ( suppState == null ) suppState = "unknown" ; setWifiState ( android.net.wifi.WifiManager.WIFI_STATE_DISABLING ) ; mSupplicantStateTracker.sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_RESET_SUPPLICANT_STATE ) ; logd ( ( ( "SupplicantStoppingState: disableSupplicant " + " init.svc.wpa_supplicant=" ) + suppState ) ) ; if ( mWifiNative.disableSupplicant ( ) ) { mWifiNative.closeSupplicantConnection ( ) ; sendSupplicantConnectionChangedBroadcast ( false ) ; setWifiState ( android.net.wifi.WifiManager.WIFI_STATE_DISABLED ) ; } else { handleSupplicantConnectionLoss ( true ) ; } transitionTo ( mInitialState ) ; }
Source:
public void testSubjectAltNameWithWildcard ( ) { assertTrue ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "*.g.com" ) ) ) ; }

Target:
public void testSubjectAltNameAndCn ( ) { assertFalse ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "a.y.com" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "imap.g.com" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "a.y.com" ) ) ) ; assertTrue ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "imap.g.com" ) ) ) ; }
Source:
public void testHfIndicatorParser_testCorrectValue ( ) { int batteryLevel = 10 ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.onHfIndicatorValueChanged ( com.android.bluetooth.btservice.RemoteDevicesTest.getHfIndicatorIntent ( mDevice1 , batteryLevel , HeadsetHalConstants.HF_INDICATOR_BATTERY_LEVEL_STATUS ) ) ; org.mockito.Mockito.verify ( mAdapterService ) . sendBroadcast ( mIntentArgument.capture ( ) , mStringArgument.capture ( ) ) ; com.android.bluetooth.btservice.RemoteDevicesTest.verfyBatteryLevelChangedIntent ( mDevice1 , batteryLevel , mIntentArgument ) ; org.junit.Assert.assertEquals ( AdapterService.BLUETOOTH_PERM , mStringArgument.getValue ( ) ) ; }

Target:
public void testHfIndicatorParser_testCorrectValue ( ) { int batteryLevel = 10 ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.onHfIndicatorValueChanged ( com.android.bluetooth.btservice.RemoteDevicesTest.getHfIndicatorIntent ( mDevice1 , batteryLevel , HeadsetHalConstants.HF_INDICATOR_BATTERY_LEVEL_STATUS ) ) ; org.mockito.Mockito.verify ( mAdapterService ) . sendBroadcast ( mIntentArgument.capture ( ) , mStringArgument.capture ( ) ) ; com.android.bluetooth.btservice.RemoteDevicesTest.verifyBatteryLevelChangedIntent ( mDevice1 , batteryLevel , mIntentArgument ) ; org.junit.Assert.assertEquals ( AdapterService.BLUETOOTH_PERM , mStringArgument.getValue ( ) ) ; }
Source:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { final com.intellij.openapi.project.Project project = e.getData ( PlatformDataKeys.PROJECT ) ; final com.intellij.openapi.vfs.VirtualFile file = e.getData ( PlatformDataKeys.VIRTUAL_FILE ) ; if ( ( ( project == null ) || ( project.isDisposed ( ) ) ) || ( ! ( org.jetbrains.plugins.github.GithubUtil.testGitExecutable ( project ) ) ) ) { return ; } org.jetbrains.plugins.github.GithubCreatePullRequestAction.createPullRequest ( project , file ) ; }

Target:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { final com.intellij.openapi.project.Project project = e.getData ( PlatformDataKeys.PROJECT ) ; final com.intellij.openapi.vfs.VirtualFile file = e.getData ( PlatformDataKeys.VIRTUAL_FILE ) ; if ( ( ( project == null ) || ( project.isDisposed ( ) ) ) || ( ! ( org.jetbrains.plugins.github.util.GithubUtil.testGitExecutable ( project ) ) ) ) { return ; } org.jetbrains.plugins.github.GithubCreatePullRequestAction.createPullRequest ( project , file ) ; }
Source:
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 ; }

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 ; removeMessages ( com.android.bluetooth.a2dp.A2dpStateMachine.CONNECT_TIMEOUT ) ; }
Source:
public void onResume ( ) { super . onResume ( ) ; com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , ( ( ( "onResume - mIsResponseSent[" + ( mIsResponseSent ) ) + "], slot id: " ) + ( mSlotId ) ) ) ; startTimeOut ( ) ; appService.getStkContext ( mSlotId ) . setPendingActivityInstance ( null ) ; if ( mIsResponseSent ) { cancelTimeOut ( ) ; finish ( ) ; } }

Target:
protected void onSaveInstanceState ( android.os.Bundle outState ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , ( "onSaveInstanceState: " + ( mSlotId ) ) ) ; outState.putBoolean ( com.android.stk.StkInputActivity.ACCEPT_USERS_INPUT_KEY , mAcceptUsersInput ) ; outState.putBoolean ( com.android.stk.StkInputActivity.RESPONSE_SENT_KEY , mIsResponseSent ) ; outState.putString ( com.android.stk.StkInputActivity.INPUT_STRING_KEY , mTextIn.getText ( ) . toString ( ) ) ; }
Source:
public java.lang.String getIsimChallengeResponse ( java.lang.String nonce ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimChallengeResponse ( nonce ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
private boolean isImsiEncryptionRequired ( int subId , int keyType ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( mContext.getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; if ( configManager == null ) { return false ; } android.os.PersistableBundle pb = configManager.getConfigForSubId ( subId ) ; if ( pb == null ) { return false ; } int keyAvailability = pb.getInt ( CarrierConfigManager.IMSI_KEY_AVAILABILITY_INT ) ; return android.telephony.TelephonyManager.isKeyEnabled ( keyAvailability , keyType ) ; }
Source:
public void test_selectJ_Empty_Keys ( ) throws java.io.IOException { final long SELECT_TIMEOUT = 2000 ; long time1 = java.lang.System.currentTimeMillis ( ) ; selector.select ( SELECT_TIMEOUT ) ; long time2 = java.lang.System.currentTimeMillis ( ) ; assertEquals ( "elapsed time" , SELECT_TIMEOUT , ( time2 - time1 ) , ( SELECT_TIMEOUT * 0.05 ) ) ; }

Target:
public void test_selectJ_Empty_Keys ( ) throws java.io.IOException { final long SELECT_TIMEOUT_MS = 2000 ; long t0 = java.lang.System.nanoTime ( ) ; selector.select ( SELECT_TIMEOUT_MS ) ; long t1 = java.lang.System.nanoTime ( ) ; long waitMs = ( ( t1 - t0 ) / 1000L ) / 1000L ; assertTrue ( ( waitMs >= SELECT_TIMEOUT_MS ) ) ; assertTrue ( ( waitMs < ( 5 * SELECT_TIMEOUT_MS ) ) ) ; }
Source:
public void testPowerOn ( ) { mSimulatedCommands.setRadioPower ( true , null ) ; mUiccProfile.sendMessage ( mUiccProfile.obtainMessage ( com.android.internal.telephony.uicc.UiccProfileTest.EVENT_RADIO_ON ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( com.android.internal.telephony.uicc.UiccProfileTest.SCARY_SLEEP_MS ) ; org.junit.Assert.assertEquals ( CommandsInterface.RadioState.RADIO_ON , mSimulatedCommands.getRadioState ( ) ) ; org.junit.Assert.assertEquals ( mUiccProfile.getState ( ) , State.NOT_READY ) ; }

Target:
public void tesUiccProfileInfoSanity ( ) { org.junit.Assert.assertEquals ( 1 , mUiccProfile.getNumApplications ( ) ) ; org.junit.Assert.assertNull ( mUiccProfile.getUniversalPinState ( ) ) ; org.junit.Assert.assertNull ( mUiccProfile.getOperatorBrandOverride ( ) ) ; for ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType mAppType : IccCardApplicationStatus.AppType.values ( ) ) { if ( mAppType == ( IccCardApplicationStatus.AppType.APPTYPE_USIM ) ) { org.junit.Assert.assertTrue ( mUiccProfile.isApplicationOnIcc ( mAppType ) ) ; } else { org.junit.Assert.assertFalse ( mUiccProfile.isApplicationOnIcc ( mAppType ) ) ; } } }
Source:
public void testCountingProxy ( ) throws java.lang.Exception { libcore.java.net.FtpURLConnectionTest.CountingProxy countingProxy = libcore.java.net.FtpURLConnectionTest.CountingProxy.start ( ) ; java.net.Socket socket = new java.net.Socket ( ) ; try { try { java.net.Proxy proxy = countingProxy.asProxy ( ) ; assertEquals ( java.net.Proxy.Type.HTTP , proxy.type ( ) ) ; java.net.SocketAddress address = proxy.address ( ) ; socket.connect ( address , 10 ) ; } finally { int numConnections = countingProxy.shutdownAndGetConnectionCount ( ) ; assertEquals ( 1 , numConnections ) ; } } finally { socket.close ( ) ; } }

Target:
public void testCountingProxy ( ) throws java.lang.Exception { java.net.Socket socket = new java.net.Socket ( ) ; try { libcore.java.net.FtpURLConnectionTest.CountingProxy countingProxy = libcore.java.net.FtpURLConnectionTest.CountingProxy.start ( ) ; try { java.net.Proxy proxy = countingProxy.asProxy ( ) ; assertEquals ( java.net.Proxy.Type.HTTP , proxy.type ( ) ) ; java.net.SocketAddress address = proxy.address ( ) ; socket.connect ( address , 200 ) ; countingProxy.waitAndAssertConnectionCount ( 1 ) ; } finally { countingProxy.shutdown ( ) ; } } finally { socket.close ( ) ; } }
Source:
public void testDevPortSane ( ) throws java.lang.Exception { java.io.File f = new java.io.File ( "/dev/port" ) ; assertFalse ( f.canRead ( ) ) ; assertFalse ( f.canWrite ( ) ) ; assertFalse ( f.canExecute ( ) ) ; }

Target:
public void testDevPortSane ( ) throws java.lang.Exception { java.io.File f = new java.io.File ( "/dev/port" ) ; assertFalse ( f.canRead ( ) ) ; assertFalse ( f.canWrite ( ) ) ; assertFalse ( f.canExecute ( ) ) ; assertFalse ( f.exists ( ) ) ; }
Source:
public void init ( boolean forEncryption , org.bouncycastle.crypto.CipherParameters privParam , org.bouncycastle.crypto.CipherParameters pubParam , org.bouncycastle.crypto.CipherParameters param ) { this . forEncryption = forEncryption ; this . privParam = privParam ; this . pubParam = pubParam ; this . param = ( ( org.bouncycastle.crypto.params.IESParameters ) ( param ) ) ; this . V = new byte [ 0 ] ; }

Target:
public void init ( boolean forEncryption , org.bouncycastle.crypto.CipherParameters privParam , org.bouncycastle.crypto.CipherParameters pubParam , org.bouncycastle.crypto.CipherParameters params ) { this . forEncryption = forEncryption ; this . privParam = privParam ; this . pubParam = pubParam ; this . V = new byte [ 0 ] ; extractParams ( params ) ; }
Source:
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 ) ; }

Target:
public void destroy ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { destroy ( ) ; } } ) ; return ; } mAwContents.destroy ( ) ; if ( ( mGLfunctor ) != null ) { mGLfunctor.destroy ( ) ; mGLfunctor = null ; } }
Source:
public void remoteControlDisplayUsesBitmapSize ( android.media.IRemoteControlDisplay rcd , int w , int h ) { mMediaFocusControl.remoteControlDisplayUsesBitmapSize ( rcd , w , h ) ; }

Target:
private void setMicrophoneMuteNoCallerCheck ( boolean on , int userId ) { if ( com.android.server.audio.AudioService.DEBUG_VOL ) { android.util.Log.d ( com.android.server.audio.AudioService.TAG , java.lang.String.format ( "Mic mute %s, user=%d" , on , userId ) ) ; } if ( ( getCurrentUserId ( ) ) == userId ) { android.media.AudioSystem.muteMicrophone ( on ) ; } }
Source:
public void testGerman ( ) throws java.lang.Exception { assertEquals ( ( "res/values-de/typos.xml:6: Warning: \"befindet eine\" is a common misspelling; did you mean \"befindet sich eine\" ? [Typos]\n" + ( ( ( ( ( ( ( ( ( " wo befindet eine ip\n" + " ^\n" ) + "res/values-de/typos.xml:9: Warning: \"Authorisierungscode\" is a common misspelling; did you mean \"Autorisierungscode\" ? [Typos]\n" ) + " <string name=\"s2\">(Authorisierungscode!)</string>\n" ) + " ^\n" ) + "res/values-de/typos.xml:10: Warning: \"zurck gefoobaren\" is a common misspelling; did you mean \"zurckgefoobaren\" ? [Typos]\n" ) + " <string name=\"s3\"> zurck gefoobaren!</string>\n" ) + " ^\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/values-de/typos.xml" ) ) ; }

Target:
public void testGerman ( ) throws java.lang.Exception { assertEquals ( ( "res/values-de/typos.xml:6: Warning: \"befindet eine\" is a common misspelling; did you mean \"befindet sich eine\" ? [Typos]\n" + ( ( ( ( ( ( ( ( ( " wo befindet eine ip\n" + " ^\n" ) + "res/values-de/typos.xml:9: Warning: \"Authorisierungscode\" is a common misspelling; did you mean \"Autorisierungscode\" ? [Typos]\n" ) + " <string name=\"s2\">(Authorisierungscode!)</string>\n" ) + " ^\n" ) + "res/values-de/typos.xml:10: Warning: \"zurück gefoobaren\" is a common misspelling; did you mean \"zurückgefoobaren\" ? [Typos]\n" ) + " <string name=\"s3\"> zurück gefoobaren!</string>\n" ) + " ^\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/values-de/typos.xml" ) ) ; }
Source:
private void addRemoteTool ( com.android.sdklib.repository.FullRevision revision , com.android.sdklib.repository.FullRevision minPlatformToolsRev ) { com.android.sdklib.repository.descriptors.IPkgDesc d = com.android.sdklib.repository.descriptors.PkgDesc.newTool ( revision , minPlatformToolsRev ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemoteTool ( com.android.sdklib.repository.FullRevision revision , com.android.sdklib.repository.FullRevision minPlatformToolsRev ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newTool ( revision , minPlatformToolsRev ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }
Source:
public boolean dispatchTouchEvent ( android.view.MotionEvent ev ) { if ( ( ev.getAction ( ) ) == ( android.view.MotionEvent.ACTION_DOWN ) ) { com.android.contacts.common.interactions.TouchPointManager.getInstance ( ) . setPoint ( ( ( int ) ( ev.getRawX ( ) ) ) , ( ( int ) ( ev.getRawY ( ) ) ) ) ; } return super . dispatchTouchEvent ( ev ) ; }

Target:
public boolean dispatchTouchEvent ( android.view.MotionEvent ev ) { if ( ( ev.getAction ( ) ) == ( android.view.MotionEvent.ACTION_DOWN ) ) { com.android.contacts.interactions.TouchPointManager.getInstance ( ) . setPoint ( ( ( int ) ( ev.getRawX ( ) ) ) , ( ( int ) ( ev.getRawY ( ) ) ) ) ; } return super . dispatchTouchEvent ( ev ) ; }
Source:
public void testGetEmulatedCoreLibraryInvocationTarget_abstractMethod ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( "java/util/Collection" ) ) ; com.google.common.truth.Truth.assertThat ( support.getEmulatedCoreLibraryInvocationTarget ( Opcodes.INVOKEINTERFACE , "java/util/Collection" , "size" , "()I" , true ) ) . isNull ( ) ; com.google.common.truth.Truth.assertThat ( support.getEmulatedCoreLibraryInvocationTarget ( Opcodes.INVOKEVIRTUAL , "java/util/ArrayList" , "size" , "()I" , false ) ) . isNull ( ) ; }

Target:
public void testGetCoreInterfaceRewritingTarget_staticInterfaceMethod ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( "java/util/Comparator" ) ) ; com.google.common.truth.Truth.assertThat ( support.getCoreInterfaceRewritingTarget ( Opcodes.INVOKESTATIC , "java/util/Comparator" , "reverseOrder" , "()Ljava/util/Comparator;" , true ) ) . isEqualTo ( java.util.Comparator.class ) ; }
Source:
public void validatePolicyWithRoamingPartnerWithoutFQDN ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Policy policy = android.net.wifi.hotspot2.pps.PolicyTest.createPolicy ( ) ; android.net.wifi.hotspot2.pps.Policy.RoamingPartner partner = new android.net.wifi.hotspot2.pps.Policy.RoamingPartner ( ) ; partner.fqdnExactMatch = true ; partner.priority = 12 ; partner.countries = "us,jp" ; policy.preferredRoamingPartnerList.add ( partner ) ; org.junit.Assert.assertFalse ( policy.validate ( ) ) ; }

Target:
public void validatePolicyWithRoamingPartnerWithoutCountries ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Policy policy = android.net.wifi.hotspot2.pps.PolicyTest.createPolicy ( ) ; android.net.wifi.hotspot2.pps.Policy.RoamingPartner partner = new android.net.wifi.hotspot2.pps.Policy.RoamingPartner ( ) ; partner.setFqdn ( "test.com" ) ; partner.setFqdnExactMatch ( true ) ; partner.setPriority ( 12 ) ; policy.getPreferredRoamingPartnerList ( ) . add ( partner ) ; org.junit.Assert.assertFalse ( policy.validate ( ) ) ; }
Source:
public boolean canBeForceHidden ( com.android.internal.policy.impl.WindowState win , android.view.WindowManager.LayoutParams attrs ) { return ( ( ( attrs.type ) != ( WindowManager.LayoutParams.TYPE_STATUS_BAR ) ) && ( ( attrs.type ) != ( WindowManager.LayoutParams.TYPE_NAVIGATION_BAR ) ) ) && ( ( attrs.type ) != ( WindowManager.LayoutParams.TYPE_WALLPAPER ) ) ; }

Target:
public boolean canBeForceHidden ( com.android.internal.policy.impl.WindowState win , android.view.WindowManager.LayoutParams attrs ) { switch ( attrs.type ) { case android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR : case android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR : case android.view.WindowManager.LayoutParams.TYPE_WALLPAPER : case android.view.WindowManager.LayoutParams.TYPE_DREAM : case android.view.WindowManager.LayoutParams.TYPE_UNIVERSE_BACKGROUND : case android.view.WindowManager.LayoutParams.TYPE_KEYGUARD : return false ; default : return true ; } }
Source:
public void reset ( ) { com.intellij.openapi.updateSettings.impl.UpdateSettings settings = com.intellij.openapi.updateSettings.impl.UpdateSettings.getInstance ( ) ; myUpdatesSettingsPanel.myCheckForUpdates.setSelected ( settings.isCheckNeeded ( ) ) ; myUpdatesSettingsPanel.myUseSecureConnection.setSelected ( settings.isSecureConnection ( ) ) ; myUpdatesSettingsPanel.updateLastCheckedLabel ( ) ; myUpdatesSettingsPanel.setSelectedChannelType ( com.intellij.openapi.updateSettings.impl.ChannelStatus.fromCode ( settings.getUpdateChannelType ( ) ) ) ; myUpdatesSettingsPanel.setEnabledExternalUpdateSources ( settings.getEnabledExternalUpdateSources ( ) ) ; }

Target:
public void reset ( ) { com.intellij.openapi.updateSettings.impl.UpdateSettings settings = com.intellij.openapi.updateSettings.impl.UpdateSettings.getInstance ( ) ; myUpdatesSettingsPanel.myCheckForUpdates.setSelected ( settings.isCheckNeeded ( ) ) ; myUpdatesSettingsPanel.myUseSecureConnection.setSelected ( settings.isSecureConnection ( ) ) ; myUpdatesSettingsPanel.updateLastCheckedLabel ( ) ; myUpdatesSettingsPanel.setSelectedChannelType ( com.intellij.openapi.updateSettings.impl.ChannelStatus.fromCode ( settings.getUpdateChannelType ( ) ) ) ; myUpdatesSettingsPanel.setEnabledExternalUpdateSources ( settings.getEnabledExternalUpdateSources ( ) ) ; myUpdatesSettingsPanel.setExternalUpdateChannels ( settings.getExternalUpdateChannels ( ) ) ; }
Source:
public void onHelp ( ) { final java.io.PrintWriter pw = getOutPrintWriter ( ) ; pw.println ( "OTA Dexopt (ota) commands:" ) ; pw.println ( " help" ) ; pw.println ( " Print this help text." ) ; pw.println ( "" ) ; pw.println ( " prepare" ) ; pw.println ( " Prepare an OTA dexopt pass, collecting all packages." ) ; pw.println ( " done" ) ; pw.println ( " Replies whether the OTA is complete or not." ) ; pw.println ( " step" ) ; pw.println ( " OTA dexopt the next package." ) ; pw.println ( " cleanup" ) ; pw.println ( " Clean up internal states. Ends an OTA session." ) ; }

Target:
public void onHelp ( ) { final java.io.PrintWriter pw = getOutPrintWriter ( ) ; pw.println ( "OTA Dexopt (ota) commands:" ) ; pw.println ( " help" ) ; pw.println ( " Print this help text." ) ; pw.println ( "" ) ; pw.println ( " prepare" ) ; pw.println ( " Prepare an OTA dexopt pass, collecting all packages." ) ; pw.println ( " done" ) ; pw.println ( " Replies whether the OTA is complete or not." ) ; pw.println ( " step" ) ; pw.println ( " OTA dexopt the next package." ) ; pw.println ( " next" ) ; pw.println ( " Get parameters for OTA dexopt of the next package." ) ; pw.println ( " cleanup" ) ; pw.println ( " Clean up internal states. Ends an OTA session." ) ; }
Source:
public void testN1 ( ) { dot.junit.opcodes.move_exception.d.T_move_exception_1 t = new dot.junit.opcodes.move_exception.d.T_move_exception_1 ( ) ; try { t.run ( ) ; fail ( "ArithmeticException was not thrown" ) ; } catch ( java.lang.ArithmeticException ae ) { } catch ( java.lang.Exception ex ) { fail ( ( ( "Exception " + ex ) + " was thrown instead off ArithmeticException" ) ) ; } }

Target:
public void testVFE1 ( ) { load ( "dot.junit.opcodes.move_exception.d.T_move_exception_3" , java.lang.VerifyError.class ) ; }
Source:
private static native void nativeDrawVertices ( int nCanvas , int mode , int n , float [ ] verts , int vertOffset , float [ ] texs , int texOffset , int [ ] colors , int colorOffset , short [ ] indices , int indexOffset , int indexCount , int nPaint ) ;

Target:
private static native void nativeDrawVertices ( long nativeCanvas , int mode , int n , float [ ] verts , int vertOffset , float [ ] texs , int texOffset , int [ ] colors , int colorOffset , short [ ] indices , int indexOffset , int indexCount , long nativePaint ) ;
Source:
public void onAccuracyChanged ( android.hardware.Sensor sensor , int accuracy ) { }

Target:
private void assertOnErrors ( java.util.List < java.lang.Throwable > errorsFound ) { if ( ! ( errorsFound.isEmpty ( ) ) ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( java.lang.Throwable error : errorsFound ) { builder.append ( error.getMessage ( ) ) . append ( "\n" ) ; } junit.framework.Assert.fail ( builder.toString ( ) ) ; } }
Source:
public void processTerminated ( com.intellij.appengine.actions.ProcessEvent event ) { int exitCode = event.getExitCode ( ) ; if ( exitCode == 0 ) { myCallback.succeeded ( new com.intellij.remoteServer.runtime.deployment.DeploymentRuntime ( ) ) ; } else { myCallback.errorOccurred ( ( "Process terminated with exit code " + exitCode ) ) ; } }

Target:
public void processTerminated ( com.intellij.appengine.actions.ProcessEvent event ) { int exitCode = event.getExitCode ( ) ; if ( exitCode == 0 ) { myCallback.succeeded ( new com.intellij.remoteServer.runtime.deployment.DeploymentRuntime ( ) { @ java.lang.Override public boolean isUndeploySupported ( ) { return false ; } @ java.lang.Override public void undeploy ( @ org.jetbrains.annotations.NotNull com.intellij.appengine.actions.UndeploymentTaskCallback callback ) { } } ) ; } else { myCallback.errorOccurred ( ( "Process terminated with exit code " + exitCode ) ) ; } }
Source:
private int regCodeToServiceState ( int code ) { switch ( code ) { case 0 : case 2 : case 3 : case 4 : case 10 : case 12 : case 13 : case 14 : return android.telephony.ServiceState.STATE_OUT_OF_SERVICE ; case 1 : case 5 : return android.telephony.ServiceState.STATE_IN_SERVICE ; default : loge ( ( "regCodeToServiceState: unexpected service state " + code ) ) ; return android.telephony.ServiceState.STATE_OUT_OF_SERVICE ; } }

Target:
private int regCodeToServiceState ( int code ) { switch ( code ) { case android.telephony.ServiceState.RIL_REG_STATE_HOME : case android.telephony.ServiceState.RIL_REG_STATE_ROAMING : return android.telephony.ServiceState.STATE_IN_SERVICE ; default : return android.telephony.ServiceState.STATE_OUT_OF_SERVICE ; } }
Source:
public void registerMultiFlavorSourceProvider ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String flavorName , @ com.android.annotations.NonNull com.android.builder.model.SourceProvider sourceProvider ) { if ( ( extraArtifactMap.get ( name ) ) == null ) { throw new java.lang.IllegalArgumentException ( "Artifact with name $name is not yet registered. Use registerArtifactType()" ) ; } extraMultiFlavorSourceProviders.put ( flavorName , new com.android.build.gradle.internal.variant.DefaultSourceProviderContainer ( name , sourceProvider ) ) ; }

Target:
public void registerMultiFlavorSourceProvider ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String flavorName , @ com.android.annotations.NonNull com.android.builder.model.SourceProvider sourceProvider ) { if ( ( extraArtifactMap.get ( name ) ) == null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "Artifact with name %1$s is not yet registered. Use registerArtifactType()" , name ) ) ; } extraMultiFlavorSourceProviders.put ( flavorName , new com.android.build.gradle.internal.variant.DefaultSourceProviderContainer ( name , sourceProvider ) ) ; }
Source:
private static void addModuleForBlockingNumberAndOptionallyReportingSpam ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , java.lang.String normalizedNumber , java.lang.String countryIso , int callType ) { modules.add ( new com.android.dialer.contactactions.ContactActionModule ( ) { @ java.lang.Override public int getStringId ( ) { return R.string.block_and_optionally_report_spam ; } @ java.lang.Override public int getDrawableId ( ) { return R.drawable.quantum_ic_block_vd_theme_24 ; } @ java.lang.Override public boolean onClick ( ) { com.android.dialer.blockreportspam.ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumberAndOptionallyReportSpam ( context , normalizedNumber , countryIso , callType ) ; return true ; } } ) ; }

Target:
private static void addModuleForBlockingNumberAndOptionallyReportingSpam ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , java.lang.String normalizedNumber , java.lang.String countryIso , int callType , com.android.dialer.logging.ReportingLocation.Type reportingLocation ) { modules.add ( new com.android.dialer.contactactions.ContactActionModule ( ) { @ java.lang.Override public int getStringId ( ) { return R.string.block_and_optionally_report_spam ; } @ java.lang.Override public int getDrawableId ( ) { return R.drawable.quantum_ic_block_vd_theme_24 ; } @ java.lang.Override public boolean onClick ( ) { com.android.dialer.blockreportspam.ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumberAndOptionallyReportSpam ( context , normalizedNumber , countryIso , callType , reportingLocation ) ; return true ; } } ) ; }
Source:
public static void shutdown ( ) throws java.lang.InterruptedException { synchronized ( com.android.builder.profile.ProcessRecorderFactory.LOCK ) { if ( com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.isInitialized ( ) ) { com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.get ( ) . finish ( ) ; } com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.processRecorder = null ; } }

Target:
private void uploadData ( ) { if ( ( outputFile ) == null ) { return ; } try { java.net.URL u = new java.net.URL ( "http://android-devtools-logging.appspot.com/log/" ) ; java.net.HttpURLConnection conn = null ; conn = ( ( java.net.HttpURLConnection ) ( u.openConnection ( ) ) ) ; conn.setDoOutput ( true ) ; conn.setRequestMethod ( "POST" ) ; conn.setRequestProperty ( "Content-Type" , "application/x-www-form-urlencoded" ) ; conn.setRequestProperty ( "Content-Length" , java.lang.String.valueOf ( outputFile.length ( ) ) ) ; java.io.InputStream is = null ; try { is = new java.io.BufferedInputStream ( new java.io.FileInputStream ( outputFile ) ) ; java.io.OutputStream os = conn.getOutputStream ( ) ; com.google.common.io.ByteStreams.copy ( is , os ) ; os.close ( ) ; } finally { if ( is != null ) { is.close ( ) ; } } java.lang.String line ; java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.InputStreamReader ( conn.getInputStream ( ) ) ) ; while ( ( line = reader.readLine ( ) ) != null ) { if ( ( iLogger ) != null ) { iLogger.info ( ( "From POST : " + line ) ) ; } } reader.close ( ) ; } catch ( java.lang.Exception e ) { if ( ( iLogger ) != null ) { iLogger.warning ( "An exception while generated while uploading the profiler data" ) ; iLogger.error ( e , "Exception while uploading the profiler data" ) ; } } }
Source:
public void testExtraPathWithSlash ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:extra> <r:revision>1</r:revision> <r:path>path</r:path> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:extra>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-complex-type.2.4.a: Invalid content was found starting with element 'r:extra'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testExtraPathWithSlash ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:extra> <r:revision>1</r:revision> <r:path>path</r:path> " ) + "<r:archives> <r:archive> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:extra>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-complex-type.2.4.a: Invalid content was found starting with element 'r:extra'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }
Source:
protected void setUp ( ) { java.security.Provider [ ] providers = java.security.Security.getProviders ( "MessageDigest.SHA" ) ; for ( java.security.Provider provider : providers ) { digestAlgs.put ( provider , getDigestAlgorithms ( provider ) ) ; } }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.security.Provider [ ] providers = java.security.Security.getProviders ( "MessageDigest.SHA" ) ; for ( java.security.Provider provider : providers ) { digestAlgs.put ( provider , getDigestAlgorithms ( provider ) ) ; } sun.security.jca.Providers.setMaximumAllowableApiLevelForBcDeprecation ( dalvik.system.VMRuntime.getRuntime ( ) . getTargetSdkVersion ( ) ) ; }
Source:
public int enableSystemApp ( @ android.annotation.NonNull android.content.ComponentName admin , android.content.Intent intent ) { throwIfParentInstance ( "enableSystemApp" ) ; if ( ( mService ) != null ) { try { return mService.enableSystemAppWithIntent ( admin , intent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return 0 ; }

Target:
public int enableSystemApp ( @ android.annotation.NonNull android.content.ComponentName admin , android.content.Intent intent ) { throwIfParentInstance ( "enableSystemApp" ) ; if ( ( mService ) != null ) { try { return mService.enableSystemAppWithIntent ( admin , mContext.getPackageName ( ) , intent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return 0 ; }
Source:
protected boolean isAvailable ( int service ) { int offset = service / 8 ; if ( offset >= ( mServiceTable.length ) ) { android.util.Log.e ( getTag ( ) , ( ( ( "isAvailable for service " + ( service + 1 ) ) + " fails, max service is " ) + ( ( mServiceTable.length ) * 8 ) ) ) ; return false ; } int bit = service % 8 ; return ( ( mServiceTable [ offset ] ) & ( 1 << bit ) ) != 0 ; }

Target:
protected boolean isAvailable ( int service ) { int offset = service / 8 ; if ( offset >= ( mServiceTable.length ) ) { android.telephony.Rlog.e ( getTag ( ) , ( ( ( "isAvailable for service " + ( service + 1 ) ) + " fails, max service is " ) + ( ( mServiceTable.length ) * 8 ) ) ) ; return false ; } int bit = service % 8 ; return ( ( mServiceTable [ offset ] ) & ( 1 << bit ) ) != 0 ; }
Source:
public static com.android.internal.content.NativeLibraryHelper.Handle create ( java.lang.Package pkg ) throws java.io.IOException { return com.android.internal.content.NativeLibraryHelper.Handle.create ( pkg.getAllCodePaths ( ) , ( ( ( pkg.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_MULTIARCH ) ) != 0 ) , ( ( ( pkg.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_EXTRACT_NATIVE_LIBS ) ) != 0 ) ) ; }

Target:
public static com.android.internal.content.NativeLibraryHelper.Handle create ( java.lang.Package pkg ) throws java.io.IOException { return com.android.internal.content.NativeLibraryHelper.Handle.create ( pkg.getAllCodePaths ( ) , ( ( ( pkg.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_MULTIARCH ) ) != 0 ) , ( ( ( pkg.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_EXTRACT_NATIVE_LIBS ) ) != 0 ) , ( ( ( pkg.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_DEBUGGABLE ) ) != 0 ) ) ; }
Source:
public void test_ConstructorLjava_lang_String ( ) { try { java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( "Wrong.file" ) ; fail ( "Should throw IOException" ) ; } catch ( java.io.IOException e ) { } try { tests.support.resource.Support_Resources.copyFile ( resources , null , jarName ) ; java.lang.String fileName = new java.io.File ( resources , jarName ) . getCanonicalPath ( ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( fileName ) ; } catch ( java.io.IOException e ) { fail ( "Should not throw IOException" ) ; } }

Target:
public void test_ConstructorLjava_lang_String ( ) { try { java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( "Wrong.file" ) ; fail ( "Should throw IOException" ) ; } catch ( java.io.IOException e ) { } try { java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , jarName ) ; java.lang.String fileName = file.getCanonicalPath ( ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( fileName ) ; jarFile.close ( ) ; } catch ( java.io.IOException e ) { fail ( "Should not throw IOException" ) ; } }
Source:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , boolean isConnected , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setLength ( byteCount ) ; if ( ! isConnected ) { packet.setAddress ( srcAddress.getAddress ( ) ) ; packet.setPort ( srcAddress.getPort ( ) ) ; } } return byteCount ; }

Target:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , boolean isConnected , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setReceivedLength ( byteCount ) ; if ( ! isConnected ) { packet.setAddress ( srcAddress.getAddress ( ) ) ; packet.setPort ( srcAddress.getPort ( ) ) ; } } return byteCount ; }
Source:
private static void assertArrayEquals ( byte [ ] expected , byte [ ] actual ) { assertTrue ( ( ( ( "Expected=" + ( java.util.Arrays.toString ( expected ) ) ) + ", actual=" ) + ( java.util.Arrays.toString ( actual ) ) ) , java.util.Arrays.equals ( expected , actual ) ) ; }

Target:
private static void assertArrayEquals ( byte [ ] expected , byte [ ] actual ) { org.junit.Assert.assertTrue ( ( ( ( "Expected=" + ( java.util.Arrays.toString ( expected ) ) ) + ", actual=" ) + ( java.util.Arrays.toString ( actual ) ) ) , java.util.Arrays.equals ( expected , actual ) ) ; }
Source:
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 ) ; }

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 ) . addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToLib ( 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 removeRegistrationListener ( int slotId , int featureType , com.android.ims.internal.IImsRegistrationListener listener ) throws android.os.RemoteException { enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , "removeRegistrationListener" ) ; synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.removeRegistrationListener ( listener ) ; } } }

Target:
public void removeRegistrationListener ( int slotId , int featureType , com.android.ims.internal.IImsRegistrationListener listener ) throws android.os.RemoteException { enforceReadPhoneStatePermission ( "removeRegistrationListener" ) ; synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.removeRegistrationListener ( listener ) ; } } }
Source:
public void testHugeZipFile ( ) throws java.io.IOException { int expectedEntryCount = ( 64 * 1024 ) - 1 ; java.io.File f = createHugeZipFile ( expectedEntryCount ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { java.util.zip.ZipEntry zipEntry = e.nextElement ( ) ; ++ entryCount ; } assertEquals ( expectedEntryCount , entryCount ) ; zipFile.close ( ) ; }

Target:
public void testZipFileWithLotsOfEntries ( ) throws java.io.IOException { int expectedEntryCount = ( 64 * 1024 ) - 1 ; java.io.File f = createZipFile ( expectedEntryCount , 0 ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { java.util.zip.ZipEntry zipEntry = e.nextElement ( ) ; ++ entryCount ; } assertEquals ( expectedEntryCount , entryCount ) ; zipFile.close ( ) ; }