auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testPx ( ) throws java.lang.Exception { assertEquals ( ( "res/layout/now_playing_after.xml:49: Warning: Avoid using \"mm\" as units (it does not work accurately on all devices); use \"dp\" instead [InOrMmUsage]\n" + ( ( ( ( ( ( ( ( " android:layout_width=\"100mm\"\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/now_playing_after.xml:50: Warning: Avoid using \"in\" as units (it does not work accurately on all devices); use \"dp\" instead [InOrMmUsage]\n" ) + " android:layout_height=\"120in\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/now_playing_after.xml:41: Warning: Avoid using \"px\" as units; use \"dp\" instead [PxUsage]\n" ) + " android:layout_width=\"1px\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintFiles ( "res/layout/now_playing_after.xml" ) ) ; }

Target:
public void testPx ( ) throws java.lang.Exception { assertEquals ( ( "res/layout/now_playing_after.xml:49: Warning: Avoid using \"mm\" as units (it does not work accurately on all devices); use \"dp\" instead [InOrMmUsage]\n" + ( ( ( ( ( ( ( ( " android:layout_width=\"100mm\"\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/now_playing_after.xml:50: Warning: Avoid using \"in\" as units (it does not work accurately on all devices); use \"dp\" instead [InOrMmUsage]\n" ) + " android:layout_height=\"120in\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/now_playing_after.xml:41: Warning: Avoid using \"px\" as units; use \"dp\" instead [PxUsage]\n" ) + " android:layout_width=\"2px\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintFiles ( "res/layout/now_playing_after.xml" ) ) ; }
Source:
void awaitTermination ( java.lang.Thread t , long timeoutMillis ) { try { t.join ( timeoutMillis ) ; } catch ( java.lang.InterruptedException ie ) { threadUnexpectedException ( ie ) ; } finally { if ( ( t.getState ( ) ) != ( java.lang.Thread.State.TERMINATED ) ) { t.interrupt ( ) ; fail ( "Test timed out" ) ; } } }

Target:
< T > void checkTimedGet ( java.util.concurrent.Future < T > f , T expectedValue , long timeoutMillis ) { long startTime = java.lang.System.nanoTime ( ) ; try { assertEquals ( expectedValue , f.get ( timeoutMillis , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ; } catch ( java.lang.Throwable fail ) { threadUnexpectedException ( fail ) ; } if ( ( jsr166.JSR166TestCase.millisElapsedSince ( startTime ) ) > ( timeoutMillis / 2 ) ) throw new junit.framework.AssertionFailedError ( "timed get did not return promptly" ) ; }
Source:
public boolean removeCallbacks ( java.lang.Runnable action ) { android.os.Handler handler ; if ( ( mAttachInfo ) != null ) { handler = mAttachInfo.mHandler ; } else { android.view.ViewRoot.getRunQueue ( ) . removeCallbacks ( action ) ; return true ; } handler.removeCallbacks ( action ) ; return true ; }

Target:
public boolean removeCallbacks ( java.lang.Runnable action ) { android.os.Handler handler ; android.view.View.AttachInfo attachInfo = mAttachInfo ; if ( attachInfo != null ) { handler = attachInfo.mHandler ; } else { android.view.ViewRootImpl.getRunQueue ( ) . removeCallbacks ( action ) ; return true ; } handler.removeCallbacks ( action ) ; return true ; }
Source:
public void testExistsOnSystem ( ) throws android.system.ErrnoException { assertEquals ( "SECCOMP filter is not installed." , 0 , libcore.java.io.FileTest.installSeccompFilter ( ) ) ; java.io.File sh = new java.io.File ( "/sdcard" ) ; assertTrue ( sh.exists ( ) ) ; }

Target:
public void testExistsOnSystem ( ) throws android.system.ErrnoException , java.io.IOException { java.io.File tmpFile = java.io.File.createTempFile ( "testExistsOnSystem" , ".tmp" ) ; try { assertEquals ( "SECCOMP filter is not installed." , 0 , libcore.java.io.FileTest.installSeccompFilter ( ) ) ; try { android.system.Os.stat ( tmpFile.getAbsolutePath ( ) ) ; fail ( ) ; } catch ( android.system.ErrnoException expected ) { assertEquals ( OsConstants.EPERM , expected.errno ) ; } assertTrue ( tmpFile.exists ( ) ) ; } finally { tmpFile.delete ( ) ; } }
Source:
public void networkAgentMayBeNull ( ) throws java.lang.Exception { mWifiInfo.setRssi ( ( - 33 ) ) ; mWifiScoreReport.enableVerboseLogging ( true ) ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , null , 0 , mWifiMetrics ) ; org.mockito.Mockito.verify ( mWifiMetrics ) . incrementWifiScoreCount ( org.mockito.Mockito.anyInt ( ) ) ; }

Target:
public void networkAgentMayBeNull ( ) throws java.lang.Exception { mWifiInfo.setRssi ( ( - 33 ) ) ; mWifiScoreReport.enableVerboseLogging ( true ) ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , null , mAggr , mWifiMetrics ) ; org.mockito.Mockito.verify ( mWifiMetrics ) . incrementWifiScoreCount ( org.mockito.Mockito.anyInt ( ) ) ; }
Source:
public void enablingVerboseLoggingIncreasesLogRecSize ( ) { org.junit.Assert.assertTrue ( ( ( com.android.server.wifi.WifiStateMachineTest.LOG_REC_LIMIT_IN_VERBOSE_MODE ) > ( WifiStateMachine.NUM_LOG_RECS_NORMAL ) ) ) ; mWsm.enableVerboseLogging ( 1 ) ; for ( int i = 0 ; i < ( ( com.android.server.wifi.WifiStateMachineTest.LOG_REC_LIMIT_IN_VERBOSE_MODE ) * 2 ) ; i ++ ) { mWsm.sendMessage ( WifiStateMachine.CMD_DISCONNECT ) ; } mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachineTest.LOG_REC_LIMIT_IN_VERBOSE_MODE , mWsm.getLogRecSize ( ) ) ; }

Target:
public void disablingVerboseLoggingClearsRecords ( ) { mWsm.sendMessage ( WifiStateMachine.CMD_DISCONNECT ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertTrue ( ( ( mWsm.getLogRecSize ( ) ) >= 1 ) ) ; mWsm.enableVerboseLogging ( 0 ) ; org.junit.Assert.assertEquals ( 0 , mWsm.getLogRecSize ( ) ) ; }
Source:
private java.nio.ByteBuffer getNextAvailableByteBuffer ( java.nio.ByteBuffer [ ] buffers , int offset , int length ) { for ( int i = offset ; i < length ; ++ i ) { if ( ( buffers [ i ] . remaining ( ) ) > 0 ) { return buffers [ i ] ; } } return null ; }

Target:
private static void checkIndex ( int arrayLength , int offset , int length , java.lang.String arrayName ) { if ( ( ( offset | length ) < 0 ) || ( ( offset + length ) > arrayLength ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( ( ( ( ( "offset: " + offset ) + ", length: " ) + length ) + " (expected: offset <= offset + length <= " ) + arrayName ) + ".length (" ) + arrayLength ) + "))" ) ) ; } }
Source:
private void sendMessage ( int what , com.android.bluetooth.gatt.ScanClient client ) { android.os.Message message = new android.os.Message ( ) ; message.what = what ; message.obj = client ; mHandler.sendMessage ( message ) ; }

Target:
private void sendMessage ( int what , com.android.bluetooth.gatt.ScanClient client ) { final com.android.bluetooth.gatt.ScanManager.ClientHandler handler = mHandler ; if ( handler == null ) { android.util.Log.d ( com.android.bluetooth.gatt.ScanManager.TAG , "sendMessage: mHandler is null." ) ; return ; } android.os.Message message = new android.os.Message ( ) ; message.what = what ; message.obj = client ; handler.sendMessage ( message ) ; }
Source:
java.lang.Integer getNetworkScore ( android.net.wifi.ScanResult scanResult , com.android.server.wifi.WifiNetworkScoreCache scoreCache ) { if ( ( scoreCache != null ) && ( scoreCache.isScoredNetwork ( scanResult ) ) ) { int score = scoreCache.getNetworkScore ( scanResult , false ) ; localLog ( ( ( ( com.android.server.wifi.WifiNetworkSelector.toScanId ( scanResult ) ) + " has score: " ) + score ) ) ; return score ; } return null ; }

Target:
java.lang.Integer getNetworkScore ( android.net.wifi.ScanResult scanResult , com.android.server.wifi.WifiNetworkScoreCache scoreCache , boolean active ) { if ( ( scoreCache != null ) && ( scoreCache.isScoredNetwork ( scanResult ) ) ) { int score = scoreCache.getNetworkScore ( scanResult , active ) ; localLog ( ( ( ( ( ( com.android.server.wifi.WifiNetworkSelector.toScanId ( scanResult ) ) + " has score: " ) + score ) + " active network: " ) + active ) ) ; return score ; } return null ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mInstrumentation = getInstrumentation ( ) ; mContext = mInstrumentation.getTargetContext ( ) ; mIntent = new android.content.Intent ( mContext , android.app.stubs.InstrumentationTestActivity.class ) ; mIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mActivity = ( ( android.app.stubs.InstrumentationTestActivity ) ( mInstrumentation.startActivitySync ( mIntent ) ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mInstrumentation = getInstrumentation ( ) ; mContext = mInstrumentation.getTargetContext ( ) ; mIntent = new android.content.Intent ( mContext , android.app.stubs.InstrumentationTestActivity.class ) ; mIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mActivity = ( ( android.app.stubs.InstrumentationTestActivity ) ( mInstrumentation.startActivitySync ( mIntent ) ) ) ; com.android.compatibility.common.util.PollingCheck.waitFor ( mActivity :: hasWindowFocus ) ; }
Source:
public void run ( ) { sortPackages ( true ) ; }

Target:
private void loadPackages ( ) { if ( ( mUpdaterData ) == null ) { return ; } try { enableUi ( mGroupPackages , false ) ; boolean firstLoad = mPkgManager.getPackages ( ) . isEmpty ( ) ; mPkgManager.loadPackages ( ) ; if ( firstLoad ) { expandInitial ( mCategories ) ; } } finally { enableUi ( mGroupPackages , true ) ; updateButtonsState ( ) ; } }
Source:
public void listen ( android.telephony.PhoneStateListener listener , int events ) { java.lang.String pkgForDebug = ( ( android.telephony.TelephonyManager.sContext ) != null ) ? android.telephony.TelephonyManager.sContext.getPackageName ( ) : "<unknown>" ; try { java.lang.Boolean notifyNow = ( getITelephony ( ) ) != null ; android.telephony.TelephonyManager.sRegistry.listen ( pkgForDebug , listener.callback , events , notifyNow ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }

Target:
public void setCellInfoListRate ( int rateInMillis ) { try { getITelephony ( ) . setCellInfoListRate ( rateInMillis ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }
Source:
private java.lang.String getReportName ( java.lang.String suiteName ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; BRANCH ( b54bd4 ) ; com.android.cts.verifier.Configurable verifier ; am : java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; com.android.cts.verifier.a8ed1f Merge ; }

Target:
private java.lang.String getReportBaseName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd-HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return ( ( ( ( ( ( ( ( ( "ctsVerifierReport" + "-" ) + date ) + "-" ) + ( android.os.Build.MANUFACTURER ) ) + "-" ) + ( android.os.Build.PRODUCT ) ) + "-" ) + ( android.os.Build.DEVICE ) ) + "-" ) + ( android.os.Build.ID ) ; }
Source:
private com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder processFolder ( com.android.io.IAbstractFolder folder , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources project ) { java.lang.String [ ] folderSegments = folder.getName ( ) . split ( FolderConfiguration.QUALIFIER_SEP ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType type = com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType.getTypeByName ( folderSegments [ 0 ] ) ; if ( type != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = getConfig ( folderSegments ) ; if ( config != null ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder configuredFolder = project.add ( type , config , folder ) ; return configuredFolder ; } } return null ; }

Target:
private com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder processFolder ( com.android.io.IAbstractFolder folder , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources project ) { java.lang.String [ ] folderSegments = folder.getName ( ) . split ( AndroidConstants.RES_QUALIFIER_SEP ) ; com.android.resources.ResourceFolderType type = com.android.resources.ResourceFolderType.getTypeByName ( folderSegments [ 0 ] ) ; if ( type != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = getConfig ( folderSegments ) ; if ( config != null ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder configuredFolder = project.add ( type , config , folder ) ; return configuredFolder ; } } return null ; }
Source:
private static boolean nitzOffsetMightBeBogus ( com.android.internal.telephony.NitzData nitzData ) { return ( ( nitzData.getLocalOffsetMillis ( ) ) == 0 ) && ( ! ( nitzData.isDst ( ) ) ) ; }

Target:
private boolean isNitzSignalOffsetInfoBogus ( com.android.internal.telephony.util.TimeStampedValue < com.android.internal.telephony.NitzData > nitzSignal , java.lang.String isoCountryCode ) { if ( android.text.TextUtils.isEmpty ( isoCountryCode ) ) { return false ; } com.android.internal.telephony.NitzData newNitzData = nitzSignal.mValue ; boolean zeroOffsetNitz = ( ( newNitzData.getLocalOffsetMillis ( ) ) == 0 ) && ( ! ( newNitzData.isDst ( ) ) ) ; return zeroOffsetNitz && ( ! ( countryUsesUtc ( isoCountryCode , nitzSignal ) ) ) ; }
Source:
protected void doRevert ( java.io.File toFile , java.io.File backupFile ) throws java.io.IOException { com.intellij.updater.Utils.delete ( toFile ) ; com.intellij.updater.Utils.copy ( backupFile , toFile ) ; }

Target:
protected void doRevert ( java.io.File toFile , java.io.File backupFile ) throws java.io.IOException { if ( ( ! ( toFile.exists ( ) ) ) || ( isModified ( toFile ) ) ) { com.intellij.updater.Utils.delete ( toFile ) ; com.intellij.updater.Utils.copy ( backupFile , toFile ) ; } }
Source:
public void validateCopyConstructorFromValidSource ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.HomeSP sourceSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; sourceSp.fqdn = "fqdn" ; sourceSp.friendlyName = "friendlyName" ; sourceSp.roamingConsortiumOIs = new long [ ] { 85 , 102 } ; android.net.wifi.hotspot2.pps.HomeSP copySp = new android.net.wifi.hotspot2.pps.HomeSP ( sourceSp ) ; org.junit.Assert.assertTrue ( copySp.equals ( sourceSp ) ) ; }

Target:
public void validateHomeSpWithInvalidHomeNetworkIds ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.HomeSP homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; homeSp.fqdn = "fqdn" ; homeSp.friendlyName = "friendly name" ; homeSp.homeNetworkIds = new java.util.HashMap < > ( ) ; byte [ ] rawSsidBytes = new byte [ 33 ] ; java.util.Arrays.fill ( rawSsidBytes , ( ( byte ) ( 'a' ) ) ) ; homeSp.homeNetworkIds.put ( android.net.wifi.hotspot2.pps.StringFactory.newStringFromBytes ( rawSsidBytes , java.nio.charset.StandardCharsets.UTF_8 ) , 4660L ) ; org.junit.Assert.assertFalse ( homeSp.validate ( ) ) ; }
Source:
boolean startScoUsingVirtualVoiceCall ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { final com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , ( ( "startScoUsingVirtualVoiceCall: device " + device ) + " was never connected/connecting" ) ) ; return false ; } stateMachine.sendMessage ( HeadsetStateMachine.VIRTUAL_CALL_START , device ) ; } return true ; }

Target:
boolean startScoUsingVirtualVoiceCall ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; synchronized ( mStateMachines ) { final com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , ( ( "startScoUsingVirtualVoiceCall: device " + device ) + " was never connected/connecting" ) ) ; return false ; } stateMachine.sendMessage ( HeadsetStateMachine.VIRTUAL_CALL_START , device ) ; } return true ; }
Source:
public static java.lang.String getSyntheticSwitchMapInitializerName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String enumName = com.android.jack.util.NamingTools.getValidName ( com.android.jack.ir.formatter.BinaryQualifiedNameFormatter.getFormatter ( ) . getName ( enumType ) ) ; java.lang.String methodName = com.android.jack.util.NamingTools.getNonSourceConflictingName ( ( ( "get" + enumName ) + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ) ) ; return methodName ; }

Target:
public static java.lang.String getSyntheticSwitchMapInitializerName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String enumName = com.android.jack.ir.formatter.BinaryQualifiedNameFormatter.getFormatter ( ) . getName ( enumType ) ; return com.android.jack.util.NamingTools.getStrictNonSourceConflictingName ( ( ( "get" + enumName ) + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ) ) ; }
Source:
public com.android.ide.eclipse.adt.internal.resources.manager.ResourceRepository loadFrameworkResources ( com.android.sdklib.IAndroidTarget androidTarget ) { java.lang.String osResourcesPath = androidTarget.getPath ( IAndroidTarget.RESOURCES ) ; com.android.io.FolderWrapper frameworkRes = new com.android.io.FolderWrapper ( osResourcesPath ) ; if ( frameworkRes.exists ( ) ) { com.android.ide.eclipse.adt.internal.resources.manager.FrameworkResources resources = new com.android.ide.eclipse.adt.internal.resources.manager.FrameworkResources ( ) ; try { loadResources ( resources , frameworkRes ) ; resources.loadPublicResources ( frameworkRes ) ; return resources ; } catch ( java.io.IOException e ) { } } return null ; }

Target:
public com.android.ide.eclipse.adt.internal.resources.manager.ResourceRepository loadFrameworkResources ( com.android.sdklib.IAndroidTarget androidTarget ) { java.lang.String osResourcesPath = androidTarget.getPath ( IAndroidTarget.RESOURCES ) ; com.android.io.FolderWrapper frameworkRes = new com.android.io.FolderWrapper ( osResourcesPath ) ; if ( frameworkRes.exists ( ) ) { com.android.ide.eclipse.adt.internal.resources.manager.FrameworkResources resources = new com.android.ide.eclipse.adt.internal.resources.manager.FrameworkResources ( ) ; try { loadResources ( resources , frameworkRes ) ; resources.loadPublicResources ( frameworkRes , com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) ; return resources ; } catch ( java.io.IOException e ) { } } return null ; }
Source:
private java.util.Set < ? extends javax.lang.model.element.Element > getElementsAnnotatedWith ( @ javax.annotation.Nonnull javax.annotation.processing.RoundEnvironment roundEnv , @ javax.annotation.Nonnull java.lang.Class < ? extends java.lang.annotation.Annotation > cls ) { assert ( env ) != null ; java.lang.String name = cls.getCanonicalName ( ) ; assert name != null ; javax.lang.model.element.TypeElement element = env.getElementUtils ( ) . getTypeElement ( name ) ; assert element != null ; return roundEnv.getElementsAnnotatedWith ( element ) ; }

Target:
private java.util.Set < ? extends javax.lang.model.element.Element > getElementsAnnotatedWith ( @ javax.annotation.Nonnull javax.annotation.processing.RoundEnvironment roundEnv , @ javax.annotation.Nonnull com.android.sched.build.SchedAnnotationProcessor.Items item ) throws com.android.sched.build.SchedAnnotationProcessor.AbortException { assert ( env ) != null ; return roundEnv.getElementsAnnotatedWith ( item.getTypeElement ( ) ) ; }
Source:
public void test_getCertificateChain ( ) { init ( tests.api.javax.net.ssl.X509KeyManagerTest.SERVER ) ; assertNull ( "Not NULL for NULL parameter" , manager.getCertificateChain ( null ) ) ; assertNull ( "Not NULL for empty parameter" , manager.getCertificateChain ( "" ) ) ; assertNull ( "Not NULL for clientAlias_01 parameter" , manager.getCertificateChain ( "clientAlias_01" ) ) ; assertNull ( "Not NULL for serverAlias_00 parameter" , manager.getCertificateChain ( "serverAlias_00" ) ) ; }

Target:
public void test_getCertificateChain ( ) { init ( org.apache.harmony.tests.javax.net.ssl.X509KeyManagerTest.SERVER ) ; assertNull ( "Not NULL for NULL parameter" , manager.getCertificateChain ( null ) ) ; assertNull ( "Not NULL for empty parameter" , manager.getCertificateChain ( "" ) ) ; assertNull ( "Not NULL for clientAlias_01 parameter" , manager.getCertificateChain ( "clientAlias_01" ) ) ; assertNull ( "Not NULL for serverAlias_00 parameter" , manager.getCertificateChain ( "serverAlias_00" ) ) ; }
Source:
public void testGetContentType ( ) throws java.io.IOException { assertEquals ( "application/rtf" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.rtf" ) ) ; assertEquals ( "text/plain" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.java" ) ) ; assertEquals ( "application/msword" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.doc" ) ) ; assertEquals ( "text/html" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.htx" ) ) ; assertEquals ( "application/xml" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "test.xml" ) ) ; assertEquals ( "text/plain" , tests.api.internal.net.www.protocol.file.FileURLConnectionTest.getContentType ( "." ) ) ; }

Target:
public void testGetContentType ( ) throws java.io.IOException { assertEquals ( "text/rtf" , getContentType ( "test.rtf" ) ) ; assertEquals ( "application/msword" , getContentType ( "test.doc" ) ) ; assertEquals ( "text/html" , getContentType ( "test.htx" ) ) ; assertEquals ( "text/xml" , getContentType ( "test.xml" ) ) ; assertEquals ( "text/html" , new libcore.net.url.FileURLConnection ( new java.net.URL ( "file:///" ) ) . getContentType ( ) ) ; }
Source:
private void expectFailedEventScan ( org.mockito.InOrder order , com.android.server.wifi.WifiNative.ScanEventHandler eventHandler , java.util.Set < java.lang.Integer > scanFreqs , java.util.Set < java.lang.Integer > networkIds ) { order.verify ( mWifiNative ) . scan ( eq ( scanFreqs ) , eq ( networkIds ) ) ; mWifiMonitor.sendMessage ( mWifiNative.getInterfaceName ( ) , WifiMonitor.SCAN_FAILED_EVENT ) ; assertEquals ( "dispatch message after results event" , 1 , mLooper.dispatchAll ( ) ) ; }

Target:
private void expectFailedEventScan ( org.mockito.InOrder order , com.android.server.wifi.WifiNative.ScanEventHandler eventHandler , java.util.Set < java.lang.Integer > scanFreqs ) { order.verify ( mWifiNative ) . scan ( eq ( scanFreqs ) , any ( java.util.Set.class ) ) ; mWifiMonitor.sendMessage ( mWifiNative.getInterfaceName ( ) , WifiMonitor.SCAN_FAILED_EVENT ) ; assertEquals ( "dispatch message after results event" , 1 , mLooper.dispatchAll ( ) ) ; }
Source:
public boolean onKey ( android.view.View view , int keyCode , android.view.KeyEvent event ) { if ( ( keyCode == ( android.view.KeyEvent.KEYCODE_ENTER ) ) && ( ( event.getAction ( ) ) == ( android.view.KeyEvent.ACTION_UP ) ) ) { loadUrlFromUrlBar ( view ) ; return true ; } return false ; }

Target:
public void onGeolocationPermissionsShowPrompt ( java.lang.String origin , android.webkit.GeolocationPermissions.Callback callback ) { onPermissionRequest ( new org.chromium.webview_shell.WebViewBrowserActivity.GeoPermissionRequest ( origin , callback ) ) ; }
Source:
public void testCarrierPriviledgeLoadedListener ( ) { mUiccProfile.registerForCarrierPrivilegeRulesLoaded ( mMockedHandler , com.android.internal.telephony.uicc.UiccProfileTest.UICCPROFILE_CARRIER_PRIVILEDGE_LOADED_EVENT , null ) ; org.mockito.ArgumentCaptor < android.os.Message > mCaptorMessage = org.mockito.ArgumentCaptor.forClass ( android.os.Message.class ) ; org.mockito.ArgumentCaptor < java.lang.Long > mCaptorLong = org.mockito.ArgumentCaptor.forClass ( java.lang.Long.class ) ; testUpdateUiccProfile ( ) ; org.mockito.Mockito.verify ( mMockedHandler , org.mockito.Mockito.times ( 1 ) ) . sendMessageDelayed ( mCaptorMessage.capture ( ) , mCaptorLong.capture ( ) ) ; org.junit.Assert.assertEquals ( com.android.internal.telephony.uicc.UiccProfileTest.UICCPROFILE_CARRIER_PRIVILEDGE_LOADED_EVENT , mCaptorMessage.getValue ( ) . what ) ; }

Target:
public void testCarrierPriviledgeLoadedListener ( ) { mUiccProfile.registerForCarrierPrivilegeRulesLoaded ( mMockedHandler , com.android.internal.telephony.uicc.UiccProfileTest.UICCPROFILE_CARRIER_PRIVILEDGE_LOADED_EVENT , null ) ; org.mockito.ArgumentCaptor < android.os.Message > mCaptorMessage = org.mockito.ArgumentCaptor.forClass ( android.os.Message.class ) ; org.mockito.ArgumentCaptor < java.lang.Long > mCaptorLong = org.mockito.ArgumentCaptor.forClass ( java.lang.Long.class ) ; testUpdateUiccProfile ( ) ; org.mockito.Mockito.verify ( mMockedHandler , org.mockito.Mockito.atLeast ( 1 ) ) . sendMessageDelayed ( mCaptorMessage.capture ( ) , mCaptorLong.capture ( ) ) ; org.junit.Assert.assertEquals ( com.android.internal.telephony.uicc.UiccProfileTest.UICCPROFILE_CARRIER_PRIVILEDGE_LOADED_EVENT , mCaptorMessage.getValue ( ) . what ) ; }
Source:
public void testAnyOfMatcherWithMoreThanOneMatch ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) org.hamcrest.Matcher < android.net.Uri > anyOfMatcher = org.hamcrest.CoreMatchers.anyOf ( android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( org.hamcrest.CoreMatchers.equalTo ( "www.google.com" ) ) , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( org.hamcrest.CoreMatchers.equalTo ( "/search" ) ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithName ( org.hamcrest.CoreMatchers.equalTo ( "param2" ) ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithValue ( org.hamcrest.CoreMatchers.equalTo ( "ie" ) , org.hamcrest.CoreMatchers.equalTo ( "UTF-8" ) ) ) ; assertTrue ( "AnyOf matcher didn't match" , anyOfMatcher.matches ( uri ) ) ; }

Target:
public void anyOfMatcherWithMoreThanOneMatch ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) org.hamcrest.Matcher < android.net.Uri > anyOfMatcher = org.hamcrest.CoreMatchers.anyOf ( android.support.test.espresso.intent.matcher.UriMatchers.hasHost ( org.hamcrest.CoreMatchers.equalTo ( "www.google.com" ) ) , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( org.hamcrest.CoreMatchers.equalTo ( "/search" ) ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithName ( org.hamcrest.CoreMatchers.equalTo ( "param2" ) ) , android.support.test.espresso.intent.matcher.UriMatchers.hasParamWithValue ( org.hamcrest.CoreMatchers.equalTo ( "ie" ) , org.hamcrest.CoreMatchers.equalTo ( "UTF-8" ) ) ) ; org.junit.Assert.assertTrue ( "AnyOf matcher didn't match" , anyOfMatcher.matches ( uri ) ) ; }
Source:
public void normalLogRecSizeIsUsedByDefault ( ) { for ( int i = 0 ; i < ( ( WifiStateMachine.NUM_LOG_RECS_NORMAL ) * 2 ) ; i ++ ) { mWsm.sendMessage ( WifiStateMachine.CMD_DISCONNECT ) ; } mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( WifiStateMachine.NUM_LOG_RECS_NORMAL , mWsm.getLogRecSize ( ) ) ; }

Target:
public void canForgetNetworkConfigWhenWifiDisabled ( ) throws java.lang.Exception { when ( mWifiConfigManager.removeNetwork ( eq ( 0 ) , anyInt ( ) ) ) . thenReturn ( true ) ; mWsm.sendMessage ( WifiManager.FORGET_NETWORK , 0 , com.android.server.wifi.WifiStateMachineTest.MANAGED_PROFILE_UID ) ; mLooper.dispatchAll ( ) ; verify ( mWifiConfigManager ) . removeNetwork ( anyInt ( ) , anyInt ( ) ) ; }
Source:
public boolean loadSoundEffects ( ) { int attempts = 3 ; android.media.AudioService.LoadSoundEffectReply reply = new android.media.AudioService.LoadSoundEffectReply ( ) ; synchronized ( reply ) { android.media.AudioService.sendMsg ( mAudioHandler , android.media.AudioService.MSG_LOAD_SOUND_EFFECTS , android.media.AudioService.SENDMSG_QUEUE , 0 , 0 , reply , 0 ) ; while ( ( ( reply.mStatus ) == 1 ) && ( ( attempts -- ) > 0 ) ) { try { reply.wait ( android.media.AudioService.SOUND_EFECTS_LOAD_TIMEOUT_MS ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.w ( android.media.AudioService.TAG , "loadSoundEffects Interrupted while waiting sound pool loaded." ) ; } } } return ( reply.mStatus ) == 0 ; }

Target:
public boolean loadSoundEffects ( ) { int attempts = 3 ; android.media.AudioService.LoadSoundEffectReply reply = new android.media.AudioService.LoadSoundEffectReply ( ) ; synchronized ( reply ) { android.media.AudioService.sendMsg ( mAudioHandler , android.media.AudioService.MSG_LOAD_SOUND_EFFECTS , android.media.AudioService.SENDMSG_QUEUE , 0 , 0 , reply , 0 ) ; while ( ( ( reply.mStatus ) == 1 ) && ( ( attempts -- ) > 0 ) ) { try { reply.wait ( android.media.AudioService.SOUND_EFFECTS_LOAD_TIMEOUT_MS ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.w ( android.media.AudioService.TAG , "loadSoundEffects Interrupted while waiting sound pool loaded." ) ; } } } return ( reply.mStatus ) == 0 ; }
Source:
public boolean equals ( java.lang.Object object ) { if ( ( this ) == object ) { return true ; } if ( ! ( object instanceof java.text.DecimalFormat ) ) { return false ; } java.text.DecimalFormat other = ( ( java.text.DecimalFormat ) ( object ) ) ; return ( ( this . dform ) == null ? ( other.dform ) == null : this . dform.equals ( other.dform ) ) && ( getDecimalFormatSymbols ( ) . equals ( other.getDecimalFormatSymbols ( ) ) ) ; }

Target:
public boolean equals ( java.lang.Object object ) { if ( ( this ) == object ) { return true ; } if ( ! ( object instanceof java.text.DecimalFormat ) ) { return false ; } java.text.DecimalFormat other = ( ( java.text.DecimalFormat ) ( object ) ) ; return ( ( this . ndf ) == null ? ( other.ndf ) == null : this . ndf.equals ( other.ndf ) ) && ( getDecimalFormatSymbols ( ) . equals ( other.getDecimalFormatSymbols ( ) ) ) ; }
Source:
public void onSizeChanged ( final int w , final int h , final int ow , final int oh ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onSizeChanged ( w , h , ow , oh ) ; } } ) ; return ; } mAwContents.onSizeChanged ( w , h , ow , oh ) ; }

Target:
public boolean dispatchKeyEvent ( final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return dispatchKeyEvent ( event ) ; } } ) ; return ret ; } return mAwContents.dispatchKeyEvent ( event ) ; }
Source:
public void testOk ( ) { mNumberKeyListener = new android.text.method.cts.NumberKeyListenerTest.MockNumberKeyListener ( ) ; assertTrue ( mNumberKeyListener.callOk ( mNumberKeyListener.getAcceptedChars ( ) , '3' ) ) ; assertFalse ( mNumberKeyListener.callOk ( mNumberKeyListener.getAcceptedChars ( ) , 'e' ) ) ; try { mNumberKeyListener.callOk ( null , 'm' ) ; fail ( "should throw NullPointerException." ) ; } catch ( java.lang.NullPointerException e ) { } }

Target:
public void testOk ( ) { mNumberKeyListener = new android.text.method.cts.NumberKeyListenerTest.MockNumberKeyListener ( android.text.method.cts.NumberKeyListenerTest.MockNumberKeyListener.DIGITS ) ; assertTrue ( mNumberKeyListener.callOk ( mNumberKeyListener.getAcceptedChars ( ) , '3' ) ) ; assertFalse ( mNumberKeyListener.callOk ( mNumberKeyListener.getAcceptedChars ( ) , 'e' ) ) ; try { mNumberKeyListener.callOk ( null , 'm' ) ; fail ( "should throw NullPointerException." ) ; } catch ( java.lang.NullPointerException e ) { } }
Source:
private boolean isAllowedBySettingsLocked ( java.lang.String provider ) { if ( mEnabledProviders.contains ( provider ) ) { return true ; } if ( mDisabledProviders.contains ( provider ) ) { return false ; } android.content.ContentResolver resolver = mContext.getContentResolver ( ) ; java.lang.String allowedProviders = Settings.Secure.getString ( resolver , Settings.Secure.LOCATION_PROVIDERS_ALLOWED ) ; return ( allowedProviders != null ) && ( allowedProviders.contains ( provider ) ) ; }

Target:
private boolean isAllowedBySettingsLocked ( java.lang.String provider ) { if ( mEnabledProviders.contains ( provider ) ) { return true ; } if ( mDisabledProviders.contains ( provider ) ) { return false ; } android.content.ContentResolver resolver = mContext.getContentResolver ( ) ; return Settings.Secure.isLocationProviderEnabled ( resolver , provider ) ; }
Source:
public void test_handshakeWithEmbeddedSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { certEmbedded , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; connection.doHandshake ( ) ; assertTrue ( connection.clientHooks.isHandshakeCompleted ) ; assertTrue ( connection.serverHooks.isHandshakeCompleted ) ; }

Target:
public void test_handshakeWithEmbeddedSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { certEmbedded , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; connection.doHandshake ( ) ; org.junit.Assert.assertTrue ( connection.clientHooks.isHandshakeCompleted ) ; org.junit.Assert.assertTrue ( connection.serverHooks.isHandshakeCompleted ) ; }
Source:
public static android.os.Message obtain ( ) { synchronized ( android.os.Message.mPoolSync ) { if ( ( android.os.Message.mPool ) != null ) { android.os.Message m = android.os.Message.mPool ; android.os.Message.mPool = m.next ; m.next = null ; return m ; } } return new android.os.Message ( ) ; }

Target:
public static android.os.Message obtain ( ) { synchronized ( android.os.Message.sPoolSync ) { if ( ( android.os.Message.sPool ) != null ) { android.os.Message m = android.os.Message.sPool ; android.os.Message.sPool = m.next ; m.next = null ; ( android.os.Message.sPoolSize ) -- ; return m ; } } return new android.os.Message ( ) ; }
Source:
public int dexOptSecondaryDexPath ( android.content.pm.ApplicationInfo info , java.lang.String path , com.android.server.pm.dex.PackageDexUsage.DexUseInfo dexUseInfo , com.android.server.pm.dex.DexoptOptions options ) { synchronized ( mInstallLock ) { final long acquireTime = acquireWakeLockLI ( info.uid ) ; try { return dexOptSecondaryDexPathLI ( info , path , dexUseInfo , options ) ; } finally { releaseWakeLockLI ( acquireTime ) ; } } }

Target:
public int dexOptSecondaryDexPath ( android.content.pm.ApplicationInfo info , java.lang.String path , com.android.server.pm.dex.PackageDexUsage.DexUseInfo dexUseInfo , com.android.server.pm.dex.DexoptOptions options ) { if ( ( info.uid ) == ( - 1 ) ) { throw new java.lang.IllegalArgumentException ( ( ( "Dexopt for path " + path ) + " has invalid uid." ) ) ; } synchronized ( mInstallLock ) { final long acquireTime = acquireWakeLockLI ( info.uid ) ; try { return dexOptSecondaryDexPathLI ( info , path , dexUseInfo , options ) ; } finally { releaseWakeLockLI ( acquireTime ) ; } } }
Source:
private static void updateDeliveryNotification ( final android.content.Context context , boolean isStatusMessage , final java.lang.CharSequence message , final long timeMillis ) { if ( ! isStatusMessage ) { return ; } if ( ! ( com.android.mms.ui.MessagingPreferenceActivity.getNotificationEnabled ( context ) ) ) { return ; } com.android.mms.transaction.MessagingNotification.mToastHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { android.widget.Toast.makeText ( context , message , ( ( int ) ( timeMillis ) ) ) . show ( ) ; } } ) ; }

Target:
private static void updateDeliveryNotification ( final android.content.Context context , boolean isStatusMessage , final java.lang.CharSequence message , final long timeMillis ) { if ( ! isStatusMessage ) { return ; } if ( ! ( com.android.mms.ui.MessagingPreferenceActivity.getNotificationEnabled ( context ) ) ) { return ; } com.android.mms.transaction.MessagingNotification.sToastHandler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { android.widget.Toast.makeText ( context , message , ( ( int ) ( timeMillis ) ) ) . show ( ) ; } } ) ; }
Source:
boolean equalNumbers ( @ android.support.annotation.Nullable java.lang.String number1 , @ android.support.annotation.Nullable java.lang.String number2 ) { if ( ( com.android.dialer.phonenumberutil.PhoneNumberHelper.isUriNumber ( number1 ) ) || ( com.android.dialer.phonenumberutil.PhoneNumberHelper.isUriNumber ( number2 ) ) ) { return compareSipAddresses ( number1 , number2 ) ; } else { return com.android.dialer.phonenumberutil.PhoneNumberHelper.compare ( number1 , number2 ) ; } }

Target:
boolean equalNumbers ( @ android.support.annotation.Nullable java.lang.String number1 , @ android.support.annotation.Nullable java.lang.String number2 ) { if ( ( com.android.dialer.phonenumberutil.PhoneNumberHelper.isUriNumber ( number1 ) ) || ( com.android.dialer.phonenumberutil.PhoneNumberHelper.isUriNumber ( number2 ) ) ) { return compareSipAddresses ( number1 , number2 ) ; } else { return android.telephony.PhoneNumberUtils.compare ( number1 , number2 ) ; } }
Source:
private static void assertValues ( android.net.NetworkStats stats , int index , java.lang.String iface , int uid , int set , int tag , int roaming , long rxBytes , long rxPackets , long txBytes , long txPackets , long operations ) { final android.net.NetworkStats.Entry entry = stats.getValues ( index , null ) ; android.net.NetworkStatsTest.assertValues ( entry , iface , uid , set , tag , roaming ) ; android.net.NetworkStatsTest.assertValues ( entry , rxBytes , rxPackets , txBytes , txPackets , operations ) ; }

Target:
private static void assertValues ( android.net.NetworkStats stats , int index , java.lang.String iface , int uid , int set , int tag , int metered , int roaming , long rxBytes , long rxPackets , long txBytes , long txPackets , long operations ) { final android.net.NetworkStats.Entry entry = stats.getValues ( index , null ) ; android.net.NetworkStatsTest.assertValues ( entry , iface , uid , set , tag , metered , roaming ) ; android.net.NetworkStatsTest.assertValues ( entry , rxBytes , rxPackets , txBytes , txPackets , operations ) ; }
Source:
public void registerNetworkCallback ( android.net.NetworkRequest request , android.app.PendingIntent operation ) { android.net.ConnectivityManager.checkPendingIntent ( operation ) ; try { mService.pendingListenForNetwork ( request.networkCapabilities , operation ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void registerNetworkCallback ( android.net.NetworkRequest request , android.app.PendingIntent operation ) { android.net.ConnectivityManager.checkPendingIntentNotNull ( operation ) ; try { mService.pendingListenForNetwork ( request.networkCapabilities , operation ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } catch ( android.os.ServiceSpecificException e ) { throw android.net.ConnectivityManager.convertServiceException ( e ) ; } }
Source:
public boolean collectManifestDigest ( android.content.pm.PackageParser.Package pkg ) { try { final java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( mArchiveSourcePath ) ; try { final java.util.zip.ZipEntry je = jarFile.getEntry ( android.content.pm.PackageParser.ANDROID_MANIFEST_FILENAME ) ; if ( je != null ) { pkg.manifestDigest = android.content.pm.ManifestDigest.fromInputStream ( jarFile.getInputStream ( je ) ) ; } } finally { jarFile.close ( ) ; } return true ; } catch ( java.io.IOException e ) { return false ; } }

Target:
public boolean collectManifestDigest ( android.content.pm.PackageParser.Package pkg ) { try { final java.util.jar.StrictJarFile jarFile = new java.util.jar.StrictJarFile ( mArchiveSourcePath ) ; try { final java.util.zip.ZipEntry je = jarFile.findEntry ( android.content.pm.PackageParser.ANDROID_MANIFEST_FILENAME ) ; if ( je != null ) { pkg.manifestDigest = android.content.pm.ManifestDigest.fromInputStream ( jarFile.getInputStream ( je ) ) ; } } finally { jarFile.close ( ) ; } return true ; } catch ( java.io.IOException e ) { return false ; } }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , int [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 4 ) , Element.DataType.SIGNED_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , int [ ] data ) { validateIsInt32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_32 , data.length ) ; }
Source:
protected void fillDexLists ( @ javax.annotation.Nonnull java.util.List < com.android.sched.vfs.InputVFile > mainDexList , @ javax.annotation.Nonnull java.util.List < com.android.sched.vfs.InputVFile > anyDexList ) { final com.android.jack.library.OutputJackLibrary jackOutputLibrary = com.android.jack.Jack.getSession ( ) . getJackOutputLibrary ( ) ; for ( com.android.jack.ir.ast.JDefinedClassOrInterface type : com.android.jack.Jack.getSession ( ) . getTypesToEmit ( ) ) { if ( type.containsMarker ( com.android.jack.backend.dex.MainDexMarker.class ) ) { mainDexList.add ( getDexInputVFileOfType ( jackOutputLibrary , type ) ) ; } else { anyDexList.add ( getDexInputVFileOfType ( jackOutputLibrary , type ) ) ; } } }

Target:
private com.android.jack.tools.merger.JackMerger getNewMerger ( ) { return new com.android.jack.tools.merger.JackMerger ( createDexFile ( ) , com.android.sched.util.config.ThreadConfig.get ( Options.BEST_MERGING_ACCURACY ) . booleanValue ( ) ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 2 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.SIGNED_16 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( float [ ] d ) { validateIsFloat32 ( ) ; copyFromUnchecked ( d , Element.DataType.FLOAT_32 , d.length ) ; }
Source:
synchronized com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; try { return getVDir ( parent , name ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir dir = new com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir ( this , parent , name ) ; parent.putInCache ( name , dir ) ; return dir ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.sched.util.file.CannotCreateFileException ( getVDirLocation ( parent , name ) ) ; } }

Target:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir getVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotDirectoryException { com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir vDir = getVDirFromCache ( parent , name ) ; if ( vDir != null ) { return vDir ; } else { throw new com.android.sched.util.file.NoSuchFileException ( getVDirLocation ( parent , name ) ) ; } }
Source:
public void test_setDefault_setsICUDefaultLocale ( ) { java.util.Locale.setDefault ( java.util.Locale.GERMANY ) ; assertEquals ( "de_DE" , libcore.icu.ICU.getDefaultLocale ( ) ) ; try { java.util.Locale.setDefault ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { assertEquals ( java.util.Locale.GERMANY , java.util.Locale.getDefault ( ) ) ; } java.util.Locale.setDefault ( new java.util.Locale ( "bogus" , "LOCALE" ) ) ; assertEquals ( "bogus__LOCALE" , libcore.icu.ICU.getDefaultLocale ( ) ) ; }

Target:
public void test_setDefault_setsICUDefaultLocale ( ) { java.util.Locale.setDefault ( java.util.Locale.GERMANY ) ; assertEquals ( "de_DE" , libcore.icu.ICU.getDefaultLocale ( ) ) ; try { java.util.Locale.setDefault ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { assertEquals ( java.util.Locale.GERMANY , java.util.Locale.getDefault ( ) ) ; } java.util.Locale.setDefault ( new java.util.Locale ( "bogus" , "LOCALE" ) ) ; assertEquals ( "und" , libcore.icu.ICU.getDefaultLocale ( ) ) ; }
Source:
private static java.lang.String getCurrentHash ( java.lang.String content ) throws java.lang.Exception { if ( content == null ) { return "0" ; } java.security.MessageDigest dgst = java.security.MessageDigest.getInstance ( "SHA512" ) ; byte [ ] encoded = content.getBytes ( ) ; byte [ ] fingerprint = dgst.digest ( encoded ) ; return com.android.server.updates.IntegralToString.bytesToHexString ( fingerprint , false ) ; }

Target:
private static java.lang.String getCurrentHash ( java.lang.String content ) throws java.lang.Exception { if ( content == null ) { return "0" ; } java.security.MessageDigest dgst = java.security.MessageDigest.getInstance ( "SHA512" ) ; byte [ ] encoded = content.getBytes ( ) ; byte [ ] fingerprint = dgst.digest ( encoded ) ; return com.android.internal.util.HexDump.toHexString ( fingerprint , false ) ; }
Source:
public < T > com.google.common.hash.Hasher putObject ( T instance , com.google.common.hash.Funnel < ? super T > funnel ) { checkNotDone ( ) ; funnel.funnel ( instance , this ) ; return this ; }

Target:
public com.google.common.hash.HashCode hash ( ) { checkNotDone ( ) ; done = true ; return ( bytes ) == ( digest.getDigestLength ( ) ) ? com.google.common.hash.HashCode.fromBytesNoCopy ( digest.digest ( ) ) : com.google.common.hash.HashCode.fromBytesNoCopy ( java.util.Arrays.copyOf ( digest.digest ( ) , bytes ) ) ; }
Source:
static java.nio.ByteBuffer getAndroidManifestFromApk ( java.util.List < com.android.apksig.internal.zip.CentralDirectoryRecord > cdRecords , com.android.apksig.util.DataSource lhfSection ) throws com.android.apksig.apk.ApkFormatException , com.android.apksig.zip.ZipFormatException , java.io.IOException { com.android.apksig.internal.zip.CentralDirectoryRecord androidManifestCdRecord = null ; for ( com.android.apksig.internal.zip.CentralDirectoryRecord cdRecord : cdRecords ) { if ( com.android.apksig.ApkSigner.ANDROID_MANIFEST_ZIP_ENTRY_NAME.equals ( cdRecord.getName ( ) ) ) { androidManifestCdRecord = cdRecord ; break ; } } if ( androidManifestCdRecord == null ) { throw new com.android.apksig.apk.ApkFormatException ( ( "Missing " + ( com.android.apksig.ApkSigner.ANDROID_MANIFEST_ZIP_ENTRY_NAME ) ) ) ; } return java.nio.ByteBuffer.wrap ( com.android.apksig.internal.zip.LocalFileRecord.getUncompressedData ( lhfSection , androidManifestCdRecord , lhfSection.size ( ) ) ) ; }

Target:
static java.nio.ByteBuffer getAndroidManifestFromApk ( java.util.List < com.android.apksig.internal.zip.CentralDirectoryRecord > cdRecords , com.android.apksig.util.DataSource lhfSection ) throws com.android.apksig.apk.ApkFormatException , com.android.apksig.zip.ZipFormatException , java.io.IOException { com.android.apksig.internal.zip.CentralDirectoryRecord androidManifestCdRecord = com.android.apksig.ApkSigner.findCdRecord ( cdRecords , com.android.apksig.ApkSigner.ANDROID_MANIFEST_ZIP_ENTRY_NAME ) ; if ( androidManifestCdRecord == null ) { throw new com.android.apksig.apk.ApkFormatException ( ( "Missing " + ( com.android.apksig.ApkSigner.ANDROID_MANIFEST_ZIP_ENTRY_NAME ) ) ) ; } return java.nio.ByteBuffer.wrap ( com.android.apksig.internal.zip.LocalFileRecord.getUncompressedData ( lhfSection , androidManifestCdRecord , lhfSection.size ( ) ) ) ; }