auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void write ( byte [ ] from , com.google.common.io.OutputSupplier < ? extends java.io.OutputStream > to ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( from ) ; boolean threw = true ; java.io.OutputStream out = to.getOutput ( ) ; try { out.write ( from ) ; threw = false ; } finally { com.google.common.io.Closeables.close ( out , threw ) ; } }

Target:
public static long copy ( java.nio.channels.ReadableByteChannel from , java.nio.channels.WritableByteChannel to ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( from ) ; com.google.common.base.Preconditions.checkNotNull ( to ) ; java.nio.ByteBuffer buf = java.nio.ByteBuffer.allocate ( com.google.common.io.ByteStreams.BUF_SIZE ) ; long total = 0 ; while ( ( from.read ( buf ) ) != ( - 1 ) ) { buf.flip ( ) ; while ( buf.hasRemaining ( ) ) { total += to.write ( buf ) ; } buf.clear ( ) ; } return total ; }
Source:
public void testStageInstallWithErrorCode_badTzLookupFile ( ) throws java.lang.Exception { libcore.tzdata.shared2.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; libcore.tzdata.shared2.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( "<foo />" ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_VALIDATION_ERROR , installer.stageInstallWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_badTzLookupFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( "<foo />" ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_VALIDATION_ERROR , installer.stageInstallWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }
Source:
void nestedMayThrow ( boolean doThrow ) { synchronized ( this ) { synchronized ( Main.class ) { synchronized ( new java.lang.Object ( ) ) { synchronized ( java.lang.Class.class ) { if ( doThrow ) { throw new MyException ( ) ; } } } } } }

Target:
void nestedMayThrow ( boolean doThrow ) { Main.assertIsManaged ( ) ; synchronized ( this ) { synchronized ( Main.class ) { synchronized ( new java.lang.Object ( ) ) { synchronized ( java.lang.Class.class ) { if ( doThrow ) { throw new MyException ( ) ; } } } } } }
Source:
private boolean checkbit ( int attr_bit , byte [ ] selector ) { int selectorlen = selector.length ; if ( ( ( ( selector [ ( ( selectorlen - 1 ) - ( ( ( int ) ( attr_bit ) ) / 8 ) ) ] ) > > ( attr_bit % 8 ) ) & 1 ) == 0 ) { return false ; } return true ; }

Target:
private boolean checkbit ( int attrBit , byte [ ] selector ) { int selectorlen = selector.length ; if ( ( ( ( selector [ ( ( selectorlen - 1 ) - ( ( ( int ) ( attrBit ) ) / 8 ) ) ] ) > > ( attrBit % 8 ) ) & 1 ) == 0 ) { return false ; } return true ; }
Source:
public android.app.IActivityContainer createStackOnDisplay ( int displayId ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "createStackOnDisplay()" ) ; synchronized ( this ) { final int stackId = mStackSupervisor.getNextStackId ( ) ; final com.android.server.am.ActivityStack stack = mStackSupervisor.createStackOnDisplay ( stackId , displayId ) ; if ( stack == null ) { return null ; } return stack.mActivityContainer ; } }

Target:
public void deleteActivityContainer ( android.app.IActivityContainer container ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "deleteActivityContainer()" ) ; synchronized ( this ) { mStackSupervisor.deleteActivityContainer ( container ) ; } }
Source:
public void copyTo ( int [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt32 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.SIGNED_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , int [ ] data ) { validateIsInt32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_32 , data.length ) ; }
Source:
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 < com.android.build.OutputFile > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , com.google.common.collect.Sets.newHashSet ( "bar" , "foo" ) , 160 , "zzz" ) ; assertEquals ( 0 , result.size ( ) ) ; }

Target:
public void testSingleOutput ( ) throws com.android.ide.common.process.ProcessException { com.android.build.VariantOutput match ; java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 1 , result.size ( ) ) ; assertEquals ( match.getMainOutputFile ( ) . getOutputFile ( ) , result.get ( 0 ) ) ; }
Source:
public static int mapApiToArtVersion ( int api ) { if ( api < 20 ) { return org.jf.dexlib2.VersionMap.NO_VERSION ; } else { return 56 ; } }

Target:
public static int mapApiToArtVersion ( int api ) { switch ( api ) { case 19 : case 20 : return 7 ; case 21 : return 39 ; case 22 : return 45 ; case 23 : return 64 ; case 24 : return 79 ; } if ( api > 24 ) { return 79 ; } return org.jf.dexlib2.VersionMap.NO_VERSION ; }
Source:
public void test_Shift_JIS_replacement_character ( ) throws java.lang.Exception { assertDecodes ( java.nio.charset.Charset.forName ( "Shift_JIS" ) , "�" , 252 ) ; assertEncodes ( java.nio.charset.Charset.forName ( "Shift_JIS" ) , "�" , 252 ) ; }

Target:
public void test_SCSU_replacement_character ( ) throws java.lang.Exception { assertEncodes ( java.nio.charset.Charset.forName ( "SCSU" ) , " � " , ' ' , 14 , 255 , 253 , ' ' ) ; assertDecodes ( java.nio.charset.Charset.forName ( "SCSU" ) , " � " , ' ' , 14 , 255 , 253 , ' ' ) ; }
Source:
public void testNewIncomingCall ( ) throws java.lang.Exception { com.android.ims.internal.IImsCallSession sessionBinder = org.mockito.Mockito.mock ( com.android.ims.internal.IImsCallSession.class ) ; com.android.ims.internal.ImsCallSession session = new com.android.ims.internal.ImsCallSession ( sessionBinder ) ; mFeature.incomingCall ( session ) ; org.mockito.ArgumentCaptor < com.android.ims.internal.ImsCallSession > captor = org.mockito.ArgumentCaptor.forClass ( com.android.ims.internal.ImsCallSession.class ) ; org.mockito.Mockito.verify ( mListener ) . onIncomingCall ( captor.capture ( ) ) ; junit.framework.Assert.assertEquals ( sessionBinder , captor.getValue ( ) . getSession ( ) ) ; }

Target:
public void testNewIncomingCall ( ) throws java.lang.Exception { com.android.ims.internal.IImsCallSession sessionBinder = org.mockito.Mockito.mock ( com.android.ims.internal.IImsCallSession.class ) ; com.android.ims.internal.ImsCallSession session = new com.android.ims.internal.ImsCallSession ( sessionBinder ) ; mFeature.incomingCall ( session ) ; org.mockito.ArgumentCaptor < com.android.ims.internal.IImsCallSession > captor = org.mockito.ArgumentCaptor.forClass ( com.android.ims.internal.IImsCallSession.class ) ; org.mockito.Mockito.verify ( mListener ) . onIncomingCall ( captor.capture ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; junit.framework.Assert.assertEquals ( sessionBinder , captor.getValue ( ) ) ; }
Source:
private synchronized < T extends com.android.server.IpSecService.ManagedResource > void releaseManagedResource ( com.android.server.IpSecService.ManagedResourceArray < T > resArray , int resourceId , java.lang.String typeName ) throws android.os.RemoteException { T record = resArray.get ( resourceId ) ; if ( record == null ) { throw new java.lang.IllegalArgumentException ( ( ( ( typeName + " " ) + resourceId ) + " is not available to be deleted" ) ) ; } record.release ( ) ; resArray.remove ( resourceId ) ; }

Target:
private synchronized < T extends com.android.server.IpSecService.ManagedResource > void releaseManagedResource ( com.android.server.IpSecService.ManagedResourceArray < T > resArray , int resourceId , java.lang.String typeName ) throws android.os.RemoteException { T record = resArray.getAndCheckOwner ( resourceId ) ; if ( record == null ) { throw new java.lang.IllegalArgumentException ( ( ( ( typeName + " " ) + resourceId ) + " is not available to be deleted" ) ) ; } record.release ( ) ; resArray.remove ( resourceId ) ; }
Source:
android.content.ComponentName startServiceInPackage ( int uid , android.content.Intent service , java.lang.String resolvedType ) { synchronized ( this ) { if ( com.android.server.am.ActivityManagerService.DEBUG_SERVICE ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "startServiceInPackage: " + service ) + " type=" ) + resolvedType ) ) ; final long origId = android.os.Binder.clearCallingIdentity ( ) ; android.content.ComponentName res = startServiceLocked ( null , service , resolvedType , ( - 1 ) , uid ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; return res ; } }

Target:
void continueUserSwitch ( com.android.server.am.UserStartedState uss , int oldUserId , int newUserId ) { completeSwitchAndInitalize ( uss , newUserId , false , true ) ; }
Source:
private boolean isAppEnabledForUser ( android.content.pm.PackageInfo pi ) { if ( pi == null ) return false ; final int flags = pi.applicationInfo.flags ; return ( ( flags & ( android.content.pm.ApplicationInfo.FLAG_INSTALLED ) ) != 0 ) && ( ( flags & ( android.content.pm.ApplicationInfo.FLAG_HIDDEN ) ) == 0 ) ; }

Target:
private boolean isAppEnabledForUser ( android.content.pm.PackageInfo pi ) { if ( pi == null ) return false ; final int flags = pi.applicationInfo.flags ; final int privateFlags = pi.applicationInfo.privateFlags ; return ( ( flags & ( android.content.pm.ApplicationInfo.FLAG_INSTALLED ) ) != 0 ) && ( ( privateFlags & ( android.content.pm.ApplicationInfo.PRIVATE_FLAG_HIDDEN ) ) == 0 ) ; }
Source:
public int getKeyCharacteristics ( java.lang.String alias , byte [ ] clientId , byte [ ] appId , android.security.keymaster.KeyCharacteristics outCharacteristics ) { try { return mBinder.getKeyCharacteristics ( alias , clientId , appId , outCharacteristics ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return android.security.KeyStore.SYSTEM_ERROR ; } }

Target:
public int getKeyCharacteristics ( java.lang.String alias , android.security.keymaster.KeymasterBlob clientId , android.security.keymaster.KeymasterBlob appId , android.security.keymaster.KeyCharacteristics outCharacteristics ) { try { return mBinder.getKeyCharacteristics ( alias , clientId , appId , outCharacteristics ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return android.security.KeyStore.SYSTEM_ERROR ; } }
Source:
public void run ( ) { org.eclipse.swt.widgets.Shell shell = display.getActiveShell ( ) ; if ( org.eclipse.jface.dialogs.MessageDialog.openQuestion ( shell , "Android AVD Error" , "No compatible targets were found. Do you wish to a add new Android Virtual Device?" ) ) { com.android.ide.eclipse.adt.internal.actions.SdkAvdManagerAction action = new com.android.ide.eclipse.adt.internal.actions.SdkAvdManagerAction ( ) ; action.run ( null ) ; searchAgain [ 0 ] = true ; } }

Target:
public void run ( ) { org.eclipse.swt.widgets.Shell shell = display.getActiveShell ( ) ; if ( org.eclipse.jface.dialogs.MessageDialog.openQuestion ( shell , "Android AVD Error" , "No compatible targets were found. Do you wish to a add new Android Virtual Device?" ) ) { com.android.ide.eclipse.adt.internal.actions.AvdManagerAction action = new com.android.ide.eclipse.adt.internal.actions.AvdManagerAction ( ) ; action.run ( null ) ; searchAgain [ 0 ] = true ; } }
Source:
private void processProfileStateChanged ( android.bluetooth.BluetoothDevice device , int profileId , int nextState , int prevState ) { if ( ( ( profileId == ( android.bluetooth.BluetoothProfile.A2DP ) ) || ( profileId == ( android.bluetooth.BluetoothProfile.HEADSET ) ) ) && ( nextState == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) ) { debugLog ( ( ( "Profile connected id: " + profileId ) + " Schedule missing profile connection if any" ) ) ; connectOtherProfile ( device ) ; setProfileAutoConnectionPriority ( device , profileId ) ; } }

Target:
private void processProfileStateChanged ( android.bluetooth.BluetoothDevice device , int profileId , int nextState , int prevState ) { com.android.bluetooth.btservice.PhonePolicy.debugLog ( ( ( ( ( ( ( ( "processProfileStateChanged, device=" + device ) + ", profile=" ) + profileId ) + ", " ) + prevState ) + " -> " ) + nextState ) ) ; if ( ( ( profileId == ( android.bluetooth.BluetoothProfile.A2DP ) ) || ( profileId == ( android.bluetooth.BluetoothProfile.HEADSET ) ) ) && ( nextState == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) ) { connectOtherProfile ( device ) ; setProfileAutoConnectionPriority ( device , profileId ) ; } }
Source:
public java.util.List < java.lang.Long > getLongs ( int tag ) { if ( ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) != ( KeymasterDefs.KM_LONG_REP ) ) { throw new java.lang.IllegalArgumentException ( ( "Tag is not a repeating long: " + tag ) ) ; } java.util.List < java.lang.Long > values = new java.util.ArrayList < java.lang.Long > ( ) ; for ( android.security.keymaster.KeymasterArgument arg : mArguments ) { if ( ( arg.tag ) == tag ) { values.add ( ( ( android.security.keymaster.KeymasterLongArgument ) ( arg ) ) . value ) ; } } return values ; }

Target:
public java.util.List < java.lang.Long > getLongs ( int tag ) { if ( ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) != ( KeymasterDefs.KM_ULONG_REP ) ) { throw new java.lang.IllegalArgumentException ( ( "Tag is not a repeating long: " + tag ) ) ; } java.util.List < java.lang.Long > values = new java.util.ArrayList < java.lang.Long > ( ) ; for ( android.security.keymaster.KeymasterArgument arg : mArguments ) { if ( ( arg.tag ) == tag ) { values.add ( ( ( android.security.keymaster.KeymasterLongArgument ) ( arg ) ) . value ) ; } } return values ; }
Source:
private boolean isJackFileNameOf ( @ javax.annotation.Nonnull java.lang.String fileName , @ javax.annotation.Nonnull java.lang.String typeName ) { return ( ( ( fileName.length ( ) ) > ( com.android.jack.backend.jayce.JayceFileImporter.JACK_EXTENSION_LENGTH ) ) && ( fileName.substring ( 0 , ( ( fileName.length ( ) ) - ( com.android.jack.backend.jayce.JayceFileImporter.JACK_EXTENSION_LENGTH ) ) ) . equals ( typeName ) ) ) && ( fileName.substring ( ( ( fileName.length ( ) ) - ( com.android.jack.backend.jayce.JayceFileImporter.JACK_EXTENSION_LENGTH ) ) ) . equalsIgnoreCase ( JayceFileImporter.JAYCE_FILE_EXTENSION ) ) ; }

Target:
public java.util.Collection < java.lang.String > getSubPackageNames ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage loading ) { return collections.getUnmodifiableCollection ( vdirCache.keySet ( ) ) ; }
Source:
public void test_getProxyClass_nullInterfaces ( ) { try { java.lang.reflect.Proxy.getProxyClass ( null , new java.lang.Class < ? > [ ] { null } ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { java.lang.reflect.Proxy.getProxyClass ( null , libcore.java.lang.reflect.ProxyTest.Echo.class , null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }

Target:
public void test_getProxyClass_nullInterfaces ( ) { try { java.lang.reflect.Proxy.getProxyClass ( loader , new java.lang.Class < ? > [ ] { null } ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { java.lang.reflect.Proxy.getProxyClass ( loader , libcore.java.lang.reflect.ProxyTest.Echo.class , null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }
Source:
private java.lang.String getTestResultString ( int testResult ) { int resId = 0 ; switch ( testResult ) { case TestResult.TEST_RESULT_PASSED : resId = R.string.pass_result ; break ; case TestResult.TEST_RESULT_FAILED : resId = R.string.fail_result ; break ; case TestResult.TEST_RESULT_NOT_EXECUTED : resId = R.string.not_executed_result ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown test result: " + testResult ) ) ; } return mContext.getString ( resId ) ; }

Target:
java.lang.String getBody ( ) throws java.io.IOException , java.lang.IllegalArgumentException , java.lang.IllegalStateException { java.io.ByteArrayOutputStream outputStream = new java.io.ByteArrayOutputStream ( ) ; org.xmlpull.v1.XmlSerializer xml = android.util.Xml.newSerializer ( ) ; xml.setOutput ( outputStream , "utf-8" ) ; xml.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; xml.startDocument ( "utf-8" , true ) ; xml.startTag ( null , com.android.cts.verifier.TestResultsReport.TEST_RESULTS_REPORT_TAG ) ; xml.attribute ( null , "report-version" , java.lang.Integer.toString ( com.android.cts.verifier.TestResultsReport.REPORT_VERSION ) ) ; xml.attribute ( null , "creation-time" , com.android.cts.verifier.TestResultsReport.DATE_FORMAT.format ( new java.util.Date ( ) ) ) ; xml.startTag ( null , com.android.cts.verifier.TestResultsReport.VERIFIER_INFO_TAG ) ; xml.attribute ( null , "version-name" , com.android.cts.verifier.Version.getVersionName ( mContext ) ) ; xml.attribute ( null , "version-code" , java.lang.Integer.toString ( com.android.cts.verifier.Version.getVersionCode ( mContext ) ) ) ; xml.endTag ( null , com.android.cts.verifier.TestResultsReport.VERIFIER_INFO_TAG ) ; xml.startTag ( null , com.android.cts.verifier.TestResultsReport.DEVICE_INFO_TAG ) ; xml.startTag ( null , com.android.cts.verifier.TestResultsReport.BUILD_INFO_TAG ) ; xml.attribute ( null , "fingerprint" , Build.FINGERPRINT ) ; xml.endTag ( null , com.android.cts.verifier.TestResultsReport.BUILD_INFO_TAG ) ; xml.endTag ( null , com.android.cts.verifier.TestResultsReport.DEVICE_INFO_TAG ) ; xml.startTag ( null , com.android.cts.verifier.TestResultsReport.TEST_RESULTS_TAG ) ; int count = mAdapter.getCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.cts.verifier.TestListAdapter.TestListItem item = mAdapter.getItem ( i ) ; if ( item.isTest ( ) ) { xml.startTag ( null , com.android.cts.verifier.TestResultsReport.TEST_TAG ) ; xml.attribute ( null , "title" , item.title ) ; xml.attribute ( null , "class-name" , item.className ) ; xml.attribute ( null , "result" , getTestResultString ( mAdapter.getTestResult ( i ) ) ) ; xml.endTag ( null , com.android.cts.verifier.TestResultsReport.TEST_TAG ) ; } } xml.endTag ( null , com.android.cts.verifier.TestResultsReport.TEST_RESULTS_TAG ) ; xml.endTag ( null , com.android.cts.verifier.TestResultsReport.TEST_RESULTS_REPORT_TAG ) ; xml.endDocument ( ) ; return outputStream.toString ( "utf-8" ) ; }
Source:
void onPostDialContinue ( com.android.server.telecom.Call call , boolean proceed ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "onPostDialContinue" ) ) ) { try { logOutgoing ( "onPostDialContinue %s %b" , callId , proceed ) ; mServiceInterface.onPostDialContinue ( callId , proceed ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void onPostDialContinue ( com.android.server.telecom.Call call , boolean proceed ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "onPostDialContinue" ) ) ) { try { logOutgoing ( "onPostDialContinue %s %b" , callId , proceed ) ; mServiceInterface.onPostDialContinue ( callId , proceed , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; int b = in.read ( ) ; return new com.android.jack.dx.io.instructions.TwoRegisterDecodedInstruction ( this , opcode , 0 , null , 0 , 0L , a , b ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; int b = in.read ( ) ; return new com.android.jack.dx.io.instructions.TwoRegisterDecodedInstruction ( this , opcode , 0 , com.android.jack.dx.io.IndexType.NONE , 0 , 0L , a , b ) ; }
Source:
public void dump ( android.os.ParcelFileDescriptor fd ) { com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return ; service.dump ( fd.getFileDescriptor ( ) ) ; }

Target:
private void autoConnectA2dpSink ( ) { com.android.bluetooth.a2dp.A2dpSinkService a2dpSinkService = com.android.bluetooth.a2dp.A2dpSinkService.getA2dpSinkService ( ) ; android.bluetooth.BluetoothDevice [ ] bondedDevices = getBondedDevices ( ) ; if ( ( bondedDevices == null ) || ( a2dpSinkService == null ) ) { return ; } for ( android.bluetooth.BluetoothDevice device : bondedDevices ) { debugLog ( ( "autoConnectA2dp() - Connecting A2DP Sink with " + ( device.toString ( ) ) ) ) ; a2dpSinkService.connect ( device ) ; } }
Source:
public void addU64 ( android.support.v8.renderscript.Long4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU64 ( new android.support.v8.renderscript.Long4 ( v.x , v.y , v.z , v.w ) ) ; return ; } addU64 ( v.x ) ; addU64 ( v.y ) ; addU64 ( v.z ) ; addU64 ( v.w ) ; }

Target:
public final byte [ ] getData ( ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { return mN.getData ( ) ; } return mData ; }
Source:
public void testNewInstanceString_StringBufferConstructor ( ) { runTestNewInstanceString ( "(Ljava/lang/StringBuffer;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringBufferValue = getStaticFieldValue ( debuggeeClassId , "STRING_BUFFER" ) ; constructorArguments.add ( stringBufferValue ) ; } } ) ; }

Target:
public void testNewInstanceString_StringConstructor ( ) { runTestNewInstanceString ( "(Ljava/lang/String;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value testStringValue = getStaticFieldValue ( debuggeeClassId , "TEST_STRING" ) ; constructorArguments.add ( testStringValue ) ; } } ) ; }
Source:
private void clearCache ( ) { java.util.HashSet < com.android.ide.common.api.IViewRule > rules = new java.util.HashSet < com.android.ide.common.api.IViewRule > ( mRulesCache.values ( ) ) ; mRulesCache.clear ( ) ; for ( com.android.ide.common.api.IViewRule rule : rules ) { if ( rule != null ) { try { rule.onDispose ( ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDispose() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } } }

Target:
private void clearCache ( ) { java.util.HashSet < com.android.ide.common.api.IViewRule > rules = new java.util.HashSet < com.android.ide.common.api.IViewRule > ( mRulesCache.values ( ) ) ; mRulesCache.clear ( ) ; for ( com.android.ide.common.api.IViewRule rule : rules ) { if ( rule != null ) { try { rule.onDispose ( ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onDispose() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } } }
Source:
private void parseFile ( ) { try { javax.xml.parsers.SAXParser parser = com.android.ide.eclipse.adt.internal.resources.manager.MultiResourceFile.sParserFactory.newSAXParser ( ) ; parser.parse ( getFile ( ) . getContents ( ) , new com.android.ide.common.resources.ValueResourceParser ( this , isFramework ( ) ) ) ; } catch ( javax.xml.parsers.ParserConfigurationException e ) { } catch ( org.xml.sax.SAXException e ) { } catch ( java.io.IOException e ) { } catch ( com.android.io.StreamException e ) { } }

Target:
private void parseFile ( ) { try { javax.xml.parsers.SAXParser parser = com.android.ide.common.resources.MultiResourceFile.sParserFactory.newSAXParser ( ) ; parser.parse ( getFile ( ) . getContents ( ) , new com.android.ide.common.resources.ValueResourceParser ( this , isFramework ( ) ) ) ; } catch ( javax.xml.parsers.ParserConfigurationException e ) { } catch ( org.xml.sax.SAXException e ) { } catch ( java.io.IOException e ) { } catch ( com.android.io.StreamException e ) { } }
Source:
private boolean releaseWakeLock ( java.lang.String lockName ) { synchronized ( this ) { if ( ( mWakeLock ) == null ) { errorLog ( ( "Repeated wake lock release; aborting release: " + lockName ) ) ; return false ; } mWakeLock.release ( ) ; } return true ; }

Target:
private boolean releaseWakeLock ( java.lang.String lockName ) { synchronized ( this ) { if ( ( mWakeLock ) == null ) { errorLog ( ( "Repeated wake lock release; aborting release: " + lockName ) ) ; return false ; } if ( mWakeLock.isHeld ( ) ) mWakeLock.release ( ) ; } return true ; }
Source:
private void onThemeChange ( ) { saveState ( ) ; int themeIndex = mThemeCombo.getSelectionIndex ( ) ; if ( themeIndex != ( - 1 ) ) { java.lang.String theme = mThemeCombo.getItem ( themeIndex ) ; if ( theme.equals ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.THEME_SEPARATOR ) ) { mThemeCombo.select ( 0 ) ; } if ( ( mListener ) != null ) { mListener.onThemeChange ( ) ; } } }

Target:
void onThemeChange ( ) { saveState ( ) ; java.lang.String theme = getSelectedTheme ( ) ; if ( ( theme != null ) && ( ( mListener ) != null ) ) { mListener.onThemeChange ( ) ; } }
Source:
private void processConnectionEvent ( int state ) { switch ( state ) { case A2dpStackEvent.CONNECTION_STATE_DISCONNECTED : android.util.Log.w ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( "Connecting device disconnected: " + ( mDevice ) ) ) ; transitionTo ( mDisconnected ) ; break ; case A2dpStackEvent.CONNECTION_STATE_CONNECTED : transitionTo ( mConnected ) ; break ; case A2dpStackEvent.CONNECTION_STATE_CONNECTING : break ; case A2dpStackEvent.CONNECTION_STATE_DISCONNECTING : android.util.Log.w ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( "Connecting interrupted: device is disconnecting: " + ( mDevice ) ) ) ; transitionTo ( mDisconnecting ) ; break ; default : android.util.Log.e ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( "Incorrect state: " + state ) ) ; break ; } }

Target:
private void processConnectionEvent ( int event ) { switch ( event ) { case A2dpStackEvent.CONNECTION_STATE_DISCONNECTED : android.util.Log.w ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( "Connecting device disconnected: " + ( mDevice ) ) ) ; transitionTo ( mDisconnected ) ; break ; case A2dpStackEvent.CONNECTION_STATE_CONNECTED : transitionTo ( mConnected ) ; break ; case A2dpStackEvent.CONNECTION_STATE_CONNECTING : break ; case A2dpStackEvent.CONNECTION_STATE_DISCONNECTING : android.util.Log.w ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( "Connecting interrupted: device is disconnecting: " + ( mDevice ) ) ) ; transitionTo ( mDisconnecting ) ; break ; default : android.util.Log.e ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( "Incorrect event: " + event ) ) ; break ; } }
Source:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVFile file ) throws com.android.sched.util.file.WrongPermissionException { assert ! ( isClosed ( ) ) ; assert capabilities.contains ( Capabilities.READ ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileInputStream ( path ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.util.file.FileOrDirectory.checkPermissions ( path , file.getLocation ( ) , Permission.READ ) ; throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVFile file ) throws com.android.sched.util.file.WrongPermissionException { assert ! ( isClosed ( ) ) ; assert capabilities.contains ( Capabilities.READ ) ; VFSStatCategory.DIR_READ.getCounterStat ( getTracer ( ) , infoString ) . incValue ( ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileInputStream ( path ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.util.file.FileOrDirectory.checkPermissions ( path , file.getLocation ( ) , Permission.READ ) ; throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }
Source:
boolean enqueue ( java.lang.ref.Reference < ? extends T > r ) { synchronized ( lock ) { if ( ( tail ) == null ) { head = r ; } else { tail.queueNext = r ; } tail = r ; tail.queueNext = r ; lock.notifyAll ( ) ; return true ; } }

Target:
private boolean enqueueLocked ( java.lang.ref.Reference < ? extends T > r ) { if ( ( r.queueNext ) != null ) { return false ; } if ( r instanceof sun.misc.Cleaner ) { sun.misc.Cleaner cl = ( ( sun.misc.Cleaner ) ( r ) ) ; cl.clean ( ) ; r.queueNext = java.lang.ref.ReferenceQueue.sQueueNextUnenqueued ; return true ; } if ( ( tail ) == null ) { head = r ; } else { tail.queueNext = r ; } tail = r ; tail.queueNext = r ; return true ; }
Source:
public void testManifestEExistingE ( ) { int iFlags = PackageManager.INSTALL_EXTERNAL ; int rFlags = PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_sdcard , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL ) ; }

Target:
public void testManifestEExistingE ( ) { if ( android.os.Environment.isExternalStorageEmulated ( ) ) { return ; } int iFlags = android.content.pm.PackageManager.INSTALL_EXTERNAL ; int rFlags = android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_sdcard , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { cs = tests.api.java.nio.charset.UTF16LECharsetEncoderTest.CS ; specifiedReplacement = new byte [ ] { - 3 , - 1 } ; unibytes = new byte [ ] { 32 , 0 , 98 , 0 , 117 , 0 , 102 , 0 , 102 , 0 , 101 , 0 , 114 , 0 } ; super . setUp ( ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { cs = org.apache.harmony.tests.java.nio.charset.UTF16LECharsetEncoderTest.CS ; specifiedReplacement = new byte [ ] { - 3 , - 1 } ; unibytes = new byte [ ] { 32 , 0 , 98 , 0 , 117 , 0 , 102 , 0 , 102 , 0 , 101 , 0 , 114 , 0 } ; super . setUp ( ) ; }
Source:
public void testTaskManager ( ) throws java.lang.Exception { com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( mInstrumentation , "Email" ) ; com.android.devtools.systemimage.uitest.utils.TaskManager.killApp ( mInstrumentation , "Email" ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( mInstrumentation , "API Demos" ) ; com.android.devtools.systemimage.uitest.utils.TaskManager.killApp ( mInstrumentation , "API Demos" ) ; }

Target:
public void testTaskManager ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Email" ) ; com.android.devtools.systemimage.uitest.utils.TaskManager.killApp ( instrumentation , "Email" ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "API Demos" ) ; com.android.devtools.systemimage.uitest.utils.TaskManager.killApp ( instrumentation , "API Demos" ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mKeyTagSet = new java.util.HashSet < java.lang.String > ( ) ; mKeyTagSet.addAll ( java.util.Arrays.asList ( new java.lang.String [ ] { android.signature.cts.SignatureTest.TAG_PACKAGE , android.signature.cts.SignatureTest.TAG_CLASS , android.signature.cts.SignatureTest.TAG_INTERFACE , android.signature.cts.SignatureTest.TAG_IMPLEMENTS , android.signature.cts.SignatureTest.TAG_CONSTRUCTOR , android.signature.cts.SignatureTest.TAG_METHOD , android.signature.cts.SignatureTest.TAG_PARAM , android.signature.cts.SignatureTest.TAG_EXCEPTION , android.signature.cts.SignatureTest.TAG_FIELD } ) ) ; mResultObserver = new android.signature.cts.SignatureTest.TestResultObserver ( ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mKeyTagSet = new java.util.HashSet < java.lang.String > ( ) ; mKeyTagSet.addAll ( java.util.Arrays.asList ( new java.lang.String [ ] { android.signature.cts.CurrentApi.TAG_PACKAGE , android.signature.cts.CurrentApi.TAG_CLASS , android.signature.cts.CurrentApi.TAG_INTERFACE , android.signature.cts.CurrentApi.TAG_IMPLEMENTS , android.signature.cts.CurrentApi.TAG_CONSTRUCTOR , android.signature.cts.CurrentApi.TAG_METHOD , android.signature.cts.CurrentApi.TAG_PARAM , android.signature.cts.CurrentApi.TAG_EXCEPTION , android.signature.cts.CurrentApi.TAG_FIELD } ) ) ; mResultObserver = new android.signature.cts.SignatureTest.TestResultObserver ( ) ; }
Source:
private void onThemeChange ( ) { saveState ( ) ; int themeIndex = mThemeCombo.getSelectionIndex ( ) ; if ( themeIndex != ( - 1 ) ) { java.lang.String theme = mThemeCombo.getItem ( themeIndex ) ; if ( theme.equals ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.THEME_SEPARATOR ) ) { mThemeCombo.select ( 0 ) ; } if ( ( mListener ) != null ) { mListener.onThemeChange ( ) ; } } }

Target:
java.lang.String getSelectedTheme ( ) { return ( ( java.lang.String ) ( mThemeCombo.getData ( ) ) ) ; }
Source:
public void testSetFeatureAndCheckCallback ( ) throws java.lang.Exception { mTestImsService.setImsFeatureStatusCallback ( mTestStatusCallback ) ; mTestImsService.testSetFeatureState ( ImsFeature.STATE_READY ) ; org.mockito.Mockito.verify ( mTestStatusCallback ) . notifyImsFeatureStatus ( org.mockito.Matchers.eq ( ImsFeature.STATE_READY ) ) ; junit.framework.Assert.assertEquals ( ImsFeature.STATE_READY , mTestImsService.getFeatureState ( ) ) ; }

Target:
public void testSetFeatureAndCheckCallback ( ) throws java.lang.Exception { mTestImsService.addImsFeatureStatusCallback ( mTestStatusCallback ) ; mTestImsService.addImsFeatureStatusCallback ( mTestStatusCallback2 ) ; mTestImsService.testSetFeatureState ( ImsFeature.STATE_READY ) ; org.mockito.Mockito.verify ( mTestStatusCallback ) . notifyImsFeatureStatus ( org.mockito.Matchers.eq ( ImsFeature.STATE_READY ) ) ; org.mockito.Mockito.verify ( mTestStatusCallback2 ) . notifyImsFeatureStatus ( org.mockito.Matchers.eq ( ImsFeature.STATE_READY ) ) ; junit.framework.Assert.assertEquals ( ImsFeature.STATE_READY , mTestImsService.getFeatureState ( ) ) ; }
Source:
protected static org.w3c.dom.Element findElementById ( org.w3c.dom.Element root , java.lang.String id ) { if ( id.equals ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.VisualRefactoring.getId ( root ) ) ) { return root ; } for ( org.w3c.dom.Element child : com.android.ide.eclipse.adt.internal.editors.layout.refactoring.RelativeLayoutConversionHelper.getChildren ( root ) ) { org.w3c.dom.Element result = com.android.ide.eclipse.adt.internal.editors.layout.refactoring.RefactoringTest.findElementById ( child , id ) ; if ( result != null ) { return result ; } } return null ; }

Target:
protected static org.w3c.dom.Element findElementById ( org.w3c.dom.Element root , java.lang.String id ) { if ( id.equals ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.VisualRefactoring.getId ( root ) ) ) { return root ; } for ( org.w3c.dom.Element child : com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.getChildren ( root ) ) { org.w3c.dom.Element result = com.android.ide.eclipse.adt.internal.editors.layout.refactoring.RefactoringTest.findElementById ( child , id ) ; if ( result != null ) { return result ; } } return null ; }
Source:
public void callOnDropped ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.IDragElement [ ] elements , com.android.ide.common.api.DropFeedback feedback , com.android.ide.common.api.Point where , com.android.ide.common.api.InsertType insertType ) { com.android.ide.common.api.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { mInsertType = insertType ; rule.onDropped ( targetNode , elements , feedback , where ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropped() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }

Target:
public void callOnDropped ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.IDragElement [ ] elements , com.android.ide.common.api.DropFeedback feedback , com.android.ide.common.api.Point where , com.android.ide.common.api.InsertType insertType ) { com.android.ide.common.api.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { mInsertType = insertType ; rule.onDropped ( targetNode , elements , feedback , where ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onDropped() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }
Source:
public boolean isValidNumberForRegion ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , java.lang.String regionCode ) { int countryCode = number.getCountryCode ( ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; if ( ( metadata == null ) || ( ( ! ( com.google.i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY.equals ( regionCode ) ) ) && ( countryCode != ( getCountryCodeForValidRegion ( regionCode ) ) ) ) ) { return false ; } java.lang.String nationalSignificantNumber = getNationalSignificantNumber ( number ) ; return ( getNumberTypeHelper ( nationalSignificantNumber , metadata ) ) != ( com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType.UNKNOWN ) ; }

Target:
public boolean isValidNumberForRegion ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , java.lang.String regionCode ) { int countryCode = number.getCountryCode ( ) ; com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; if ( ( metadata == null ) || ( ( ! ( com.google.i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY.equals ( regionCode ) ) ) && ( countryCode != ( getCountryCodeForValidRegion ( regionCode ) ) ) ) ) { return false ; } java.lang.String nationalSignificantNumber = getNationalSignificantNumber ( number ) ; return ( getNumberTypeHelper ( nationalSignificantNumber , metadata ) ) != ( com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType.UNKNOWN ) ; }
Source:
public void addEvent ( int errno , int latencyMs , java.lang.String ipAddr ) { if ( android.net.metrics.ConnectStats.isSuccess ( errno ) ) { countConnect ( errno , ipAddr ) ; countLatency ( errno , latencyMs ) ; } else { countError ( errno ) ; } }

Target:
boolean addEvent ( int errno , int latencyMs , java.lang.String ipAddr ) { ( eventCount ) ++ ; if ( android.net.metrics.ConnectStats.isSuccess ( errno ) ) { countConnect ( errno , ipAddr ) ; countLatency ( errno , latencyMs ) ; return true ; } else { countError ( errno ) ; return false ; } }
Source:
public java.lang.String getPassword ( ) throws android.os.RemoteException { if ( ! ( isReady ( ) ) ) { return new java.lang.String ( ) ; } final com.android.server.NativeDaemonEvent event ; try { event = mConnector.execute ( "cryptfs" , "getpw" ) ; return fromHex ( event.getMessage ( ) ) ; } catch ( com.android.server.NativeDaemonConnectorException e ) { throw e.rethrowAsParcelableException ( ) ; } }

Target:
public java.lang.String getPassword ( ) throws android.os.RemoteException { if ( ! ( isReady ( ) ) ) { return new java.lang.String ( ) ; } final com.android.server.NativeDaemonEvent event ; try { event = mConnector.execute ( "cryptfs" , "getpw" ) ; return com.android.server.MountService.fromHex ( event.getMessage ( ) ) ; } catch ( com.android.server.NativeDaemonConnectorException e ) { throw e.rethrowAsParcelableException ( ) ; } }
Source:
public void testNoGoodFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) ) ; assertEquals ( "missing" , data.getVersion ( ) ) ; assertEquals ( 1 , data.getAvailableIDs ( ) . length ) ; assertEquals ( "GMT" , data.getAvailableIDs ( ) [ 0 ] ) ; }

Target:
public void testNoGoodFile ( ) throws java.lang.Exception { java.lang.String emptyFilePath = libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) . getPath ( ) ; libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( emptyFilePath ) ; assertEquals ( "missing" , data.getVersion ( ) ) ; assertEquals ( 1 , data.getAvailableIDs ( ) . length ) ; assertEquals ( "GMT" , data.getAvailableIDs ( ) [ 0 ] ) ; }
Source:
public boolean startScreenSaver ( ) { synchronized ( mLock ) { if ( isScreenSaverEnabled ( ) ) { android.service.dreams.IDreamManager dm = getDreamManager ( ) ; if ( dm == null ) return false ; try { if ( com.android.internal.policy.impl.PhoneWindowManager.localLOGV ) android.util.Log.v ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "startScreenSaver: entering dreamland..." ) ; dm.dream ( ) ; return true ; } catch ( android.os.RemoteException ex ) { } } } return false ; }

Target:
public boolean canMagnifyWindowLw ( android.view.WindowManager.LayoutParams attrs ) { switch ( attrs.type ) { case WindowManager.LayoutParams.TYPE_INPUT_METHOD : case WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG : case WindowManager.LayoutParams.TYPE_NAVIGATION_BAR : case WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY : { return false ; } } return true ; }
Source:
android.content.res.Resources mockResource ( ) { android.content.res.Resources resource = mock ( android.content.res.Resources.class ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SECURITY_AWARD ) ) . thenReturn ( 80 ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SAME_BSSID_AWARD ) ) . thenReturn ( 24 ) ; return resource ; }

Target:
android.content.res.Resources mockResource ( ) { android.content.res.Resources resource = mock ( android.content.res.Resources.class ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SECURITY_AWARD ) ) . thenReturn ( 80 ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SAME_BSSID_AWARD ) ) . thenReturn ( 24 ) ; when ( resource.getBoolean ( R.bool.config_wifi_framework_enable_associated_network_selection ) ) . thenReturn ( true ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_wifi_score_good_rssi_threshold_24GHz ) ) . thenReturn ( WifiQualifiedNetworkSelector.RSSI_SATURATION_2G_BAND ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_current_network_boost ) ) . thenReturn ( WifiQualifiedNetworkSelector.SAME_NETWORK_AWARD ) ; return resource ; }
Source:
com.android.ims.ImsMultiEndpoint getMultiEndpointInterface ( ) throws com.android.ims.ImsException { if ( ( mImsManager ) == null ) { throw getImsManagerIsNullException ( ) ; } try { return mImsManager.getMultiEndpointInterface ( ) ; } catch ( com.android.ims.ImsException e ) { if ( ( e.getCode ( ) ) == ( com.android.ims.ImsReasonInfo.CODE_MULTIENDPOINT_NOT_SUPPORTED ) ) { return null ; } else { throw e ; } } }

Target:
com.android.ims.ImsMultiEndpoint getMultiEndpointInterface ( ) throws com.android.ims.ImsException { if ( ( mImsManager ) == null ) { throw getImsManagerIsNullException ( ) ; } try { return mImsManager.getMultiEndpointInterface ( ) ; } catch ( com.android.ims.ImsException e ) { if ( ( e.getCode ( ) ) == ( android.telephony.ims.ImsReasonInfo.CODE_MULTIENDPOINT_NOT_SUPPORTED ) ) { return null ; } else { throw e ; } } }
Source:
private boolean isInCall ( ) { return ( ( ( mPhoneState.getNumActiveCall ( ) ) > 0 ) || ( ( mPhoneState.getNumHeldCall ( ) ) > 0 ) ) || ( ( mPhoneState.getCallState ( ) ) != ( HeadsetHalConstants.CALL_STATE_IDLE ) ) ; }

Target:
private boolean isInCall ( ) { return ( ( ( mPhoneState.getNumActiveCall ( ) ) > 0 ) || ( ( mPhoneState.getNumHeldCall ( ) ) > 0 ) ) || ( ( ( mPhoneState.getCallState ( ) ) != ( HeadsetHalConstants.CALL_STATE_IDLE ) ) && ( ( mPhoneState.getCallState ( ) ) != ( HeadsetHalConstants.CALL_STATE_INCOMING ) ) ) ; }
Source:
private java.lang.String fileLineInfo ( org.w3c.dom.Node node , java.lang.String defaultName ) { java.lang.String name = xmlFileName ( node , defaultName ) ; int line = com.android.manifmerger.XmlUtils.extractLineNumber ( node ) ; if ( line <= 0 ) { return name ; } else { return ( name + ':' ) + line ; } }

Target:
private com.android.manifmerger.IMergerLog.FileAndLine xmlFileAndLine ( @ com.android.annotations.NonNull org.w3c.dom.Node node ) { java.lang.String name = com.android.manifmerger.XmlUtils.extractXmlFilename ( node ) ; int line = com.android.manifmerger.XmlUtils.extractLineNumber ( node ) ; return new com.android.manifmerger.IMergerLog.FileAndLine ( name , line ) ; }
Source:
public void onClick ( android.view.View v ) { com.android.dialer.common.LogUtil.i ( "VoicemailTosMessageCreator.getTosMessage" , "accept clicked" ) ; recordTosAcceptance ( ) ; recordFeatureAcknowledgement ( ) ; logTosAcceptedImpression ( ) ; statusReader.refresh ( ) ; }

Target:
public void onClick ( android.view.View v ) { com.android.dialer.common.LogUtil.i ( "VoicemailTosMessageCreator.getTosMessage" , "accept clicked" ) ; if ( isVoicemailTranscriptionAvailable ( ) ) { com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . setVoicemailTranscriptionEnabled ( context , status.getPhoneAccountHandle ( ) , true ) ; } recordTosAcceptance ( ) ; recordFeatureAcknowledgement ( ) ; logTosAcceptedImpression ( ) ; statusReader.refresh ( ) ; }