auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void apply ( ) throws com.intellij.openapi.options.ConfigurationException { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = new com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState ( ) ; state.fakeBucketName = fakeBucketNameField.getText ( ) ; state.shouldUseFakeBucket = useFakeBucketCheckbox.isSelected ( ) ; getSavedSettings ( ) . loadState ( state ) ; }

Target:
public void apply ( ) throws com.intellij.openapi.options.ConfigurationException { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = new com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState ( ) ; state.fakeBucketName = fakeBucketNameField.getText ( ) ; state.shouldUseFakeBucket = useFakeBucketCheckbox.isSelected ( ) ; state.urlChoice = getUrlChoice ( ) ; state.backendUrl = getBackendUrl ( ) ; state.customUrl = customUrlField.getText ( ) ; getSavedSettings ( ) . loadState ( state ) ; com.google.gct.testing.launcher.CloudAuthenticator.recreateTest ( getBackendUrl ( ) ) ; }
Source:
protected void disconnect ( ) { synchronized ( this ) { if ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; } } }

Target:
public synchronized void onAcceptFailed ( ) { cleanUpSdpRecord ( ) ; if ( ( mServerSockets ) != null ) { mServerSockets.shutdown ( false ) ; mServerSockets = null ; } if ( ( ( ! ( mInterrupted ) ) && ( ( mAdapter ) != null ) ) && ( mAdapter.isEnabled ( ) ) ) { startSocketListeners ( ) ; } }
Source:
private static int writeSinkToByteBuffer ( org.conscrypt.OpenSSLBIOSink sink , java.nio.ByteBuffer dst ) { int toWrite = java.lang.Math.min ( sink.available ( ) , dst.remaining ( ) ) ; dst.put ( sink.toByteArray ( ) , sink.position ( ) , toWrite ) ; sink.skip ( toWrite ) ; return toWrite ; }

Target:
private static void checkIndex ( int arrayLength , int offset , int length , java.lang.String arrayName ) { if ( ( ( offset | length ) < 0 ) || ( ( offset + length ) > arrayLength ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( ( ( ( ( "offset: " + offset ) + ", length: " ) + length ) + " (expected: offset <= offset + length <= " ) + arrayName ) + ".length (" ) + arrayLength ) + "))" ) ) ; } }
Source:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }
Source:
private static void waitForCondition ( java.util.function.BooleanSupplier condition ) throws java.lang.Exception { int count = 0 ; boolean lastResult ; while ( ( ! ( lastResult = condition.getAsBoolean ( ) ) ) && ( ( count ++ ) < 30 ) ) { java.lang.Thread.sleep ( 1000 ) ; } assertTrue ( ( "Failed condition: " + condition ) , lastResult ) ; }

Target:
private static void waitForCondition ( java.util.function.BooleanSupplier condition ) throws java.lang.Exception { int count = 0 ; boolean lastResult ; while ( ( ! ( lastResult = condition.getAsBoolean ( ) ) ) && ( ( count ++ ) < 120 ) ) { java.lang.Thread.sleep ( 1000 ) ; } org.junit.Assert.assertTrue ( ( "Failed condition: " + condition ) , lastResult ) ; }
Source:
private boolean shouldShowNoteSentToast ( com.android.incallui.call.DialerCall call ) { return ( ( call != null ) && ( com.android.incallui.CallCardPresenter.hasCallSubject ( call ) ) ) && ( ( ( call.getState ( ) ) == ( com.android.incallui.call.DialerCall.State.DIALING ) ) || ( ( call.getState ( ) ) == ( com.android.incallui.call.DialerCall.State.CONNECTING ) ) ) ; }

Target:
private boolean shouldShowNoteSentToast ( com.android.incallui.call.DialerCall call ) { return ( ( call != null ) && ( com.android.incallui.CallCardPresenter.hasCallSubject ( call ) ) ) && ( ( ( call.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.DIALING ) ) || ( ( call.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.CONNECTING ) ) ) ; }
Source:
void onPostDialContinue ( com.android.server.telecom.Call call , boolean proceed ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "onPostDialContinue" ) ) ) { try { logOutgoing ( "onPostDialContinue %s %b" , callId , proceed ) ; mServiceInterface.onPostDialContinue ( callId , proceed ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void stopDtmfTone ( com.android.server.telecom.Call call ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "stopDtmfTone" ) ) ) { try { logOutgoing ( "stopDtmfTone %s" , callId ) ; mServiceInterface.stopDtmfTone ( callId , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException e ) { } } }
Source:
public void test_SSLEngine_getEnableSessionCreation ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; javax.net.ssl.SSLEngine e = c.clientContext.createSSLEngine ( ) ; assertTrue ( e.getEnableSessionCreation ( ) ) ; c.close ( ) ; }

Target:
public void test_SSLEngine_getEnableSessionCreation ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; javax.net.ssl.SSLEngine e = c.clientContext.createSSLEngine ( ) ; assertTrue ( e.getEnableSessionCreation ( ) ) ; c.close ( ) ; libcore.javax.net.ssl.TestSSLEnginePair.close ( new javax.net.ssl.SSLEngine [ ] { e } ) ; }
Source:
public void testKeyguardLock ( ) throws java.lang.Exception { if ( ! ( isHandheld ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "KeyguardLockActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "KeyguardLockActivity" } ) ; mAmWmState.assertVisibility ( "KeyguardLockActivity" , true ) ; executeShellCommand ( android.server.cts.FINISH_ACTIVITY_BROADCAST ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; }

Target:
public void testDismissKeyguard_fromShowWhenLocked_notAllowed ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; executeShellCommand ( "am broadcast -a trigger_broadcast --ez dismissKeyguard true" ) ; assertShowingAndOccluded ( ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { Main.byteToLong ( ) ; Main.shortToLong ( ) ; Main.intToLong ( ) ; Main.charToLong ( ) ; Main.longToInt ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { Main.byteToLong ( ) ; Main.shortToLong ( ) ; Main.intToLong ( ) ; Main.charToLong ( ) ; Main.longToInt ( ) ; Main.shortToByte ( ) ; Main.intToByte ( ) ; Main.charToByte ( ) ; }
Source:
public void run ( ) { android.os.Looper.prepare ( ) ; android.os.Process.setThreadPriority ( android.os.Process.THREAD_PRIORITY_FOREGROUND ) ; mPolicy.init ( mContext , mService , mPM ) ; synchronized ( this ) { mRunning = true ; notifyAll ( ) ; } android.os.Looper.loop ( ) ; }

Target:
public void run ( ) { android.os.Looper.prepare ( ) ; com.android.internal.view.WindowManagerPolicyThread.set ( this , android.os.Looper.myLooper ( ) ) ; android.os.Process.setThreadPriority ( android.os.Process.THREAD_PRIORITY_FOREGROUND ) ; mPolicy.init ( mContext , mService , mPM ) ; synchronized ( this ) { mRunning = true ; notifyAll ( ) ; } android.os.Looper.loop ( ) ; }
Source:
public void testWithTextResourceId ( ) { android.widget.TextView textView = new android.widget.TextView ( context ) ; textView.setText ( R.string.something ) ; assertTrue ( android.support.test.espresso.matcher.ViewMatchers.withText ( R.string.something ) . matches ( textView ) ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.withText ( R.string.other_string ) . matches ( textView ) ) ; }

Target:
public void withTextResourceIdTest ( ) { android.widget.TextView textView = new android.widget.TextView ( context ) ; textView.setText ( R.string.something ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.matcher.ViewMatchers.withText ( R.string.something ) . matches ( textView ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.withText ( R.string.other_string ) . matches ( textView ) ) ; }
Source:
public void copyFrom ( byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( byte [ ] d ) { validateIsInt8 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
void playDtmfTone ( char digit ) { if ( ( mConnectionService ) == null ) { com.android.server.telecom.Log.w ( this , "playDtmfTone() request on a call without a connection service." ) ; } else { com.android.server.telecom.Log.i ( this , "Send playDtmfTone to connection service for call %s" , this ) ; mConnectionService.playDtmfTone ( this , digit ) ; com.android.server.telecom.Log.event ( this , Log.Events.START_DTMF , com.android.server.telecom.Log.pii ( digit ) ) ; } }

Target:
public void setVideoProvider ( com.android.internal.telecom.IVideoProvider videoProvider ) { android.telecom.Log.v ( this , "setVideoProvider" ) ; if ( videoProvider != null ) { try { mVideoProviderProxy = new com.android.server.telecom.VideoProviderProxy ( mLock , videoProvider , this ) ; } catch ( android.os.RemoteException ignored ) { } } else { mVideoProviderProxy = null ; } mVideoProvider = videoProvider ; for ( com.android.server.telecom.Call.Listener l : mListeners ) { l.onVideoCallProviderChanged ( this ) ; } }
Source:
public void test_entries ( ) throws java.lang.Exception { tests.support.resource.Support_Resources.copyFile ( resources , null , jarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , jarName ) ) ; java.util.Enumeration < java.util.jar.JarEntry > e = jarFile.entries ( ) ; int i ; for ( i = 0 ; e.hasMoreElements ( ) ; i ++ ) { e.nextElement ( ) ; } assertEquals ( jarFile.size ( ) , i ) ; jarFile.close ( ) ; assertEquals ( 6 , i ) ; }

Target:
public void test_entries ( ) throws java.lang.Exception { java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , jarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file ) ; java.util.Enumeration < java.util.jar.JarEntry > e = jarFile.entries ( ) ; int i ; for ( i = 0 ; e.hasMoreElements ( ) ; i ++ ) { e.nextElement ( ) ; } assertEquals ( jarFile.size ( ) , i ) ; jarFile.close ( ) ; assertEquals ( 6 , i ) ; }
Source:
public static com.android.jack.dx.rop.code.RopMethod optimize ( com.android.jack.dx.rop.code.RopMethod rmeth , int paramWidth , boolean isStatic , boolean inPreserveLocals , com.android.jack.dx.rop.code.TranslationAdvice inAdvice ) { return com.android.jack.dx.ssa.Optimizer.optimize ( rmeth , paramWidth , isStatic , inPreserveLocals , inAdvice , java.util.EnumSet.allOf ( com.android.jack.dx.ssa.Optimizer.OptionalStep.class ) ) ; }

Target:
public static com.android.jack.dx.rop.code.RopMethod optimize ( com.android.jack.dx.rop.code.RopMethod rmeth , int paramWidth , boolean isStatic , boolean inPreserveLocals , boolean removeRedundantConditionalBranch , com.android.jack.dx.rop.code.TranslationAdvice inAdvice ) { return com.android.jack.dx.ssa.Optimizer.optimize ( rmeth , paramWidth , isStatic , inPreserveLocals , removeRedundantConditionalBranch , inAdvice , java.util.EnumSet.allOf ( com.android.jack.dx.ssa.Optimizer.OptionalStep.class ) ) ; }
Source:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.getPropertyPrefix ( ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; typePath.addSuffix ( fileType.getFileExtension ( ) ) ; typePath.prependPath ( fileType.getVPathPrefix ( ) ) ; return outputVDir.createOutputVFile ( typePath ) ; }

Target:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.getPropertyPrefix ( ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; com.android.sched.vfs.VPath clonedPath = typePath.clone ( ) ; clonedPath.addSuffix ( fileType.getFileExtension ( ) ) ; clonedPath.prependPath ( fileType.getVPathPrefix ( ) ) ; return outputVDir.createOutputVFile ( clonedPath ) ; }
Source:
protected void addPathToBuild ( com.android.tradefed.build.IBuildInfo buildInfo ) { if ( ( buildInfo.getFile ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PYTHONPATH ) ) == null ) { buildInfo.setFile ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PYTHONPATH , new java.io.File ( mVenvDir , "local/lib/python2.7/site-packages" ) , buildInfo.getBuildId ( ) ) ; } if ( ( buildInfo.getFile ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.VIRTUAL_ENV_PATH ) ) == null ) { buildInfo.setFile ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.VIRTUAL_ENV_PATH , new java.io.File ( mVenvDir.getAbsolutePath ( ) ) , buildInfo.getBuildId ( ) ) ; } }

Target:
protected void addPathToBuild ( com.android.tradefed.build.IBuildInfo buildInfo ) throws com.android.tradefed.targetprep.TargetSetupError { java.lang.String target = null ; switch ( getConfiguredPythonVersionMajor ( ) ) { case 2 : target = com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.VIRTUAL_ENV ; break ; case 3 : target = com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.VIRTUAL_ENV_V3 ; break ; } if ( ( buildInfo.getFile ( target ) ) == null ) { buildInfo.setFile ( target , new java.io.File ( mVenvDir.getAbsolutePath ( ) ) , buildInfo.getBuildId ( ) ) ; } }
Source:
private void indexInput ( final com.google.devtools.build.android.desugar.InputFileProvider inputFileProvider ) throws java.io.IOException { for ( java.lang.String relativePath : inputFileProvider ) { if ( ( relativePath.endsWith ( ".class" ) ) && ( ! ( inputFiles.containsKey ( relativePath ) ) ) ) { inputFiles.put ( relativePath , inputFileProvider ) ; } } }

Target:
private com.google.common.collect.ImmutableMap < java.lang.String , com.google.devtools.build.android.desugar.InputFileProvider > indexInputs ( java.util.List < com.google.devtools.build.android.desugar.InputFileProvider > inputProviders ) { java.util.Map < java.lang.String , com.google.devtools.build.android.desugar.InputFileProvider > indexedInputs = new java.util.HashMap < > ( ) ; for ( com.google.devtools.build.android.desugar.InputFileProvider inputProvider : inputProviders ) { for ( java.lang.String relativePath : inputProvider ) { if ( ( relativePath.endsWith ( ".class" ) ) && ( ! ( indexedInputs.containsKey ( relativePath ) ) ) ) { indexedInputs.put ( relativePath , inputProvider ) ; } } } return com.google.common.collect.ImmutableMap.copyOf ( indexedInputs ) ; }
Source:
public void dragStart ( org.eclipse.swt.dnd.DragSourceEvent event ) { if ( ! ( adjustEventCoordinates ( event ) ) ) { event.doit = false ; return ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutCanvas canvas = mGraphicalEditorPart.getCanvasControl ( ) ; if ( canvas != null ) { canvas.getDragSourceListener ( ) . dragStart ( event ) ; } }

Target:
public void dragFinished ( org.eclipse.swt.dnd.DragSourceEvent event ) { adjustEventCoordinates ( event ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutCanvas canvas = mGraphicalEditorPart.getCanvasControl ( ) ; if ( canvas != null ) { canvas.getDragListener ( ) . dragFinished ( event ) ; } }
Source:
public static boolean addLegacyPasspointConfig ( android.net.wifi.WifiConfiguration config ) { if ( ( com.android.server.wifi.hotspot2.PasspointManager.sPasspointManager ) == null ) { android.util.Log.e ( com.android.server.wifi.hotspot2.PasspointManager.TAG , "PasspointManager have not been initialized yet" ) ; return false ; } return com.android.server.wifi.hotspot2.PasspointManager.sPasspointManager.addWifiConfig ( config ) ; }

Target:
public static boolean addLegacyPasspointConfig ( android.net.wifi.WifiConfiguration config ) { if ( ( com.android.server.wifi.hotspot2.PasspointManager.sPasspointManager ) == null ) { android.util.Log.e ( com.android.server.wifi.hotspot2.PasspointManager.TAG , "PasspointManager have not been initialized yet" ) ; return false ; } android.util.Log.d ( com.android.server.wifi.hotspot2.PasspointManager.TAG , ( "Installing legacy Passpoint configuration: " + ( config.FQDN ) ) ) ; return com.android.server.wifi.hotspot2.PasspointManager.sPasspointManager.addWifiConfig ( config ) ; }
Source:
public android.hardware.cts.helpers.TestSensorEvent [ ] collectEvents ( long duration , java.util.concurrent.TimeUnit timeUnit ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return null ; } try { registerListener ( ) ; return getEvents ( duration , timeUnit ) ; } finally { unregisterListener ( ) ; } }

Target:
public void runSensor ( android.hardware.cts.helpers.TestSensorEventListener listener , int eventCount ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } try { registerListener ( listener ) ; waitForEvents ( eventCount ) ; } finally { unregisterListener ( ) ; } }
Source:
native void rsnAllocationData1D ( long con , long id , int off , int mip , int count , short [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
protected void setupEmptyView ( ) { if ( ( ( mEmptyView ) != null ) && ( ( getActivity ( ) ) != null ) ) { if ( ! ( com.android.dialer.util.PermissionsUtil.hasPermission ( getActivity ( ) , android.Manifest.permission.CALL_PHONE ) ) ) { mEmptyView.setImage ( R.drawable.empty_contacts ) ; mEmptyView.setActionLabel ( R.string.permission_single_turn_on ) ; mEmptyView.setDescription ( R.string.permission_place_call ) ; mEmptyView.setActionClickedListener ( this ) ; } else { mEmptyView.setImage ( EmptyContentView.NO_IMAGE ) ; mEmptyView.setActionLabel ( EmptyContentView.NO_LABEL ) ; mEmptyView.setDescription ( EmptyContentView.NO_LABEL ) ; } } }

Target:
protected void setupEmptyView ( ) { if ( ( ( emptyView ) != null ) && ( ( getActivity ( ) ) != null ) ) { if ( ! ( com.android.dialer.util.PermissionsUtil.hasPermission ( getActivity ( ) , android.Manifest.permission.CALL_PHONE ) ) ) { emptyView.setImage ( R.drawable.empty_contacts ) ; emptyView.setActionLabel ( R.string.permission_single_turn_on ) ; emptyView.setDescription ( R.string.permission_place_call ) ; emptyView.setActionClickedListener ( this ) ; } else { emptyView.setImage ( EmptyContentView.NO_IMAGE ) ; emptyView.setActionLabel ( EmptyContentView.NO_LABEL ) ; emptyView.setDescription ( EmptyContentView.NO_LABEL ) ; } } }
Source:
public void acceptVideoRequest ( ) { int requestedVideoState = callback.getRequestedVideoState ( ) ; com.android.dialer.common.Assert.checkArgument ( ( requestedVideoState != ( android.telecom.VideoProfile.STATE_AUDIO_ONLY ) ) ) ; com.android.dialer.common.LogUtil.i ( "ImsVideoTech.acceptUpgradeRequest" , ( "videoState: " + requestedVideoState ) ) ; call.getVideoCall ( ) . sendSessionModifyResponse ( new android.telecom.VideoProfile ( requestedVideoState ) ) ; setSessionModificationState ( SessionModificationState.NO_REQUEST ) ; listener.onUpgradedToVideo ( false ) ; logger.logImpression ( DialerImpression.Type.IMS_VIDEO_REQUEST_ACCEPTED ) ; }

Target:
public void acceptVideoRequest ( @ android.support.annotation.NonNull android.content.Context context ) { int requestedVideoState = callback.getRequestedVideoState ( ) ; com.android.dialer.common.Assert.checkArgument ( ( requestedVideoState != ( android.telecom.VideoProfile.STATE_AUDIO_ONLY ) ) ) ; com.android.dialer.common.LogUtil.i ( "ImsVideoTech.acceptUpgradeRequest" , ( "videoState: " + requestedVideoState ) ) ; call.getVideoCall ( ) . sendSessionModifyResponse ( new android.telecom.VideoProfile ( requestedVideoState ) ) ; setSessionModificationState ( SessionModificationState.NO_REQUEST ) ; listener.onUpgradedToVideo ( false ) ; logger.logImpression ( DialerImpression.Type.IMS_VIDEO_REQUEST_ACCEPTED ) ; }
Source:
public boolean isTrue ( ) throws java.lang.Exception { return device.hasObject ( android.support.test.uiautomator.By.text ( com.android.devtools.systemimage.uitest.smoke.VpnTest.NETWORK_MONITORED_TEXT ) ) ; }

Target:
public boolean isTrue ( ) throws java.lang.Exception { device.openNotification ( ) ; device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( Res.NOTIFICATION_BAR_EXPAND_RES ) . className ( "android.widget.ImageView" ) ) . click ( ) ; return device.hasObject ( android.support.test.uiautomator.By.text ( com.android.devtools.systemimage.uitest.smoke.VpnTest.NETWORK_MONITORED_TEXT ) ) ; }
Source:
public boolean process ( java.io.File outputFile , java.io.File mainFile , java.io.File [ ] libraryFiles , java.util.Map < java.lang.String , java.lang.String > injectAttributes ) { org.w3c.dom.Document mainDoc = com.android.manifmerger.XmlUtils.parseDocument ( mainFile , mLog ) ; if ( mainDoc == null ) { return false ; } boolean success = process ( mainDoc , libraryFiles , injectAttributes ) ; if ( ! ( com.android.manifmerger.XmlUtils.printXmlFile ( mainDoc , outputFile , mLog ) ) ) { success = false ; } return success ; }

Target:
public boolean process ( java.io.File outputFile , java.io.File mainFile , java.io.File [ ] libraryFiles , java.util.Map < java.lang.String , java.lang.String > injectAttributes ) { org.w3c.dom.Document mainDoc = com.android.manifmerger.MergerXmlUtils.parseDocument ( mainFile , mLog ) ; if ( mainDoc == null ) { return false ; } boolean success = process ( mainDoc , libraryFiles , injectAttributes ) ; if ( ! ( com.android.manifmerger.MergerXmlUtils.printXmlFile ( mainDoc , outputFile , mLog ) ) ) { success = false ; } return success ; }
Source:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { mWorkbench = workbench ; setHelpAvailable ( false ) ; org.eclipse.jface.resource.ImageDescriptor desc = com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) . getImageDescriptor ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateWizard.PROJECT_LOGO_LARGE ) ; setDefaultPageImageDescriptor ( desc ) ; if ( ! ( com.android.ide.eclipse.adt.internal.wizards.templates.UpdateToolsPage.isUpToDate ( ) ) ) { mUpdatePage = new com.android.ide.eclipse.adt.internal.wizards.templates.UpdateToolsPage ( ) ; } setNeedsProgressMonitor ( true ) ; }

Target:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { mWorkbench = workbench ; setHelpAvailable ( false ) ; org.eclipse.jface.resource.ImageDescriptor desc = com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) . getImageDescriptor ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateWizard.PROJECT_LOGO_LARGE ) ; setDefaultPageImageDescriptor ( desc ) ; if ( ! ( com.android.ide.eclipse.adt.internal.wizards.templates.UpdateToolsPage.isUpToDate ( ) ) ) { mUpdatePage = new com.android.ide.eclipse.adt.internal.wizards.templates.UpdateToolsPage ( ) ; } setNeedsProgressMonitor ( true ) ; com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . refreshSdk ( ) ; }
Source:
public boolean enableNetworkWithoutConnect ( int netId ) { if ( com.android.server.wifi.WifiNative.DBG ) logDbg ( ( "enableNetworkWithoutConnect nid=" + ( java.lang.Integer.toString ( netId ) ) ) ) ; return doBooleanCommand ( ( ( ( "ENABLE_NETWORK " + netId ) + " " ) + "no-connect" ) ) ; }

Target:
public void setSupplicantLogLevel ( boolean turnOnVerbose ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { int logLevel = ( turnOnVerbose ) ? SupplicantStaIfaceHal.LOG_LEVEL_DEBUG : SupplicantStaIfaceHal.LOG_LEVEL_INFO ; mSupplicantStaIfaceHal.setLogLevel ( logLevel ) ; } else { doStringCommand ( ( "LOG_LEVEL " + ( turnOnVerbose ? "DEBUG" : "INFO" ) ) ) ; } }
Source:
final boolean isPowered ( int plugTypeSet ) { if ( ( mBatteryStatus ) == ( android.os.BatteryManager.BATTERY_STATUS_UNKNOWN ) ) { return true ; } if ( plugTypeSet == 0 ) { return false ; } int plugTypeBit = 0 ; if ( mAcOnline ) { plugTypeBit |= android.os.BatteryManager.BATTERY_PLUGGED_AC ; } if ( mUsbOnline ) { plugTypeBit |= android.os.BatteryManager.BATTERY_PLUGGED_USB ; } return ( plugTypeSet & plugTypeBit ) != 0 ; }

Target:
final boolean isPowered ( int plugTypeSet ) { if ( ( mBatteryStatus ) == ( android.os.BatteryManager.BATTERY_STATUS_UNKNOWN ) ) { return true ; } if ( plugTypeSet == 0 ) { return false ; } int plugTypeBit = 0 ; if ( ( mAcOnline ) && ( ( mBatteryStatus ) == ( android.os.BatteryManager.BATTERY_STATUS_CHARGING ) ) ) { plugTypeBit |= android.os.BatteryManager.BATTERY_PLUGGED_AC ; } if ( ( mUsbOnline ) && ( ( mBatteryStatus ) == ( android.os.BatteryManager.BATTERY_STATUS_CHARGING ) ) ) { plugTypeBit |= android.os.BatteryManager.BATTERY_PLUGGED_USB ; } return ( plugTypeSet & plugTypeBit ) != 0 ; }
Source:
public final java.nio.DoubleBuffer asDoubleBuffer ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 3 ; return new java.nio.ByteBufferAsDoubleBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }

Target:
public final java.nio.DoubleBuffer asDoubleBuffer ( ) { if ( memoryRef.isFreed ) { throw new java.lang.IllegalStateException ( "buffer has been freed" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 3 ; return new java.nio.ByteBufferAsDoubleBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }
Source:
public void onClick ( android.content.DialogInterface dialog , int id ) { java.lang.String password = mView.getText ( R.id.credential_password ) ; if ( android.text.TextUtils.isEmpty ( password ) ) { mView.showError ( R.string.password_empty_error ) ; showDialog ( com.android.certinstaller.CertInstaller.PKCS12_PASSWORD_DIALOG ) ; } else { mNextAction = new com.android.certinstaller.CertInstaller.Pkcs12ExtractAction ( password ) ; mNextAction.run ( this ) ; } }

Target:
public void onClick ( android.content.DialogInterface dialog , int id ) { java.lang.String password = mView.getText ( R.id.credential_password ) ; if ( android.text.TextUtils.isEmpty ( password ) ) { mView.setHasEmptyError ( true ) ; removeDialog ( com.android.certinstaller.CertInstaller.PKCS12_PASSWORD_DIALOG ) ; showDialog ( com.android.certinstaller.CertInstaller.PKCS12_PASSWORD_DIALOG ) ; } else { mNextAction = new com.android.certinstaller.CertInstaller.Pkcs12ExtractAction ( password ) ; mNextAction.run ( this ) ; } }
Source:
public void singleScanSuccess ( ) { com.android.server.wifi.WifiNative.ScanSettings settings = new com.android.server.wifi.ScanTestUtil.NativeScanSettingsBuilder ( ) . withBasePeriod ( 10000 ) . withMaxApPerScan ( 10 ) . addBucketWithBand ( 10000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , WifiScanner.WIFI_BAND_24_GHZ ) . build ( ) ; doSuccessfulSingleScanTest ( settings , expectedBandScanFreqs ( WifiScanner.WIFI_BAND_24_GHZ ) , new java.util.HashSet < java.lang.Integer > ( ) , com.android.server.wifi.ScanResults.create ( 0 , 2400 , 2450 , 2450 , 2400 , 2450 , 2450 , 2400 , 2450 , 2450 ) , false ) ; }

Target:
public void singleScanSuccess ( ) { com.android.server.wifi.WifiNative.ScanSettings settings = new com.android.server.wifi.ScanTestUtil.NativeScanSettingsBuilder ( ) . withBasePeriod ( 10000 ) . withMaxApPerScan ( 10 ) . addBucketWithBand ( 10000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , WifiScanner.WIFI_BAND_24_GHZ ) . build ( ) ; doSuccessfulSingleScanTest ( settings , expectedBandScanFreqs ( WifiScanner.WIFI_BAND_24_GHZ ) , new java.util.HashSet < java.lang.Integer > ( ) , com.android.server.wifi.ScanResults.create ( 0 , isAllChannelsScanned ( WifiScanner.WIFI_BAND_24_GHZ ) , 2400 , 2450 , 2450 , 2400 , 2450 , 2450 , 2400 , 2450 , 2450 ) , false ) ; }
Source:
public boolean isOuterInterface ( java.lang.String outerName , java.lang.String innerName ) { java.lang.Boolean result = known.get ( outerName ) ; if ( result == null ) { org.objectweb.asm.ClassReader outerClass = com.google.common.base.Preconditions.checkNotNull ( classpath.readIfKnown ( outerName ) , "Couldn't find outer class %s of %s" , outerName , innerName ) ; result = com.google.devtools.build.android.desugar.BitFlags.isInterface ( outerClass.getAccess ( ) ) ; known.put ( outerName , result ) ; } return result ; }

Target:
public boolean isOuterInterface ( java.lang.String outerName , java.lang.String innerName ) { java.lang.Boolean result = known.get ( outerName ) ; if ( result == null ) { org.objectweb.asm.ClassReader outerClass = com.google.common.base.Preconditions.checkNotNull ( classpath.readIfKnown ( outerName ) , "Couldn't find outer class %s of %s" , outerName , innerName ) ; result = com.google.devtools.build.android.desugar.io.BitFlags.isInterface ( outerClass.getAccess ( ) ) ; known.put ( outerName , result ) ; } return result ; }
Source:
public void radioCapabilityUpdated ( com.android.internal.telephony.RadioCapability rc ) { mRadioCapability.set ( rc ) ; if ( android.telephony.SubscriptionManager.isValidSubscriptionId ( getSubId ( ) ) ) { sendSubscriptionSettings ( true ) ; } }

Target:
public void radioCapabilityUpdated ( com.android.internal.telephony.RadioCapability rc ) { mRadioCapability.set ( rc ) ; if ( android.telephony.SubscriptionManager.isValidSubscriptionId ( getSubId ( ) ) ) { boolean restoreSelection = ! ( mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.skip_restoring_network_selection ) ) ; sendSubscriptionSettings ( restoreSelection ) ; } }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigManagerDialog.DeviceSelection selection = getSelection ( ) ; if ( ( selection.entry ) != null ) { mManager.removeUserConfiguration ( selection.device , selection.entry.getKey ( ) ) ; } else if ( ( selection.device ) != null ) { mManager.removeUserDevice ( selection.device ) ; } mTreeViewer.refresh ( ) ; select ( ( ( selection.entry ) != null ? selection.device : null ) , null ) ; }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigManagerDialog.DeviceSelection selection = getSelection ( ) ; if ( ( selection.config ) != null ) { mManager.removeUserConfiguration ( selection.device , selection.config.getName ( ) ) ; } else if ( ( selection.device ) != null ) { mManager.removeUserDevice ( selection.device ) ; } mTreeViewer.refresh ( ) ; select ( ( ( selection.config ) != null ? selection.device : null ) , null ) ; }
Source:
public android.view.MotionEvent getPendingTrackballMove ( android.view.IWindow window ) { if ( com.android.server.WindowManagerService.localLOGV ) android.util.Log.v ( com.android.server.WindowManagerService.TAG , ( "IWindow getPendingMotionEvent called for " + window ) ) ; return mKeyWaiter.finishedKey ( this , window , false , com.android.server.WindowManagerService.KeyWaiter.RETURN_PENDING_TRACKBALL ) ; }

Target:
public boolean onTransact ( int code , android.os.Parcel data , android.os.Parcel reply , int flags ) throws android.os.RemoteException { try { return super . onTransact ( code , data , reply , flags ) ; } catch ( java.lang.RuntimeException e ) { if ( ! ( e instanceof java.lang.SecurityException ) ) { android.util.Slog.e ( com.android.server.WindowManagerService.TAG , "Window Session Crash" , e ) ; } throw e ; } }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.String testFilePath = com.android.ide.eclipse.tests.AdtTestData.getInstance ( ) . getTestFilePath ( com.android.ide.eclipse.adt.internal.project.AndroidManifestParserTest.TESTAPP_XML ) ; mManifestTestApp = com.android.ide.eclipse.adt.internal.project.AndroidManifestParser.parseForData ( testFilePath ) ; assertNotNull ( mManifestTestApp ) ; testFilePath = com.android.ide.eclipse.tests.AdtTestData.getInstance ( ) . getTestFilePath ( com.android.ide.eclipse.adt.internal.project.AndroidManifestParserTest.INSTRUMENTATION_XML ) ; mManifestInstrumentation = com.android.ide.eclipse.adt.internal.project.AndroidManifestParser.parseForData ( testFilePath ) ; assertNotNull ( mManifestInstrumentation ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.String testFilePath = com.android.ide.eclipse.tests.AdtTestData.getInstance ( ) . getTestFilePath ( com.android.ide.eclipse.adt.internal.project.AndroidManifestParserTest.TESTAPP_XML ) ; mManifestTestApp = com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper.parseForData ( testFilePath ) ; assertNotNull ( mManifestTestApp ) ; testFilePath = com.android.ide.eclipse.tests.AdtTestData.getInstance ( ) . getTestFilePath ( com.android.ide.eclipse.adt.internal.project.AndroidManifestParserTest.INSTRUMENTATION_XML ) ; mManifestInstrumentation = com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper.parseForData ( testFilePath ) ; assertNotNull ( mManifestInstrumentation ) ; }
Source:
public static int runSmaliTest ( java.lang.String name , boolean input ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , new java.lang.Class [ ] { boolean . class } ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , input ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }

Target:
public static int $noinline$runSmaliTest ( java.lang.String name , boolean input ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , new java.lang.Class [ ] { boolean . class } ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , input ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }
Source:
public int getVersionCode ( ) { return versionCode ; }

Target:
public java.util.Collection < java.lang.String > getFilterTypes ( ) { com.google.common.collect.ImmutableList.Builder < java.lang.String > splitTypeBuilder = com.google.common.collect.ImmutableList.builder ( ) ; if ( ( densityFilter ) != null ) { splitTypeBuilder.add ( OutputFile.DENSITY ) ; } if ( ( abiFilter ) != null ) { splitTypeBuilder.add ( OutputFile.ABI ) ; } return splitTypeBuilder.build ( ) ; }
Source:
public void testNativeTcpSocketPair ( ) throws java.lang.Exception { for ( java.lang.String addr : android.net.cts.IpSecBaseTest.LOOPBACK_ADDRS ) { java.net.InetAddress local = java.net.InetAddress.getByName ( addr ) ; try ( android.net.IpSecTransform transform = getTransform ( local ) ) { android.net.cts.IpSecBaseTest.SocketPair < android.net.cts.IpSecBaseTest.NativeTcpSocket > sockets = android.net.cts.IpSecBaseTest.getNativeTcpSocketPair ( local , mISM , transform ) ; checkSocketPair ( sockets.mLeftSock , sockets.mRightSock ) ; } } }

Target:
public void testNativeTcpSocketPair ( ) throws java.lang.Exception { for ( java.lang.String addr : android.net.cts.IpSecBaseTest.LOOPBACK_ADDRS ) { java.net.InetAddress local = java.net.InetAddress.getByName ( addr ) ; try ( android.net.IpSecTransform transform = buildDefaultTransform ( local ) ) { android.net.cts.IpSecBaseTest.SocketPair < android.net.cts.IpSecBaseTest.NativeTcpSocket > sockets = android.net.cts.IpSecBaseTest.getNativeTcpSocketPair ( local , mISM , transform ) ; checkSocketPair ( sockets.mLeftSock , sockets.mRightSock ) ; } } }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.util.prefs.Preferences pref = java.util.prefs.Preferences.userNodeForPackage ( java.util.prefs.Preferences.class ) ; for ( java.lang.String child : pref.childrenNames ( ) ) { pref.node ( child ) . removeNode ( ) ; } pref.clear ( ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; final java.io.File tmpDir = libcore.io.IoUtils.createTemporaryDirectory ( "OldPreferenceTest" ) ; defaultFactory = java.util.prefs.Preferences.setPreferencesFactory ( new libcore.java.util.prefs.PreferencesTest.TestPreferencesFactory ( tmpDir.getAbsolutePath ( ) ) ) ; java.util.prefs.Preferences pref = java.util.prefs.Preferences.userNodeForPackage ( java.util.prefs.Preferences.class ) ; for ( java.lang.String child : pref.childrenNames ( ) ) { pref.node ( child ) . removeNode ( ) ; } pref.clear ( ) ; }
Source:
public void initForSecondary ( ) { middleLength = 3 ; minBytes [ 1 ] = 0 ; maxBytes [ 1 ] = 0 ; minBytes [ 2 ] = 0 ; maxBytes [ 2 ] = 0 ; minBytes [ 3 ] = ( Collation.MERGE_SEPARATOR_BYTE ) + 1 ; maxBytes [ 3 ] = 255 ; minBytes [ 4 ] = 2 ; maxBytes [ 4 ] = 255 ; }

Target:
public void initForSecondary ( ) { middleLength = 3 ; minBytes [ 1 ] = 0 ; maxBytes [ 1 ] = 0 ; minBytes [ 2 ] = 0 ; maxBytes [ 2 ] = 0 ; minBytes [ 3 ] = ( Collation.LEVEL_SEPARATOR_BYTE ) + 1 ; maxBytes [ 3 ] = 255 ; minBytes [ 4 ] = 2 ; maxBytes [ 4 ] = 255 ; }
Source:
public void setVisibleRow ( int row ) { myVisibleRow = row ; final java.awt.Rectangle rowBounds = getRowBounds ( myVisibleRow ) ; final int indent = ( rowBounds.x ) - ( getVisibleRect ( ) . x ) ; setPreferredSize ( new java.awt.Dimension ( ( ( getRowBounds ( myVisibleRow ) . width ) + indent ) , getPreferredSize ( ) . height ) ) ; }

Target:
public void setVisibleRow ( int row ) { myVisibleRow = row ; final java.awt.Rectangle rowBounds = getRowBounds ( myVisibleRow ) ; final int indent = ( ( rowBounds.x ) - ( getVisibleRect ( ) . x ) ) - ( getTreeColumnOffset ( ) ) ; setPreferredSize ( new java.awt.Dimension ( ( ( getRowBounds ( myVisibleRow ) . width ) + indent ) , getPreferredSize ( ) . height ) ) ; }
Source:
public void testCommentAfterDeclaration ( ) throws java.lang.Exception { com.intellij.psi.formatter.java.CodeStyleSettings codeStyleSettings = com.intellij.psi.formatter.java.CodeStyleSettingsManager.getSettings ( getProject ( ) ) ; int oldMargin = codeStyleSettings.getDefaultRightMargin ( ) ; try { codeStyleSettings.setDefaultRightMargin ( 20 ) ; codeStyleSettings.ASSIGNMENT_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED ; doMethodTest ( "int i=0; //comment comment" , ( "int i =\n" + " 0; //comment comment" ) ) ; } finally { codeStyleSettings.setDefaultRightMargin ( oldMargin ) ; } }

Target:
public void testCommentAfterDeclaration ( ) throws java.lang.Exception { com.intellij.psi.formatter.java.CodeStyleSettings codeStyleSettings = com.intellij.psi.formatter.java.CodeStyleSettingsManager.getSettings ( getProject ( ) ) ; com.intellij.psi.formatter.java.CommonCodeStyleSettings javaSettings = codeStyleSettings.getCommonSettings ( JavaLanguage.INSTANCE ) ; int oldMargin = codeStyleSettings.getDefaultRightMargin ( ) ; int oldWrap = javaSettings.ASSIGNMENT_WRAP ; try { codeStyleSettings.setDefaultRightMargin ( 20 ) ; javaSettings.ASSIGNMENT_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED ; doMethodTest ( "int i=0; //comment comment" , ( "int i =\n" + " 0; //comment comment" ) ) ; } finally { codeStyleSettings.setDefaultRightMargin ( oldMargin ) ; javaSettings.ASSIGNMENT_WRAP = oldWrap ; } }
Source:
private com.android.ide.common.rendering.api.RenderSession convertToScene ( com.android.layoutlib.api.ILayoutResult result ) { com.android.ide.common.rendering.api.Result sceneResult ; com.android.ide.common.rendering.api.ViewInfo rootViewInfo ; if ( ( result.getSuccess ( ) ) == ( com.android.layoutlib.api.ILayoutResult.SUCCESS ) ) { sceneResult = Status.SUCCESS.createResult ( ) ; rootViewInfo = convertToViewInfo ( result.getRootView ( ) ) ; } else { sceneResult = Status.ERROR_UNKNOWN.createResult ( result.getErrorMessage ( ) ) ; rootViewInfo = null ; } return new com.android.ide.common.rendering.StaticRenderSession ( sceneResult , rootViewInfo , result.getImage ( ) ) ; }

Target:
private com.android.ide.common.rendering.api.RenderSession convertToScene ( com.android.layoutlib.api.ILayoutResult result ) { com.android.ide.common.rendering.api.Result sceneResult ; com.android.ide.common.rendering.api.ViewInfo rootViewInfo = null ; if ( ( result.getSuccess ( ) ) == ( com.android.layoutlib.api.ILayoutResult.SUCCESS ) ) { sceneResult = Status.SUCCESS.createResult ( ) ; com.android.layoutlib.api.ILayoutResult.ILayoutViewInfo oldRootView = result.getRootView ( ) ; if ( oldRootView != null ) { rootViewInfo = convertToViewInfo ( oldRootView ) ; } } else { sceneResult = Status.ERROR_UNKNOWN.createResult ( result.getErrorMessage ( ) ) ; } return new com.android.ide.common.rendering.StaticRenderSession ( sceneResult , rootViewInfo , result.getImage ( ) ) ; }
Source:
private void receiveByDatagramSocket ( int bufSize , java.net.InetSocketAddress address , java.lang.String expectedString ) throws java.io.IOException { byte [ ] buf = new byte [ bufSize ] ; this . datagramSocket1.setSoTimeout ( 6000 ) ; java.net.DatagramPacket rdp = new java.net.DatagramPacket ( buf , buf.length ) ; this . datagramSocket1.receive ( rdp ) ; assertEquals ( new java.lang.String ( buf , 0 , bufSize ) . trim ( ) , expectedString ) ; }

Target:
private void receiveOnDatagramSocket1 ( int bufSize , java.lang.String expectedString ) throws java.io.IOException { byte [ ] buf = new byte [ bufSize ] ; this . datagramSocket1.setSoTimeout ( 6000 ) ; java.net.DatagramPacket rdp = new java.net.DatagramPacket ( buf , buf.length ) ; this . datagramSocket1.receive ( rdp ) ; assertEquals ( new java.lang.String ( buf , 0 , bufSize ) . trim ( ) , expectedString ) ; }
Source:
boolean connectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ! ( mStateMachine.isConnected ( ) ) ) { return false ; } if ( mStateMachine.isAudioOn ( ) ) { return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO ) ; return true ; }

Target:
boolean connectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ! ( mStateMachine.isConnected ( ) ) ) { return false ; } if ( ! ( mStateMachine.isSlcConnected ( ) ) ) { return false ; } if ( mStateMachine.isAudioOn ( ) ) { return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO ) ; return true ; }
Source:
public void dumpShowsLastFailureTraceAndPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #1" ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #2" ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #1" ) ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #2" ) ) ; }

Target:
public void dumpShowsLastFailureTraceAndPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #1" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #2" ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #1" ) ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #2" ) ) ; }
Source:
void crashApplication ( com.android.server.am.ProcessRecord r , android.app.ApplicationErrorReport.CrashInfo crashInfo ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { crashApplicationInner ( r , crashInfo ) ; } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }

Target:
void crashApplication ( com.android.server.am.ProcessRecord r , android.app.ApplicationErrorReport.CrashInfo crashInfo ) { final int callingPid = android.os.Binder.getCallingPid ( ) ; final int callingUid = android.os.Binder.getCallingUid ( ) ; final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { crashApplicationInner ( r , crashInfo , callingPid , callingUid ) ; } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
private static java.lang.Process exec ( java.lang.String cmd ) throws java.io.IOException { java.lang.String [ ] cmdarray = new java.lang.String [ ] { "sh" , "-c" , cmd } ; android.util.Log.v ( com.google.android.traceur.AtraceUtils.TAG , ( "exec: " + ( java.util.Arrays.toString ( cmdarray ) ) ) ) ; return com.google.android.traceur.AtraceUtils.RUNTIME.exec ( cmdarray ) ; }

Target:
private static java.lang.Process exec ( java.lang.String cmd ) throws java.io.IOException { java.lang.String [ ] cmdarray = new java.lang.String [ ] { "sh" , "-c" , cmd } ; android.util.Log.v ( com.android.traceur.AtraceUtils.TAG , ( "exec: " + ( java.util.Arrays.toString ( cmdarray ) ) ) ) ; return com.android.traceur.AtraceUtils.RUNTIME.exec ( cmdarray ) ; }