auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private int [ ] getSupportedPlaybackFormats ( ) { return new int [ ] { MtpConstants.FORMAT_UNDEFINED , MtpConstants.FORMAT_ASSOCIATION , MtpConstants.FORMAT_TEXT , MtpConstants.FORMAT_HTML , MtpConstants.FORMAT_WAV , MtpConstants.FORMAT_MP3 , MtpConstants.FORMAT_MPEG , MtpConstants.FORMAT_EXIF_JPEG , MtpConstants.FORMAT_TIFF_EP , MtpConstants.FORMAT_GIF , MtpConstants.FORMAT_JFIF , MtpConstants.FORMAT_PNG , MtpConstants.FORMAT_TIFF , MtpConstants.FORMAT_WMA , MtpConstants.FORMAT_OGG , MtpConstants.FORMAT_AAC , MtpConstants.FORMAT_MP4_CONTAINER , MtpConstants.FORMAT_MP2 , MtpConstants.FORMAT_3GP_CONTAINER , MtpConstants.FORMAT_ABSTRACT_AV_PLAYLIST , MtpConstants.FORMAT_WPL_PLAYLIST , MtpConstants.FORMAT_M3U_PLAYLIST , MtpConstants.FORMAT_PLS_PLAYLIST , MtpConstants.FORMAT_XML_DOCUMENT , MtpConstants.FORMAT_FLAC } ; }

Target:
private int [ ] getSupportedPlaybackFormats ( ) { return new int [ ] { MtpConstants.FORMAT_UNDEFINED , MtpConstants.FORMAT_ASSOCIATION , MtpConstants.FORMAT_TEXT , MtpConstants.FORMAT_HTML , MtpConstants.FORMAT_WAV , MtpConstants.FORMAT_MP3 , MtpConstants.FORMAT_MPEG , MtpConstants.FORMAT_EXIF_JPEG , MtpConstants.FORMAT_TIFF_EP , MtpConstants.FORMAT_BMP , MtpConstants.FORMAT_GIF , MtpConstants.FORMAT_JFIF , MtpConstants.FORMAT_PNG , MtpConstants.FORMAT_TIFF , MtpConstants.FORMAT_WMA , MtpConstants.FORMAT_OGG , MtpConstants.FORMAT_AAC , MtpConstants.FORMAT_MP4_CONTAINER , MtpConstants.FORMAT_MP2 , MtpConstants.FORMAT_3GP_CONTAINER , MtpConstants.FORMAT_ABSTRACT_AV_PLAYLIST , MtpConstants.FORMAT_WPL_PLAYLIST , MtpConstants.FORMAT_M3U_PLAYLIST , MtpConstants.FORMAT_PLS_PLAYLIST , MtpConstants.FORMAT_XML_DOCUMENT , MtpConstants.FORMAT_FLAC } ; }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { client.setEnabledProtocols ( new java.lang.String [ ] { "SSLv3" } ) ; client.setEnabledCipherSuites ( clientCipherSuites ) ; try { client.startHandshake ( ) ; fail ( "Should receive TLS alert inappropriate fallback" ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } return null ; }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { client.setEnabledProtocols ( new java.lang.String [ ] { "SSLv3" } ) ; client.setEnabledCipherSuites ( clientCipherSuites ) ; try { client.startHandshake ( ) ; fail ( "Should receive TLS alert inappropriate fallback" ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { java.lang.Throwable cause = expected.getCause ( ) ; assertEquals ( javax.net.ssl.SSLProtocolException.class , cause.getClass ( ) ) ; assertTrue ( cause.getMessage ( ) , cause.getMessage ( ) . contains ( "inappropriate fallback" ) ) ; } return null ; }
Source:
public void setUp ( ) { mTestSuite = new com.android.tradefed.testtype.suite.ITestSuiteTest.TestSuiteImpl ( ) ; mMockListener = org.easymock.EasyMock.createMock ( com.android.tradefed.result.ITestInvocationListener.class ) ; mMockDevice = org.easymock.EasyMock.createMock ( com.android.tradefed.device.ITestDevice.class ) ; org.easymock.EasyMock.expect ( mMockDevice.getSerialNumber ( ) ) . andStubReturn ( "SERIAL" ) ; mMockBuildInfo = org.easymock.EasyMock.createMock ( com.android.tradefed.build.IBuildInfo.class ) ; mMockSysChecker = org.easymock.EasyMock.createMock ( com.android.tradefed.suite.checker.ISystemStatusChecker.class ) ; mTestSuite.setDevice ( mMockDevice ) ; mTestSuite.setBuild ( mMockBuildInfo ) ; }

Target:
public void setUp ( ) { mTestSuite = new com.android.tradefed.testtype.suite.ITestSuiteTest.TestSuiteImpl ( ) ; mMockListener = org.easymock.EasyMock.createMock ( com.android.tradefed.result.ITestInvocationListener.class ) ; mMockDevice = org.easymock.EasyMock.createMock ( com.android.tradefed.device.ITestDevice.class ) ; org.easymock.EasyMock.expect ( mMockDevice.getSerialNumber ( ) ) . andStubReturn ( "SERIAL" ) ; mMockBuildInfo = org.easymock.EasyMock.createMock ( com.android.tradefed.build.IBuildInfo.class ) ; mMockSysChecker = org.easymock.EasyMock.createMock ( com.android.tradefed.suite.checker.ISystemStatusChecker.class ) ; mTestSuite.setDevice ( mMockDevice ) ; mTestSuite.setBuild ( mMockBuildInfo ) ; mContext = new com.android.tradefed.invoker.InvocationContext ( ) ; mTestSuite.setInvocationContext ( mContext ) ; }
Source:
protected java.io.File getTargetDir ( ) { java.lang.String sdk = java.lang.System.getenv ( "ADT_SDK_SOURCE_PATH" ) ; if ( sdk != null ) { java.io.File sdkPath = new java.io.File ( sdk ) ; if ( sdkPath.exists ( ) ) { java.io.File testData = new java.io.File ( sdkPath , com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.TEST_DATA_REL_PATH.replace ( '/' , java.io.File.separatorChar ) ) ; if ( testData.exists ( ) ) { return testData ; } } } return getTempDir ( ) ; }

Target:
protected java.lang.String getTestDataRelPath ( ) { return "eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/" + "internal/editors/layout/refactoring/testdata" ; }
Source:
public void testIsInitialized ( ) { assertTrue ( resettingStubber.isInitialized ( ) ) ; resettingStubber.reset ( ) ; assertFalse ( resettingStubber.isInitialized ( ) ) ; resettingStubber.initialize ( ) ; assertTrue ( resettingStubber.isInitialized ( ) ) ; }

Target:
public void isInitialized ( ) { org.junit.Assert.assertTrue ( resettingStubber.isInitialized ( ) ) ; resettingStubber.reset ( ) ; org.junit.Assert.assertFalse ( resettingStubber.isInitialized ( ) ) ; resettingStubber.initialize ( ) ; org.junit.Assert.assertTrue ( resettingStubber.isInitialized ( ) ) ; }
Source:
void clearCurMethodLocked ( ) { if ( ( mCurMethod ) != null ) { for ( com.android.server.InputMethodManagerService.ClientState cs : mClients.values ( ) ) { cs.sessionRequested = false ; cs.curSession = null ; } mCurMethod = null ; } mStatusBar.setIconVisibility ( mInputMethodIcon , false ) ; }

Target:
void clearCurMethodLocked ( ) { if ( ( mCurMethod ) != null ) { for ( com.android.server.InputMethodManagerService.ClientState cs : mClients.values ( ) ) { cs.sessionRequested = false ; finishSession ( cs.curSession ) ; cs.curSession = null ; } finishSession ( mEnabledSession ) ; mEnabledSession = null ; mCurMethod = null ; } mStatusBar.setIconVisibility ( mInputMethodIcon , false ) ; }
Source:
public void testEnums ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/TestEnum.java:26: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( " case OVERLAY: {\n" + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:37: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " case OVERLAY: {\n" ) + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:61: Error: Class requires API level 11 (current min is 4): android.renderscript.Element.DataType [NewApi]\n" ) + " switch (type) {\n" ) + " ^\n" ) + "src/test/pkg/TestEnum.java:61: Error: Enum for switch requires API level 11 (current min is 4): android.renderscript.Element.DataType [NewApi]\n" ) + " switch (type) {\n" ) + " ^\n" ) + "4 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk4.xml=>AndroidManifest.xml" , "apicheck/TestEnum.java.txt=>src/test/pkg/TestEnum.java" , "apicheck/TestEnum.class.data=>bin/classes/test/pkg/TestEnum.class" ) ) ; }

Target:
public void testEnums ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/TestEnum.java:26: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( " case OVERLAY: {\n" + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:37: Error: Enum value requires API level 11 (current min is 4): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " case OVERLAY: {\n" ) + " ~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:58: Error: Class requires API level 11 (current min is 4): android.renderscript.Element.DataType [NewApi]\n" ) + " public static void test4(final android.renderscript.Element.DataType type) {\n" ) + " ~~~~~~~~\n" ) + "src/test/pkg/TestEnum.java:61: Error: Enum for switch requires API level 11 (current min is 4): android.renderscript.Element.DataType [NewApi]\n" ) + " switch (type) {\n" ) + " ^\n" ) + "4 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk4.xml=>AndroidManifest.xml" , "apicheck/TestEnum.java.txt=>src/test/pkg/TestEnum.java" , "apicheck/TestEnum.class.data=>bin/classes/test/pkg/TestEnum.class" ) ) ; }
Source:
public void releaseSecurityParameterIndex ( int resourceId ) throws android.os.RemoteException { releaseManagedResource ( mSpiRecords , resourceId , "SecurityParameterIndex" ) ; }

Target:
protected void releaseResources ( ) { if ( mOwnedByTransform ) { android.util.Log.d ( com.android.server.IpSecService.TAG , ( ( "Cannot release Spi " + ( mSpi ) ) + ": Currently locked by a Transform" ) ) ; return ; } try { mSrvConfig.getNetdInstance ( ) . ipSecDeleteSecurityAssociation ( mResourceId , mDirection , mLocalAddress , mRemoteAddress , mSpi ) ; } catch ( android.os.ServiceSpecificException e ) { } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.IpSecService.TAG , ( "Failed to delete SPI reservation with ID: " + ( mResourceId ) ) ) ; } mSpi = android.net.IpSecManager.INVALID_SECURITY_PARAMETER_INDEX ; }
Source:
private native boolean nativeParse3339 ( java.lang.String s ) ;

Target:
private void checkChar ( java.lang.String s , int spos , char expected ) { char c = s.charAt ( spos ) ; if ( c != expected ) { throw new android.util.TimeFormatException ( java.lang.String.format ( "Unexpected character 0x%02d at pos=%d. Expected 0x%02d (\'%c\')." , ( ( int ) ( c ) ) , spos , ( ( int ) ( expected ) ) , expected ) ) ; } }
Source:
public void testWrongPort ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( "AndroidManifest.xml:20: Error: android:port is not a legal number [AppIndexingError]\n" + " android:port=\"ABCD\"\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + "\n" ) + " <application\n" ) + " android:allowBackup=\"true\"\n" ) + " android:icon=\"@mipmap/ic_launcher\"\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >\n" ) + " <activity\n" ) + " android:name=\".FullscreenActivity\"\n" ) + " android:configChanges=\"orientation|keyboardHidden|screenSize\"\n" ) + " android:label=\"@string/title_activity_fullscreen\"\n" ) + " android:theme=\"@style/FullscreenTheme\" >\n" ) + " <intent-filter android:label=\"@string/title_activity_fullscreen\">\n" ) + " <action android:name=\"android.intent.action.VIEW\" />\n" ) + " <!-- Accepts URIs that begin with \"http://example.com/gizmos” -->\n" ) + " <data android:scheme=\"http\"\n" ) + " android:host=\"example.com\"\n" ) + " android:port=\"ABCD\"\n" ) + " android:pathPrefix=\"/gizmos\" />\n" ) + " <category android:name=\"android.intent.category.DEFAULT\" />\n" ) + " <category android:name=\"android.intent.category.BROWSABLE\" />\n" ) + " </intent-filter>\n" ) + " </activity>\n" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }

Target:
public void testWrongPort ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( "AndroidManifest.xml:19: Error: android:port is not a legal number [AppIndexingError]\n" + " android:port=\"ABCD\"\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + "\n" ) + " <application\n" ) + " android:allowBackup=\"true\"\n" ) + " android:icon=\"@mipmap/ic_launcher\"\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >\n" ) + " <activity\n" ) + " android:name=\".FullscreenActivity\"\n" ) + " android:configChanges=\"orientation|keyboardHidden|screenSize\"\n" ) + " android:label=\"@string/title_activity_fullscreen\"\n" ) + " android:theme=\"@style/FullscreenTheme\" >\n" ) + " <intent-filter android:label=\"@string/title_activity_fullscreen\">\n" ) + " <action android:name=\"android.intent.action.VIEW\" />\n" ) + " <data android:scheme=\"http\"\n" ) + " android:host=\"example.com\"\n" ) + " android:port=\"ABCD\"\n" ) + " android:pathPrefix=\"/gizmos\" />\n" ) + " <category android:name=\"android.intent.category.DEFAULT\" />\n" ) + " <category android:name=\"android.intent.category.BROWSABLE\" />\n" ) + " </intent-filter>\n" ) + " </activity>\n" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }
Source:
public java.net.Socket createSocket ( java.lang.String host , int port ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( host , port ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }

Target:
public java.net.Socket createSocket ( java.lang.String host , int port ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( host , port ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.String file = getClass ( ) . getResource ( "/dialer.android-hprof" ) . getFile ( ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( file ) ; java.io.BufferedInputStream bis = new java.io.BufferedInputStream ( fis ) ; java.io.DataInputStream dis = new java.io.DataInputStream ( bis ) ; try { mSnapshot = new com.android.tools.perflib.heap.HprofParser ( dis ) . parse ( ) ; } finally { com.google.common.io.Closeables.close ( dis , false ) ; } }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.io.File file = new java.io.File ( getClass ( ) . getResource ( "/dialer.android-hprof" ) . getFile ( ) ) ; mSnapshot = new com.android.tools.perflib.heap.HprofParser ( new com.android.tools.perflib.heap.io.MemoryMappedFileBuffer ( file ) ) . parse ( ) ; }
Source:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { if ( ! ( mAcceptUsersInput ) ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , "mAcceptUsersInput:false" ) ; return true ; } switch ( item.getItemId ( ) ) { case StkApp.MENU_ID_END_SESSION : mAcceptUsersInput = false ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_END_SESSION ) ; finish ( ) ; return true ; case StkApp.MENU_ID_HELP : mAcceptUsersInput = false ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_INPUT , "" , true ) ; finish ( ) ; return true ; } return super . onOptionsItemSelected ( item ) ; }

Target:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { if ( optionsItemSelectedInternal ( item ) ) { return true ; } return super . onOptionsItemSelected ( item ) ; }
Source:
public void testCannotAccessScanResults_NoCoarseLocationPermission ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mLocationModeSetting = Settings.Secure.LOCATION_MODE_HIGH_ACCURACY ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }

Target:
public void testCannotAccessScanResults_NoCoarseLocationPermission ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mLocationModeSetting = Settings.Secure.LOCATION_MODE_HIGH_ACCURACY ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }
Source:
public void testAbiOnlyWithNoMatch ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 2 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertNull ( result ) ; }

Target:
public void testAbiOnlyWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 2 ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( 0 , result.size ( ) ) ; }
Source:
synchronized boolean reportError ( byte error ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( "reportError(): error = " + error ) ) ; return reportErrorNative ( error ) ; }

Target:
synchronized boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; if ( ! ( checkDevice ( device ) ) ) { return false ; } return reportErrorNative ( error ) ; }
Source:
public static void runJill ( @ javax.annotation.Nonnull java.io.File inputFile , @ javax.annotation.Nonnull java.io.File outputFile ) throws java.lang.Exception { java.lang.String [ ] args = new java.lang.String [ ] { "-o" , outputFile.getAbsolutePath ( ) , inputFile.getAbsolutePath ( ) } ; com.android.jill.Options options = com.android.jill.Main.getOptions ( args ) ; new com.android.jill.Jill ( options , "" ) . process ( options.getBinaryFile ( ) ) ; }

Target:
public static void runJill ( @ javax.annotation.Nonnull java.io.File inputFile , @ javax.annotation.Nonnull java.io.File outputFile ) throws java.lang.Exception { java.lang.String [ ] args = new java.lang.String [ ] { "--output" , outputFile.getAbsolutePath ( ) , inputFile.getAbsolutePath ( ) } ; com.android.jill.Options options = com.android.jill.Main.getOptions ( args ) ; new com.android.jill.Jill ( options , "" ) . process ( options.getBinaryFile ( ) ) ; }
Source:
private void initializeGlobals ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_refcount s ) { com.android.rs.test.Type.Builder typeBuilder = new com.android.rs.test.Type.Builder ( RS , com.android.rs.test.Element.I32 ( RS ) ) ; int X = 500 ; int Y = 700 ; typeBuilder.setX ( X ) . setY ( Y ) ; com.android.rs.test.Allocation A = com.android.rs.test.Allocation.createTyped ( RS , typeBuilder.create ( ) ) ; s.set_globalA ( A ) ; }

Target:
private void initializeGlobals ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_refcount s ) { android.renderscript.Type.Builder typeBuilder = new android.renderscript.Type.Builder ( RS , android.renderscript.Element.I32 ( RS ) ) ; int X = 500 ; int Y = 700 ; typeBuilder.setX ( X ) . setY ( Y ) ; android.renderscript.Allocation A = android.renderscript.Allocation.createTyped ( RS , typeBuilder.create ( ) ) ; s.set_globalA ( A ) ; }
Source:
public void reportError ( @ com.android.annotations.Nullable com.android.tools.gradle.eclipse.EclipseProject project , @ com.android.annotations.Nullable java.io.File file , @ com.android.annotations.NonNull java.lang.String message ) throws java.io.IOException { java.lang.String text = com.android.tools.gradle.eclipse.GradleImport.formatMessage ( ( project != null ? project.getName ( ) : null ) , file , message ) ; mErrors.add ( text ) ; throw new java.io.IOException ( text ) ; }

Target:
public void reportError ( @ com.android.annotations.Nullable com.android.tools.gradle.eclipse.EclipseProject project , @ com.android.annotations.Nullable java.io.File file , @ com.android.annotations.NonNull java.lang.String message , boolean abort ) { java.lang.String text = com.android.tools.gradle.eclipse.GradleImport.formatMessage ( ( project != null ? project.getName ( ) : null ) , file , message ) ; mErrors.add ( text ) ; if ( abort ) { throw new com.android.tools.gradle.eclipse.GradleImport.ImportException ( text ) ; } }
Source:
public void testInnerClass ( ) throws java.lang.Exception { assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:23: Error: Class referenced in the manifest, test.pkg.Foo.Baz, was not found in the project or the libraries [MissingRegistered]\n" ) + " <activity\n" ) + " ^\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "registration/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "registration/Foo.java.txt=>src/test/pkg/Foo.java" ) ) ; }

Target:
public void testInnerClass ( ) throws java.lang.Exception { mScopes = null ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:23: Error: Class referenced in the manifest, test.pkg.Foo.Baz, was not found in the project or the libraries [MissingRegistered]\n" ) + " <activity\n" ) + " ^\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "registration/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "registration/Foo.java.txt=>src/test/pkg/Foo.java" ) ) ; }
Source:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm64 " ) ; if ( device.noBootImageAvailable ( ) ) { commandBuilder.append ( "-Ximage:/data/art-test/core.art -Xnorelocate " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }

Target:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm64 -Xcompiler-option --compiler-backend=Quick " ) ; if ( device.noBootImageAvailable ( ) ) { commandBuilder.append ( "-Ximage:/data/art-test/core.art -Xnorelocate " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }
Source:
private boolean isSynthetic ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVariable var ) { return ( ( ( ( var.isSynthetic ( ) ) || ( var.getName ( ) . startsWith ( "-p_" ) ) ) || ( var.getName ( ) . startsWith ( "-l_" ) ) ) || ( var.getName ( ) . startsWith ( "-s_" ) ) ) || ( var.getName ( ) . startsWith ( "-e_" ) ) ; }

Target:
private boolean isSynthetic ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVariable var ) { if ( var.isSynthetic ( ) ) { return true ; } java.lang.String varName = var.getName ( ) ; if ( varName == null ) { return false ; } return ( ( ( varName.startsWith ( "-p_" ) ) || ( varName.startsWith ( "-l_" ) ) ) || ( varName.startsWith ( "-s_" ) ) ) || ( varName.startsWith ( "-e_" ) ) ; }
Source:
public void testAesCbcHmacSha512Udp4UdpEncap ( ) 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_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
private static android.net.IpSecTransform buildIpSecTransform ( android.content.Context mContext , android.net.IpSecManager.SecurityParameterIndex spi , android.net.IpSecManager.UdpEncapsulationSocket encapSocket , java.net.InetAddress remoteAddr ) throws java.lang.Exception { java.lang.String localAddr = ( remoteAddr instanceof java.net.Inet4Address ) ? android.net.cts.IpSecManagerTest.IPV4_LOOPBACK : android.net.cts.IpSecManagerTest.IPV6_LOOPBACK ; return new android.net.IpSecTransform.Builder ( mContext ) . setEncryption ( new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ) . setAuthentication ( new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , android.net.cts.IpSecManagerTest.AUTH_KEY , ( ( android.net.cts.IpSecManagerTest.AUTH_KEY.length ) * 4 ) ) ) . setIpv4Encapsulation ( encapSocket , encapSocket.getPort ( ) ) . buildTransportModeTransform ( java.net.InetAddress.getByName ( localAddr ) , spi ) ; }
Source:
protected int getDefaultTcpRwnd ( ) { return 0 ; }

Target:
protected com.android.server.connectivity.MockableSystemProperties getSystemProperties ( ) { mSystemProperties = org.mockito.Mockito.spy ( new com.android.server.connectivity.MockableSystemProperties ( ) ) ; org.mockito.Mockito.when ( mSystemProperties.getInt ( "net.tcp.default_init_rwnd" , 0 ) ) . thenReturn ( 0 ) ; org.mockito.Mockito.when ( mSystemProperties.getBoolean ( "ro.radio.noril" , false ) ) . thenReturn ( false ) ; return mSystemProperties ; }
Source:
public boolean hasResourceItem ( @ com.android.annotations.NonNull com.android.resources.ResourceType type , @ com.android.annotations.NonNull java.lang.String name ) { java.util.Map < java.lang.String , com.android.ide.common.resources.ResourceItem > map = mResourceMap.get ( type ) ; if ( map != null ) { com.android.ide.common.resources.ResourceItem resourceItem = map.get ( name ) ; if ( resourceItem != null ) { return true ; } } return false ; }

Target:
public boolean hasResourceItem ( @ com.android.annotations.NonNull com.android.resources.ResourceType type , @ com.android.annotations.NonNull java.lang.String name ) { ensureInitialized ( ) ; java.util.Map < java.lang.String , com.android.ide.common.resources.ResourceItem > map = mResourceMap.get ( type ) ; if ( map != null ) { com.android.ide.common.resources.ResourceItem resourceItem = map.get ( name ) ; if ( resourceItem != null ) { return true ; } } return false ; }
Source:
protected void onOverScrolled ( int scrollX , int scrollY , boolean clampedX , boolean clampedY ) { if ( ! ( mScroller.isFinished ( ) ) ) { mScrollX = scrollX ; mScrollY = scrollY ; if ( clampedY ) { mScroller.springBack ( mScrollX , mScrollY , 0 , 0 , 0 , getScrollRange ( ) ) ; } } else { super . scrollTo ( scrollX , scrollY ) ; } awakenScrollBars ( ) ; }

Target:
protected void onOverScrolled ( int scrollX , int scrollY , boolean clampedX , boolean clampedY ) { if ( ! ( mScroller.isFinished ( ) ) ) { mScrollX = scrollX ; mScrollY = scrollY ; invalidateParentIfNeeded ( ) ; if ( clampedY ) { mScroller.springBack ( mScrollX , mScrollY , 0 , 0 , 0 , getScrollRange ( ) ) ; } } else { super . scrollTo ( scrollX , scrollY ) ; } awakenScrollBars ( ) ; }
Source:
public void visitClassElementValue ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Annotation annotation , proguard.classfile.editor.ClassElementValue classElementValue ) { java.lang.String className = clazz.getString ( classElementValue.u2classInfoIndex ) ; java.lang.String newClassName = proguard.classfile.editor.ClassReferenceFixer.newDescriptor ( className , classElementValue.referencedClasses ) ; if ( ! ( className.equals ( newClassName ) ) ) { classElementValue.u2classInfoIndex = new proguard.classfile.editor.ConstantPoolEditor ( ( ( proguard.classfile.editor.ProgramClass ) ( clazz ) ) ) . addUtf8Constant ( newClassName ) ; } }

Target:
public void visitClassElementValue ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Annotation annotation , proguard.classfile.editor.ClassElementValue classElementValue ) { java.lang.String className = classElementValue.getClassName ( clazz ) ; java.lang.String newClassName = proguard.classfile.editor.ClassReferenceFixer.newDescriptor ( className , classElementValue.referencedClasses ) ; if ( ! ( className.equals ( newClassName ) ) ) { classElementValue.u2classInfoIndex = new proguard.classfile.editor.ConstantPoolEditor ( ( ( proguard.classfile.editor.ProgramClass ) ( clazz ) ) ) . addUtf8Constant ( newClassName ) ; } }
Source:
public void testUntouchedDateChanged ( ) throws java.lang.Exception { com.android.builder.internal.incremental.FileManager fileManager = getFileManager ( ) ; java.util.Map < java.io.File , com.android.builder.resources.FileStatus > changedFiles = fileManager.getChangedFiles ( ) ; java.io.File file = new java.io.File ( com.android.builder.internal.incremental.FileManagerTest.sFilesFolder , "untouched_date_changed.png" ) ; com.android.builder.resources.FileStatus status = changedFiles.get ( file ) ; assertNull ( status ) ; }

Target:
public void testUntouchedDateBefore ( ) throws java.lang.Exception { com.android.builder.internal.incremental.FileManager fileManager = getFileManager ( ) ; java.util.Map < java.io.File , com.android.builder.resources.FileStatus > changedFiles = fileManager.getChangedFiles ( ) ; java.io.File file = new java.io.File ( com.android.builder.internal.incremental.FileManagerTest.sFilesFolder , "untouched_date_before.png" ) ; com.android.builder.resources.FileStatus status = changedFiles.get ( file ) ; assertNull ( status ) ; }
Source:
private void showNotification ( final com.android.incallui.call.DialerCall call ) { android.os.Trace.beginSection ( "StatusBarNotifier.showNotification" ) ; final boolean isIncoming = ( ( call.getState ( ) ) == ( DialerCall.State.INCOMING ) ) || ( ( call.getState ( ) ) == ( DialerCall.State.CALL_WAITING ) ) ; setStatusBarCallListener ( new com.android.incallui.StatusBarNotifier.StatusBarCallListener ( call ) ) ; contactInfoCache.findInfo ( call , isIncoming , this ) ; android.os.Trace.endSection ( ) ; }

Target:
private void showNotification ( final com.android.incallui.call.DialerCall call ) { android.os.Trace.beginSection ( "StatusBarNotifier.showNotification" ) ; final boolean isIncoming = ( ( call.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.INCOMING ) ) || ( ( call.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.CALL_WAITING ) ) ; setStatusBarCallListener ( new com.android.incallui.StatusBarNotifier.StatusBarCallListener ( call ) ) ; contactInfoCache.findInfo ( call , isIncoming , this ) ; android.os.Trace.endSection ( ) ; }
Source:
public boolean endCall ( ) { try { android.telecom.Log.startSession ( "TSI.eC" ) ; synchronized ( mLock ) { enforceModifyPermission ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { return endCallInternal ( ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { android.telecom.Log.endSession ( ) ; } }

Target:
public boolean endCall ( java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.eC" ) ; synchronized ( mLock ) { enforceModifyPermission ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { return endCallInternal ( callingPackage ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public boolean sameItemAs ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.AddonPackage ) { com.android.sdklib.internal.repository.packages.AddonPackage newPkg = ( ( com.android.sdklib.internal.repository.packages.AddonPackage ) ( pkg ) ) ; if ( ( getNameId ( ) . equals ( newPkg.getNameId ( ) ) ) && ( getVersion ( ) . equals ( newPkg.getVersion ( ) ) ) ) { if ( getVendorId ( ) . equals ( newPkg.getVendorId ( ) ) ) { return true ; } return getDisplayVendor ( ) . equals ( newPkg.getDisplayVendor ( ) ) ; } } return false ; }

Target:
public boolean sameItemAs ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.AddonPackage ) { com.android.sdklib.internal.repository.packages.AddonPackage newPkg = ( ( com.android.sdklib.internal.repository.packages.AddonPackage ) ( pkg ) ) ; if ( ( getNameId ( ) . equals ( newPkg.getNameId ( ) ) ) && ( getAndroidVersion ( ) . equals ( newPkg.getAndroidVersion ( ) ) ) ) { if ( getVendorId ( ) . equals ( newPkg.getVendorId ( ) ) ) { return true ; } return getDisplayVendor ( ) . equals ( newPkg.getDisplayVendor ( ) ) ; } } return false ; }
Source:
public void testApplyingWithoutCriticalFiles ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( "from" , "to" , myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertTrue ( com.intellij.updater.PatchFileCreator.apply ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testApplyingWithoutCriticalFiles ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertTrue ( com.intellij.updater.PatchFileCreator.apply ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) , com.intellij.updater.TEST_UI ) ) ; }
Source:
public void waitForRequests ( ) throws java.lang.InterruptedException { assertNotNull ( "Nothing to wait for" , mExpectations ) ; mExpectations.await ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ; final long count = mExpectations.getCount ( ) ; final java.lang.String msg = ( ( ( ( count + " requests still not " ) + ( mExpectingAdditions ? "added" : "removed" ) ) + " after " ) + ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS ) ) + " ms" ; assertEquals ( msg , 0 , count ) ; mExpectations = null ; }

Target:
public void waitForRequests ( ) throws java.lang.InterruptedException { org.junit.Assert.assertNotNull ( "Nothing to wait for" , mExpectations ) ; mExpectations.await ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ; final long count = mExpectations.getCount ( ) ; final java.lang.String msg = ( ( ( ( count + " requests still not " ) + ( mExpectingAdditions ? "added" : "removed" ) ) + " after " ) + ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS ) ) + " ms" ; org.junit.Assert.assertEquals ( msg , 0 , count ) ; mExpectations = null ; }
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:
public void disableIms ( int slotId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { telephony.disableIms ( slotId ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "disableIms, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public final int startActivityFromRecents ( int taskId , android.os.Bundle options ) { if ( ( checkCallingPermission ( android.Manifest.permission.START_TASKS_FROM_RECENTS ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { java.lang.String msg = "Permission Denial: startActivityFromRecents called without " + ( android.Manifest.permission.START_TASKS_FROM_RECENTS ) ; android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , msg ) ; throw new java.lang.SecurityException ( msg ) ; } return startActivityFromRecentsInner ( taskId , options ) ; }

Target:
public final int startActivityFromRecents ( int taskId , android.os.Bundle bOptions ) { if ( ( checkCallingPermission ( android.Manifest.permission.START_TASKS_FROM_RECENTS ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { java.lang.String msg = "Permission Denial: startActivityFromRecents called without " + ( android.Manifest.permission.START_TASKS_FROM_RECENTS ) ; android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , msg ) ; throw new java.lang.SecurityException ( msg ) ; } final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { return mStackSupervisor.startActivityFromRecentsInner ( taskId , bOptions ) ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
public static long getMobileTcpRxPackets ( ) { long total = 0 ; for ( java.lang.String iface : android.net.TrafficStats.getMobileIfaces ( ) ) { final long stat = android.net.TrafficStats.nativeGetIfaceStat ( iface , android.net.TrafficStats.TYPE_TCP_RX_PACKETS ) ; if ( stat != ( android.net.TrafficStats.UNSUPPORTED ) ) { total += stat ; } } return total ; }

Target:
public static long getMobileTcpRxPackets ( ) { long total = 0 ; for ( java.lang.String iface : android.net.TrafficStats.getMobileIfaces ( ) ) { long stat = android.net.TrafficStats.UNSUPPORTED ; try { stat = android.net.TrafficStats.getStatsService ( ) . getIfaceStats ( iface , android.net.TrafficStats.TYPE_TCP_RX_PACKETS ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } if ( stat != ( android.net.TrafficStats.UNSUPPORTED ) ) { total += stat ; } } return total ; }
Source:
private void loadDraft ( ) { if ( mWorkingMessage.isWorthSaving ( ) ) { android.util.Log.w ( com.android.mms.ui.ComposeMessageActivity.TAG , "called with non-empty working message" ) ; return ; } if ( android.util.Log.isLoggable ( LogTag.APP , Log.VERBOSE ) ) { com.android.mms.ui.ComposeMessageActivity.log ( "call WorkingMessage.loadDraft" ) ; } mWorkingMessage = com.android.mms.data.WorkingMessage.loadDraft ( this , mConversation ) ; }

Target:
public void run ( ) { drawTopPanel ( false ) ; drawBottomPanel ( ) ; }
Source:
public void testGetDownloadStatus ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = android.telephony.embms.cts.DOWNLOAD_REQUEST_TEMPLATE.build ( ) ; mDownloadSession.getDownloadStatus ( request , CtsDownloadService.FILE_INFO ) ; java.util.List < android.os.Bundle > getDownloadStatusCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_GET_DOWNLOAD_STATUS ) ; assertEquals ( 1 , getDownloadStatusCalls.size ( ) ) ; assertEquals ( request , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; assertEquals ( CtsDownloadService.FILE_INFO , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_FILE_INFO ) ) ; }

Target:
public void testGetDownloadStatus ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = android.telephony.embms.cts.DOWNLOAD_REQUEST_TEMPLATE.build ( ) ; mDownloadSession.requestDownloadState ( request , CtsDownloadService.FILE_INFO ) ; java.util.List < android.os.Bundle > getDownloadStatusCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_GET_DOWNLOAD_STATUS ) ; assertEquals ( 1 , getDownloadStatusCalls.size ( ) ) ; assertEquals ( request , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; assertEquals ( CtsDownloadService.FILE_INFO , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_FILE_INFO ) ) ; }
Source:
private boolean result ( java.lang.String testName , final com.android.rs.test.UT_reduce.timing t , final int [ ] javaRslt , final int [ ] rsRslt ) { return result ( testName , t , intArrayToLong ( javaRslt ) , intArrayToLong ( rsRslt ) ) ; }

Target:
private boolean findMinAbsBool ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinAbs ( RS , createInputArrayFloat ( size [ 0 ] , seed ) , "findMinAbsBool" , ( com.android.rs.test.Allocation input ) -> s.reduce_findMinAbsBool ( input ) . get ( ) ) ; }
Source:
private static boolean isPermutation ( java.util.List < ? > first , java.util.List < ? > second ) { if ( ( first.size ( ) ) != ( second.size ( ) ) ) { return false ; } com.google.common.collect.Multiset < ? > firstSet = com.google.common.collect.HashMultiset.create ( first ) ; com.google.common.collect.Multiset < ? > secondSet = com.google.common.collect.HashMultiset.create ( second ) ; return firstSet.equals ( secondSet ) ; }

Target:
private static boolean isPermutation ( java.util.List < ? > first , java.util.List < ? > second ) { if ( ( first.size ( ) ) != ( second.size ( ) ) ) { return false ; } com.google.common.collect.Multiset < ? > firstMultiset = com.google.common.collect.HashMultiset.create ( first ) ; com.google.common.collect.Multiset < ? > secondMultiset = com.google.common.collect.HashMultiset.create ( second ) ; return firstMultiset.equals ( secondMultiset ) ; }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newPlatform ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision minToolsRev ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_PLATFORMS ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getMinToolsRev ( ) { return minToolsRev ; } @ java.lang.Override public java.lang.String getPath ( ) { return com.android.sdklib.AndroidTargetHash.getPlatformHashString ( getAndroidVersion ( ) ) ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; } } ; }

Target:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newPlatform ( @ com.android.annotations.NonNull com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull com.android.sdklib.repository.FullRevision minToolsRev ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_PLATFORMS ) ; p.mAndroidVersion = version ; p.mMajorRevision = revision ; p.mMinToolsRev = minToolsRev ; p.mCustomPath = new com.android.sdklib.repository.descriptors.PkgDesc.IGetPath ( ) { @ java.lang.Override public java.lang.String getPath ( com.android.sdklib.repository.descriptors.PkgDesc thisPkgDesc ) { return com.android.sdklib.AndroidTargetHash.getPlatformHashString ( thisPkgDesc.getAndroidVersion ( ) ) ; } } ; return p ; }
Source:
private static java.util.List < java.lang.String > getProductFlavorNames ( @ com.android.annotations.NonNull com.android.build.gradle.internal.variant.BaseVariantData < ? extends com.android.build.gradle.internal.variant.BaseVariantOutputData > variantData ) { java.util.List < com.android.build.gradle.internal.dsl.GroupableProductFlavor > productFlavors = variantData.getVariantConfiguration ( ) . getProductFlavors ( ) ; java.util.List < java.lang.String > flavorNames = com.google.common.collect.Lists.newArrayListWithCapacity ( productFlavors.size ( ) ) ; for ( com.android.builder.core.DefaultProductFlavor flavor : productFlavors ) { flavorNames.add ( flavor.getName ( ) ) ; } return flavorNames ; }

Target:
private static java.util.List < java.lang.String > getProductFlavorNames ( @ com.android.annotations.NonNull com.android.build.gradle.internal.variant.BaseVariantData < ? extends com.android.build.gradle.internal.variant.BaseVariantOutputData > variantData ) { java.util.List < com.android.build.gradle.internal.dsl.CoreProductFlavor > productFlavors = variantData.getVariantConfiguration ( ) . getProductFlavors ( ) ; java.util.List < java.lang.String > flavorNames = com.google.common.collect.Lists.newArrayListWithCapacity ( productFlavors.size ( ) ) ; for ( com.android.builder.model.ProductFlavor flavor : productFlavors ) { flavorNames.add ( flavor.getName ( ) ) ; } return flavorNames ; }
Source:
protected void assertGeneratedSources ( java.lang.String moduleName , java.lang.String ... expectedSources ) { com.intellij.openapi.externalSystem.test.ContentEntry contentRoot = getContentRoot ( moduleName ) ; java.util.List < com.intellij.openapi.externalSystem.test.ContentFolder > folders = new java.util.ArrayList < com.intellij.openapi.externalSystem.test.ContentFolder > ( ) ; for ( com.intellij.openapi.externalSystem.test.SourceFolder folder : contentRoot.getSourceFolders ( JavaSourceRootType.SOURCE ) ) { org.jetbrains.jps.model.java.JavaSourceRootProperties properties = folder.getJpsElement ( ) . getProperties ( JavaSourceRootType.SOURCE ) ; assertNotNull ( properties ) ; if ( properties.isForGeneratedSources ( ) ) { folders.add ( folder ) ; } } doAssertContentFolders ( contentRoot , folders , expectedSources ) ; }

Target:
private void assertGeneratedSources ( java.lang.String moduleName , org.jetbrains.jps.model.java.JavaSourceRootType type , java.lang.String ... expectedSources ) { com.intellij.openapi.externalSystem.test.ContentEntry contentRoot = getContentRoot ( moduleName ) ; java.util.List < com.intellij.openapi.externalSystem.test.ContentFolder > folders = new java.util.ArrayList < com.intellij.openapi.externalSystem.test.ContentFolder > ( ) ; for ( com.intellij.openapi.externalSystem.test.SourceFolder folder : contentRoot.getSourceFolders ( type ) ) { org.jetbrains.jps.model.java.JavaSourceRootProperties properties = folder.getJpsElement ( ) . getProperties ( type ) ; assertNotNull ( properties ) ; if ( properties.isForGeneratedSources ( ) ) { folders.add ( folder ) ; } } doAssertContentFolders ( contentRoot , folders , expectedSources ) ; }