auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean loadData ( java.lang.String path ) { try { mappedFile = libcore.io.MemoryMappedFile.mmapRO ( path ) ; } catch ( android.system.ErrnoException errnoException ) { return false ; } try { readHeader ( ) ; return true ; } catch ( java.lang.Exception ex ) { java.lang.System.logE ( ( ( "tzdata file \"" + path ) + "\" was present but invalid!" ) , ex ) ; return false ; } }

Target:
private boolean loadData ( java.lang.String path ) { try { mappedFile = libcore.io.MemoryMappedFile.mmapRO ( path ) ; } catch ( android.system.ErrnoException errnoException ) { return false ; } try { readHeader ( ) ; return true ; } catch ( java.lang.Exception ex ) { try { mappedFile.close ( ) ; } catch ( android.system.ErrnoException ignored ) { } java.lang.System.logE ( ( ( "tzdata file \"" + path ) + "\" was present but invalid!" ) , ex ) ; return false ; } }
Source:
public java.lang.String sendEnvelopeWithStatus ( java.lang.String content ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.sendEnvelopeWithStatus ( content ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return "" ; }

Target:
public android.telephony.VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings ( int subId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getActiveVisualVoicemailSmsFilterSettings ( subId ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }
Source:
protected void onDataConnectionDetached ( ) { if ( DBG ) log ( "onDataConnectionDetached: stop polling and notify detached" ) ; stopNetStatPoll ( ) ; stopDataStallAlarm ( ) ; notifyDataConnection ( Phone.REASON_DATA_DETACHED ) ; }

Target:
private void onDataConnectionAttached ( ) { if ( DBG ) log ( "onDataConnectionAttached" ) ; if ( ( getOverallState ( ) ) == ( DctConstants.State.CONNECTED ) ) { if ( DBG ) log ( "onDataConnectionAttached: start polling notify attached" ) ; startNetStatPoll ( ) ; startDataStallAlarm ( com.android.internal.telephony.gsm.GsmDataConnectionTracker.DATA_STALL_NOT_SUSPECTED ) ; notifyDataConnection ( Phone.REASON_DATA_ATTACHED ) ; } else { notifyOffApnsOfAvailability ( Phone.REASON_DATA_ATTACHED ) ; } setupDataOnReadyApns ( Phone.REASON_DATA_ATTACHED ) ; }
Source:
public void testFilterByTextRegex ( ) { com.android.ddmuilib.logcat.LogCatFilter filter = new com.android.ddmuilib.logcat.LogCatFilter ( "" , "" , "text.*" , "" , "" , com.android.ddmlib.Log.LogLevel.VERBOSE ) ; com.android.ddmuilib.logcat.LogCatMessage msg = new com.android.ddmuilib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "" , "" , "" , "text123" ) ; assertEquals ( true , filter.matches ( msg ) ) ; msg = new com.android.ddmuilib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "" , "" , "" , "te123" ) ; assertEquals ( false , filter.matches ( msg ) ) ; }

Target:
public void testFilterByTextRegex ( ) { com.android.ddmuilib.logcat.LogCatFilter filter = new com.android.ddmuilib.logcat.LogCatFilter ( "" , "" , "text.*" , "" , "" , com.android.ddmlib.Log.LogLevel.VERBOSE ) ; com.android.ddmlib.logcat.LogCatMessage msg = new com.android.ddmlib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "" , "" , "" , "text123" ) ; assertEquals ( true , filter.matches ( msg ) ) ; msg = new com.android.ddmlib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "" , "" , "" , "te123" ) ; assertEquals ( false , filter.matches ( msg ) ) ; }
Source:
public static final boolean isZip64EndOfCentralDirectoryLocatorPresent ( com.android.apksigner.core.util.DataSource zip , long zipEndOfCentralDirectoryPosition ) throws java.io.IOException { long locatorPosition = zipEndOfCentralDirectoryPosition - ( com.android.apksigner.core.internal.zip.ZipUtils.ZIP64_EOCD_LOCATOR_SIZE ) ; if ( locatorPosition < 0 ) { return false ; } java.nio.ByteBuffer sig = java.nio.ByteBuffer.allocate ( 4 ) ; sig.order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ; zip.feed ( locatorPosition , sig.remaining ( ) , new com.android.apksigner.core.internal.util.ByteBufferSink ( sig ) ) ; sig.flip ( ) ; return ( sig.getInt ( 0 ) ) == ( com.android.apksigner.core.internal.zip.ZipUtils.ZIP64_EOCD_LOCATOR_SIG ) ; }

Target:
public static final boolean isZip64EndOfCentralDirectoryLocatorPresent ( com.android.apksigner.core.util.DataSource zip , long zipEndOfCentralDirectoryPosition ) throws java.io.IOException { long locatorPosition = zipEndOfCentralDirectoryPosition - ( com.android.apksigner.core.internal.zip.ZipUtils.ZIP64_EOCD_LOCATOR_SIZE ) ; if ( locatorPosition < 0 ) { return false ; } java.nio.ByteBuffer sig = zip.getByteBuffer ( locatorPosition , 4 ) ; sig.order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ; return ( sig.getInt ( 0 ) ) == ( com.android.apksigner.core.internal.zip.ZipUtils.ZIP64_EOCD_LOCATOR_SIG ) ; }
Source:
public void sendSingleScanChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( channelsToSpec ( 2400 , 5150 , 5175 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , 2400 , 5150 , 5175 ) ) ; }

Target:
public void sendSingleScanAllChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( com.android.server.wifi.ScanTestUtil.channelsToSpec ( 2400 , 2450 , 5150 , 5175 , 5600 , 5650 , 5660 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , com.android.server.wifi.ScanTestUtil.computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , true , 2400 , 5150 , 5175 ) ) ; }
Source:
public void disconnect ( ) { synchronized ( this ) { if ( isClosed ( ) ) return ; if ( ( connectState ) == ( java.net.DatagramSocket.ST_CONNECTED ) ) { impl.disconnect ( ) ; } connectedAddress = null ; connectedPort = - 1 ; connectState = java.net.DatagramSocket.ST_NOT_CONNECTED ; } }

Target:
public void disconnect ( ) { synchronized ( this ) { if ( isClosed ( ) ) return ; if ( ( connectState ) == ( java.net.DatagramSocket.ST_CONNECTED ) ) { impl.disconnect ( ) ; } connectedAddress = null ; connectedPort = - 1 ; connectState = java.net.DatagramSocket.ST_NOT_CONNECTED ; explicitFilter = false ; } }
Source:
private void initCapitalizationContextInfo ( android.icu.util.ULocale locale ) { android.icu.impl.ICUResourceBundle rb = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , locale ) ) ) ; try { android.icu.impl.ICUResourceBundle rdb = rb.getWithFallback ( "contextTransforms/relative" ) ; int [ ] intVector = rdb.getIntVector ( ) ; if ( ( intVector.length ) >= 2 ) { capitalizationOfRelativeUnitsForListOrMenu = ( intVector [ 0 ] ) != 0 ; capitalizationOfRelativeUnitsForStandAlone = ( intVector [ 1 ] ) != 0 ; } } catch ( java.util.MissingResourceException e ) { } }

Target:
private void initCapitalizationContextInfo ( android.icu.util.ULocale locale ) { android.icu.impl.ICUResourceBundle rb = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , locale ) ) ) ; try { android.icu.impl.ICUResourceBundle rdb = rb.getWithFallback ( "contextTransforms/relative" ) ; int [ ] intVector = rdb.getIntVector ( ) ; if ( ( intVector.length ) >= 2 ) { capitalizationOfRelativeUnitsForListOrMenu = ( intVector [ 0 ] ) != 0 ; capitalizationOfRelativeUnitsForStandAlone = ( intVector [ 1 ] ) != 0 ; } } catch ( java.util.MissingResourceException e ) { } }
Source:
private void setHasCarrierPrivilegesOnActiveSubscription ( boolean hasPrivileges ) throws java.lang.Exception { android.telephony.SubscriptionInfo subInfo = new android.telephony.SubscriptionInfo ( 0 , "" , 0 , "" , "" , 0 , 0 , "" , 0 , null , 0 , 0 , "" , true , ( hasPrivileges ? new android.telephony.UiccAccessRule [ ] { com.android.internal.telephony.euicc.EuiccControllerTest.ACCESS_RULE } : null ) ) ; org.mockito.Mockito.when ( mSubscriptionManager.getActiveSubscriptionInfoList ( ) ) . thenReturn ( java.util.Collections.singletonList ( subInfo ) ) ; }

Target:
private void setHasCarrierPrivilegesOnActiveSubscription ( boolean hasPrivileges ) throws java.lang.Exception { android.telephony.SubscriptionInfo subInfo = new android.telephony.SubscriptionInfo ( 0 , "" , 0 , "" , "" , 0 , 0 , "" , 0 , null , 0 , 0 , "" , true , ( hasPrivileges ? new android.telephony.UiccAccessRule [ ] { com.android.internal.telephony.euicc.EuiccControllerTest.ACCESS_RULE } : null ) ) ; org.mockito.Mockito.when ( mSubscriptionManager.canManageSubscription ( subInfo , com.android.internal.telephony.euicc.EuiccControllerTest.PACKAGE_NAME ) ) . thenReturn ( hasPrivileges ) ; org.mockito.Mockito.when ( mSubscriptionManager.getActiveSubscriptionInfoList ( ) ) . thenReturn ( java.util.Collections.singletonList ( subInfo ) ) ; }
Source:
public static void setupLogs ( ) throws com.android.jack.CLILogConfiguration.LogConfigurationException { com.android.jack.CLILogConfiguration.LogLevel level = com.android.jack.CLILogConfiguration.LogLevel.WARNING ; java.lang.String stringLevel = java.lang.System.getProperty ( "com.android.jack.log" ) ; if ( stringLevel != null ) { try { level = new com.android.sched.util.codec.EnumCodec < com.android.jack.CLILogConfiguration.LogLevel > ( com.android.jack.CLILogConfiguration.LogLevel.class ) . checkString ( new com.android.sched.util.codec.CodecContext ( ) , stringLevel ) ; } catch ( com.android.sched.util.codec.ParsingException e ) { throw new com.android.jack.CLILogConfiguration.LogConfigurationException ( e.getMessage ( ) ) ; } } com.android.sched.util.log.LoggerFactory.configure ( level ) ; }

Target:
public static void setupLogs ( ) throws com.android.jack.CLILogConfiguration.LogConfigurationException { com.android.jack.CLILogConfiguration.LogLevel level = com.android.jack.CLILogConfiguration.LogLevel.WARNING ; java.lang.String stringLevel = java.lang.System.getProperty ( "com.android.jack.log" ) ; if ( stringLevel != null ) { try { level = new com.android.sched.util.codec.EnumCodec < com.android.jack.CLILogConfiguration.LogLevel > ( com.android.jack.CLILogConfiguration.LogLevel.class ) . ignoreCase ( ) . checkString ( new com.android.sched.util.codec.CodecContext ( ) , stringLevel ) ; } catch ( com.android.sched.util.codec.ParsingException e ) { throw new com.android.jack.CLILogConfiguration.LogConfigurationException ( e.getMessage ( ) ) ; } } com.android.sched.util.log.LoggerFactory.configure ( level ) ; }
Source:
public void emulateShiftHeld ( ) { mExtendSelection = false ; mShiftIsPressed = true ; int contentX = viewToContent ( ( ( ( int ) ( mLastTouchX ) ) + ( mScrollX ) ) ) ; int contentY = viewToContent ( ( ( ( int ) ( mLastTouchY ) ) + ( mScrollY ) ) ) ; nativeClearFocus ( contentX , contentY ) ; }

Target:
public void emulateShiftHeld ( ) { if ( 0 == ( mNativeClass ) ) return ; mExtendSelection = false ; mShiftIsPressed = true ; nativeHideCursor ( ) ; }
Source:
public static com.google.android.mms.pdu.PduPersister getPduPersister ( android.content.Context context ) { if ( ( ( com.google.android.mms.pdu.PduPersister.sPersister ) == null ) || ( ! ( context.equals ( com.google.android.mms.pdu.PduPersister.sPersister.mContext ) ) ) ) { com.google.android.mms.pdu.PduPersister.sPersister = new com.google.android.mms.pdu.PduPersister ( context ) ; } return com.google.android.mms.pdu.PduPersister.sPersister ; }

Target:
public static com.google.android.mms.pdu.PduPersister getPduPersister ( android.content.Context context ) { if ( ( com.google.android.mms.pdu.PduPersister.sPersister ) == null ) { com.google.android.mms.pdu.PduPersister.sPersister = new com.google.android.mms.pdu.PduPersister ( context ) ; } else if ( ! ( context.equals ( com.google.android.mms.pdu.PduPersister.sPersister.mContext ) ) ) { com.google.android.mms.pdu.PduPersister.sPersister.release ( ) ; com.google.android.mms.pdu.PduPersister.sPersister = new com.google.android.mms.pdu.PduPersister ( context ) ; } return com.google.android.mms.pdu.PduPersister.sPersister ; }
Source:
public void apduResponse ( int token , int resultCode , java.util.ArrayList < java.lang.Byte > apduRsp ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( "apduResponse: token " + token ) ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_TRANSFER_APDU_RESP ) ; sapMessage.setResultCode ( resultCode ) ; if ( resultCode == ( SapMessage.RESULT_OK ) ) { sapMessage.setApduResp ( com.android.bluetooth.sap.SapRilReceiver.arrayListToPrimitiveArray ( apduRsp ) ) ; } removeOngoingReqAndSendMessage ( token , sapMessage ) ; }

Target:
public void apduResponse ( int token , int resultCode , java.util.ArrayList < java.lang.Byte > apduRsp ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( "apduResponse: token " + token ) ) ; com.android.bluetooth.sap.SapService.notifyUpdateWakeLock ( mSapServiceHandler ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_TRANSFER_APDU_RESP ) ; sapMessage.setResultCode ( resultCode ) ; if ( resultCode == ( SapMessage.RESULT_OK ) ) { sapMessage.setApduResp ( com.android.bluetooth.sap.SapRilReceiver.arrayListToPrimitiveArray ( apduRsp ) ) ; } removeOngoingReqAndSendMessage ( token , sapMessage ) ; }
Source:
private void copyFieldsToCalendar ( ) { calendar.set ( java.util.Calendar.YEAR , year ) ; calendar.set ( java.util.Calendar.MONTH , month ) ; calendar.set ( java.util.Calendar.DAY_OF_MONTH , monthDay ) ; calendar.set ( java.util.Calendar.HOUR_OF_DAY , hour ) ; calendar.set ( java.util.Calendar.MINUTE , minute ) ; calendar.set ( java.util.Calendar.SECOND , second ) ; }

Target:
private void copyFieldsToCalendar ( ) { calendar.set ( java.util.Calendar.YEAR , year ) ; calendar.set ( java.util.Calendar.MONTH , month ) ; calendar.set ( java.util.Calendar.DAY_OF_MONTH , monthDay ) ; calendar.set ( java.util.Calendar.HOUR_OF_DAY , hour ) ; calendar.set ( java.util.Calendar.MINUTE , minute ) ; calendar.set ( java.util.Calendar.SECOND , second ) ; calendar.set ( java.util.Calendar.MILLISECOND , 0 ) ; }
Source:
public static org.bouncycastle.crypto.tls.ServerDHParams parse ( java.io.InputStream input ) throws java.io.IOException { java.math.BigInteger p = org.bouncycastle.crypto.tls.TlsDHUtils.readDHParameter ( input ) ; java.math.BigInteger g = org.bouncycastle.crypto.tls.TlsDHUtils.readDHParameter ( input ) ; java.math.BigInteger Ys = org.bouncycastle.crypto.tls.TlsDHUtils.readDHParameter ( input ) ; return new org.bouncycastle.crypto.tls.ServerDHParams ( new org.bouncycastle.crypto.params.DHPublicKeyParameters ( Ys , new org.bouncycastle.crypto.params.DHParameters ( p , g ) ) ) ; }

Target:
public static org.bouncycastle.crypto.tls.ServerDHParams parse ( java.io.InputStream input ) throws java.io.IOException { java.math.BigInteger p = org.bouncycastle.crypto.tls.TlsDHUtils.readDHParameter ( input ) ; java.math.BigInteger g = org.bouncycastle.crypto.tls.TlsDHUtils.readDHParameter ( input ) ; java.math.BigInteger Ys = org.bouncycastle.crypto.tls.TlsDHUtils.readDHParameter ( input ) ; return new org.bouncycastle.crypto.tls.ServerDHParams ( org.bouncycastle.crypto.tls.TlsDHUtils.validateDHPublicKey ( new org.bouncycastle.crypto.params.DHPublicKeyParameters ( Ys , new org.bouncycastle.crypto.params.DHParameters ( p , g ) ) ) ) ; }
Source:
private void updateContents ( ) { if ( ( mBufferData ) != null ) { mTextControl.setText ( com.android.ide.eclipse.gltrace.GLUtils.formatData ( mBufferData , com.android.ide.eclipse.gldebugger.GLEnum.valueOf ( mDisplayFormatCombo.getText ( ) ) ) ) ; mTextControl.setEnabled ( true ) ; mDisplayFormatCombo.setEnabled ( true ) ; } else { mTextControl.setText ( "" ) ; mTextControl.setEnabled ( false ) ; mDisplayFormatCombo.setEnabled ( false ) ; } }

Target:
private void updateContents ( ) { if ( ( mBufferData ) != null ) { mTextControl.setText ( com.android.ide.eclipse.gltrace.GLUtils.formatData ( mBufferData , com.android.ide.eclipse.gltrace.GLEnum.valueOf ( mDisplayFormatCombo.getText ( ) ) ) ) ; mTextControl.setEnabled ( true ) ; mDisplayFormatCombo.setEnabled ( true ) ; } else { mTextControl.setText ( "" ) ; mTextControl.setEnabled ( false ) ; mDisplayFormatCombo.setEnabled ( false ) ; } }
Source:
public org.objectweb.asm.tree.analysis.Value binaryOperation ( org.objectweb.asm.tree.AbstractInsnNode node , org.objectweb.asm.tree.analysis.Value value1 , org.objectweb.asm.tree.analysis.Value value2 ) throws org.objectweb.asm.tree.analysis.AnalyzerException { if ( ( node.getOpcode ( ) ) == ( org.objectweb.asm.Opcodes.PUTFIELD ) ) { if ( value2 == ( com.android.tools.lint.checks.RecycleDetector.RecycleTracker.INSTANCE ) ) { mEscapes = true ; } } return merge ( value1 , value2 ) ; }

Target:
public org.objectweb.asm.tree.analysis.Value binaryOperation ( org.objectweb.asm.tree.AbstractInsnNode node , org.objectweb.asm.tree.analysis.Value value1 , org.objectweb.asm.tree.analysis.Value value2 ) throws org.objectweb.asm.tree.analysis.AnalyzerException { if ( ( node.getOpcode ( ) ) == ( org.objectweb.asm.Opcodes.PUTFIELD ) ) { if ( value2 == ( com.android.tools.lint.checks.CleanupDetector.CleanupTracker.INSTANCE ) ) { mEscapes = true ; } } return merge ( value1 , value2 ) ; }
Source:
java.io.OutputStream createOutputResultStream ( java.io.File reportDir ) throws java.io.IOException { java.io.File reportFile = java.io.File.createTempFile ( com.android.ddmlib.testrunner.XmlTestRunListener.TEST_RESULT_FILE_PREFIX , com.android.ddmlib.testrunner.XmlTestRunListener.TEST_RESULT_FILE_SUFFIX , reportDir ) ; com.android.ddmlib.Log.i ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , java.lang.String.format ( "Created xml report file at %s" , reportFile.getAbsolutePath ( ) ) ) ; mReportPath = reportFile.getAbsolutePath ( ) ; return new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( reportFile ) ) ; }

Target:
protected java.io.File getResultFile ( java.io.File reportDir ) throws java.io.IOException { java.io.File reportFile = java.io.File.createTempFile ( com.android.ddmlib.testrunner.XmlTestRunListener.TEST_RESULT_FILE_PREFIX , com.android.ddmlib.testrunner.XmlTestRunListener.TEST_RESULT_FILE_SUFFIX , reportDir ) ; com.android.ddmlib.Log.i ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , java.lang.String.format ( "Created xml report file at %s" , reportFile.getAbsolutePath ( ) ) ) ; return reportFile ; }
Source:
public android.net.IpSecTransform.Builder setAuthenticatedEncryption ( @ android.net.IpSecTransform.TransformDirection int direction , android.net.IpSecAlgorithm algo ) { mConfig.setAuthenticatedEncryption ( direction , algo ) ; return this ; }

Target:
public android.net.IpSecTransform buildTunnelModeTransform ( @ android.annotation.NonNull java.net.InetAddress sourceAddress , @ android.annotation.NonNull android.net.IpSecManager.SecurityParameterIndex spi ) throws IpSecManager.ResourceUnavailableException , IpSecManager.SpiUnavailableException , java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( sourceAddress ) ; com.android.internal.util.Preconditions.checkNotNull ( spi ) ; if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; mConfig.setSourceAddress ( sourceAddress.getHostAddress ( ) ) ; mConfig.setSpiResourceId ( spi.getResourceId ( ) ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }
Source:
private com.android.jack.ir.ast.JExpression box ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression exprToBox , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface expectedType ) { assert ( exprToBox.getType ( ) ) instanceof com.android.jack.ir.ast.JPrimitiveType ; com.android.jack.ir.ast.JMethodCall boxMethodCall = getBoxingCall ( exprToBox , expectedType , ( ( com.android.jack.ir.ast.JPrimitiveType ) ( exprToBox.getType ( ) ) ) ) ; tr.append ( new com.android.jack.transformations.request.Replace ( exprToBox , boxMethodCall ) ) ; return boxMethodCall ; }

Target:
public static com.android.jack.ir.ast.JExpression box ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression exprToBox , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface expectedType ) { assert ( exprToBox.getType ( ) ) instanceof com.android.jack.ir.ast.JPrimitiveType ; com.android.jack.ir.ast.JMethodCall boxMethodCall = com.android.jack.transformations.ast.TypeLegalizer.getBoxingCall ( exprToBox , expectedType , ( ( com.android.jack.ir.ast.JPrimitiveType ) ( exprToBox.getType ( ) ) ) ) ; return boxMethodCall ; }
Source:
public com.android.build.gradle.internal.test.report.TestResult addTest ( java.lang.String className , java.lang.String testName , long duration , java.lang.String device , java.lang.String project , java.lang.String flavor ) { com.android.build.gradle.internal.test.report.PackageTestResults packageResults = addPackageForClass ( className , device , project , flavor ) ; return addTest ( packageResults.addTest ( className , testName , duration , device , project , flavor ) ) ; }

Target:
public com.android.build.gradle.internal.test.report.TestResult addTest ( java.lang.String className , java.lang.String testName , long duration , java.lang.String device , java.lang.String project , java.lang.String flavor ) { com.android.build.gradle.internal.test.report.PackageTestResults packageResults = addPackageForClass ( className ) ; com.android.build.gradle.internal.test.report.TestResult testResult = addTest ( packageResults.addTest ( className , testName , duration , device , project , flavor ) ) ; addDevice ( device , testResult ) ; addVariant ( project , flavor , testResult ) ; return testResult ; }
Source:
private void createCatchedVariables ( ) { for ( org.objectweb.asm.tree.TryCatchBlockNode tryCatchNode : currentMethod.tryCatchBlocks ) { com.android.jill.frontend.java.Variable declaringCatchVariable = null ; org.objectweb.asm.Type catchedType ; if ( ( tryCatchNode.type ) == null ) { catchedType = org.objectweb.asm.Type.getType ( java.lang.Object.class ) ; } else { catchedType = org.objectweb.asm.Type.getType ( java.lang.Throwable.class ) ; } java.lang.String id = "catchedExceptionNotUsed" + ( ( unusedVarCount ) ++ ) ; declaringCatchVariable = new com.android.jill.frontend.java.Variable ( id , id , catchedType , null ) ; catchBlockToCatchedVariable.put ( tryCatchNode , declaringCatchVariable ) ; } }

Target:
private void createCaughtVariables ( ) { for ( org.objectweb.asm.tree.TryCatchBlockNode tryCatchNode : currentMethod.tryCatchBlocks ) { com.android.jill.frontend.java.Variable declaringCatchVariable = null ; org.objectweb.asm.Type caughtType ; if ( ( tryCatchNode.type ) == null ) { caughtType = org.objectweb.asm.Type.getType ( java.lang.Object.class ) ; } else { caughtType = org.objectweb.asm.Type.getType ( java.lang.Throwable.class ) ; } java.lang.String id = "-e_" + ( ( unusedVarCount ) ++ ) ; declaringCatchVariable = new com.android.jill.frontend.java.Variable ( id , id , caughtType , null ) ; catchBlockToCatchedVariable.put ( tryCatchNode , declaringCatchVariable ) ; } }
Source:
void clearValue ( java.lang.String optionName , java.util.Map < java.lang.String , com.google.devtools.common.options.OptionsParser.OptionValueDescription > clearedValues ) throws com.google.devtools.common.options.OptionsParsingException { java.lang.reflect.Field field = optionsData.getFieldFromName ( optionName ) ; if ( field == null ) { throw new java.lang.IllegalArgumentException ( ( ( "No such option '" + optionName ) + "'" ) ) ; } com.google.devtools.common.options.Option option = field.getAnnotation ( com.google.devtools.common.options.Option.class ) ; clearValue ( field , option , clearedValues ) ; }

Target:
com.google.devtools.common.options.OptionsParser.OptionDescription getOptionDescription ( java.lang.String name ) throws com.google.devtools.common.options.OptionsParsingException { java.lang.reflect.Field field = optionsData.getFieldFromName ( name ) ; if ( field == null ) { return null ; } com.google.devtools.common.options.Option optionAnnotation = field.getAnnotation ( com.google.devtools.common.options.Option.class ) ; return new com.google.devtools.common.options.OptionsParser.OptionDescription ( name , optionsData.getDefaultValue ( field ) , optionsData.getConverter ( field ) , optionsData.getAllowMultiple ( field ) , getExpansionDescriptions ( optionsData.getEvaluatedExpansion ( field ) , name , null ) , getExpansionDescriptions ( optionAnnotation.implicitRequirements ( ) , null , name ) ) ; }
Source:
private native void gattClientScanFilterAddNative ( int client_if , int filter_type , int filter_index , int company_id , int company_id_mask , long uuid_lsb , long uuid_msb , long uuid_mask_lsb , long uuid_mask_msb , java.lang.String name , java.lang.String address , byte addr_type , byte [ ] data , byte [ ] mask ) ;

Target:
private native void gattClientScanFilterAddNative ( int clientIf , int filterType , int filterIndex , int companyId , int companyIdMask , long uuidLsb , long uuidMsb , long uuidMaskLsb , long uuidMaskMsb , java.lang.String name , java.lang.String address , byte addrType , byte [ ] data , byte [ ] mask ) ;
Source:
public void testMyJni ( ) { try { android.security.cts.SELinuxTest.checkSELinuxAccess ( null , null , null , null , null ) ; fail ( "should have thrown" ) ; } catch ( java.lang.NullPointerException e ) { } }

Target:
public void testMyJni ( ) { try { android.security.cts.SELinuxTest.checkSELinuxAccess ( null , null , null , null , null ) ; fail ( "checkSELinuxAccess should have thrown" ) ; } catch ( java.lang.NullPointerException e ) { } try { android.security.cts.SELinuxTest.checkSELinuxContext ( null ) ; fail ( "checkSELinuxContext should have thrown" ) ; } catch ( java.lang.NullPointerException e ) { } }
Source:
public void setUp ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo ) throws com.android.tradefed.device.DeviceNotAvailableException , com.android.tradefed.targetprep.BuildError , com.android.tradefed.targetprep.TargetSetupError { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : com.android.tradefed.targetprep.VtsDeviceInfoCollector.BUILD_KEYS.entrySet ( ) ) { buildInfo.addBuildAttribute ( entry.getKey ( ) , com.android.tradefed.util.ArrayUtil.join ( "," , device.getProperty ( entry.getValue ( ) ) ) ) ; } }

Target:
public void setUp ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo ) throws com.android.tradefed.device.DeviceNotAvailableException , com.android.tradefed.targetprep.BuildError , com.android.tradefed.targetprep.TargetSetupError { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : com.android.tradefed.targetprep.VtsDeviceInfoCollector.BUILD_KEYS.entrySet ( ) ) { buildInfo.addBuildAttribute ( entry.getKey ( ) , com.android.tradefed.util.ArrayUtil.join ( "," , device.getProperty ( entry.getValue ( ) ) ) ) ; } device.executeShellCommand ( "stop" ) ; device.executeShellCommand ( "setprop sys.boot_completed 0" ) ; }
Source:
public boolean isVideoTelephonyAvailable ( ) { try { return getITelephony ( ) . isVideoTelephonyAvailable ( ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
private boolean isUserMobileDataEnabled ( int subId ) { boolean retVal = false ; try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) retVal = telephony.isUserDataEnabled ( subId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isUserDataEnabled" , e ) ; } catch ( java.lang.NullPointerException e ) { } return retVal ; }
Source:
public void TestJB4102 ( ) { try { android.icu.impl.ICUResourceBundle root = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , "root" ) ) ) ; android.icu.impl.ICUResourceBundle t = null ; try { t = root.getWithFallback ( "calendar/islamic-civil/eras/abbreviated/0/mikimaus/pera" ) ; errln ( "Second resource does not exist. How did it get here?\n" ) ; } catch ( java.util.MissingResourceException ex ) { logln ( "Got the expected exception" ) ; } if ( t != null ) { errln ( "t is not null!" ) ; } } catch ( java.util.MissingResourceException e ) { warnln ( ( "Could not load the locale data: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public void TestJB4102 ( ) { try { android.icu.impl.ICUResourceBundle root = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , "root" ) ) ) ; android.icu.impl.ICUResourceBundle t = null ; try { t = root.getWithFallback ( "calendar/islamic-civil/eras/abbreviated/0/mikimaus/pera" ) ; errln ( "Second resource does not exist. How did it get here?\n" ) ; } catch ( java.util.MissingResourceException ex ) { logln ( "Got the expected exception" ) ; } if ( t != null ) { errln ( "t is not null!" ) ; } } catch ( java.util.MissingResourceException e ) { warnln ( ( "Could not load the locale data: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public com.android.sched.vfs.VFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { java.security.Provider.Service service = messageDigestCodec.checkString ( context , "SHA" ) ; return new com.android.sched.vfs.ReadWriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change , com.android.sched.util.file.OutputZipFile.Compression.COMPRESSED ) , 1 , 2 , new com.android.sched.util.config.MessageDigestFactory ( service ) , false ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.VFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { java.security.Provider.Service service = messageDigestCodec.checkString ( context , "SHA" ) ; return new com.android.sched.vfs.ReadWriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change , compression ) , 1 , 2 , new com.android.sched.util.config.MessageDigestFactory ( service ) , false ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
void foo3 ( int [ ] array , int end ) { for ( int i = 3 ; i <= end ; i ++ ) { array [ i ] = 1 ; sum += array [ i ] ; } }

Target:
void foo9 ( int [ ] array , boolean expectInterpreter ) { for ( int i = 0 ; i < 10 ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } sum += array [ i ] ; } }
Source:
public void onSlide ( @ android.support.annotation.NonNull android.view.View bottomSheet , float slideOffset ) { }

Target:
public void onSlide ( @ android.support.annotation.NonNull android.view.View bottomSheet , float slideOffset ) { org.hamcrest.MatcherAssert.assertThat ( slideOffset , org.hamcrest.CoreMatchers.is ( org.hamcrest.Matchers.greaterThanOrEqualTo ( ( - 1.0F ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( slideOffset , org.hamcrest.CoreMatchers.is ( org.hamcrest.Matchers.lessThanOrEqualTo ( 1.0F ) ) ) ; }
Source:
protected void handle ( long taskId , @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.INFO , "Reloading configuration" ) ; response.setContentLength ( 0 ) ; try { jackServer.reloadConfig ( ) ; response.setStatus ( Status.OK ) ; } catch ( com.android.sched.util.file.NotFileException | com.android.jack.server.api.v01.ServerException | com.android.sched.util.file.WrongPermissionException | java.io.IOException | com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.CannotChangePermissionException e ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.SEVERE , "Failed to reload configuration" , e ) ; response.setStatus ( Status.INTERNAL_SERVER_ERROR ) ; } }

Target:
protected void handle ( long taskId , @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.INFO , "Reloading configuration" ) ; response.setContentLength ( 0 ) ; try { jackServer.reloadConfig ( ) ; response.setStatus ( Status.OK ) ; } catch ( com.android.sched.util.file.NotFileException | com.android.jack.server.api.v01.ServerException | com.android.sched.util.file.WrongPermissionException | java.io.IOException | com.android.sched.util.file.CannotCreateFileException e ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to reload configuration: " + ( e.getMessage ( ) ) ) ) ; response.setStatus ( Status.INTERNAL_SERVER_ERROR ) ; } }
Source:
public boolean isPublicKeyBlackListed ( java.security.PublicKey publicKey ) { byte [ ] encoded = publicKey.getEncoded ( ) ; org.bouncycastle.crypto.Digest digest = new org.bouncycastle.crypto.digests.OpenSSLDigest.SHA1 ( ) ; digest.update ( encoded , 0 , encoded.length ) ; byte [ ] out = new byte [ digest.getDigestSize ( ) ] ; digest.doFinal ( out , 0 ) ; return pubkeyBlacklist.contains ( out ) ; }

Target:
public boolean isPublicKeyBlackListed ( java.security.PublicKey publicKey ) { byte [ ] encoded = publicKey.getEncoded ( ) ; org.bouncycastle.crypto.Digest digest = new org.bouncycastle.crypto.digests.OpenSSLDigest.SHA1 ( ) ; digest.update ( encoded , 0 , encoded.length ) ; byte [ ] out = new byte [ digest.getDigestSize ( ) ] ; digest.doFinal ( out , 0 ) ; for ( byte [ ] blacklisted : pubkeyBlacklist ) { if ( java.util.Arrays.equals ( blacklisted , org.bouncycastle.util.encoders.Hex.encode ( out ) ) ) { return true ; } } return false ; }
Source:
public void run ( ) { android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "Chronometer Stop" ) ; android.app.Notification n = new android.app.Notification ( ) ; n.icon = R.drawable.icon1 ; n.contentView = new android.widget.RemoteViews ( getPackageName ( ) , R.layout.chrono_notification ) ; n.contentView.setChronometer ( R.id.time , mChronometerBase , null , false ) ; n.contentIntent = makeIntent ( ) ; mNM.notify ( 2 , n ) ; }

Target:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon2 , "me me me me" , java.lang.System.currentTimeMillis ( ) ) ; n.contentView = new android.widget.RemoteViews ( getPackageName ( ) , R.layout.chrono_notification ) ; mChronometerBase = android.os.SystemClock.elapsedRealtime ( ) ; n.contentView.setChronometer ( R.id.time , mChronometerBase , "Yay! (%s)" , true ) ; n.flags |= android.app.Notification.FLAG_ONGOING_EVENT ; n.contentIntent = makeIntent ( ) ; mNM.notify ( 2 , n ) ; }
Source:
static boolean showIncomingVideo ( int videoState , int callState ) { boolean isPaused = android.telecom.VideoProfile.isPaused ( videoState ) ; boolean isCallActive = callState == ( com.android.incallui.call.DialerCall.State.ACTIVE ) ; boolean isCallOutgoingPending = ( DialerCall.State.isDialing ( callState ) ) || ( callState == ( com.android.incallui.call.DialerCall.State.CONNECTING ) ) ; return ( ( ! isPaused ) && ( isCallActive || isCallOutgoingPending ) ) && ( android.telecom.VideoProfile.isReceptionEnabled ( videoState ) ) ; }

Target:
static boolean showIncomingVideo ( int videoState , int callState ) { boolean isPaused = android.telecom.VideoProfile.isPaused ( videoState ) ; boolean isCallActive = callState == ( com.android.incallui.call.state.DialerCallState.ACTIVE ) ; boolean isCallOutgoingPending = ( com.android.incallui.call.state.DialerCallState.isDialing ( callState ) ) || ( callState == ( com.android.incallui.call.state.DialerCallState.CONNECTING ) ) ; return ( ( ! isPaused ) && ( isCallActive || isCallOutgoingPending ) ) && ( android.telecom.VideoProfile.isReceptionEnabled ( videoState ) ) ; }
Source:
public void enter ( ) { super . enter ( ) ; setSpeakerphoneOn ( false ) ; setBluetoothOn ( false ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_EARPIECE , mAvailableRoutes ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }

Target:
public void enter ( ) { super . enter ( ) ; setSpeakerphoneOn ( false ) ; setBluetoothOn ( false ) ; if ( ( mAudioFocusType ) == ( com.android.server.telecom.CallAudioRouteStateMachine.ACTIVE_FOCUS ) ) { setNotificationsSuppressed ( true ) ; } android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_EARPIECE , mAvailableRoutes ) ; setSystemAudioState ( newState , true ) ; updateInternalCallAudioState ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.System.out.println ( "TEST" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { com.android.hierarchyviewerlib.HierarchyViewerDirector director = new com.android.hierarchyviewer.HierarchyViewerApplicationDirector ( ) ; com.android.hierarchyviewerlib.ComponentRegistry.setDirector ( director ) ; director.initDebugBridge ( ) ; com.android.hierarchyviewerlib.ComponentRegistry.setDeviceSelectionModel ( new com.android.hierarchyviewerlib.models.DeviceSelectionModel ( ) ) ; director.startListenForDevices ( ) ; director.populateDeviceSelectionModel ( ) ; com.android.hierarchyviewer.UIThread.runUI ( ) ; director.stopListenForDevices ( ) ; director.stopDebugBridge ( ) ; director.terminate ( ) ; }
Source:
public void callDropFeedbackPaint ( com.android.ide.common.api.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.DropFeedback feedback ) { if ( ( ( gc != null ) && ( feedback != null ) ) && ( ( feedback.painter ) != null ) ) { try { feedback.painter.paint ( gc , targetNode , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "DropFeedback.painter failed: %s" , 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 void testInstall_badSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneBundleInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneBundleInstaller ( "TimeZoneBundleInstallerTest" , doesNotExist , testInstallDir ) ; libcore.tzdata.update2.TimeZoneBundle tzData = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; try { brokenSystemInstaller.install ( tzData.getBytes ( ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNoContentInstalled ( ) ; }

Target:
public void testInstall_badSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneBundleInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneBundleInstaller ( "TimeZoneBundleInstallerTest" , doesNotExist , testInstallDir ) ; libcore.tzdata.update2.TimeZoneBundle tzData = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; try { brokenSystemInstaller.installWithErrorCode ( tzData.getBytes ( ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNoContentInstalled ( ) ; }
Source:
public void testCancelDownload ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = android.telephony.embms.cts.DOWNLOAD_REQUEST_TEMPLATE.build ( ) ; mDownloadSession.cancelDownload ( request ) ; java.util.List < android.os.Bundle > cancelDownloadCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_CANCEL_DOWNLOAD ) ; assertEquals ( 1 , cancelDownloadCalls.size ( ) ) ; assertEquals ( request , cancelDownloadCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; }

Target:
public void testCancelDownload ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = downloadRequestTemplate.build ( ) ; mDownloadSession.cancelDownload ( request ) ; java.util.List < android.os.Bundle > cancelDownloadCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_CANCEL_DOWNLOAD ) ; assertEquals ( 1 , cancelDownloadCalls.size ( ) ) ; assertEquals ( request , cancelDownloadCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; }
Source:
private static java.lang.String getFqcn ( @ com.android.annotations.NonNull org.w3c.dom.Element element ) { org.w3c.dom.Element root = element.getOwnerDocument ( ) . getDocumentElement ( ) ; java.lang.String pkg = root.getAttribute ( com.android.SdkConstants.ATTR_PACKAGE ) ; java.lang.String className = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_NAME ) ; if ( className.startsWith ( "." ) ) { return pkg + className ; } else if ( ( className.indexOf ( '.' ) ) == ( - 1 ) ) { return ( pkg + '.' ) + className ; } return className ; }

Target:
private static java.lang.String getFqcn ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { java.lang.String className = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_NAME ) ; if ( className.startsWith ( "." ) ) { return ( context.getMainProject ( ) . getPackage ( ) ) + className ; } else if ( ( className.indexOf ( '.' ) ) == ( - 1 ) ) { return ( ( context.getMainProject ( ) . getPackage ( ) ) + '.' ) + className ; } return className ; }
Source:
public boolean requestFocus ( final int direction , final android.graphics.Rect previouslyFocusedRect ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestFocus ( direction , previouslyFocusedRect ) ; } } ) ; return ret ; } mAwContents.requestFocus ( ) ; return mWebViewPrivate.super_requestFocus ( direction , previouslyFocusedRect ) ; }

Target:
public boolean onGenericMotionEvent ( final android.view.MotionEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onGenericMotionEvent ( event ) ; } } ) ; return ret ; } return mAwContents.onGenericMotionEvent ( event ) ; }
Source:
public void setRemoteStreamVolume ( int index ) { enforceVolumeController ( "set the remote stream volume" ) ; mMediaFocusControl.setRemoteStreamVolume ( index ) ; }

Target:
private void updateEncodedSurroundOutput ( ) { int newSurroundMode = Settings.Global.getInt ( mContentResolver , Settings.Global.ENCODED_SURROUND_OUTPUT , Settings.Global.ENCODED_SURROUND_OUTPUT_AUTO ) ; if ( ( mEncodedSurroundMode ) != newSurroundMode ) { sendEncodedSurroundMode ( newSurroundMode ) ; synchronized ( mConnectedDevices ) { java.lang.String key = makeDeviceListKey ( AudioSystem.DEVICE_OUT_HDMI , "" ) ; com.android.server.audio.AudioService.DeviceListSpec deviceSpec = mConnectedDevices.get ( key ) ; if ( deviceSpec != null ) { setWiredDeviceConnectionState ( AudioSystem.DEVICE_OUT_HDMI , AudioSystem.DEVICE_STATE_UNAVAILABLE , "" , "" , "android" ) ; setWiredDeviceConnectionState ( AudioSystem.DEVICE_OUT_HDMI , AudioSystem.DEVICE_STATE_AVAILABLE , "" , "" , "android" ) ; } } mEncodedSurroundMode = newSurroundMode ; } }
Source:
private void agentDisconnect ( ) { if ( mNetworkInfo.isConnected ( ) ) { agentDisconnect ( mNetworkInfo , mNetworkAgent ) ; mNetworkAgent = null ; } }

Target:
protected void updateState ( android.net.NetworkInfo.DetailedState detailedState , java.lang.String reason ) { if ( com.android.server.connectivity.Vpn.LOGD ) android.util.Log.d ( com.android.server.connectivity.Vpn.TAG , ( ( ( "setting state=" + detailedState ) + ", reason=" ) + reason ) ) ; mNetworkInfo.setDetailedState ( detailedState , reason , null ) ; if ( ( mNetworkAgent ) != null ) { mNetworkAgent.sendNetworkInfo ( mNetworkInfo ) ; } updateAlwaysOnNotification ( detailedState ) ; }
Source:
public void reject ( int reason ) throws com.android.ims.ImsException { logi ( ( "reject :: reason=" + reason ) ) ; synchronized ( mLockObj ) { if ( ( mSession ) != null ) { mSession.reject ( reason ) ; } if ( ( mInCall ) && ( ( mProposedCallProfile ) != null ) ) { if ( com.android.ims.ImsCall.DBG ) { logi ( "reject :: call profile is not updated; destroy it..." ) ; } mProposedCallProfile = null ; } if ( ( mInCall ) && ( ( mUpdateRequest ) == ( com.android.ims.ImsCall.UPDATE_UNSPECIFIED ) ) ) { mUpdateRequest = com.android.ims.ImsCall.UPDATE_NONE ; } } }

Target:
public void terminate ( int reason ) throws com.android.ims.ImsException { logi ( ( "terminate :: reason=" + reason ) ) ; synchronized ( mLockObj ) { mHold = false ; mInCall = false ; mTerminationRequestPending = true ; if ( ( mSession ) != null ) { mSession.terminate ( reason ) ; } } }
Source:
public boolean configHciSnoopLog ( boolean enable ) { try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.configHciSnoopLog ( enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return false ; }

Target:
public boolean isLe2MPhySupported ( ) { if ( ! ( getLeAccess ( ) ) ) return false ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.isLe2MPhySupported ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "failed to get isExtendedAdvertisingSupported, error: " , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return false ; }