auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void closeBlockedReaderChannel2 ( java.nio.ByteBuffer targetBuf ) throws java.io.IOException { new java.lang.Thread ( ) { public void run ( ) { try { java.lang.Thread.sleep ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.TIME_UNIT ) ; channel2.close ( ) ; } catch ( java.lang.Exception e ) { } } } . start ( ) ; try { assertTrue ( this . channel2.isBlocking ( ) ) ; this . channel2.read ( targetBuf ) ; fail ( "Should throw AsynchronousCloseException" ) ; } catch ( java.nio.channels.AsynchronousCloseException e ) { } }

Target:
private void closeBlockedReaderChannel2 ( java.nio.ByteBuffer targetBuf ) throws java.io.IOException { assertTrue ( this . channel2.isBlocking ( ) ) ; new java.lang.Thread ( ) { public void run ( ) { try { java.lang.Thread.sleep ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.TIME_UNIT ) ; } catch ( java.lang.InterruptedException ie ) { fail ( ) ; } libcore.io.IoUtils.closeQuietly ( channel2 ) ; } } . start ( ) ; try { this . channel2.read ( targetBuf ) ; fail ( "Should throw AsynchronousCloseException" ) ; } catch ( java.nio.channels.AsynchronousCloseException e ) { } }
Source:
private int grabProcessOutput ( final java.lang.Process process ) throws java.lang.InterruptedException { return com.android.sdklib.util.GrabProcessOutput.grabProcessOutput ( process , Wait.WAIT_FOR_READERS , new com.android.sdklib.util.GrabProcessOutput.IProcessOutput ( ) { @ java.lang.Override public void out ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.info ( line ) ; } } @ java.lang.Override public void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.error ( null , line ) ; } } } ) ; }

Target:
private boolean foundError ( ) { return mFoundError ; }
Source:
public static org.intellij.plugins.intelliLang.inject.PsiElement prevOrParent ( org.intellij.plugins.intelliLang.inject.PsiElement e , org.intellij.plugins.intelliLang.inject.PsiElement scope ) { if ( ( e == null ) || ( e == scope ) ) return null ; org.intellij.plugins.intelliLang.inject.PsiElement prev = e.getPrevSibling ( ) ; if ( prev != null ) return com.intellij.psi.util.PsiTreeUtil.getDeepestLast ( prev ) ; org.intellij.plugins.intelliLang.inject.PsiElement parent = e.getParent ( ) ; return ( parent == scope ) || ( parent instanceof org.intellij.plugins.intelliLang.inject.PsiFile ) ? null : parent ; }

Target:
protected static boolean isWhitespaceCommentOrBlank ( org.intellij.plugins.intelliLang.inject.PsiElement e ) { return ( ( e instanceof org.intellij.plugins.intelliLang.inject.PsiWhiteSpace ) || ( e instanceof org.intellij.plugins.intelliLang.inject.PsiComment ) ) || ( ( e instanceof org.intellij.plugins.intelliLang.inject.PsiLanguageInjectionHost ) && ( com.intellij.openapi.util.text.StringUtil.isEmptyOrSpaces ( e.getText ( ) ) ) ) ; }
Source:
public void testGetHttpMethod_WithHttpMethodAndValidPrefix ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "deleteFoo" , "\"list\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.RestSignatureInspection inspection = new com.google.gct.intellij.endpoints.validation.RestSignatureInspection ( ) ; java.lang.String httpMethod = inspection.getHttpMethod ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "list" , httpMethod ) ; }

Target:
public void testGetHttpMethod_WithHttpMethodAndValidPrefix ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "deleteFoo" , "\"list\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.RestSignatureInspection inspection = new com.google.gct.idea.appengine.validation.RestSignatureInspection ( ) ; java.lang.String httpMethod = inspection.getHttpMethod ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "list" , httpMethod ) ; }
Source:
public void test_getName ( ) throws java.lang.Exception { assertEquals ( "SHA224" , getOidName ( "2.16.840.1.101.3.4.2.4" ) ) ; assertEquals ( "SHA224withDSA" , getOidName ( "2.16.840.1.101.3.4.3.1" ) ) ; assertEquals ( "SHA256withDSA" , getOidName ( "2.16.840.1.101.3.4.3.2" ) ) ; assertEquals ( "SHA224withRSA" , getOidName ( "1.2.840.113549.1.1.14" ) ) ; }

Target:
public void test_getName ( ) throws java.lang.Exception { assertEquals ( "SHA-1" , getOidName ( "1.3.14.3.2.26" ) ) ; assertEquals ( "SHA-224" , getOidName ( "2.16.840.1.101.3.4.2.4" ) ) ; assertEquals ( "SHA-256" , getOidName ( "2.16.840.1.101.3.4.2.1" ) ) ; assertEquals ( "SHA224withDSA" , getOidName ( "2.16.840.1.101.3.4.3.1" ) ) ; assertEquals ( "SHA256withDSA" , getOidName ( "2.16.840.1.101.3.4.3.2" ) ) ; assertEquals ( "SHA224withRSA" , getOidName ( "1.2.840.113549.1.1.14" ) ) ; }
Source:
public int interceptMotionBeforeQueueingWhenScreenOff ( int policyFlags ) { int result = 0 ; final boolean isWakeMotion = ( policyFlags & ( ( android.view.WindowManagerPolicy.FLAG_WAKE ) | ( android.view.WindowManagerPolicy.FLAG_WAKE_DROPPED ) ) ) != 0 ; if ( isWakeMotion ) { if ( ( ( mKeyguardMediator ) != null ) && ( mKeyguardMediator.isShowing ( ) ) ) { mKeyguardMediator.onWakeMotionWhenKeyguardShowingTq ( ) ; } else { result |= ACTION_POKE_USER_ACTIVITY ; } } return result ; }

Target:
public void enableKeyguard ( boolean enabled ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.setKeyguardEnabled ( enabled ) ; } }
Source:
public void copyTo ( byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt8 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyTo ( byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt8 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private com.android.dx.io.Code.CatchHandler [ ] readCatchHandlers ( ) { int baseOffset = position ; int catchHandlersSize = readUleb128 ( ) ; com.android.dx.io.Code.CatchHandler [ ] result = new com.android.dx.io.Code.CatchHandler [ catchHandlersSize ] ; for ( int i = 0 ; i < catchHandlersSize ; i ++ ) { int offset = ( position ) - baseOffset ; result [ i ] = readCatchHandler ( offset ) ; } return result ; }

Target:
private com.android.dex.Code.CatchHandler [ ] readCatchHandlers ( ) { int baseOffset = position ; int catchHandlersSize = readUleb128 ( ) ; com.android.dex.Code.CatchHandler [ ] result = new com.android.dex.Code.CatchHandler [ catchHandlersSize ] ; for ( int i = 0 ; i < catchHandlersSize ; i ++ ) { int offset = ( position ) - baseOffset ; result [ i ] = readCatchHandler ( offset ) ; } return result ; }
Source:
private void testTrace ( java.lang.String traceName , java.lang.String threadName , java.lang.String expectedCallSequence ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( traceName ) ; int threadId = findThreadIdFromName ( threadName , traceData.getThreads ( ) ) ; assertTrue ( java.lang.String.format ( "Thread %s was not found in the trace" , threadName ) , ( threadId > 0 ) ) ; java.util.List < com.android.tools.perflib.vmtrace.Call > calls = traceData.getCalls ( threadId ) ; java.lang.String actual = formatCallStacks ( calls , new com.android.tools.perflib.vmtrace.VmTraceParserTest.CallFormatter ( traceData.getMethods ( ) ) ) ; assertEquals ( expectedCallSequence , actual ) ; }

Target:
private void testTrace ( java.lang.String traceName , java.lang.String threadName , java.lang.String expectedCallSequence ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( traceName ) ; int threadId = findThreadIdFromName ( threadName , traceData.getThreads ( ) ) ; assertTrue ( java.lang.String.format ( "Thread %s was not found in the trace" , threadName ) , ( threadId > 0 ) ) ; com.android.tools.perflib.vmtrace.Call call = traceData.getTopLevelCall ( threadId ) ; java.lang.String actual = call.format ( new com.android.tools.perflib.vmtrace.VmTraceParserTest.CallFormatter ( traceData.getMethods ( ) ) ) ; assertEquals ( expectedCallSequence , actual ) ; }
Source:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) { mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.server.am.ActivityManagerService.this ) { mDidUpdate = true ; } com.android.server.am.ActivityManagerService.writeLastDonePreBootReceivers ( doneReceivers ) ; showBootMessage ( mContext.getText ( R.string.android_upgrading_complete ) , false ) ; systemReady ( goingCallback ) ; } } ) ; }

Target:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky , int sendingUser ) { mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.server.am.ActivityManagerService.this ) { mDidUpdate = true ; } com.android.server.am.ActivityManagerService.writeLastDonePreBootReceivers ( doneReceivers ) ; showBootMessage ( mContext.getText ( R.string.android_upgrading_complete ) , false ) ; systemReady ( goingCallback ) ; } } ) ; }
Source:
public boolean p2pServiceAdd ( android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo ) { if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.serviceAdd ( servInfo ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { for ( java.lang.String s : servInfo.getSupplicantQueryList ( ) ) { java.lang.String command = "P2P_SERVICE_ADD" ; command += " " + s ; if ( ! ( doBooleanCommand ( command ) ) ) { return false ; } } } return true ; } }

Target:
public boolean p2pReinvoke ( int netId , java.lang.String deviceAddress ) { if ( ( android.text.TextUtils.isEmpty ( deviceAddress ) ) || ( netId < 0 ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.reinvoke ( netId , deviceAddress ) ; } else { return doBooleanCommand ( ( ( ( "P2P_INVITE persistent=" + netId ) + " peer=" ) + deviceAddress ) ) ; } }
Source:
public void testBoolean ( ) throws java.lang.Throwable { final int resId = com.android.internal.R.bool.config_annoy_dianne ; assertResource ( resId , true , true ) ; }

Target:
private int [ ] getExpected ( int [ ] no , int [ ] so , int [ ] mo ) { switch ( mMode ) { case com.android.overlaytest.OverlayBaseTest.MODE_NO_OVERLAY : return no ; case com.android.overlaytest.OverlayBaseTest.MODE_SINGLE_OVERLAY : return so ; case com.android.overlaytest.OverlayBaseTest.MODE_MULTIPLE_OVERLAYS : return mo ; default : fail ( "Unknown mode!" ) ; return no ; } }
Source:
private void persistVolume ( android.media.AudioService.VolumeStreamState streamState , int device ) { if ( mUseFixedVolume ) { return ; } java.lang.System.putIntForUser ( mContentResolver , streamState.getSettingNameForDevice ( device ) , ( ( ( streamState.getIndex ( device ) ) + 5 ) / 10 ) , UserHandle.USER_CURRENT ) ; }

Target:
private void persistVolume ( android.media.AudioService.VolumeStreamState streamState , int device ) { if ( mUseFixedVolume ) { return ; } if ( ( isPlatformTelevision ( ) ) && ( ( streamState.mStreamType ) != ( AudioSystem.STREAM_MUSIC ) ) ) { return ; } java.lang.System.putIntForUser ( mContentResolver , streamState.getSettingNameForDevice ( device ) , ( ( ( streamState.getIndex ( device ) ) + 5 ) / 10 ) , UserHandle.USER_CURRENT ) ; }
Source:
public void testTransitions ( ) { setNotificationSwitch ( transition ( com.android.server.connectivity.LingerMonitorTest.WIFI , com.android.server.connectivity.LingerMonitorTest.CELLULAR ) ) ; com.android.server.connectivity.NetworkAgentInfo nai1 = wifiNai ( 100 ) ; com.android.server.connectivity.NetworkAgentInfo nai2 = cellNai ( 101 ) ; assertTrue ( mMonitor.isNotificationEnabled ( nai1 , nai2 ) ) ; assertFalse ( mMonitor.isNotificationEnabled ( nai2 , nai1 ) ) ; }

Target:
public void testTransitions ( ) { setNotificationSwitch ( transition ( com.android.server.connectivity.LingerMonitorTest.WIFI , com.android.server.connectivity.LingerMonitorTest.CELLULAR ) ) ; com.android.server.connectivity.NetworkAgentInfo nai1 = wifiNai ( 100 ) ; com.android.server.connectivity.NetworkAgentInfo nai2 = cellNai ( 101 ) ; org.junit.Assert.assertTrue ( mMonitor.isNotificationEnabled ( nai1 , nai2 ) ) ; org.junit.Assert.assertFalse ( mMonitor.isNotificationEnabled ( nai2 , nai1 ) ) ; }
Source:
public void testCheckReadPhoneNumber_hasPrivilegedPhoneStatePermission ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }

Target:
public void testCheckReadPhoneState_hasCarrierPrivileges ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockTelephony.getCarrierPrivilegeStatusForUid ( org.mockito.ArgumentMatchers.eq ( com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID ) , org.mockito.ArgumentMatchers.eq ( com.android.internal.telephony.TelephonyPermissionsTest.UID ) ) ) . thenReturn ( TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
public void addFooterView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mFooterViewInfos.add ( info ) ; if ( ( mDataSetObserver ) != null ) { mDataSetObserver.onChanged ( ) ; } }

Target:
public boolean removeFooterView ( android.view.View v ) { if ( ( mFooterViewInfos.size ( ) ) > 0 ) { boolean result = false ; if ( ( ( mAdapter ) != null ) && ( ( ( android.widget.HeaderViewListAdapter ) ( mAdapter ) ) . removeFooter ( v ) ) ) { if ( ( mDataSetObserver ) != null ) { mDataSetObserver.onChanged ( ) ; } result = true ; } removeFixedViewInfo ( v , mFooterViewInfos ) ; return result ; } return false ; }
Source:
public void testSendMessage7bit ( ) throws java.lang.Exception { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION ) ; byte [ ] pdu = encodeCellBroadcast ( 0 , 0 , com.android.cellbroadcastreceiver.DialogSmsDisplayTests.DCS_7BIT_ENGLISH , "Hello in GSM 7 bit" ) ; intent.putExtra ( "message" , createFromPdu ( pdu ) ) ; mContext.sendOrderedBroadcast ( intent , "android.permission.RECEIVE_SMS" ) ; }

Target:
public void testSendMessage7bit ( ) throws java.lang.Exception { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION ) ; byte [ ] pdu = encodeCellBroadcast ( 0 , 0 , com.android.cellbroadcastreceiver.DialogSmsDisplayTests.DCS_7BIT_ENGLISH , "Hello in GSM 7 bit" ) ; intent.putExtra ( "message" , createFromPdu ( pdu ) ) ; intent.setPackage ( com.android.cellbroadcastreceiver.DialogSmsDisplayTests.CB_RECEIVER_PKG ) ; mContext.sendOrderedBroadcast ( intent , "android.permission.RECEIVE_SMS" ) ; }
Source:
public boolean setApplicationHidden ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName , boolean hidden ) { throwIfParentInstance ( "setApplicationHidden" ) ; if ( ( mService ) != null ) { try { return mService.setApplicationHidden ( admin , packageName , hidden ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }

Target:
public boolean setApplicationHidden ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName , boolean hidden ) { throwIfParentInstance ( "setApplicationHidden" ) ; if ( ( mService ) != null ) { try { return mService.setApplicationHidden ( admin , mContext.getPackageName ( ) , packageName , hidden ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
private void addMetaToOutputJackLib ( @ javax.annotation.Nonnull com.android.jack.meta.Meta meta , @ javax.annotation.Nonnull com.android.jack.library.OutputJackLibrary ojl ) throws java.io.IOException { com.android.sched.vfs.InputVFile inputFile = meta.getVFile ( ) ; com.android.sched.vfs.VPath path = meta.getPath ( ) ; com.android.sched.vfs.OutputVFile outputFile = ojl.createFile ( FileType.META , path ) ; java.io.InputStream is = null ; try { is = inputFile.getInputStream ( ) ; com.android.sched.util.stream.ByteStreamSucker sucker = new com.android.sched.util.stream.ByteStreamSucker ( is , outputFile.getOutputStream ( ) , true ) ; sucker.suck ( ) ; } finally { if ( is != null ) { is.close ( ) ; } } }

Target:
private void addMetaToOutputJackLib ( @ javax.annotation.Nonnull com.android.jack.meta.Meta meta , @ javax.annotation.Nonnull com.android.jack.library.OutputJackLibrary ojl ) throws java.io.IOException { com.android.sched.vfs.InputVFile inputFile = meta.getVFile ( ) ; com.android.sched.vfs.VPath path = meta.getPath ( ) ; com.android.sched.vfs.OutputVFile outputFile = ojl.createFile ( FileType.META , path ) ; outputFile.copy ( inputFile ) ; }
Source:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testApplyingWithAbsentOptionalFile ( ) throws java.lang.Exception { com.intellij.openapi.util.io.FileUtil.writeToFile ( new java.io.File ( myNewerDir , "bin/idea.bat" ) , "new content" . getBytes ( ) ) ; myPatchSpec.setOptionalFiles ( java.util.Collections.singletonList ( "bin/idea.bat" ) ) ; com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertTrue ( preparationResult.validationResults.isEmpty ( ) ) ; assertAppliedAndRevertedCorrectly ( patch , preparationResult ) ; }
Source:
public void run ( ) { pair.listener.terminated ( from ) ; }

Target:
private void terminated ( final com.google.common.util.concurrent.Service.State from ) { switch ( from ) { case NEW : com.google.common.util.concurrent.AbstractService.TERMINATED_FROM_NEW_CALLBACK.enqueueOn ( listeners ) ; break ; case RUNNING : com.google.common.util.concurrent.AbstractService.TERMINATED_FROM_RUNNING_CALLBACK.enqueueOn ( listeners ) ; break ; case STOPPING : com.google.common.util.concurrent.AbstractService.TERMINATED_FROM_STOPPING_CALLBACK.enqueueOn ( listeners ) ; break ; case STARTING : case TERMINATED : case FAILED : default : throw new java.lang.AssertionError ( ) ; } }
Source:
public static com.android.dialer.calllog.model.CoalescedRow.Builder builder ( ) { return new com.android.dialer.calllog.model.AutoValue_CoalescedRow.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setPhotoId ( 0 ) . setIsRead ( false ) . setIsNew ( false ) . setPhoneAccountColor ( 0 ) . setFeatures ( 0 ) . setIsBusiness ( false ) . setIsVoicemail ( false ) . setCallType ( 0 ) . setCoalescedIds ( com.android.dialer.CoalescedIds.getDefaultInstance ( ) ) ; }

Target:
public static com.android.dialer.calllog.model.CoalescedRow.Builder builder ( ) { return new com.android.dialer.calllog.model.AutoValue_CoalescedRow.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setPhotoId ( 0 ) . setIsRead ( false ) . setIsNew ( false ) . setPhoneAccountColor ( 0 ) . setFeatures ( 0 ) . setIsBusiness ( false ) . setIsVoicemail ( false ) . setCallType ( 0 ) . setCanReportAsInvalidNumber ( false ) . setCoalescedIds ( com.android.dialer.CoalescedIds.getDefaultInstance ( ) ) ; }
Source:
public void testImsServiceDownSentCompatInitializing ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsService.mSpyMMTelFeature.sendSetFeatureState ( ImsFeature.STATE_INITIALIZING ) ; org.mockito.ArgumentCaptor < android.content.Intent > intentCaptor = org.mockito.ArgumentCaptor.forClass ( android.content.Intent.class ) ; org.mockito.Mockito.verify ( mMockContext ) . sendBroadcast ( intentCaptor.capture ( ) ) ; try { junit.framework.Assert.assertNotNull ( intentCaptor.getValue ( ) ) ; verifyServiceDownSent ( intentCaptor.getValue ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { junit.framework.Assert.fail ( "Did not receive all intents" ) ; } }

Target:
public void testImsServiceDownSentCompatInitializing ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMmTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsService.mSpyMmTelFeature.sendSetFeatureState ( ImsFeature.STATE_INITIALIZING ) ; org.mockito.ArgumentCaptor < android.content.Intent > intentCaptor = org.mockito.ArgumentCaptor.forClass ( android.content.Intent.class ) ; org.mockito.Mockito.verify ( mMockContext ) . sendBroadcast ( intentCaptor.capture ( ) ) ; try { junit.framework.Assert.assertNotNull ( intentCaptor.getValue ( ) ) ; verifyServiceDownSent ( intentCaptor.getValue ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { junit.framework.Assert.fail ( "Did not receive all intents" ) ; } }
Source:
public void TestSingular01Locales ( ) { java.lang.String localeIDs = "ff,fr,kab,gu,mr,pa,pt,zu,bn" ; java.lang.String testPattern = "one{one} other{other}" ; java.util.Map changes = new java.util.HashMap ( ) ; changes.put ( new java.lang.Integer ( 0 ) , "one" ) ; changes.put ( new java.lang.Integer ( 2 ) , "other" ) ; helperTestRules ( localeIDs , testPattern , changes ) ; }

Target:
public void TestSingular01Locales ( ) { java.lang.String localeIDs = "ff,fr,kab,gu,mr,pa,pt,pt_PT,zu,bn" ; java.lang.String testPattern = "one{one} other{other}" ; java.util.Map changes = new java.util.HashMap ( ) ; changes.put ( new java.lang.Integer ( 0 ) , "one" ) ; changes.put ( new java.lang.Integer ( 2 ) , "other" ) ; helperTestRules ( localeIDs , testPattern , changes ) ; }
Source:
public java.lang.Object getParent ( java.lang.Object element ) { if ( element instanceof com.android.sdkuilib.internal.repository.core.PkgItem ) { java.lang.Object input = mViewer.getInput ( ) ; if ( input != null ) { for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : ( ( java.util.List < com.android.sdkuilib.internal.repository.core.PkgCategory > ) ( input ) ) ) { if ( cat.getItems ( ) . contains ( element ) ) { return cat ; } } } } return null ; }

Target:
public java.lang.Object getParent ( java.lang.Object element ) { if ( element instanceof com.android.sdklib.internal.repository.updater.PkgItem ) { java.lang.Object input = mViewer.getInput ( ) ; if ( input != null ) { for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : ( ( java.util.List < com.android.sdkuilib.internal.repository.core.PkgCategory > ) ( input ) ) ) { if ( cat.getItems ( ) . contains ( element ) ) { return cat ; } } } } return null ; }
Source:
protected boolean canDoTreeUp ( org.eclipse.jface.viewers.ISelection selection ) { if ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > selected = filterSelection ( ( ( org.eclipse.jface.viewers.ITreeSelection ) ( selection ) ) ) ; return mUiTreeActions.canDoUp ( selected ) ; } return false ; }

Target:
protected boolean canDoTreeUp ( org.eclipse.jface.viewers.ISelection selection ) { if ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > selected = filterSelection ( ( ( org.eclipse.jface.viewers.ITreeSelection ) ( selection ) ) ) ; return mUiTreeActions.canDoUp ( selected , mDescriptorFilters ) ; } return false ; }
Source:
public void enter ( ) { mPhone.mCi.registerForRilConnected ( getHandler ( ) , DataConnection.EVENT_RIL_CONNECTED , null ) ; mPhone.mCi.registerForDataCallListChanged ( getHandler ( ) , DataConnection.EVENT_DATA_STATE_CHANGED , null ) ; if ( android.os.Build.IS_DEBUGGABLE ) { mDcTesterDeactivateAll = new com.android.internal.telephony.dataconnection.DcTesterDeactivateAll ( mPhone , this , getHandler ( ) ) ; } }

Target:
public void enter ( ) { mPhone.mCi.registerForRilConnected ( getHandler ( ) , DataConnection.EVENT_RIL_CONNECTED , null ) ; mPhone.mCi.registerForDataCallListChanged ( getHandler ( ) , DataConnection.EVENT_DATA_STATE_CHANGED , null ) ; if ( android.os.Build.IS_DEBUGGABLE ) { mDcTesterDeactivateAll = new com.android.internal.telephony.dataconnection.DcTesterDeactivateAll ( mPhone , this , getHandler ( ) ) ; } if ( ( mNetworkPolicyManager ) != null ) { mNetworkPolicyManager.registerListener ( mListener ) ; } }
Source:
public void callOnChildSelected ( com.android.ide.eclipse.adt.editors.layout.gscripts.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy parentNode , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy childNode ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( parentNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onChildSelected ( gc , parentNode , childNode ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onChildSelected() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }

Target:
public void callOnChildSelected ( com.android.ide.common.api.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy parentNode , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy childNode ) { com.android.ide.common.api.IViewRule rule = loadRule ( parentNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onChildSelected ( gc , parentNode , childNode ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onChildSelected() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }
Source:
private void doStop ( ) { if ( ! ( mProfileStarted ) ) { android.util.Log.w ( mName , "doStop() called, but the profile is not running." ) ; } mProfileStarted = false ; if ( ( mAdapterService ) != null ) { mAdapterService.onProfileServiceStateChanged ( this , BluetoothAdapter.STATE_OFF ) ; } if ( ! ( stop ( ) ) ) { android.util.Log.e ( mName , "Unable to stop profile" ) ; } if ( ( mUserSwitchedReceiver ) != null ) { getApplicationContext ( ) . unregisterReceiver ( mUserSwitchedReceiver ) ; mUserSwitchedReceiver = null ; } stopSelf ( ) ; }

Target:
private void doStop ( ) { if ( ! ( mProfileStarted ) ) { android.util.Log.w ( mName , "doStop() called, but the profile is not running." ) ; } mProfileStarted = false ; if ( ( mAdapterService ) != null ) { mAdapterService.onProfileServiceStateChanged ( getClass ( ) . getName ( ) , BluetoothAdapter.STATE_OFF ) ; } if ( ! ( stop ( ) ) ) { android.util.Log.e ( mName , "Unable to stop profile" ) ; } if ( ( mUserSwitchedReceiver ) != null ) { getApplicationContext ( ) . unregisterReceiver ( mUserSwitchedReceiver ) ; mUserSwitchedReceiver = null ; } stopSelf ( ) ; }
Source:
public static < T extends android.content.ContentProvider > T providerWithRenamedContext ( java.lang.Class < T > contentProvider , android.content.Context c , java.lang.String filePrefix , boolean allowAccessToExistingFilesAndDbs ) throws java.lang.IllegalAccessException , java.lang.InstantiationException { java.lang.Class < T > mProviderClass = contentProvider ; T mProvider = mProviderClass.newInstance ( ) ; android.test.RenamingDelegatingContext mContext = new android.test.RenamingDelegatingContext ( c , filePrefix ) ; if ( allowAccessToExistingFilesAndDbs ) { mContext.makeExistingFilesAndDbsAccessible ( ) ; } mProvider.attachInfoForTesting ( mContext , null ) ; return mProvider ; }

Target:
public static < T extends android.content.ContentProvider > T providerWithRenamedContext ( java.lang.Class < T > contentProvider , android.content.Context c , java.lang.String filePrefix , boolean allowAccessToExistingFilesAndDbs ) throws java.lang.IllegalAccessException , java.lang.InstantiationException { java.lang.Class < T > mProviderClass = contentProvider ; T mProvider = mProviderClass.newInstance ( ) ; android.test.RenamingDelegatingContext mContext = new android.test.RenamingDelegatingContext ( c , filePrefix ) ; if ( allowAccessToExistingFilesAndDbs ) { mContext.makeExistingFilesAndDbsAccessible ( ) ; } android.test.mock.MockContentProvider.attachInfoForTesting ( mProvider , mContext , null ) ; return mProvider ; }
Source:
private void updateAnimation ( ) { boolean shouldAnimate = ( ( mState ) == ( com.android.systemui.statusbar.phone.SignalDrawable.STATE_CARRIER_CHANGE ) ) && ( mVisible ) ; if ( shouldAnimate == ( mAnimating ) ) return ; mAnimating = shouldAnimate ; if ( shouldAnimate ) { mChangeDot.run ( ) ; } else { mHandler.removeCallbacks ( mChangeDot ) ; } }

Target:
private void updateAnimation ( ) { boolean shouldAnimate = ( ( mState ) == ( com.android.settingslib.graph.SignalDrawable.STATE_CARRIER_CHANGE ) ) && ( mVisible ) ; if ( shouldAnimate == ( mAnimating ) ) return ; mAnimating = shouldAnimate ; if ( shouldAnimate ) { mChangeDot.run ( ) ; } else { mHandler.removeCallbacks ( mChangeDot ) ; } }
Source:
public static com.android.newbubble.NewBubbleInfo.Action.Builder from ( @ android.support.annotation.NonNull com.android.newbubble.NewBubbleInfo.Action action ) { return com.android.newbubble.NewBubbleInfo.Action.builder ( ) . setIntent ( action.getIntent ( ) ) . setChecked ( action.isChecked ( ) ) . setEnabled ( action.isEnabled ( ) ) . setName ( action.getName ( ) ) . setIconDrawable ( action.getIconDrawable ( ) ) ; }

Target:
public static com.android.newbubble.NewBubbleInfo.Action.Builder from ( @ android.support.annotation.NonNull com.android.newbubble.NewBubbleInfo.Action action ) { return com.android.newbubble.NewBubbleInfo.Action.builder ( ) . setIntent ( action.getIntent ( ) ) . setChecked ( action.isChecked ( ) ) . setCheckable ( action.isCheckable ( ) ) . setName ( action.getName ( ) ) . setIconDrawable ( action.getIconDrawable ( ) ) ; }
Source:
public void testBasicWorkingSntpClientQuery ( ) throws java.lang.Exception { mServer.setServerReply ( libcore.util.HexEncoding.decode ( android.net.SntpClientTest.WORKING_VERSION4.toCharArray ( ) , false ) ) ; assertTrue ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 ) ) ; assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; assertEquals ( 1 , mServer.numRepliesSent ( ) ) ; }

Target:
public void testIgnoreLeapNoSync ( ) throws java.lang.Exception { final byte [ ] reply = libcore.util.HexEncoding.decode ( android.net.SntpClientTest.WORKING_VERSION4.toCharArray ( ) , false ) ; reply [ 0 ] |= ( ( byte ) ( 192 ) ) ; mServer.setServerReply ( reply ) ; assertFalse ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 , mNetwork ) ) ; assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; assertEquals ( 1 , mServer.numRepliesSent ( ) ) ; }
Source:
public void testAPInterfaceFailedWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testSwitchModeWhenSoftApActiveMode ( ) throws java.lang.Exception { enterSoftApActiveMode ( ) ; mWifiStateMachinePrime.enterClientMode ( ) ; mLooper.dispatchAll ( ) ; verify ( mSoftApManager ) . stop ( ) ; verify ( mWificond ) . tearDownInterfaces ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.CLIENT_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }
Source:
private static < K , V > java.util.Set < java.util.Map.Entry < K , java.util.Collection < V > > > unmodifiableAsMapEntries ( java.util.Set < java.util.Map.Entry < K , java.util.Collection < V > > > asMapEntries ) { return new com.google.common.collect.Multimaps.UnmodifiableAsMapEntries < K , V > ( java.util.Collections.unmodifiableSet ( asMapEntries ) ) ; }

Target:
public static < K , V > java.util.Map < K , java.util.Set < V > > asMap ( com.google.common.collect.SetMultimap < K , V > multimap ) { return ( ( java.util.Map < K , java.util.Set < V > > ) ( ( java.util.Map < K , ? > ) ( multimap.asMap ( ) ) ) ) ; }
Source:
public void write ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode jNode ) throws java.io.IOException { com.android.jack.jayce.v0002.io.ImportHelper importHelper = new com.android.jack.jayce.v0002.io.ImportHelper ( new com.android.jack.jayce.v0002.NodeFactory ( ) ) ; com.android.sched.util.log.Event event = com.android.jack.jayce.v0002.io.JayceInternalWriterImpl.tracer.start ( JackEventType.JNODE_TO_NNODE_CONVERSION ) ; com.android.jack.jayce.v0002.NNode nNode ; try { nNode = importHelper.load ( jNode ) ; } finally { event.end ( ) ; } writeNode ( nNode ) ; }

Target:
public void write ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode jNode ) throws java.io.IOException { com.android.sched.util.log.Event eventWriting = com.android.jack.jayce.v0002.io.JayceInternalWriterImpl.tracer.start ( JackEventType.NNODE_WRITING ) ; try { com.android.jack.jayce.v0002.io.ImportHelper importHelper = new com.android.jack.jayce.v0002.io.ImportHelper ( new com.android.jack.jayce.v0002.NodeFactory ( ) ) ; com.android.sched.util.log.Event eventConvert = com.android.jack.jayce.v0002.io.JayceInternalWriterImpl.tracer.start ( JackEventType.JNODE_TO_NNODE_CONVERSION ) ; com.android.jack.jayce.v0002.NNode nNode ; try { nNode = importHelper.load ( jNode ) ; } finally { eventConvert.end ( ) ; } writeNode ( nNode ) ; } finally { eventWriting.end ( ) ; } }
Source:
public java.util.List < com.android.sdklib.devices.Device > getUserDevices ( ) { synchronized ( this ) { if ( ( mUserDevices ) == null ) { mUserDevices = new java.util.ArrayList < com.android.sdklib.devices.Device > ( ) ; try { java.io.File userDevicesFile = new java.io.File ( com.android.prefs.AndroidLocation.getFolder ( ) , com.android.sdklib.SdkConstants.FN_DEVICES_XML ) ; mUserDevices.addAll ( loadDevices ( userDevicesFile ) ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { mLog.warning ( "Couldn't load user devices: %1$" , e.getMessage ( ) ) ; } } } return mUserDevices ; }

Target:
private java.util.List < com.android.sdklib.devices.Device > getDefaultDevices ( ) { synchronized ( this ) { if ( ( mDefaultDevices ) == null ) { try { mDefaultDevices = com.android.sdklib.devices.DeviceParser.parse ( com.android.sdklib.devices.DeviceManager.class . getResourceAsStream ( SdkConstants.FN_DEVICES_XML ) ) ; } catch ( java.lang.IllegalStateException e ) { mLog.error ( e , null ) ; mDefaultDevices = new java.util.ArrayList < com.android.sdklib.devices.Device > ( ) ; } catch ( java.lang.Exception e ) { mLog.error ( null , "Error reading default devices" ) ; mDefaultDevices = new java.util.ArrayList < com.android.sdklib.devices.Device > ( ) ; } } } return mDefaultDevices ; }
Source:
public boolean inDaylightTime ( java.util.Date time ) { long when = time.getTime ( ) ; long unix = when / 1000 ; int transition = java.util.Arrays.binarySearch ( mTransitions , unix ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return false ; } } return ( mIsDsts [ ( ( mTypes [ transition ] ) & 255 ) ] ) == 1 ; }

Target:
public boolean inDaylightTime ( java.util.Date time ) { long when = time.getTime ( ) ; int offsetIndex = findOffsetIndexForTimeInMilliseconds ( when ) ; if ( offsetIndex == ( - 1 ) ) { return false ; } return ( mIsDsts [ offsetIndex ] ) == 1 ; }
Source:
public void visitClass ( com.google.gct.intellij.endpoints.validation.PsiClass aClass ) { if ( ! ( isEndpointClass ( aClass ) ) ) { return ; } com.google.gct.intellij.endpoints.validation.PsiMethod [ ] allMethods = aClass.getMethods ( ) ; java.util.Map < java.lang.String , com.google.gct.intellij.endpoints.validation.PsiMethod > restfulSignatures = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.google.gct.intellij.endpoints.validation.PsiMethod aMethod : allMethods ) { validateRestSignatureUnique ( aMethod , restfulSignatures ) ; } }

Target:
public void visitClass ( com.google.gct.idea.appengine.validation.PsiClass aClass ) { if ( ! ( isEndpointClass ( aClass ) ) ) { return ; } com.google.gct.idea.appengine.validation.PsiMethod [ ] allMethods = aClass.getMethods ( ) ; java.util.Map < java.lang.String , com.google.gct.idea.appengine.validation.PsiMethod > restfulSignatures = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.google.gct.idea.appengine.validation.PsiMethod aMethod : allMethods ) { validateRestSignatureUnique ( aMethod , restfulSignatures ) ; } }
Source:
public void addGeneratedSourceFolders ( @ com.android.annotations.NonNull org.gradle.api.Task task , @ com.android.annotations.NonNull java.lang.Iterable < java.io.File > generatedSourceFolders ) { if ( ( extraGeneratedSourceFolders ) == null ) { extraGeneratedSourceFolders = com.google.common.collect.Lists.newArrayList ( ) ; } javaCompileTask.dependsOn ( task ) ; for ( java.io.File f : generatedSourceFolders ) { extraGeneratedSourceFolders.add ( f ) ; javaCompileTask.source ( f ) ; } }

Target:
public void addJavaSourceFoldersToModel ( @ com.android.annotations.NonNull java.io.File ... generatedSourceFolders ) { java.util.Collections.addAll ( extraGeneratedSourceFolders , generatedSourceFolders ) ; }
Source:
public void testStrategyEscaping ( ) throws java.lang.Exception { final android.support.v4.content.FileProvider.SimplePathStrategy strat = new android.support.v4.content.FileProvider.SimplePathStrategy ( "authority" ) ; strat.addRoot ( "t/g" , mContext.getFilesDir ( ) ) ; java.io.File file = android.support.v4.content.FileProviderTest.buildPath ( mContext.getFilesDir ( ) , "lol\"wat?foo&bar" , "wat.txt" ) ; final java.lang.String expected = "content://authority/t%2Fg/lol%22wat%3Ffoo%26bar/wat.txt" ; assertEquals ( expected , strat.getUriForFile ( file ) . toString ( ) ) ; assertEquals ( file.getPath ( ) , strat.getFileForUri ( android.net.Uri.parse ( expected ) ) . getPath ( ) ) ; }

Target:
public void testStrategyEscaping ( ) throws java.lang.Exception { final android.support.v4.content.FileProvider.SimplePathStrategy strat = new android.support.v4.content.FileProvider.SimplePathStrategy ( "authority" ) ; strat.addRoot ( "t/g" , mContext.getFilesDir ( ) ) ; java.io.File expectedRoot = mContext.getFilesDir ( ) . getCanonicalFile ( ) ; java.io.File file = android.support.v4.content.FileProviderTest.buildPath ( expectedRoot , "lol\"wat?foo&bar" , "wat.txt" ) ; final java.lang.String expected = "content://authority/t%2Fg/lol%22wat%3Ffoo%26bar/wat.txt" ; assertEquals ( expected , strat.getUriForFile ( file ) . toString ( ) ) ; assertEquals ( file.getPath ( ) , strat.getFileForUri ( android.net.Uri.parse ( expected ) ) . getPath ( ) ) ; }
Source:
private java.lang.String getStringRepresentation ( com.google.gct.testing.GoogleCloudTestingDimension dimension ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; sb.append ( dimension.getId ( ) ) ; for ( com.google.gct.testing.CloudTestingType type : dimension.getEnabledTypes ( ) ) { sb.append ( type.getId ( ) ) ; } return sb.toString ( ) ; }

Target:
private java.lang.String getStringRepresentation ( com.google.gct.testing.CloudConfigurationDimension dimension ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; sb.append ( dimension.getId ( ) ) ; for ( com.google.gct.testing.CloudTestingType type : dimension.getEnabledTypes ( ) ) { sb.append ( type.getId ( ) ) ; } return sb.toString ( ) ; }
Source:
public void testAesCbcHmacSha384Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacMd5Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public java.lang.String getNetworkBSSID ( android.net.wifi.WifiConfiguration config ) { if ( ( config == null ) || ( ( ( config.networkId ) == ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) && ( ( config.SSID ) == null ) ) ) { return null ; } if ( mVerboseLoggingEnabled ) localLog ( ( "getNetworkBSSID: " + ( config.networkId ) ) ) ; java.lang.String bssid = mWifiNative.getNetworkVariable ( config.networkId , WifiConfiguration.bssidVarName ) ; return android.text.TextUtils.isEmpty ( bssid ) ? null : bssid ; }

Target:
public boolean setConfiguredNetworkBSSID ( java.lang.String bssid ) { if ( mVerboseLoggingEnabled ) localLog ( ( "setConfiguredNetworkBSSID: " + ( mSupplicantNetworkId ) ) ) ; if ( ! ( mWifiNative.setNetworkVariable ( mSupplicantNetworkId , WifiConfiguration.bssidVarName , bssid ) ) ) { loge ( ( "Set BSSID of network in wpa_supplicant failed on " + ( mSupplicantNetworkId ) ) ) ; return false ; } return true ; }
Source:
boolean verify ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , java.lang.String candidate , com.google.i18n.phonenumbers.PhoneNumberUtil util ) { if ( ( ! ( util.isValidNumber ( number ) ) ) || ( ! ( com.google.i18n.phonenumbers.PhoneNumberMatcher.containsOnlyValidXChars ( number , candidate , util ) ) ) ) { return false ; } return com.google.i18n.phonenumbers.PhoneNumberMatcher.isNationalPrefixPresentIfRequired ( number , util ) ; }

Target:
boolean verify ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , java.lang.CharSequence candidate , com.google.i18n.phonenumbers.PhoneNumberUtil util ) { if ( ( ! ( util.isValidNumber ( number ) ) ) || ( ! ( com.google.i18n.phonenumbers.PhoneNumberMatcher.containsOnlyValidXChars ( number , candidate.toString ( ) , util ) ) ) ) { return false ; } return com.google.i18n.phonenumbers.PhoneNumberMatcher.isNationalPrefixPresentIfRequired ( number , util ) ; }
Source:
public boolean postDelayed ( java.lang.Runnable action , long delayMillis ) { android.os.Handler handler ; if ( ( mAttachInfo ) != null ) { handler = mAttachInfo.mHandler ; } else { android.view.ViewRoot.getRunQueue ( ) . postDelayed ( action , delayMillis ) ; return true ; } return handler.postDelayed ( action , delayMillis ) ; }

Target:
public boolean post ( java.lang.Runnable action ) { android.os.Handler handler ; android.view.View.AttachInfo attachInfo = mAttachInfo ; if ( attachInfo != null ) { handler = attachInfo.mHandler ; } else { android.view.ViewRootImpl.getRunQueue ( ) . post ( action ) ; return true ; } return handler.post ( action ) ; }
Source:
public void onVoiceButtonClicked ( com.android.dialer.main.impl.VoiceSearchResultCallback voiceSearchResultCallback ) { com.android.dialer.logging.Logger.get ( mainActivity ) . logImpression ( DialerImpression.Type.NUI_CLICK_SEARCH_BAR_VOICE_BUTTON ) ; try { android.content.Intent voiceIntent = new android.content.Intent ( android.speech.RecognizerIntent.ACTION_RECOGNIZE_SPEECH ) ; mainActivity.startActivityForResult ( voiceIntent , ActivityRequestCodes.DIALTACTS_VOICE_SEARCH ) ; } catch ( android.content.ActivityNotFoundException e ) { android.widget.Toast.makeText ( mainActivity , R.string.voice_search_not_available , Toast.LENGTH_SHORT ) . show ( ) ; } }

Target:
public void onVoiceButtonClicked ( com.android.dialer.main.impl.VoiceSearchResultCallback voiceSearchResultCallback ) { com.android.dialer.logging.Logger.get ( mainActivity ) . logImpression ( DialerImpression.Type.MAIN_CLICK_SEARCH_BAR_VOICE_BUTTON ) ; try { android.content.Intent voiceIntent = new android.content.Intent ( android.speech.RecognizerIntent.ACTION_RECOGNIZE_SPEECH ) ; mainActivity.startActivityForResult ( voiceIntent , ActivityRequestCodes.DIALTACTS_VOICE_SEARCH ) ; } catch ( android.content.ActivityNotFoundException e ) { android.widget.Toast.makeText ( mainActivity , R.string.voice_search_not_available , Toast.LENGTH_SHORT ) . show ( ) ; } }
Source:
private void reportResumedActivityLocked ( com.android.server.am.HistoryRecord r ) { final int identHash = java.lang.System.identityHashCode ( r ) ; updateUsageStats ( r , true ) ; int i = mWatchers.beginBroadcast ( ) ; while ( i > 0 ) { i -- ; android.app.IActivityWatcher w = mWatchers.getBroadcastItem ( i ) ; if ( w != null ) { try { w.activityResuming ( identHash ) ; } catch ( android.os.RemoteException e ) { } } } mWatchers.finishBroadcast ( ) ; }

Target:
void reportResumedActivityLocked ( com.android.server.am.ActivityRecord r ) { final int identHash = java.lang.System.identityHashCode ( r ) ; updateUsageStats ( r , true ) ; int i = mWatchers.beginBroadcast ( ) ; while ( i > 0 ) { i -- ; android.app.IActivityWatcher w = mWatchers.getBroadcastItem ( i ) ; if ( w != null ) { try { w.activityResuming ( identHash ) ; } catch ( android.os.RemoteException e ) { } } } mWatchers.finishBroadcast ( ) ; }