auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean removeWithId ( T item ) { int index = indexWithTypeAndId ( item ) ; return ( ( index >= 0 ) && ( index < ( com.android.tv.dvr.ui.SortedArrayAdapter.size ( ) ) ) ) && ( remove ( com.android.tv.dvr.ui.SortedArrayAdapter.get ( index ) ) ) ; }

Target:
public int addExtraItem ( T item ) { long newItemId = getId ( item ) ; com.android.tv.common.SoftPreconditions.checkState ( ( ! ( mIds.contains ( newItemId ) ) ) ) ; mIds.add ( newItemId ) ; super . add ( item ) ; return ++ ( mExtraItemCount ) ; }
Source:
public void onCallAudioStateChanged ( android.telecom.CallAudioState oldCallAudioState , android.telecom.CallAudioState newCallAudioState ) { if ( ! ( mInCallServices.isEmpty ( ) ) ) { com.android.server.telecom.Log.i ( this , "Calling onAudioStateChanged, audioState: %s -> %s" , oldCallAudioState , newCallAudioState ) ; for ( com.android.internal.telecom.IInCallService inCallService : mInCallServices.values ( ) ) { try { inCallService.onCallAudioStateChanged ( newCallAudioState ) ; } catch ( android.os.RemoteException ignored ) { } } } }

Target:
public void onCallAudioStateChanged ( android.telecom.CallAudioState oldCallAudioState , android.telecom.CallAudioState newCallAudioState ) { if ( ! ( mInCallServices.isEmpty ( ) ) ) { android.telecom.Log.i ( this , "Calling onAudioStateChanged, audioState: %s -> %s" , oldCallAudioState , newCallAudioState ) ; for ( com.android.internal.telecom.IInCallService inCallService : mInCallServices.values ( ) ) { try { inCallService.onCallAudioStateChanged ( newCallAudioState ) ; } catch ( android.os.RemoteException ignored ) { } } } }
Source:
public void testGetResourceAsStream1 ( ) throws java.io.IOException { java.lang.Class clazz = getClass ( ) ; java.io.InputStream stream = clazz.getResourceAsStream ( "HelloWorld.txt" ) ; assertNotNull ( stream ) ; byte [ ] buffer = new byte [ 20 ] ; int length = stream.read ( buffer ) ; java.lang.String s = new java.lang.String ( buffer , 0 , length ) ; assertEquals ( "Hello, World." , s ) ; stream.close ( ) ; }

Target:
public void testGetResourceAsStream1 ( ) throws java.io.IOException { java.lang.Class clazz = getClass ( ) ; java.io.InputStream stream = clazz.getResourceAsStream ( "HelloWorld.txt" ) ; assertNotNull ( stream ) ; byte [ ] buffer = new byte [ 20 ] ; int length = stream.read ( buffer ) ; java.lang.String s = new java.lang.String ( buffer , 0 , length ) ; assertEquals ( "Hello, World.\n" , s ) ; stream.close ( ) ; }
Source:
public void testIsEmpty ( ) { java.util.concurrent.CopyOnWriteArraySet empty = new java.util.concurrent.CopyOnWriteArraySet ( ) ; java.util.concurrent.CopyOnWriteArraySet full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; assertTrue ( empty.isEmpty ( ) ) ; assertFalse ( full.isEmpty ( ) ) ; }

Target:
public void testContainsAll ( ) { java.util.Collection full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; assertTrue ( full.containsAll ( java.util.Arrays.asList ( ) ) ) ; assertTrue ( full.containsAll ( java.util.Arrays.asList ( one ) ) ) ; assertTrue ( full.containsAll ( java.util.Arrays.asList ( one , two ) ) ) ; assertFalse ( full.containsAll ( java.util.Arrays.asList ( one , two , six ) ) ) ; assertFalse ( full.containsAll ( java.util.Arrays.asList ( six ) ) ) ; }
Source:
public android.graphics.Picture capturePicture ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.graphics.Picture ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.graphics.Picture > ( ) { @ java.lang.Override public android.graphics.Picture call ( ) { return capturePicture ( ) ; } } ) ; return ret ; } return mAwContents.capturePicture ( ) ; }

Target:
public void clearView ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearView ( ) ; } } ) ; return ; } mAwContents.clearView ( ) ; }
Source:
public java.lang.String getMainDexList ( ) { java.lang.String lineSeparator = java.lang.System.getProperty ( "line.separator" , "\n" ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( java.lang.String classDescriptor : toKeep ) { sb.append ( classDescriptor ) ; sb.append ( com.android.multidex.ClassReferenceListBuilder.CLASS_EXTENSION ) ; sb.append ( lineSeparator ) ; } return lineSeparator.toString ( ) ; }

Target:
public java.lang.String getMainDexList ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( java.lang.String classDescriptor : toKeep ) { sb.append ( classDescriptor ) ; sb.append ( com.android.multidex.ClassReferenceListBuilder.CLASS_EXTENSION ) ; sb.append ( com.android.multidex.ClassReferenceListBuilder.EOL ) ; } return sb.toString ( ) ; }
Source:
public static boolean hasValidGenericSignature ( @ javax.annotation.Nonnull org.objectweb.asm.tree.ClassNode cn ) { if ( ( cn.signature ) != null ) { try { new com.android.jill.signature.GenericSignatureParser < java.lang.Object > ( new com.android.jill.frontend.java.AsmHelper.DummyAction ( ) ) . parseClassSignature ( cn.signature ) ; return true ; } catch ( java.lang.reflect.GenericSignatureFormatError e ) { } } return false ; }

Target:
public static boolean hasValidGenericSignature ( @ javax.annotation.Nonnull org.objectweb.asm.tree.ClassNode cn ) { if ( ( cn.signature ) != null ) { try { new com.android.jill.signature.GenericSignatureParser < java.lang.Object > ( com.android.jill.frontend.java.AsmHelper.DummyAction.INSTANCE ) . parseClassSignature ( cn.signature ) ; return true ; } catch ( java.lang.reflect.GenericSignatureFormatError e ) { } } return false ; }
Source:
public void onCallTerminated ( com.android.ims.ImsCall imsCall , android.telephony.ims.ImsReasonInfo reasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "mImsUssdListener onCallTerminated reasonCode=" + ( reasonInfo.getCode ( ) ) ) ) ; removeMessages ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_CHECK_FOR_WIFI_HANDOVER ) ; if ( imsCall == ( mUssdSession ) ) { mUssdSession = null ; if ( ( mPendingUssd ) != null ) { com.android.internal.telephony.CommandException ex = new com.android.internal.telephony.CommandException ( CommandException.Error.GENERIC_FAILURE ) ; android.os.AsyncResult.forMessage ( mPendingUssd , null , ex ) ; mPendingUssd.sendToTarget ( ) ; mPendingUssd = null ; } } imsCall.close ( ) ; }

Target:
public void onDeregistered ( android.telephony.ims.ImsReasonInfo imsReasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onImsDisconnected imsReasonInfo=" + imsReasonInfo ) ) ; resetImsCapabilities ( ) ; mPhone.setServiceState ( ServiceState.STATE_OUT_OF_SERVICE ) ; mPhone.setImsRegistered ( false ) ; mPhone.processDisconnectReason ( imsReasonInfo ) ; mMetrics.writeOnImsConnectionState ( mPhone.getPhoneId ( ) , ImsConnectionState.State.DISCONNECTED , imsReasonInfo ) ; }
Source:
private void notifyReady ( ) throws com.android.ims.ImsException { com.android.ims.ImsManager manager ; synchronized ( mLock ) { mRetryCount = 0 ; manager = mImsManager ; } mListener.connectionReady ( manager ) ; }

Target:
private void notifyReady ( ) throws com.android.ims.ImsException { com.android.ims.ImsManager manager ; synchronized ( mLock ) { manager = mImsManager ; } try { mListener.connectionReady ( manager ) ; } catch ( com.android.ims.ImsException e ) { android.util.Log.w ( com.android.ims.ImsManager.TAG , ( "Connector: notifyReady exception: " + ( e.getMessage ( ) ) ) ) ; throw e ; } synchronized ( mLock ) { mRetryCount = 0 ; } }
Source:
private void addNightModeToBundles ( java.util.List < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > addConfig ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > list = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle bundle : addConfig ) { int index = 0 ; for ( com.android.sdklib.resources.NightMode mode : com.android.sdklib.resources.NightMode.values ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle b = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle ( bundle ) ; b.config.setNightModeQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.NightModeQualifier ( mode ) ) ; b.nightModeIndex = index ++ ; list.add ( b ) ; } } addConfig.clear ( ) ; addConfig.addAll ( list ) ; }

Target:
private void addNightModeToBundles ( java.util.List < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > addConfig ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > list = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle bundle : addConfig ) { int index = 0 ; for ( com.android.resources.NightMode mode : com.android.resources.NightMode.values ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle b = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle ( bundle ) ; b.config.setNightModeQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.NightModeQualifier ( mode ) ) ; b.nightModeIndex = index ++ ; list.add ( b ) ; } } addConfig.clear ( ) ; addConfig.addAll ( list ) ; }
Source:
public void testMalformedI18NameBytes ( ) { for ( byte [ ] malformedBytes : com.android.server.wifi.hotspot2.anqp.I18NameTest.MALFORMED_I18_NAME_BYTES ) { try { com.android.server.wifi.hotspot2.anqp.I18Name i18Name = new com.android.server.wifi.hotspot2.anqp.I18Name ( java.nio.ByteBuffer.wrap ( malformedBytes ) . order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ) ; } catch ( java.net.ProtocolException e ) { continue ; } fail ( ( "Expected exception while parsing malformed I18 Name bytes: " + malformedBytes ) ) ; } }

Target:
public void parseBufferWithDefaultTestData ( ) throws java.lang.Exception { byte [ ] data = getDefaultTestData ( ) ; com.android.server.wifi.hotspot2.anqp.I18Name actualName = com.android.server.wifi.hotspot2.anqp.I18Name.parse ( getTestBuffer ( data , data.length ) ) ; com.android.server.wifi.hotspot2.anqp.I18Name expectedName = new com.android.server.wifi.hotspot2.anqp.I18Name ( com.android.server.wifi.hotspot2.anqp.I18NameTest.TEST_LANGUAGE , com.android.server.wifi.hotspot2.anqp.I18NameTest.TEST_LOCALE , com.android.server.wifi.hotspot2.anqp.I18NameTest.TEST_TEXT ) ; org.junit.Assert.assertEquals ( expectedName , actualName ) ; }
Source:
public void run ( ) { assertTrue ( mWebView.requestFocus ( View.FOCUS_DOWN , null ) ) ; }

Target:
public void run ( ) { int origX = mWebView.getScrollX ( ) ; int origY = mWebView.getScrollY ( ) ; int half = dimension / 2 ; android.graphics.Rect rect = new android.graphics.Rect ( half , half , ( half + 1 ) , ( half + 1 ) ) ; assertTrue ( mWebView.requestChildRectangleOnScreen ( mWebView , rect , true ) ) ; assertTrue ( ( ( mWebView.getScrollX ( ) ) > origX ) ) ; assertTrue ( ( ( mWebView.getScrollY ( ) ) > origY ) ) ; }
Source:
public android.graphics.Bitmap getFavicon ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.graphics.Bitmap ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.graphics.Bitmap > ( ) { @ java.lang.Override public android.graphics.Bitmap call ( ) { return getFavicon ( ) ; } } ) ; return ret ; } return mAwContents.getFavicon ( ) ; }

Target:
public java.lang.String getTitle ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getTitle ( ) ; } } ) ; return ret ; } return mAwContents.getTitle ( ) ; }
Source:
private java.io.File getInArgumentPath ( java.lang.String filename ) { java.io.File file = new java.io.File ( filename ) ; if ( ! ( file.isAbsolute ( ) ) ) { java.io.File workDir = getLintWorkDir ( ) ; if ( workDir != null ) { java.io.File file2 = new java.io.File ( workDir , filename ) ; if ( file2.exists ( ) ) { try { file = file2.getCanonicalFile ( ) ; } catch ( java.io.IOException e ) { file = file2 ; } } } } return file ; }

Target:
private static java.io.File getInArgumentPath ( java.lang.String filename ) { java.io.File file = new java.io.File ( filename ) ; if ( ! ( file.isAbsolute ( ) ) ) { java.io.File workDir = com.android.tools.lint.Main.getLintWorkDir ( ) ; if ( workDir != null ) { java.io.File file2 = new java.io.File ( workDir , filename ) ; if ( file2.exists ( ) ) { try { file = file2.getCanonicalFile ( ) ; } catch ( java.io.IOException e ) { file = file2 ; } } } } return file ; }
Source:
public com.android.ide.common.rendering.api.ResourceValue getResourceValue ( com.android.resources.ResourceType type , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration referenceConfig , boolean isFramework ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile match = ( ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile ) ( referenceConfig.findMatchingConfigurable ( mFiles ) ) ) ; if ( match != null ) { return match.getValue ( type , mName ) ; } return null ; }

Target:
public com.android.ide.common.rendering.api.ResourceValue getResourceValue ( com.android.resources.ResourceType type , com.android.ide.common.resources.configuration.FolderConfiguration referenceConfig , boolean isFramework ) { com.android.ide.common.resources.ResourceFile match = ( ( com.android.ide.common.resources.ResourceFile ) ( referenceConfig.findMatchingConfigurable ( mFiles ) ) ) ; if ( match != null ) { return match.getValue ( type , mName ) ; } return null ; }
Source:
public void testAesCbcHmacMd5Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha256Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , android.net.cts.IpSecManagerTest.getKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
public void testGetMaxExpansion ( ) { java.lang.String text = "cha" ; java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; int order = iterator.next ( ) ; while ( order != ( java.text.CollationElementIterator.NULLORDER ) ) { assertEquals ( 1 , iterator.getMaxExpansion ( order ) ) ; order = iterator.next ( ) ; } }

Target:
public void testGetMaxExpansion ( ) { java.lang.String text = "cha" ; java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( java.util.Locale.forLanguageTag ( "es-u-co-trad" ) ) ) ) ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; int order = iterator.next ( ) ; while ( order != ( java.text.CollationElementIterator.NULLORDER ) ) { assertEquals ( 1 , iterator.getMaxExpansion ( order ) ) ; order = iterator.next ( ) ; } }
Source:
private void onHandshake ( byte [ ] address , int status ) { android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_ON_HANDSHAKE ) ; msg.obj = address ; msg.arg1 = status ; mHandler.sendMessage ( msg ) ; }

Target:
private void onHandshake ( byte [ ] address , int status ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "onHandshake: status=" + status ) ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_ON_HANDSHAKE ) ; msg.obj = address ; msg.arg1 = status ; mHandler.sendMessage ( msg ) ; }
Source:
private java.lang.String getLastLineupId ( ) { if ( ( mLineupId ) == null ) { mLineupId = android.preference.PreferenceManager.getDefaultSharedPreferences ( mContext ) . getString ( com.android.tv.data.epg.EpgFetcher.KEY_LAST_LINEUP_ID , null ) ; } if ( com.android.tv.data.epg.EpgFetcher.DEBUG ) android.util.Log.d ( com.android.tv.data.epg.EpgFetcher.TAG , ( "Last lineup_id " + ( mLineupId ) ) ) ; return mLineupId ; }

Target:
public void startImmediately ( boolean clearStoredLineupId ) { startInternal ( true ) ; if ( mStarted ) { if ( clearStoredLineupId ) { if ( com.android.tv.data.epg.EpgFetcher.DEBUG ) android.util.Log.d ( com.android.tv.data.epg.EpgFetcher.TAG , ( "Clear stored lineup id: " + ( mLineupId ) ) ) ; setLastLineupId ( null ) ; } if ( com.android.tv.data.epg.EpgFetcher.DEBUG ) android.util.Log.d ( com.android.tv.data.epg.EpgFetcher.TAG , "Starting fetcher immediately" ) ; postFetchRequest ( true , 0 ) ; } }
Source:
public android.net.IpSecTransform.Builder setSpi ( @ android.net.IpSecTransform.TransformDirection int direction , android.net.IpSecManager.SecurityParameterIndex spi ) { mConfig.setSpiResourceId ( direction , spi.getResourceId ( ) ) ; return this ; }

Target:
public android.net.IpSecTransform.Builder setSpi ( @ android.net.IpSecTransform.TransformDirection int direction , android.net.IpSecManager.SecurityParameterIndex spi ) { if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setSpiResourceId ( direction , spi.getResourceId ( ) ) ; return this ; }
Source:
public void testE3 ( ) { dot.junit.opcodes.aget_short.d.T_aget_short_1 t = new dot.junit.opcodes.aget_short.d.T_aget_short_1 ( ) ; short [ ] arr = new short [ 2 ] ; try { t.run ( arr , ( - 1 ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE3 ( ) { loadAndRun ( "dot.junit.opcodes.aget_short.d.T_aget_short_1" , java.lang.ArrayIndexOutOfBoundsException.class , new short [ 2 ] , ( - 1 ) ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JArrayRef x ) { com.android.jack.ir.ast.JExpression instance = x.getInstance ( ) ; parenPush ( x , instance ) ; accept ( instance ) ; parenPop ( x , instance ) ; print ( '[' ) ; accept ( x.getIndexExpr ( ) ) ; print ( ']' ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JConstructor x ) { if ( x.isPrivate ( ) ) { print ( com.android.jack.ir.impl.CHARS_PRIVATE ) ; } else { print ( com.android.jack.ir.impl.CHARS_PUBLIC ) ; } printName ( x ) ; printParameterList ( x ) ; return false ; }
Source:
public sun.util.resources.OpenListResourceBundle getParent ( ) { return ( ( sun.util.resources.OpenListResourceBundle ) ( parent ) ) ; }

Target:
public java.util.Set < java.lang.String > keySet ( ) { if ( ( keyset ) != null ) { return keyset ; } java.util.Set < java.lang.String > ks = createSet ( ) ; ks.addAll ( handleKeySet ( ) ) ; if ( ( parent ) != null ) { ks.addAll ( parent.keySet ( ) ) ; } synchronized ( this ) { if ( ( keyset ) == null ) { keyset = ks ; } } return keyset ; }
Source:
public boolean dumpProfiles ( java.lang.String gid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.internal.os.InstallerConnection.InstallerException { throw new java.lang.IllegalStateException ( "Should not reach here" ) ; }

Target:
public void dexopt ( java.lang.String apkPath , int uid , @ android.annotation.Nullable java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , @ android.annotation.Nullable java.lang.String outputPath , int dexFlags , java.lang.String compilerFilter , @ android.annotation.Nullable java.lang.String volumeUuid , @ android.annotation.Nullable java.lang.String sharedLibraries ) throws com.android.internal.os.InstallerConnection.InstallerException { commands.add ( com.android.server.pm.OtaDexoptService.buildCommand ( "dexopt" , apkPath , uid , pkgName , instructionSet , dexoptNeeded , outputPath , dexFlags , compilerFilter , volumeUuid , sharedLibraries ) ) ; }
Source:
com.android.bluetooth.avrcp.Metadata getCurrentMetadata ( ) { return com.android.bluetooth.avrcp.Util.toMetadata ( getMetadata ( ) ) ; }

Target:
com.android.bluetooth.avrcp.Metadata getCurrentMetadata ( ) { if ( ( getActiveQueueID ( ) ) != ( - 1 ) ) { for ( com.android.bluetooth.avrcp.Metadata data : getCurrentQueue ( ) ) { if ( data.mediaId.equals ( ( ( Util.NOW_PLAYING_PREFIX ) + ( getActiveQueueID ( ) ) ) ) ) { d ( ( "getCurrentMetadata: Using playlist data: " + ( data.toString ( ) ) ) ) ; return data.clone ( ) ; } } } return com.android.bluetooth.avrcp.Util.toMetadata ( getMetadata ( ) ) ; }
Source:
public synchronized void setCarMode ( boolean isCarMode ) { com.android.server.telecom.Log.i ( this , ( ( ( "carmodechange: " + ( mIsCarMode ) ) + " => " ) + isCarMode ) ) ; if ( isCarMode != ( mIsCarMode ) ) { mIsCarMode = isCarMode ; com.android.server.telecom.InCallController.InCallServiceConnection newConnection = getCurrentConnection ( ) ; if ( newConnection != ( mCurrentConnection ) ) { if ( mIsConnected ) { mCurrentConnection.disconnect ( ) ; newConnection.connect ( null ) ; } mCurrentConnection = newConnection ; } } }

Target:
public synchronized void setCarMode ( boolean isCarMode ) { android.telecom.Log.i ( this , ( ( ( "carmodechange: " + ( mIsCarMode ) ) + " => " ) + isCarMode ) ) ; if ( isCarMode != ( mIsCarMode ) ) { mIsCarMode = isCarMode ; com.android.server.telecom.InCallController.InCallServiceConnection newConnection = getCurrentConnection ( ) ; if ( newConnection != ( mCurrentConnection ) ) { if ( mIsConnected ) { mCurrentConnection.disconnect ( ) ; newConnection.connect ( null ) ; } mCurrentConnection = newConnection ; } } }
Source:
private boolean merge ( com.android.server.pm.dex.PackageDexUsage.DexUseInfo dexUseInfo ) { boolean oldIsUsedByOtherApps = mIsUsedByOtherApps ; mIsUsedByOtherApps = ( mIsUsedByOtherApps ) || ( dexUseInfo.mIsUsedByOtherApps ) ; boolean updateIsas = mLoaderIsas.addAll ( dexUseInfo.mLoaderIsas ) ; return updateIsas || ( oldIsUsedByOtherApps != ( mIsUsedByOtherApps ) ) ; }

Target:
private boolean merge ( com.android.server.pm.dex.PackageDexUsage.DexUseInfo dexUseInfo ) { boolean oldIsUsedByOtherApps = mIsUsedByOtherApps ; mIsUsedByOtherApps = ( mIsUsedByOtherApps ) || ( dexUseInfo.mIsUsedByOtherApps ) ; boolean updateIsas = mLoaderIsas.addAll ( dexUseInfo.mLoaderIsas ) ; boolean updateLoadingPackages = mLoadingPackages.addAll ( dexUseInfo.mLoadingPackages ) ; return ( updateIsas || ( oldIsUsedByOtherApps != ( mIsUsedByOtherApps ) ) ) || updateLoadingPackages ; }
Source:
public java.util.Collection < java.io.File > getJars ( ) { return configuration.getFiles ( ) ; }

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.beust.jcommander.internal.Sets.newHashSet ( ) ; for ( java.io.File file : files ) { javaLibraries.add ( new com.android.build.gradle.internal.model.JavaLibraryImpl ( file ) ) ; } return javaLibraries ; }
Source:
public void testOpenLink_NoLinkFound ( ) { try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.spanned ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) , android.support.test.espresso.action.ViewActions.openLinkWithText ( "bacon" ) ) ; fail ( "Expected previous call to fail" ) ; } catch ( android.support.test.espresso.PerformException expected ) { android.support.test.espresso.matcher.ViewMatchers.assertThat ( expected.getCause ( ) . getMessage ( ) , org.hamcrest.Matchers.containsString ( "bacon" ) ) ; } }

Target:
public void testOpenLink_NoLinkFound ( ) { expectedException.expect ( android.support.test.espresso.PerformException.class ) ; expectedException.expectCause ( new org.hamcrest.CustomTypeSafeMatcher < java.lang.Throwable > ( "message contains has-links=false" ) { @ java.lang.Override protected boolean matchesSafely ( java.lang.Throwable throwable ) { return throwable.getMessage ( ) . contains ( "bacon" ) ; } } ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.spanned ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) , android.support.test.espresso.action.ViewActions.openLinkWithText ( "bacon" ) ) ; }
Source:
public static java.security.Signature getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { if ( algorithm == null ) { throw new java.lang.NullPointerException ( "algorithm == null" ) ; } if ( provider == null ) { throw new java.lang.IllegalArgumentException ( ) ; } return java.security.Signature.getSignatureInstance ( algorithm , provider ) ; }

Target:
public static java.security.Signature getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { if ( algorithm == null ) { throw new java.lang.NullPointerException ( "algorithm == null" ) ; } if ( provider == null ) { throw new java.lang.IllegalArgumentException ( "provider == null" ) ; } return java.security.Signature.getSignatureInstance ( algorithm , provider ) ; }
Source:
public void restrictedStateChanged ( int indicationType , int var2 ) { }

Target:
public void cdmaOtaProvisionStatus ( int indicationType , int status ) { mRil.processIndication ( indicationType ) ; int [ ] response = new int [ 1 ] ; response [ 0 ] = status ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_OTA_PROVISION_STATUS , response ) ; mRil.mOtaProvisionRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
protected void engineUpdate ( byte [ ] input , int offset , int len ) { ensureKeystoreOperationInitialized ( ) ; byte [ ] output ; try { output = mChunkedStreamer.update ( input , offset , len ) ; } catch ( android.security.KeyStoreException e ) { throw android.security.KeyStore.getCryptoOperationException ( e ) ; } if ( ( output != null ) && ( ( output.length ) != 0 ) ) { throw new android.security.CryptoOperationException ( "Update operation unexpectedly produced output" ) ; } }

Target:
protected byte [ ] engineDoFinal ( ) { try { ensureKeystoreOperationInitialized ( ) ; } catch ( java.security.InvalidKeyException e ) { throw new java.lang.IllegalStateException ( "Failed to reinitialize MAC" , e ) ; } byte [ ] result ; try { result = mChunkedStreamer.doFinal ( null , 0 , 0 ) ; } catch ( android.security.KeyStoreException e ) { throw new java.lang.IllegalStateException ( "Keystore operation failed" , e ) ; } resetWhilePreservingInitState ( ) ; return result ; }
Source:
public long getInclusiveTime ( com.android.tools.perflib.vmtrace.ClockType clockType ) { return clockType == ( ClockType.THREAD ) ? com.google.common.primitives.UnsignedInts.toLong ( ( ( mExitThreadTime ) - ( mEntryThreadTime ) ) ) : com.google.common.primitives.UnsignedInts.toLong ( ( ( mExitGlobalTime ) - ( mEntryGlobalTime ) ) ) ; }

Target:
public long getInclusiveTime ( com.android.tools.perflib.vmtrace.ClockType clockType , java.util.concurrent.TimeUnit units ) { long inclusiveTime = ( clockType == ( ClockType.THREAD ) ) ? com.google.common.primitives.UnsignedInts.toLong ( ( ( mExitThreadTime ) - ( mEntryThreadTime ) ) ) : com.google.common.primitives.UnsignedInts.toLong ( ( ( mExitGlobalTime ) - ( mEntryGlobalTime ) ) ) ; return units.convert ( inclusiveTime , com.android.tools.perflib.vmtrace.VmTraceData.getDefaultTimeUnits ( ) ) ; }
Source:
public void testParametere002 ( ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( PARAMETER002 ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JillBasedToolchain.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.LegacyToolchain.class ) . addProperty ( ParameterMetadataAnnotationsAdder.PARAMETER_ANNOTATION.getName ( ) , "true" ) . setWithDebugInfos ( true ) . compileAndRunTest ( ) ; }

Target:
public void testParametere002 ( ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( PARAMETER002 ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JillBasedToolchain.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.LegacyBasedToolchain.class ) . addProperty ( ParameterMetadataAnnotationsAdder.PARAMETER_ANNOTATION.getName ( ) , "true" ) . setWithDebugInfos ( true ) . compileAndRunTest ( ) ; }
Source:
public static void checkServerTrusted ( javax.net.ssl.X509TrustManager x509tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.lang.String host ) throws java.security.cert.CertificateException { x509tm.checkServerTrusted ( chain , authType ) ; }

Target:
public static void checkClientTrusted ( javax.net.ssl.X509TrustManager tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , org.conscrypt.OpenSSLSocketImpl socket ) throws java.security.cert.CertificateException { if ( tm instanceof javax.net.ssl.X509ExtendedTrustManager ) { javax.net.ssl.X509ExtendedTrustManager x509etm = ( ( javax.net.ssl.X509ExtendedTrustManager ) ( tm ) ) ; x509etm.checkClientTrusted ( chain , authType , socket ) ; } else { tm.checkClientTrusted ( chain , authType ) ; } }
Source:
private static void checkSelectorPresence ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement element ) { org.w3c.dom.Attr selectorAttribute = element.getXml ( ) . getAttributeNodeNS ( SdkConstants.TOOLS_URI , Selector.SELECTOR_LOCAL_NAME ) ; if ( ( selectorAttribute != null ) && ( ! ( element.supportsSelector ( ) ) ) ) { java.lang.String message = java.lang.String.format ( "Unsupported tools:selector=\"%1$s\" found on node %2$s at %3$s" , selectorAttribute.getValue ( ) , element.getId ( ) , element.printPosition ( ) ) ; element.addMessage ( mergingReport , com.android.manifmerger.ERROR , message ) ; } }

Target:
private static void checkSelectorPresence ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement element ) { org.w3c.dom.Attr selectorAttribute = element.getXml ( ) . getAttributeNodeNS ( SdkConstants.TOOLS_URI , Selector.SELECTOR_LOCAL_NAME ) ; if ( ( selectorAttribute != null ) && ( ! ( element.supportsSelector ( ) ) ) ) { java.lang.String message = java.lang.String.format ( "Unsupported tools:selector=\"%1$s\" found on node %2$s at %3$s" , selectorAttribute.getValue ( ) , element.getId ( ) , element.printPosition ( ) ) ; element.addMessage ( mergingReport , Severity.ERROR , message ) ; } }
Source:
public void testConnectFailureDueToNetworkSelectFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.select ( ) ) . thenReturn ( false ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; }

Target:
public void testConnectFailureDueToNetworkSaveException ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( true ) ; org.mockito.Mockito.doThrow ( new java.lang.IllegalArgumentException ( "Some error!!!" ) ) . when ( mSupplicantStaNetworkMock ) . saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; org.mockito.Mockito.verify ( mISupplicantStaIfaceMock , org.mockito.Mockito.times ( 2 ) ) . removeNetwork ( org.mockito.Matchers.anyInt ( ) ) ; }
Source:
boolean implementsInterface ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JInterface jinterface ) { for ( com.android.jack.ir.ast.JInterface interf : getImplements ( ) ) { if ( interf.equals ( jinterface ) ) { return true ; } else if ( interf instanceof com.android.jack.ir.ast.JDefinedInterface ) { if ( ( ( com.android.jack.ir.ast.JDefinedInterface ) ( interf ) ) . implementsInterface ( jinterface ) ) { return true ; } } } return false ; }

Target:
boolean implementsInterface ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JInterface jinterface ) { for ( com.android.jack.ir.ast.JInterface interf : getImplements ( ) ) { if ( interf.isSameType ( jinterface ) ) { return true ; } else if ( interf instanceof com.android.jack.ir.ast.JDefinedInterface ) { if ( ( ( com.android.jack.ir.ast.JDefinedInterface ) ( interf ) ) . implementsInterface ( jinterface ) ) { return true ; } } } return false ; }
Source:
public void testCompileNonConflictingSourceAndImport ( ) throws java.lang.Exception { java.io.File jackOut = com.android.jack.TestTools.createTempDir ( "importtest" , "dir" ) ; com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "fibonacci" ) ) ; options.jayceOutDir = jackOut ; com.android.jack.TestTools.runCompilation ( options ) ; com.android.jack.Options importOptions = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "threeaddress" ) ) ; importOptions.jayceImport.add ( jackOut ) ; com.android.jack.TestTools.runCompilation ( importOptions ) ; }

Target:
public void testCompileNonConflictingSourceAndImport ( ) throws java.lang.Exception { java.io.File jackOut = com.android.jack.TestTools.createTempDir ( "importtest" , "dir" ) ; com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "fibonacci" ) ) ; options.libraryOutDir = jackOut ; com.android.jack.TestTools.runCompilation ( options ) ; com.android.jack.Options importOptions = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "threeaddress" ) ) ; importOptions.jayceImport.add ( jackOut ) ; com.android.jack.TestTools.runCompilation ( importOptions ) ; }
Source:
private void done ( boolean success ) { if ( com.android.carrierdefaultapp.CaptivePortalLoginActivity.DBG ) com.android.carrierdefaultapp.CaptivePortalLoginActivity.logd ( java.lang.String.format ( "Result success %b for %s" , success , mUrl.toString ( ) ) ) ; if ( success ) { com.android.carrierdefaultapp.CarrierActionUtils.applyCarrierAction ( CarrierActionUtils.CARRIER_ACTION_ENABLE_RADIO , getIntent ( ) , getApplicationContext ( ) ) ; com.android.carrierdefaultapp.CarrierActionUtils.applyCarrierAction ( CarrierActionUtils.CARRIER_ACTION_ENABLE_METERED_APNS , getIntent ( ) , getApplicationContext ( ) ) ; com.android.carrierdefaultapp.CarrierActionUtils.applyCarrierAction ( CarrierActionUtils.CARRIER_ACTION_CANCEL_ALL_NOTIFICATIONS , getIntent ( ) , getApplicationContext ( ) ) ; } finishAndRemoveTask ( ) ; }

Target:
private void done ( boolean success ) { if ( com.android.carrierdefaultapp.CaptivePortalLoginActivity.DBG ) com.android.carrierdefaultapp.CaptivePortalLoginActivity.logd ( java.lang.String.format ( "Result success %b for %s" , success , ( ( mUrl ) != null ? mUrl.toString ( ) : "null" ) ) ) ; if ( success ) { com.android.carrierdefaultapp.CarrierActionUtils.applyCarrierAction ( CarrierActionUtils.CARRIER_ACTION_ENABLE_RADIO , getIntent ( ) , getApplicationContext ( ) ) ; com.android.carrierdefaultapp.CarrierActionUtils.applyCarrierAction ( CarrierActionUtils.CARRIER_ACTION_ENABLE_METERED_APNS , getIntent ( ) , getApplicationContext ( ) ) ; com.android.carrierdefaultapp.CarrierActionUtils.applyCarrierAction ( CarrierActionUtils.CARRIER_ACTION_CANCEL_ALL_NOTIFICATIONS , getIntent ( ) , getApplicationContext ( ) ) ; } finishAndRemoveTask ( ) ; }
Source:
public int setProvisionedValue ( int item , int value ) throws android.os.RemoteException { return ImsConfig.OperationStatusConstants.FAILED ; }

Target:
public synchronized int setProvisionedValue ( int item , int value ) throws android.os.RemoteException { mProvisionedIntValue.remove ( item ) ; int retVal = getImsConfigImpl ( ) . setProvisionedValue ( item , value ) ; if ( retVal == ( ImsConfig.OperationStatusConstants.SUCCESS ) ) { updateCachedValue ( item , value , true ) ; } else { android.util.Log.d ( android.telephony.ims.compat.stub.ImsConfigImplBase.TAG , ( ( ( ( ( "Set provision value of " + item ) + " to " ) + value ) + " failed with error code " ) + retVal ) ) ; } return retVal ; }
Source:
public void testCheckReadPhoneState_noPermissions ( ) { try { com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.fail ( "Should have thrown SecurityException" ) ; } catch ( java.lang.SecurityException e ) { } }

Target:
public void testCheckReadPhoneNumber_hasReadSms ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_SMS , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.mockito.Mockito.when ( mMockAppOps.noteOp ( AppOpsManager.OP_READ_SMS , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE ) ) . thenReturn ( AppOpsManager.MODE_ALLOWED ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
public void testKeyStore_Aliases_Success ( ) throws java.lang.Exception { mKeyStore.load ( null , null ) ; assertAliases ( new java.lang.String [ ] { } ) ; assertTrue ( mAndroidKeyStore.generate ( ( ( Credentials.USER_PRIVATE_KEY ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) ) ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , android.security.AndroidKeyStoreTest.TEST_ALIAS_2 } ) ; }

Target:
public void testKeyStore_Aliases_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertAliases ( new java.lang.String [ ] { } ) ; assertTrue ( mAndroidKeyStore.generate ( ( ( Credentials.USER_PRIVATE_KEY ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) ) ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , android.security.AndroidKeyStoreTest.TEST_ALIAS_2 } ) ; }
Source:
public static com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type valueOf ( int value ) { switch ( value ) { case 1 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.VOID ; case 2 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.CHAR ; case 3 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.BYTE ; case 4 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.INT ; case 5 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.FLOAT ; case 6 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.BOOL ; case 7 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.ENUM ; default : return null ; } }

Target:
public static com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type valueOf ( int value ) { switch ( value ) { case 1 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.VOID ; case 2 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.CHAR ; case 3 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.BYTE ; case 4 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.INT ; case 5 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.FLOAT ; case 6 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.BOOL ; case 7 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.ENUM ; case 8 : return com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage.DataType.Type.INT64 ; default : return null ; } }
Source:
protected com.android.sdkuilib.internal.repository.core.PackageLoader getPackageLoader ( boolean useLocalCache ) { com.android.sdklib.internal.repository.DownloadCache dc = mUpdaterData.getDownloadCache ( ) ; assert dc instanceof com.android.sdkuilib.internal.repository.MockDownloadCache ; if ( dc instanceof com.android.sdkuilib.internal.repository.MockDownloadCache ) { ( ( com.android.sdkuilib.internal.repository.MockDownloadCache ) ( dc ) ) . overrideStrategy ( ( useLocalCache ? com.android.sdklib.internal.repository.DownloadCache.Strategy.ONLY_CACHE : null ) ) ; } return mUpdaterData.getPackageLoader ( ) ; }

Target:
protected com.android.sdkuilib.internal.repository.core.PackageLoader getPackageLoader ( boolean useLocalCache ) { com.android.sdklib.internal.repository.DownloadCache dc = mSwtUpdaterData.getDownloadCache ( ) ; assert dc instanceof com.android.sdkuilib.internal.repository.MockDownloadCache ; if ( dc instanceof com.android.sdkuilib.internal.repository.MockDownloadCache ) { ( ( com.android.sdkuilib.internal.repository.MockDownloadCache ) ( dc ) ) . overrideStrategy ( ( useLocalCache ? com.android.sdklib.internal.repository.DownloadCache.Strategy.ONLY_CACHE : null ) ) ; } return mSwtUpdaterData.getPackageLoader ( ) ; }
Source:
public void onServiceConnected ( int profile , android.bluetooth.BluetoothProfile proxy ) { synchronized ( this ) { switch ( profile ) { case android.bluetooth.BluetoothProfile.A2DP : mA2dp = ( ( android.bluetooth.BluetoothA2dp ) ( proxy ) ) ; break ; case android.bluetooth.BluetoothProfile.HEADSET : mHeadset = ( ( android.bluetooth.BluetoothHeadset ) ( proxy ) ) ; break ; case android.bluetooth.BluetoothProfile.INPUT_DEVICE : mInput = ( ( android.bluetooth.BluetoothInputDevice ) ( proxy ) ) ; break ; case android.bluetooth.BluetoothProfile.PAN : mPan = ( ( android.bluetooth.BluetoothPan ) ( proxy ) ) ; break ; } } }

Target:
public void onServiceConnected ( int profile , android.bluetooth.BluetoothProfile proxy ) { synchronized ( this ) { switch ( profile ) { case android.bluetooth.BluetoothProfile.A2DP : mA2dp = ( ( android.bluetooth.BluetoothA2dp ) ( proxy ) ) ; break ; case android.bluetooth.BluetoothProfile.HEADSET : mHeadset = ( ( android.bluetooth.BluetoothHeadset ) ( proxy ) ) ; break ; case android.bluetooth.BluetoothProfile.HID_HOST : mInput = ( ( android.bluetooth.BluetoothHidHost ) ( proxy ) ) ; break ; case android.bluetooth.BluetoothProfile.PAN : mPan = ( ( android.bluetooth.BluetoothPan ) ( proxy ) ) ; break ; } } }
Source:
public java.lang.String getShortDescription ( ) { return java.lang.String.format ( "%1$s System Image, Android API %2$s, revision %3$s%4$s" , getAbiDisplayName ( ) , mVersion.getApiString ( ) , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; }

Target:
public java.lang.String getShortDescription ( ) { boolean isDefaultTag = SystemImage.DEFAULT_TAG.equals ( mTag ) ; return java.lang.String.format ( "%1$s%2$s System Image, Android API %3$s, revision %4$s%5$s" , ( isDefaultTag ? "" : ( mTag.getDisplay ( ) ) + " " ) , getAbiDisplayName ( ) , mVersion.getApiString ( ) , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; }
Source:
public com.android.jack.test.toolchain.JackBasedToolchain setSourceLevel ( @ javax.annotation.Nonnull com.android.jack.test.toolchain.SourceLevel sourceLevel ) { super . setSourceLevel ( sourceLevel ) ; switch ( sourceLevel ) { case JAVA_6 : addProperty ( "jack.java.source.version" , "1.6" ) ; break ; case JAVA_7 : addProperty ( "jack.java.source.version" , "1.7" ) ; break ; default : throw new java.lang.AssertionError ( ( ( "Unkown level: '" + ( sourceLevel.toString ( ) ) ) + "'" ) ) ; } return this ; }

Target:
public com.android.jack.test.toolchain.JackBasedToolchain setSourceLevel ( @ javax.annotation.Nonnull com.android.jack.test.toolchain.SourceLevel sourceLevel ) { super . setSourceLevel ( sourceLevel ) ; switch ( sourceLevel ) { case JAVA_6 : addProperty ( "jack.java.source.version" , "1.6" ) ; break ; case JAVA_7 : addProperty ( "jack.java.source.version" , "1.7" ) ; break ; case JAVA_8 : addProperty ( "jack.java.source.version" , "1.8" ) ; break ; default : throw new java.lang.AssertionError ( ( ( "Unkown level: '" + ( sourceLevel.toString ( ) ) ) + "'" ) ) ; } return this ; }
Source:
public void createTest ( com.android.rs.image2.Resources res ) { mScript = new com.android.rs.image2.ScriptC_wbalance ( mRS ) ; }

Target:
public void createTest ( com.android.rs.image2.Resources res ) { mScript = new com.android.rs.image2.ScriptC_wbalance ( mRS ) ; mHist = android.support.v8.renderscript.ScriptIntrinsicHistogram.create ( mRS , android.support.v8.renderscript.Element.U8_4 ( mRS ) ) ; mSums = android.support.v8.renderscript.Allocation.createSized ( mRS , android.support.v8.renderscript.Element.I32_4 ( mRS ) , 256 ) ; mHist.setOutput ( mSums ) ; mScript.set_histogramValues ( mSums ) ; }
Source:
public boolean remove ( java.lang.Object element ) { try { @ java.lang.SuppressWarnings ( value = "unchecked" ) E e = ( ( E ) ( element ) ) ; return ( predicate.apply ( e ) ) && ( unfiltered.remove ( element ) ) ; } catch ( java.lang.NullPointerException e ) { return false ; } catch ( java.lang.ClassCastException e ) { return false ; } }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object element ) { if ( com.google.common.collect.Collections2.safeContains ( unfiltered , element ) ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E e = ( ( E ) ( element ) ) ; return predicate.apply ( e ) ; } return false ; }