auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAllocRandomSpi ( ) throws java.lang.Exception { int resourceId = 1 ; android.net.IpSecSpiResponse spiResp = new android.net.IpSecSpiResponse ( IpSecManager.Status.OK , resourceId , android.net.IpSecManagerTest.DROID_SPI ) ; org.mockito.Mockito.when ( mMockIpSecService.allocateSecurityParameterIndex ( org.mockito.Matchers.eq ( android.net.IpSecManagerTest.GOOGLE_DNS_4.getHostAddress ( ) ) , org.mockito.Matchers.eq ( IpSecManager.INVALID_SECURITY_PARAMETER_INDEX ) , org.mockito.Matchers.anyObject ( ) ) ) . thenReturn ( spiResp ) ; android.net.IpSecManager.SecurityParameterIndex randomSpi = mIpSecManager.allocateSecurityParameterIndex ( android.net.IpSecManagerTest.GOOGLE_DNS_4 ) ; org.junit.Assert.assertEquals ( android.net.IpSecManagerTest.DROID_SPI , randomSpi.getSpi ( ) ) ; randomSpi.close ( ) ; org.mockito.Mockito.verify ( mMockIpSecService ) . releaseSecurityParameterIndex ( resourceId ) ; }

Target:
public void testAllocRandomSpi ( ) throws java.lang.Exception { android.net.IpSecSpiResponse spiResp = new android.net.IpSecSpiResponse ( IpSecManager.Status.OK , android.net.IpSecManagerTest.DUMMY_RESOURCE_ID , android.net.IpSecManagerTest.DROID_SPI ) ; org.mockito.Mockito.when ( mMockIpSecService.allocateSecurityParameterIndex ( org.mockito.Matchers.eq ( android.net.IpSecManagerTest.GOOGLE_DNS_4.getHostAddress ( ) ) , org.mockito.Matchers.eq ( IpSecManager.INVALID_SECURITY_PARAMETER_INDEX ) , org.mockito.Matchers.anyObject ( ) ) ) . thenReturn ( spiResp ) ; android.net.IpSecManager.SecurityParameterIndex randomSpi = mIpSecManager.allocateSecurityParameterIndex ( android.net.IpSecManagerTest.GOOGLE_DNS_4 ) ; org.junit.Assert.assertEquals ( android.net.IpSecManagerTest.DROID_SPI , randomSpi.getSpi ( ) ) ; randomSpi.close ( ) ; org.mockito.Mockito.verify ( mMockIpSecService ) . releaseSecurityParameterIndex ( android.net.IpSecManagerTest.DUMMY_RESOURCE_ID ) ; }
Source:
protected void runTest ( ) throws java.lang.Throwable { java.io.File projectFolder = buildProject ( projectName , BasePlugin.GRADLE_MIN_VERSION ) ; java.io.File apkFolder = new java.io.File ( projectFolder , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk" ) ) ; java.io.File apk = new java.io.File ( apkFolder , ( ( projectName ) + "-debug-unaligned.apk" ) ) ; int found = com.android.build.gradle.PackagingBuildTest.findFilesInZip ( apk , java.util.Arrays.asList ( packagedFiles ) ) ; assertEquals ( packagedFiles.length , found ) ; }

Target:
protected void runTest ( ) throws java.lang.Throwable { java.io.File projectFolder = buildProject ( projectName , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File apkFolder = new java.io.File ( projectFolder , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk" ) ) ; java.io.File apk = new java.io.File ( apkFolder , ( ( projectName ) + "-debug-unaligned.apk" ) ) ; int found = com.android.build.gradle.PackagingBuildTest.findFilesInZip ( apk , java.util.Arrays.asList ( packagedFiles ) ) ; assertEquals ( packagedFiles.length , found ) ; }
Source:
private void logSlowRequests ( long requestLifetime , com.android.volley.Request < ? > request , byte [ ] responseContents , org.apache.http.StatusLine statusLine ) { if ( ( com.android.volley.toolbox.BasicNetwork.DEBUG ) || ( requestLifetime > ( com.android.volley.toolbox.BasicNetwork.SLOW_REQUEST_THRESHOLD_MS ) ) ) { com.android.volley.VolleyLog.d ( ( "HTTP response for request=<%s> [lifetime=%d], [size=%s], " + "[rc=%d], [retryCount=%s]" ) , request , requestLifetime , ( responseContents != null ? responseContents.length : "null" ) , statusLine.getStatusCode ( ) , request.getRetryPolicy ( ) . getCurrentRetryCount ( ) ) ; } }

Target:
private void logSlowRequests ( long requestLifetime , com.android.volley.Request < ? > request , byte [ ] responseContents , int statusCode ) { if ( ( com.android.volley.toolbox.BasicNetwork.DEBUG ) || ( requestLifetime > ( com.android.volley.toolbox.BasicNetwork.SLOW_REQUEST_THRESHOLD_MS ) ) ) { com.android.volley.VolleyLog.d ( ( "HTTP response for request=<%s> [lifetime=%d], [size=%s], " + "[rc=%d], [retryCount=%s]" ) , request , requestLifetime , ( responseContents != null ? responseContents.length : "null" ) , statusCode , request.getRetryPolicy ( ) . getCurrentRetryCount ( ) ) ; } }
Source:
public void visitConstant ( int opcode , int offset , int length , com.android.dx.rop.cst.Constant cst , int value ) { visitCommon ( offset , length , true ) ; if ( ( ( ( cst instanceof com.android.dx.rop.cst.CstMemberRef ) || ( cst instanceof com.android.dx.rop.cst.CstType ) ) || ( cst instanceof com.android.dx.rop.cst.CstString ) ) || ( cst instanceof com.android.dx.rop.cst.CstInvokeDynamic ) ) { visitThrowing ( offset , length , true ) ; } }

Target:
public void visitConstant ( int opcode , int offset , int length , com.android.dx.rop.cst.Constant cst , int value ) { visitCommon ( offset , length , true ) ; if ( ( ( ( ( ( cst instanceof com.android.dx.rop.cst.CstMemberRef ) || ( cst instanceof com.android.dx.rop.cst.CstType ) ) || ( cst instanceof com.android.dx.rop.cst.CstString ) ) || ( cst instanceof com.android.dx.rop.cst.CstInvokeDynamic ) ) || ( cst instanceof com.android.dx.rop.cst.CstMethodHandle ) ) || ( cst instanceof com.android.dx.rop.cst.CstProtoRef ) ) { visitThrowing ( offset , length , true ) ; } }
Source:
public void testRoundTripHashCodeUsingBaseEncoding ( ) { com.google.common.hash.HashCode hash1 = com.google.common.hash.Hashing.sha1 ( ) . hashString ( "foo" ) ; com.google.common.hash.HashCode hash2 = com.google.common.hash.HashCode.fromBytes ( com.google.common.io.BaseEncoding.base16 ( ) . lowerCase ( ) . decode ( hash1.toString ( ) ) ) ; assertEquals ( hash1 , hash2 ) ; }

Target:
public void testRoundTripHashCodeUsingBaseEncoding ( ) { com.google.common.hash.HashCode hash1 = com.google.common.hash.Hashing.sha1 ( ) . hashString ( "foo" , com.google.common.base.Charsets.US_ASCII ) ; com.google.common.hash.HashCode hash2 = com.google.common.hash.HashCode.fromBytes ( com.google.common.io.BaseEncoding.base16 ( ) . lowerCase ( ) . decode ( hash1.toString ( ) ) ) ; assertEquals ( hash1 , hash2 ) ; }
Source:
public void testStageInstallWithErrorCode_withNewerDistroVersion ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_FORMAT_VERSION , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withMissingDistroVersionFile ( ) throws java.lang.Exception { byte [ ] distroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . clearVersionForTests ( ) . buildUnvalidatedBytes ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( distroBytes ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public int shutdownAndGetConnectionCount ( ) throws java.io.IOException , java.lang.InterruptedException { try { serverSocket.close ( ) ; shutdownLatch.await ( 1 , java.util.concurrent.TimeUnit.SECONDS ) ; serverThread.join ( 1000 ) ; assertFalse ( "serverThread failed to shut down quickly" , serverThread.isAlive ( ) ) ; } finally { return connectionAttempts.get ( ) ; } }

Target:
public void shutdown ( ) throws java.io.IOException , java.lang.InterruptedException { serverSocket.close ( ) ; shutdownLatch.await ( 1 , java.util.concurrent.TimeUnit.SECONDS ) ; serverThread.join ( 1000 ) ; assertFalse ( "serverThread failed to shut down quickly" , serverThread.isAlive ( ) ) ; }
Source:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , android.bluetooth.le.IAdvertisingSetCallback callback ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.registerAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , callback ) ; }

Target:
public void stopAdvertisingSet ( android.bluetooth.le.IAdvertisingSetCallback callback ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.stopAdvertisingSet ( callback ) ; }
Source:
public static < I extends org.chromium.mojo.bindings.Interface , P extends org.chromium.mojo.bindings.Interface.Proxy > boolean handleRunOrClosePipe ( org.chromium.mojo.bindings.Interface.Manager < I , P > manager , org.chromium.mojo.bindings.ServiceMessage message ) { org.chromium.mojo.bindings.Message payload = message.getPayload ( ) ; org.chromium.mojo.bindings.RunOrClosePipeMessageParams query = org.chromium.mojo.bindings.RunOrClosePipeMessageParams.deserialize ( payload ) ; return ( query.requireVersion.version ) <= ( manager.getVersion ( ) ) ; }

Target:
public static < I extends org.chromium.mojo.bindings.Interface , P extends org.chromium.mojo.bindings.Interface.Proxy > boolean handleRunOrClosePipe ( org.chromium.mojo.bindings.Interface.Manager < I , P > manager , org.chromium.mojo.bindings.ServiceMessage message ) { org.chromium.mojo.bindings.Message payload = message.getPayload ( ) ; org.chromium.mojo.bindings.interfacecontrol.RunOrClosePipeMessageParams query = org.chromium.mojo.bindings.interfacecontrol.RunOrClosePipeMessageParams.deserialize ( payload ) ; if ( ( query.input.which ( ) ) == ( RunOrClosePipeInput.Tag.RequireVersion ) ) { return ( query.input.getRequireVersion ( ) . version ) <= ( manager.getVersion ( ) ) ; } return false ; }
Source:
public final float float_literal ( ) throws org.jf.smali.RecognitionException { float value = 0.0F ; org.antlr.runtime.tree.CommonTree FLOAT_LITERAL195 = null ; try { { FLOAT_LITERAL195 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.FLOAT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_FLOAT_LITERAL_in_float_literal3307 ) ) ) ; value = org.jf.smali.LiteralTools.parseFloat ( ( FLOAT_LITERAL195 != null ? FLOAT_LITERAL195.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final float float_literal ( ) throws org.jf.smali.RecognitionException { float value = 0.0F ; org.antlr.runtime.tree.CommonTree FLOAT_LITERAL195 = null ; try { { FLOAT_LITERAL195 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.FLOAT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_FLOAT_LITERAL_in_float_literal3309 ) ) ) ; value = org.jf.smali.LiteralTools.parseFloat ( ( FLOAT_LITERAL195 != null ? FLOAT_LITERAL195.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
private static int ifnameToLinkLayer ( java.lang.String ifname ) { for ( int i = 0 ; i < ( com.android.server.connectivity.IpConnectivityEventBuilder.IFNAME_LINKLAYER_MAP.size ( ) ) ; i ++ ) { java.lang.String pattern = com.android.server.connectivity.IpConnectivityEventBuilder.IFNAME_LINKLAYER_MAP.valueAt ( i ) ; if ( ifname.startsWith ( pattern ) ) { return com.android.server.connectivity.IpConnectivityEventBuilder.IFNAME_LINKLAYER_MAP.keyAt ( i ) ; } } return com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.UNKNOWN ; }

Target:
private static int ifnameToLinkLayer ( java.lang.String ifname ) { for ( int i = 0 ; i < ( com.android.server.connectivity.IpConnectivityEventBuilder.KNOWN_PREFIX ) ; i ++ ) { java.lang.String pattern = com.android.server.connectivity.IpConnectivityEventBuilder.IFNAME_PREFIXES [ i ] ; if ( ifname.startsWith ( pattern ) ) { return com.android.server.connectivity.IpConnectivityEventBuilder.IFNAME_LINKLAYERS [ i ] ; } } return com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.UNKNOWN ; }
Source:
public void testGetCoreInterfaceRewritingTarget_staticInterfaceMethod ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( "java/util/Comparator" ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) ) ; com.google.common.truth.Truth.assertThat ( support.getCoreInterfaceRewritingTarget ( Opcodes.INVOKESTATIC , "java/util/Comparator" , "reverseOrder" , "()Ljava/util/Comparator;" , true ) ) . isEqualTo ( java.util.Comparator.class ) ; }

Target:
public void testGetCoreInterfaceRewritingTarget_staticInterfaceMethod ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.io.CoreLibraryRewriter ( "" ) , java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( "java/util/Comparator" ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) ) ; com.google.common.truth.Truth.assertThat ( support.getCoreInterfaceRewritingTarget ( Opcodes.INVOKESTATIC , "java/util/Comparator" , "reverseOrder" , "()Ljava/util/Comparator;" , true ) ) . isEqualTo ( java.util.Comparator.class ) ; }
Source:
private static java.lang.String whereStatement ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( android.provider.ContactsContract.CommonDataKinds.Phone.NUMBER ) + " IS NOT NULL" ) + " AND " ) + ( ( android.provider.ContactsContract.Data.DISPLAY_NAME_PRIMARY ) + " IS NOT NULL" ) ) + " AND " ) + ( android.provider.ContactsContract.Data.MIMETYPE ) ) + " IN (\'" ) + ( android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE ) ) + "\')" ; }

Target:
private static java.lang.String getWhere ( android.content.Context context ) { java.lang.String where = ( com.android.dialer.searchfragment.cp2.SearchContactsCursorLoader.getProjection ( context ) [ com.android.dialer.searchfragment.common.Projections.DISPLAY_NAME ] ) + " IS NOT NULL" ; where += ( " AND " + ( android.provider.ContactsContract.CommonDataKinds.Phone.NUMBER ) ) + " IS NOT NULL" ; return where ; }
Source:
public static java.lang.String getStringVariableModifier ( int modifier ) { assert com.android.jack.ir.ast.JModifier.isLocalModifier ( modifier ) ; java.lang.StringBuilder modifierStrBuilder = new java.lang.StringBuilder ( ) ; com.android.jack.ir.ast.JModifier.getStringModifierCommon ( modifier , modifierStrBuilder ) ; if ( com.android.jack.ir.ast.JModifier.isCapturedVariable ( modifier ) ) { modifierStrBuilder.append ( "captured " ) ; } return modifierStrBuilder.toString ( ) ; }

Target:
public static java.lang.String getStringParameterModifier ( int modifier ) { assert com.android.jack.ir.ast.JModifier.isParameterModifier ( modifier ) ; java.lang.StringBuilder modifierStrBuilder = new java.lang.StringBuilder ( ) ; com.android.jack.ir.ast.JModifier.getStringModifierCommon ( modifier , modifierStrBuilder ) ; if ( com.android.jack.ir.ast.JModifier.isCapturedVariable ( modifier ) ) { modifierStrBuilder.append ( "captured " ) ; } return modifierStrBuilder.toString ( ) ; }
Source:
private static boolean hasFirstArgument ( lombok.ast.Expression argument , java.util.List < lombok.ast.MethodInvocation > list ) { for ( lombok.ast.MethodInvocation method : list ) { lombok.ast.Expression argument1 = method.astArguments ( ) . first ( ) ; if ( argument.toString ( ) . equals ( argument1.toString ( ) ) ) { return true ; } } return false ; }

Target:
private static boolean hasOperand ( com.intellij.psi.PsiExpression operand , java.util.List < com.intellij.psi.PsiMethodCallExpression > list ) { for ( com.intellij.psi.PsiMethodCallExpression method : list ) { com.intellij.psi.PsiElement operand2 = method.getMethodExpression ( ) . getQualifier ( ) ; if ( ( operand2 != null ) && ( operand.getText ( ) . equals ( operand2.getText ( ) ) ) ) { return true ; } } return false ; }
Source:
public void testLayerCausesUnderlyingActivityToLoseFocus ( ) throws java.lang.Exception { mTestActivity.startTest ( Utils.FOCUS_CHANGE ) ; waitForAssistantToBeReady ( mReadyLatch ) ; mTestActivity.start3pApp ( Utils.FOCUS_CHANGE ) ; waitToGainFocus ( ) ; startSession ( ) ; waitToLoseFocus ( ) ; }

Target:
public void testLayerCausesUnderlyingActivityToLoseFocus ( ) throws java.lang.Exception { if ( mActivityManager.isLowRamDevice ( ) ) { android.util.Log.d ( android.assist.cts.FocusChangeTest.TAG , "Not running assist tests on low-RAM device." ) ; return ; } mTestActivity.startTest ( Utils.FOCUS_CHANGE ) ; waitForAssistantToBeReady ( mReadyLatch ) ; mTestActivity.start3pApp ( Utils.FOCUS_CHANGE ) ; waitToGainFocus ( ) ; startSession ( ) ; waitToLoseFocus ( ) ; }
Source:
public java.util.Iterator < com.android.sched.vfs.InputVFile > iterator ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType ) { if ( ! ( containsFileType ( fileType ) ) ) { return com.google.common.collect.ImmutableSet.< com.android.sched.vfs.InputVFile > of ( ) . iterator ( ) ; } if ( fileType == ( com.android.jack.library.FileType.RSC ) ) { return resources.iterator ( ) ; } java.util.List < com.android.sched.vfs.InputVFile > inputVFiles = new java.util.ArrayList < com.android.sched.vfs.InputVFile > ( ) ; com.android.jack.library.v0000.InputJackLibraryImpl.fillFiles ( inputVFS.getRootInputVDir ( ) , com.android.jack.library.v0000.InputJackLibraryImpl.getExtension ( fileType ) , inputVFiles ) ; return inputVFiles.iterator ( ) ; }

Target:
public java.util.Iterator < com.android.sched.vfs.InputVFile > iterator ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType ) { if ( ! ( containsFileType ( fileType ) ) ) { return com.google.common.collect.ImmutableSet.< com.android.sched.vfs.InputVFile > of ( ) . iterator ( ) ; } if ( fileType == ( com.android.jack.library.FileType.RSC ) ) { return resources.iterator ( ) ; } java.util.List < com.android.sched.vfs.InputVFile > inputVFiles = new java.util.ArrayList < com.android.sched.vfs.InputVFile > ( ) ; com.android.jack.library.v0000.InputJackLibraryImpl.fillFiles ( inputVFS.getRootDir ( ) , com.android.jack.library.v0000.InputJackLibraryImpl.getExtension ( fileType ) , inputVFiles ) ; return inputVFiles.iterator ( ) ; }
Source:
public int getInt ( int tag , int defaultValue ) { switch ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) { case KeymasterDefs.KM_ENUM : case KeymasterDefs.KM_INT : break ; case KeymasterDefs.KM_INT_REP : case KeymasterDefs.KM_ENUM_REP : throw new java.lang.IllegalArgumentException ( ( "Repeatable tags must use getInts: " + tag ) ) ; default : throw new java.lang.IllegalArgumentException ( ( "Tag is not an int type: " + tag ) ) ; } android.security.keymaster.KeymasterArgument arg = getArgumentByTag ( tag ) ; if ( arg == null ) { return defaultValue ; } return ( ( android.security.keymaster.KeymasterIntArgument ) ( arg ) ) . value ; }

Target:
public int getInt ( int tag , int defaultValue ) { switch ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) { case KeymasterDefs.KM_ENUM : case KeymasterDefs.KM_UINT : break ; case KeymasterDefs.KM_UINT_REP : case KeymasterDefs.KM_ENUM_REP : throw new java.lang.IllegalArgumentException ( ( "Repeatable tags must use getInts: " + tag ) ) ; default : throw new java.lang.IllegalArgumentException ( ( "Tag is not an int type: " + tag ) ) ; } android.security.keymaster.KeymasterArgument arg = getArgumentByTag ( tag ) ; if ( arg == null ) { return defaultValue ; } return ( ( android.security.keymaster.KeymasterIntArgument ) ( arg ) ) . value ; }
Source:
private static org.w3c.dom.Element addElement ( org.w3c.dom.Document doc , org.w3c.dom.Element parent , java.lang.String tag , java.util.Collection < ? extends java.lang.Object > content ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( java.lang.Object o : content ) { sb.append ( ( "\n" + ( o.toString ( ) ) ) ) ; } return com.android.sdklib.devices.DeviceWriter.addElement ( doc , parent , tag , sb.toString ( ) ) ; }

Target:
private static org.w3c.dom.Element addElement ( org.w3c.dom.Document doc , org.w3c.dom.Element parent , java.lang.String tag , java.util.Collection < ? > content ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( java.lang.Object o : content ) { sb.append ( '\n' ) . append ( o.toString ( ) ) ; } return com.android.sdklib.devices.DeviceWriter.addElement ( doc , parent , tag , sb.toString ( ) ) ; }
Source:
public void testAesCbcHmacSha384Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , android.net.cts.IpSecManagerTest.getKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testCryptTcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , true , 1 , true ) ; }
Source:
private java.lang.String getCurrentCountryIso ( android.content.Context context ) { final android.telephony.TelephonyManager telephonyManager = ( ( android.telephony.TelephonyManager ) ( context.getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; java.lang.String countryIso = telephonyManager.getNetworkCountryIso ( ) . toUpperCase ( ) ; if ( countryIso == null ) { countryIso = java.util.Locale.getDefault ( ) . getCountry ( ) ; com.android.server.telecom.Log.w ( this , ( "No CountryDetector; falling back to countryIso based on locale: " + countryIso ) ) ; } return countryIso ; }

Target:
private java.lang.String getCurrentCountryIso ( android.content.Context context ) { final android.telephony.TelephonyManager telephonyManager = ( ( android.telephony.TelephonyManager ) ( context.getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; java.lang.String countryIso = telephonyManager.getNetworkCountryIso ( ) . toUpperCase ( ) ; if ( countryIso == null ) { countryIso = java.util.Locale.getDefault ( ) . getCountry ( ) ; android.telecom.Log.w ( this , ( "No CountryDetector; falling back to countryIso based on locale: " + countryIso ) ) ; } return countryIso ; }
Source:
public void setReturnValueTo ( java.lang.Object reference ) { final java.lang.Class < ? > returnType = type.returnType ( ) ; if ( returnType.isPrimitive ( ) ) { throw new java.lang.IllegalStateException ( ( "return type is not a reference type: " + returnType ) ) ; } if ( ( reference != null ) && ( ! ( returnType.isInstance ( reference ) ) ) ) { throw new java.lang.IllegalArgumentException ( ( "reference is not type " + returnType ) ) ; } references [ ( ( references.length ) - 1 ) ] = reference ; }

Target:
public void setReturnValueTo ( java.lang.Object reference ) { final java.lang.Class < ? > returnType = type.returnType ( ) ; if ( returnType.isPrimitive ( ) ) { throw new java.lang.IllegalStateException ( ( "return type is not a reference type: " + returnType ) ) ; } if ( ( reference != null ) && ( ! ( returnType.isInstance ( reference ) ) ) ) { throw new java.lang.IllegalArgumentException ( ( "reference is not of type " + returnType ) ) ; } references [ ( ( references.length ) - 1 ) ] = reference ; }
Source:
static int getTaskForActivityLocked ( android.os.IBinder token , boolean onlyRoot ) { final com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.forToken ( token ) ; if ( r == null ) { return - 1 ; } final com.android.server.am.TaskRecord task = r.task ; final int activityNdx = task.mActivities.indexOf ( r ) ; if ( ( activityNdx < 0 ) || ( onlyRoot && ( activityNdx > ( task.findEffectiveRootIndex ( ) ) ) ) ) { return - 1 ; } return task.taskId ; }

Target:
static int getTaskForActivityLocked ( android.os.IBinder token , boolean onlyRoot ) { final com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.forToken ( token ) ; if ( r == null ) { return com.android.server.am.TaskRecord.INVALID_TASK_ID ; } final com.android.server.am.TaskRecord task = r.task ; final int activityNdx = task.mActivities.indexOf ( r ) ; if ( ( activityNdx < 0 ) || ( onlyRoot && ( activityNdx > ( task.findEffectiveRootIndex ( ) ) ) ) ) { return com.android.server.am.TaskRecord.INVALID_TASK_ID ; } return task.taskId ; }
Source:
public void testApplyingWithCriticalFiles ( ) throws java.lang.Exception { myPatchSpec.setCriticalFiles ( java.util.Arrays.asList ( "lib/annotations.jar" ) ) ; com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertTrue ( com.intellij.updater.PatchFileCreator.apply ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) , com.intellij.updater.TEST_UI ) ) ; assertAppliedCorrectly ( ) ; }

Target:
public void testApplyingWithModifiedCriticalFiles ( ) throws java.lang.Exception { myPatchSpec.setStrict ( true ) ; myPatchSpec.setCriticalFiles ( java.util.Arrays.asList ( "lib/annotations.jar" ) ) ; com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; java.io.RandomAccessFile raf = new java.io.RandomAccessFile ( new java.io.File ( myOlderDir , "lib/annotations.jar" ) , "rw" ) ; raf.seek ( 20 ) ; raf.write ( 42 ) ; raf.close ( ) ; assertAppliedAndRevertedCorrectly ( patch , com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }
Source:
public void addIfAbsent ( java.lang.CharSequence variant , java.lang.String template ) { int idx = com.ibm.icu.impl.StandardPlural.indexFromString ( variant ) ; if ( ( templates [ idx ] ) != null ) { return ; } templates [ idx ] = com.ibm.icu.impl.SimplePatternFormatter.compileMinMaxPlaceholders ( template , 0 , 1 ) ; }

Target:
public void addIfAbsent ( java.lang.CharSequence variant , java.lang.String template ) { int idx = com.ibm.icu.impl.StandardPlural.indexFromString ( variant ) ; if ( ( templates [ idx ] ) != null ) { return ; } templates [ idx ] = com.ibm.icu.text.SimpleFormatter.compileMinMaxArguments ( template , 0 , 1 ) ; }
Source:
public static final < T extends com.android.jack.test.toolchain.IToolchain > T getCandidateToolchain ( ) { com.android.jack.test.toolchain.IToolchain result = com.android.jack.test.toolchain.AbstractTestTools.createToolchain ( "candidate.toolchain" ) ; return ( ( T ) ( result ) ) ; }

Target:
public static final < T extends com.android.jack.test.toolchain.IToolchain > T getCandidateToolchain ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > clazz ) { com.android.jack.test.toolchain.IToolchain result = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; org.junit.Assume.assumeTrue ( clazz.isAssignableFrom ( result.getClass ( ) ) ) ; return ( ( T ) ( result ) ) ; }
Source:
private static java.nio.DirectByteBuffer copy ( java.nio.DirectByteBuffer other , int markOfOther , boolean isReadOnly ) { java.nio.DirectByteBuffer buf = new java.nio.DirectByteBuffer ( other.block , other.capacity ( ) , other.offset , isReadOnly , other.mapMode ) ; buf.limit = other.limit ; buf.position = other.position ( ) ; buf.mark = markOfOther ; return buf ; }

Target:
private static java.nio.DirectByteBuffer copy ( java.nio.DirectByteBuffer other , int markOfOther , boolean isReadOnly ) { other.checkNotFreed ( ) ; java.nio.DirectByteBuffer buf = new java.nio.DirectByteBuffer ( other.block , other.capacity ( ) , other.offset , isReadOnly , other.mapMode ) ; buf.limit = other.limit ; buf.position = other.position ( ) ; buf.mark = markOfOther ; return buf ; }
Source:
synchronized long nScriptGroup2Create ( java.lang.String name , java.lang.String cachePath , long [ ] closures ) { validate ( ) ; return rsnScriptGroup2Create ( mContext , name , cachePath , closures ) ; }

Target:
synchronized long nScriptGroup2Create ( java.lang.String name , java.lang.String cachePath , long [ ] closures ) { validate ( ) ; long g = rsnScriptGroup2Create ( mContext , name , cachePath , closures ) ; if ( g == 0 ) { throw new android.renderscript.RSRuntimeException ( "Failed creating script group." ) ; } return g ; }
Source:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false , null ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }

Target:
public void testMergeBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , getConsumer ( ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; compareResourceMaps ( merger , loadedMerger , true ) ; }
Source:
protected boolean start ( ) { if ( com.android.bluetooth.pbapclient.PbapClientService.DBG ) { android.util.Log.d ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "onStart" ) ; } android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; filter.addAction ( Intent.ACTION_USER_UNLOCKED ) ; try { registerReceiver ( mPbapBroadcastReceiver , filter ) ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "Unable to register pbapclient receiver" , e ) ; } removeUncleanAccounts ( ) ; com.android.bluetooth.pbapclient.PbapClientService.setPbapClientService ( this ) ; return true ; }

Target:
protected boolean start ( ) { if ( com.android.bluetooth.pbapclient.PbapClientService.VDBG ) { android.util.Log.v ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "onStart" ) ; } android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; filter.addAction ( Intent.ACTION_USER_UNLOCKED ) ; try { registerReceiver ( mPbapBroadcastReceiver , filter ) ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "Unable to register pbapclient receiver" , e ) ; } removeUncleanAccounts ( ) ; com.android.bluetooth.pbapclient.PbapClientService.setPbapClientService ( this ) ; return true ; }
Source:
private int hfToAmVol ( int hfVol ) { int amRange = ( mMaxAmVcVol ) - ( mMinAmVcVol ) ; int hfRange = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MAX_HFP_SCO_VOICE_CALL_VOLUME ) - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) ; int amOffset = ( amRange * ( hfVol - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) ) ) / hfRange ; int amVol = ( mMinAmVcVol ) + amOffset ; android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "HF -> AM " + hfVol ) + " " ) + amVol ) ) ; return amVol ; }

Target:
static int hfToAmVol ( int hfVol ) { int amRange = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.mMaxAmVcVol ) - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.mMinAmVcVol ) ; int hfRange = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MAX_HFP_SCO_VOICE_CALL_VOLUME ) - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) ; int amOffset = ( amRange * ( hfVol - ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.MIN_HFP_SCO_VOICE_CALL_VOLUME ) ) ) / hfRange ; int amVol = ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.mMinAmVcVol ) + amOffset ; android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "HF -> AM " + hfVol ) + " " ) + amVol ) ) ; return amVol ; }
Source:
public void onFeatureRemoved ( ) { mContext.unregisterReceiver ( mReceiver ) ; try { mCompatFeature.endSession ( mSessionId ) ; mCompatFeature.removeRegistrationListener ( mListener ) ; if ( ( mRegCompatAdapter ) != null ) { mCompatFeature.removeRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "onFeatureRemoved: Couldn't end session: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public void setUiTtyMode ( int mode , android.os.Message onCompleteMessage ) { try { mCompatFeature.setUiTTYMode ( mode , onCompleteMessage ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( e.getMessage ( ) ) ; } }
Source:
public static com.android.dialer.spam.SpamBindings get ( android.content.Context context ) { java.util.Objects.requireNonNull ( context ) ; if ( ( com.android.dialer.spam.Spam.spamBindings ) != null ) { return com.android.dialer.spam.Spam.spamBindings ; } android.content.Context application = context.getApplicationContext ( ) ; if ( application instanceof com.android.dialer.spam.SpamBindingsFactory ) { com.android.dialer.spam.Spam.spamBindings = ( ( com.android.dialer.spam.SpamBindingsFactory ) ( application ) ) . newSpamBindings ( ) ; } if ( ( com.android.dialer.spam.Spam.spamBindings ) == null ) { com.android.dialer.spam.Spam.spamBindings = new com.android.dialer.spam.SpamBindingsStub ( ) ; } return com.android.dialer.spam.Spam.spamBindings ; }

Target:
void checkUserMarkedSpamStatus ( java.lang.String number , @ android.support.annotation.Nullable java.lang.String countryIso , @ android.support.annotation.NonNull com.android.dialer.spam.Spam.Listener listener ) ;
Source:
public void schedule ( java.util.TimerTask task , java.util.Date when ) { if ( ( when.getTime ( ) ) < 0 ) { throw new java.lang.IllegalArgumentException ( ( "when < 0: " + ( when.getTime ( ) ) ) ) ; } long delay = ( when.getTime ( ) ) - ( java.lang.System.currentTimeMillis ( ) ) ; scheduleImpl ( task , ( delay < 0 ? 0 : delay ) , ( - 1 ) , false ) ; }

Target:
public void schedule ( java.util.TimerTask task , java.util.Date when , long period ) { validateScheduling ( task , when , 1 , period ) ; doSchedule ( task , when.getTime ( ) , period ) ; }
Source:
public void onValues ( java.util.ArrayList < java.lang.Byte > responseObject , byte halStatus ) { status [ 0 ] = halStatus ; responseList.add ( arrayListToByteArray ( responseObject ) ) ; return ; }

Target:
public void handleMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.se.Terminal.EVENT_GET_HAL : try { initialize ( ) ; } catch ( java.lang.Exception e ) { android.util.Log.e ( mTag , ( ( mName ) + " could not be initialized again" ) ) ; sendMessageDelayed ( obtainMessage ( com.android.se.Terminal.EVENT_GET_HAL , 0 ) , com.android.se.Terminal.GET_SERVICE_DELAY_MILLIS ) ; } break ; default : break ; } }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof android.net.wifi.nan.ConfigRequest ) ) { return false ; } android.net.wifi.nan.ConfigRequest lhs = ( ( android.net.wifi.nan.ConfigRequest ) ( o ) ) ; return ( ( ( ( mSupport5gBand ) == ( lhs.mSupport5gBand ) ) && ( ( mMasterPreference ) == ( lhs.mMasterPreference ) ) ) && ( ( mClusterLow ) == ( lhs.mClusterLow ) ) ) && ( ( mClusterHigh ) == ( lhs.mClusterHigh ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof android.net.wifi.aware.ConfigRequest ) ) { return false ; } android.net.wifi.aware.ConfigRequest lhs = ( ( android.net.wifi.aware.ConfigRequest ) ( o ) ) ; return ( ( ( ( mSupport5gBand ) == ( lhs.mSupport5gBand ) ) && ( ( mMasterPreference ) == ( lhs.mMasterPreference ) ) ) && ( ( mClusterLow ) == ( lhs.mClusterLow ) ) ) && ( ( mClusterHigh ) == ( lhs.mClusterHigh ) ) ; }
Source:
public static java.lang.String getLocale ( java.util.Locale locale ) { java.lang.String language = locale.getLanguage ( ) ; java.lang.String country = locale.getCountry ( ) ; if ( "iw" . equals ( language ) ) { language = "he" ; } else if ( "in" . equals ( language ) ) { language = "id" ; } else if ( "tl" . equals ( language ) ) { language = "fil" ; } return country.isEmpty ( ) ? language : ( language + "-" ) + country ; }

Target:
public static java.lang.String getUpdatedLanguageForAndroid ( java.lang.String language ) { java.lang.String updatedLanguageCode = org.chromium.base.LocaleUtils.LANGUAGE_MAP_FOR_ANDROID.get ( language ) ; return updatedLanguageCode == null ? language : updatedLanguageCode ; }
Source:
public void testCompileTest001 ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . setSourceLevel ( SourceLevel.JAVA_8 ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.generic.test001.jack" ) ) ; }

Target:
public void testCompileTest001 ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . setSourceLevel ( SourceLevel.JAVA_8 ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.frontend.generic.test001.jack" ) ) ; }
Source:
public boolean isAudioOn ( ) { if ( android.bluetooth.BluetoothHeadset.VDBG ) android.bluetooth.BluetoothHeadset.log ( "isAudioOn()" ) ; if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.isAudioOn ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } } if ( ( mService ) == null ) android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; return false ; }

Target:
public void bindResponse ( int indId , boolean indStatus ) { final android.bluetooth.IBluetoothHeadset service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { service.bindResponse ( indId , indStatus ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } }
Source:
static com.android.internal.telephony.gsm.stk.DeviceIdentities retrieveDeviceIdentities ( com.android.internal.telephony.gsm.stk.ComprehensionTlv ctlv ) throws com.android.internal.telephony.gsm.stk.ResultException { com.android.internal.telephony.gsm.stk.DeviceIdentities devIds = new com.android.internal.telephony.gsm.stk.DeviceIdentities ( ) ; byte [ ] rawValue = ctlv.getRawValue ( ) ; int valueIndex = ctlv.getValueIndex ( ) ; try { devIds.sourceId = ( rawValue [ valueIndex ] ) & 255 ; devIds.destinationId = ( rawValue [ ( valueIndex + 1 ) ] ) & 255 ; return devIds ; } catch ( java.lang.IndexOutOfBoundsException e ) { throw new com.android.internal.telephony.gsm.stk.ResultException ( ResultCode.REQUIRED_VALUES_MISSING ) ; } }

Target:
static com.android.internal.telephony.cat.DeviceIdentities retrieveDeviceIdentities ( com.android.internal.telephony.cat.ComprehensionTlv ctlv ) throws com.android.internal.telephony.cat.ResultException { com.android.internal.telephony.cat.DeviceIdentities devIds = new com.android.internal.telephony.cat.DeviceIdentities ( ) ; byte [ ] rawValue = ctlv.getRawValue ( ) ; int valueIndex = ctlv.getValueIndex ( ) ; try { devIds.sourceId = ( rawValue [ valueIndex ] ) & 255 ; devIds.destinationId = ( rawValue [ ( valueIndex + 1 ) ] ) & 255 ; return devIds ; } catch ( java.lang.IndexOutOfBoundsException e ) { throw new com.android.internal.telephony.cat.ResultException ( ResultCode.REQUIRED_VALUES_MISSING ) ; } }
Source:
public final char char_literal ( ) throws org.jf.smali.RecognitionException { char value = 0 ; org.antlr.runtime.tree.CommonTree CHAR_LITERAL215 = null ; try { { CHAR_LITERAL215 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.CHAR_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_CHAR_LITERAL_in_char_literal3585 ) ) ) ; value = ( CHAR_LITERAL215 != null ? CHAR_LITERAL215.getText ( ) : null ) . charAt ( 1 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final long long_literal ( ) throws org.jf.smali.RecognitionException { long value = 0 ; org.antlr.runtime.tree.CommonTree LONG_LITERAL205 = null ; try { { LONG_LITERAL205 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.LONG_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_LONG_LITERAL_in_long_literal3395 ) ) ) ; value = org.jf.smali.LiteralTools.parseLong ( ( LONG_LITERAL205 != null ? LONG_LITERAL205.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public java.lang.String toString ( ) { switch ( mProto.type ) { case com.android.tv.tuner.data.Channel.TYPE_FILE : return java.lang.String.format ( "{%d-%d %s} Filepath: %s, ProgramNumber %d" , mProto.virtualMajor , mProto.virtualMinor , mProto.shortName , mProto.filepath , mProto.programNumber ) ; default : return java.lang.String.format ( "{%d-%d %s} Frequency: %d, ProgramNumber %d" , mProto.virtualMajor , mProto.virtualMinor , mProto.shortName , mProto.frequency , mProto.programNumber ) ; } }

Target:
public java.lang.String toString ( ) { switch ( mProto.type ) { case Channel.TYPE_FILE : return java.lang.String.format ( "{%d-%d %s} Filepath: %s, ProgramNumber %d" , mProto.virtualMajor , mProto.virtualMinor , mProto.shortName , mProto.filepath , mProto.programNumber ) ; default : return java.lang.String.format ( "{%d-%d %s} Frequency: %d, ProgramNumber %d" , mProto.virtualMajor , mProto.virtualMinor , mProto.shortName , mProto.frequency , mProto.programNumber ) ; } }
Source:
public boolean onPrepareOptionsMenu ( android.view.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean hasSelection = ( getSelectedItemPosition ( ) ) >= 0 ; menu.findItem ( com.android.phone.settings.fdn.FdnList.MENU_ADD ) . setVisible ( true ) ; menu.findItem ( com.android.phone.settings.fdn.FdnList.MENU_EDIT ) . setVisible ( hasSelection ) ; menu.findItem ( com.android.phone.settings.fdn.FdnList.MENU_DELETE ) . setVisible ( hasSelection ) ; return true ; }

Target:
public boolean onPrepareOptionsMenu ( android.view.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean hasSelection = ( getSelectedItemPosition ( ) ) >= 0 ; menu.findItem ( com.android.phone.settings.fdn.FdnList.MENU_ADD ) . setVisible ( true ) ; menu.findItem ( com.android.phone.settings.fdn.FdnList.MENU_EDIT ) . setVisible ( hasSelection ) ; menu.findItem ( com.android.phone.settings.fdn.FdnList.MENU_DELETE ) . setVisible ( hasSelection ) ; menu.findItem ( com.android.phone.settings.fdn.FdnList.MENU_DIAL ) . setVisible ( ( hasSelection && ( mFdnDialDirectlySupported ) ) ) ; return true ; }
Source:
public void onScheduledRecordingRemoved ( com.android.tv.dvr.ScheduledRecording schedule ) { if ( com.android.tv.dvr.ui.list.ScheduleRowAdapter.DEBUG ) android.util.Log.d ( com.android.tv.dvr.ui.list.ScheduleRowAdapter.TAG , ( "onScheduledRecordingRemoved: " + schedule ) ) ; com.android.tv.dvr.ui.list.ScheduleRow row = findRowByScheduledRecording ( schedule ) ; if ( row != null ) { removeScheduleRow ( row ) ; notifyArrayItemRangeChanged ( indexOf ( row ) , 1 ) ; sendNextUpdateMessage ( java.lang.System.currentTimeMillis ( ) ) ; } }

Target:
public void onScheduledRecordingRemoved ( com.android.tv.dvr.data.ScheduledRecording schedule ) { if ( com.android.tv.dvr.ui.list.ScheduleRowAdapter.DEBUG ) android.util.Log.d ( com.android.tv.dvr.ui.list.ScheduleRowAdapter.TAG , ( "onScheduledRecordingRemoved: " + schedule ) ) ; com.android.tv.dvr.ui.list.ScheduleRow row = findRowByScheduledRecording ( schedule ) ; if ( row != null ) { removeScheduleRow ( row ) ; notifyArrayItemRangeChanged ( indexOf ( row ) , 1 ) ; sendNextUpdateMessage ( java.lang.System.currentTimeMillis ( ) ) ; } }
Source:
public java.util.Locale.Builder setLanguage ( java.lang.String language ) { if ( ( language == null ) || ( language.isEmpty ( ) ) ) { this . language = "" ; return this ; } final java.lang.String lowercaseLanguage = language.toLowerCase ( java.util.Locale.ROOT ) ; if ( ! ( java.util.Locale.isValidBcp47Alpha ( lowercaseLanguage , 2 , 3 ) ) ) { throw new java.util.IllformedLocaleException ( ( "Invalid language: " + language ) ) ; } this . language = lowercaseLanguage ; return this ; }

Target:
private static java.lang.String normalizeAndValidateLanguage ( java.lang.String language ) { if ( ( language == null ) || ( language.isEmpty ( ) ) ) { return "" ; } final java.lang.String lowercaseLanguage = language.toLowerCase ( java.util.Locale.ROOT ) ; if ( ! ( java.util.Locale.isValidBcp47Alpha ( lowercaseLanguage , 2 , 3 ) ) ) { throw new java.util.IllformedLocaleException ( ( "Invalid language: " + language ) ) ; } return lowercaseLanguage ; }
Source:
public void beforeCheckFile ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( context.getPhase ( ) ) == 1 ) { mNames = new java.util.HashSet < java.lang.String > ( ) ; } mIgnoreFile = context.file.getName ( ) . startsWith ( "donottranslate" ) ; if ( ! ( context.getProject ( ) . getReportIssues ( ) ) ) { mIgnoreFile = true ; } }

Target:
public void beforeCheckFile ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( context.getPhase ( ) ) == 1 ) { mNames = new java.util.HashSet < java.lang.String > ( ) ; } mIgnoreFile = ( context.file.getName ( ) . startsWith ( "donottranslate" ) ) || ( com.android.tools.lint.checks.UnusedResourceDetector.isAnalyticsFile ( context ) ) ; if ( ! ( context.getProject ( ) . getReportIssues ( ) ) ) { mIgnoreFile = true ; } }