auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onDialerCallSessionModificationStateChange ( ) { if ( ( mDialerCall.getVideoTech ( ) . getSessionModificationState ( ) ) == ( com.android.incallui.videotech.utils.SessionModificationState.NO_REQUEST ) ) { cleanup ( ) ; updateNotification ( com.android.incallui.call.CallList.getInstance ( ) ) ; } }

Target:
public void onContactInfoComplete ( java.lang.String callId , com.android.incallui.ContactInfoCache.ContactCacheEntry entry ) { com.android.incallui.call.DialerCall call = com.android.incallui.call.CallList.getInstance ( ) . getCallById ( callId ) ; if ( call != null ) { call.getLogState ( ) . contactLookupResult = entry.contactLookupResult ; buildAndSendNotification ( com.android.incallui.call.CallList.getInstance ( ) , call , entry ) ; } }
Source:
public static int sendto ( java.io.FileDescriptor fd , java.nio.ByteBuffer buffer , int flags , java.net.InetAddress inetAddress , int port ) throws java.io.IOException { boolean isDatagram = inetAddress != null ; if ( ( ! isDatagram ) && ( ( buffer.remaining ( ) ) == 0 ) ) { return 0 ; } int result ; try { result = Libcore.os.sendto ( fd , buffer , flags , inetAddress , port ) ; } catch ( libcore.io.ErrnoException errnoException ) { result = libcore.io.IoBridge.maybeThrowAfterSendto ( isDatagram , errnoException ) ; } return result ; }

Target:
public static int sendto ( java.io.FileDescriptor fd , java.nio.ByteBuffer buffer , int flags , java.net.InetAddress inetAddress , int port ) throws java.io.IOException { boolean isDatagram = inetAddress != null ; if ( ( ! isDatagram ) && ( ( buffer.remaining ( ) ) == 0 ) ) { return 0 ; } int result ; try { result = Libcore.os.sendto ( fd , buffer , flags , inetAddress , port ) ; } catch ( android.system.ErrnoException errnoException ) { result = libcore.io.IoBridge.maybeThrowAfterSendto ( isDatagram , errnoException ) ; } return result ; }
Source:
public void sendSms ( int token , int messageRef , java.lang.String format , java.lang.String smsc , boolean isRetry , byte [ ] pdu ) throws com.android.ims.ImsException { try { mMmTelFeatureConnection.sendSms ( token , messageRef , format , smsc , isRetry , pdu ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "sendSms()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public void sendSms ( int token , int messageRef , java.lang.String format , java.lang.String smsc , boolean isRetry , byte [ ] pdu ) throws com.android.ims.ImsException { try { mMmTelFeatureConnection.sendSms ( token , messageRef , format , smsc , isRetry , pdu ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "sendSms()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public void testLauncherNonExportedAppFails ( ) throws java.lang.Exception { if ( ! ( mHasLauncherApps ) ) { return ; } installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { int serialNumber = getUserSerialNumber ( 0 ) ; assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testLaunchNonExportActivityFails" , 0 , ( "-e testUser " + serialNumber ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }

Target:
public void testLauncherNonExportedAppFails ( ) throws java.lang.Exception { if ( ( ! ( mHasLauncherApps ) ) || ( mHasLiveTvFeature ) ) { return ; } installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { int serialNumber = getUserSerialNumber ( 0 ) ; assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testLaunchNonExportActivityFails" , 0 , ( "-e testUser " + serialNumber ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }
Source:
private java.io.File getListingOfDex ( @ javax.annotation.Nonnull java.io.File dex ) throws java.io.FileNotFoundException , java.io.IOException { assert dex.isFile ( ) ; com.android.jack.util.ExecuteFile exec = new com.android.jack.util.ExecuteFile ( new java.lang.String [ ] { "bash" , "-c" , ( ( ( com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "dexdump" ) . getAbsolutePath ( ) ) + " " ) + ( dex.getAbsolutePath ( ) ) ) + " | grep \" Class descriptor : \" | cut -d\\\' -f2 | sed -e \'s/$/:/\'" } ) ; java.io.File outList = com.android.jack.TestTools.createTempFile ( "types" , ".txt" ) ; exec.setOut ( outList ) ; junit.framework.Assert.assertTrue ( exec.run ( ) ) ; return outList ; }

Target:
private int getTypeCountInDex ( @ javax.annotation.Nonnull java.io.File dex ) throws java.io.FileNotFoundException , java.io.IOException { assert dex.isFile ( ) ; int count = 0 ; for ( com.android.jack.dx.io.ClassDef def : new com.android.jack.dx.io.DexBuffer ( dex ) . classDefs ( ) ) { count ++ ; } return count ; }
Source:
public void testStartStopFlow ( ) throws java.lang.Exception { mInOrder = org.mockito.Mockito.inOrder ( mServiceManagerMock , mWifiMock , mManagerStatusCallbackMock ) ; executeAndValidateStartupSequence ( ) ; mDut.stop ( ) ; mTestLooper.dispatchAll ( ) ; mInOrder.verify ( mWifiMock ) . stop ( ) ; mInOrder.verify ( mManagerStatusCallbackMock ) . onStop ( ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mManagerStatusCallbackMock ) ; }

Target:
public void testStartStopFlow ( ) throws java.lang.Exception { mInOrder = org.mockito.Mockito.inOrder ( mServiceManagerMock , mWifiMock , mManagerStatusCallbackMock ) ; executeAndValidateInitializationSequence ( ) ; executeAndValidateStartupSequence ( ) ; mDut.stop ( ) ; mTestLooper.dispatchAll ( ) ; mInOrder.verify ( mWifiMock ) . stop ( ) ; mInOrder.verify ( mManagerStatusCallbackMock ) . onStop ( ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mManagerStatusCallbackMock ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeParcelableArray ( mScanResults , flags ) ; dest.writeParcelable ( mCurrentSelectedConfig , flags ) ; dest.writeParcelable ( mRequiredCapabilities , flags ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { if ( ( mScanResults ) != null ) { dest.writeInt ( mScanResults.length ) ; for ( int i = 0 ; i < ( mScanResults.length ) ; i ++ ) { dest.writeParcelable ( mScanResults [ i ] , flags ) ; } } else { dest.writeInt ( 0 ) ; } dest.writeParcelable ( mCurrentSelectedConfig , flags ) ; dest.writeParcelable ( mRequiredCapabilities , flags ) ; }
Source:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc , boolean itf ) { if ( opcode == ( org.objectweb.asm.Opcodes.INVOKESTATIC ) ) { annotations.CalledByIndy callsite = callsiteMap.get ( name ) ; if ( callsite != null ) { insertIndy ( callsite.name ( ) , desc , callsite ) ; return ; } } mv.visitMethodInsn ( opcode , owner , name , desc , itf ) ; }

Target:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc , boolean itf ) { if ( opcode == ( org.objectweb.asm.Opcodes.INVOKESTATIC ) ) { annotations.CalledByIndy callsite = callsiteMap.get ( name ) ; if ( callsite != null ) { insertIndy ( callsite.fieldOrMethodName ( ) , desc , callsite ) ; return ; } } mv.visitMethodInsn ( opcode , owner , name , desc , itf ) ; }
Source:
public void reportStkServiceIsRunning ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void sendEnvelope ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }
Source:
void addEntry ( int hash , K key , V value , int bucketIndex ) { if ( ( ( size ) >= ( threshold ) ) && ( null != ( table [ bucketIndex ] ) ) ) { resize ( ( 2 * ( table.length ) ) ) ; hash = ( null != key ) ? hash ( key ) : 0 ; bucketIndex = java.util.HashMap.indexFor ( hash , table.length ) ; } createEntry ( hash , key , value , bucketIndex ) ; }

Target:
void addEntry ( int hash , K key , V value , int bucketIndex ) { if ( ( ( size ) >= ( threshold ) ) && ( null != ( table [ bucketIndex ] ) ) ) { resize ( ( 2 * ( table.length ) ) ) ; hash = ( null != key ) ? java.util.sun.misc.Hashing.singleWordWangJenkinsHash ( key ) : 0 ; bucketIndex = java.util.HashMap.indexFor ( hash , table.length ) ; } createEntry ( hash , key , value , bucketIndex ) ; }
Source:
public void testGetPath_NoAttributeSpecified ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.RestSignatureInspection inspection = new com.google.gct.intellij.endpoints.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "foo" , path ) ; }

Target:
public void testGetPath_NoAttributeSpecified ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.RestSignatureInspection inspection = new com.google.gct.idea.appengine.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "foo" , path ) ; }
Source:
public void ctorDoesNotCrashEvenIfReleaseFileIsMissing ( ) throws java.lang.Exception { mTraceReleaseFile.delete ( ) ; new com.android.server.wifi.LastMileLogger ( mWifiInjector , mTraceDataFile.getPath ( ) , mTraceEnableFile.getPath ( ) , mTraceReleaseFile.getPath ( ) ) ; org.mockito.Mockito.verify ( mLog ) . warn ( org.mockito.Matchers.contains ( "Failed" ) ) ; }

Target:
public void connectionEventStartedDoesNotEnableTracingIfReleaseFileIsMissing ( ) throws java.lang.Exception { mTraceReleaseFile.delete ( ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; org.junit.Assert.assertEquals ( "0" , libcore.io.IoUtils.readFileAsString ( mTraceEnableFile.getPath ( ) ) ) ; }
Source:
int getConnectionState ( android.bluetooth.BluetoothDevice device ) { if ( ( mInputDevices.get ( device ) ) == null ) { return android.bluetooth.BluetoothInputDevice.STATE_DISCONNECTED ; } return mInputDevices.get ( device ) ; }

Target:
int getConnectionState ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getConnectionState: " + ( device.getAddress ( ) ) ) ) ; if ( ( mInputDevices.get ( device ) ) == null ) { return android.bluetooth.BluetoothInputDevice.STATE_DISCONNECTED ; } return mInputDevices.get ( device ) ; }
Source:
public void testPerformanceSummaryAddedProfilingPoint ( ) throws java.io.FileNotFoundException , java.io.IOException { setUp ( false ) ; com.android.vts.util.PerformanceSummary today = dailySummaries.get ( 0 ) ; com.android.vts.util.ProfilingPointSummary summary = new com.android.vts.util.ProfilingPointSummary ( ) ; com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode mode = com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode.VTS_REGRESSION_MODE_INCREASING ; com.android.vts.entity.ProfilingPointRunEntity pt = com.android.vts.servlet.VtsPerformanceJobServletTest.createProfilingReport ( com.android.vts.servlet.VtsPerformanceJobServletTest.LABELS , com.android.vts.servlet.VtsPerformanceJobServletTest.HIGH_VALS , mode ) ; summary.update ( pt ) ; summary.update ( pt ) ; today.insertProfilingPointSummary ( "p3" , summary ) ; java.lang.String output = com.android.vts.servlet.VtsPerformanceJobServlet.getPeformanceSummary ( "test" , dailySummaries , legendLabels ) ; com.android.vts.servlet.VtsPerformanceJobServletTest.compareToBaseline ( output , "performanceSummary3.html" ) ; }

Target:
public void testPerformanceSummaryAddedProfilingPoint ( ) throws java.io.FileNotFoundException , java.io.IOException { setUp ( false ) ; com.android.vts.util.PerformanceSummary today = dailySummaries.get ( 0 ) ; com.android.vts.util.ProfilingPointSummary summary = new com.android.vts.util.ProfilingPointSummary ( ) ; com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode mode = com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode.VTS_REGRESSION_MODE_INCREASING ; com.android.vts.entity.ProfilingPointRunEntity pt = com.android.vts.servlet.VtsPerformanceJobServletTest.createProfilingReport ( com.android.vts.servlet.VtsPerformanceJobServletTest.LABELS , com.android.vts.servlet.VtsPerformanceJobServletTest.HIGH_VALS , mode ) ; summary.update ( pt ) ; summary.update ( pt ) ; today.insertProfilingPointSummary ( "p3" , summary ) ; java.lang.String output = com.android.vts.servlet.VtsPerformanceJobServlet.getPerformanceSummary ( "test" , dailySummaries , legendLabels ) ; com.android.vts.servlet.VtsPerformanceJobServletTest.compareToBaseline ( output , "performanceSummary3.html" ) ; }
Source:
public void connectResponse ( int token , int sapConnectRsp , int maxMsgSize ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( ( ( ( ( "connectResponse: token " + token ) + " sapConnectRsp " ) + sapConnectRsp ) + " maxMsgSize " ) + maxMsgSize ) ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_CONNECT_RESP ) ; sapMessage.setConnectionStatus ( sapConnectRsp ) ; if ( sapConnectRsp == ( SapMessage.CON_STATUS_ERROR_MAX_MSG_SIZE_UNSUPPORTED ) ) { sapMessage.setMaxMsgSize ( maxMsgSize ) ; } sapMessage.setResultCode ( SapMessage.INVALID_VALUE ) ; removeOngoingReqAndSendMessage ( token , sapMessage ) ; }

Target:
public void connectResponse ( int token , int sapConnectRsp , int maxMsgSize ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( ( ( ( ( "connectResponse: token " + token ) + " sapConnectRsp " ) + sapConnectRsp ) + " maxMsgSize " ) + maxMsgSize ) ) ; com.android.bluetooth.sap.SapService.notifyUpdateWakeLock ( mSapServiceHandler ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_CONNECT_RESP ) ; sapMessage.setConnectionStatus ( sapConnectRsp ) ; if ( sapConnectRsp == ( SapMessage.CON_STATUS_ERROR_MAX_MSG_SIZE_UNSUPPORTED ) ) { sapMessage.setMaxMsgSize ( maxMsgSize ) ; } sapMessage.setResultCode ( SapMessage.INVALID_VALUE ) ; removeOngoingReqAndSendMessage ( token , sapMessage ) ; }
Source:
public void deleteSmsOnSim ( int index , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_DELETE_SMS_ON_SIM , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( index ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGV ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + index ) ) ; send ( rr ) ; }

Target:
public void setSuppServiceNotifications ( boolean enable , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION , result , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( enable ? 1 : 0 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
private static boolean isAttributeValueLink ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( attribute == null ) { return false ; } if ( ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isClassAttribute ( context ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isOnClickAttribute ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isManifestName ( context ) ) ) { return true ; } java.lang.String value = attribute.getValue ( ) ; if ( value.startsWith ( "@+" ) ) { return false ; } com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resource = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.parseResource ( value ) ; if ( resource != null ) { com.android.resources.ResourceType type = resource.getFirst ( ) ; if ( type != null ) { return true ; } } return false ; }

Target:
private static boolean isAttributeValueLink ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( attribute == null ) { return false ; } if ( ( ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isClassAttribute ( context ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isOnClickAttribute ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isManifestName ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isStyleAttribute ( context ) ) ) { return true ; } java.lang.String value = attribute.getValue ( ) ; if ( value.startsWith ( "@+" ) ) { return false ; } com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resource = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.parseResource ( value ) ; if ( resource != null ) { com.android.resources.ResourceType type = resource.getFirst ( ) ; if ( type != null ) { return true ; } } return false ; }
Source:
java.util.List < java.lang.String > getSecondaryDexPathsFromProtectedDirs ( ) { java.util.List < java.lang.String > paths = new java.util.ArrayList < > ( ) ; paths.add ( ( ( mPackageInfo.applicationInfo.dataDir ) + "/secondary6.dex" ) ) ; paths.add ( ( ( mPackageInfo.applicationInfo.dataDir ) + "/secondary7.dex" ) ) ; return paths ; }

Target:
java.util.List < java.lang.String > getSecondaryDexPathsFromProtectedDirs ( ) { java.util.List < java.lang.String > paths = new java.util.ArrayList < > ( ) ; paths.add ( ( ( mPackageInfo.applicationInfo.deviceProtectedDataDir ) + "/secondary6.dex" ) ) ; paths.add ( ( ( mPackageInfo.applicationInfo.credentialProtectedDataDir ) + "/secondary7.dex" ) ) ; return paths ; }
Source:
public void hangupWaitingOrBackground ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilHangup ( mInstanceId , rr.mSerial , ( - 1 ) ) ; send ( rr ) ; }

Target:
public void getOperator ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_OPERATOR , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public boolean dumpProfiles ( int uid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return false ; try { return mInstalld.dumpProfiles ( uid , packageName , codePaths ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public boolean dumpProfiles ( int uid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return false ; try { return mInstalld.dumpProfiles ( uid , packageName , codePaths ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public com.google.common.collect.ImmutableList < java.lang.String > getEvaluatedExpansion ( java.lang.reflect.Field field , @ javax.annotation.Nullable java.lang.String unparsedValue ) throws com.google.devtools.common.options.OptionsParsingException { com.google.devtools.common.options.OptionsData.ExpansionData expansionData = expansionDataForFields.get ( field ) ; if ( expansionData == null ) { return com.google.devtools.common.options.OptionsData.EMPTY_EXPANSION ; } return expansionData.getExpansion ( new com.google.devtools.common.options.ExpansionContext ( this , field , unparsedValue ) ) ; }

Target:
public com.google.common.collect.ImmutableList < java.lang.String > getEvaluatedExpansion ( com.google.devtools.common.options.OptionDefinition optionDefinition , @ javax.annotation.Nullable java.lang.String unparsedValue ) throws com.google.devtools.common.options.OptionsParsingException { com.google.devtools.common.options.OptionsData.ExpansionData expansionData = expansionDataForFields.get ( optionDefinition ) ; if ( expansionData == null ) { return com.google.devtools.common.options.OptionsData.EMPTY_EXPANSION ; } return expansionData.getExpansion ( new com.google.devtools.common.options.ExpansionContext ( this , optionDefinition , unparsedValue ) ) ; }
Source:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ReadZipFS.ZipVFile file ) { try { return zipFile.getInputStream ( file.getZipEntry ( ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ReadZipFS.ZipVFile file ) { try { VFSStatCategory.ZIP_READ.getCounterStat ( getTracer ( ) , infoString ) . incValue ( ) ; return zipFile.getInputStream ( file.getZipEntry ( ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } }
Source:
public void disableService ( ) { if ( ! ( android.autofillservice.cts.Helper.hasAutofillFeature ( ) ) ) return ; if ( ! ( android.autofillservice.cts.AutoFillServiceTestCase.isServiceEnabled ( ) ) ) return ; final android.autofillservice.cts.OneTimeSettingsListener observer = new android.autofillservice.cts.OneTimeSettingsListener ( android.autofillservice.cts.AutoFillServiceTestCase.getContext ( ) , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; android.autofillservice.cts.Helper.runShellCommand ( "settings delete secure %s" , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; observer.assertCalled ( ) ; android.autofillservice.cts.AutoFillServiceTestCase.assertServiceDisabled ( ) ; android.autofillservice.cts.InstrumentedAutoFillService.setIgnoreUnexpectedRequests ( false ) ; }

Target:
public static void resetSettings ( ) { if ( ! ( android.autofillservice.cts.Helper.hasAutofillFeature ( ) ) ) return ; android.autofillservice.cts.Helper.runShellCommand ( "settings delete secure %s" , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; }
Source:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon1 , "tick tick tick" , java.lang.System.currentTimeMillis ( ) ) ; n.setLatestEventInfo ( this , "Persistent #1" , "This is a notification!!!" , makeIntent ( ) ) ; mNM.notify ( 1 , n ) ; }

Target:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon2 , "tock tock tock" , java.lang.System.currentTimeMillis ( ) ) ; n.setLatestEventInfo ( this , "Persistent #2" , "Notify me!!!" , makeIntent ( ) ) ; n.defaults = android.app.Notification.DEFAULT_VIBRATE ; mNM.notify ( 2 , n ) ; }
Source:
public boolean setNetworkSelectionModeManual ( int subId , com.android.internal.telephony.OperatorInfo operator , boolean persistSelection ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setNetworkSelectionModeManual ( subId , operator , persistSelection ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual NPE" , 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 java.util.Iterator < E > iterator ( ) { return new java.util.Iterator < E > ( ) { private final java.util.Iterator < ? extends E > i = c.iterator ( ) ; public boolean hasNext ( ) { return i.hasNext ( ) ; } public E next ( ) { return i.next ( ) ; } public void remove ( ) { throw new java.lang.UnsupportedOperationException ( ) ; } } ; }

Target:
public void forEachRemaining ( java.util.function.Consumer < ? super E > action ) { i.forEachRemaining ( action ) ; }
Source:
private int getCallbackAction ( ) { com.android.dialer.common.Assert.checkState ( ( ! ( callDetailsEntries.isEmpty ( ) ) ) ) ; com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry entry = callDetailsEntries.get ( 0 ) ; return com.android.dialer.calllogutils.CallbackActionHelper.getCallbackAction ( contact.getNumber ( ) , entry.getFeatures ( ) , entry.getIsLightbringerCall ( ) ) ; }

Target:
private int getCallbackAction ( ) { com.android.dialer.common.Assert.checkState ( ( ! ( callDetailsEntries.isEmpty ( ) ) ) ) ; com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry entry = callDetailsEntries.get ( 0 ) ; return com.android.dialer.calllogutils.CallbackActionHelper.getCallbackAction ( contact.getNumber ( ) , entry.getFeatures ( ) , entry.getIsDuoCall ( ) ) ; }
Source:
protected synchronized boolean cleanup ( ) { android.util.Log.i ( com.android.bluetooth.hfp.HeadsetService.TAG , "cleanup" ) ; if ( ! ( mCreated ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "cleanup() called before create()" ) ; return true ; } mCreated = false ; return true ; }

Target:
boolean stopVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { final com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { return false ; } int connectionState = stateMachine.getConnectionState ( ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mVoiceRecognitionStarted = false ; stateMachine.sendMessage ( HeadsetStateMachine.VOICE_RECOGNITION_STOP , device ) ; } return true ; }
Source:
public void computeScroll ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { computeScroll ( ) ; } } ) ; return ; } mAwContents.computeScroll ( ) ; }

Target:
public int computeVerticalScrollExtent ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { int ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer call ( ) { return computeVerticalScrollExtent ( ) ; } } ) ; return ret ; } return mAwContents.computeVerticalScrollExtent ( ) ; }
Source:
public void validateCertCredentialWithoutClientPrivateKey ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.certCredential = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; cred.certCredential.certType = "x509v3" ; cred.certCredential.certSha256FingerPrint = java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; cred.clientCertificateChain = new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateUserCredentialWithoutUsername ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithUserCredential ( ) ; cred.getUserCredential ( ) . setUsername ( null ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
private boolean shouldStubAsDefaultMethod ( int access , java.lang.String name , java.lang.String desc ) { return ( com.google.devtools.build.android.desugar.BitFlags.noneSet ( access , ( ( ( ( org.objectweb.asm.Opcodes.ACC_ABSTRACT ) | ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) | ( org.objectweb.asm.Opcodes.ACC_BRIDGE ) ) | ( org.objectweb.asm.Opcodes.ACC_PRIVATE ) ) ) ) && ( ! ( instanceMethods.contains ( ( ( name + ":" ) + desc ) ) ) ) ; }

Target:
private static boolean isNonBridgeDefaultMethod ( int access ) { return com.google.devtools.build.android.desugar.BitFlags.noneSet ( access , ( ( ( ( org.objectweb.asm.Opcodes.ACC_ABSTRACT ) | ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) | ( org.objectweb.asm.Opcodes.ACC_BRIDGE ) ) | ( org.objectweb.asm.Opcodes.ACC_PRIVATE ) ) ) ; }
Source:
public void testCardLoaded ( ) { testPowerOn ( ) ; org.mockito.Mockito.when ( mUiccCard.getCardState ( ) ) . thenReturn ( CardState.CARDSTATE_PRESENT ) ; mIccCardProxyUT.sendMessage ( mIccCardProxyUT.obtainMessage ( com.android.internal.telephony.uicc.IccCardProxyTest.EVENT_ICC_CHANGED ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( com.android.internal.telephony.uicc.IccCardProxyTest.SCARY_SLEEP_MS ) ; org.junit.Assert.assertEquals ( mIccCardProxyUT.getState ( ) , State.NOT_READY ) ; }

Target:
public void testCardLoaded ( ) { testPowerOn ( ) ; org.mockito.Mockito.doReturn ( CardState.CARDSTATE_PRESENT ) . when ( mUiccCard ) . getCardState ( ) ; mIccCardProxyUT.sendMessage ( mIccCardProxyUT.obtainMessage ( com.android.internal.telephony.uicc.IccCardProxyTest.EVENT_ICC_CHANGED ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( com.android.internal.telephony.uicc.IccCardProxyTest.SCARY_SLEEP_MS ) ; org.junit.Assert.assertEquals ( mIccCardProxyUT.getState ( ) , State.NOT_READY ) ; }
Source:
public com.google.common.collect.ImmutableList < java.io.File > getTestedApks ( @ com.android.annotations.NonNull com.android.ide.common.process.ProcessExecutor processExecutor , @ com.android.annotations.Nullable java.io.File splitSelectExe , @ com.android.annotations.NonNull com.android.builder.testing.api.DeviceConfigProvider deviceConfigProvider ) throws com.android.ide.common.process.ProcessException { com.google.common.collect.ImmutableList.Builder < java.io.File > testedApks = com.google.common.collect.ImmutableList.builder ( ) ; testedApks.addAll ( testedConfiguration.getFiles ( ) ) ; return testedApks.build ( ) ; }

Target:
public com.google.common.collect.ImmutableList < java.io.File > getTestedApks ( int density , @ com.android.annotations.Nullable java.lang.String language , @ com.android.annotations.Nullable java.lang.String region , @ com.android.annotations.NonNull java.util.List < java.lang.String > abis ) { com.google.common.collect.ImmutableList.Builder < java.io.File > testedApks = com.google.common.collect.ImmutableList.builder ( ) ; testedApks.addAll ( testedConfiguration.getFiles ( ) ) ; return testedApks.build ( ) ; }
Source:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , final com.google.common.base.Function < ? super I , ? extends O > function ) { return com.google.common.util.concurrent.Futures.transform ( input , function , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , com.google.common.util.concurrent.AsyncFunction < ? super I , ? extends O > function ) { com.google.common.util.concurrent.Futures.ChainingListenableFuture < I , O > output = new com.google.common.util.concurrent.Futures.ChainingListenableFuture < I , O > ( function , input ) ; input.addListener ( output , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; return output ; }
Source:
private boolean isContactShareable ( ) { return ( ( mContactData ) != null ) && ( ! ( mContactData.isDirectoryEntry ( ) ) ) ; }

Target:
private void toggleStar ( android.view.MenuItem starredMenuItem , boolean isStarred ) { com.android.contacts.detail.ContactDisplayUtils.configureStarredMenuItem ( starredMenuItem , mContactData.isDirectoryEntry ( ) , mContactData.isUserProfile ( ) , ( ! isStarred ) ) ; final android.content.Intent intent = com.android.contacts.ContactSaveService.createSetStarredIntent ( this , mContactData.getLookupUri ( ) , ( ! isStarred ) ) ; startService ( intent ) ; final java.lang.CharSequence accessibilityText = ( ! isStarred ) ? getResources ( ) . getText ( R.string.description_action_menu_add_star ) : getResources ( ) . getText ( R.string.description_action_menu_remove_star ) ; mScroller.announceForAccessibility ( accessibilityText ) ; }
Source:
private int calculateContainerSize ( java.io.File apkFile , boolean forwardLocked ) throws java.io.IOException { com.android.internal.content.NativeLibraryHelper.ApkHandle handle = new com.android.internal.content.NativeLibraryHelper.ApkHandle ( apkFile ) ; final int abi = com.android.internal.content.NativeLibraryHelper.findSupportedAbi ( handle , Build.SUPPORTED_ABIS ) ; try { return calculateContainerSize ( handle , apkFile , abi , forwardLocked ) ; } finally { handle.close ( ) ; } }

Target:
private int calculateContainerSize ( java.io.File apkFile , boolean forwardLocked , java.lang.String abiOverride ) throws java.io.IOException { com.android.internal.content.NativeLibraryHelper.ApkHandle handle = new com.android.internal.content.NativeLibraryHelper.ApkHandle ( apkFile ) ; final int abi = com.android.internal.content.NativeLibraryHelper.findSupportedAbi ( handle , ( abiOverride != null ? new java.lang.String [ ] { abiOverride } : android.os.Build.SUPPORTED_ABIS ) ) ; try { return calculateContainerSize ( handle , apkFile , abi , forwardLocked ) ; } finally { handle.close ( ) ; } }
Source:
public java.lang.Object [ ] getElements ( java.lang.Object inputElement ) { synchronized ( this ) { if ( ( ( mSelectedNode ) != null ) && ( inputElement instanceof com.android.hierarchyviewerlib.models.TreeViewModel ) ) { if ( ( mSelectedNode.viewNode.categories.size ( ) ) == 0 ) { return mSelectedNode.viewNode.properties.toArray ( new com.android.hierarchyviewerlib.device.ViewNode.Property [ mSelectedNode.viewNode.properties.size ( ) ] ) ; } else { return mSelectedNode.viewNode.categories.toArray ( new java.lang.String [ mSelectedNode.viewNode.categories.size ( ) ] ) ; } } return new java.lang.Object [ 0 ] ; } }

Target:
public java.lang.Object [ ] getElements ( java.lang.Object inputElement ) { synchronized ( this ) { if ( ( ( mSelectedNode ) != null ) && ( inputElement instanceof com.android.hierarchyviewerlib.models.TreeViewModel ) ) { if ( ( mSelectedNode.viewNode.categories.size ( ) ) == 0 ) { return mSelectedNode.viewNode.properties.toArray ( new com.android.hierarchyviewerlib.models.ViewNode.Property [ mSelectedNode.viewNode.properties.size ( ) ] ) ; } else { return mSelectedNode.viewNode.categories.toArray ( new java.lang.String [ mSelectedNode.viewNode.categories.size ( ) ] ) ; } } return new java.lang.Object [ 0 ] ; } }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.gallery_2 ) ; android.database.Cursor c = getContentResolver ( ) . query ( People.CONTENT_URI , null , null , null , null ) ; startManagingCursor ( c ) ; android.widget.SpinnerAdapter adapter = new android.widget.SimpleCursorAdapter ( this , android.R.layout.simple_gallery_item , c , new java.lang.String [ ] { android.provider.Contacts.People.NAME } , new int [ ] { android.R.id.text1 } ) ; android.widget.Gallery g = ( ( android.widget.Gallery ) ( findViewById ( R.id.gallery ) ) ) ; g.setAdapter ( adapter ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.gallery_2 ) ; android.database.Cursor c = getContentResolver ( ) . query ( Contacts.CONTENT_URI , com.example.android.apis.view.Gallery2.CONTACT_PROJECTION , null , null , null ) ; startManagingCursor ( c ) ; android.widget.SpinnerAdapter adapter = new android.widget.SimpleCursorAdapter ( this , android.R.layout.simple_gallery_item , c , new java.lang.String [ ] { android.provider.ContactsContract.Contacts.DISPLAY_NAME } , new int [ ] { android.R.id.text1 } ) ; android.widget.Gallery g = ( ( android.widget.Gallery ) ( findViewById ( R.id.gallery ) ) ) ; g.setAdapter ( adapter ) ; }
Source:
public UResource.TableSink getOrCreateTableSink ( com.ibm.icu.impl.UResource.Key key ) { int setNum = com.ibm.icu.impl.DayPeriodRules.parseSetNum ( key.toString ( ) ) ; if ( setNum > ( data.maxRuleSetNum ) ) { data.maxRuleSetNum = setNum ; } return null ; }

Target:
public void put ( com.ibm.icu.impl.UResource.Key key , com.ibm.icu.impl.UResource.Value value , boolean noFallback ) { com.ibm.icu.impl.UResource.Table rules = value.getTable ( ) ; for ( int i = 0 ; rules.getKeyAndValue ( i , key , value ) ; ++ i ) { int setNum = com.ibm.icu.impl.DayPeriodRules.parseSetNum ( key.toString ( ) ) ; if ( setNum > ( data.maxRuleSetNum ) ) { data.maxRuleSetNum = setNum ; } } }
Source:
public byte [ ] getOctetString ( ) throws java.io.IOException { if ( ( buffer.read ( ) ) != ( sun.security.util.DerValue.tag_OctetString ) ) throw new java.io.IOException ( "DER input not an octet string" ) ; int length = sun.security.util.DerInputStream.getLength ( buffer ) ; byte [ ] retval = new byte [ length ] ; if ( ( length != 0 ) && ( ( buffer.read ( retval ) ) != length ) ) throw new java.io.IOException ( "short read of DER octet string" ) ; return retval ; }

Target:
public byte [ ] getOctetString ( ) throws java.io.IOException { if ( ( buffer.read ( ) ) != ( sun.security.util.DerValue.tag_OctetString ) ) throw new java.io.IOException ( "DER input not an octet string" ) ; int length = sun.security.util.DerInputStream.getLength ( buffer ) ; byte [ ] retval = new byte [ length ] ; if ( ( length != 0 ) && ( ( buffer.read ( retval ) ) != length ) ) throw new java.io.IOException ( "Short read of DER octet string" ) ; return retval ; }
Source:
private int addDefaultRingtoneItem ( android.widget.ListView listView ) { return addStaticItem ( listView , com.android.internal.R.string.ringtone_default ) ; }

Target:
private int addDefaultRingtoneItem ( android.widget.ListView listView ) { if ( ( mType ) == ( android.media.RingtoneManager.TYPE_NOTIFICATION ) ) { return addStaticItem ( listView , com.android.internal.R.string.notification_sound_default ) ; } else if ( ( mType ) == ( android.media.RingtoneManager.TYPE_ALARM ) ) { return addStaticItem ( listView , com.android.internal.R.string.alarm_sound_default ) ; } return addStaticItem ( listView , com.android.internal.R.string.ringtone_default ) ; }
Source:
private void sendDisplayPinIntent ( byte [ ] address , int pin , int variant ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mRemoteDevices.getDevice ( address ) ) ; if ( pin != 0 ) { intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_KEY , pin ) ; } intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , variant ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.setFlags ( Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND ) ; mAdapterService.sendOrderedBroadcast ( intent , mAdapterService.BLUETOOTH_ADMIN_PERM ) ; }

Target:
private void sendDisplayPinIntent ( byte [ ] address , int pin , int variant ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mRemoteDevices.getDevice ( address ) ) ; if ( pin != 0 ) { intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_KEY , pin ) ; } intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , variant ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.addFlags ( Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND ) ; mAdapterService.sendOrderedBroadcast ( intent , mAdapterService.BLUETOOTH_ADMIN_PERM ) ; }
Source:
public int getCdmaEriIconModeForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getCdmaEriIconModeForSubscriber" ) ) ) { return - 1 ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getCdmaEriIconMode ( ) ; } else { return - 1 ; } }

Target:
public int getCdmaEriIconIndexForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getCdmaEriIconIndexForSubscriber" ) ) ) { return - 1 ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getCdmaEriIconIndex ( ) ; } else { return - 1 ; } }
Source:
public void startTimer ( java.lang.String timerEventName ) { }

Target:
public void stopTimer ( java.lang.String timerEventName ) { com.android.dialer.metrics.StubMetrics.StubTimerEvent stubTimerEvent = namedEvents.remove ( timerEventName ) ; if ( stubTimerEvent == null ) { return ; } com.android.dialer.common.LogUtil.d ( "StubMetrics.stopTimer" , "%s took %dms" , timerEventName , ( ( android.os.SystemClock.elapsedRealtime ( ) ) - ( stubTimerEvent.startTime ) ) ) ; }
Source:
private void replyHalfConnected ( int status ) { android.os.Message msg = mSrcHandler.obtainMessage ( com.android.internal.util.AsyncChannel.CMD_CHANNEL_HALF_CONNECTED ) ; msg.arg1 = status ; msg.obj = this ; msg.replyTo = mDstMessenger ; mSrcHandler.sendMessage ( msg ) ; }

Target:
private void replyHalfConnected ( int status ) { android.os.Message msg = mSrcHandler.obtainMessage ( com.android.internal.util.AsyncChannel.CMD_CHANNEL_HALF_CONNECTED ) ; msg.arg1 = status ; msg.obj = this ; msg.replyTo = mDstMessenger ; if ( ( mConnection ) == null ) { mDeathMonitor = new com.android.internal.util.AsyncChannel.DeathMonitor ( ) ; try { mDstMessenger.getBinder ( ) . linkToDeath ( mDeathMonitor , 0 ) ; } catch ( android.os.RemoteException e ) { mDeathMonitor = null ; msg.arg1 = com.android.internal.util.AsyncChannel.STATUS_BINDING_UNSUCCESSFUL ; } } mSrcHandler.sendMessage ( msg ) ; }
Source:
protected void initializeScriptAndBuffers ( android.graphics.Bitmap inputImage , com.android.rs.test.LayerInfo focalLayer ) { scriptC = new com.android.rs.test.renderscript.ScriptC_layered_filter_fast_f32 ( renderScript ) ; com.android.rs.test.KernelDataForRenderScript.setUseNewRS ( false ) ; int margin = ( com.android.rs.test.KernelDataForRenderScript.getMaxKernelRadius ( ) ) + 1 ; buffers = new com.android.rs.test.f32.ImageBuffersForRenderScriptF32 ( inputImage , margin , renderScript , scriptC ) ; buffers.initializeRenderScript ( focalLayer , scriptC ) ; }

Target:
protected void initializeScriptAndBuffers ( android.graphics.Bitmap inputImage , com.android.rs.refocus.LayerInfo focalLayer ) { scriptC = new com.android.rs.refocus.renderscript.ScriptC_layered_filter_fast_f32 ( renderScript ) ; com.android.rs.refocus.KernelDataForRenderScript.setUseNewRS ( false ) ; int margin = ( com.android.rs.refocus.KernelDataForRenderScript.getMaxKernelRadius ( ) ) + 1 ; buffers = new com.android.rs.refocus.f32.ImageBuffersForRenderScriptF32 ( inputImage , margin , renderScript , scriptC ) ; buffers.initializeRenderScript ( focalLayer , scriptC ) ; }
Source:
public boolean isLeapYear ( long prolepticYear ) { checkCalendarInit ( ) ; int epochMonth = yearToEpochMonth ( ( ( int ) ( prolepticYear ) ) ) ; if ( ( epochMonth < 0 ) || ( epochMonth > ( maxEpochDay ) ) ) { throw new java.time.DateTimeException ( "Hijrah date out of range" ) ; } int len = getYearLength ( ( ( int ) ( prolepticYear ) ) ) ; return len > 354 ; }

Target:
public boolean isLeapYear ( long prolepticYear ) { checkCalendarInit ( ) ; if ( ( prolepticYear < ( getMinimumYear ( ) ) ) || ( prolepticYear > ( getMaximumYear ( ) ) ) ) { return false ; } int len = getYearLength ( ( ( int ) ( prolepticYear ) ) ) ; return len > 354 ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( Intent.ACTION_SCREEN_ON.equals ( intent.getAction ( ) ) ) { mStartButton.setEnabled ( true ) ; } else if ( com.android.cts.verifier.jobscheduler.IdleConstraintTestActivity.ACTION_EXPEDITE_IDLE_MODE.equals ( intent.getAction ( ) ) ) { mStartButton.setEnabled ( false ) ; } else { android.util.Log.e ( com.android.cts.verifier.jobscheduler.IdleConstraintTestActivity.TAG , "Invalid broadcast received, was expecting SCREEN_ON" ) ; } }

Target:
protected void onResume ( ) { super . onResume ( ) ; if ( ( mTestState ) == ( com.android.cts.verifier.jobscheduler.IdleConstraintTestActivity.IDLE_ON_TEST_STATE_NOT_IN_PROGRESS ) ) { mStartButton.setEnabled ( true ) ; mContinueInstructionTextView.setVisibility ( View.GONE ) ; } }
Source:
public void testTimeoutFailure ( ) throws java.lang.Exception { mServer.clearServerReply ( ) ; assertFalse ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 ) ) ; assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; assertEquals ( 0 , mServer.numRepliesSent ( ) ) ; }

Target:
public void testDnsResolutionFailure ( ) throws java.lang.Exception { assertFalse ( mClient.requestTime ( "ntp.server.doesnotexist.example" , 5000 , mNetwork ) ) ; }
Source:
public void test_bind_unresolvedAddress ( ) throws java.io.IOException { java.nio.channels.ServerSocketChannel ssc = java.nio.channels.ServerSocketChannel.open ( ) ; try { ssc.bind ( new java.net.InetSocketAddress ( "unresolvedname" , 31415 ) ) ; fail ( ) ; } catch ( java.nio.channels.UnresolvedAddressException expected ) { } assertNull ( ssc.getLocalAddress ( ) ) ; assertTrue ( ssc.isOpen ( ) ) ; ssc.close ( ) ; }

Target:
public void test_bind_unresolvedAddress ( ) throws java.io.IOException { java.nio.channels.ServerSocketChannel ssc = java.nio.channels.ServerSocketChannel.open ( ) ; try { ssc.socket ( ) . bind ( new java.net.InetSocketAddress ( "unresolvedname" , 31415 ) ) ; fail ( ) ; } catch ( java.net.SocketException expected ) { } assertNull ( ssc.socket ( ) . getLocalSocketAddress ( ) ) ; assertTrue ( ssc.isOpen ( ) ) ; ssc.close ( ) ; }
Source:
public void run ( ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > selectedMessages = getSelectedLogCatMessages ( ) ; if ( ( selectedMessages.size ( ) ) == 0 ) { addNewFilter ( ) ; } else { com.android.ddmuilib.logcat.LogCatMessage m = selectedMessages.get ( 0 ) ; addNewFilter ( m.getTag ( ) , m.getMessage ( ) , m.getPid ( ) , m.getAppName ( ) , m.getLogLevel ( ) ) ; } }

Target:
public void widgetDisposed ( org.eclipse.swt.events.DisposeEvent arg0 ) { dispose ( ) ; }