auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final void setCallerDisplayName ( java.lang.String connectionId , java.lang.String callerDisplayName , int presentation ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.arg2 = callerDisplayName ; args.argi1 = presentation ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_SET_CALLER_DISPLAY_NAME , args ) . sendToTarget ( ) ; }

Target:
public final void setCallerDisplayName ( java.lang.String connectionId , java.lang.String callerDisplayName , int presentation , android.telecom.Logging.Session.Info sessionInfo ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.arg2 = callerDisplayName ; args.argi1 = presentation ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_SET_CALLER_DISPLAY_NAME , args ) . sendToTarget ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mDut = new com.android.server.wifi.nan.WifiNanRttStateManager ( ) ; mTestLooper = new android.os.test.TestLooper ( ) ; com.android.internal.util.test.BidirectionalAsyncChannelServer server = new com.android.internal.util.test.BidirectionalAsyncChannelServer ( mMockContext , mTestLooper.getLooper ( ) , mMockHandler ) ; org.mockito.Mockito.when ( mMockRttService.getMessenger ( ) ) . thenReturn ( server.getMessenger ( ) ) ; mDut.startWithRttService ( mMockContext , mTestLooper.getLooper ( ) , mMockRttService ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mDut = new com.android.server.wifi.aware.WifiAwareRttStateManager ( ) ; mTestLooper = new android.os.test.TestLooper ( ) ; com.android.internal.util.test.BidirectionalAsyncChannelServer server = new com.android.internal.util.test.BidirectionalAsyncChannelServer ( mMockContext , mTestLooper.getLooper ( ) , mMockHandler ) ; org.mockito.Mockito.when ( mMockRttService.getMessenger ( ) ) . thenReturn ( server.getMessenger ( ) ) ; mDut.startWithRttService ( mMockContext , mTestLooper.getLooper ( ) , mMockRttService ) ; }
Source:
final void put ( float [ ] src , int srcOffset , int floatCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.FLOAT , src.length , srcOffset , floatCount ) ; this . block.pokeFloatArray ( ( ( offset ) + ( position ) ) , src , srcOffset , floatCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( float [ ] src , int srcOffset , int floatCount ) { checkIsAccessible ( ) ; int byteCount = checkPutBounds ( SizeOf.FLOAT , src.length , srcOffset , floatCount ) ; this . block.pokeFloatArray ( ( ( offset ) + ( position ) ) , src , srcOffset , floatCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void execute ( ) { long delayNs = java.util.concurrent.TimeUnit.NANOSECONDS.convert ( mDelay , mTimeUnit ) ; try { java.lang.Thread.sleep ( ( delayNs / ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) , ( ( int ) ( delayNs % ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) ) ) ; addValue ( "executed" , new java.lang.Boolean ( true ) ) ; if ( mFail ) { junit.framework.Assert.fail ( "FakeSensorOperation failed" ) ; } } catch ( java.lang.InterruptedException e ) { } }

Target:
public void execute ( ) { long delayNs = java.util.concurrent.TimeUnit.NANOSECONDS.convert ( mDelay , mTimeUnit ) ; try { java.lang.Thread.sleep ( ( delayNs / ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) , ( ( int ) ( delayNs % ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) ) ) ; mStats.addValue ( "executed" , true ) ; if ( mFail ) { junit.framework.Assert.fail ( "FakeSensorOperation failed" ) ; } } catch ( java.lang.InterruptedException e ) { } }
Source:
public void copyFromUnchecked ( short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFromUnchecked" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( short [ ] d ) { validateIsInt16 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String pkgName , java.lang.String instructionSet , boolean vmSafeMode ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , pkgName , instructionSet , vmSafeMode ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String pkgName , java.lang.String instructionSet , boolean vmSafeMode , boolean debuggable ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , pkgName , instructionSet , vmSafeMode , debuggable ) ; }
Source:
private void buildAlloc ( @ javax.annotation.Nonnull com.android.jack.dx.rop.code.RegisterSpec destReg , @ javax.annotation.Nonnull com.android.jack.ir.ast.JAlloc alloc , @ javax.annotation.Nonnull com.android.jack.dx.rop.code.SourcePosition sourcePosition ) { com.android.jack.dx.rop.cst.CstType type = com.android.jack.backend.dex.rop.RopHelper.getCstType ( alloc.getInstanceType ( ) ) ; com.android.jack.dx.rop.code.Rop rop = com.android.jack.dx.rop.code.Rops.NEW_INSTANCE ; addInstruction ( new com.android.jack.dx.rop.code.ThrowingCstInsn ( rop , sourcePosition , com.android.jack.dx.rop.code.RegisterSpecList.EMPTY , getCatchTypes ( ) , type ) ) ; addMoveResultPseudoAsExtraInstruction ( destReg , sourcePosition ) ; }

Target:
private void buildAlloc ( @ javax.annotation.Nonnull com.android.jack.dx.rop.code.RegisterSpec destReg , @ javax.annotation.Nonnull com.android.jack.ir.ast.JAlloc alloc , @ javax.annotation.Nonnull com.android.jack.dx.rop.code.SourcePosition sourcePosition ) { addInstruction ( new com.android.jack.dx.rop.code.ThrowingCstInsn ( com.android.jack.dx.rop.code.Rops.NEW_INSTANCE , sourcePosition , com.android.jack.dx.rop.code.RegisterSpecList.EMPTY , getCatchTypes ( ) , com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( alloc.getInstanceType ( ) ) ) ) ; addMoveResultPseudoAsExtraInstruction ( destReg , sourcePosition ) ; }
Source:
public void testCanReadPeersMacAddressCurrentProfileAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mMockUserInfo.id = mCallingUser ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testCanReadPeersMacAddressCurrentProfileAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mMockUserInfo.id = mCallingUser ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
public void test_doOutput ( ) throws java.lang.Throwable { org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.setUpStoreProperties ( ) ; javax.net.ssl.SSLServerSocket ss = ( ( javax.net.ssl.SSLServerSocket ) ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) . getServerSocketFactory ( ) . createServerSocket ( 0 ) ) ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.TestHostnameVerifier hnv = new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.TestHostnameVerifier ( ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( hnv ) ; java.net.URL url = new java.net.URL ( ( "https://localhost:" + ( ss.getLocalPort ( ) ) ) ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( url.openConnection ( ) ) ) ; connection.setSSLSocketFactory ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) . getSocketFactory ( ) ) ; connection.setDoOutput ( true ) ; javax.net.ssl.SSLSocket peerSocket = ( ( javax.net.ssl.SSLSocket ) ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.doInteraction ( connection , ss ) ) ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.checkConnectionStateParameters ( connection , peerSocket ) ; connection.connect ( ) ; }

Target:
private static com.google.mockwebserver.MockWebServer createProxiedServer ( com.google.mockwebserver.Dispatcher getDispatcher ) throws java.lang.Exception { org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.ProxyConnectDispatcher proxyConnectDispatcher = new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.ProxyConnectDispatcher ( false ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.DelegatingDispatcher delegatingDispatcher1 = new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.DelegatingDispatcher ( proxyConnectDispatcher , getDispatcher ) ; return org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.createProxyAndWebServer ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) , delegatingDispatcher1 ) ; }
Source:
public android.bluetooth.AtCommandResult handleTestCommand ( ) { mServiceConnectionEstablished = true ; sendURC ( "+CHLD: (0,1,2,3)" ) ; sendURC ( "OK" ) ; if ( isIncallAudio ( ) ) { audioOn ( ) ; } return new android.bluetooth.AtCommandResult ( android.bluetooth.AtCommandResult.UNSOLICITED ) ; }

Target:
public android.bluetooth.AtCommandResult handleTestCommand ( ) { mServiceConnectionEstablished = true ; sendURC ( "+CHLD: (0,1,2,3)" ) ; sendURC ( "OK" ) ; if ( isIncallAudio ( ) ) { audioOn ( ) ; } else if ( mCM.getFirstActiveRingingCall ( ) . isRinging ( ) ) { mBluetoothPhoneState.ring ( ) ; } return new android.bluetooth.AtCommandResult ( android.bluetooth.AtCommandResult.UNSOLICITED ) ; }
Source:
public int getIndexOf ( @ org.jetbrains.annotations.Nullable final com.intellij.ui.tabs.impl.TabInfo tabInfo ) { return myVisibleInfos.indexOf ( tabInfo ) ; }

Target:
protected java.util.List < com.intellij.ui.tabs.impl.TabInfo > getVisibleInfos ( ) { if ( ! ( isAlphabeticalMode ( ) ) ) { return myVisibleInfos ; } else { java.util.List < com.intellij.ui.tabs.impl.TabInfo > sortedCopy = new java.util.ArrayList < com.intellij.ui.tabs.impl.TabInfo > ( myVisibleInfos ) ; java.util.Collections.sort ( sortedCopy , com.intellij.ui.tabs.impl.JBTabsImpl.ABC_COMPARATOR ) ; return sortedCopy ; } }
Source:
boolean getProtocolMode ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getProtocolMode: " + ( device.getAddress ( ) ) ) ) ; } int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothInputDevice.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_GET_PROTOCOL_MODE , device ) ; mHandler.sendMessage ( msg ) ; return true ; }

Target:
boolean getProtocolMode ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getProtocolMode: " + ( device.getAddress ( ) ) ) ) ; } int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothHidHost.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_GET_PROTOCOL_MODE , device ) ; mHandler.sendMessage ( msg ) ; return true ; }
Source:
private org.apache.harmony.dalvik.ddmc.Chunk handleSPSE ( org.apache.harmony.dalvik.ddmc.Chunk request ) { if ( false ) { android.util.Log.v ( "ddm-heap" , "Sample prof stream end" ) ; } try { android.os.Debug.stopMethodTracing ( ) ; } catch ( java.lang.RuntimeException re ) { android.util.Log.w ( "ddm-heap" , ( "Sample prof stream end failed: " + ( re.getMessage ( ) ) ) ) ; return createFailChunk ( 1 , re.getMessage ( ) ) ; } return null ; }

Target:
private org.apache.harmony.dalvik.ddmc.Chunk handleMPSEOrSPSE ( org.apache.harmony.dalvik.ddmc.Chunk request , java.lang.String type ) { if ( android.ddm.DdmHandleProfiling.DEBUG ) { android.util.Log.v ( "ddm-heap" , ( type + " prof stream end" ) ) ; } try { android.os.Debug.stopMethodTracing ( ) ; } catch ( java.lang.RuntimeException re ) { android.util.Log.w ( "ddm-heap" , ( ( type + " prof stream end failed: " ) + ( re.getMessage ( ) ) ) ) ; return createFailChunk ( 1 , re.getMessage ( ) ) ; } return null ; }
Source:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByOid ( org.bouncycastle.asn1.ASN1ObjectIdentifier oid ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.asn1.x9.X962NamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByOID ( oid ) ; } } return params ; }

Target:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByOid ( org.bouncycastle.asn1.ASN1ObjectIdentifier oid ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.crypto.ec.CustomNamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.x9.X962NamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByOID ( oid ) ; } if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByOID ( oid ) ; } } return params ; }
Source:
private void runAttachTestCmd ( com.android.tradefed.device.ITestDevice device , java.lang.String pkg , java.lang.String agentParams ) throws java.lang.Exception { java.lang.String attachCmd = ( ( ( "cmd activity start -S -W " + agentParams ) + " -n " ) + pkg ) + "/android.jvmti.JvmtiActivity" ; java.lang.String attachReply = device.executeShellCommand ( attachCmd ) ; if ( ( attachReply != null ) && ( ! ( attachReply.trim ( ) . isEmpty ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.e ( attachReply ) ; } }

Target:
private static void runAttachTestCmd ( com.android.tradefed.device.ITestDevice device , java.lang.String pkg , java.lang.String agentParams ) throws java.lang.Exception { java.lang.String attachCmd = ( ( ( "cmd activity start -S -W " + agentParams ) + " -n " ) + pkg ) + "/android.jvmti.JvmtiActivity" ; device.executeShellCommand ( attachCmd , com.android.ddmlib.NullOutputReceiver.getReceiver ( ) , 10 , java.util.concurrent.TimeUnit.SECONDS , 1 ) ; }
Source:
protected synchronized void dump ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.DUMP , com.android.server.IpSecService.TAG ) ; pw.println ( "IpSecService dump:" ) ; pw.println ( ( "NetdNativeService Connection: " + ( isNetdAlive ( ) ? "alive" : "dead" ) ) ) ; pw.println ( ) ; pw.println ( "mTransformRecords:" ) ; pw.println ( mTransformRecords ) ; pw.println ( "mUdpSocketRecords:" ) ; pw.println ( mUdpSocketRecords ) ; pw.println ( "mSpiRecords:" ) ; pw.println ( mSpiRecords ) ; }

Target:
protected synchronized void dump ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.DUMP , com.android.server.IpSecService.TAG ) ; pw.println ( "IpSecService dump:" ) ; pw.println ( ( "NetdNativeService Connection: " + ( isNetdAlive ( ) ? "alive" : "dead" ) ) ) ; pw.println ( ) ; pw.println ( "mUserQuotaTracker:" ) ; pw.println ( mUserQuotaTracker ) ; pw.println ( "mTransformRecords:" ) ; pw.println ( mTransformRecords ) ; pw.println ( "mUdpSocketRecords:" ) ; pw.println ( mUdpSocketRecords ) ; pw.println ( "mSpiRecords:" ) ; pw.println ( mSpiRecords ) ; }
Source:
public void testGetPythonBinaryException ( ) { com.android.tradefed.util.CommandResult findPythonresult = new com.android.tradefed.util.CommandResult ( ) ; findPythonresult.setStatus ( CommandStatus.FAILED ) ; findPythonresult.setStdout ( "" ) ; com.android.tradefed.util.IRunUtil runUtil = createMockRunUtil ( findPythonresult ) ; mVtsPythonRunnerHelper = new com.android.tradefed.util.VtsPythonRunnerHelper ( null ) ; mVtsPythonRunnerHelper.setRunUtil ( runUtil ) ; try { java.lang.String pythonBinary = mVtsPythonRunnerHelper.getPythonBinary ( ) ; } catch ( java.lang.RuntimeException e ) { org.junit.Assert.assertEquals ( "Could not find python binary on host machine" , e.getMessage ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void testActivateVirtualEnvNotExist ( ) { com.android.tradefed.util.IRunUtil runUtil = createMockRunUtil ( ) ; org.junit.Assert.assertEquals ( null , com.android.tradefed.util.VtsPythonRunnerHelper.getPythonBinDir ( mVirtualenvPath ) ) ; com.android.tradefed.util.VtsPythonRunnerHelper.activateVirtualenv ( runUtil , mVirtualenvPath ) ; java.lang.String pythonBinary = runUtil.runTimedCmd ( 1000 , "which" , "python" ) . getStdout ( ) ; org.junit.Assert.assertEquals ( pythonBinary , "/usr/bin/python" ) ; }
Source:
public static void initialize ( java.security.SecureRandom generator ) throws java.io.IOException { java.io.FileInputStream fis = null ; try { byte [ ] seedBytes = new byte [ org.chromium.base.SecureRandomInitializer.NUM_RANDOM_BYTES ] ; fis = new java.io.FileInputStream ( "/dev/urandom" ) ; if ( ( fis.read ( seedBytes ) ) != ( seedBytes.length ) ) { throw new java.io.IOException ( "Failed to get enough random data." ) ; } generator.setSeed ( seedBytes ) ; } finally { org.chromium.base.StreamUtil.closeQuietly ( fis ) ; } }

Target:
public static void initialize ( java.security.SecureRandom generator ) throws java.io.IOException { java.io.FileInputStream fis = null ; try { fis = new java.io.FileInputStream ( "/dev/urandom" ) ; if ( ( fis.read ( org.chromium.base.SecureRandomInitializer.sSeedBytes ) ) != ( org.chromium.base.SecureRandomInitializer.sSeedBytes.length ) ) { throw new java.io.IOException ( "Failed to get enough random data." ) ; } generator.setSeed ( org.chromium.base.SecureRandomInitializer.sSeedBytes ) ; } finally { try { if ( fis != null ) { fis.close ( ) ; } } catch ( java.io.IOException e ) { } } }
Source:
public void methodPublicFinalModifier ( ) throws java.lang.Exception { com.android.jack.ir.ast.JDefinedClassOrInterface type = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( session.getLookup ( ) . getType ( classSignature ) ) ) ; junit.framework.Assert.assertNotNull ( type ) ; com.android.jack.ir.ast.JMethod method = com.android.jack.TestTools.getMethod ( type , "methodPublicFinal()V" ) ; junit.framework.Assert.assertNotNull ( method ) ; junit.framework.Assert.assertTrue ( ( ( method.isPublic ( ) ) && ( method.isFinal ( ) ) ) ) ; }

Target:
public void methodPublicFinalModifier ( ) throws java.lang.Exception { com.android.jack.ir.ast.JDefinedClassOrInterface type = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( session.getLookup ( ) . getType ( com.android.jack.frontend.MethodModifierTest.classSignature ) ) ) ; junit.framework.Assert.assertNotNull ( type ) ; com.android.jack.ir.ast.JMethod method = com.android.jack.TestTools.getMethod ( type , "methodPublicFinal()V" ) ; junit.framework.Assert.assertNotNull ( method ) ; junit.framework.Assert.assertTrue ( ( ( method.isPublic ( ) ) && ( method.isFinal ( ) ) ) ) ; }
Source:
public void test_connect ( ) throws java.lang.Exception { java.net.Socket s = new java.net.Socket ( ) ; new libcore.java.net.ConcurrentCloseTest.Killer ( s ) . start ( ) ; try { java.lang.System.err.println ( "connect..." ) ; s.connect ( libcore.java.net.ConcurrentCloseTest.UNREACHABLE_ADDRESS ) ; fail ( ( ( "connect returned: " + s ) + "!" ) ) ; } catch ( java.net.SocketException expected ) { assertEquals ( "Socket closed" , expected.getMessage ( ) ) ; } }

Target:
public void test_connect ( ) throws java.lang.Exception { tests.net.StuckServer ss = new tests.net.StuckServer ( false ) ; java.net.Socket s = new java.net.Socket ( ) ; new libcore.java.net.ConcurrentCloseTest.Killer ( s ) . start ( ) ; try { java.lang.System.err.println ( "connect..." ) ; s.connect ( ss.getLocalSocketAddress ( ) ) ; fail ( ( ( "connect returned: " + s ) + "!" ) ) ; } catch ( java.net.SocketException expected ) { assertEquals ( "Socket closed" , expected.getMessage ( ) ) ; } finally { ss.close ( ) ; } }
Source:
void addPortToAvailableList ( int port ) { if ( port > 0 ) { synchronized ( mDebuggerPorts ) { if ( ( mDebuggerPorts.indexOf ( port ) ) == ( - 1 ) ) { int count = mDebuggerPorts.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { if ( port < ( mDebuggerPorts.get ( i ) ) ) { mDebuggerPorts.add ( i , port ) ; break ; } } } } } }

Target:
void addPortToAvailableList ( int port ) { mDebuggerPorts.free ( port ) ; }
Source:
protected void onResume ( ) { super . onResume ( ) ; mPinToggle.setChecked ( mPhone.getSimCard ( ) . getSimLockEnabled ( ) ) ; if ( ( mDialogState ) != ( com.android.settings.SimLockSettings.OFF_MODE ) ) { showPinDialog ( ) ; } else { resetDialogState ( ) ; } }

Target:
protected void onResume ( ) { super . onResume ( ) ; mPinToggle.setChecked ( mPhone.getIccCard ( ) . getIccLockEnabled ( ) ) ; if ( ( mDialogState ) != ( com.android.settings.IccLockSettings.OFF_MODE ) ) { showPinDialog ( ) ; } else { resetDialogState ( ) ; } }
Source:
public void stopScan ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( ( com.android.server.wifi.WifiNative.sScanCmdId ) != 0 ) { com.android.server.wifi.WifiNative.stopScanNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sScanCmdId ) ; } com.android.server.wifi.WifiNative.sScanSettings = null ; com.android.server.wifi.WifiNative.sScanEventHandler = null ; com.android.server.wifi.WifiNative.sScanCmdId = 0 ; } } }

Target:
public void stopScan ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { mWifiVendorHal.stopScan ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( ( com.android.server.wifi.WifiNative.sScanCmdId ) != 0 ) { com.android.server.wifi.WifiNative.stopScanNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sScanCmdId ) ; } com.android.server.wifi.WifiNative.sScanSettings = null ; com.android.server.wifi.WifiNative.sScanEventHandler = null ; com.android.server.wifi.WifiNative.sScanCmdId = 0 ; } } } }
Source:
private void initLayout ( ) { findViewById ( R.id.fab ) . setOnClickListener ( this ) ; setSupportActionBar ( findViewById ( R.id.toolbar ) ) ; com.android.dialer.main.impl.BottomNavBar navBar = findViewById ( R.id.bottom_nav_bar ) ; navBar.setOnTabSelectedListener ( new com.android.dialer.main.impl.MainActivity.MainBottomNavBarBottomNavTabListener ( ) ) ; navBar.selectTab ( BottomNavBar.TabIndex.SPEED_DIAL ) ; }

Target:
private void initLayout ( ) { findViewById ( R.id.fab ) . setOnClickListener ( this ) ; com.android.dialer.main.impl.toolbar.MainToolbar toolbar = findViewById ( R.id.toolbar ) ; toolbar.setSearchBarListener ( new com.android.dialer.main.impl.MainActivity.MainSearchBarListener ( ) ) ; setSupportActionBar ( toolbar ) ; com.android.dialer.main.impl.BottomNavBar navBar = findViewById ( R.id.bottom_nav_bar ) ; navBar.setOnTabSelectedListener ( new com.android.dialer.main.impl.MainActivity.MainBottomNavBarBottomNavTabListener ( ) ) ; navBar.selectTab ( BottomNavBar.TabIndex.SPEED_DIAL ) ; }
Source:
public final void testGetCenter ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Point p = r.getCenter ( ) ; assertEquals ( ( 3 + ( 20 / 2 ) ) , p.x ) ; assertEquals ( ( 4 + ( 30 / 2 ) ) , p.y ) ; }

Target:
public final void testGetCenter ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.common.api.Point p = r.getCenter ( ) ; assertEquals ( ( 3 + ( 20 / 2 ) ) , p.x ) ; assertEquals ( ( 4 + ( 30 / 2 ) ) , p.y ) ; }
Source:
public void testAPInterfaceFailedWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testAPInterfaceFailedWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( null ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.SOFT_AP_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }
Source:
public static java.lang.String normalizeMimeType ( java.lang.String type ) { if ( type == null ) { return null ; } type = type.trim ( ) . toLowerCase ( java.util.Locale.US ) ; final int semicolonIndex = type.indexOf ( ';' ) ; if ( semicolonIndex != ( - 1 ) ) { type = type.substring ( 0 , semicolonIndex ) ; } return type ; }

Target:
public static java.lang.String normalizeMimeType ( java.lang.String type ) { if ( type == null ) { return null ; } type = type.trim ( ) . toLowerCase ( java.util.Locale.ROOT ) ; final int semicolonIndex = type.indexOf ( ';' ) ; if ( semicolonIndex != ( - 1 ) ) { type = type.substring ( 0 , semicolonIndex ) ; } return type ; }
Source:
public com.google.common.collect.MapMaker softKeys ( ) { return setKeyStrength ( com.google.common.collect.MapMakerInternalMap.Strength.SOFT ) ; }

Target:
public V get ( java.lang.Object key ) { V value ; try { value = getOrCompute ( ( ( K ) ( key ) ) ) ; } catch ( java.util.concurrent.ExecutionException e ) { java.lang.Throwable cause = e.getCause ( ) ; com.google.common.base.Throwables.propagateIfInstanceOf ( cause , com.google.common.collect.ComputationException.class ) ; throw new com.google.common.collect.ComputationException ( cause ) ; } if ( value == null ) { throw new java.lang.NullPointerException ( ( ( ( ( computingFunction ) + " returned null for key " ) + key ) + "." ) ) ; } return value ; }
Source:
public void testWrongVariantLevelAbiFilter ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , com.google.common.collect.Sets.newHashSet ( "bar" , "foo" ) , 160 , "zzz" ) ; assertNull ( result ) ; }

Target:
public void testWrongVariantLevelAbiFilter ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , com.google.common.collect.Sets.newHashSet ( "bar" , "foo" ) , 160 , "zzz" ) ; assertEquals ( 0 , result.size ( ) ) ; }
Source:
private com.google.gct.testing.ConfigurationResult getOrCreateConfigurationResult ( java.lang.String encodedConfigurationInstance , java.util.Map < java.lang.String , com.google.gct.testing.ConfigurationResult > results ) { com.google.gct.testing.ConfigurationResult result = results.get ( encodedConfigurationInstance ) ; if ( result == null ) { result = new com.google.gct.testing.ConfigurationResult ( encodedConfigurationInstance ) ; results.put ( encodedConfigurationInstance , result ) ; } return result ; }

Target:
private com.google.gct.testing.ConfigurationResult getOrCreateConfigurationResult ( java.lang.String encodedConfigurationInstance , java.util.Map < java.lang.String , com.google.gct.testing.ConfigurationResult > results ) { com.google.gct.testing.ConfigurationResult result = results.get ( encodedConfigurationInstance ) ; if ( result == null ) { result = new com.google.gct.testing.ConfigurationResult ( encodedConfigurationInstance , bucketName ) ; results.put ( encodedConfigurationInstance , result ) ; } return result ; }
Source:
public boolean nvWriteCdmaPrl ( byte [ ] preferredRoamingList ) { enforceModifyPermissionOrCarrierPrivilege ( getDefaultSubscription ( ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvWriteCdmaPrl: value: " + ( com.android.internal.util.HexDump.toHexString ( preferredRoamingList ) ) ) ) ; java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_WRITE_CDMA_PRL , preferredRoamingList ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvWriteCdmaPrl: " + ( success ? "ok" : "fail" ) ) ) ; return success ; }

Target:
public boolean nvWriteCdmaPrl ( byte [ ] preferredRoamingList ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege ( mApp , getDefaultSubscription ( ) , "nvWriteCdmaPrl" ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvWriteCdmaPrl: value: " + ( com.android.internal.util.HexDump.toHexString ( preferredRoamingList ) ) ) ) ; java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_WRITE_CDMA_PRL , preferredRoamingList ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvWriteCdmaPrl: " + ( success ? "ok" : "fail" ) ) ) ; return success ; }
Source:
public java.nio.ByteBuffer put ( byte value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ( position ) == ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeByte ( ( ( offset ) + ( ( position ) ++ ) ) , value ) ; return this ; }

Target:
public java.nio.ByteBuffer put ( byte value ) { checkIsAccessible ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ( position ) == ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeByte ( ( ( offset ) + ( ( position ) ++ ) ) , value ) ; return this ; }
Source:
public boolean post ( java.lang.Runnable action ) { android.os.Handler handler ; if ( ( mAttachInfo ) != null ) { handler = mAttachInfo.mHandler ; } else { android.view.ViewRoot.getRunQueue ( ) . post ( action ) ; return true ; } return handler.post ( action ) ; }

Target:
public int getAccessibilityWindowId ( ) { return ( mAttachInfo ) != null ? mAttachInfo.mAccessibilityWindowId : android.view.View.NO_ID ; }
Source:
public static long IntMatCond_LongVarVar ( int a , int b , long x , long y ) { long result = ( a > b ) ? x : y ; return result + ( a > b ? 0L : 1L ) ; }

Target:
public static long LongMatCond_LongVarVar ( long a , long b , long x , long y ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } long result = ( a > b ) ? x : y ; return result + ( a > b ? 0L : 1L ) ; }
Source:
public void test_getSystemClassLoader ( ) { java.lang.ClassLoader cl = java.lang.ClassLoader.getSystemClassLoader ( ) ; java.io.InputStream is = cl.getResourceAsStream ( "hyts_Foo.c" ) ; assertNotNull ( "Failed to find resource from system classpath" , is ) ; try { is.close ( ) ; } catch ( java.io.IOException e ) { } }

Target:
public void test_testClassLoader_getResourceLjava_lang_String ( ) { java.lang.ClassLoader parentClassLoader = testClassLoader.getParent ( ) ; assertNull ( parentClassLoader.getResource ( org.apache.harmony.tests.java.lang.ClassLoaderTest.TEST_RESOURCE_NAME ) ) ; org.apache.harmony.tests.java.lang.ClassLoaderTest.assertGetResourceIsValid ( parentClassLoader , org.apache.harmony.tests.java.lang.ClassLoaderTest.BOOT_RESOURCE_NAME ) ; org.apache.harmony.tests.java.lang.ClassLoaderTest.assertGetResourceIsValid ( testClassLoader , org.apache.harmony.tests.java.lang.ClassLoaderTest.TEST_RESOURCE_NAME ) ; org.apache.harmony.tests.java.lang.ClassLoaderTest.assertGetResourceIsValid ( testClassLoader , org.apache.harmony.tests.java.lang.ClassLoaderTest.BOOT_RESOURCE_NAME ) ; }
Source:
private boolean scanWithParams ( java.lang.String freqList , java.lang.String hiddenNetworkSSIDList ) { java.lang.StringBuilder scanCommand = new java.lang.StringBuilder ( ) ; scanCommand.append ( "SCAN TYPE=ONLY" ) ; if ( freqList != null ) { scanCommand.append ( ( " freq=" + freqList ) ) ; } if ( hiddenNetworkSSIDList != null ) { scanCommand.append ( ( " ssid " + hiddenNetworkSSIDList ) ) ; } return doBooleanCommand ( scanCommand.toString ( ) ) ; }

Target:
public boolean connectToNetwork ( android.net.wifi.WifiConfiguration configuration , boolean shouldDisconnect ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.connectToNetwork ( configuration , shouldDisconnect ) ; } else { return mWifiSupplicantControl.connectToNetwork ( configuration , shouldDisconnect ) ; } }
Source:
public static final com.google.protobuf.nano.MessageNano mergeFrom ( com.google.protobuf.nano.MessageNano msg , final byte [ ] data , final int off , final int len ) throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { try { final com.google.protobuf.nano.CodedInputByteBufferNano input = com.google.protobuf.nano.CodedInputByteBufferNano.newInstance ( data , off , len ) ; msg.mergeFrom ( input ) ; input.checkLastTagWas ( 0 ) ; return msg ; } catch ( com.google.protobuf.nano.InvalidProtocolBufferNanoException e ) { throw e ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( ( "Reading from a byte array threw an IOException (should " + "never happen)." ) ) ; } }

Target:
public static final < T extends com.google.protobuf.nano.MessageNano > T mergeFrom ( T msg , final byte [ ] data , final int off , final int len ) throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { try { final com.google.protobuf.nano.CodedInputByteBufferNano input = com.google.protobuf.nano.CodedInputByteBufferNano.newInstance ( data , off , len ) ; msg.mergeFrom ( input ) ; input.checkLastTagWas ( 0 ) ; return msg ; } catch ( com.google.protobuf.nano.InvalidProtocolBufferNanoException e ) { throw e ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( ( "Reading from a byte array threw an IOException (should " + "never happen)." ) ) ; } }
Source:
public static android.telephony.MbmsStreamingManager create ( android.content.Context context , android.telephony.mbms.MbmsStreamingManagerCallback callback , int subscriptionId ) throws android.telephony.mbms.MbmsException { android.telephony.MbmsStreamingManager manager = new android.telephony.MbmsStreamingManager ( context , callback , subscriptionId ) ; manager.bindAndInitialize ( ) ; return manager ; }

Target:
public static android.telephony.MbmsStreamingManager create ( android.content.Context context , android.telephony.mbms.MbmsStreamingManagerCallback callback , int subscriptionId , android.os.Handler handler ) throws android.telephony.mbms.MbmsException { if ( ! ( android.telephony.MbmsStreamingManager.sIsInitialized.compareAndSet ( false , true ) ) ) { throw new android.telephony.mbms.MbmsException ( MbmsException.InitializationErrors.ERROR_DUPLICATE_INITIALIZE ) ; } android.telephony.MbmsStreamingManager manager = new android.telephony.MbmsStreamingManager ( context , callback , subscriptionId , handler ) ; try { manager.bindAndInitialize ( ) ; } catch ( android.telephony.mbms.MbmsException e ) { android.telephony.MbmsStreamingManager.sIsInitialized.set ( false ) ; throw e ; } return manager ; }
Source:
public android.webkit.WebBackForwardList copyBackForwardList ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return copyBackForwardList ( ) ; } } ) ; return ret ; } return new com.android.webview.chromium.WebBackForwardListChromium ( mAwContents.getNavigationHistory ( ) ) ; }

Target:
public boolean isPaused ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return isPaused ( ) ; } } ) ; return ret ; } return mAwContents.isPaused ( ) ; }
Source:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( ( ( ( com.android.jack.java8.EcjLambdaTest.testWithApiUsage.contains ( description.getMethodName ( ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testWithOtherErrorMsg.contains ( description.getMethodName ( ) ) ) ) || ( EcjLambdaTestPostM.testForNewRuntime.contains ( description.getMethodName ( ) ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testBugECJ.contains ( description.getMethodName ( ) ) ) ) { return false ; } return true ; }

Target:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( ( ( ( ( com.android.jack.java8.EcjLambdaTest.testWithApiUsage.contains ( description.getMethodName ( ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testWithOtherErrorMsg.contains ( description.getMethodName ( ) ) ) ) || ( EcjLambdaTestPostM.testForNewRuntime.contains ( description.getMethodName ( ) ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testBugECJ.contains ( description.getMethodName ( ) ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testDisabled.contains ( description.getMethodName ( ) ) ) ) { return false ; } return true ; }
Source:
private void addFolder ( com.android.ide.common.resources.ResourceRepository resources , com.android.ide.common.resources.configuration.FolderConfiguration config , org.eclipse.core.resources.IFile [ ] memberList ) throws java.lang.Exception { java.lang.String folderName = config.getFolderName ( ResourceFolderType.LAYOUT ) ; org.eclipse.core.resources.IFolder folder = com.android.ide.eclipse.mock.Mocks.createFolder ( folderName , memberList ) ; com.android.ide.common.resources.ResourceFolder resFolder = _addProjectResourceFolder ( resources , config , folder ) ; for ( org.eclipse.core.resources.IFile file : memberList ) { resFolder.addFile ( new com.android.ide.common.resources.SingleResourceFile ( new com.android.ide.eclipse.adt.io.IFileWrapper ( file ) , resFolder ) ) ; } }

Target:
private void addFolder ( com.android.ide.common.resources.ResourceRepository resources , com.android.ide.common.resources.configuration.FolderConfiguration config , org.eclipse.core.resources.IFile [ ] memberList ) throws java.lang.Exception { java.lang.String folderName = config.getFolderName ( ResourceFolderType.LAYOUT ) ; org.eclipse.core.resources.IFolder folder = com.android.ide.eclipse.mock.Mocks.createFolder ( folderName , memberList ) ; com.android.ide.common.resources.ResourceFolder resFolder = resources.processFolder ( new com.android.ide.eclipse.adt.io.IFolderWrapper ( folder ) ) ; for ( org.eclipse.core.resources.IFile file : memberList ) { resFolder.addFile ( new com.android.ide.common.resources.SingleResourceFile ( new com.android.ide.eclipse.adt.io.IFileWrapper ( file ) , resFolder ) ) ; } }
Source:
public com.android.ide.common.rendering.api.RenderSession render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes , boolean transparentBackground ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.rendering.LayoutLibrary layoutLib = getReadyLayoutLib ( true ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes , transparentBackground , new com.android.ide.common.rendering.api.LayoutLog ( ) ) ; }

Target:
public com.android.ide.common.rendering.api.RenderSession render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes , boolean transparentBackground , com.android.ide.common.rendering.api.LayoutLog logger ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.rendering.LayoutLibrary layoutLib = getReadyLayoutLib ( true ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes , transparentBackground , logger ) ; }
Source:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.mms.ui.ManageSimMessages.OPTION_MENU_DELETE_ALL : confirmDeleteDialog ( new android.content.DialogInterface.OnClickListener ( ) { public void onClick ( android.content.DialogInterface dialog , int which ) { updateState ( com.android.mms.ui.ManageSimMessages.SHOW_BUSY ) ; deleteAllFromSim ( ) ; dialog.dismiss ( ) ; } } , R.string.confirm_delete_all_SIM_messages ) ; break ; } return true ; }

Target:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.mms.ui.ManageSimMessages.OPTION_MENU_DELETE_ALL : confirmDeleteDialog ( new android.content.DialogInterface.OnClickListener ( ) { public void onClick ( android.content.DialogInterface dialog , int which ) { updateState ( com.android.mms.ui.ManageSimMessages.SHOW_BUSY ) ; deleteAllFromSim ( ) ; dialog.dismiss ( ) ; } } , R.string.confirm_delete_all_SIM_messages ) ; break ; case android.R.id.home : finish ( ) ; break ; } return true ; }
Source:
public com.google.common.collect.ImmutableSet < V > get ( @ javax.annotation.Nullable K key ) { com.google.common.collect.ImmutableSet < V > set = ( ( com.google.common.collect.ImmutableSet < V > ) ( map.get ( key ) ) ) ; if ( set != null ) { return set ; } else if ( ( emptySet ) != null ) { return emptySet ; } else { return com.google.common.collect.ImmutableSet.< V > of ( ) ; } }

Target:
private static < V > com.google.common.collect.ImmutableSet < V > emptySet ( @ javax.annotation.Nullable java.util.Comparator < ? super V > valueComparator ) { return valueComparator == null ? com.google.common.collect.ImmutableSet.< V > of ( ) : com.google.common.collect.ImmutableSortedSet.< V > emptySet ( valueComparator ) ; }
Source:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( ( mUsesRtlAttributes ) && ( ( mEnabledRtlSupport ) == null ) ) && ( rtlApplies ( context ) ) ) { java.util.List < java.io.File > manifestFile = context.getMainProject ( ) . getManifestFiles ( ) ; if ( ! ( manifestFile.isEmpty ( ) ) ) { com.android.tools.lint.detector.api.Location location = com.android.tools.lint.detector.api.Location.create ( manifestFile.get ( 0 ) ) ; context.report ( com.android.tools.lint.checks.RtlDetector.ENABLED , location , ( "The project references RTL attributes, but does not explicitly enable " + "or disable RTL support with android:supportsRtl in the manifest" ) , null ) ; } } }

Target:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( ( mUsesRtlAttributes ) && ( ( mEnabledRtlSupport ) == null ) ) && ( rtlApplies ( context ) ) ) { java.util.List < java.io.File > manifestFile = context.getMainProject ( ) . getManifestFiles ( ) ; if ( ! ( manifestFile.isEmpty ( ) ) ) { com.android.tools.lint.detector.api.Location location = com.android.tools.lint.detector.api.Location.create ( manifestFile.get ( 0 ) ) ; context.report ( com.android.tools.lint.checks.RtlDetector.ENABLED , location , ( "The project references RTL attributes, but does not explicitly enable " + "or disable RTL support with `android:supportsRtl` in the manifest" ) , null ) ; } } }
Source:
private int getApiLevel ( ) { if ( ( mApiLevel ) > 0 ) { return mApiLevel ; } try { mApiLevel = java.lang.Integer.parseInt ( getSystemProperty ( com.android.ddmlib.PROP_BUILD_API_LEVEL ) . get ( ) ) ; return mApiLevel ; } catch ( java.lang.Exception e ) { return - 1 ; } }

Target:
private int getApiLevel ( ) { if ( ( mApiLevel ) > 0 ) { return mApiLevel ; } try { java.lang.String buildApi = getProperty ( com.android.ddmlib.PROP_BUILD_API_LEVEL ) ; mApiLevel = ( buildApi == null ) ? - 1 : java.lang.Integer.parseInt ( buildApi ) ; return mApiLevel ; } catch ( java.lang.Exception e ) { return - 1 ; } }
Source:
private void handleEnterEmergencyCallbackMode ( android.os.Message msg ) { if ( com.android.internal.telephony.GsmCdmaPhone.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , ( "handleEnterEmergencyCallbackMode,mIsPhoneInEcmState= " + ( mIsPhoneInEcmState ) ) ) ; } if ( ( mIsPhoneInEcmState ) == false ) { setSystemProperty ( TelephonyProperties.PROPERTY_INECM_MODE , "true" ) ; mIsPhoneInEcmState = true ; sendEmergencyCallbackModeChange ( ) ; long delayInMillis = android.os.SystemProperties.getLong ( TelephonyProperties.PROPERTY_ECM_EXIT_TIMER , com.android.internal.telephony.GsmCdmaPhone.DEFAULT_ECM_EXIT_TIMER_VALUE ) ; postDelayed ( mExitEcmRunnable , delayInMillis ) ; mWakeLock.acquire ( ) ; } }

Target:
private void handleEnterEmergencyCallbackMode ( android.os.Message msg ) { if ( com.android.internal.telephony.GsmCdmaPhone.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , ( "handleEnterEmergencyCallbackMode,mIsPhoneInEcmState= " + ( mIsPhoneInEcmState ) ) ) ; } if ( ! ( mIsPhoneInEcmState ) ) { setIsInEcm ( true ) ; sendEmergencyCallbackModeChange ( ) ; long delayInMillis = android.os.SystemProperties.getLong ( TelephonyProperties.PROPERTY_ECM_EXIT_TIMER , com.android.internal.telephony.GsmCdmaPhone.DEFAULT_ECM_EXIT_TIMER_VALUE ) ; postDelayed ( mExitEcmRunnable , delayInMillis ) ; mWakeLock.acquire ( ) ; } }