auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static int julianDay ( java.util.Calendar c ) { long utcMs = ( ( c.getTimeInMillis ( ) ) + ( c.get ( java.util.Calendar.ZONE_OFFSET ) ) ) + ( c.get ( java.util.Calendar.DST_OFFSET ) ) ; return ( ( int ) ( utcMs / ( libcore.icu.DateIntervalFormat.DAY_IN_MS ) ) ) + ( libcore.icu.DateIntervalFormat.EPOCH_JULIAN_DAY ) ; }

Target:
static com.ibm.icu.util.Calendar createIcuCalendar ( java.util.TimeZone icuTimeZone , com.ibm.icu.util.ULocale icuLocale , long timeInMillis ) { com.ibm.icu.util.Calendar calendar = new com.ibm.icu.util.GregorianCalendar ( icuTimeZone , icuLocale ) ; calendar.setTimeInMillis ( timeInMillis ) ; return calendar ; }
Source:
public static byte [ ] toByteArray ( com.google.common.io.InputSupplier < ? extends java.io.InputStream > supplier ) throws java.io.IOException { boolean threw = true ; java.io.InputStream in = supplier.getInput ( ) ; try { byte [ ] result = com.google.common.io.ByteStreams.toByteArray ( in ) ; threw = false ; return result ; } finally { com.google.common.io.Closeables.close ( in , threw ) ; } }

Target:
public void write ( byte [ ] b ) { com.google.common.base.Preconditions.checkNotNull ( b ) ; }
Source:
public java.lang.String getImei ( int slotId ) { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; try { return telephony.getImeiForSlot ( slotId , getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getDeviceSoftwareVersion ( int slotIndex ) { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; try { return telephony.getDeviceSoftwareVersionForSlot ( slotIndex , getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
com.android.internal.telephony.Connection dial ( java.lang.String originalNumber ) throws android.net.sip.SipException { java.lang.String calleeSipUri = originalNumber ; if ( ! ( calleeSipUri.contains ( "@" ) ) ) { calleeSipUri = mProfile.getUriString ( ) . replaceFirst ( ( ( mProfile.getUserName ( ) ) + "@" ) , ( calleeSipUri + "@" ) ) ; } try { android.net.sip.SipProfile callee = new android.net.sip.SipProfile.Builder ( calleeSipUri ) . build ( ) ; com.android.internal.telephony.sip.SipPhone.SipConnection c = new com.android.internal.telephony.sip.SipPhone.SipConnection ( this , callee , originalNumber ) ; c.dial ( ) ; connections.add ( c ) ; setState ( Call.State.DIALING ) ; return c ; } catch ( java.text.ParseException e ) { throw new android.net.sip.SipException ( "dial" , e ) ; } }

Target:
com.android.internal.telephony.Connection dial ( java.lang.String originalNumber ) throws android.net.sip.SipException { java.lang.String calleeSipUri = originalNumber ; if ( ! ( calleeSipUri.contains ( "@" ) ) ) { java.lang.String replaceStr = java.util.regex.Pattern.quote ( ( ( mProfile.getUserName ( ) ) + "@" ) ) ; calleeSipUri = mProfile.getUriString ( ) . replaceFirst ( replaceStr , ( calleeSipUri + "@" ) ) ; } try { android.net.sip.SipProfile callee = new android.net.sip.SipProfile.Builder ( calleeSipUri ) . build ( ) ; com.android.internal.telephony.sip.SipPhone.SipConnection c = new com.android.internal.telephony.sip.SipPhone.SipConnection ( this , callee , originalNumber ) ; c.dial ( ) ; connections.add ( c ) ; setState ( Call.State.DIALING ) ; return c ; } catch ( java.text.ParseException e ) { throw new android.net.sip.SipException ( "dial" , e ) ; } }
Source:
public void onClick ( android.content.DialogInterface dialog , int which ) { clearRemainingState ( test ) ; setTestResult ( test , com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.TestResult.Failed ) ; }

Target:
public void onClick ( android.view.View v ) { try { this . startActivity ( test.getManualTestIntent ( ) ) ; } catch ( android.content.ActivityNotFoundException e ) { android.widget.Toast.makeText ( this , ( "Cannot start " + ( test.getManualTestIntent ( ) ) ) , Toast.LENGTH_LONG ) . show ( ) ; setTestResult ( test , com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.TestResult.Failed ) ; dialog.dismiss ( ) ; } }
Source:
protected void resumeDebuggee ( ) { org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket packet = new org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket ( JDWPCommands.VirtualMachineCommandSet.CommandSetID , JDWPCommands.VirtualMachineCommandSet.ResumeCommand ) ; logWriter.println ( "Sending VirtualMachine::Resume command..." ) ; org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand ( packet ) ; checkReplyPacket ( reply , "VirtualMachine::Resume command" ) ; assertAllDataRead ( reply ) ; }

Target:
protected void resumeDebuggee ( ) { logWriter.println ( "=> Resume debuggee" ) ; org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket packet = new org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket ( JDWPCommands.VirtualMachineCommandSet.CommandSetID , JDWPCommands.VirtualMachineCommandSet.ResumeCommand ) ; logWriter.println ( "Sending VirtualMachine::Resume command..." ) ; org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand ( packet ) ; checkReplyPacket ( reply , "VirtualMachine::Resume command" ) ; assertAllDataRead ( reply ) ; }
Source:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( android.bluetooth.BluetoothPan.DBG ) android.util.Log.d ( android.bluetooth.BluetoothPan.TAG , "BluetoothPAN Proxy object connected" ) ; mPanService = IBluetoothPan.Stub.asInterface ( service ) ; if ( ( mServiceListener ) != null ) { mServiceListener.onServiceConnected ( BluetoothProfile.PAN , this ) ; } }

Target:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( android.bluetooth.BluetoothPan.DBG ) android.util.Log.d ( android.bluetooth.BluetoothPan.TAG , "BluetoothPAN Proxy object connected" ) ; mPanService = IBluetoothPan.Stub.asInterface ( android.os.Binder.allowBlocking ( service ) ) ; if ( ( mServiceListener ) != null ) { mServiceListener.onServiceConnected ( BluetoothProfile.PAN , this ) ; } }
Source:
public android.database.Cursor loadInBackground ( ) { return com.android.dialer.speeddial.SpeedDialCursor.newInstance ( super . loadInBackground ( ) ) ; }

Target:
public android.database.Cursor loadInBackground ( ) { android.database.Cursor strequentCursor = super . loadInBackground ( ) ; java.util.List < com.android.dialer.speeddial.room.SpeedDialEntry > entries = com.android.dialer.speeddial.room.SpeedDialDatabaseComponent.get ( getContext ( ) . getApplicationContext ( ) ) . speedDialDatabase ( ) . getSpeedDialEntryDao ( ) . getAllEntries ( ) ; return com.android.dialer.speeddial.SpeedDialCursor.newInstance ( strequentCursor , entries ) ; }
Source:
public static int getExponent ( float f ) { return sun.misc.FpUtils.getExponent ( f ) ; }

Target:
public static float nextUp ( float f ) { if ( ( java.lang.Float.isNaN ( f ) ) || ( f == ( sun.misc.FloatConsts.POSITIVE_INFINITY ) ) ) return f ; else { f += 0.0F ; return java.lang.Float.intBitsToFloat ( ( ( java.lang.Float.floatToRawIntBits ( f ) ) + ( f >= 0.0F ? + 1 : - 1 ) ) ) ; } }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , d.length , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFrom ( int off , int count , short [ ] d ) { validateIsInt16 ( ) ; copy1DRangeFromUnchecked ( off , count , d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
public void requestInstall_badToken ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; byte [ ] expectedContent = com.android.server.timezone.RulesManagerServiceTest.createArbitraryBytes ( 1000 ) ; android.os.ParcelFileDescriptor parcelFileDescriptor = createFakeParcelFileDescriptor ( ) ; configureParcelFileDescriptorReadSuccess ( parcelFileDescriptor , expectedContent ) ; byte [ ] badTokenBytes = new byte [ 2 ] ; android.app.timezone.ICallback callback = new com.android.server.timezone.RulesManagerServiceTest.StubbedCallback ( ) ; try { mRulesManagerService.requestInstall ( parcelFileDescriptor , badTokenBytes , callback ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } mFakeExecutor.assertNothingQueued ( ) ; verifyNoInstallerCallsMade ( ) ; verifyNoPackageTrackerCallsMade ( ) ; }

Target:
public void requestInstall_badToken ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; android.os.ParcelFileDescriptor parcelFileDescriptor = com.android.server.timezone.RulesManagerServiceTest.createParcelFileDescriptor ( com.android.server.timezone.RulesManagerServiceTest.createArbitraryBytes ( 1000 ) ) ; byte [ ] badTokenBytes = new byte [ 2 ] ; android.app.timezone.ICallback callback = new com.android.server.timezone.RulesManagerServiceTest.StubbedCallback ( ) ; try { mRulesManagerService.requestInstall ( parcelFileDescriptor , badTokenBytes , callback ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } com.android.server.timezone.RulesManagerServiceTest.assertClosed ( parcelFileDescriptor ) ; mFakeExecutor.assertNothingQueued ( ) ; verifyNoInstallerCallsMade ( ) ; verifyNoPackageTrackerCallsMade ( ) ; }
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 deleteSmsOnRuim ( int index , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM , response , mRILDefaultWorkSource ) ; 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 ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( mScanMode ) ; dest.writeInt ( mCallbackType ) ; dest.writeInt ( mScanResultType ) ; dest.writeLong ( mReportDelayMillis ) ; dest.writeInt ( mMatchMode ) ; dest.writeInt ( mNumOfMatchesPerFilter ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( mScanMode ) ; dest.writeInt ( mCallbackType ) ; dest.writeInt ( mScanResultType ) ; dest.writeLong ( mReportDelayMillis ) ; dest.writeInt ( mMatchMode ) ; dest.writeInt ( mNumOfMatchesPerFilter ) ; dest.writeInt ( ( mLegacy ? 1 : 0 ) ) ; dest.writeInt ( mPhy ) ; }
Source:
public java.nio.LongBuffer slice ( ) { byteBuffer.limit ( ( ( limit ) * ( libcore.io.SizeOf.LONG ) ) ) ; byteBuffer.position ( ( ( position ) * ( libcore.io.SizeOf.LONG ) ) ) ; java.nio.ByteBuffer bb = byteBuffer.slice ( ) . order ( byteBuffer.order ( ) ) ; java.nio.LongBuffer result = new java.nio.LongToByteBufferAdapter ( bb ) ; byteBuffer.clear ( ) ; return result ; }

Target:
public java.nio.LongBuffer slice ( ) { byteBuffer.limit ( ( ( limit ) * ( libcore.io.SizeOf.LONG ) ) ) ; byteBuffer.position ( ( ( position ) * ( libcore.io.SizeOf.LONG ) ) ) ; java.nio.ByteBuffer bb = byteBuffer.slice ( ) . order ( byteBuffer.order ( ) ) ; java.nio.LongBuffer result = new java.nio.ByteBufferAsLongBuffer ( bb ) ; byteBuffer.clear ( ) ; return result ; }
Source:
public boolean apply ( java.lang.String arg ) { java.io.File argFile = new java.io.File ( arg ) ; if ( argFile.isDirectory ( ) ) { folders.add ( argFile ) ; } return arg.endsWith ( extension ) ; }

Target:
protected java.util.Set < java.lang.String > getJavaFileNamesSpecifiedOnCommandLine ( @ javax.annotation.Nonnull com.android.jack.Options options ) { final java.lang.String extension = ".java" ; java.util.Set < java.lang.String > javaFileNames = new java.util.HashSet < java.lang.String > ( ) ; for ( java.io.File file : options.getInputSources ( ) ) { if ( file.isDirectory ( ) ) { fillFiles ( file , extension , javaFileNames ) ; } else if ( file.getName ( ) . endsWith ( extension ) ) { javaFileNames.add ( file.getPath ( ) ) ; } } return javaFileNames ; }
Source:
private static void sleepFor ( int ms ) { try { java.lang.Thread.sleep ( ms ) ; } catch ( java.lang.InterruptedException e ) { } }

Target:
public void testTimedoutAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; try { java.lang.Thread.sleep ( 15 ) ; } catch ( java.lang.InterruptedException e ) { } networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public void testRunEnded ( long elapsedTime , java.util.Map < java.lang.String , java.lang.String > metrics ) { mCurrentModuleResult.inProgress ( false ) ; mCurrentModuleResult.addRuntime ( elapsedTime ) ; if ( ( ! ( mModuleWasDone ) ) && ( mCanMarkDone ) ) { mCurrentModuleResult.setDone ( ( ( mCurrentTestNum ) >= ( mTotalTestsInModule ) ) ) ; } if ( isShardResultReporter ( ) ) { mMasterResultReporter.mergeModuleResult ( mCurrentModuleResult ) ; mCurrentModuleResult.resetTestRuns ( ) ; } }

Target:
public void testRunEnded ( long elapsedTime , java.util.Map < java.lang.String , java.lang.String > metrics ) { mCurrentModuleResult.inProgress ( false ) ; mCurrentModuleResult.addRuntime ( elapsedTime ) ; if ( ( ! ( mModuleWasDone ) ) && ( mCanMarkDone ) ) { mCurrentModuleResult.setDone ( ( ( mCurrentTestNum ) >= ( mTotalTestsInModule ) ) ) ; } if ( isShardResultReporter ( ) ) { mMasterResultReporter.mergeModuleResult ( mCurrentModuleResult ) ; mCurrentModuleResult.resetTestRuns ( ) ; mCurrentModuleResult.resetRuntime ( ) ; } }
Source:
public void setActiveDevice ( boolean isActive , int bluetoothProfile ) { boolean changed = false ; switch ( bluetoothProfile ) { case android.bluetooth.BluetoothProfile.A2DP : changed = ( mIsActiveDeviceA2dp ) != isActive ; mIsActiveDeviceA2dp = isActive ; break ; case android.bluetooth.BluetoothProfile.HEADSET : changed = ( mIsActiveDeviceHeadset ) != isActive ; mIsActiveDeviceHeadset = isActive ; break ; default : android.util.Log.w ( com.android.settingslib.bluetooth.CachedBluetoothDevice.TAG , ( ( ( "setActiveDevice: unknown profile " + bluetoothProfile ) + " isActive " ) + isActive ) ) ; break ; } if ( changed ) { dispatchAttributesChanged ( ) ; } }

Target:
public void onActiveDeviceChanged ( boolean isActive , int bluetoothProfile ) { boolean changed = false ; switch ( bluetoothProfile ) { case android.bluetooth.BluetoothProfile.A2DP : changed = ( mIsActiveDeviceA2dp ) != isActive ; mIsActiveDeviceA2dp = isActive ; break ; case android.bluetooth.BluetoothProfile.HEADSET : changed = ( mIsActiveDeviceHeadset ) != isActive ; mIsActiveDeviceHeadset = isActive ; break ; default : android.util.Log.w ( com.android.settingslib.bluetooth.CachedBluetoothDevice.TAG , ( ( ( "onActiveDeviceChanged: unknown profile " + bluetoothProfile ) + " isActive " ) + isActive ) ) ; break ; } if ( changed ) { dispatchAttributesChanged ( ) ; } }
Source:
public void hardwareConfigChanged ( int indicationType , java.util.ArrayList < com.android.internal.telephony.V1_0.HardwareConfig > var2 ) { }

Target:
public void hardwareConfigChanged ( int indicationType , java.util.ArrayList < com.android.internal.telephony.V1_0.HardwareConfig > configs ) { mRil.processIndication ( indicationType ) ; java.util.ArrayList < com.android.internal.telephony.HardwareConfig > response = com.android.internal.telephony.RIL.convertHalHwConfigList ( configs , mRil ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_HARDWARE_CONFIG_CHANGED , response ) ; mRil.mHardwareConfigChangeRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public void onDialpadQueryChanged ( java.lang.String query ) { query = com.android.dialer.smartdial.util.SmartDialNameMatcher.normalizeNumber ( activity , query ) ; com.android.dialer.searchfragment.list.NewSearchFragment fragment = getSearchFragment ( ) ; if ( fragment != null ) { fragment.setQuery ( query , CallInitiationType.Type.DIALPAD ) ; } getDialpadFragment ( ) . process_quote_emergency_unquote ( query ) ; }

Target:
public void onDialpadQueryChanged ( java.lang.String query ) { query = com.android.dialer.smartdial.util.SmartDialNameMatcher.normalizeNumber ( activity , query ) ; if ( ( searchFragment ) != null ) { searchFragment.setQuery ( query , CallInitiationType.Type.DIALPAD ) ; } dialpadFragment.process_quote_emergency_unquote ( query ) ; }
Source:
public java.nio.channels.FileChannel getChannel ( ) { synchronized ( this ) { if ( ( channel ) == null ) { channel = sun.nio.ch.FileChannelImpl.open ( fd , path , true , false , this ) ; fd.incrementAndGetUseCount ( ) ; } return channel ; } }

Target:
protected void finalize ( ) throws java.io.IOException { if ( ( guard ) != null ) { guard.warnIfOpen ( ) ; } if ( ( ( fd ) != null ) && ( ( fd ) != ( java.io.FileDescriptor.in ) ) ) { close ( ) ; } }
Source:
public void test_getOption_SO_RCVBUF_defaults ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; int value = dc.getOption ( java.net.StandardSocketOptions.SO_RCVBUF ) ; assertTrue ( ( value > 0 ) ) ; assertEquals ( value , dc.socket ( ) . getReceiveBufferSize ( ) ) ; dc.close ( ) ; }

Target:
private void test_bind ( java.net.InetAddress bindAddress ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.socket ( ) . bind ( new java.net.InetSocketAddress ( bindAddress , 0 ) ) ; java.net.InetSocketAddress actualAddress = ( ( java.net.InetSocketAddress ) ( dc.socket ( ) . getLocalSocketAddress ( ) ) ) ; assertEquals ( bindAddress , actualAddress.getAddress ( ) ) ; assertTrue ( ( ( actualAddress.getPort ( ) ) > 0 ) ) ; dc.close ( ) ; }
Source:
public boolean setPin ( byte [ ] pin ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot set Remote Device pin" ) ; return false ; } try { return android.bluetooth.BluetoothDevice.sService.setPin ( this , true , pin.length , pin ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean setPin ( byte [ ] pin ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot set Remote Device pin" ) ; return false ; } try { return service.setPin ( this , true , pin.length , pin ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public com.android.messaging.datamodel.data.ParticipantData getOtherParticipant ( ) { if ( ( mParticipantCountExcludingSelf ) == 1 ) { for ( int i = 0 ; i < ( mConversationParticipantsMap.size ( ) ) ; i ++ ) { final com.android.messaging.datamodel.data.ParticipantData participant = mConversationParticipantsMap.valueAt ( i ) ; if ( ! ( participant.isSelf ( ) ) ) { return participant ; } } junit.framework.Assert.fail ( ) ; } return null ; }

Target:
public com.android.messaging.datamodel.data.ParticipantData getOtherParticipant ( ) { if ( ( mParticipantCountExcludingSelf ) == 1 ) { for ( int i = 0 ; i < ( mConversationParticipantsMap.size ( ) ) ; i ++ ) { final com.android.messaging.datamodel.data.ParticipantData participant = mConversationParticipantsMap.valueAt ( i ) ; if ( ! ( participant.isSelf ( ) ) ) { return participant ; } } com.android.messaging.util.Assert.fail ( "Could not find other participant" ) ; } return null ; }
Source:
public void testClearKeyPlaybackCenc ( ) throws java.lang.Exception { testClearKeyPlayback ( android.media.cts.NativeClearKeySystemTest.ISO_BMFF_VIDEO_MIME_TYPE , android.media.cts.NativeClearKeySystemTest.CENC_AUDIO_URL , android.media.cts.NativeClearKeySystemTest.CENC_CLEARKEY_VIDEO_URL , android.media.cts.NativeClearKeySystemTest.VIDEO_WIDTH_CENC , android.media.cts.NativeClearKeySystemTest.VIDEO_HEIGHT_CENC ) ; }

Target:
public void testClearKeyPlaybackCenc ( ) throws java.lang.Exception { if ( ( android.media.cts.NativeClearKeySystemTest.compareVersion ( Build.VERSION.RELEASE , "7.1.2" ) ) >= 0 ) { testClearKeyPlayback ( android.media.cts.NativeClearKeySystemTest.ISO_BMFF_VIDEO_MIME_TYPE , android.media.cts.NativeClearKeySystemTest.CENC_AUDIO_URL , android.media.cts.NativeClearKeySystemTest.CENC_CLEARKEY_VIDEO_URL , android.media.cts.NativeClearKeySystemTest.VIDEO_WIDTH_CENC , android.media.cts.NativeClearKeySystemTest.VIDEO_HEIGHT_CENC ) ; } else { android.util.Log.i ( android.media.cts.NativeClearKeySystemTest.TAG , "Skip test, which is intended for Android 7.1.2 and above." ) ; } }
Source:
public boolean canGoBackOrForward ( final int steps ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return canGoBackOrForward ( steps ) ; } } ) ; return ret ; } return mAwContents.canGoBackOrForward ( steps ) ; }

Target:
public boolean canGoForward ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return canGoForward ( ) ; } } ) ; return ret ; } return mAwContents.canGoForward ( ) ; }
Source:
private static void validateManifestAttribute ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement manifest ) { org.w3c.dom.Attr attributeNode = manifest.getXml ( ) . getAttributeNode ( AndroidManifest.ATTRIBUTE_PACKAGE ) ; if ( attributeNode == null ) { manifest.addMessage ( mergingReport , com.android.manifmerger.WARNING , java.lang.String.format ( "Missing 'package' declaration in manifest at %1$s" , manifest.printPosition ( ) ) ) ; } }

Target:
private static void validateManifestAttribute ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement manifest , com.android.manifmerger.XmlDocument.Type fileType ) { org.w3c.dom.Attr attributeNode = manifest.getXml ( ) . getAttributeNode ( AndroidManifest.ATTRIBUTE_PACKAGE ) ; if ( ( attributeNode == null ) && ( fileType != ( XmlDocument.Type.OVERLAY ) ) ) { manifest.addMessage ( mergingReport , ( fileType == ( XmlDocument.Type.MAIN ) ? ERROR : WARNING ) , java.lang.String.format ( "Missing 'package' declaration in manifest at %1$s" , manifest.printPosition ( ) ) ) ; } }
Source:
public void testCanAccessScanResults_CallerIsActiveNwScorer ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mActiveNwScorer = true ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testCanAccessScanResults_CallerIsActiveNwScorer ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mActiveNwScorer = true ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo getHorizontalPaddingBottom ( int x ) { int left = ( patchInfo.horizontalPadding.first ) + 1 ; int right = ( ( image.getWidth ( ) ) - ( patchInfo.horizontalPadding.second ) ) - 1 ; return getContainingPadding ( left , right , x , com.android.draw9patch.ui.ImageViewer.UpdateRegion.BOTTOM_PADDING ) ; }

Target:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo findVerticalPatch ( int x , int y ) { java.util.List < com.android.draw9patch.ui.Pair < java.lang.Integer > > markers ; com.android.draw9patch.ui.ImageViewer.UpdateRegion region ; if ( x < ( ( image.getWidth ( ) ) / 2 ) ) { markers = patchInfo.verticalPatchMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.LEFT_PATCH ; } else { markers = patchInfo.verticalPaddingMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.RIGHT_PADDING ; } return getContainingPatch ( markers , y , region ) ; }
Source:
protected void onPrepareDialog ( int id , android.app.Dialog dialog ) { switch ( id ) { case com.example.android.apis.view.DateWidgets1.TIME_DIALOG_ID : ( ( android.app.TimePickerDialog ) ( dialog ) ) . updateTime ( mHour , mMinute ) ; break ; case com.example.android.apis.view.DateWidgets1.DATE_DIALOG_ID : ( ( android.app.DatePickerDialog ) ( dialog ) ) . updateDate ( mYear , mMonth , mDay ) ; break ; } }

Target:
protected void onPrepareDialog ( int id , android.app.Dialog dialog ) { switch ( id ) { case com.example.android.apis.view.DateWidgets1.TIME_12_DIALOG_ID : case com.example.android.apis.view.DateWidgets1.TIME_24_DIALOG_ID : ( ( android.app.TimePickerDialog ) ( dialog ) ) . updateTime ( mHour , mMinute ) ; break ; case com.example.android.apis.view.DateWidgets1.DATE_DIALOG_ID : ( ( android.app.DatePickerDialog ) ( dialog ) ) . updateDate ( mYear , mMonth , mDay ) ; break ; } }
Source:
protected byte [ ] sendPdu ( long token , byte [ ] pdu , java.lang.String mmscUrl ) throws java.io.IOException { ensureRouteToHost ( mmscUrl , mTransactionSettings ) ; return com.android.mms.transaction.HttpUtils.httpConnection ( mContext , token , mmscUrl , pdu , HttpUtils.HTTP_POST_METHOD , mTransactionSettings.isProxySet ( ) , mTransactionSettings.getProxyAddress ( ) , mTransactionSettings.getProxyPort ( ) ) ; }

Target:
protected byte [ ] sendPdu ( long token , byte [ ] pdu , java.lang.String mmscUrl ) throws com.google.android.mms.MmsException , java.io.IOException { if ( pdu == null ) { throw new com.google.android.mms.MmsException ( ) ; } ensureRouteToHost ( mmscUrl , mTransactionSettings ) ; return com.android.mms.transaction.HttpUtils.httpConnection ( mContext , token , mmscUrl , pdu , HttpUtils.HTTP_POST_METHOD , mTransactionSettings.isProxySet ( ) , mTransactionSettings.getProxyAddress ( ) , mTransactionSettings.getProxyPort ( ) ) ; }
Source:
private static void assertMultipleInstanceCharacteristics ( java.lang.Object r1 , java.lang.Object r2 ) throws java.lang.Exception { assertNotSame ( r1 , r2 ) ; assertTrue ( ( ! ( r1.equals ( r2 ) ) ) ) ; java.lang.Class < ? > lambda1Class = r1.getClass ( ) ; java.lang.Class < ? > lambda2Class = r2.getClass ( ) ; assertNotSame ( lambda1Class , lambda2Class ) ; }

Target:
private static void assertMultipleInstanceCharacteristics ( java.util.concurrent.Callable < java.lang.String > r1 , java.util.concurrent.Callable < java.lang.String > r2 ) throws java.lang.Exception { assertEquals ( r1.call ( ) , r2.call ( ) ) ; }
Source:
public void testNewInstanceString_ByteArrayIntIntConstructor ( ) { runTestNewInstanceString ( "([BII)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; } } ) ; }

Target:
public void testNewInstanceString_ByteArrayIntIntStringConstructor ( ) { runTestNewInstanceString ( "([BIILjava/lang/String;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringCharsetValue = getStaticFieldValue ( debuggeeClassId , "STRING_CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; constructorArguments.add ( stringCharsetValue ) ; } } ) ; }
Source:
protected boolean markIfNecessary ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node ) { com.android.jack.ir.ast.JDefinedClassOrInterface jdcoi ; if ( node instanceof com.android.jack.ir.ast.JDefinedClassOrInterface ) { jdcoi = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( node ) ) ; } else { jdcoi = node.getParent ( com.android.jack.ir.ast.JDefinedClassOrInterface.class ) ; } if ( jdcoi.isExternal ( ) ) { return false ; } return super . markIfNecessary ( node ) ; }

Target:
protected boolean markIfNecessary ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node ) { com.android.jack.ir.ast.JDefinedClassOrInterface jdcoi ; if ( node instanceof com.android.jack.ir.ast.JDefinedClassOrInterface ) { jdcoi = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( node ) ) ; } else { jdcoi = node.getParent ( com.android.jack.ir.ast.JDefinedClassOrInterface.class ) ; } if ( ! ( jdcoi.isToEmit ( ) ) ) { return false ; } return super . markIfNecessary ( node ) ; }
Source:
public int checkPermission ( java.lang.String permission , int pid , int uid ) { if ( permission == null ) { return android.content.pm.PackageManager.PERMISSION_DENIED ; } return checkComponentPermission ( permission , pid , uid , ( - 1 ) ) ; }

Target:
boolean checkAppSwitchAllowedLocked ( int callingPid , int callingUid , java.lang.String name ) { if ( ( mAppSwitchesAllowedTime ) < ( android.os.SystemClock.uptimeMillis ( ) ) ) { return true ; } final int perm = checkComponentPermission ( android.Manifest.permission.STOP_APP_SWITCHES , callingPid , callingUid , ( - 1 ) , true ) ; if ( perm == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return true ; } android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , ( ( ( name + " request from " ) + callingUid ) + " stopped" ) ) ; return false ; }
Source:
private void testInterruptWritableChannel ( final java.nio.channels.WritableByteChannel channel ) throws java.lang.Exception { interruptMeLater ( ) ; try { while ( true ) { channel.write ( java.nio.ByteBuffer.allocate ( libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ) ) ; } } catch ( java.nio.channels.ClosedByInterruptException expected ) { } catch ( java.nio.channels.ClosedChannelException expected ) { } }

Target:
private void testInterruptWritableChannel ( final java.nio.channels.WritableByteChannel channel ) throws java.lang.Exception { java.lang.Thread thread = interruptMeLater ( ) ; try { while ( true ) { channel.write ( java.nio.ByteBuffer.allocate ( libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ) ) ; } } catch ( java.nio.channels.ClosedByInterruptException expected ) { } catch ( java.nio.channels.ClosedChannelException expected ) { } finally { libcore.java.io.InterruptedStreamTest.confirmInterrupted ( thread ) ; } }
Source:
public final void testGetBottomLeft ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Point p = r.getBottomLeft ( ) ; assertEquals ( 3 , p.x ) ; assertEquals ( ( 4 + 30 ) , p.y ) ; }

Target:
public final void testGetBottomLeft ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.common.api.Point p = r.getBottomLeft ( ) ; assertEquals ( 3 , p.x ) ; assertEquals ( ( 4 + 30 ) , p.y ) ; }
Source:
protected boolean engineVerify ( byte [ ] sigBytes ) throws java.security.SignatureException { if ( ( key ) == null ) { throw new java.security.SignatureException ( "Need RSA or EC public key" ) ; } try { int result = org.conscrypt.NativeCrypto.EVP_VerifyFinal ( ctx , sigBytes , 0 , sigBytes.length , key.getNativeRef ( ) ) ; return result == 1 ; } catch ( java.lang.Exception ex ) { throw new java.security.SignatureException ( ex ) ; } finally { resetContext ( ) ; } }

Target:
protected boolean engineVerify ( byte [ ] sigBytes ) throws java.security.SignatureException { final org.conscrypt.NativeRef.EVP_MD_CTX ctxLocal = ctx ; try { return org.conscrypt.NativeCrypto.EVP_DigestVerifyFinal ( ctxLocal , sigBytes , 0 , sigBytes.length ) ; } catch ( java.lang.Exception ex ) { throw new java.security.SignatureException ( ex ) ; } finally { resetContext ( ) ; } }
Source:
private void incrementSimulatedDeviceClock ( int incMillis ) { long currentElapsedRealtime = mDeviceState.elapsedRealtime ( ) ; org.mockito.Mockito.when ( mDeviceState.elapsedRealtime ( ) ) . thenReturn ( ( currentElapsedRealtime + incMillis ) ) ; }

Target:
private void incrementSimulatedDeviceClock ( int incMillis ) { long currentElapsedRealtime = mDeviceState.elapsedRealtime ( ) ; org.mockito.Mockito.when ( mDeviceState.elapsedRealtime ( ) ) . thenReturn ( ( currentElapsedRealtime + incMillis ) ) ; long currentTimeMillis = mDeviceState.currentTimeMillis ( ) ; org.mockito.Mockito.when ( mDeviceState.elapsedRealtime ( ) ) . thenReturn ( ( currentTimeMillis + incMillis ) ) ; }
Source:
public com.google.common.util.concurrent.Service.State startAndWait ( ) { return com.google.common.util.concurrent.Futures.getUnchecked ( start ( ) ) ; }

Target:
public final com.google.common.util.concurrent.Service startAsync ( ) { if ( monitor.enterIf ( isStartable ) ) { try { snapshot = new com.google.common.util.concurrent.AbstractService.StateSnapshot ( com.google.common.util.concurrent.Service.State.STARTING ) ; starting ( ) ; doStart ( ) ; } catch ( java.lang.Throwable startupFailure ) { notifyFailed ( startupFailure ) ; } finally { monitor.leave ( ) ; executeListeners ( ) ; } } else { throw new java.lang.IllegalStateException ( ( ( "Service " + ( this ) ) + " has already been started" ) ) ; } return this ; }
Source:
private static android.support.test.espresso.ViewAction actionOpenDrawer ( final int gravity ) { return new android.support.test.espresso.ViewAction ( ) { @ java.lang.Override public org.hamcrest.Matcher < android.view.View > getConstraints ( ) { return android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom ( android.support.v4.widget.DrawerLayout.class ) ; } @ java.lang.Override public java.lang.String getDescription ( ) { return "open drawer with gravity " + gravity ; } @ java.lang.Override public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { ( ( android.support.v4.widget.DrawerLayout ) ( view ) ) . openDrawer ( gravity ) ; } } ; }

Target:
public static android.support.test.espresso.ViewAction open ( final int gravity ) { return new android.support.test.espresso.contrib.DrawerActions.DrawerAction ( ) { @ java.lang.Override public java.lang.String getDescription ( ) { return "open drawer with gravity " + gravity ; } @ java.lang.Override protected org.hamcrest.Matcher < android.view.View > checkAction ( ) { return android.support.test.espresso.contrib.DrawerMatchers.isClosed ( gravity ) ; } @ java.lang.Override protected void performAction ( android.support.v4.widget.DrawerLayout view ) { view.openDrawer ( gravity ) ; } } ; }
Source:
private android.content.Context getContextForUserHandle ( android.os.UserHandle userHandle ) { if ( userHandle == null ) { return null ; } try { return mContext.createPackageContextAsUser ( mContext.getPackageName ( ) , 0 , userHandle ) ; } catch ( android.content.pm.PackageManager e ) { com.android.server.telecom.Log.w ( "RingtoneFactory" , ( "Package name not found: " + ( e.getMessage ( ) ) ) ) ; } return null ; }

Target:
private android.content.Context getContextForUserHandle ( android.os.UserHandle userHandle ) { if ( userHandle == null ) { return null ; } try { return mContext.createPackageContextAsUser ( mContext.getPackageName ( ) , 0 , userHandle ) ; } catch ( android.content.pm.PackageManager e ) { android.telecom.Log.w ( "RingtoneFactory" , ( "Package name not found: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public com.intellij.execution.RunnerAndConfigurationSettings findExistingConfiguration ( com.intellij.execution.actions.ConfigurationContext context ) { final com.intellij.execution.RunManager runManager = com.intellij.execution.RunManager.getInstance ( context.getProject ( ) ) ; final java.util.List < com.intellij.execution.RunnerAndConfigurationSettings > configurations = runManager.getConfigurationSettingsList ( myConfigurationFactory.getType ( ) ) ; for ( com.intellij.execution.RunnerAndConfigurationSettings configurationSettings : configurations ) { if ( isConfigurationFromContext ( ( ( T ) ( configurationSettings.getConfiguration ( ) ) ) , context ) ) { return configurationSettings ; } } return null ; }

Target:
public com.intellij.execution.actions.RunnerAndConfigurationSettings findExistingConfiguration ( com.intellij.execution.actions.ConfigurationContext context ) { final com.intellij.execution.actions.RunManager runManager = com.intellij.execution.actions.RunManager.getInstance ( context.getProject ( ) ) ; final java.util.List < com.intellij.execution.actions.RunnerAndConfigurationSettings > configurations = runManager.getConfigurationSettingsList ( myConfigurationFactory.getType ( ) ) ; for ( com.intellij.execution.actions.RunnerAndConfigurationSettings configurationSettings : configurations ) { if ( isConfigurationFromContext ( ( ( T ) ( configurationSettings.getConfiguration ( ) ) ) , context ) ) { return configurationSettings ; } } return null ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent event ) { org.eclipse.swt.widgets.ScrollBar sb = ( ( org.eclipse.swt.widgets.ScrollBar ) ( event.getSource ( ) ) ) ; boolean scrollToLast = ( ( sb.getSelection ( ) ) + ( sb.getThumb ( ) ) ) == ( sb.getMaximum ( ) ) ; setScrollToLatestLog ( scrollToLast , true ) ; }

Target:
public void copy ( org.eclipse.swt.dnd.Clipboard clipboard ) { copySelectionToClipboard ( clipboard ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { mAndroidKeyStore = android.security.android.security.KeyStore.getInstance ( ) ; assertTrue ( mAndroidKeyStore.reset ( ) ) ; assertFalse ( mAndroidKeyStore.isUnlocked ( ) ) ; assertTrue ( mAndroidKeyStore.password ( "1111" ) ) ; assertTrue ( mAndroidKeyStore.isUnlocked ( ) ) ; java.lang.String [ ] aliases = mAndroidKeyStore.saw ( "" ) ; assertNotNull ( aliases ) ; assertEquals ( 0 , aliases.length ) ; mGenerator = java.security.KeyPairGenerator.getInstance ( AndroidKeyPairGenerator.NAME ) ; }

Target:
private void setupPassword ( ) { assertTrue ( mAndroidKeyStore.password ( "1111" ) ) ; assertTrue ( mAndroidKeyStore.isUnlocked ( ) ) ; java.lang.String [ ] aliases = mAndroidKeyStore.saw ( "" ) ; assertNotNull ( aliases ) ; assertEquals ( 0 , aliases.length ) ; }
Source:
private java.lang.String getArgsCommand ( ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.String > argPair : mArgMap.entrySet ( ) ) { final java.lang.String argCmd = java.lang.String.format ( " -e %s %s" , argPair.getKey ( ) , argPair.getValue ( ) ) ; commandBuilder.append ( argCmd ) ; } return commandBuilder.toString ( ) ; }

Target:
private java.lang.String getArgsCommand ( ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.String > argPair : mArgMap.entrySet ( ) ) { final java.lang.String argCmd = java.lang.String.format ( " -e %1$s %2$s" , argPair.getKey ( ) , argPair.getValue ( ) ) ; commandBuilder.append ( argCmd ) ; } return commandBuilder.toString ( ) ; }
Source:
private static void doFollowReferencesTestNonRoot ( java.util.ArrayList < java.lang.Object > tmpStorage ) { Main.Verifier v = new Main.Verifier ( ) ; Main.tagClasses ( v ) ; Main.A a = Main.createTree ( v ) ; tmpStorage.add ( a ) ; v.add ( "0@0" , "1@1000" ) ; Main.doFollowReferencesTestImpl ( null , java.lang.Integer.MAX_VALUE , ( - 1 ) , null , v , null ) ; Main.doFollowReferencesTestImpl ( a.foo2 , java.lang.Integer.MAX_VALUE , ( - 1 ) , null , v , "3@1001" ) ; tmpStorage.clear ( ) ; }

Target:
private void doFollowReferencesTestRoot ( ) { Main.Verifier v = new Main.Verifier ( ) ; Main.TestConfig.tagClasses ( v ) ; Main.A a = Main.TestConfig.createTree ( v ) ; doFollowReferencesTestImpl ( null , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , null ) ; doFollowReferencesTestImpl ( a.foo2 , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , "3@1001" ) ; }
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 ) . setCanReportAsInvalidNumber ( false ) . setCp2InfoIncomplete ( false ) . 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 ( ) ) . setIsRead ( false ) . setIsNew ( false ) . setPhoneAccountColor ( 0 ) . setFeatures ( 0 ) . setCallType ( 0 ) . setNumberAttributes ( com.android.dialer.NumberAttributes.getDefaultInstance ( ) ) . setCoalescedIds ( com.android.dialer.CoalescedIds.getDefaultInstance ( ) ) ; }
Source:
private void expectCallback ( com.android.server.ConnectivityServiceTest.TestKeepaliveCallback.CallbackValue callbackValue ) { try { assertEquals ( callbackValue , mCallbacks.poll ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ; } catch ( java.lang.InterruptedException e ) { fail ( ( ( ( ( callbackValue.callbackType ) + " callback not seen after " ) + ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS ) ) + " ms" ) ) ; } }

Target:
private void expectCallback ( com.android.server.ConnectivityServiceTest.TestKeepaliveCallback.CallbackValue callbackValue ) { try { org.junit.Assert.assertEquals ( callbackValue , mCallbacks.poll ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( ( ( ( callbackValue.callbackType ) + " callback not seen after " ) + ( com.android.server.ConnectivityServiceTest.TIMEOUT_MS ) ) + " ms" ) ) ; } }
Source:
public void TestAnchors ( ) { expect ( ( "^ab > 01 ;" + ( ( ( " ab > |8 ;" + " b > k ;" ) + " 8x$ > 45 ;" ) + " 8x > 77 ;" ) ) , "ababbabxabx" , "018k7745" ) ; expect ( ( "$s = [z$] ;" + ( ( ( ( "$s{ab > 01 ;" + " ab > |8 ;" ) + " b > k ;" ) + " 8x}$s > 45 ;" ) + " 8x > 77 ;" ) ) , "abzababbabxzabxabx" , "01z018k45z01x45" ) ; }

Target:
public void TestAnchors ( ) { android.icu.dev.test.translit.TransliteratorTest.expect ( ( "^ab > 01 ;" + ( ( ( " ab > |8 ;" + " b > k ;" ) + " 8x$ > 45 ;" ) + " 8x > 77 ;" ) ) , "ababbabxabx" , "018k7745" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( ( "$s = [z$] ;" + ( ( ( ( "$s{ab > 01 ;" + " ab > |8 ;" ) + " b > k ;" ) + " 8x}$s > 45 ;" ) + " 8x > 77 ;" ) ) , "abzababbabxzabxabx" , "01z018k45z01x45" ) ; }
Source:
public void testToString ( ) { assertEquals ( "[]" , new java.util.concurrent.CopyOnWriteArraySet ( ) . toString ( ) ) ; java.util.concurrent.CopyOnWriteArraySet full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; java.lang.String s = full.toString ( ) ; for ( int i = 0 ; i < 3 ; ++ i ) assertTrue ( s.contains ( java.lang.String.valueOf ( i ) ) ) ; assertEquals ( new java.util.ArrayList ( full ) . toString ( ) , full.toString ( ) ) ; }

Target:
public void testIteratorRemove ( ) { java.util.Collection full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; java.util.Iterator it = full.iterator ( ) ; it.next ( ) ; try { it.remove ( ) ; shouldThrow ( ) ; } catch ( java.lang.UnsupportedOperationException success ) { } }
Source:
public static boolean readInstallPolicy ( ) { return com.android.server.pm.SELinuxMMAC.readInstallPolicy ( com.android.server.pm.SELinuxMMAC.INSTALL_POLICY_FILE ) ; }

Target:
public static void setRestoreconDone ( ) { try { final byte [ ] currentHash = com.android.server.pm.SELinuxMMAC.returnHash ( com.android.server.pm.SELinuxMMAC.SEAPP_CONTEXTS ) ; com.android.server.pm.SELinuxMMAC.dumpHash ( new java.io.File ( com.android.server.pm.SELinuxMMAC.SEAPP_HASH_FILE ) , currentHash ) ; } catch ( java.io.IOException ioe ) { android.util.Slog.e ( com.android.server.pm.SELinuxMMAC.TAG , ( "Error with saving hash to " + ( com.android.server.pm.SELinuxMMAC.SEAPP_HASH_FILE ) ) , ioe ) ; } }
Source:
private void test_bind ( java.net.InetAddress bindAddress ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.bind ( new java.net.InetSocketAddress ( bindAddress , 0 ) ) ; java.net.InetSocketAddress actualAddress = ( ( java.net.InetSocketAddress ) ( dc.getLocalAddress ( ) ) ) ; assertEquals ( bindAddress , actualAddress.getAddress ( ) ) ; assertTrue ( ( ( actualAddress.getPort ( ) ) > 0 ) ) ; dc.close ( ) ; }

Target:
private void test_bind ( java.net.InetAddress bindAddress ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.socket ( ) . bind ( new java.net.InetSocketAddress ( bindAddress , 0 ) ) ; java.net.InetSocketAddress actualAddress = ( ( java.net.InetSocketAddress ) ( dc.socket ( ) . getLocalSocketAddress ( ) ) ) ; assertEquals ( bindAddress , actualAddress.getAddress ( ) ) ; assertTrue ( ( ( actualAddress.getPort ( ) ) > 0 ) ) ; dc.close ( ) ; }