auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void insert ( java.util.List < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; db.beginTransaction ( ) ; try { for ( com.android.dialer.speeddial.database.SpeedDialEntry entry : entries ) { if ( ( db.insert ( com.android.dialer.speeddial.database.SpeedDialEntryDatabaseHelper.TABLE_NAME , null , buildContentValues ( entry ) ) ) == ( - 1L ) ) { throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( "Attempted to insert a row that already exists." ) ; } } db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; db.close ( ) ; } }

Target:
private void insert ( android.database.sqlite.SQLiteDatabase writeableDatabase , com.google.common.collect.ImmutableList < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { for ( com.android.dialer.speeddial.database.SpeedDialEntry entry : entries ) { com.android.dialer.common.Assert.checkArgument ( ( ( entry.id ( ) ) == null ) ) ; if ( ( writeableDatabase.insert ( com.android.dialer.speeddial.database.SpeedDialEntryDatabaseHelper.TABLE_NAME , null , buildContentValuesWithoutId ( entry ) ) ) == ( - 1L ) ) { throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( "Attempted to insert a row that already exists." ) ; } } }
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:
protected void onDetachedFromWindow ( ) { super . onDetachedFromWindow ( ) ; getViewTreeObserver ( ) . removeOnPreDrawListener ( mOnPreDrawListenerForKeyLayoutAdjust ) ; }
Source:
protected boolean mediaFilesExistOnDevice ( com.android.tradefed.device.ITestDevice device ) throws com.android.tradefed.device.DeviceNotAvailableException { for ( android.mediastress.cts.preconditions.MediaPreparer.Resolution resolution : android.mediastress.cts.preconditions.MediaPreparer.RESOLUTIONS ) ; if ( ( resolution.width ) > ( mMaxRes.width ) ) { break ; } HEAD ( 7.5E7 ) ; android.mediastress.cts.preconditions.a Merge ; }

Target:
protected boolean mediaFilesExistOnDevice ( com.android.tradefed.device.ITestDevice device ) throws com.android.tradefed.device.DeviceNotAvailableException { for ( android.mediastress.cts.preconditions.MediaPreparer.Resolution resolution : android.mediastress.cts.preconditions.MediaPreparer.RESOLUTIONS ) { if ( ( resolution.width ) > ( mMaxRes.width ) ) { break ; } java.lang.String deviceShortFilePath = ( mBaseDeviceShortDir ) + ( resolution.toString ( ) ) ; java.lang.String deviceFullFilePath = ( mBaseDeviceFullDir ) + ( resolution.toString ( ) ) ; if ( ( ! ( device.doesFileExist ( deviceShortFilePath ) ) ) || ( ! ( device.doesFileExist ( deviceFullFilePath ) ) ) ) { return false ; } } return true ; }
Source:
public void createAndroidTasks ( org.gradle.model.collection.CollectionBuilder < org.gradle.api.Task > tasks , com.android.build.gradle.model.AndroidComponentSpec androidSpec , com.android.build.gradle.internal.TaskManager taskManager , com.android.build.gradle.internal.SdkHandler sdkHandler , org.gradle.api.Project project , com.android.build.gradle.model.AndroidComponentModelSourceSet androidSources ) { for ( final java.io.File file : sdkHandler.getSdkLoader ( ) . getRepositories ( ) ) { project.getRepositories ( ) . maven ( new org.gradle.api.Action < org.gradle.api.artifacts.repositories.MavenArtifactRepository > ( ) { @ java.lang.Override public void execute ( org.gradle.api.artifacts.repositories.MavenArtifactRepository repo ) { repo.setUrl ( file.toURI ( ) ) ; } } ) ; } }

Target:
public void createAndroidTasks ( org.gradle.model.ModelMap < org.gradle.api.Task > tasks , org.gradle.model.ModelMap < com.android.build.gradle.model.AndroidComponentSpec > androidSpecs , com.android.build.gradle.internal.TaskManager taskManager , com.android.build.gradle.internal.SdkHandler sdkHandler , org.gradle.api.Project project , com.android.build.gradle.model.AndroidComponentModelSourceSet androidSources ) { for ( final java.io.File file : sdkHandler.getSdkLoader ( ) . getRepositories ( ) ) { project.getRepositories ( ) . maven ( new org.gradle.api.Action < org.gradle.api.artifacts.repositories.MavenArtifactRepository > ( ) { @ java.lang.Override public void execute ( org.gradle.api.artifacts.repositories.MavenArtifactRepository repo ) { repo.setUrl ( file.toURI ( ) ) ; } } ) ; } }
Source:
private java.lang.String fromHex ( java.lang.String hexPassword ) { if ( hexPassword == null ) { return null ; } try { byte [ ] bytes = org.apache.commons.codec.binary.Hex.decodeHex ( hexPassword.toCharArray ( ) ) ; return new java.lang.String ( bytes , java.nio.charset.StandardCharsets.UTF_8 ) ; } catch ( org.apache.commons.codec.DecoderException e ) { return null ; } }

Target:
private java.lang.String fromHex ( java.lang.String hexPassword ) { if ( hexPassword == null ) { return null ; } final byte [ ] bytes ; try { bytes = libcore.util.HexEncoding.decode ( hexPassword.toCharArray ( ) , false ) ; } catch ( java.lang.IllegalArgumentException e ) { return null ; } return new java.lang.String ( bytes , java.nio.charset.StandardCharsets.UTF_8 ) ; }
Source:
boolean isExpired ( com.google.common.cache.LocalCache.ReferenceEntry < K , V > entry , long now ) { if ( ( expiresAfterAccess ( ) ) && ( ( now - ( entry.getAccessTime ( ) ) ) > ( expireAfterAccessNanos ) ) ) { return true ; } if ( ( expiresAfterWrite ( ) ) && ( ( now - ( entry.getWriteTime ( ) ) ) > ( expireAfterWriteNanos ) ) ) { return true ; } return false ; }

Target:
boolean isExpired ( com.google.common.cache.LocalCache.ReferenceEntry < K , V > entry , long now ) { com.google.common.base.Preconditions.checkNotNull ( entry ) ; if ( ( expiresAfterAccess ( ) ) && ( ( now - ( entry.getAccessTime ( ) ) ) >= ( expireAfterAccessNanos ) ) ) { return true ; } if ( ( expiresAfterWrite ( ) ) && ( ( now - ( entry.getWriteTime ( ) ) ) >= ( expireAfterWriteNanos ) ) ) { return true ; } return false ; }
Source:
public < T > T when ( T mock ) { return com.google.testing.littlemock.LittleMock.doAnswer ( new java.util.concurrent.Callable < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object call ( ) throws java.lang.Exception { latch.countDown ( ) ; return result ; } } ) . when ( mock ) ; }

Target:
public < T > T when ( T mock ) { return org.mockito.Mockito.doAnswer ( new org.mockito.stubbing.Answer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Exception { latch.countDown ( ) ; return result ; } } ) . when ( mock ) ; }
Source:
protected com.android.jack.ir.ast.JDefinedClassOrInterface loadClassOrInterface ( @ javax.annotation.Nonnull java.lang.String simpleName ) throws com.android.jack.ir.ast.JTypeLookupException { for ( com.android.jack.load.PackageLoader loader : loaders ) { try { return loader.loadClassOrInterface ( this , simpleName ) ; } catch ( com.android.jack.lookup.JLookupException e ) { } } throw new com.android.jack.ir.ast.MissingJTypeLookupException ( this , simpleName ) ; }

Target:
protected com.android.jack.ir.ast.JDefinedClassOrInterface loadClassOrInterface ( @ javax.annotation.Nonnull java.lang.String simpleName ) throws com.android.jack.ir.ast.JTypeLookupException { assert ! ( deletedItems.contains ( simpleName ) ) ; for ( com.android.jack.load.PackageLoader loader : loaders ) { try { return loader.loadClassOrInterface ( this , simpleName ) ; } catch ( com.android.jack.lookup.JLookupException e ) { } } throw new com.android.jack.ir.ast.MissingJTypeLookupException ( this , simpleName ) ; }
Source:
public final short getDUnit ( ) { int d = getD ( ) ; if ( ( d & ( ~ 65535 ) ) != 0 ) { throw new com.android.jack.dx.util.DexException ( ( "Register D out of range: " + ( com.android.jack.dx.util.Hex.u8 ( d ) ) ) ) ; } return ( ( short ) ( d ) ) ; }

Target:
public final short getSecondIndexUnit ( ) { assert ( secondIndexType ) != ( com.android.jack.dx.io.IndexType.NONE ) ; return ( ( short ) ( secondIndex ) ) ; }
Source:
public boolean matchesNationalNumber ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc , boolean allowPrefixMatch ) { java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.getNationalNumberPattern ( ) ) . matcher ( nationalNumber ) ; return ( nationalNumberPatternMatcher.matches ( ) ) || ( allowPrefixMatch && ( nationalNumberPatternMatcher.lookingAt ( ) ) ) ; }

Target:
public boolean matchesNationalNumber ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc numberDesc , boolean allowPrefixMatch ) { java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.nationalNumberPattern ) . matcher ( nationalNumber ) ; return ( nationalNumberPatternMatcher.matches ( ) ) || ( allowPrefixMatch && ( nationalNumberPatternMatcher.lookingAt ( ) ) ) ; }
Source:
private boolean canReadPhoneState ( java.lang.String callingPackage ) { if ( ( mContext.checkCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return true ; } boolean canReadPhoneState = ( mContext.checkCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; if ( canReadPhoneState && ( ( mAppOps.noteOp ( AppOpsManager.OP_READ_PHONE_STATE , android.os.Binder.getCallingUid ( ) , callingPackage ) ) != ( android.app.AppOpsManager.MODE_ALLOWED ) ) ) { return false ; } return canReadPhoneState ; }

Target:
private boolean canReadPhoneState ( java.lang.String callingPackage , java.lang.String message ) { try { return com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , message ) ; } catch ( java.lang.SecurityException e ) { return false ; } }
Source:
public java.util.List < com.android.tools.lint.detector.api.Project > getAllLibraries ( ) { if ( ( mAllLibraries ) == null ) { if ( ( mDirectLibraries.size ( ) ) == 0 ) { return mDirectLibraries ; } java.util.List < com.android.tools.lint.detector.api.Project > all = new java.util.ArrayList < com.android.tools.lint.detector.api.Project > ( ) ; addLibraryProjects ( all ) ; mAllLibraries = all ; } return mAllLibraries ; }

Target:
public java.util.List < com.android.tools.lint.detector.api.Project > getAllLibraries ( ) { if ( ( mAllLibraries ) == null ) { if ( mDirectLibraries.isEmpty ( ) ) { return mDirectLibraries ; } java.util.List < com.android.tools.lint.detector.api.Project > all = new java.util.ArrayList < com.android.tools.lint.detector.api.Project > ( ) ; addLibraryProjects ( all ) ; mAllLibraries = all ; } return mAllLibraries ; }
Source:
public static void openDrawer ( int drawerLayoutId ) { if ( android.support.test.espresso.contrib.DrawerActions.checkDrawer ( drawerLayoutId , android.support.test.espresso.contrib.DrawerMatchers.isOpen ( ) ) ) { return ; } android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.registerListener ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.actionOpenDrawer ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.unregisterListener ( ) ) ; }

Target:
public static void openDrawer ( int drawerLayoutId , int gravity ) { if ( android.support.test.espresso.contrib.DrawerActions.checkDrawer ( drawerLayoutId , android.support.test.espresso.contrib.DrawerMatchers.isOpen ( ) ) ) { return ; } android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.registerListener ( ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.actionOpenDrawer ( gravity ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.unregisterListener ( ) ) ; }
Source:
public void onLooperPrepared ( ) { mCTUT = new com.android.internal.telephony.imsphone.ImsPhoneCallTracker ( mImsPhone ) ; mCTUT.addReasonCodeRemapping ( null , "Wifi signal lost." , ImsReasonInfo.CODE_WIFI_LOST ) ; mCTUT.addReasonCodeRemapping ( 501 , "Call answered elsewhere." , ImsReasonInfo.CODE_ANSWERED_ELSEWHERE ) ; mCTUT.addReasonCodeRemapping ( 510 , "Call answered elsewhere." , ImsReasonInfo.CODE_ANSWERED_ELSEWHERE ) ; setReady ( true ) ; }

Target:
public void onLooperPrepared ( ) { mCTUT = new com.android.internal.telephony.imsphone.ImsPhoneCallTracker ( mImsPhone ) ; mCTUT.addReasonCodeRemapping ( null , "Wifi signal lost." , ImsReasonInfo.CODE_WIFI_LOST ) ; mCTUT.addReasonCodeRemapping ( 501 , "Call answered elsewhere." , ImsReasonInfo.CODE_ANSWERED_ELSEWHERE ) ; mCTUT.addReasonCodeRemapping ( 510 , "Call answered elsewhere." , ImsReasonInfo.CODE_ANSWERED_ELSEWHERE ) ; mCTHander = new android.os.Handler ( mCTUT.getLooper ( ) ) ; setReady ( true ) ; }
Source:
synchronized void nAllocationRead ( long id , java.lang.Object d , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationRead ( mContext , id , d , dt.mID ) ; }

Target:
synchronized void nAllocationRead2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationRead2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public static java.lang.String getGcpUrl ( com.google.gct.login.CredentialedUser user , java.lang.String projectId ) { com.google.api.services.source.Source sourceRepos = new com.google.api.services.source.Source.Builder ( new com.google.api.client.http.javanet.NetHttpTransport ( ) , new com.google.api.client.json.jackson2.JacksonFactory ( ) , user.getCredential ( ) ) . setApplicationName ( "Android Studio" ) . build ( ) ; java.lang.String calculatedUrl = ( "https://source.developers.google.com/p/" + projectId ) + "/" ; try { com.google.api.services.source.model.ListReposResponse response = sourceRepos.repos ( ) . list ( projectId ) . execute ( ) ; if ( ( response != null ) && ( ( response.getRepos ( ) ) != null ) ) { for ( com.google.api.services.source.model.Repo repo : response.getRepos ( ) ) { if ( "default" . equalsIgnoreCase ( repo.getRepoName ( ) ) ) { calculatedUrl = repo.getCloneUrl ( ) ; } } } } catch ( java.lang.Exception e ) { com.google.gct.idea.git.GcpHttpAuthDataProvider.LOG.error ( ( "Exception loading repo url for " + projectId ) , e ) ; } if ( com.google.api.client.repackaged.com.google.common.base.Strings.isNullOrEmpty ( calculatedUrl ) ) { com.google.gct.idea.git.GcpHttpAuthDataProvider.LOG.error ( ( "Exception loading repo url for " + projectId ) ) ; } return calculatedUrl ; }

Target:
public static com.intellij.openapi.util.Pair < git4idea.repo.GitRemote , java.lang.String > findGCPRemote ( @ org.jetbrains.annotations.NotNull git4idea.repo.GitRepository repository ) { for ( git4idea.repo.GitRemote gitRemote : repository.getRemotes ( ) ) { for ( java.lang.String remoteUrl : gitRemote.getUrls ( ) ) { if ( com.google.gct.idea.git.GcpHttpAuthDataProvider.isUrlGCP ( remoteUrl ) ) { return com.intellij.openapi.util.Pair.create ( gitRemote , remoteUrl ) ; } } } return null ; }
Source:
private void visit ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Node node ) { if ( ( node.getNodeType ( ) ) == ( org.w3c.dom.Node.TEXT_NODE ) ) { check ( context , node , node.getNodeValue ( ) ) ; } else { org.w3c.dom.NodeList children = node.getChildNodes ( ) ; for ( int i = 0 , n = children.getLength ( ) ; i < n ; i ++ ) { visit ( context , children.item ( i ) ) ; } } }

Target:
private void visit ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Element parent , org.w3c.dom.Node node ) { if ( ( node.getNodeType ( ) ) == ( org.w3c.dom.Node.TEXT_NODE ) ) { check ( context , parent , node , node.getNodeValue ( ) ) ; } else { org.w3c.dom.NodeList children = node.getChildNodes ( ) ; for ( int i = 0 , n = children.getLength ( ) ; i < n ; i ++ ) { visit ( context , parent , children.item ( i ) ) ; } } }
Source:
protected final java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > doGetConfiguredResources ( @ com.android.annotations.NonNull com.android.ide.common.resources.configuration.FolderConfiguration referenceConfig ) { java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > map = new java.util.EnumMap < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > ( com.android.resources.ResourceType.class ) ; for ( com.android.resources.ResourceType key : com.android.resources.ResourceType.values ( ) ) { map.put ( key , getConfiguredResource ( key , referenceConfig ) ) ; } return map ; }

Target:
protected final java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > doGetConfiguredResources ( @ com.android.annotations.NonNull com.android.ide.common.resources.configuration.FolderConfiguration referenceConfig ) { ensureInitialized ( ) ; java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > map = new java.util.EnumMap < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > ( com.android.resources.ResourceType.class ) ; for ( com.android.resources.ResourceType key : com.android.resources.ResourceType.values ( ) ) { map.put ( key , getConfiguredResource ( key , referenceConfig ) ) ; } return map ; }
Source:
public void testGetPlaybackUri ( ) throws java.lang.Exception { android.telephony.mbms.StreamingService streamingService = mStreamingSession.startStreaming ( CtsStreamingService.STREAMING_SERVICE_INFO , mStreamingServiceCallback , mCallbackHandler ) ; assertEquals ( CtsStreamingService.STREAMING_URI , streamingService.getPlaybackUri ( ) ) ; java.util.List < java.util.List < java.lang.Object > > getPlaybackUriCalls = getMiddlewareCalls ( CtsStreamingService.METHOD_GET_PLAYBACK_URI ) ; assertEquals ( 1 , getPlaybackUriCalls.size ( ) ) ; assertEquals ( CtsStreamingService.STREAMING_SERVICE_INFO.getServiceId ( ) , getPlaybackUriCalls.get ( 0 ) . get ( 2 ) ) ; }

Target:
public void testGetPlaybackUri ( ) throws java.lang.Exception { android.telephony.mbms.StreamingService streamingService = mStreamingSession.startStreaming ( CtsStreamingService.STREAMING_SERVICE_INFO , mCallbackExecutor , mStreamingServiceCallback ) ; assertEquals ( CtsStreamingService.STREAMING_URI , streamingService.getPlaybackUri ( ) ) ; java.util.List < java.util.List < java.lang.Object > > getPlaybackUriCalls = getMiddlewareCalls ( CtsStreamingService.METHOD_GET_PLAYBACK_URI ) ; assertEquals ( 1 , getPlaybackUriCalls.size ( ) ) ; assertEquals ( CtsStreamingService.STREAMING_SERVICE_INFO.getServiceId ( ) , getPlaybackUriCalls.get ( 0 ) . get ( 2 ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { Main.$opt$TestAllocations ( ) ; Main.$opt$TestWithInitializations ( ) ; Main.$opt$TestNegativeValueNewByteArray ( ) ; Main.$opt$TestNegativeValueNewCharArray ( ) ; Main.testSmaliFilledNewArray ( ) ; Main.testSmaliFillArrayData ( ) ; Main.testSmaliVerifyError ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { Main.$opt$TestAllocations ( ) ; Main.$opt$TestWithInitializations ( ) ; Main.$opt$TestNegativeValueNewByteArray ( ) ; Main.$opt$TestNegativeValueNewCharArray ( ) ; Main.testNegativeArraySize ( ) ; Main.testSmaliFilledNewArray ( ) ; Main.testSmaliFillArrayData ( ) ; Main.testSmaliVerifyError ( ) ; }
Source:
public void test_getCipherSuite ( ) { assertEquals ( tests.api.javax.net.ssl.SSLSessionTest.CIPHER_SUITE , clientSession.getCipherSuite ( ) ) ; }

Target:
public void test_getCipherSuite ( ) { java.lang.String expectedCipherSuite = null ; for ( java.lang.String cipherSuite : libcore.java.security.StandardNames.CIPHER_SUITES_DEFAULT ) { if ( cipherSuite.contains ( "_RSA_" ) ) { expectedCipherSuite = cipherSuite ; break ; } } if ( expectedCipherSuite == null ) { fail ( "Failed to identify expected cipher suite" ) ; } assertEquals ( expectedCipherSuite , clientSession.getCipherSuite ( ) ) ; }
Source:
public void startService ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; verifyNoMoreInteractions ( mWifiScannerImplFactory ) ; android.os.Handler handler = mock ( android.os.Handler.class ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( handler ) ; org.mockito.InOrder order = inOrder ( handler ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.sendBackgroundScanRequest ( controlChannel , 122 , generateValidScanSettings ( ) , null ) ; mLooper.dispatchAll ( ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.verifyFailedResponse ( order , handler , 122 , WifiScanner.REASON_UNSPECIFIED , "not available" ) ; }

Target:
public void startService ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mWifiScannerImplFactory ) ; android.os.Handler handler = org.mockito.Mockito.mock ( android.os.Handler.class ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( handler ) ; org.mockito.InOrder order = org.mockito.Mockito.inOrder ( handler ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.sendBackgroundScanRequest ( controlChannel , 122 , generateValidScanSettings ( ) , null ) ; mLooper.dispatchAll ( ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.verifyFailedResponse ( order , handler , 122 , WifiScanner.REASON_UNSPECIFIED , "not available" ) ; }
Source:
public void testPercentageRounding ( ) throws java.lang.Exception { java.text.NumberFormat nf = java.text.NumberFormat.getPercentInstance ( java.util.Locale.US ) ; assertEquals ( "15%" , nf.format ( 0.149 ) ) ; assertEquals ( "14%" , nf.format ( 0.142 ) ) ; nf.setRoundingMode ( java.math.RoundingMode.UP ) ; assertEquals ( "15%" , nf.format ( 0.142 ) ) ; nf.setRoundingMode ( java.math.RoundingMode.DOWN ) ; assertEquals ( "14%" , nf.format ( 0.149 ) ) ; }

Target:
public void testPercentageRounding ( ) throws java.lang.Exception { java.text.NumberFormat nf = java.text.NumberFormat.getPercentInstance ( java.util.Locale.US ) ; assertEquals ( "15%" , nf.format ( 0.149 ) ) ; assertEquals ( "14%" , nf.format ( 0.142 ) ) ; nf.setRoundingMode ( java.math.RoundingMode.UP ) ; assertEquals ( "15%" , nf.format ( 0.142 ) ) ; nf.setRoundingMode ( java.math.RoundingMode.DOWN ) ; assertEquals ( "14%" , nf.format ( 0.149 ) ) ; nf.setMaximumFractionDigits ( 1 ) ; assertEquals ( "14.9%" , nf.format ( 0.149 ) ) ; }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.ThisReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { assert getTypeMap ( ) . get ( x.resolvedType ) . equals ( curClass.type ) ; push ( makeThisRef ( makeSourceInfo ( x ) ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.ThisReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { assert getTypeMap ( ) . get ( x.resolvedType ) . isSameType ( curClass.type ) ; push ( makeThisRef ( makeSourceInfo ( x ) ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }
Source:
private org.apache.harmony.dalvik.ddmc.Chunk handleMPSE ( org.apache.harmony.dalvik.ddmc.Chunk request ) { byte result ; if ( false ) { android.util.Log.v ( "ddm-heap" , "Method prof stream end" ) ; } try { android.os.Debug.stopMethodTracing ( ) ; result = 0 ; } catch ( java.lang.RuntimeException re ) { android.util.Log.w ( "ddm-heap" , ( "Method prof stream end failed: " + ( re.getMessage ( ) ) ) ) ; return createFailChunk ( 1 , re.getMessage ( ) ) ; } return null ; }

Target:
private org.apache.harmony.dalvik.ddmc.Chunk handleMPSEOrSPSE ( org.apache.harmony.dalvik.ddmc.Chunk request , java.lang.String type ) { if ( android.ddm.DdmHandleProfiling.DEBUG ) { android.util.Log.v ( "ddm-heap" , ( type + " prof stream end" ) ) ; } try { android.os.Debug.stopMethodTracing ( ) ; } catch ( java.lang.RuntimeException re ) { android.util.Log.w ( "ddm-heap" , ( ( type + " prof stream end failed: " ) + ( re.getMessage ( ) ) ) ) ; return createFailChunk ( 1 , re.getMessage ( ) ) ; } return null ; }
Source:
public void testUpgradeKeepsPermissions ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testAllPermissionsGrantedByDefault" ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testAllPermissionsGrantedOnUpgrade" ) ; }

Target:
public void testNoResidualPermissionsOnUninstall ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part1" ) ; assertNull ( getDevice ( ) . uninstallPackage ( android.appsecurity.cts.PermissionsHostTest.PKG ) ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part2" ) ; }
Source:
public void shutdown ( ) { if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { for ( com.googlecode.android_scripting.facade.bluetooth.BluetoothLeAdvertiseFacade.myAdvertiseCallback mAdvertise : mAdvertiseCallbackList.values ( ) ) { if ( mAdvertise != null ) { try { mBluetoothAdapter.getBluetoothLeAdvertiser ( ) . stopAdvertising ( mAdvertise ) ; } catch ( java.lang.NullPointerException e ) { com.googlecode.android_scripting.Log.e ( "Failed to stop ble advertising." , e ) ; } } } } mAdvertiseCallbackList.clear ( ) ; mAdvertiseSettingsList.clear ( ) ; mAdvertiseDataList.clear ( ) ; }

Target:
public void shutdown ( ) { if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { for ( com.googlecode.android_scripting.facade.bluetooth.BluetoothLeAdvertiseFacade.MyAdvertiseCallback mAdvertise : mAdvertiseCallbackList.values ( ) ) { if ( mAdvertise != null ) { try { mBluetoothAdapter.getBluetoothLeAdvertiser ( ) . stopAdvertising ( mAdvertise ) ; } catch ( java.lang.NullPointerException e ) { com.googlecode.android_scripting.Log.e ( "Failed to stop ble advertising." , e ) ; } } } } mAdvertiseCallbackList.clear ( ) ; mAdvertiseSettingsList.clear ( ) ; mAdvertiseDataList.clear ( ) ; }
Source:
public final void test_setHostnameVerifier ( ) { javax.net.ssl.HttpsURLConnection con = new tests.api.javax.net.ssl.MyHttpsURLConnection ( null ) ; try { con.setHostnameVerifier ( null ) ; fail ( "No expected IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } tests.api.javax.net.ssl.myHostnameVerifier hnv = new tests.api.javax.net.ssl.myHostnameVerifier ( ) ; con.setHostnameVerifier ( hnv ) ; }

Target:
public final void test_setHostnameVerifier ( ) { javax.net.ssl.HttpsURLConnection con = new org.apache.harmony.tests.javax.net.ssl.MyHttpsURLConnection ( null ) ; try { con.setHostnameVerifier ( null ) ; fail ( "No expected IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } org.apache.harmony.tests.javax.net.ssl.myHostnameVerifier hnv = new org.apache.harmony.tests.javax.net.ssl.myHostnameVerifier ( ) ; con.setHostnameVerifier ( hnv ) ; }
Source:
public void test_getLast ( ) { assertTrue ( "Returned incorrect first element" , ll.getLast ( ) . equals ( objArray [ ( ( objArray.length ) - 1 ) ] ) ) ; ll.clear ( ) ; try { ll.getLast ( ) ; fail ( "NoSuchElementException expected" ) ; } catch ( java.util.NoSuchElementException e ) { } }

Target:
public void test_getLast ( ) { assertTrue ( "Returned incorrect first element" , ll.getLast ( ) . equals ( objArray [ ( ( objArray.length ) - 1 ) ] ) ) ; java.util.LinkedList list = new java.util.LinkedList ( ) ; try { list.getLast ( ) ; fail ( "Should throw NoSuchElementException" ) ; } catch ( java.util.NoSuchElementException e ) { } }
Source:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , javax.net.ssl.SSLSession session ) throws java.security.cert.CertificateException { return checkTrusted ( chain , authType , session.getPeerHost ( ) , false ) ; }

Target:
public void checkClientTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = null ; javax.net.ssl.SSLParameters parameters = null ; if ( socket instanceof javax.net.ssl.SSLSocket ) { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( socket ) ) ; session = org.conscrypt.TrustManagerImpl.getHandshakeSessionOrThrow ( sslSocket ) ; parameters = sslSocket.getSSLParameters ( ) ; } checkTrusted ( chain , authType , session , parameters , true ) ; }
Source:
public static com.android.jack.jayce.JayceInternalWriter get ( @ javax.annotation.Nonnull com.android.jack.library.OutputJackLibrary outputJackLibrary , @ javax.annotation.Nonnull java.io.OutputStream out ) { com.android.jack.jayce.v0002.io.JayceInternalWriterImpl jayceWriter = new com.android.jack.jayce.v0002.io.JayceInternalWriterImpl ( out ) ; outputJackLibrary.putProperty ( JayceProperties.KEY_JAYCE , java.lang.String.valueOf ( true ) ) ; outputJackLibrary.putProperty ( JayceProperties.KEY_JAYCE_MAJOR_VERSION , java.lang.String.valueOf ( com.android.jack.jayce.JayceWriterFactory.DEFAULT_MAJOR_VERSION ) ) ; outputJackLibrary.putProperty ( JayceProperties.KEY_JAYCE_MINOR_VERSION , java.lang.String.valueOf ( jayceWriter.getCurrentMinor ( ) ) ) ; return jayceWriter ; }

Target:
public static com.android.jack.jayce.JayceInternalWriter get ( @ javax.annotation.Nonnull com.android.jack.library.OutputJackLibrary outputJackLibrary , @ javax.annotation.Nonnull java.io.OutputStream out ) { com.android.jack.jayce.v0002.io.JayceInternalWriterImpl jayceWriter = new com.android.jack.jayce.v0002.io.JayceInternalWriterImpl ( out ) ; outputJackLibrary.putProperty ( FileType.JAYCE.buildPropertyName ( null ) , java.lang.String.valueOf ( true ) ) ; outputJackLibrary.putProperty ( JayceProperties.KEY_JAYCE_MAJOR_VERSION , java.lang.String.valueOf ( com.android.jack.jayce.JayceWriterFactory.DEFAULT_MAJOR_VERSION ) ) ; outputJackLibrary.putProperty ( JayceProperties.KEY_JAYCE_MINOR_VERSION , java.lang.String.valueOf ( jayceWriter.getCurrentMinor ( ) ) ) ; return jayceWriter ; }
Source:
public synchronized void err ( @ com.android.annotations.Nullable java.lang.String line ) { mLogger.verbose ( "AAPT err(%1$s): %2$s" , mProcess.hashCode ( ) , line ) ; com.android.builder.png.AaptProcess.NotifierProcessOutput delegate = getNotifier ( ) ; if ( delegate != null ) { delegate.err ( line ) ; } }

Target:
public synchronized void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( com.google.common.base.Strings.isNullOrEmpty ( line ) ) { return ; } com.android.builder.png.AaptProcess.NotifierProcessOutput delegate = getNotifier ( ) ; if ( delegate != null ) { mLogger.verbose ( "AAPT err(%1$s): %2$s -> %3$s" , mProcess.hashCode ( ) , line , delegate.mJob ) ; delegate.err ( line ) ; } else { mLogger.error ( null , "AAPT err(%1$s) : No Delegate set : lost message:%2$s" , mProcess.hashCode ( ) , line ) ; } }
Source:
public void onBackPressed ( ) { if ( ( mScroller ) != null ) { if ( ! ( mIsExitAnimationInProgress ) ) { mScroller.scrollOffBottom ( ) ; } } else { super . onBackPressed ( ) ; } }

Target:
public void onBackPressed ( ) { final int previousScreenType = getIntent ( ) . getIntExtra ( com.android.contacts.quickcontact.QuickContactActivity.EXTRA_PREVIOUS_SCREEN_TYPE , ScreenType.UNKNOWN ) ; if ( ( ( previousScreenType == ( com.android.contacts.logging.ScreenEvent.ScreenType.ALL_CONTACTS ) ) || ( previousScreenType == ( com.android.contacts.logging.ScreenEvent.ScreenType.FAVORITES ) ) ) && ( ! ( com.android.contacts.util.SharedPreferenceUtil.getHamburgerPromoTriggerActionHappenedBefore ( this ) ) ) ) { com.android.contacts.util.SharedPreferenceUtil.setHamburgerPromoTriggerActionHappenedBefore ( this ) ; } if ( ( mScroller ) != null ) { if ( ! ( mIsExitAnimationInProgress ) ) { mScroller.scrollOffBottom ( ) ; } } else { super . onBackPressed ( ) ; } }
Source:
public E next ( ) { if ( ! ( hasNext ( ) ) ) { throw new java.util.NoSuchElementException ( ) ; } prePosition = ( position ) ++ ; return type.get ( new java.util.MapEntry ( enumMap.keys [ prePosition ] , enumMap.values [ prePosition ] ) ) ; }

Target:
public E next ( ) { if ( ! ( hasNext ( ) ) ) { throw new java.util.NoSuchElementException ( ) ; } prePosition = ( position ) ++ ; return type.get ( new java.util.MapEntry < KT , VT > ( enumMap.keys [ prePosition ] , enumMap.values [ prePosition ] ) ) ; }
Source:
private static org.eclipse.swt.graphics.Font getFont ( int size , boolean bold ) { org.eclipse.swt.graphics.FontData [ ] fontData = com.android.hierarchyviewerlib.ui.TreeView.systemFont.getFontData ( ) ; for ( int i = 0 ; i < ( fontData.length ) ; i ++ ) { fontData [ i ] . setHeight ( size ) ; if ( bold ) { fontData [ i ] . setStyle ( SWT.BOLD ) ; } } return new org.eclipse.swt.graphics.Font ( org.eclipse.swt.widgets.Display.getDefault ( ) , fontData ) ; }

Target:
private static org.eclipse.swt.graphics.Font getFont ( int size , boolean bold ) { org.eclipse.swt.graphics.FontData [ ] fontData = com.android.hierarchyviewerlib.ui.TreeView.sSystemFont.getFontData ( ) ; for ( int i = 0 ; i < ( fontData.length ) ; i ++ ) { fontData [ i ] . setHeight ( size ) ; if ( bold ) { fontData [ i ] . setStyle ( SWT.BOLD ) ; } } return new org.eclipse.swt.graphics.Font ( org.eclipse.swt.widgets.Display.getDefault ( ) , fontData ) ; }
Source:
boolean setBluetoothClass ( android.bluetooth.BluetoothClass bluetoothClass ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_PRIVILEGED , "Need BLUETOOTH PRIVILEGED permission" ) ; return mAdapterProperties.setBluetoothClass ( bluetoothClass.getClassOfDeviceBytes ( ) ) ; }

Target:
boolean setBluetoothClass ( android.bluetooth.BluetoothClass bluetoothClass ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_PRIVILEGED , "Need BLUETOOTH PRIVILEGED permission" ) ; boolean result = mAdapterProperties.setBluetoothClass ( bluetoothClass.getClassOfDeviceBytes ( ) ) ; if ( ! result ) { android.util.Log.e ( com.android.bluetooth.btservice.AdapterService.TAG , ( ( "Failed to set BluetoothClass (" + bluetoothClass ) + ") on local Bluetooth adapter." ) ) ; } return result && ( storeBluetoothClassConfig ( bluetoothClass.getClassOfDevice ( ) ) ) ; }
Source:
private static java.lang.String sanitize ( @ com.android.annotations.NonNull java.lang.String str ) { str = str.toLowerCase ( java.util.Locale.US ) . replaceAll ( "[^a-z0-9_.-]+" , "_" ) . replaceAll ( "_+" , "_" ) ; return str ; }

Target:
private static java.lang.String sanitize ( @ com.android.annotations.NonNull java.lang.String str ) { if ( str.startsWith ( AndroidTargetHash.PLATFORM_HASH_PREFIX ) ) { java.lang.String platform = str.substring ( AndroidTargetHash.PLATFORM_HASH_PREFIX.length ( ) ) ; if ( ( ! ( platform.isEmpty ( ) ) ) && ( ! ( java.lang.Character.isDigit ( platform.charAt ( 0 ) ) ) ) ) { return str ; } } str = str.toLowerCase ( java.util.Locale.US ) . replaceAll ( "[^a-z0-9_.-]+" , "_" ) . replaceAll ( "_+" , "_" ) ; return str ; }
Source:
public void waitForTasks ( ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException { for ( int i = 0 ; i < ( mCount ) ; i ++ ) { java.util.concurrent.Future result = mCompletionService.take ( ) ; java.lang.Object r = result.get ( ) ; } }

Target:
public java.util.List < T > waitForTasks ( ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException { java.util.List < T > results = com.google.common.collect.Lists.newArrayListWithCapacity ( mCount ) ; for ( int i = 0 ; i < ( mCount ) ; i ++ ) { java.util.concurrent.Future < T > result = mCompletionService.take ( ) ; results.add ( result.get ( ) ) ; } return results ; }
Source:
public boolean containsAll ( java.util.Collection < ? > c ) { return standardContainsAll ( c ) ; }

Target:
public static < K , V > java.util.Map < K , java.util.List < V > > asMap ( com.google.common.collect.ListMultimap < K , V > multimap ) { return ( ( java.util.Map < K , java.util.List < V > > ) ( ( java.util.Map < K , ? > ) ( multimap.asMap ( ) ) ) ) ; }
Source:
public java.util.Collection < com.android.builder.model.JavaLibrary > getJavaLibraries ( ) { java.util.Set < java.io.File > files = configuration.getFiles ( ) ; if ( files.isEmpty ( ) ) { return java.util.Collections.emptySet ( ) ; } java.util.Set < com.android.builder.model.JavaLibrary > javaLibraries = com.beust.jcommander.internal.Sets.newHashSet ( ) ; for ( java.io.File file : files ) { javaLibraries.add ( new com.android.build.gradle.internal.model.JavaLibraryImpl ( file ) ) ; } return javaLibraries ; }

Target:
public java.util.Collection < com.android.builder.model.JavaLibrary > getJavaLibraries ( ) { java.util.Set < java.io.File > files = configuration.getFiles ( ) ; if ( files.isEmpty ( ) ) { return java.util.Collections.emptySet ( ) ; } java.util.Set < com.android.builder.model.JavaLibrary > javaLibraries = com.google.common.collect.Sets.newHashSet ( ) ; for ( java.io.File file : files ) { javaLibraries.add ( new com.android.build.gradle.internal.model.JavaLibraryImpl ( file ) ) ; } return javaLibraries ; }
Source:
public void test_tryLockJJZ_Overlapping ( ) throws java.lang.Exception { final long POSITION = 100 ; final long SIZE = 200 ; fileLock = writeOnlyFileChannel.lock ( POSITION , SIZE , false ) ; assertTrue ( fileLock.isValid ( ) ) ; try { writeOnlyFileChannel.lock ( ( POSITION + 1 ) , SIZE , false ) ; fail ( "should throw OverlappingFileLockException" ) ; } catch ( java.nio.channels.OverlappingFileLockException e ) { } }

Target:
public void test_tryLock_After_Release ( ) throws java.lang.Exception { fileLock = writeOnlyFileChannel.tryLock ( ) ; fileLock.release ( ) ; fileLock = writeOnlyFileChannel.tryLock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; fileLock.release ( ) ; fileLock = writeOnlyFileChannel.tryLock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; fileLock.release ( ) ; fileLock = writeOnlyFileChannel2.tryLock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; }
Source:
protected java.util.List < com.intellij.ui.tabs.impl.TabInfo > getVisibleInfos ( ) { return myVisibleInfos ; }

Target:
protected java.util.List < com.intellij.ui.tabs.impl.TabInfo > getVisibleInfos ( ) { if ( ! ( isAlphabeticalMode ( ) ) ) { return myVisibleInfos ; } else { java.util.List < com.intellij.ui.tabs.impl.TabInfo > sortedCopy = new java.util.ArrayList < com.intellij.ui.tabs.impl.TabInfo > ( myVisibleInfos ) ; java.util.Collections.sort ( sortedCopy , com.intellij.ui.tabs.impl.JBTabsImpl.ABC_COMPARATOR ) ; return sortedCopy ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JPhiBlockElement x ) { com.android.jack.ir.ast.JSsaVariableRef lhs = x.getLhs ( ) ; if ( lhs == null ) { printName ( x.getTarget ( ) ) ; print ( " = phi (" ) ; } else { visit ( lhs ) ; print ( " = phi (" ) ; } for ( com.android.jack.ir.ast.JSsaVariableRef rhs : x.getRhs ( ) ) { if ( rhs == null ) { print ( "?" ) ; } else { visit ( rhs ) ; } space ( ) ; } print ( ")" ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JPhiBlockElement x ) { com.android.jack.ir.ast.JSsaVariableDefRef lhs = x.getLhs ( ) ; visit ( lhs ) ; print ( " = phi (" ) ; for ( com.android.jack.ir.ast.JSsaVariableUseRef rhs : x.getRhs ( ) ) { if ( rhs == null ) { print ( "?" ) ; } else { visit ( rhs ) ; } space ( ) ; } print ( ")" ) ; return false ; }
Source:
private void reliableWrite ( ) { mBluetoothGatt.beginReliableWrite ( ) ; sleep ( 1000 ) ; writeCharacteristic ( com.android.cts.verifier.bluetooth.BleClientService.WRITE_VALUE ) ; sleep ( 1000 ) ; if ( ! ( mBluetoothGatt.executeReliableWrite ( ) ) ) { android.util.Log.w ( com.android.cts.verifier.bluetooth.BleClientService.TAG , "reliable write failed" ) ; } sleep ( 1000 ) ; mBluetoothGatt.abortReliableWrite ( ) ; }

Target:
public void onCreate ( ) { super . onCreate ( ) ; registerReceiver ( mBondStatusReceiver , new android.content.IntentFilter ( android.bluetooth.BluetoothDevice.ACTION_BOND_STATE_CHANGED ) ) ; mBluetoothManager = ( ( android.bluetooth.BluetoothManager ) ( getSystemService ( Context.BLUETOOTH_SERVICE ) ) ) ; mBluetoothAdapter = mBluetoothManager.getAdapter ( ) ; mScanner = mBluetoothAdapter.getBluetoothLeScanner ( ) ; mHandler = new android.os.Handler ( ) ; mContext = this ; mNotifyCount = 0 ; mTaskQueue = new com.android.cts.verifier.bluetooth.TestTaskQueue ( ( ( getClass ( ) . getName ( ) ) + "_taskHandlerThread" ) ) ; }
Source:
public void testInvalidTrace ( ) { com.android.tools.perflib.vmtrace.CallStackReconstructor reconstructor = new com.android.tools.perflib.vmtrace.CallStackReconstructor ( ) ; try { reconstructor.addTraceAction ( 1 , TraceAction.METHOD_ENTER , 1 , 1 ) ; reconstructor.addTraceAction ( 2 , TraceAction.METHOD_EXIT , 1 , 1 ) ; fail ( "Runtime Exception should've been thrown by the previous statement" ) ; } catch ( java.lang.RuntimeException e ) { } }

Target:
public void testInvalidTrace ( ) { com.android.tools.perflib.vmtrace.CallStackReconstructor reconstructor = new com.android.tools.perflib.vmtrace.CallStackReconstructor ( 255 ) ; try { reconstructor.addTraceAction ( 1 , TraceAction.METHOD_ENTER , 1 , 1 ) ; reconstructor.addTraceAction ( 2 , TraceAction.METHOD_EXIT , 1 , 1 ) ; fail ( "Runtime Exception should've been thrown by the previous statement" ) ; } catch ( java.lang.RuntimeException e ) { } }
Source:
public void removeListener ( org.eclipse.jface.viewers.ILabelProviderListener listener ) { }

Target:
private static java.lang.String truncate ( java.lang.String text , org.eclipse.jface.viewers.StyledString string ) { int existingLength = string.length ( ) ; if ( ( ( text.length ( ) ) + existingLength ) > ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage.LABEL_MAX_WIDTH ) ) { int truncatedLength = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage.LABEL_MAX_WIDTH ) - existingLength ) - 3 ; if ( truncatedLength > 0 ) { return java.lang.String.format ( "%1$s..." , text.substring ( 0 , truncatedLength ) ) ; } else { return "" ; } } return text ; }
Source:
private void deleteAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = com.android.sdklib.internal.avd.AvdManager.getInstance ( mSdkManager.getLocalSdk ( ) , mSdkLog ) ; com.android.sdklib.internal.avd.AvdInfo info = avdManager.getAvd ( avdName , false ) ; if ( info == null ) { errorAndExit ( "There is no Android Virtual Device named '%s'." , avdName ) ; return ; } avdManager.deleteAvd ( info , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } }

Target:
private void deleteAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = getAvdManager ( ) ; com.android.sdklib.internal.avd.AvdInfo info = avdManager.getAvd ( avdName , false ) ; if ( info == null ) { errorAndExit ( "There is no Android Virtual Device named '%s'." , avdName ) ; return ; } avdManager.deleteAvd ( info , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.unittest.ScriptC_fp_mad s = new com.android.rs.unittest.ScriptC_fp_mad ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.invoke_fp_mad_test ( 0 , 0 ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = createRenderScript ( true ) ; com.android.rs.unittest.ScriptC_fp_mad s = new com.android.rs.unittest.ScriptC_fp_mad ( pRS ) ; s.invoke_fp_mad_test ( 0 , 0 ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public boolean hasWaiters ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } lock.lock ( ) ; try { return ( guard.waiterCount ) > 0 ; } finally { lock.unlock ( ) ; } }

Target:
public boolean hasWaiters ( com.google.common.util.concurrent.Monitor.Guard guard ) { return ( getWaitQueueLength ( guard ) ) > 0 ; }
Source:
protected void finalizeFuzzyImageUsingSharpImage ( ) { long startnow ; long endnow ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_FinalizeFuzzyImageUsingSharpImage ( buffers.inAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; android.util.Log.d ( com.android.rs.refocus.d1new.RefocusFilterd1new.myTAG , ( ( "finalizeFuzzyImageUsingSharpImage: " + ( endnow - startnow ) ) + " ns" ) ) ; }

Target:
protected void finalizeFuzzyImageUsingSharpImage ( ) { long startnow ; long endnow ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_FinalizeFuzzyImageUsingSharpImage ( buffers.inAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; logTiming ( com.android.rs.refocus.d1new.RefocusFilterd1new.myTAG , "FinalizeFuzzyImageUsingSharpImage" , ( endnow - startnow ) ) ; }
Source:
private void fillUi ( ) { if ( ( ( com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ) != null ) && ( mProject.isOpen ( ) ) ) { com.android.ide.eclipse.adt.internal.project.ProjectState state = com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState ( mProject ) ; com.android.sdklib.IAndroidTarget target = state.getTarget ( ) ; if ( target != null ) { mSelector.setSelection ( target ) ; } mIsLibrary.setSelection ( state.isLibrary ( ) ) ; mLibraryDependencies.setContent ( state ) ; } }

Target:
private void fillUi ( ) { if ( ( ( com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ) != null ) && ( mProject.isOpen ( ) ) ) { com.android.ide.eclipse.adt.internal.project.ProjectState state = com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState ( mProject ) ; mPropertiesWorkingCopy = state.getProperties ( ) . makeWorkingCopy ( ) ; com.android.sdklib.IAndroidTarget target = state.getTarget ( ) ; if ( target != null ) { mSelector.setSelection ( target ) ; } mIsLibrary.setSelection ( state.isLibrary ( ) ) ; mLibraryDependencies.setContent ( state , mPropertiesWorkingCopy ) ; } }