auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void test_setOption ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.setOption ( java.net.StandardSocketOptions.SO_SNDBUF , 1000 ) ; assertEquals ( 1000 , ( ( int ) ( dc.getOption ( java.net.StandardSocketOptions.SO_SNDBUF ) ) ) ) ; assertEquals ( 1000 , dc.socket ( ) . getSendBufferSize ( ) ) ; dc.close ( ) ; try { dc.setOption ( java.net.StandardSocketOptions.SO_LINGER , 2000 ) ; fail ( ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }

Target:
public void test_setOption ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.setOption ( java.net.StandardSocketOptions.SO_SNDBUF , 1024 ) ; assertEquals ( 1024 , ( ( int ) ( dc.getOption ( java.net.StandardSocketOptions.SO_SNDBUF ) ) ) ) ; assertEquals ( 1024 , dc.socket ( ) . getSendBufferSize ( ) ) ; dc.close ( ) ; try { dc.setOption ( java.net.StandardSocketOptions.SO_SNDBUF , 1024 ) ; fail ( ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }
Source:
public boolean remove ( java.lang.Object o ) { return ( contains ( o ) ) && ( multiset ( ) . elementSet ( ) . remove ( ( ( com.google.common.collect.Multiset.Entry < ? > ) ( o ) ) . getElement ( ) ) ) ; }

Target:
public boolean remove ( java.lang.Object object ) { if ( object instanceof com.google.common.collect.Multiset.Entry ) { com.google.common.collect.Multiset.Entry < ? > entry = ( ( com.google.common.collect.Multiset.Entry < ? > ) ( object ) ) ; java.lang.Object element = entry.getElement ( ) ; int entryCount = entry.getCount ( ) ; if ( entryCount != 0 ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) com.google.common.collect.Multiset < java.lang.Object > multiset = ( ( com.google.common.collect.Multiset ) ( multiset ( ) ) ) ; return multiset.setCount ( element , entryCount , 0 ) ; } } return false ; }
Source:
protected void deleteRemoteBranch ( ) { git4idea.repo.GitRepository repository = org.jetbrains.plugins.github.GithubUtil.getGitRepository ( myProject , myProjectRoot ) ; if ( repository != null ) { com.intellij.openapi.components.ServiceManager.getService ( git4idea.commands.Git.class ) . push ( repository , "origin" , org.jetbrains.plugins.github.GithubCreatePullRequestTestBase.PROJECT_URL , ( ":" + ( BRANCH_NAME ) ) ) ; } }

Target:
protected void deleteRemoteBranch ( ) { git4idea.repo.GitRepository repository = org.jetbrains.plugins.github.util.GithubUtil.getGitRepository ( myProject , myProjectRoot ) ; if ( repository != null ) { com.intellij.openapi.components.ServiceManager.getService ( git4idea.commands.Git.class ) . push ( repository , "origin" , org.jetbrains.plugins.github.GithubCreatePullRequestTestBase.PROJECT_URL , ( ":" + ( BRANCH_NAME ) ) ) ; } }
Source:
public org.conscrypt.OpenSSLContextImpl createContext ( ) throws java.lang.Exception { org.conscrypt.OpenSSLContextImpl context = super . createContext ( ) ; org.conscrypt.SSLParametersImpl sslParameters = getContextSSLParameters ( context ) ; if ( ( ctVerifier ) != null ) { sslParameters.setCTVerifier ( ctVerifier ) ; } sslParameters.setCTVerificationEnabled ( ctVerificationEnabled ) ; return context ; }

Target:
public org.conscrypt.OpenSSLContextImpl createContext ( ) throws java.lang.Exception { org.conscrypt.OpenSSLContextImpl context = super . createContext ( ) ; org.conscrypt.SSLParametersImpl sslParameters = getContextSSLParameters ( context ) ; if ( ctVerificationEnabled ) { org.conscrypt.TrustManagerImpl trustManager = getSSLParametersTrustManager ( sslParameters ) ; if ( ( ctVerifier ) != null ) { trustManager.setCTVerifier ( ctVerifier ) ; } if ( ( ctPolicy ) != null ) { trustManager.setCTPolicy ( ctPolicy ) ; } sslParameters.setCTVerificationEnabled ( ctVerificationEnabled ) ; trustManager.setCTEnabledOverride ( ctVerificationEnabled ) ; } return context ; }
Source:
synchronized long nScriptKernelIDCreate ( long sid , int slot , int sig ) { validate ( ) ; return rsnScriptKernelIDCreate ( mContext , sid , slot , sig ) ; }

Target:
synchronized long nScriptKernelIDCreate ( long sid , int slot , int sig , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } return rsnScriptKernelIDCreate ( curCon , sid , slot , sig , mUseInc ) ; }
Source:
void createNewUserLILPw ( int userHandle ) { if ( ( mInstaller ) != null ) { mInstaller.createUserConfig ( userHandle ) ; mSettings.createNewUserLILPw ( this , mInstaller , userHandle ) ; applyFactoryDefaultBrowserLPw ( userHandle ) ; primeDomainVerificationsLPw ( userHandle ) ; } }

Target:
void createNewUser ( int userId ) { synchronized ( mInstallLock ) { mSettings.createNewUserLI ( this , mInstaller , userId ) ; } synchronized ( mPackages ) { scheduleWritePackageRestrictionsLocked ( userId ) ; scheduleWritePackageListLocked ( userId ) ; applyFactoryDefaultBrowserLPw ( userId ) ; primeDomainVerificationsLPw ( userId ) ; } }
Source:
public void testPacakgeField ( ) { android.signature.cts.JDiffClassDescription clz = createNormalClass ( ) ; android.signature.cts.JDiffClassDescription.JDiffField field = new android.signature.cts.JDiffClassDescription.JDiffField ( "PACAKGE_FIELD" , "java.lang.String" , 0 ) ; clz.addField ( field ) ; clz.checkSignatureCompliance ( ) ; assertEquals ( field.toSignatureString ( ) , "java.lang.String PACAKGE_FIELD" ) ; }

Target:
public void testPacakgeField ( ) { android.signature.cts.JDiffClassDescription clz = createNormalClass ( ) ; android.signature.cts.JDiffClassDescription.JDiffField field = new android.signature.cts.JDiffClassDescription.JDiffField ( "PACAKGE_FIELD" , "java.lang.String" , 0 , android.signature.cts.tests.JDiffClassDescriptionTest.VALUE ) ; clz.addField ( field ) ; clz.checkSignatureCompliance ( ) ; assertEquals ( field.toSignatureString ( ) , "java.lang.String PACAKGE_FIELD" ) ; }
Source:
public com.android.tools.lint.TypeDescriptor getSuperClass ( ) { if ( ( mBinding ) instanceof org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) { org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refBinding = ( ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) ( mBinding ) ) ; org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding superClass = refBinding.superclass ( ) ; if ( superClass != null ) { return com.android.tools.lint.EcjParser.getTypeDescriptor ( superClass ) ; } } return null ; }

Target:
public com.android.tools.lint.ResolvedClass getSuperClass ( ) { if ( ( mBinding ) instanceof org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) { org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refBinding = ( ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) ( mBinding ) ) ; org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding superClass = refBinding.superclass ( ) ; if ( superClass != null ) { return new com.android.tools.lint.EcjParser.EcjResolvedClass ( superClass ) ; } } return null ; }
Source:
private com.android.sdklib.internal.repository.Archive parseArchive ( org.w3c.dom.Node archiveNode ) { com.android.sdklib.internal.repository.Archive a = new com.android.sdklib.internal.repository.Archive ( this , ( ( com.android.sdklib.internal.repository.Archive.Os ) ( com.android.sdklib.internal.repository.XmlParserUtils.getEnumAttribute ( archiveNode , SdkRepository.ATTR_OS , com.android.sdklib.internal.repository.Archive.Os.values ( ) , null ) ) ) , ( ( com.android.sdklib.internal.repository.Archive.Arch ) ( com.android.sdklib.internal.repository.XmlParserUtils.getEnumAttribute ( archiveNode , SdkRepository.ATTR_ARCH , com.android.sdklib.internal.repository.Archive.Arch.values ( ) , Arch.ANY ) ) ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlString ( archiveNode , SdkRepository.NODE_URL ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlLong ( archiveNode , SdkRepository.NODE_SIZE , 0 ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlString ( archiveNode , SdkRepository.NODE_CHECKSUM ) ) ; return a ; }

Target:
private com.android.sdklib.internal.repository.Archive parseArchive ( org.w3c.dom.Node archiveNode ) { com.android.sdklib.internal.repository.Archive a = new com.android.sdklib.internal.repository.Archive ( this , ( ( com.android.sdklib.internal.repository.Archive.Os ) ( com.android.sdklib.internal.repository.XmlParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_OS , com.android.sdklib.internal.repository.Archive.Os.values ( ) , null ) ) ) , ( ( com.android.sdklib.internal.repository.Archive.Arch ) ( com.android.sdklib.internal.repository.XmlParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_ARCH , com.android.sdklib.internal.repository.Archive.Arch.values ( ) , Arch.ANY ) ) ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_URL ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlLong ( archiveNode , SdkRepoConstants.NODE_SIZE , 0 ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_CHECKSUM ) ) ; return a ; }
Source:
public int computeHorizontalScrollRange ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { int ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer call ( ) { return computeHorizontalScrollRange ( ) ; } } ) ; return ret ; } return mAwContents.computeHorizontalScrollRange ( ) ; }

Target:
public android.print.PrintDocumentAdapter createPrintDocumentAdapter ( ) { return createPrintDocumentAdapter ( "default" ) ; }
Source:
public boolean resetRoamingConfiguration ( ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "resetRoamingConfiguration " ) ; try { if ( ( mWifiVendorHal ) != null ) { com.android.server.wifi.WifiNative.RoamingConfig config = new com.android.server.wifi.WifiNative.RoamingConfig ( ) ; return mWifiVendorHal.configureRoaming ( config ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } return false ; }

Target:
public boolean setPnoList ( com.android.server.wifi.WifiNative.PnoSettings settings , com.android.server.wifi.WifiNative.PnoEventHandler eventHandler ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "setPnoList not supported" ) ; return false ; } else { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "setPnoList cmd " + ( com.android.server.wifi.WifiNative.sPnoCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.sPnoCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; com.android.server.wifi.WifiNative.sPnoEventHandler = eventHandler ; if ( com.android.server.wifi.WifiNative.setPnoListNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sPnoCmdId , settings ) ) { return true ; } } com.android.server.wifi.WifiNative.sPnoEventHandler = null ; return false ; } } }
Source:
private void setSystemAudioState ( android.telecom.CallAudioState newCallAudioState , boolean force ) { com.android.server.telecom.Log.i ( this , "setSystemAudioState: changing from %s to %s" , mLastKnownCallAudioState , newCallAudioState ) ; com.android.server.telecom.Log.event ( mCallsManager.getForegroundCall ( ) , Log.Events.AUDIO_ROUTE , android.telecom.CallAudioState.audioRouteToString ( newCallAudioState.getRoute ( ) ) ) ; if ( force || ( ! ( newCallAudioState.equals ( mLastKnownCallAudioState ) ) ) ) { mCallsManager.onCallAudioStateChanged ( mLastKnownCallAudioState , newCallAudioState ) ; updateAudioForForegroundCall ( newCallAudioState ) ; mLastKnownCallAudioState = newCallAudioState ; } }

Target:
private void setSystemAudioState ( android.telecom.CallAudioState newCallAudioState , boolean force ) { android.telecom.Log.i ( this , "setSystemAudioState: changing from %s to %s" , mLastKnownCallAudioState , newCallAudioState ) ; android.telecom.Log.addEvent ( mCallsManager.getForegroundCall ( ) , LogUtils.Events.AUDIO_ROUTE , android.telecom.CallAudioState.audioRouteToString ( newCallAudioState.getRoute ( ) ) ) ; if ( force || ( ! ( newCallAudioState.equals ( mLastKnownCallAudioState ) ) ) ) { mCallsManager.onCallAudioStateChanged ( mLastKnownCallAudioState , newCallAudioState ) ; updateAudioForForegroundCall ( newCallAudioState ) ; mLastKnownCallAudioState = newCallAudioState ; } }
Source:
protected void onLayout ( boolean changed , int l , int t , int r , int b ) { super . onLayout ( changed , l , t , r , b ) ; if ( changed ) { if ( isLandscapeMode ( ) ) { adjustKeyWidths ( ) ; } else { adjustDigitKeyHeights ( ) ; } } }

Target:
private void adjustKeySizes ( ) { if ( isLandscapeMode ( ) ) { adjustKeyWidths ( ) ; } else { adjustDigitKeyHeights ( ) ; } }
Source:
public java.net.Socket createSocket ( java.net.InetAddress addr , int port ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( addr , port ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; return s ; }

Target:
public java.net.Socket createSocket ( java.net.InetAddress addr , int port ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( addr , port ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; return s ; }
Source:
public void initializeFrom ( org.eclipse.debug.core.ILaunchConfiguration config ) { java.lang.String projectName = updateProjectFromConfig ( config ) ; java.lang.String containerHandle = com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitLaunchConfigurationTab.EMPTY_STRING ; try { containerHandle = config.getAttribute ( JUnitLaunchConfigurationConstants.ATTR_TEST_CONTAINER , com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitLaunchConfigurationTab.EMPTY_STRING ) ; } catch ( org.eclipse.core.runtime.CoreException ce ) { } if ( ( containerHandle.length ( ) ) > 0 ) { updateTestContainerFromConfig ( config ) ; } else { updateTestTypeFromConfig ( config ) ; } org.eclipse.core.resources.IProject proj = mProjectChooserHelper.getAndroidProject ( projectName ) ; loadInstrumentations ( proj ) ; updateInstrumentationFromConfig ( config ) ; validatePage ( ) ; }

Target:
public void initializeFrom ( org.eclipse.debug.core.ILaunchConfiguration config ) { java.lang.String projectName = updateProjectFromConfig ( config ) ; java.lang.String containerHandle = com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitLaunchConfigurationTab.EMPTY_STRING ; try { containerHandle = config.getAttribute ( JUnitLaunchConfigurationConstants.ATTR_TEST_CONTAINER , com.android.ide.eclipse.adt.internal.launch.junit.AndroidJUnitLaunchConfigurationTab.EMPTY_STRING ) ; } catch ( org.eclipse.core.runtime.CoreException ce ) { } if ( ( containerHandle.length ( ) ) > 0 ) { updateTestContainerFromConfig ( config ) ; } else { updateTestTypeFromConfig ( config ) ; } org.eclipse.core.resources.IProject proj = mProjectChooserHelper.getAndroidProject ( projectName ) ; loadInstrumentations ( proj ) ; updateInstrumentationFromConfig ( config ) ; updateTestSizeFromConfig ( config ) ; validatePage ( ) ; }
Source:
public void registerListener ( android.hardware.cts.helpers.TestSensorEventListener listener ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } mTestSensorEventListener = ( listener != null ) ? listener : new android.hardware.cts.helpers.TestSensorEventListener ( ) ; mTestSensorEventListener.setEnvironment ( mEnvironment ) ; java.lang.String message = android.hardware.cts.helpers.SensorCtsHelper.formatAssertionMessage ( "registerListener" , mEnvironment ) ; boolean result = mSensorManager.registerListener ( mTestSensorEventListener , mEnvironment.getSensor ( ) , mEnvironment.getRequestedSamplingPeriodUs ( ) , mEnvironment.getMaxReportLatencyUs ( ) ) ; junit.framework.Assert.assertTrue ( message , result ) ; }

Target:
public void registerListener ( android.hardware.cts.helpers.TestSensorEventListener listener ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } mTestSensorEventListener = listener ; java.lang.String message = android.hardware.cts.helpers.SensorCtsHelper.formatAssertionMessage ( "registerListener" , mEnvironment ) ; boolean result = mSensorManager.registerListener ( mTestSensorEventListener , mEnvironment.getSensor ( ) , mEnvironment.getRequestedSamplingPeriodUs ( ) , mEnvironment.getMaxReportLatencyUs ( ) , mTestSensorEventListener.getHandler ( ) ) ; junit.framework.Assert.assertTrue ( message , result ) ; }
Source:
public com.android.sched.vfs.InputVDir getDir ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.InputVFS currentSectionVFS = getSectionVFS ( fileType ) ; return currentSectionVFS.getRootInputVDir ( ) . getInputVDir ( typePath ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public synchronized void close ( ) throws com.android.jack.library.LibraryIOException { try { for ( com.android.sched.vfs.InputVFS currentSectionVFS : sectionVFS.values ( ) ) { currentSectionVFS.close ( ) ; } vfs.close ( ) ; } catch ( java.io.IOException e ) { throw new com.android.jack.library.LibraryIOException ( getLocation ( ) , e ) ; } }
Source:
public void run ( ) { synchronized ( this ) { if ( ( this . image ) != null ) { this . image.dispose ( ) ; } this . image = image ; this . viewNode = viewNode ; this . selected = null ; } }

Target:
public void setImage ( final org.eclipse.swt.graphics.Image image ) { final org.eclipse.swt.graphics.Image toDispose = this . image ; org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.this . image = image ; } } } ) ; notifyImageChanged ( ) ; if ( toDispose != null ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { toDispose.dispose ( ) ; } } ) ; } }
Source:
public void onCreate ( android.os.Bundle bundle ) { super . onCreate ( bundle ) ; getWindow ( ) . getDecorView ( ) . setSystemUiVisibility ( ( ( android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION ) | ( android.view.View.SYSTEM_UI_FLAG_FULLSCREEN ) ) ) ; mHandler = new android.uirendering.cts.testinfrastructure.DrawActivity.RenderSpecHandler ( ) ; int uiMode = getResources ( ) . getConfiguration ( ) . uiMode ; mOnTv = ( uiMode & ( android.content.res.Configuration.UI_MODE_TYPE_TELEVISION ) ) == ( android.content.res.Configuration.UI_MODE_TYPE_TELEVISION ) ; }

Target:
public void onCreate ( android.os.Bundle bundle ) { super . onCreate ( bundle ) ; getWindow ( ) . getDecorView ( ) . setSystemUiVisibility ( ( ( android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION ) | ( android.view.View.SYSTEM_UI_FLAG_FULLSCREEN ) ) ) ; mHandler = new android.uirendering.cts.testinfrastructure.DrawActivity.RenderSpecHandler ( ) ; int uiMode = getResources ( ) . getConfiguration ( ) . uiMode ; mOnTv = ( uiMode & ( android.content.res.Configuration.UI_MODE_TYPE_MASK ) ) == ( android.content.res.Configuration.UI_MODE_TYPE_TELEVISION ) ; }
Source:
public boolean equals ( java.lang.Object thatObject ) { if ( ( this ) == thatObject ) { return true ; } if ( ( thatObject == null ) || ( ( getClass ( ) ) != ( thatObject.getClass ( ) ) ) ) { return false ; } com.android.server.wifi.hotspot2.anqp.I18Name that = ( ( com.android.server.wifi.hotspot2.anqp.I18Name ) ( thatObject ) ) ; return ( mLanguage.equals ( that.mLanguage ) ) && ( mText.equals ( that.mText ) ) ; }

Target:
public boolean equals ( java.lang.Object thatObject ) { if ( ( this ) == thatObject ) { return true ; } if ( ! ( thatObject instanceof com.android.server.wifi.hotspot2.anqp.I18Name ) ) { return false ; } com.android.server.wifi.hotspot2.anqp.I18Name that = ( ( com.android.server.wifi.hotspot2.anqp.I18Name ) ( thatObject ) ) ; return ( android.text.TextUtils.equals ( mLanguage , that.mLanguage ) ) && ( android.text.TextUtils.equals ( mText , that.mText ) ) ; }
Source:
public static void setUpClass ( ) throws java.lang.Exception { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.gwt.BaseGenerationTest.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.gwt.BaseGenerationTest.hooks ) ; options.getConfigBuilder ( com.android.jack.gwt.BaseGenerationTest.hooks ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; }

Target:
public static void setUpClass ( ) throws java.lang.Exception { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.gwt.BaseGenerationTest.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.gwt.BaseGenerationTest.hooks ) ; options.getConfigBuilder ( com.android.jack.gwt.BaseGenerationTest.hooks ) . getCodecContext ( ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; }
Source:
public void run ( ) { viewport = new com.android.hierarchyviewerlib.scene.DrawableViewNode.Rectangle ( ( ( ( tree.bounds.width ) - ( getBounds ( ) . width ) ) / 2 ) , ( ( ( tree.bounds.height ) - ( getBounds ( ) . height ) ) / 2 ) , getBounds ( ) . width , getBounds ( ) . height ) ; }

Target:
public void run ( ) { redraw ( ) ; }
Source:
public void run ( ) { try { java.io.File output = java.io.File.createTempFile ( "predex" , ".jar" ) ; output.deleteOnExit ( ) ; outputFiles [ ii ] = output ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( input , output , false , dexOptions , mBuildToolInfo , false , ( ii == 0 ? clrWithError : clr ) ) ; } catch ( java.lang.Exception ignored ) { } threadDoneCount.incrementAndGet ( ) ; }

Target:
public void run ( ) { try { java.io.File output = java.io.File.createTempFile ( "predex" , ".jar" ) ; output.deleteOnExit ( ) ; outputFiles [ ii ] = output ; com.android.builder.internal.compiler.PreDexCache.getCache ( ) . preDexLibrary ( input , output , false , dexOptions , mBuildToolInfo , false , ( ii == 0 ? javaProcessExecutorWithError : javaProcessExecutor ) , new com.android.builder.internal.compiler.PreDexCacheTest.FakeProcessOutputHandler ( ) ) ; } catch ( java.lang.Exception ignored ) { } threadDoneCount.incrementAndGet ( ) ; }
Source:
public static com.google.gct.intellij.endpoints.util.PsiFile createFormattedFile ( com.intellij.openapi.project.Project project , java.lang.String filename , com.intellij.openapi.fileTypes.FileType fileType , java.lang.String fileContents ) { final com.google.gct.intellij.endpoints.util.PsiFile rawFile = com.google.gct.intellij.endpoints.util.PsiFileFactory.getInstance ( project ) . createFileFromText ( filename , fileType , fileContents ) ; final com.google.gct.intellij.endpoints.util.PsiFile formattedFile = ( ( com.google.gct.intellij.endpoints.util.PsiFile ) ( com.intellij.psi.codeStyle.CodeStyleManager.getInstance ( project ) . reformat ( rawFile ) ) ) ; return formattedFile ; }

Target:
public static com.google.gct.idea.appengine.util.PsiFile createFormattedFile ( com.intellij.openapi.project.Project project , java.lang.String filename , com.intellij.openapi.fileTypes.FileType fileType , java.lang.String fileContents ) { final com.google.gct.idea.appengine.util.PsiFile rawFile = com.google.gct.idea.appengine.util.PsiFileFactory.getInstance ( project ) . createFileFromText ( filename , fileType , fileContents ) ; final com.google.gct.idea.appengine.util.PsiFile formattedFile = ( ( com.google.gct.idea.appengine.util.PsiFile ) ( com.intellij.psi.codeStyle.CodeStyleManager.getInstance ( project ) . reformat ( rawFile ) ) ) ; return formattedFile ; }
Source:
public void assertNothingIsPending ( ) throws java.lang.Exception { final android.autofillservice.cts.MultipleExceptionsCatcher catcher = new android.autofillservice.cts.MultipleExceptionsCatcher ( ) . run ( ( ) -> android.autofillservice.cts.AutoFillServiceTestCase.sReplier.assertNumberUnhandledFillRequests ( 0 ) ) . run ( ( ) -> android.autofillservice.cts.AutoFillServiceTestCase.sReplier.assertNumberUnhandledSaveRequests ( 0 ) ) ; final java.util.List < java.lang.Exception > replierExceptions = android.autofillservice.cts.AutoFillServiceTestCase.sReplier.getExceptions ( ) ; if ( replierExceptions != null ) { for ( java.lang.Exception e : replierExceptions ) { catcher.add ( e ) ; } } catcher.throwIfAny ( ) ; }

Target:
public void disableService ( ) { if ( ! ( android.autofillservice.cts.Helper.hasAutofillFeature ( ) ) ) return ; if ( ! ( android.autofillservice.cts.AutoFillServiceTestCase.isServiceEnabled ( ) ) ) return ; final android.autofillservice.cts.OneTimeSettingsListener observer = new android.autofillservice.cts.OneTimeSettingsListener ( android.autofillservice.cts.AutoFillServiceTestCase.getContext ( ) , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; android.autofillservice.cts.Helper.runShellCommand ( "settings delete secure %s" , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; observer.assertCalled ( ) ; android.autofillservice.cts.AutoFillServiceTestCase.assertServiceDisabled ( ) ; android.autofillservice.cts.InstrumentedAutoFillService.setIgnoreUnexpectedRequests ( false ) ; }
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:
protected void disconnect ( ) { synchronized ( this ) { if ( ( mState ) == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; setState ( BluetoothProfile.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; } } }
Source:
public java.io.File getInstallFolder ( java.lang.String osSdkRoot , com.android.sdklib.SdkManager sdkManager ) { for ( com.android.sdklib.IAndroidTarget target : sdkManager.getTargets ( ) ) { if ( ( target.isPlatform ( ) ) && ( target.getVersion ( ) . equals ( mVersion ) ) ) { return new java.io.File ( target.getLocation ( ) ) ; } } java.io.File platforms = new java.io.File ( osSdkRoot , com.android.sdklib.SdkConstants.FD_PLATFORMS ) ; java.io.File folder = new java.io.File ( platforms , java.lang.String.format ( "android-%s" , getVersion ( ) . getApiString ( ) ) ) ; return folder ; }

Target:
public java.io.File getInstallFolder ( java.lang.String osSdkRoot , com.android.sdklib.SdkManager sdkManager ) { for ( com.android.sdklib.IAndroidTarget target : sdkManager.getTargets ( ) ) { if ( ( target.isPlatform ( ) ) && ( target.getVersion ( ) . equals ( mVersion ) ) ) { return new java.io.File ( target.getLocation ( ) ) ; } } java.io.File platforms = new java.io.File ( osSdkRoot , com.android.sdklib.SdkConstants.FD_PLATFORMS ) ; java.io.File folder = new java.io.File ( platforms , java.lang.String.format ( "android-%s" , getAndroidVersion ( ) . getApiString ( ) ) ) ; return folder ; }
Source:
protected void clearRemainingState ( final com.android.cts.verifier.managedprovisioning.DialogTestListItem test ) { super . clearRemainingState ( test ) ; if ( WorkNotificationTestActivity.ACTION_WORK_NOTIFICATION_ON_LOCKSCREEN.equals ( test.getManualTestIntent ( ) . getAction ( ) ) ) { try { startActivity ( new android.content.Intent ( WorkNotificationTestActivity.ACTION_CLEAR_WORK_NOTIFICATION ) ) ; } catch ( android.content.ActivityNotFoundException e ) { } } }

Target:
protected void setupFingerprintTests ( com.android.cts.verifier.ArrayTestListAdapter adapter ) { android.hardware.fingerprint.FingerprintManager fpm = ( ( android.hardware.fingerprint.FingerprintManager ) ( getSystemService ( Context.FINGERPRINT_SERVICE ) ) ) ; if ( fpm.isHardwareDetected ( ) ) { adapter.add ( new com.android.cts.verifier.managedprovisioning.DialogTestListItem ( this , R.string.provisioning_byod_fingerprint_disabled_in_settings , ( ( getTestIdPrefix ( ) ) + "FingerprintDisabledInSettings" ) , R.string.provisioning_byod_fingerprint_disabled_in_settings_instruction , new android.content.Intent ( android.provider.Settings.ACTION_SECURITY_SETTINGS ) ) ) ; adapter.add ( new com.android.cts.verifier.managedprovisioning.DialogTestListItem ( this , R.string.provisioning_byod_disable_fingerprint , ( ( getTestIdPrefix ( ) ) + "DisableFingerprint" ) , R.string.provisioning_byod_disable_fingerprint_instruction , com.android.cts.verifier.managedprovisioning.ByodHelperActivity.createLockIntent ( ) ) ) ; } }
Source:
public void handleMessage ( android.os.Message msg ) { log ( ( "handleMessage msg=" + msg ) , false ) ; switch ( msg.what ) { case com.android.internal.telephony.DeviceStateMonitor.EVENT_RIL_CONNECTED : onRilConnected ( ) ; break ; default : updateDeviceState ( msg.what , ( ( msg.arg1 ) != 0 ) ) ; } }

Target:
public void handleMessage ( android.os.Message msg ) { log ( ( "handleMessage msg=" + msg ) , false ) ; switch ( msg.what ) { case com.android.internal.telephony.DeviceStateMonitor.EVENT_RIL_CONNECTED : onRilConnected ( ) ; break ; case com.android.internal.telephony.DeviceStateMonitor.EVENT_UPDATE_MODE_CHANGED : onSetIndicationUpdateMode ( msg.arg1 , msg.arg2 ) ; break ; case com.android.internal.telephony.DeviceStateMonitor.EVENT_SCREEN_STATE_CHANGED : case com.android.internal.telephony.DeviceStateMonitor.EVENT_POWER_SAVE_MODE_CHANGED : case com.android.internal.telephony.DeviceStateMonitor.EVENT_CHARGING_STATE_CHANGED : case com.android.internal.telephony.DeviceStateMonitor.EVENT_TETHERING_STATE_CHANGED : onUpdateDeviceState ( msg.what , ( ( msg.arg1 ) != 0 ) ) ; break ; default : throw new java.lang.IllegalStateException ( ( "Unexpected message arrives. msg = " + ( msg.what ) ) ) ; } }
Source:
private static com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener [ ] getWindowChangeListenersAsArray ( com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener [ ] listeners ; synchronized ( com.android.hierarchyviewerlib.device.WindowUpdater.windowChangeListeners ) { java.util.ArrayList < com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener > windowChangeListenerList = com.android.hierarchyviewerlib.device.WindowUpdater.windowChangeListeners.get ( device ) ; if ( windowChangeListenerList == null ) { return null ; } listeners = windowChangeListenerList.toArray ( new com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener [ windowChangeListenerList.size ( ) ] ) ; } return listeners ; }

Target:
private static com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener [ ] getWindowChangeListenersAsArray ( com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener [ ] listeners ; synchronized ( com.android.hierarchyviewerlib.device.WindowUpdater.sWindowChangeListeners ) { java.util.ArrayList < com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener > windowChangeListenerList = com.android.hierarchyviewerlib.device.WindowUpdater.sWindowChangeListeners.get ( device ) ; if ( windowChangeListenerList == null ) { return null ; } listeners = windowChangeListenerList.toArray ( new com.android.hierarchyviewerlib.device.WindowUpdater.IWindowChangeListener [ windowChangeListenerList.size ( ) ] ) ; } return listeners ; }
Source:
public static java.lang.String getMimeType ( android.content.Context context , java.lang.String uriString ) { android.content.ContentResolver resolver = context.getContentResolver ( ) ; if ( resolver == null ) return null ; android.net.Uri uri = android.net.Uri.parse ( uriString ) ; return resolver.getType ( uri ) ; }

Target:
public static java.lang.String getMimeType ( android.content.Context context , java.lang.String uriString ) { android.content.ContentResolver resolver = context.getContentResolver ( ) ; android.net.Uri uri = android.net.Uri.parse ( uriString ) ; if ( org.chromium.base.ContentUriUtils.isVirtualDocument ( uri , context ) ) { java.lang.String [ ] streamTypes = resolver.getStreamTypes ( uri , "*/*" ) ; return ( streamTypes != null ) && ( ( streamTypes.length ) > 0 ) ? streamTypes [ 0 ] : null ; } return resolver.getType ( uri ) ; }
Source:
public final long getLong ( int index ) { checkIndex ( index , SizeOf.LONG ) ; return this . block.peekLong ( ( ( offset ) + index ) , order ) ; }

Target:
public final char getChar ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } char result = ( ( char ) ( this . block.peekShort ( ( ( offset ) + ( position ) ) , order ) ) ) ; position = newPosition ; return result ; }
Source:
private void closeService ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Pbap Service closeService" ) ; } com.android.bluetooth.pbap.BluetoothPbapUtils.savePbapParams ( this , BluetoothPbapUtils.sPrimaryVersionCounter , BluetoothPbapUtils.sSecondaryVersionCounter , BluetoothPbapUtils.sDbIdentifier.get ( ) , BluetoothPbapUtils.contactsLastUpdated , BluetoothPbapUtils.totalFields , BluetoothPbapUtils.totalSvcFields , BluetoothPbapUtils.totalContacts ) ; mInterrupted = true ; if ( ( mWakeLock ) != null ) { mWakeLock.release ( ) ; mWakeLock = null ; } clearServerSocket ( ) ; if ( ( mSessionStatusHandler ) != null ) { mSessionStatusHandler.removeCallbacksAndMessages ( null ) ; } mRemoteDevice = null ; }

Target:
private void closeService ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Pbap Service closeService" ) ; } com.android.bluetooth.pbap.BluetoothPbapUtils.savePbapParams ( this , BluetoothPbapUtils.sPrimaryVersionCounter , BluetoothPbapUtils.sSecondaryVersionCounter , BluetoothPbapUtils.sDbIdentifier.get ( ) , BluetoothPbapUtils.contactsLastUpdated , BluetoothPbapUtils.totalFields , BluetoothPbapUtils.totalSvcFields , BluetoothPbapUtils.totalContacts ) ; mInterrupted = true ; if ( ( mWakeLock ) != null ) { mWakeLock.release ( ) ; mWakeLock = null ; } cleanUpServerSocket ( ) ; if ( ( mSessionStatusHandler ) != null ) { mSessionStatusHandler.removeCallbacksAndMessages ( null ) ; } mRemoteDevice = null ; }
Source:
public void testSAXException_String ( ) { org.xml.sax.SAXException e = new org.xml.sax.SAXException ( tests.api.org.xml.sax.SAXExceptionTest.ERR ) ; assertEquals ( tests.api.org.xml.sax.SAXExceptionTest.ERR , e.getMessage ( ) ) ; assertNull ( e.getException ( ) ) ; e = new org.xml.sax.SAXException ( ( ( java.lang.String ) ( null ) ) ) ; assertNull ( e.getMessage ( ) ) ; assertNull ( e.getException ( ) ) ; }

Target:
public void testSAXException_String ( ) { org.xml.sax.SAXException e = new org.xml.sax.SAXException ( org.apache.harmony.tests.org.xml.sax.SAXExceptionTest.ERR ) ; assertEquals ( org.apache.harmony.tests.org.xml.sax.SAXExceptionTest.ERR , e.getMessage ( ) ) ; assertNull ( e.getException ( ) ) ; e = new org.xml.sax.SAXException ( ( ( java.lang.String ) ( null ) ) ) ; assertNull ( e.getMessage ( ) ) ; assertNull ( e.getException ( ) ) ; }
Source:
public void bluetoothSocketConnBeginAcceptThreadPsm ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "psmValue" ) java.lang.Integer psmValue , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "timeout" , description = "How long to wait for a new connection, 0 is wait for ever" ) java.lang.Integer timeout , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "isBle" , description = "Is transport BLE?" ) java.lang.Boolean isBle ) throws java.io.IOException { com.googlecode.android_scripting.Log.d ( ( "bluetoothSocketConnBeginAcceptThreadPsm: PSM value=" + psmValue ) ) ; android.bluetooth.BluetoothServerSocket mServerSocket ; com.googlecode.android_scripting.facade.bluetooth.BluetoothSocketConnFacade.AcceptThread acceptThread = new com.googlecode.android_scripting.facade.bluetooth.BluetoothSocketConnFacade.AcceptThread ( psmValue.intValue ( ) , timeout.intValue ( ) , isBle ) ; acceptThread.start ( ) ; mAcceptThread = acceptThread ; }

Target:
public void bluetoothSocketConnBeginAcceptThreadPsm ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "psmValue" ) java.lang.Integer psmValue , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "timeout" , description = "How long to wait for a new connection, 0 is wait for ever" ) java.lang.Integer timeout , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "isBle" , description = "Is transport BLE?" ) java.lang.Boolean isBle , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "securedConn" , description = "Using secured connection?" ) java.lang.Boolean securedConn ) throws java.io.IOException { com.googlecode.android_scripting.Log.d ( ( "bluetoothSocketConnBeginAcceptThreadPsm: PSM value=" + psmValue ) ) ; com.googlecode.android_scripting.facade.bluetooth.BluetoothSocketConnFacade.AcceptThread acceptThread = new com.googlecode.android_scripting.facade.bluetooth.BluetoothSocketConnFacade.AcceptThread ( psmValue.intValue ( ) , timeout.intValue ( ) , isBle , securedConn ) ; acceptThread.start ( ) ; mAcceptThread = acceptThread ; }
Source:
public void getActivityEnergyInfoFromController ( ) { com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return ; service.getActivityEnergyInfoFromController ( ) ; }

Target:
private void autoConnectHeadsetClient ( ) { com.android.bluetooth.hfpclient.HeadsetClientService headsetClientService = com.android.bluetooth.hfpclient.HeadsetClientService.getHeadsetClientService ( ) ; android.bluetooth.BluetoothDevice [ ] bondedDevices = getBondedDevices ( ) ; if ( ( bondedDevices == null ) || ( headsetClientService == null ) ) { return ; } for ( android.bluetooth.BluetoothDevice device : bondedDevices ) { if ( ( headsetClientService.getPriority ( device ) ) == ( android.bluetooth.BluetoothProfile.PRIORITY_AUTO_CONNECT ) ) { debugLog ( ( "autoConnectHeadsetClient() - Connecting Headset Client with " + ( device.toString ( ) ) ) ) ; headsetClientService.connect ( device ) ; } } }
Source:
private static java.lang.Class < ? > findExpectedType ( java.lang.Class < ? > fromClass ) { for ( java.lang.Class < ? > c = fromClass ; c != ( java.lang.Object.class ) ; c = c.getSuperclass ( ) ) { for ( java.lang.reflect.Method method : c.getDeclaredMethods ( ) ) { if ( org.hamcrest.TypeSafeMatcher.isMatchesSafelyMethod ( method ) ) { return method.getParameterTypes ( ) [ 0 ] ; } } } throw new java.lang.Error ( "Cannot determine correct type for matchesSafely() method." ) ; }

Target:
protected void describeMismatchSafely ( T item , org.hamcrest.Description mismatchDescription ) { super . describeMismatch ( item , mismatchDescription ) ; }
Source:
private static void doFollowReferencesTestRoot ( ) { Main.Verifier v = new Main.Verifier ( ) ; Main.tagClasses ( v ) ; Main.A a = Main.createTree ( v ) ; Main.doFollowReferencesTestImpl ( null , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , null ) ; Main.doFollowReferencesTestImpl ( a.foo2 , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , "3@1001" ) ; }

Target:
private void doFollowReferencesTestNonRoot ( java.util.ArrayList < java.lang.Object > tmpStorage ) { Main.Verifier v = new Main.Verifier ( ) ; Main.TestConfig.tagClasses ( v ) ; Main.A a = Main.TestConfig.createTree ( v ) ; tmpStorage.add ( a ) ; v.add ( "0@0" , "1@1000" ) ; doFollowReferencesTestImpl ( null , java.lang.Integer.MAX_VALUE , ( - 1 ) , null , v , null ) ; doFollowReferencesTestImpl ( a.foo2 , java.lang.Integer.MAX_VALUE , ( - 1 ) , null , v , "3@1001" ) ; tmpStorage.clear ( ) ; }
Source:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = com.android.ide.common.res2.ResourceRepositoryTest.getResourceRepository ( ) ; com.android.ide.common.res2.ResourceRepositoryTest.verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi-v4/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen?sw600dp-v13/offset" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = com.android.ide.common.res2.ResourceRepositoryTest.getResourceRepository ( ) ; com.android.ide.common.res2.ResourceRepositoryTest.verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen?sw600dp/offset" , "dimen?sw600dp-v13/offset" , "id/item_id" , "integer/integer" ) ; }
Source:
public java.lang.String getIsimChallengeResponse ( java.lang.String nonce ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimChallengeResponse ( nonce ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public static void setTelephonyProperty ( java.lang.String property , java.lang.String value ) { if ( value == null ) { value = "" ; } android.telephony.Rlog.d ( android.telephony.TelephonyManager.TAG , ( ( ( ( "setTelephonyProperty: success" + " property=" ) + property ) + " value: " ) + value ) ) ; android.os.SystemProperties.set ( property , value ) ; }
Source:
public void run ( org.eclipse.jface.action.IAction action ) { java.util.List < org.eclipse.core.resources.IProject > projects = com.android.ide.eclipse.adt.internal.lint.RunLintAction.getProjects ( mSelection , true ) ; if ( ! ( projects.isEmpty ( ) ) ) { com.android.ide.eclipse.adt.internal.lint.EclipseLintRunner.startLint ( projects , null , null , false , true ) ; } else { org.eclipse.jface.dialogs.MessageDialog.openWarning ( com.android.ide.eclipse.adt.AdtPlugin.getDisplay ( ) . getActiveShell ( ) , "Lint" , "Could not run Lint: Select a project first." ) ; } }

Target:
static java.util.List < org.eclipse.core.resources.IProject > getProjects ( org.eclipse.jface.viewers.ISelection selection , boolean warn ) { java.util.List < org.eclipse.core.resources.IProject > projects = com.android.ide.eclipse.adt.AdtUtils.getSelectedProjects ( selection ) ; if ( ( projects.isEmpty ( ) ) && warn ) { org.eclipse.jface.dialogs.MessageDialog.openWarning ( com.android.ide.eclipse.adt.AdtPlugin.getDisplay ( ) . getActiveShell ( ) , "Lint" , "Could not run Lint: Select an Android project first." ) ; } return projects ; }
Source:
public void testStandaloneWeekdayParsing ( ) throws java.lang.Exception { java.util.Locale fi = new java.util.Locale ( "fi" ) ; assertEquals ( java.util.Calendar.TUESDAY , libcore.java.text.SimpleDateFormatTest.parseDate ( fi , "cccc yyyy" , "tiistai 2000" ) . get ( java.util.Calendar.DAY_OF_WEEK ) ) ; assertEquals ( java.util.Calendar.TUESDAY , libcore.java.text.SimpleDateFormatTest.parseDate ( fi , "EEEE yyyy" , "tiistaina 2000" ) . get ( java.util.Calendar.DAY_OF_WEEK ) ) ; libcore.java.text.SimpleDateFormatTest.assertCannotParse ( fi , "cccc yyyy" , "tiistaina 2000" ) ; libcore.java.text.SimpleDateFormatTest.assertCannotParse ( fi , "EEEE yyyy" , "tiistai 2000" ) ; }

Target:
public void testFormatUtc ( ) { java.text.DateFormat dateFormat = new java.text.SimpleDateFormat ( "z" , java.util.Locale.ENGLISH ) ; dateFormat.setTimeZone ( libcore.java.text.SimpleDateFormatTest.UTC ) ; assertEquals ( "UTC" , dateFormat.format ( new java.util.Date ( 0 ) ) ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , d.length , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
private void copy1DRangeFromUnchecked ( int off , int count , java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; final int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( arrayLen * ( dt.mSize ) ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , array , dataSize , dt ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput.d.T_aput_1 t = new dot.junit.opcodes.aput.d.T_aput_1 ( ) ; int [ ] arr = new int [ 2 ] ; try { t.run ( arr , 2 , 100000000 ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE1 ( ) { loadAndRun ( "dot.junit.opcodes.aput.d.T_aput_1" , java.lang.ArrayIndexOutOfBoundsException.class , new int [ 2 ] , 2 , 100000000 ) ; }
Source:
public void run ( ) { getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) . setValue ( com.android.cts.verifier.bluetooth.BleServerService.WRITE_VALUE.getBytes ( ) ) ; getDescriptor ( ) . setValue ( com.android.cts.verifier.bluetooth.BleServerService.WRITE_VALUE.getBytes ( ) ) ; }

Target:
public void onExecuteWrite ( android.bluetooth.BluetoothDevice device , int requestId , boolean execute ) { if ( ( mGattServer ) == null ) { if ( com.android.cts.verifier.bluetooth.BleServerService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleServerService.TAG , "GattServer is null, return" ) ; return ; } if ( com.android.cts.verifier.bluetooth.BleServerService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleServerService.TAG , "onExecuteWrite" ) ; if ( execute ) { notifyExecuteWrite ( ) ; getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) . setValue ( mReliableWriteValue ) ; mGattServer.sendResponse ( device , requestId , BluetoothGatt.GATT_SUCCESS , 0 , null ) ; } }