auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public synchronized void setMinimumIntegerDigits ( int value ) { properties.setMinimumIntegerDigits ( value ) ; refreshFormatter ( ) ; }

Target:
public synchronized void setMinimumIntegerDigits ( int value ) { int max = properties.getMaximumIntegerDigits ( ) ; if ( ( max >= 0 ) && ( max < value ) ) { properties.setMaximumIntegerDigits ( value ) ; } properties.setMinimumIntegerDigits ( value ) ; refreshFormatter ( ) ; }
Source:
private void setPosition ( java.nio.CharBuffer in ) { in.position ( ( ( ( in.position ( ) ) + ( data [ java.nio.charset.CharsetEncoderICU.INPUT_OFFSET ] ) ) - ( data [ java.nio.charset.CharsetEncoderICU.INVALID_CHAR_COUNT ] ) ) ) ; input = null ; }

Target:
private void setPosition ( java.nio.CharBuffer in ) { int position = ( ( in.position ( ) ) + ( data [ java.nio.charset.CharsetEncoderICU.INPUT_OFFSET ] ) ) - ( data [ java.nio.charset.CharsetEncoderICU.INVALID_CHAR_COUNT ] ) ; if ( position < 0 ) { position = 0 ; } in.position ( position ) ; input = null ; }
Source:
static boolean isBooleanField ( java.lang.reflect.Field field ) { return ( field.getType ( ) . equals ( boolean . class ) ) || ( field.getType ( ) . equals ( com.google.devtools.common.options.TriState.class ) ) ; }

Target:
static boolean isBooleanField ( java.lang.reflect.Field field ) { return ( ( field.getType ( ) . equals ( boolean . class ) ) || ( field.getType ( ) . equals ( com.google.devtools.common.options.TriState.class ) ) ) || ( ( com.google.devtools.common.options.OptionsParserImpl.findConverter ( field ) ) instanceof com.google.devtools.common.options.BoolOrEnumConverter ) ; }
Source:
public boolean onPreferenceChange ( android.preference.Preference pref , java.lang.Object newValue ) { final android.preference.ListPreference listPref = ( ( android.preference.ListPreference ) ( pref ) ) ; final int idx = listPref.findIndexOfValue ( ( ( java.lang.String ) ( newValue ) ) ) ; listPref.setSummary ( listPref.getEntries ( ) [ idx ] ) ; return true ; }

Target:
public boolean onPreferenceChange ( android.support.v7.preference.Preference pref , java.lang.Object newValue ) { final android.support.v7.preference.ListPreference listPref = ( ( android.support.v7.preference.ListPreference ) ( pref ) ) ; final int idx = listPref.findIndexOfValue ( ( ( java.lang.String ) ( newValue ) ) ) ; listPref.setSummary ( listPref.getEntries ( ) [ idx ] ) ; return true ; }
Source:
com.android.server.wifi.WifiConfigManager getWifiConfigManager ( ) { com.android.server.wifi.WifiConfigManager wifiConfigManager = org.mockito.Mockito.mock ( com.android.server.wifi.WifiConfigManager.class ) ; wifiConfigManager.mThresholdSaturatedRssi24 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.RSSI_SATURATION_2G_BAND ) ; wifiConfigManager.mBandAward5Ghz = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.BAND_AWARD_5GHz ) ; wifiConfigManager.mCurrentNetworkBoost = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.SAME_NETWORK_AWARD ) ; wifiConfigManager.mThresholdQualifiedRssi5 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.QUALIFIED_RSSI_5G_BAND ) ; wifiConfigManager.mThresholdMinimumRssi24 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.MINIMUM_2G_ACCEPT_RSSI ) ; wifiConfigManager.mThresholdMinimumRssi5 = new java.util.concurrent.atomic.AtomicInteger ( WifiQualifiedNetworkSelector.MINIMUM_5G_ACCEPT_RSSI ) ; org.mockito.Mockito.when ( wifiConfigManager.getEnableAutoJoinWhenAssociated ( ) ) . thenReturn ( true ) ; return wifiConfigManager ; }

Target:
public boolean answer ( int netId ) { if ( ( netId >= 0 ) && ( netId < ( configs.length ) ) ) { configs [ netId ] . getNetworkSelectionStatus ( ) . setCandidate ( null ) ; configs [ netId ] . getNetworkSelectionStatus ( ) . setCandidateScore ( java.lang.Integer.MIN_VALUE ) ; configs [ netId ] . getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( false ) ; return true ; } else { return false ; } }
Source:
private com.android.ide.common.resources.ResourceFile getFile ( com.android.io.IAbstractFile file ) { if ( ( mFiles ) != null ) { for ( com.android.ide.common.resources.ResourceFile f : mFiles ) { if ( f.getFile ( ) . equals ( file ) ) { return f ; } } } return null ; }

Target:
private com.android.ide.common.resources.ResourceFile getFile ( com.android.io.IAbstractFile file , com.android.ide.common.resources.ScanningContext context ) { assert mFolder.equals ( file.getParentFolder ( ) ) ; if ( ( mNames ) != null ) { com.android.ide.common.resources.ResourceFile resFile = mNames.get ( file.getName ( ) ) ; if ( resFile != null ) { return resFile ; } } if ( file.exists ( ) ) { com.android.ide.common.resources.ResourceFile resFile = createResourceFile ( file ) ; resFile.load ( context ) ; addFile ( resFile ) ; return resFile ; } return null ; }
Source:
private void checkOutputDir ( ) throws com.android.jill.IllegalOptionsException { assert ( output ) != null ; if ( ! ( output.exists ( ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( output.getName ( ) ) + " does not exist." ) ) ; } if ( ( ! ( output.canRead ( ) ) ) || ( ! ( output.canWrite ( ) ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( "The specified output folder '" + ( output.getAbsolutePath ( ) ) ) + "' for jack files cannot be written to or read from." ) ) ; } }

Target:
public java.io.File getOutput ( ) { assert ( output ) != null ; if ( ( workingDir ) != null ) { return new java.io.File ( workingDir , output.getPath ( ) ) ; } else { return output ; } }
Source:
public com.android.sdklib.internal.avd.AvdManager.AvdInfo [ ] getValidAvds ( ) { synchronized ( mAllAvdList ) { if ( ( mValidAvdList ) == null ) { java.util.ArrayList < com.android.sdklib.internal.avd.AvdManager.AvdInfo > list = new java.util.ArrayList < com.android.sdklib.internal.avd.AvdManager.AvdInfo > ( ) ; for ( com.android.sdklib.internal.avd.AvdManager.AvdInfo avd : mAllAvdList ) { if ( ( avd.getStatus ( ) ) == ( com.android.sdklib.internal.avd.AvdManager.AvdInfo.AvdStatus.OK ) ) { list.add ( avd ) ; } } mValidAvdList = list.toArray ( new com.android.sdklib.internal.avd.AvdManager.AvdInfo [ list.size ( ) ] ) ; } return mValidAvdList ; } }

Target:
public com.android.sdklib.internal.avd.AvdInfo [ ] getValidAvds ( ) { synchronized ( mAllAvdList ) { if ( ( mValidAvdList ) == null ) { java.util.ArrayList < com.android.sdklib.internal.avd.AvdInfo > list = new java.util.ArrayList < com.android.sdklib.internal.avd.AvdInfo > ( ) ; for ( com.android.sdklib.internal.avd.AvdInfo avd : mAllAvdList ) { if ( ( avd.getStatus ( ) ) == ( com.android.sdklib.internal.avd.AvdInfo.AvdStatus.OK ) ) { list.add ( avd ) ; } } mValidAvdList = list.toArray ( new com.android.sdklib.internal.avd.AvdInfo [ list.size ( ) ] ) ; } return mValidAvdList ; } }
Source:
public void testPocBug_35047217 ( ) throws java.lang.Exception { enableAdbRoot ( getDevice ( ) ) ; if ( containsDriver ( getDevice ( ) , "/dev/ipa" ) ) { android.security.cts.AdbUtils.runPoc ( "Bug-35047217" , getDevice ( ) , 60 ) ; } }

Target:
public void testPocBug_35644815 ( ) throws java.lang.Exception { enableAdbRoot ( getDevice ( ) ) ; if ( containsDriver ( getDevice ( ) , "/sys/kernel/debug/ion/clients/pids/" ) ) { java.lang.String pocOut = android.security.cts.AdbUtils.runPoc ( "Bug-35644815" , getDevice ( ) , 60 ) ; assertNotMatches ( "[\\s\\n\\S]*INFO DISC FLAG[\\s\\n\\S]*" , pocOut ) ; } }
Source:
public void run ( ) { if ( ! ( shell.isDisposed ( ) ) ) { org.eclipse.jface.dialogs.MessageDialog.openInformation ( shell , "Android Tools Updated" , msg2 ) ; } }

Target:
protected void notifyToolsNeedsToBeRestarted ( int flags ) { java.lang.String msg = null ; if ( ( flags & ( com.android.sdkuilib.internal.repository.UpdaterData.TOOLS_MSG_UPDATED_FROM_ADT ) ) != 0 ) { msg = "The Android SDK and AVD Manager that you are currently using has been updated. " + ( "Please also run Eclipse > Help > Check for Updates to see if the Android " + "plug-in needs to be updated." ) ; } else if ( ( flags & ( com.android.sdkuilib.internal.repository.UpdaterData.TOOLS_MSG_UPDATED_FROM_SDKMAN ) ) != 0 ) { msg = "The Android SDK and AVD Manager that you are currently using has been updated. " + ( ( "It is recommended that you now close the manager window and re-open it. " + "If you use Eclipse, please run Help > Check for Updates to see if the Android " ) + "plug-in needs to be updated." ) ; } mSdkLog.info ( "%s" , msg ) ; }
Source:
public int getInstallLocation ( ) { return android.provider.Settings.System.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.Secure.DEFAULT_INSTALL_LOCATION , PackageHelper.APP_INSTALL_AUTO ) ; }

Target:
private boolean isVerificationEnabled ( int flags ) { if ( ! ( com.android.server.pm.PackageManagerService.DEFAULT_VERIFY_ENABLE ) ) { return false ; } if ( ( flags & ( android.content.pm.PackageManager.INSTALL_FROM_ADB ) ) != 0 ) { if ( android.app.ActivityManager.isRunningInTestHarness ( ) ) { return false ; } if ( ( android.provider.Settings.Global.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB , 1 ) ) == 0 ) { return false ; } } return ( android.provider.Settings.Global.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.Global.PACKAGE_VERIFIER_ENABLE , 1 ) ) == 1 ; }
Source:
public com.android.ide.common.api.DropFeedback onDropEnter ( final com.android.ide.common.api.INode targetNode , final com.android.ide.common.api.IDragElement [ ] elements ) { if ( ( elements.length ) == 0 ) { return null ; } return new com.android.ide.common.api.DropFeedback ( null , new com.android.ide.common.api.IFeedbackPainter ( ) { public void paint ( com.android.ide.common.api.IGraphics gc , com.android.ide.common.api.INode node , com.android.ide.common.api.DropFeedback feedback ) { drawFeedback ( gc , node , elements , feedback ) ; } } ) ; }

Target:
public com.android.ide.common.api.DropFeedback onDropEnter ( final com.android.ide.common.api.INode targetNode , final com.android.ide.common.api.IDragElement [ ] elements ) { if ( ( elements.length ) == 0 ) { return null ; } com.android.ide.common.api.DropFeedback df = new com.android.ide.common.api.DropFeedback ( null , new com.android.ide.common.api.IFeedbackPainter ( ) { public void paint ( com.android.ide.common.api.IGraphics gc , com.android.ide.common.api.INode node , com.android.ide.common.api.DropFeedback feedback ) { drawFeedback ( gc , node , elements , feedback ) ; } } ) ; df.errorMessage = "AbsoluteLayout is deprecated." ; return df ; }
Source:
void onScanResponseDataSet ( int advertiser_id , int status ) throws java.lang.Exception { if ( com.android.bluetooth.gatt.AdvertiseManager.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( ( ( "onScanResponseDataSet() advertiser_id=" + advertiser_id ) + ", status=" ) + status ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.AdvertiseManager.AdvertiserInfo > entry = findAdvertiser ( advertiser_id ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onScanResponseDataSet() - bad advertiser_id " + advertiser_id ) ) ; return ; } android.bluetooth.le.IAdvertisingSetCallback callback = entry.getValue ( ) . callback ; callback.onScanResponseDataSet ( advertiser_id , status ) ; }

Target:
void onScanResponseDataSet ( int advertiserId , int status ) throws java.lang.Exception { if ( com.android.bluetooth.gatt.AdvertiseManager.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( ( ( "onScanResponseDataSet() advertiserId=" + advertiserId ) + ", status=" ) + status ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.AdvertiseManager.AdvertiserInfo > entry = findAdvertiser ( advertiserId ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onScanResponseDataSet() - bad advertiserId " + advertiserId ) ) ; return ; } android.bluetooth.le.IAdvertisingSetCallback callback = entry.getValue ( ) . callback ; callback.onScanResponseDataSet ( advertiserId , status ) ; }
Source:
public com.android.sched.vfs.InputOutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.GenericInputOutputVFS ( new com.android.sched.vfs.CachedDirectFS ( new com.android.sched.util.file.Directory ( string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e ) ; } }

Target:
public com.android.sched.vfs.InputOutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.GenericInputOutputVFS ( new com.android.sched.vfs.CachedDirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e ) ; } }
Source:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( fd.isSocket ( ) ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } untagSocket ( fd ) ; } } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }

Target:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( fd.isSocket$ ( ) ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } untagSocket ( fd ) ; } } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }
Source:
private ScheduledRecording.Builder createScheduledRecordingBuilder ( java.lang.String inputId , com.android.tv.data.Program program ) { com.android.tv.dvr.ScheduledRecording.Builder builder = com.android.tv.dvr.ScheduledRecording.builder ( inputId , program ) ; long time = java.lang.System.currentTimeMillis ( ) ; if ( ( ( program.getStartTimeUtcMillis ( ) ) < time ) && ( time < ( program.getEndTimeUtcMillis ( ) ) ) ) { builder.setStartTimeMs ( time ) ; } return builder ; }

Target:
private ScheduledRecording.Builder createScheduledRecordingBuilder ( java.lang.String inputId , com.android.tv.data.Program program ) { com.android.tv.dvr.data.ScheduledRecording.Builder builder = com.android.tv.dvr.data.ScheduledRecording.builder ( inputId , program ) ; long time = java.lang.System.currentTimeMillis ( ) ; if ( ( ( program.getStartTimeUtcMillis ( ) ) < time ) && ( time < ( program.getEndTimeUtcMillis ( ) ) ) ) { builder.setStartTimeMs ( time ) ; } return builder ; }
Source:
byte [ ] protectedArray ( ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } byte [ ] array = this . block.array ( ) ; if ( array == null ) { throw new java.lang.UnsupportedOperationException ( ) ; } return array ; }

Target:
byte [ ] protectedArray ( ) { checkIsAccessible ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } byte [ ] array = this . block.array ( ) ; if ( array == null ) { throw new java.lang.UnsupportedOperationException ( ) ; } return array ; }
Source:
public void testDependency002 ( ) throws java.lang.Exception { com.android.jack.test.helper.IncrementalTestHelper ite = new com.android.jack.test.helper.IncrementalTestHelper ( com.android.jack.TestTools.createTempDir ( "DependenciesTest_" , "_002" ) ) ; ite.addJavaFile ( "jack.incremental" , "A.java" , ( "package jack.incremental; \n" + "public class A implements I \n" ) ) ; java.io.File f = ite.addJavaFile ( "jack.incremental" , "I.java" , ( "package jack.incremental; \n" + "public interface I \n" ) ) ; ite.incrementalBuildFromFolder ( ) ; ite.deleteJavaFile ( f ) ; try { ite.incrementalBuildFromFolder ( ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } }

Target:
public void testDependency002 ( ) throws java.lang.Exception { com.android.jack.test.helper.IncrementalTestHelper ite = new com.android.jack.test.helper.IncrementalTestHelper ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ) ; ite.addJavaFile ( "jack.incremental" , "A.java" , ( "package jack.incremental; \n" + "public class A implements I \n" ) ) ; java.io.File f = ite.addJavaFile ( "jack.incremental" , "I.java" , ( "package jack.incremental; \n" + "public interface I \n" ) ) ; ite.incrementalBuildFromFolder ( ) ; ite.deleteJavaFile ( f ) ; try { ite.incrementalBuildFromFolder ( ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } }
Source:
private static java.util.Map < java.lang.String , java.lang.Long > withAllRemoved ( java.util.Map < java.lang.String , java.lang.Long > from , java.util.Map < java.lang.String , java.lang.Long > toRemove ) { java.util.Map < java.lang.String , java.lang.Long > result = new java.util.HashMap < java.lang.String , java.lang.Long > ( from ) ; for ( java.lang.String each : toRemove.keySet ( ) ) { result.remove ( each ) ; } return result ; }

Target:
private static java.util.Map < java.lang.String , java.lang.Long > withAllRemoved ( java.util.Map < java.lang.String , java.lang.Long > from , java.util.Map < java.lang.String , java.lang.Long > toRemove ) { java.util.Map < java.lang.String , java.lang.Long > result = new java.util.LinkedHashMap < java.lang.String , java.lang.Long > ( from ) ; for ( java.lang.String each : toRemove.keySet ( ) ) { result.remove ( each ) ; } return result ; }
Source:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; libcore.javax.net.ssl.TestSSLContext testSSLContext = libcore.javax.net.ssl.TestSSLContext.create ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; com.google.mockwebserver.MockResponse badProxyResponse = new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ; server.enqueue ( badProxyResponse ) ; server.enqueue ( badProxyResponse ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; try { connection.connect ( ) ; fail ( ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; assertEquals ( "Connect line failure on proxy" , "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com" ) ; }

Target:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext testSSLContext = libcore.javax.net.ssl.TestSSLContext.create ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; com.google.mockwebserver.MockResponse badProxyResponse = new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ; server.enqueue ( badProxyResponse ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "response" ) ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; connection.setHostnameVerifier ( new libcore.java.net.URLConnectionTest.RecordingHostnameVerifier ( ) ) ; assertContent ( "response" , connection ) ; com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; assertEquals ( "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com" ) ; }
Source:
public void testStaging_install_currentDirIsFile ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; libcore.tzdata.shared2.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataStagedDir , distro ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; java.nio.file.Files.write ( dataCurrentDir.hostPath , new byte [ ] { 'a' } ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distro ) ; }

Target:
public void testStaging_install_currentDirIsFile ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataStagedDir , distro ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; java.nio.file.Files.write ( dataCurrentDir.hostPath , new byte [ ] { 'a' } ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distro ) ; }
Source:
public void testExit ( ) throws java.lang.Exception { com.android.ide.common.rendering.RenderSecurityManager manager = new com.android.ide.common.rendering.RenderSecurityManager ( null , null ) ; try { manager.setActive ( true ) ; java.lang.System.exit ( ( - 1 ) ) ; fail ( "Should have thrown security exception" ) ; } catch ( java.lang.SecurityException exception ) { assertEquals ( "Exit access not allowed during rendering (-1)" , exception.toString ( ) ) ; } finally { manager.dispose ( ) ; } }

Target:
public void testExit ( ) throws java.lang.Exception { com.android.ide.common.rendering.RenderSecurityManager manager = new com.android.ide.common.rendering.RenderSecurityManager ( null , null ) ; try { manager.setActive ( true , myCredential ) ; java.lang.System.exit ( ( - 1 ) ) ; fail ( "Should have thrown security exception" ) ; } catch ( java.lang.SecurityException exception ) { assertEquals ( "Exit access not allowed during rendering (-1)" , exception.toString ( ) ) ; } finally { manager.dispose ( myCredential ) ; } }
Source:
void fetchUuids ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.btservice.RemoteDevices.mSdpTracker.contains ( device ) ) return ; com.android.bluetooth.btservice.RemoteDevices.mSdpTracker.add ( device ) ; android.os.Message message = mHandler.obtainMessage ( com.android.bluetooth.btservice.RemoteDevices.MESSAGE_UUID_INTENT ) ; message.obj = device ; mHandler.sendMessageDelayed ( message , com.android.bluetooth.btservice.RemoteDevices.UUID_INTENT_DELAY ) ; com.android.bluetooth.btservice.RemoteDevices.mAdapterService.getRemoteServicesNative ( com.android.bluetooth.Utils.getBytesFromAddress ( device.getAddress ( ) ) ) ; }

Target:
void fetchUuids ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.btservice.RemoteDevices.sSdpTracker.contains ( device ) ) return ; com.android.bluetooth.btservice.RemoteDevices.sSdpTracker.add ( device ) ; android.os.Message message = mHandler.obtainMessage ( com.android.bluetooth.btservice.RemoteDevices.MESSAGE_UUID_INTENT ) ; message.obj = device ; mHandler.sendMessageDelayed ( message , com.android.bluetooth.btservice.RemoteDevices.UUID_INTENT_DELAY ) ; com.android.bluetooth.btservice.RemoteDevices.sAdapterService.getRemoteServicesNative ( com.android.bluetooth.Utils.getBytesFromAddress ( device.getAddress ( ) ) ) ; }
Source:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } return ( ( com.android.ims.ImsManager.isVtEnabledByPlatform ( mPhone.getContext ( ) ) ) && ( com.android.ims.ImsManager.isEnhanced4gLteModeSettingEnabledByUser ( mPhone.getContext ( ) ) ) ) && ( com.android.ims.ImsManager.isVtEnabledByUser ( mPhone.getContext ( ) ) ) ; }

Target:
public boolean isWifiCallingAvailable ( int subId ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.isWifiCallingEnabled ( ) ; } else { return false ; } }
Source:
public void testFilterByPid ( ) { com.android.ddmuilib.logcat.LogCatFilter filter = new com.android.ddmuilib.logcat.LogCatFilter ( "" , "" , "" , "123" , "" , com.android.ddmlib.Log.LogLevel.VERBOSE ) ; com.android.ddmuilib.logcat.LogCatMessage msg = new com.android.ddmuilib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "123" , "" , "" , "" , "" , "" ) ; assertEquals ( true , filter.matches ( msg ) ) ; msg = new com.android.ddmuilib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "12" , "" , "" , "" , "" , "" ) ; assertEquals ( false , filter.matches ( msg ) ) ; }

Target:
public void testFilterByPid ( ) { com.android.ddmuilib.logcat.LogCatFilter filter = new com.android.ddmuilib.logcat.LogCatFilter ( "" , "" , "" , "123" , "" , com.android.ddmlib.Log.LogLevel.VERBOSE ) ; com.android.ddmlib.logcat.LogCatMessage msg = new com.android.ddmlib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "123" , "" , "" , "" , "" , "" ) ; assertEquals ( true , filter.matches ( msg ) ) ; msg = new com.android.ddmlib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "12" , "" , "" , "" , "" , "" ) ; assertEquals ( false , filter.matches ( msg ) ) ; }
Source:
private boolean startIPv6 ( ) { final java.lang.String PREFER_TEMPADDRS = "2" ; try { android.net.util.NetdService.run ( ( android.net.INetd netd ) -> { netd.setProcSysNet ( INetd.IPV6 , INetd.CONF , mInterfaceName , "use_tempaddr" , PREFER_TEMPADDRS ) ; } ) ; mNwService.enableIpv6 ( mInterfaceName ) ; } catch ( java.lang.IllegalStateException | android.os.RemoteException | android.os.ServiceSpecificException e ) { logError ( "Unable to change interface settings: %s" , e ) ; return false ; } return true ; }

Target:
private boolean startIPv6 ( ) { try { enableInterfaceIPv6PrivacyExtensions ( ) ; setInterfaceIPv6RaRtInfoMaxPlen ( android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH ) ; mNwService.enableIpv6 ( mInterfaceName ) ; } catch ( java.lang.IllegalStateException | android.os.RemoteException | android.os.ServiceSpecificException e ) { logError ( "Unable to change interface settings: %s" , e ) ; return false ; } return true ; }
Source:
public static < T > void assertThat ( java.lang.String reason , T actual , org.hamcrest.Matcher < T > matcher ) { if ( ! ( matcher.matches ( actual ) ) ) { org.hamcrest.Description description = new org.hamcrest.StringDescription ( ) ; description.appendText ( reason ) ; description.appendText ( "\nExpected: " ) ; description.appendDescriptionOf ( matcher ) ; description.appendText ( "\n got: " ) ; description.appendValue ( actual ) ; description.appendText ( "\n" ) ; throw new java.lang.AssertionError ( description.toString ( ) ) ; } }

Target:
public static < T > void assertThat ( java.lang.String reason , T actual , org.hamcrest.Matcher < ? super T > matcher ) { org.hamcrest.MatcherAssert.assertThat ( reason , actual , matcher ) ; }
Source:
private void handleP2pStateChanged ( ) { updateSearchMenu ( false ) ; if ( mWifiP2pEnabled ) { final android.preference.PreferenceScreen preferenceScreen = getPreferenceScreen ( ) ; preferenceScreen.removeAll ( ) ; preferenceScreen.setOrderingAsAdded ( true ) ; preferenceScreen.addPreference ( mThisDevicePref ) ; mPeersGroup.setEnabled ( true ) ; preferenceScreen.addPreference ( mPeersGroup ) ; mWifiP2pManager.requestPeers ( mChannel , this ) ; } }

Target:
private void handleP2pStateChanged ( ) { updateSearchMenu ( false ) ; if ( mWifiP2pEnabled ) { final android.preference.PreferenceScreen preferenceScreen = getPreferenceScreen ( ) ; preferenceScreen.removeAll ( ) ; preferenceScreen.setOrderingAsAdded ( true ) ; preferenceScreen.addPreference ( mThisDevicePref ) ; mPeersGroup.setEnabled ( true ) ; preferenceScreen.addPreference ( mPeersGroup ) ; mPersistentGroup.setEnabled ( true ) ; preferenceScreen.addPreference ( mPersistentGroup ) ; mWifiP2pManager.requestPeers ( mChannel , this ) ; } }
Source:
public com.android.manifmerger.MergingReport merge ( ) throws com.android.manifmerger.ManifestMerger2.MergeFailureException { com.android.manifmerger.ManifestMerger2 manifestMerger = new com.android.manifmerger.ManifestMerger2 ( mLogger , mMainManifestFile , mLibraryFilesBuilder.build ( ) , mFlavorsAndBuildTypeFiles.build ( ) , mFeaturesBuilder.build ( ) ) ; return manifestMerger.merge ( ) ; }

Target:
public com.android.manifmerger.MergingReport merge ( ) throws com.android.manifmerger.ManifestMerger2.MergeFailureException { com.android.manifmerger.PlaceholderHandler.KeyBasedValueResolver keyBasedValueResolver = ( ( mKeyBasedValueResolver ) != null ) ? mKeyBasedValueResolver : new com.android.manifmerger.PlaceholderHandler.KeyBasedValueResolver ( ) { @ com.android.annotations.Nullable @ java.lang.Override public java.lang.String getValue ( @ com.android.annotations.NonNull java.lang.String key ) { return null ; } } ; com.android.manifmerger.ManifestMerger2 manifestMerger = new com.android.manifmerger.ManifestMerger2 ( mLogger , mMainManifestFile , mLibraryFilesBuilder.build ( ) , mFlavorsAndBuildTypeFiles.build ( ) , mFeaturesBuilder.build ( ) , keyBasedValueResolver ) ; return manifestMerger.merge ( ) ; }
Source:
public com.android.build.gradle.tasks.List < com.android.build.gradle.tasks.File > getOutputFiles ( ) { return ( getOutputSplitFiles ( ) ) * ( getOutputFile ( ) ) ; }

Target:
public java.util.List < java.io.File > getOutputFiles ( ) { com.google.common.collect.ImmutableList.Builder < java.io.File > builder = com.google.common.collect.ImmutableList.builder ( ) ; for ( com.android.build.gradle.api.ApkOutputFile apk : getOutputSplitFiles ( ) ) { builder.add ( apk.getOutputFile ( ) ) ; } return builder.build ( ) ; }
Source:
public com.android.ide.common.rendering.api.ResourceValue resolveResValue ( @ com.android.annotations.Nullable com.android.ide.common.rendering.api.ResourceValue resValue ) { if ( ( mResolver ) != null ) { return mResolver.resolveResValue ( resValue ) ; } return resolveResValue ( resValue , 0 ) ; }

Target:
public com.android.ide.common.rendering.api.ResourceValue resolveResValue ( @ com.android.annotations.Nullable com.android.ide.common.rendering.api.ResourceValue resValue ) { if ( ( mResolver ) != null ) { return mResolver.resolveResValue ( resValue ) ; } if ( ( mLookupChain ) != null ) { mLookupChain.add ( resValue ) ; } return resolveResValue ( resValue , 0 ) ; }
Source:
public boolean visitMethodInvocation ( lombok.ast.MethodInvocation node ) { if ( node == ( mTarget ) ) { mSeenTarget = true ; } else if ( ( ( mSeenTarget ) || ( ( node.astOperand ( ) ) == ( mTarget ) ) ) && ( "show" . equals ( node.astName ( ) . astValue ( ) ) ) ) { mFound = true ; } return true ; }

Target:
public void visitMethodCallExpression ( com.intellij.psi.PsiMethodCallExpression node ) { super . visitMethodCallExpression ( node ) ; if ( node == ( mTarget ) ) { mSeenTarget = true ; } else { com.intellij.psi.PsiReferenceExpression methodExpression = node.getMethodExpression ( ) ; if ( ( ( mSeenTarget ) || ( ( methodExpression.getQualifier ( ) ) == ( mTarget ) ) ) && ( "show" . equals ( methodExpression.getReferenceName ( ) ) ) ) { mFound = true ; } } }
Source:
protected void configureShell ( org.eclipse.swt.widgets.Shell shell ) { super . configureShell ( shell ) ; shell.setText ( ( "Traceview: " + ( mTraceName ) ) ) ; shell.setBounds ( 100 , 10 , 1282 , 900 ) ; }

Target:
protected void configureShell ( org.eclipse.swt.widgets.Shell shell ) { super . configureShell ( shell ) ; shell.setText ( ( "Traceview: " + ( mTraceName ) ) ) ; java.io.InputStream in = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "icons/traceview128.png" ) ; if ( in != null ) { shell.setImage ( new org.eclipse.swt.graphics.Image ( shell.getDisplay ( ) , in ) ) ; } shell.setBounds ( 100 , 10 , 1282 , 900 ) ; }
Source:
public org.objectweb.asm.AnnotationVisitor visitParameterAnnotation ( int parameter , java.lang.String desc , boolean visible ) { org.objectweb.asm.AnnotationVisitor av = mv.visitParameterAnnotation ( parameter , remapper.mapDesc ( desc ) , visible ) ; return av == null ? av : new org.objectweb.asm.commons.RemappingAnnotationAdapter ( av , remapper ) ; }

Target:
public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation ( int typeRef , org.objectweb.asm.TypePath typePath , java.lang.String desc , boolean visible ) { org.objectweb.asm.AnnotationVisitor av = super . visitTypeAnnotation ( typeRef , typePath , remapper.mapDesc ( desc ) , visible ) ; return av == null ? av : new org.objectweb.asm.commons.RemappingAnnotationAdapter ( av , remapper ) ; }
Source:
public void put ( android.icu.impl.ICUResource.Key key , android.icu.impl.ICUResource.Value value ) { if ( ( value.getType ( ) ) == ( android.icu.util.UResourceBundle.STRING ) ) { android.icu.impl.NameType type = android.icu.impl.TimeZoneNamesImpl.ZNamesLoader.nameTypeFromKey ( key ) ; if ( ( type != null ) && ( ( type.ordinal ( ) ) < ( numNames ) ) ) { if ( ( names ) == null ) { names = new java.lang.String [ numNames ] ; } names [ type.ordinal ( ) ] = value.getString ( ) ; } } }

Target:
public void putNoFallback ( android.icu.impl.ICUResource.Key key ) { if ( ( names ) == null ) { names = new java.lang.String [ numNames ] ; } android.icu.impl.NameType type = android.icu.impl.TimeZoneNamesImpl.ZNamesLoader.nameTypeFromKey ( key ) ; if ( ( ( type != null ) && ( ( type.ordinal ( ) ) < ( numNames ) ) ) && ( ( names [ type.ordinal ( ) ] ) == null ) ) { names [ type.ordinal ( ) ] = android.icu.impl.TimeZoneNamesImpl.ZNamesLoader.NO_NAME ; } }
Source:
public java.lang.invoke.MethodHandle findConstructor ( java.lang.Class < ? > refc , java.lang.invoke.MethodType type ) throws java.lang.IllegalAccessException , java.lang.NoSuchMethodException { java.lang.reflect.Constructor constructor = refc.getDeclaredConstructor ( type.ptypes ( ) ) ; if ( constructor == null ) { throw new java.lang.NoSuchMethodException ( ( ( ( "No constructor for " + ( constructor.getDeclaringClass ( ) ) ) + " matching " ) + type ) ) ; } checkAccess ( refc , constructor.getDeclaringClass ( ) , constructor.getModifiers ( ) , constructor.getName ( ) ) ; return makeMethodHandleForConstructor ( constructor ) ; }

Target:
public java.lang.invoke.MethodHandle findConstructor ( java.lang.Class < ? > refc , java.lang.invoke.MethodType type ) throws java.lang.IllegalAccessException , java.lang.NoSuchMethodException { java.lang.reflect.Constructor constructor = refc.getDeclaredConstructor ( type.ptypes ( ) ) ; if ( constructor == null ) { throw new java.lang.NoSuchMethodException ( ( ( ( "No constructor for " + ( constructor.getDeclaringClass ( ) ) ) + " matching " ) + type ) ) ; } checkAccess ( refc , constructor.getDeclaringClass ( ) , constructor.getModifiers ( ) , constructor.getName ( ) ) ; return createMethodHandleForConstructor ( constructor ) ; }
Source:
private static void testClassType ( java.lang.Class < ? > c ) throws java.lang.Exception { boolean isInterface = Main.isInterface ( c ) ; boolean isArray = Main.isArrayClass ( c ) ; java.lang.System.out.println ( ( ( ( ( ( c.getName ( ) ) + " interface=" ) + isInterface ) + " array=" ) + isArray ) ) ; }

Target:
private static void testClassType ( java.lang.Class < ? > c ) throws java.lang.Exception { boolean isInterface = Main.isInterface ( c ) ; boolean isArray = Main.isArrayClass ( c ) ; boolean isModifiable = Main.isModifiableClass ( c ) ; java.lang.System.out.println ( ( ( ( ( ( ( ( c.getName ( ) ) + " interface=" ) + isInterface ) + " array=" ) + isArray ) + " modifiable=" ) + isModifiable ) ) ; }
Source:
public void setCanceled ( boolean value ) { }

Target:
public void createConfigFile ( ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog dialog = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog ( mConfigChooser.getShell ( ) , mEditedFile.getName ( ) , mConfigChooser.getConfiguration ( ) . getFullConfig ( ) ) ; if ( ( dialog.open ( ) ) != ( org.eclipse.jface.window.Window.OK ) ) { return ; } com.android.ide.common.resources.configuration.FolderConfiguration config = new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; dialog.getConfiguration ( config ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob job = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob ( this , mEditedFile , config ) ; job.schedule ( ) ; }
Source:
public boolean remove ( java.lang.Object key , java.lang.Object value ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; if ( value == null ) return false ; return ( segmentFor ( hash ) . remove ( key , hash , value ) ) != null ; }

Target:
public V remove ( java.lang.Object key ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; java.util.concurrent.ConcurrentHashMap.Segment < K , V > s = segmentForHash ( hash ) ; return s == null ? null : s.remove ( key , hash , null ) ; }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.AllocationExpression x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; java.util.List < com.android.jack.ir.ast.JExpression > arguments = popCallArgs ( info , x.arguments , x.binding ) ; pushNewExpression ( info , x , null , arguments , scope ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.AllocationExpression x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; java.util.List < com.android.jack.ir.ast.JExpression > arguments = popCallArgs ( info , x.arguments , x.binding ) ; pushNewExpression ( info , x , null , arguments , scope ) ; } catch ( com.android.jack.ir.ast.JTypeLookupException e ) { throw translateException ( x , e ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { if ( savedInstanceState != null ) { super . onRestoreInstanceState ( savedInstanceState ) ; com.android.settings.wifi.WpsDialog.DialogState dialogState = mDialogState.valueOf ( savedInstanceState.getString ( com.android.settings.wifi.WpsDialog.DIALOG_STATE ) ) ; java.lang.String msg = savedInstanceState.getString ( com.android.settings.wifi.WpsDialog.DIALOG_MSG_STRING ) ; updateDialog ( dialogState , msg ) ; } }

Target:
public void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { if ( savedInstanceState != null ) { super . onRestoreInstanceState ( savedInstanceState ) ; com.android.settings.wifi.WpsDialog.DialogState dialogState = mDialogState.valueOf ( savedInstanceState.getString ( com.android.settings.wifi.WpsDialog.DIALOG_STATE ) ) ; java.lang.String msg = savedInstanceState.getString ( com.android.settings.wifi.WpsDialog.DIALOG_MSG_STRING ) ; updateDialog ( dialogState , msg ) ; if ( dialogState == ( com.android.settings.wifi.WpsDialog.DialogState.WPS_START ) ) { startWps ( ) ; } } }
Source:
public IBase.Foo [ ] someMethodWithFooVectors ( android.hardware.tests.baz.V1_0.IBase [ ] fooInput ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , ( "Baz someMethodWithFooVectors " + ( com.android.commands.hidl_test_java.HidlTestJava.toString ( fooInput ) ) ) ) ; android.hardware.tests.baz.V1_0.IBase [ ] fooOutput = new android.hardware.tests.baz.V1_0.IBase.Foo [ 2 ] ; fooOutput [ 0 ] = fooInput [ 1 ] ; fooOutput [ 1 ] = fooInput [ 0 ] ; return fooOutput ; }

Target:
public java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > someMethodWithFooVectors ( java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > fooInput ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , ( "Baz someMethodWithFooVectors " + ( com.android.commands.hidl_test_java.HidlTestJava.fooVecToString ( fooInput ) ) ) ) ; java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > fooOutput = new java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > ( ) ; fooOutput.add ( fooInput.get ( 1 ) ) ; fooOutput.add ( fooInput.get ( 0 ) ) ; return fooOutput ; }
Source:
public boolean resetUid ( int uid ) { try { mError = mBinder.reset_uid ( uid ) ; return ( mError ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean delKey ( java.lang.String key , int uid ) { return delete ( key , uid ) ; }
Source:
private int amToHfVol ( int amVol ) { int amRange = ( mMaxAmVcVol ) - ( mMinAmVcVol ) ; int hfRange = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MAX_HFP_SCO_VOICE_CALL_VOLUME ) - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) ; int hfOffset = ( hfRange * ( amVol - ( mMinAmVcVol ) ) ) / amRange ; int hfVol = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) + hfOffset ; android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "AM -> HF " + amVol ) + " " ) + hfVol ) ) ; return hfVol ; }

Target:
static int amToHfVol ( int amVol ) { int amRange = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.mMaxAmVcVol ) - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.mMinAmVcVol ) ; int hfRange = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MAX_HFP_SCO_VOICE_CALL_VOLUME ) - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) ; int hfOffset = ( hfRange * ( amVol - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.mMinAmVcVol ) ) ) / amRange ; int hfVol = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) + hfOffset ; android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "AM -> HF " + amVol ) + " " ) + hfVol ) ) ; return hfVol ; }
Source:
protected boolean isApnTypeAvailable ( java.lang.String type ) { if ( ( allApns ) != null ) { for ( com.android.internal.telephony.gsm.ApnSetting apn : allApns ) { if ( apn.canHandleType ( type ) ) { return true ; } } } return false ; }

Target:
protected boolean isApnTypeAvailable ( java.lang.String type ) { if ( type.equals ( Phone.APN_TYPE_DUN ) ) { return ( fetchDunApn ( ) ) != null ; } if ( ( allApns ) != null ) { for ( com.android.internal.telephony.gsm.ApnSetting apn : allApns ) { if ( apn.canHandleType ( type ) ) { return true ; } } } return false ; }
Source:
public void startTone ( ) { ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ++ ; if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 1 ) { mCallAudioManager.setIsTonePlaying ( true ) ; } synchronized ( mSessionLock ) { if ( ( mSession ) != null ) { com.android.server.telecom.Log.cancelSubsession ( mSession ) ; } mSession = com.android.server.telecom.Log.createSubsession ( ) ; } start ( ) ; }

Target:
public void startTone ( ) { ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ++ ; if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 1 ) { mCallAudioManager.setIsTonePlaying ( true ) ; } synchronized ( mSessionLock ) { if ( ( mSession ) != null ) { android.telecom.Log.cancelSubsession ( mSession ) ; } mSession = android.telecom.Log.createSubsession ( ) ; } start ( ) ; }
Source:
public static void writeUint16 ( int i , java.io.OutputStream output ) throws java.io.IOException { output.write ( ( i > > 8 ) ) ; output.write ( i ) ; }

Target:
public static void writeUint24 ( int i , java.io.OutputStream output ) throws java.io.IOException { output.write ( ( ( byte ) ( i > > > 16 ) ) ) ; output.write ( ( ( byte ) ( i > > > 8 ) ) ) ; output.write ( ( ( byte ) ( i ) ) ) ; }
Source:
public void onAttachFailed ( ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mEventFacade.postEvent ( "WifiNanOnAttachFailed" , mResults ) ; }

Target:
public void onAttachFailed ( ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mEventFacade.postEvent ( "WifiNanOnAttachFailed" , mResults ) ; }
Source:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier compareQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier referenceQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ) ( reference ) ) ; if ( ( ( mValue ) == ( referenceQ.mValue ) ) && ( ( compareQ.mValue ) != ( referenceQ.mValue ) ) ) { return true ; } else { return ( mValue.mDensity.getValue ( ) ) > ( compareQ.mValue.mDensity.getValue ( ) ) ; } }

Target:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier compareQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier referenceQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ) ( reference ) ) ; if ( ( ( mValue ) == ( referenceQ.mValue ) ) && ( ( compareQ.mValue ) != ( referenceQ.mValue ) ) ) { return true ; } else { return ( mValue.getDpiValue ( ) ) > ( compareQ.mValue.getDpiValue ( ) ) ; } }