auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( ( "res/values/customattr.xml:2: Error: Resource named \'ContentFrame\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_ContentFrame\' ? [ResourceName]\n" + " <declare-styleable name=\"ContentFrame\">\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "res/values/customattr.xml:3: Error: Resource named \'content\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_content\' ? [ResourceName]\n" ) + " <attr name=\"content\" format=\"reference\" />\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/values/customattr.xml:4: Error: Resource named \'contentId\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_contentId\' ? [ResourceName]\n" ) + " <attr name=\"contentId\" format=\"reference\" />\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/customattrlayout.xml: Error: Resource named \'customattrlayout\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_customattrlayout\' ? [ResourceName]\n" ) + "4 errors, 0 warnings\n" ) ) , lintProject ( "res/values/customattr.xml" , "res/layout/customattrlayout.xml" , "unusedR.java.txt=>gen/my/pkg/R.java" , "AndroidManifest.xml" ) ) ; }

Target:
public void testValues ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "res/values/customattr.xml:2: Error: Resource named \'ContentFrame\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_ContentFrame\' ? [ResourceName]\n" + " <declare-styleable name=\"ContentFrame\">\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "res/values/customattr.xml:3: Error: Resource named \'content\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_content\' ? [ResourceName]\n" ) + " <attr name=\"content\" format=\"reference\" />\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/values/customattr.xml:4: Error: Resource named \'contentId\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_contentId\' ? [ResourceName]\n" ) + " <attr name=\"contentId\" format=\"reference\" />\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/customattrlayout.xml:2: Error: Resource named \'customattrlayout\' does not start with the project\'s resource prefix \'unit_test_prefix_\'; rename to \'unit_test_prefix_customattrlayout\' ? [ResourceName]\n" ) + "<foo.bar.ContentFrame\n" ) + "^\n" ) + "4 errors, 0 warnings\n" ) ) , lintProject ( "res/values/customattr.xml" , "res/layout/customattrlayout.xml" , "unusedR.java.txt=>gen/my/pkg/R.java" , "AndroidManifest.xml" ) ) ; }
Source:
public void ext ( ) throws java.lang.Exception { java.io.File extJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "ext" , ".jack" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.srcToLib ( com.android.jack.noclasspath.NoClasspathTest.corePath , extJack , true , com.android.jack.noclasspath.NoClasspathTest.EXT_SOURCELIST ) ; java.io.File extFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.libToExe ( extJack , extFolder , false ) ; }

Target:
public void ext ( ) throws java.lang.Exception { java.io.File extJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "ext" , ".jack" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.addToClasspath ( com.android.jack.noclasspath.NoClasspathTest.corePath ) . srcToLib ( extJack , true , com.android.jack.noclasspath.NoClasspathTest.EXT_SOURCELIST ) ; java.io.File extFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.libToExe ( extJack , extFolder , false ) ; }
Source:
public void run ( ) { deviceClientMonitorLoop ( ) ; }

Target:
private void processIncomingDeviceData ( int length ) throws java.io.IOException { java.util.Map < java.lang.String , com.android.ddmlib.IDevice.DeviceState > result ; if ( length <= 0 ) { result = java.util.Collections.emptyMap ( ) ; } else { java.lang.String response = com.android.ddmlib.DeviceMonitor.read ( mAdbConnection , new byte [ length ] ) ; result = com.android.ddmlib.DeviceMonitor.DeviceListMonitorTask.parseDeviceListResponse ( response ) ; } mListener.deviceListUpdate ( result ) ; }
Source:
public void removeSessionCookie ( ) { mChromeCookieManager.removeSessionCookie ( ) ; }

Target:
public void setCookie ( java.lang.String url , java.lang.String value , android.webkit.ValueCallback < java.lang.Boolean > callback ) { try { mChromeCookieManager.setCookie ( com.android.webview.chromium.CookieManagerAdapter.fixupUrl ( url ) , value , callback ) ; } catch ( android.net.ParseException e ) { android.util.Log.e ( com.android.webview.chromium.CookieManagerAdapter.LOGTAG , ( "Not setting cookie due to error parsing URL: " + url ) , e ) ; } }
Source:
public void testHasPath ( ) { java.lang.String pathName = "/search" ; assertTrue ( "HasPath didn't match" , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( pathName ) . matches ( uri ) ) ; assertTrue ( "HasPath didn't match" , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( org.hamcrest.CoreMatchers.equalTo ( pathName ) ) . matches ( uri ) ) ; }

Target:
public void hasPathTesting ( ) { java.lang.String pathName = "/search" ; org.junit.Assert.assertTrue ( "HasPath didn't match" , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( pathName ) . matches ( uri ) ) ; org.junit.Assert.assertTrue ( "HasPath didn't match" , android.support.test.espresso.intent.matcher.UriMatchers.hasPath ( org.hamcrest.CoreMatchers.equalTo ( pathName ) ) . matches ( uri ) ) ; }
Source:
public boolean hasChildren ( java.lang.Object element ) { if ( element instanceof com.android.ddmlib.IDevice ) { com.android.hierarchyviewerlib.device.Window [ ] list = model.getWindows ( ( ( com.android.ddmlib.IDevice ) ( element ) ) ) ; if ( list != null ) { return ( list.length ) != 0 ; } } return false ; }

Target:
public boolean hasChildren ( java.lang.Object element ) { if ( ( element instanceof com.android.ddmlib.IDevice ) && ( doTreeViewStuff ) ) { com.android.hierarchyviewerlib.device.Window [ ] list = model.getWindows ( ( ( com.android.ddmlib.IDevice ) ( element ) ) ) ; if ( list != null ) { return ( list.length ) != 0 ; } } return false ; }
Source:
private void runBatchingSensorTest ( int sensorType , int rateUs , int maxBatchReportLatencySec ) throws java.lang.Throwable { int maxBatchReportLatencyUs = ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( maxBatchReportLatencySec ) ) ) ; int testDurationSec = maxBatchReportLatencySec + ( android.hardware.cts.SensorBatchingTests.BATCHING_PADDING_TIME_S ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getContext ( ) , sensorType , shouldEmulateSensorUnderLoad ( ) , rateUs , maxBatchReportLatencyUs ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation operation = new android.hardware.cts.helpers.sensoroperations.TestSensorOperation ( environment , testDurationSec , java.util.concurrent.TimeUnit.SECONDS ) ; executeTest ( environment , operation , false ) ; }

Target:
private void runBatchingSensorTest ( int sensorType , int rateUs , int maxBatchReportLatencySec ) throws java.lang.Throwable { int maxBatchReportLatencyUs = ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( maxBatchReportLatencySec ) ) ) ; int testDurationSec = maxBatchReportLatencySec + ( android.hardware.cts.SensorBatchingTests.BATCHING_PADDING_TIME_S ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getContext ( ) , sensorType , shouldEmulateSensorUnderLoad ( ) , rateUs , maxBatchReportLatencyUs ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation operation = android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createOperation ( environment , testDurationSec , java.util.concurrent.TimeUnit.SECONDS ) ; executeTest ( environment , operation , false ) ; }
Source:
public static void writeSignedIntegralValue ( com.android.dx.util.ByteOutput out , int type , long value ) { int requiredBits = 65 - ( java.lang.Long.numberOfLeadingZeros ( ( value ^ ( value > > 63 ) ) ) ) ; int requiredBytes = ( requiredBits + 7 ) > > 3 ; out.writeByte ( ( type | ( ( requiredBytes - 1 ) << 5 ) ) ) ; while ( requiredBytes > 0 ) { out.writeByte ( ( ( byte ) ( value ) ) ) ; value >>= 8 ; requiredBytes -- ; } }

Target:
public static void writeSignedIntegralValue ( com.android.dex.util.ByteOutput out , int type , long value ) { int requiredBits = 65 - ( java.lang.Long.numberOfLeadingZeros ( ( value ^ ( value > > 63 ) ) ) ) ; int requiredBytes = ( requiredBits + 7 ) > > 3 ; out.writeByte ( ( type | ( ( requiredBytes - 1 ) << 5 ) ) ) ; while ( requiredBytes > 0 ) { out.writeByte ( ( ( byte ) ( value ) ) ) ; value >>= 8 ; requiredBytes -- ; } }
Source:
public java.util.Set < java.io.File > getCompileClasspath ( ) { java.util.Set < java.io.File > classpath = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.android.builder.AndroidDependency lib : mFlatLibraries ) { classpath.add ( lib.getJarFile ( ) ) ; } for ( com.android.builder.JarDependency jar : mJars ) { classpath.add ( new java.io.File ( jar.getLocation ( ) ) ) ; } return classpath ; }

Target:
public java.util.Set < java.io.File > getCompileClasspath ( ) { java.util.Set < java.io.File > classpath = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.android.builder.AndroidDependency lib : mFlatLibraries ) { classpath.add ( lib.getJarFile ( ) ) ; for ( com.android.builder.JarDependency jarDependency : lib.getLocalDependencies ( ) ) { classpath.add ( jarDependency.getJarFile ( ) ) ; } } for ( com.android.builder.JarDependency jar : mJars ) { if ( jar.isCompiled ( ) ) { classpath.add ( jar.getJarFile ( ) ) ; } } return classpath ; }
Source:
public void doHandshake ( ) throws java.lang.Exception { java.net.ServerSocket listener = new java.net.ServerSocket ( 0 ) ; java.util.concurrent.Future < org.conscrypt.OpenSSLSocketImpl > clientFuture = handshake ( listener , clientHooks ) ; java.util.concurrent.Future < org.conscrypt.OpenSSLSocketImpl > serverFuture = handshake ( listener , serverHooks ) ; client = clientFuture.get ( org.conscrypt.OpenSSLSocketImplTest.TIMEOUT_SECONDS , java.util.concurrent.TimeUnit.SECONDS ) ; server = serverFuture.get ( org.conscrypt.OpenSSLSocketImplTest.TIMEOUT_SECONDS , java.util.concurrent.TimeUnit.SECONDS ) ; }

Target:
public void doHandshake ( ) throws java.lang.Exception { java.net.ServerSocket listener = new java.net.ServerSocket ( 0 ) ; java.util.concurrent.Future < org.conscrypt.OpenSSLSocketImpl > clientFuture = handshake ( listener , clientHooks ) ; java.util.concurrent.Future < org.conscrypt.OpenSSLSocketImpl > serverFuture = handshake ( listener , serverHooks ) ; java.lang.Exception cause = null ; try { client = getOrThrowCause ( clientFuture , org.conscrypt.OpenSSLSocketImplTest.TIMEOUT_SECONDS , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.Exception e ) { clientException = e ; } try { server = getOrThrowCause ( serverFuture , org.conscrypt.OpenSSLSocketImplTest.TIMEOUT_SECONDS , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.Exception e ) { serverException = e ; } }
Source:
void registerScanner ( android.bluetooth.le.IScannerCallback callback ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; java.util.UUID uuid = java.util.UUID.randomUUID ( ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "registerScanner() - UUID=" + uuid ) ) ; mScannerMap.add ( uuid , callback , this ) ; mScanManager.registerScanner ( uuid ) ; }

Target:
void registerScanner ( android.bluetooth.le.IScannerCallback callback , android.os.WorkSource workSource ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; java.util.UUID uuid = java.util.UUID.randomUUID ( ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "registerScanner() - UUID=" + uuid ) ) ; if ( workSource != null ) { enforceImpersonatationPermission ( ) ; } mScannerMap.add ( uuid , workSource , callback , this ) ; mScanManager.registerScanner ( uuid ) ; }
Source:
public android.net.IpSecTransform buildTunnelModeTransform ( @ android.annotation.NonNull java.net.InetAddress sourceAddress , @ android.annotation.NonNull android.net.IpSecManager.SecurityParameterIndex spi ) throws IpSecManager.ResourceUnavailableException , IpSecManager.SpiUnavailableException , java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( sourceAddress ) ; com.android.internal.util.Preconditions.checkNotNull ( spi ) ; if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; mConfig.setSourceAddress ( sourceAddress.getHostAddress ( ) ) ; mConfig.setSpiResourceId ( spi.getResourceId ( ) ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }

Target:
public android.net.IpSecTransform buildTunnelModeTransform ( @ android.annotation.NonNull java.net.InetAddress sourceAddress , @ android.annotation.NonNull android.net.IpSecManager.SecurityParameterIndex spi ) throws IpSecManager.ResourceUnavailableException , IpSecManager.SpiUnavailableException , java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( sourceAddress ) ; com.android.internal.util.Preconditions.checkNotNull ( spi ) ; if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; mConfig.setSourceAddress ( sourceAddress.getHostAddress ( ) ) ; mConfig.setSpiResourceId ( spi.getResourceId ( ) ) ; return new android.net.IpSecTransform ( mContext , mConfig ) . activate ( ) ; }
Source:
void onConferenceMergeFailed ( java.lang.String callId ) { for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { android.telecom.Log.d ( this , "merge failed for call %s" , callId ) ; adapter.setConferenceMergeFailed ( callId ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void onConferenceMergeFailed ( java.lang.String callId ) { for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { android.telecom.Log.d ( this , "merge failed for call %s" , callId ) ; adapter.setConferenceMergeFailed ( callId , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public java.lang.ClassLoader getClassLoader ( ) { if ( this . isPrimitive ( ) ) { return null ; } java.lang.ClassLoader loader = getClassLoaderImpl ( ) ; if ( loader == null ) { loader = java.lang.BootClassLoader.getInstance ( ) ; } return loader ; }

Target:
public static java.lang.Class < ? > forName ( java.lang.String className , boolean shouldInitialize , java.lang.ClassLoader classLoader ) throws java.lang.ClassNotFoundException { if ( classLoader == null ) { classLoader = java.lang.BootClassLoader.getInstance ( ) ; } java.lang.Class < ? > result ; try { result = java.lang.Class.classForName ( className , shouldInitialize , classLoader ) ; } catch ( java.lang.ClassNotFoundException e ) { java.lang.Throwable cause = e.getCause ( ) ; if ( cause instanceof java.lang.LinkageError ) { throw ( ( java.lang.LinkageError ) ( cause ) ) ; } throw e ; } return result ; }
Source:
private void checkDslProperty ( java.lang.String parent , org.codehaus.groovy.ast.expr.MethodCallExpression c ) { java.lang.String property = c.getMethodAsString ( ) ; if ( isInterestingProperty ( property , parent ) ) { java.lang.String value = getText ( c.getArguments ( ) ) ; checkDslPropertyAssignment ( context , property , value , parent , c ) ; } }

Target:
private void checkDslProperty ( java.lang.String parent , org.codehaus.groovy.ast.expr.MethodCallExpression c , java.lang.String parentParent ) { java.lang.String property = c.getMethodAsString ( ) ; if ( isInterestingProperty ( property , parent , getParentParent ( ) ) ) { java.lang.String value = getText ( c.getArguments ( ) ) ; checkDslPropertyAssignment ( context , property , value , parent , parentParent , c ) ; } }
Source:
private void initAndroidProject ( ) throws java.io.IOException { mAndroidProject = hasNature ( "com.android.ide.eclipse.adt.AndroidNature" ) ; mNdkProject = ( mAndroidProject ) && ( ( ( hasNature ( "org.eclipse.cdt.core.cnature" ) ) || ( hasNature ( "org.eclipse.cdt.core.ccnature" ) ) ) || ( new java.io.File ( mDir , ( ( "jni" + ( java.io.File.separator ) ) + "Android.mk" ) ) . exists ( ) ) ) ; }

Target:
private void initAndroidProject ( ) throws java.io.IOException { mAndroidProject = hasNature ( "com.android.ide.eclipse.adt.AndroidNature" ) ; if ( ( ! ( mAndroidProject ) ) && ( ( getProjectDocument ( ) ) == null ) ) { mAndroidProject = com.android.tools.gradle.eclipse.GradleImport.isAdtProjectDir ( mDir ) ; } mNdkProject = ( mAndroidProject ) && ( ( ( hasNature ( "org.eclipse.cdt.core.cnature" ) ) || ( hasNature ( "org.eclipse.cdt.core.ccnature" ) ) ) || ( new java.io.File ( mDir , ( ( "jni" + ( java.io.File.separator ) ) + "Android.mk" ) ) . exists ( ) ) ) ; }
Source:
public void adjustSuggestedStreamVolume ( int direction , int suggestedStreamType , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.adjustMasterVolume ( direction , flags , getContext ( ) . getOpPackageName ( ) ) ; } else { android.media.session.MediaSessionLegacyHelper helper = android.media.session.MediaSessionLegacyHelper.getHelper ( getContext ( ) ) ; helper.sendAdjustVolumeBy ( suggestedStreamType , direction , flags ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustSuggestedStreamVolume" , e ) ; } }

Target:
public void adjustSuggestedStreamVolume ( int direction , int suggestedStreamType , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.adjustMasterVolume ( direction , flags , mApplicationContext.getOpPackageName ( ) ) ; } else { android.media.session.MediaSessionLegacyHelper helper = android.media.session.MediaSessionLegacyHelper.getHelper ( mApplicationContext ) ; helper.sendAdjustVolumeBy ( suggestedStreamType , direction , flags ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustSuggestedStreamVolume" , e ) ; } }
Source:
public boolean SendPassThruPlay ( android.bluetooth.BluetoothDevice mDevice ) { log ( "SendPassThruPlay + " ) ; com.android.bluetooth.avrcp.AvrcpControllerService avrcpCtrlService = com.android.bluetooth.avrcp.AvrcpControllerService.getAvrcpControllerService ( ) ; if ( ( ( avrcpCtrlService != null ) && ( mDevice != null ) ) && ( avrcpCtrlService.getConnectedDevices ( ) . contains ( mDevice ) ) ) { avrcpCtrlService.sendPassThroughCmd ( mDevice , BluetoothAvrcpController.PASS_THRU_CMD_ID_PLAY , BluetoothAvrcpController.KEY_STATE_PRESSED ) ; avrcpCtrlService.sendPassThroughCmd ( mDevice , BluetoothAvrcpController.PASS_THRU_CMD_ID_PLAY , BluetoothAvrcpController.KEY_STATE_RELEASED ) ; log ( " SendPassThruPlay command sent - " ) ; return true ; } else { log ( "passthru command not sent, connection unavailable" ) ; return false ; } }

Target:
public boolean SendPassThruPlay ( android.bluetooth.BluetoothDevice mDevice ) { log ( "SendPassThruPlay + " ) ; com.android.bluetooth.avrcpcontroller.AvrcpControllerService avrcpCtrlService = com.android.bluetooth.avrcpcontroller.AvrcpControllerService.getAvrcpControllerService ( ) ; if ( ( ( avrcpCtrlService != null ) && ( mDevice != null ) ) && ( avrcpCtrlService.getConnectedDevices ( ) . contains ( mDevice ) ) ) { avrcpCtrlService.sendPassThroughCmd ( mDevice , AvrcpControllerService.PASS_THRU_CMD_ID_PLAY , AvrcpControllerService.KEY_STATE_PRESSED ) ; avrcpCtrlService.sendPassThroughCmd ( mDevice , AvrcpControllerService.PASS_THRU_CMD_ID_PLAY , AvrcpControllerService.KEY_STATE_RELEASED ) ; log ( " SendPassThruPlay command sent - " ) ; return true ; } else { log ( "passthru command not sent, connection unavailable" ) ; return false ; } }
Source:
public static com.android.server.connectivity.DnsManager.PrivateDnsConfig tryBlockingResolveOf ( android.net.Network network , java.lang.String name ) { final android.system.StructAddrinfo hints = new android.system.StructAddrinfo ( ) ; hints.ai_flags = 0 ; hints.ai_family = android.system.OsConstants.AF_UNSPEC ; hints.ai_socktype = android.system.OsConstants.SOCK_DGRAM ; try { final java.net.InetAddress [ ] ips = Libcore.os.android_getaddrinfo ( name , hints , network.netId ) ; if ( ( ips != null ) && ( ( ips.length ) > 0 ) ) { return new com.android.server.connectivity.DnsManager.PrivateDnsConfig ( name , ips ) ; } } catch ( android.system.GaiException ignored ) { } return null ; }

Target:
private boolean hasValidatedServer ( ) { for ( com.android.server.connectivity.DnsManager.PrivateDnsValidationStatuses.ValidationStatus status : mValidationMap.values ( ) ) { if ( status == ( com.android.server.connectivity.DnsManager.PrivateDnsValidationStatuses.ValidationStatus.SUCCEEDED ) ) { return true ; } } return false ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; if ( ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.sProject ) == null ) { org.eclipse.core.resources.IProject project = null ; java.lang.String projectName = "testproject-" + ( java.lang.System.currentTimeMillis ( ) ) ; project = createProject ( projectName ) ; assertNotNull ( project ) ; com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.sProject = project ; } }

Target:
private java.lang.String getProjectName ( ) { if ( testNeedsUniqueProject ( ) ) { return ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.PROJECTNAME_PREFIX ) + ( getClass ( ) . getSimpleName ( ) ) ) + "-" ) + ( getName ( ) ) ; } else if ( testCaseNeedsUniqueProject ( ) ) { return ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.PROJECTNAME_PREFIX ) + ( getClass ( ) . getSimpleName ( ) ) ; } else { return ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.PROJECTNAME_PREFIX ) + ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.TESTS_START_TIME ) ; } }
Source:
public void tearDown ( ) throws java.lang.Exception { int i = 0 ; while ( ( mGsmInboundSmsHandler.getWakeLock ( ) . isHeld ( ) ) && ( i < 100 ) ) { com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; i ++ ; } assertFalse ( mGsmInboundSmsHandler.getWakeLock ( ) . isHeld ( ) ) ; mGsmInboundSmsHandler = null ; mContentProvider.shutdown ( ) ; mGsmInboundSmsHandlerTestHandler.quitSafely ( ) ; super . tearDown ( ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { int i = 0 ; while ( ( mGsmInboundSmsHandler.getWakeLock ( ) . isHeld ( ) ) && ( i < 100 ) ) { com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; i ++ ; } org.junit.Assert.assertFalse ( mGsmInboundSmsHandler.getWakeLock ( ) . isHeld ( ) ) ; mGsmInboundSmsHandler = null ; mContentProvider.shutdown ( ) ; mGsmInboundSmsHandlerTestHandler.quitSafely ( ) ; super . tearDown ( ) ; }
Source:
public static com.android.internal.telephony.cdma.SmsMessage createFromPdu ( byte [ ] pdu ) { com.android.internal.telephony.cdma.SmsMessage msg = new com.android.internal.telephony.cdma.SmsMessage ( ) ; try { msg.parsePdu ( pdu ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.util.Log.e ( com.android.internal.telephony.cdma.SmsMessage.LOG_TAG , "SMS PDU parsing failed: " , ex ) ; return null ; } }

Target:
public static com.android.internal.telephony.cdma.SmsMessage createFromPdu ( byte [ ] pdu ) { com.android.internal.telephony.cdma.SmsMessage msg = new com.android.internal.telephony.cdma.SmsMessage ( ) ; try { msg.parsePdu ( pdu ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.cdma.SmsMessage.LOG_TAG , "SMS PDU parsing failed: " , ex ) ; return null ; } }
Source:
public void copy3DRangeFrom ( int xoff , int yoff , int zoff , int w , int h , int d , byte [ ] data ) { validateIsInt8 ( ) ; copy3DRangeFromUnchecked ( xoff , yoff , zoff , w , h , d , data ) ; }

Target:
public void copy3DRangeFrom ( int xoff , int yoff , int zoff , int w , int h , int d , java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy3DRangeFrom" ) ; copy3DRangeFromUnchecked ( xoff , yoff , zoff , w , h , d , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall methodCall ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( methodCall.getReceiverType ( ) ) ; java.lang.String signatureWithoutName = com.android.jack.backend.dex.rop.RopHelper.getMethodSignatureWithoutName ( methodCall ) ; com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( definingClass , new com.android.jack.dx.rop.cst.CstString ( methodCall.getMethodName ( ) ) , new com.android.jack.dx.rop.cst.CstString ( signatureWithoutName ) ) ; return methodRef ; }

Target:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall methodCall ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( methodCall.getReceiverType ( ) ) ; com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( definingClass , new com.android.jack.dx.rop.cst.CstString ( methodCall.getMethodName ( ) ) , com.android.jack.backend.dex.rop.RopHelper.getPrototype ( methodCall.getMethodId ( ) ) ) ; return methodRef ; }
Source:
public void reverseReferencesAreNotUnreachable ( ) throws java.io.IOException { com.android.ahat.TestDump dump = com.android.ahat.TestDump.getTestDump ( ) ; com.android.ahat.heapdump.AhatInstance obj = dump.getDumpedAhatInstance ( "basicString" ) ; org.junit.Assert.assertEquals ( 2 , obj.getHardReverseReferences ( ) . size ( ) ) ; org.junit.Assert.assertEquals ( 0 , obj.getSoftReverseReferences ( ) . size ( ) ) ; }

Target:
public void unreachableReferent ( ) throws java.io.IOException { com.android.ahat.TestDump dump = com.android.ahat.TestDump.getTestDump ( ) ; com.android.ahat.heapdump.AhatInstance ref = dump.getDumpedAhatInstance ( "aSoftReference" ) ; org.junit.Assert.assertNotNull ( ref.getReferent ( ) ) ; }
Source:
public boolean supportsFeature ( com.android.ddmlib.Feature feature ) { switch ( feature ) { case SCREEN_RECORD : if ( ( getApiLevel ( ) ) < 19 ) { return false ; } if ( ( mHasScreenRecorder ) == null ) { mHasScreenRecorder = hasBinary ( com.android.ddmlib.Device.SCREEN_RECORDER_DEVICE_PATH ) ; } return mHasScreenRecorder ; default : return false ; } }

Target:
public boolean supportsFeature ( com.android.ddmlib.Feature feature ) { switch ( feature ) { case SCREEN_RECORD : if ( ( getApiLevel ( ) ) < 19 ) { return false ; } if ( ( mHasScreenRecorder ) == null ) { mHasScreenRecorder = hasBinary ( com.android.ddmlib.Device.SCREEN_RECORDER_DEVICE_PATH ) ; } return mHasScreenRecorder ; case PROCSTATS : return ( getApiLevel ( ) ) >= 19 ; default : return false ; } }
Source:
private static void enqueueSentinelReference ( java.lang.ref.FinalizerReference.Sentinel sentinel ) { synchronized ( java.lang.ref.FinalizerReference.LIST_LOCK ) { for ( java.lang.ref.FinalizerReference < ? > r = java.lang.ref.FinalizerReference.head ; r != null ; r = r.next ) { if ( ( r.referent ) == sentinel ) { java.lang.ref.FinalizerReference < java.lang.ref.FinalizerReference.Sentinel > sentinelReference = ( ( java.lang.ref.FinalizerReference < java.lang.ref.FinalizerReference.Sentinel > ) ( r ) ) ; sentinelReference.referent = null ; sentinelReference.zombie = sentinel ; sentinelReference.enqueueInternal ( ) ; return ; } } } throw new java.lang.AssertionError ( "newly-created live Sentinel not on list!" ) ; }

Target:
private static void enqueueSentinelReference ( java.lang.ref.FinalizerReference.Sentinel sentinel ) { synchronized ( java.lang.ref.FinalizerReference.LIST_LOCK ) { for ( java.lang.ref.FinalizerReference < ? > r = java.lang.ref.FinalizerReference.head ; r != null ; r = r.next ) { if ( ( r.referent ) == sentinel ) { java.lang.ref.FinalizerReference < java.lang.ref.FinalizerReference.Sentinel > sentinelReference = ( ( java.lang.ref.FinalizerReference < java.lang.ref.FinalizerReference.Sentinel > ) ( r ) ) ; sentinelReference.referent = null ; sentinelReference.zombie = sentinel ; sentinelReference.pendingNext = sentinelReference ; java.lang.ref.ReferenceQueue.add ( java.lang.ref.ReferenceQueue , sentinelReference ) ; return ; } } } throw new java.lang.AssertionError ( "newly-created live Sentinel not on list!" ) ; }
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 ( short [ ] d ) { validateIsInt16 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
private void setActiveMediaSession ( android.media.session.MediaSession.Token token ) { com.android.bluetooth.avrcp.MediaController activeController = new com.android.bluetooth.avrcp.MediaController ( mContext , token ) ; if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "Set active media session " + ( activeController.getPackageName ( ) ) ) ) ; addMediaPlayerController ( activeController ) ; setAddressedMediaSessionPackage ( activeController.getPackageName ( ) ) ; }

Target:
private void setActiveMediaSession ( android.media.session.MediaSession.Token token ) { com.android.bluetooth.avrcp.MediaController activeController = new com.android.bluetooth.avrcp.MediaController ( mContext , token ) ; if ( activeController.getPackageName ( ) . equals ( "com.android.server.telecom" ) ) { android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "Ignore active media session change to telecom" ) ; return ; } if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "Set active media session " + ( activeController.getPackageName ( ) ) ) ) ; addMediaPlayerController ( activeController ) ; setAddressedMediaSessionPackage ( activeController.getPackageName ( ) ) ; }
Source:
public void validateCertCredential ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.certCredential = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; cred.certCredential.certType = "x509v3" ; cred.certCredential.certSha256FingerPrint = java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; cred.clientCertificateChain = new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } ; cred.clientPrivateKey = android.net.wifi.FakeKeys.RSA_KEY1 ; org.junit.Assert.assertTrue ( cred.validate ( ) ) ; }

Target:
private static android.net.wifi.hotspot2.pps.Credential createCredentialWithCertificateCredential ( ) throws java.security.NoSuchAlgorithmException , java.security.cert.CertificateEncodingException { android.net.wifi.hotspot2.pps.Credential.CertificateCredential certCred = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; certCred.setCertType ( "x509v3" ) ; certCred.setCertSha256Fingerprint ( java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ) ; return android.net.wifi.hotspot2.pps.CredentialTest.createCredential ( null , certCred , null , FakeKeys.CA_CERT0 , new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } , FakeKeys.RSA_KEY1 ) ; }
Source:
private void checkMethodAccessFlags ( int requiredSetMemberAccessFlags , int requiredUnsetMemberAccessFlags ) throws proguard.ParseException { if ( ( ( requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags ) & ( ~ ( proguard.classfile.ClassConstants.VALID_INTERNAL_ACC_METHOD ) ) ) != 0 ) { throw new proguard.ParseException ( ( "Invalid field access modifier for method before " + ( reader.locationDescription ( ) ) ) ) ; } }

Target:
private void checkMethodAccessFlags ( int requiredSetMemberAccessFlags , int requiredUnsetMemberAccessFlags ) throws proguard.ParseException { if ( ( ( requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags ) & ( ~ ( ClassConstants.VALID_ACC_METHOD ) ) ) != 0 ) { throw new proguard.ParseException ( ( "Invalid field access modifier for method before " + ( reader.locationDescription ( ) ) ) ) ; } }
Source:
public static void setUpClass ( ) { com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.class . getClassLoader ( ) . setDefaultAssertionStatus ( true ) ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.BOOTCLASSPATH = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.zip" ) } ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.REF_BOOTCLASSPATH = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" ) } ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "bouncycastle" ) ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.JARJAR_RULES = new com.android.jack.JarJarRules ( com.android.jack.TestTools.getFromAndroidTree ( "external/bouncycastle/jarjar-rules.txt" ) ) ; }

Target:
public static void setUpClass ( ) { com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.class . getClassLoader ( ) . setDefaultAssertionStatus ( true ) ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.CLASSPATH = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.zip" ) } ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "bouncycastle" ) ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.JARJAR_RULES = new com.android.jack.JarJarRules ( com.android.jack.TestTools.getFromAndroidTree ( "external/bouncycastle/jarjar-rules.txt" ) ) ; }
Source:
public static void setupLogs ( ) throws com.android.jack.CLILogConfiguration.LogConfigurationException { com.android.jack.CLILogConfiguration.LogLevel level = com.android.jack.CLILogConfiguration.LogLevel.ERROR ; java.lang.String stringLevel = java.lang.System.getProperty ( "com.android.jack.log" ) ; if ( stringLevel != null ) { try { level = new com.android.sched.util.codec.EnumCodec < com.android.jack.CLILogConfiguration.LogLevel > ( com.android.jack.CLILogConfiguration.LogLevel.class , com.android.jack.CLILogConfiguration.LogLevel.values ( ) ) . checkString ( new com.android.sched.util.codec.CodecContext ( ) , stringLevel ) ; } catch ( com.android.sched.util.codec.ParsingException e ) { throw new com.android.jack.CLILogConfiguration.LogConfigurationException ( e.getMessage ( ) ) ; } } com.android.sched.util.log.LoggerFactory.configure ( level ) ; }

Target:
public static void setupLogs ( ) throws com.android.jack.CLILogConfiguration.LogConfigurationException { com.android.jack.CLILogConfiguration.LogLevel level = com.android.jack.CLILogConfiguration.LogLevel.WARNING ; java.lang.String stringLevel = java.lang.System.getProperty ( "com.android.jack.log" ) ; if ( stringLevel != null ) { try { level = new com.android.sched.util.codec.EnumCodec < com.android.jack.CLILogConfiguration.LogLevel > ( com.android.jack.CLILogConfiguration.LogLevel.class , com.android.jack.CLILogConfiguration.LogLevel.values ( ) ) . checkString ( new com.android.sched.util.codec.CodecContext ( ) , stringLevel ) ; } catch ( com.android.sched.util.codec.ParsingException e ) { throw new com.android.jack.CLILogConfiguration.LogConfigurationException ( e.getMessage ( ) ) ; } } com.android.sched.util.log.LoggerFactory.configure ( level ) ; }
Source:
boolean recordUidIfAuthorized ( android.net.wifi.WifiConfiguration config , int uid , boolean onlyAnnotate ) { if ( ! ( mWifiConfigManager.isNetworkConfigured ( config ) ) ) { config.creatorUid = uid ; config.creatorName = mContext.getPackageManager ( ) . getNameForUid ( uid ) ; } else if ( ! ( mWifiConfigManager.canModifyNetwork ( uid , config , onlyAnnotate ) ) ) { return false ; } config.lastUpdateUid = uid ; config.lastUpdateName = mContext.getPackageManager ( ) . getNameForUid ( uid ) ; return true ; }

Target:
private int lookupFrameworkNetworkId ( int supplicantNetworkId ) { return mWifiSupplicantControl.getFrameworkNetworkId ( supplicantNetworkId ) ; }
Source:
public void testDownloadManagerSupportsHttpWithExternalWebServer ( ) throws java.lang.Exception { final android.app.cts.DownloadManagerTest.DownloadCompleteReceiver receiver = new android.app.cts.DownloadManagerTest.DownloadCompleteReceiver ( ) ; try { android.content.IntentFilter intentFilter = new android.content.IntentFilter ( android.app.DownloadManager.ACTION_DOWNLOAD_COMPLETE ) ; mContext.registerReceiver ( receiver , intentFilter ) ; long id = mDownloadManager.enqueue ( new android.app.DownloadManager.Request ( android.net.Uri.parse ( "http://www.example.com" ) ) ) ; assertEquals ( 1 , getTotalNumberDownloads ( ) ) ; assertDownloadQueryableById ( id ) ; receiver.waitForDownloadComplete ( android.app.cts.DownloadManagerTest.LONG_TIMEOUT , id ) ; assertDownloadQueryableByStatus ( DownloadManager.STATUS_SUCCESSFUL ) ; assertRemoveDownload ( id , 0 ) ; } finally { mContext.unregisterReceiver ( receiver ) ; } }

Target:
public void testDownloadManagerSupportsHttpWithExternalWebServer ( ) throws java.lang.Exception { if ( ! ( hasInternetConnection ( ) ) ) { android.util.Log.i ( android.app.cts.DownloadManagerTest.TAG , "testDownloadManagerSupportsHttpWithExternalWebServer() ignored on device without Internet" ) ; return ; } final android.app.cts.DownloadManagerTest.DownloadCompleteReceiver receiver = new android.app.cts.DownloadManagerTest.DownloadCompleteReceiver ( ) ; try { android.content.IntentFilter intentFilter = new android.content.IntentFilter ( android.app.DownloadManager.ACTION_DOWNLOAD_COMPLETE ) ; mContext.registerReceiver ( receiver , intentFilter ) ; long id = mDownloadManager.enqueue ( new android.app.DownloadManager.Request ( android.net.Uri.parse ( "http://www.example.com" ) ) ) ; assertEquals ( 1 , getTotalNumberDownloads ( ) ) ; assertDownloadQueryableById ( id ) ; receiver.waitForDownloadComplete ( android.app.cts.DownloadManagerTest.LONG_TIMEOUT , id ) ; assertDownloadQueryableByStatus ( DownloadManager.STATUS_SUCCESSFUL ) ; assertRemoveDownload ( id , 0 ) ; } finally { mContext.unregisterReceiver ( receiver ) ; } }
Source:
public void subData1D ( int off , int count , byte [ ] d ) { super . copy1DRangeFrom ( off , count , d ) ; }

Target:
public static android.renderscript.AllocationAdapter create1D ( android.renderscript.RenderScript rs , android.renderscript.Allocation a ) { rs.validate ( ) ; android.renderscript.Type t = android.renderscript.Type.createX ( rs , a.getElement ( ) , a.getType ( ) . getX ( ) ) ; return android.renderscript.AllocationAdapter.createTyped ( rs , a , t ) ; }
Source:
public com.android.sched.vfs.InputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { typePath.addSuffix ( fileType.getFileExtension ( ) ) ; return libraryVDir.getInputVFile ( typePath ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { typePath.addSuffix ( fileType.getFileExtension ( ) ) ; return libraryVDir.getInputVFile ( typePath ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public java.lang.String getISO3Language ( ) { java.lang.String code = libcore.icu.ICU.getISO3LanguageNative ( toString ( ) ) ; if ( ( ! ( languageCode.isEmpty ( ) ) ) && ( code.isEmpty ( ) ) ) { throw new java.util.MissingResourceException ( ( "No 3-letter language code for locale: " + ( this ) ) , ( "FormatData_" + ( this ) ) , "ShortLanguage" ) ; } return code ; }

Target:
public java.lang.String getISO3Language ( ) { java.lang.String code = libcore.icu.ICU.getISO3LanguageNative ( getIcuLocaleId ( ) ) ; if ( ( ! ( languageCode.isEmpty ( ) ) ) && ( code.isEmpty ( ) ) ) { throw new java.util.MissingResourceException ( ( "No 3-letter language code for locale: " + ( this ) ) , ( "FormatData_" + ( this ) ) , "ShortLanguage" ) ; } return code ; }
Source:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType == ( com.android.ide.common.api.InsertType.CREATE ) ) { com.android.ide.common.api.INode linearLayout = node.appendChild ( com.android.ide.common.layout.LayoutConstants.FQCN_LINEAR_LAYOUT ) ; linearLayout.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION , com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL ) ; } }

Target:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { com.android.ide.common.api.INode linearLayout = node.appendChild ( com.android.ide.common.layout.LayoutConstants.FQCN_LINEAR_LAYOUT ) ; linearLayout.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION , com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL ) ; } }
Source:
public int onConnect ( final javax.obex.HeaderSet request , javax.obex.HeaderSet reply ) { if ( VDBG ) android.util.Log.v ( com.android.bluetooth.mapclient.MnsObexServer.TAG , "onConnect" ) ; mObexServerSockets.prepareForNewConnect ( ) ; try { byte [ ] uuid = ( ( byte [ ] ) ( request.getHeader ( HeaderSet.TARGET ) ) ) ; if ( ! ( java.util.Arrays.equals ( uuid , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ) ) { return javax.obex.ResponseCodes.OBEX_HTTP_NOT_ACCEPTABLE ; } } catch ( java.io.IOException e ) { return javax.obex.ResponseCodes.OBEX_HTTP_INTERNAL_ERROR ; } reply.setHeader ( HeaderSet.WHO , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ; return javax.obex.ResponseCodes.OBEX_HTTP_OK ; }

Target:
public int onConnect ( final javax.obex.HeaderSet request , javax.obex.HeaderSet reply ) { if ( com.android.bluetooth.mapclient.MnsObexServer.VDBG ) android.util.Log.v ( com.android.bluetooth.mapclient.MnsObexServer.TAG , "onConnect" ) ; mObexServerSockets.prepareForNewConnect ( ) ; try { byte [ ] uuid = ( ( byte [ ] ) ( request.getHeader ( HeaderSet.TARGET ) ) ) ; if ( ! ( java.util.Arrays.equals ( uuid , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ) ) { return javax.obex.ResponseCodes.OBEX_HTTP_NOT_ACCEPTABLE ; } } catch ( java.io.IOException e ) { return javax.obex.ResponseCodes.OBEX_HTTP_INTERNAL_ERROR ; } reply.setHeader ( HeaderSet.WHO , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ; return javax.obex.ResponseCodes.OBEX_HTTP_OK ; }
Source:
public int setAllowedCarriers ( int slotId , java.util.List < android.service.carrier.CarrierIdentifier > carriers ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.setAllowedCarriers ( slotId , carriers ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } catch ( java.lang.NullPointerException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } return - 1 ; }

Target:
public java.util.List < android.service.carrier.CarrierIdentifier > getAllowedCarriers ( int slotIndex ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getAllowedCarriers ( slotIndex ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getAllowedCarriers" , e ) ; } catch ( java.lang.NullPointerException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } return new java.util.ArrayList < android.service.carrier.CarrierIdentifier > ( 0 ) ; }
Source:
private boolean shouldTurnOffDormancyUpdate ( ) { return ( mIsPowerSaveOn ) || ( ( ( ! ( mIsCharging ) ) && ( ! ( mIsTetheringOn ) ) ) && ( ! ( mIsScreenOn ) ) ) ; }

Target:
private boolean shouldTurnOffDormancyUpdate ( ) { if ( mIsPowerSaveOn ) { return true ; } if ( ( ( ( mIsCharging ) || ( mIsScreenOn ) ) || ( mIsTetheringOn ) ) || ( ( mUpdateModes.get ( TelephonyManager.INDICATION_FILTER_DATA_CALL_DORMANCY_CHANGED ) ) == ( android.telephony.TelephonyManager.INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF ) ) ) { return false ; } return true ; }