auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static org.eclipse.jdt.core.dom.TagElement createTextTagElement ( org.eclipse.jdt.core.dom.AST ast , java.lang.String text ) { org.eclipse.jdt.core.dom.TagElement element = ( ( org.eclipse.jdt.core.dom.TagElement ) ( ast.createInstance ( org.eclipse.jdt.core.dom.TagElement.class ) ) ) ; org.eclipse.jdt.core.dom.TextElement textElement = com.google.currysrc.api.transform.ast.AstNodes.createTextElement ( ast , text ) ; element.fragments ( ) . add ( textElement ) ; return element ; }

Target:
public static org.eclipse.jdt.core.dom.TagElement createTextTagElement ( org.eclipse.jdt.core.dom.AST ast , java.lang.String text ) { org.eclipse.jdt.core.dom.TagElement element = ( ( org.eclipse.jdt.core.dom.TagElement ) ( ast.createInstance ( org.eclipse.jdt.core.dom.TagElement.class ) ) ) ; org.eclipse.jdt.core.dom.TextElement textElement = com.google.currysrc.api.process.ast.AstNodes.createTextElement ( ast , text ) ; element.fragments ( ) . add ( textElement ) ; return element ; }
Source:
public void testUnsupportedCallbackException02 ( ) { tests.api.javax.security.auth.myCallback c = new tests.api.javax.security.auth.myCallback ( ) ; assertNotNull ( "Callback object is null" , c ) ; javax.security.auth.callback.UnsupportedCallbackException ucE = new javax.security.auth.callback.UnsupportedCallbackException ( c ) ; assertNull ( "getMessage() must return null." , ucE.getMessage ( ) ) ; assertEquals ( "Incorrect callback object was returned" , c , ucE.getCallback ( ) ) ; }

Target:
public void testUnsupportedCallbackException02 ( ) { org.apache.harmony.tests.javax.security.auth.callback.myCallback c = new org.apache.harmony.tests.javax.security.auth.callback.myCallback ( ) ; assertNotNull ( "Callback object is null" , c ) ; javax.security.auth.callback.UnsupportedCallbackException ucE = new javax.security.auth.callback.UnsupportedCallbackException ( c ) ; assertNull ( "getMessage() must return null." , ucE.getMessage ( ) ) ; assertEquals ( "Incorrect callback object was returned" , c , ucE.getCallback ( ) ) ; }
Source:
public int getDrmObjectType ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _getDrmObjectType ( mUniqueId , path , mimeType ) ; }

Target:
public boolean canHandle ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _canHandle ( mUniqueId , path , mimeType ) ; }
Source:
public com.android.server.wifi.scanner.WifiScannerImpl create ( android.content.Context context , android.os.Looper looper , com.android.server.wifi.Clock clock ) { com.android.server.wifi.WifiNative wifiNative = com.android.server.wifi.WifiNative.getWlanNativeInterface ( ) ; if ( wifiNative.getScanCapabilities ( new com.android.server.wifi.WifiNative.ScanCapabilities ( ) ) ) { return new com.android.server.wifi.scanner.HalWifiScannerImpl ( context , wifiNative , looper , clock ) ; } else { return new com.android.server.wifi.scanner.SupplicantWifiScannerImpl ( context , wifiNative , looper , clock ) ; } }

Target:
public com.android.server.wifi.scanner.WifiScannerImpl create ( android.content.Context context , android.os.Looper looper , com.android.server.wifi.Clock clock ) { com.android.server.wifi.WifiNative wifiNative = com.android.server.wifi.WifiInjector.getInstance ( ) . getWifiNative ( ) ; com.android.server.wifi.WifiMonitor wifiMonitor = com.android.server.wifi.WifiInjector.getInstance ( ) . getWifiMonitor ( ) ; if ( wifiNative.getScanCapabilities ( new com.android.server.wifi.WifiNative.ScanCapabilities ( ) ) ) { return new com.android.server.wifi.scanner.HalWifiScannerImpl ( context , wifiNative , wifiMonitor , looper , clock ) ; } else { return new com.android.server.wifi.scanner.SupplicantWifiScannerImpl ( context , wifiNative , wifiMonitor , looper , clock ) ; } }
Source:
public void testMergeFrom ( ) throws java.lang.Exception { com.google.protobuf.nano.SimpleMessageNano message = new com.google.protobuf.nano.SimpleMessageNano ( ) ; message.d = 123 ; byte [ ] bytes = com.google.protobuf.nano.MessageNano.toByteArray ( message ) ; com.google.protobuf.nano.SimpleMessageNano newMessage = com.google.protobuf.nano.MessageNano.mergeFrom ( new com.google.protobuf.nano.SimpleMessageNano ( ) , bytes ) ; assertEquals ( message.d , newMessage.d ) ; }

Target:
public void testMergeFrom ( ) throws java.lang.Exception { com.google.protobuf.nano.UnittestSimpleNano.SimpleMessageNano message = new com.google.protobuf.nano.UnittestSimpleNano.SimpleMessageNano ( ) ; message.d = 123 ; byte [ ] bytes = com.google.protobuf.nano.MessageNano.toByteArray ( message ) ; com.google.protobuf.nano.UnittestSimpleNano.SimpleMessageNano newMessage = com.google.protobuf.nano.MessageNano.mergeFrom ( new com.google.protobuf.nano.UnittestSimpleNano.SimpleMessageNano ( ) , bytes ) ; assertEquals ( message.d , newMessage.d ) ; }
Source:
public int initServer ( int port , boolean log ) throws java.lang.Exception { return initServer ( port , tests.support.Support_TestWebServer.DEFAULT_TIMEOUT , log ) ; }

Target:
public int initServer ( ) throws java.lang.Exception { mTimeout = tests.support.Support_TestWebServer.DEFAULT_TIMEOUT ; mLog = false ; keepAlive = true ; if ( ( acceptT ) == null ) { acceptT = new tests.support.Support_TestWebServer.AcceptThread ( ) ; mPort = acceptT.init ( ) ; acceptT.start ( ) ; } return mPort ; }
Source:
public boolean onHandleForceStop ( android.content.Intent intent , java.lang.String [ ] packages , int uid , boolean doit ) { int userId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; if ( packages != null ) { for ( java.lang.String pkg : packages ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false , false , false , userId , "finished booting" ) ) { return true ; } } } } return false ; }

Target:
public void registerTaskStackListener ( android.app.ITaskStackListener listener ) throws android.os.RemoteException { synchronized ( this ) { if ( listener != null ) { mTaskStackListeners.register ( listener ) ; } } }
Source:
public java.util.List < java.lang.String > getAllProviders ( ) { try { synchronized ( mLock ) { return _getAllProvidersLocked ( ) ; } } catch ( java.lang.SecurityException se ) { throw se ; } catch ( java.lang.Exception e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "getAllProviders got exception:" , e ) ; return null ; } }

Target:
private boolean isAllowedBySettingsLocked ( java.lang.String provider , int userId ) { if ( userId != ( mCurrentUserId ) ) { return false ; } if ( mEnabledProviders.contains ( provider ) ) { return true ; } if ( mDisabledProviders.contains ( provider ) ) { return false ; } android.content.ContentResolver resolver = mContext.getContentResolver ( ) ; return Settings.Secure.isLocationProviderEnabledForUser ( resolver , provider , mCurrentUserId ) ; }
Source:
public void getDataCallList ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_DATA_CALL_LIST , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void getNeighboringCids ( android.os.Message response , android.os.WorkSource workSource ) { workSource = getDeafultWorkSourceIfInvalid ( workSource ) ; com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_GET_NEIGHBORING_CELL_IDS , response , workSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public void test_getName ( ) { final java.lang.ThreadGroup originalCurrent = getInitialThreadGroup ( ) ; final java.lang.String name = "Test group" ; final java.lang.ThreadGroup testRoot = new java.lang.ThreadGroup ( originalCurrent , name ) ; assertTrue ( "Setting a name&getting does not work" , testRoot.getName ( ) . equals ( name ) ) ; testRoot.destroy ( ) ; }

Target:
public void test_getName ( ) { final java.lang.ThreadGroup originalCurrent = initialThreadGroup ; final java.lang.String name = "Test group" ; final java.lang.ThreadGroup testRoot = new java.lang.ThreadGroup ( originalCurrent , name ) ; assertTrue ( "Setting a name&getting does not work" , testRoot.getName ( ) . equals ( name ) ) ; testRoot.destroy ( ) ; }
Source:
private static com.android.sdklib.util.Pair < org.eclipse.core.resources.IFile , org.eclipse.jface.text.IRegion > findValueDefinition ( org.eclipse.core.resources.IProject project , com.android.ide.eclipse.adt.internal.resources.ResourceType type , java.lang.String name ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration configuration = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getConfiguration ( ) ; com.android.sdklib.util.Pair < org.eclipse.core.resources.IFile , org.eclipse.jface.text.IRegion > target = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findValueByConfig ( project , type , name , configuration ) ; if ( target != null ) { return target ; } if ( configuration != null ) { return com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findValueByConfig ( project , type , name , configuration ) ; } return null ; }

Target:
private static com.android.sdklib.util.Pair < org.eclipse.core.resources.IFile , org.eclipse.jface.text.IRegion > findValueDefinition ( org.eclipse.core.resources.IProject project , com.android.resources.ResourceType type , java.lang.String name ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration configuration = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getConfiguration ( ) ; com.android.sdklib.util.Pair < org.eclipse.core.resources.IFile , org.eclipse.jface.text.IRegion > target = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findValueByConfig ( project , type , name , configuration ) ; if ( target != null ) { return target ; } if ( configuration != null ) { return com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findValueByConfig ( project , type , name , configuration ) ; } return null ; }
Source:
void startDockOrHome ( ) { android.content.Intent dock = createHomeDockIntent ( ) ; if ( dock != null ) { try { mContext.startActivity ( dock ) ; return ; } catch ( android.content.ActivityNotFoundException e ) { } } mContext.startActivity ( mHomeIntent ) ; }

Target:
private void performAuditoryFeedbackForAccessibilityIfNeed ( ) { if ( ! ( isGlobalAccessibilityGestureEnabled ( ) ) ) { return ; } android.media.AudioManager audioManager = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; if ( audioManager.isSilentMode ( ) ) { return ; } android.media.Ringtone ringTone = android.media.RingtoneManager.getRingtone ( mContext , Settings.System.DEFAULT_NOTIFICATION_URI ) ; ringTone.setStreamType ( AudioManager.STREAM_MUSIC ) ; ringTone.play ( ) ; }
Source:
public android.net.wifi.WifiConnectionStatistics getConnectionStatistics ( ) { enforceAccessPermission ( ) ; enforceReadCredentialPermission ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncGetConnectionStatistics ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return null ; } }

Target:
public android.net.wifi.WifiConnectionStatistics getConnectionStatistics ( ) { enforceAccessPermission ( ) ; enforceReadCredentialPermission ( ) ; mLog.trace ( "getConnectionStatistics uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncGetConnectionStatistics ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return null ; } }
Source:
public void copyFrom ( float [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } }

Target:
private void copy1DRangeFromUnchecked ( int off , int count , java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { final int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( arrayLen * ( dt.mSize ) ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , array , dataSize , dt ) ; }
Source:
public static android.net.NetworkCapabilities networkCapabilitiesForType ( int type ) { final android.net.NetworkCapabilities nc = new android.net.NetworkCapabilities ( ) ; final int NOT_FOUND = - 1 ; final int transport = android.net.ConnectivityManager.sLegacyTypeToTransport.get ( type , NOT_FOUND ) ; if ( transport == NOT_FOUND ) { throw new java.lang.IllegalArgumentException ( ( "unknown legacy type: " + type ) ) ; } nc.addTransportType ( transport ) ; nc.addCapability ( android.net.ConnectivityManager.sLegacyTypeToCapability.get ( type , NetworkCapabilities.NET_CAPABILITY_INTERNET ) ) ; nc.maybeMarkCapabilitiesRestricted ( ) ; return nc ; }

Target:
public static android.net.NetworkCapabilities networkCapabilitiesForType ( int type ) { final android.net.NetworkCapabilities nc = new android.net.NetworkCapabilities ( ) ; final int NOT_FOUND = - 1 ; final int transport = android.net.ConnectivityManager.sLegacyTypeToTransport.get ( type , NOT_FOUND ) ; com.android.internal.util.Preconditions.checkArgument ( ( transport != NOT_FOUND ) , ( "unknown legacy type: " + type ) ) ; nc.addTransportType ( transport ) ; nc.addCapability ( android.net.ConnectivityManager.sLegacyTypeToCapability.get ( type , NetworkCapabilities.NET_CAPABILITY_INTERNET ) ) ; nc.maybeMarkCapabilitiesRestricted ( ) ; return nc ; }
Source:
public static < T > boolean any ( java.util.Iterator < T > iterator , com.google.common.base.Predicate < ? super T > predicate ) { com.google.common.base.Preconditions.checkNotNull ( predicate ) ; while ( iterator.hasNext ( ) ) { T element = iterator.next ( ) ; if ( predicate.apply ( element ) ) { return true ; } } return false ; }

Target:
public static < T > boolean any ( java.util.Iterator < T > iterator , com.google.common.base.Predicate < ? super T > predicate ) { return ( com.google.common.collect.Iterators.indexOf ( iterator , predicate ) ) != ( - 1 ) ; }
Source:
protected void fill ( ) throws java.io.IOException { checkClosed ( ) ; if ( ( nativeEndBufSize ) > 0 ) { java.util.zip.ZipFile.RAFStream is = ( ( java.util.zip.ZipFile.RAFStream ) ( in ) ) ; len = is.fill ( inf , nativeEndBufSize ) ; } else { if ( ( len = in.read ( buf ) ) > 0 ) { inf.setInput ( buf , 0 , len ) ; } } }

Target:
protected void fill ( ) throws java.io.IOException { checkClosed ( ) ; if ( ( nativeEndBufSize ) > 0 ) { java.util.zip.ZipFile.RAFStream is = ( ( java.util.zip.ZipFile.RAFStream ) ( in ) ) ; len = is.fill ( inf , nativeEndBufSize ) ; } else { if ( ( len = in.read ( buf ) ) > 0 ) { inf.setInput ( buf , 0 , len ) ; } else if ( ( len ) == ( - 1 ) ) { throw new java.io.EOFException ( "Unexpected end of stream." ) ; } } }
Source:
private static void testSelfRecursion ( ) { try { Main.stackOverflowTestSub ( 0.0 , 0.0 , 0.0 ) ; } catch ( java.lang.StackOverflowError soe ) { java.lang.System.out.println ( "caught SOE in testSelfRecursion" ) ; } }

Target:
private static void testSelfRecursion ( ) { try { Main.stackOverflowTestSub3 ( 0.0 , 1.0 , 2.0 ) ; } catch ( java.lang.StackOverflowError soe ) { java.lang.System.out.println ( "caught SOE3 in testSelfRecursion" ) ; } try { Main.stackOverflowTestSub10 ( 0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 ) ; } catch ( java.lang.StackOverflowError soe ) { java.lang.System.out.println ( "caught SOE10 in testSelfRecursion" ) ; } }
Source:
public void test_setLocalPatternCharsLjava_lang_String ( ) { dfs.setLocalPatternChars ( "GyMZZkHmsSEHHFwWahKz" ) ; java.lang.String retVal = dfs.getLocalPatternChars ( ) ; java.lang.String val = "GyMZZkHmsSEHHFwWahKz" ; assertTrue ( "Returned incorrect pattern string" , retVal.equals ( val ) ) ; try { new java.text.DateFormatSymbols ( ) . setLocalPatternChars ( null ) ; fail ( "NullPointerException expected" ) ; } catch ( java.lang.NullPointerException e ) { } }

Target:
public void test_setLocalPatternCharsLjava_lang_String ( ) { java.lang.String patternChars = "GyMZZkHmsSEHHFwWahKz" ; dfs.setLocalPatternChars ( patternChars ) ; assertEquals ( patternChars , dfs.getLocalPatternChars ( ) ) ; try { new java.text.DateFormatSymbols ( ) . setLocalPatternChars ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }
Source:
public void testAesGcm96Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.getKey ( 288 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , true , 1 , true ) ; }

Target:
public void testAesCbcHmacSha512Udp4 ( ) 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_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public com.android.jack.test.toolchain.JackBasedToolchain addResource ( @ javax.annotation.Nonnull java.io.File resource ) { throw new java.lang.AssertionError ( "Not applicable" ) ; }

Target:
private java.lang.String convertClasspahtWithJillAsString ( ) throws java.io.IOException { java.io.File [ ] result = new java.io.File [ classpath.size ( ) ] ; for ( int i = 0 ; i < ( classpath.size ( ) ) ; i ++ ) { result [ i ] = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( classpath.get ( i ) . getName ( ) , ".jack" ) ; executeJill ( classpath.get ( i ) , result [ i ] ) ; } return com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( result ) ; }
Source:
public com.google.common.hash.HashCode hash ( ) { done = true ; return com.google.common.hash.HashCodes.fromBytesNoCopy ( digest.digest ( ) ) ; }

Target:
public com.google.common.hash.HashCode hash ( ) { checkNotDone ( ) ; done = true ; return ( bytes ) == ( digest.getDigestLength ( ) ) ? com.google.common.hash.HashCode.fromBytesNoCopy ( digest.digest ( ) ) : com.google.common.hash.HashCode.fromBytesNoCopy ( java.util.Arrays.copyOf ( digest.digest ( ) , bytes ) ) ; }
Source:
public void testAttachNoIdentity ( ) { if ( ! ( android.net.wifi.aware.cts.TestUtils.shouldTestWifiAware ( getContext ( ) ) ) ) { return ; } android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest attachCb = new android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest ( ) ; mWifiAwareManager.attach ( attachCb , null ) ; int cbCalled = attachCb.waitForAnyCallback ( ) ; assertEquals ( "Wi-Fi Aware attach" , android.net.wifi.aware.cts.SingleDeviceTest.AttachCallbackTest.ATTACHED , cbCalled ) ; android.net.wifi.aware.WifiAwareSession session = attachCb.getSession ( ) ; assertNotNull ( "Wi-Fi Aware session" , session ) ; session.destroy ( ) ; }

Target:
public void testAttachNoIdentity ( ) { if ( ! ( android.net.wifi.aware.cts.TestUtils.shouldTestWifiAware ( getContext ( ) ) ) ) { return ; } android.net.wifi.aware.WifiAwareSession session = attachAndGetSession ( ) ; session.destroy ( ) ; }
Source:
private static synchronized long internalStringCreate ( android.renderscript.RenderScript rs , java.lang.String resName , byte [ ] bitcode ) { if ( ( android.renderscript.ScriptC.mCachePath ) == null ) { java.io.File f = new java.io.File ( rs.mCacheDir , android.renderscript.ScriptC.CACHE_PATH ) ; android.renderscript.ScriptC.mCachePath = f.getAbsolutePath ( ) ; f.mkdirs ( ) ; } return rs.nScriptCCreate ( resName , android.renderscript.ScriptC.mCachePath , bitcode , bitcode.length ) ; }

Target:
private static synchronized long internalStringCreate ( android.renderscript.RenderScript rs , java.lang.String resName , byte [ ] bitcode ) { if ( ( android.renderscript.ScriptC.mCachePath ) == null ) { java.io.File f = new java.io.File ( RenderScriptCacheDir.mCacheDir , android.renderscript.ScriptC.CACHE_PATH ) ; android.renderscript.ScriptC.mCachePath = f.getAbsolutePath ( ) ; f.mkdirs ( ) ; } return rs.nScriptCCreate ( resName , android.renderscript.ScriptC.mCachePath , bitcode , bitcode.length ) ; }
Source:
public static java.lang.String getUpdatedLanguageForAndroid ( java.lang.String language ) { java.lang.String updatedLanguageCode = org.chromium.base.LocaleUtils.LANGUAGE_MAP_FOR_ANDROID.get ( language ) ; return updatedLanguageCode == null ? language : updatedLanguageCode ; }

Target:
public static java.lang.String getLocale ( java.util.Locale locale ) { java.lang.String language = locale.getLanguage ( ) ; java.lang.String country = locale.getCountry ( ) ; if ( "iw" . equals ( language ) ) { language = "he" ; } else if ( "in" . equals ( language ) ) { language = "id" ; } else if ( "tl" . equals ( language ) ) { language = "fil" ; } return country.isEmpty ( ) ? language : ( language + "-" ) + country ; }
Source:
public com.android.internal.telephony.GsmCdmaConnection getConnectionByIndex ( com.android.internal.telephony.GsmCdmaCall call , int index ) throws com.android.internal.telephony.CallStateException { int count = call.mConnections.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.internal.telephony.GsmCdmaConnection cn = ( ( com.android.internal.telephony.GsmCdmaConnection ) ( call.mConnections.get ( i ) ) ) ; if ( ( cn.getGsmCdmaIndex ( ) ) == index ) { return cn ; } } return null ; }

Target:
public com.android.internal.telephony.GsmCdmaConnection getConnectionByIndex ( com.android.internal.telephony.GsmCdmaCall call , int index ) throws com.android.internal.telephony.CallStateException { int count = call.mConnections.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.internal.telephony.GsmCdmaConnection cn = ( ( com.android.internal.telephony.GsmCdmaConnection ) ( call.mConnections.get ( i ) ) ) ; if ( ( ! ( cn.mDisconnected ) ) && ( ( cn.getGsmCdmaIndex ( ) ) == index ) ) { return cn ; } } return null ; }
Source:
public void setIsConferenced ( java.lang.String callId , java.lang.String conferenceCallId ) { android.telecom.RemoteConnection connection = findConnectionForAction ( callId , "setIsConferenced" ) ; if ( connection != ( android.telecom.RemoteConnectionService.NULL_CONNECTION ) ) { if ( conferenceCallId == null ) { if ( ( connection.getConference ( ) ) != null ) { connection.getConference ( ) . removeConnection ( connection ) ; } } else { android.telecom.RemoteConference conference = findConferenceForAction ( conferenceCallId , "setIsConferenced" ) ; if ( conference != ( android.telecom.RemoteConnectionService.NULL_CONFERENCE ) ) { conference.addConnection ( connection ) ; } } } }

Target:
public void setIsConferenced ( java.lang.String callId , java.lang.String conferenceCallId , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.RemoteConnection connection = findConnectionForAction ( callId , "setIsConferenced" ) ; if ( connection != ( android.telecom.RemoteConnectionService.NULL_CONNECTION ) ) { if ( conferenceCallId == null ) { if ( ( connection.getConference ( ) ) != null ) { connection.getConference ( ) . removeConnection ( connection ) ; } } else { android.telecom.RemoteConference conference = findConferenceForAction ( conferenceCallId , "setIsConferenced" ) ; if ( conference != ( android.telecom.RemoteConnectionService.NULL_CONFERENCE ) ) { conference.addConnection ( connection ) ; } } } }
Source:
void registerConnected ( ) { if ( ( mLastNetworkId ) != ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) { android.net.wifi.WifiConfiguration config = mWifiConfigManager.getWifiConfiguration ( mLastNetworkId ) ; if ( config != null ) { config.lastConnected = mClock.getWallClockMillis ( ) ; ( config.numAssociation ) ++ ; android.net.wifi.WifiConfiguration.NetworkSelectionStatus networkSelectionStatus = config.getNetworkSelectionStatus ( ) ; networkSelectionStatus.clearDisableReasonCounter ( ) ; networkSelectionStatus.setHasEverConnected ( true ) ; } mWifiScoreReport.reset ( ) ; } }

Target:
void registerConnected ( ) { if ( ( mLastNetworkId ) != ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) { mWifiConfigManager.updateNetworkAfterConnect ( mLastNetworkId ) ; mWifiScoreReport.reset ( ) ; } }
Source:
public com.android.traceview.Call top ( ) { java.util.ArrayList < com.android.traceview.Call > stack = mStack ; if ( ( stack.size ( ) ) == 0 ) return null ; return stack.get ( ( ( stack.size ( ) ) - 1 ) ) ; }

Target:
void endTrace ( java.util.ArrayList < com.android.traceview.TraceAction > trace ) { for ( int i = ( mStack.size ( ) ) - 1 ; i >= 1 ; i -- ) { com.android.traceview.Call call = mStack.get ( i ) ; call.mGlobalEndTime = mGlobalEndTime ; call.mThreadEndTime = mThreadEndTime ; if ( trace != null ) { trace.add ( new com.android.traceview.TraceAction ( TraceAction.ACTION_INCOMPLETE , call ) ) ; } } mStack.clear ( ) ; mStackMethods.clear ( ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , float [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 4 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , java.lang.Object array ) { copy2DRangeFromUnchecked ( xoff , yoff , w , h , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public void onDestroy ( ) { unbindNetworkQueryService ( ) ; super . onDestroy ( ) ; if ( ( getActivity ( ) ) != null ) { getActivity ( ) . unregisterReceiver ( mPhoneChangeReceiver ) ; } }

Target:
public void onDestroy ( ) { unbindNetworkQueryService ( ) ; super . onDestroy ( ) ; if ( ( getActivity ( ) ) != null ) { getActivity ( ) . unregisterReceiver ( mPhoneChangeReceiver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mDpcEnforcedContentObserver ) ; } }
Source:
public static boolean isAssistedDialingEnabled ( @ android.support.annotation.NonNull com.android.dialer.configprovider.ConfigProvider configProvider ) { if ( configProvider == null ) { com.android.dialer.common.LogUtil.i ( "ConcreteCreator.isAssistedDialingEnabled" , "provided configProvider was null" ) ; throw new java.lang.NullPointerException ( "Provided configProvider was null" ) ; } return ( ( ( Build.VERSION.SDK_INT ) >= ( com.android.dialer.assisteddialing.ConcreteCreator.BUILD_CODE_FLOOR ) ) && ( ( Build.VERSION.SDK_INT ) <= ( com.android.dialer.assisteddialing.ConcreteCreator.BUILD_CODE_CEILING ) ) ) && ( configProvider.getBoolean ( "assisted_dialing_enabled" , false ) ) ; }

Target:
public static boolean isAssistedDialingEnabled ( @ android.support.annotation.NonNull com.android.dialer.configprovider.ConfigProvider configProvider ) { if ( configProvider == null ) { com.android.dialer.common.LogUtil.i ( "ConcreteCreator.isAssistedDialingEnabled" , "provided configProvider was null" ) ; throw new java.lang.NullPointerException ( "Provided configProvider was null" ) ; } return ( ( ( ( Build.VERSION.SDK_INT ) >= ( com.android.dialer.assisteddialing.ConcreteCreator.BUILD_CODE_FLOOR ) ) && ( ( Build.VERSION.SDK_INT ) <= ( com.android.dialer.assisteddialing.ConcreteCreator.BUILD_CODE_CEILING ) ) ) && ( ! ( android.support.v4.os.BuildCompat.isAtLeastP ( ) ) ) ) && ( configProvider.getBoolean ( "assisted_dialing_enabled" , false ) ) ; }
Source:
private void onSetPolicyDataEnabled ( boolean enabled ) { synchronized ( mDataEnabledSettings ) { final boolean prevEnabled = getAnyDataEnabled ( ) ; if ( ( mDataEnabledSettings.isPolicyDataEnabled ( ) ) != enabled ) { mDataEnabledSettings.setPolicyDataEnabled ( enabled ) ; if ( prevEnabled != ( getAnyDataEnabled ( ) ) ) { if ( ! prevEnabled ) { teardownRestrictedMeteredConnections ( ) ; onTrySetupData ( Phone.REASON_DATA_ENABLED ) ; } else { onCleanUpAllConnections ( Phone.REASON_DATA_SPECIFIC_DISABLED ) ; } } } } }

Target:
private void onSimNotReady ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onSimNotReady" ) ; cleanUpAllConnections ( true , Phone.REASON_SIM_NOT_READY ) ; mAllApnSettings = null ; mAutoAttachOnCreationConfig = false ; mAutoAttachOnCreation.set ( false ) ; }
Source:
public void setMiracastMode ( int mode ) { if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { mSupplicantP2pIfaceHal.setMiracastMode ( mode ) ; } else { doBooleanCommand ( ( "DRIVER MIRACAST " + mode ) ) ; } }

Target:
public boolean p2pServiceAdd ( android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.serviceAdd ( servInfo ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { for ( java.lang.String s : servInfo.getSupplicantQueryList ( ) ) { java.lang.String command = "P2P_SERVICE_ADD" ; command += " " + s ; if ( ! ( doBooleanCommand ( command ) ) ) { return false ; } } } return true ; } }
Source:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object o ) { return com.google.common.collect.Iterators.contains ( iterator ( ) , o ) ; }

Target:
public static < K , V > com.google.common.collect.SetMultimap < K , V > filterValues ( com.google.common.collect.SetMultimap < K , V > unfiltered , final com.google.common.base.Predicate < ? super V > valuePredicate ) { return com.google.common.collect.Multimaps.filterEntries ( unfiltered , com.google.common.collect.Maps.< V > valuePredicateOnEntries ( valuePredicate ) ) ; }
Source:
public static void fixAlarmInstances ( android.content.Context context ) { android.content.ContentResolver contentResolver = context.getContentResolver ( ) ; for ( com.android.deskclock.provider.AlarmInstance instance : com.android.deskclock.provider.AlarmInstance.getInstances ( contentResolver , null ) ) { com.android.deskclock.alarms.AlarmStateManager.registerInstance ( context , instance , false ) ; } com.android.deskclock.alarms.AlarmStateManager.updateNextAlarm ( context ) ; }

Target:
public static void fixAlarmInstances ( android.content.Context context ) { android.content.ContentResolver contentResolver = context.getContentResolver ( ) ; for ( com.android.deskclock.provider.AlarmInstance instance : com.android.deskclock.provider.AlarmInstance.getInstances ( contentResolver , null ) ) { final com.android.deskclock.provider.Alarm alarm = com.android.deskclock.provider.Alarm.getAlarm ( contentResolver , instance.mAlarmId ) ; instance.setAlarmTime ( alarm.getNextAlarmTime ( java.util.Calendar.getInstance ( ) ) ) ; com.android.deskclock.provider.AlarmInstance.updateInstance ( contentResolver , instance ) ; com.android.deskclock.alarms.AlarmStateManager.registerInstance ( context , instance , false ) ; } com.android.deskclock.alarms.AlarmStateManager.updateNextAlarm ( context ) ; }
Source:
public static android.security.CryptoOperationException getCryptoOperationException ( android.security.KeyStoreException e ) { switch ( e.getErrorCode ( ) ) { case android.security.keymaster.KeymasterDefs.KM_ERROR_KEY_EXPIRED : return new android.security.KeyExpiredException ( ) ; case android.security.keymaster.KeymasterDefs.KM_ERROR_KEY_NOT_YET_VALID : return new android.security.KeyNotYetValidException ( ) ; case android.security.keymaster.KeymasterDefs.KM_ERROR_KEY_USER_NOT_AUTHENTICATED : return new android.security.UserNotAuthenticatedException ( ) ; default : return new android.security.CryptoOperationException ( "Crypto operation failed" , e ) ; } }

Target:
static java.security.InvalidKeyException getInvalidKeyException ( android.security.KeyStoreException e ) { switch ( e.getErrorCode ( ) ) { case android.security.keymaster.KeymasterDefs.KM_ERROR_KEY_EXPIRED : return new android.security.KeyExpiredException ( ) ; case android.security.keymaster.KeymasterDefs.KM_ERROR_KEY_NOT_YET_VALID : return new android.security.KeyNotYetValidException ( ) ; case android.security.keymaster.KeymasterDefs.KM_ERROR_KEY_USER_NOT_AUTHENTICATED : return new android.security.UserNotAuthenticatedException ( ) ; default : return new java.security.InvalidKeyException ( "Keystore operation failed" , e ) ; } }
Source:
static void acquireScreenBrightWakeLock ( android.content.Context context ) { if ( ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock ) == null ) { android.os.PowerManager pm = ( ( android.os.PowerManager ) ( context.getSystemService ( Context.POWER_SERVICE ) ) ) ; com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock = pm.newWakeLock ( ( ( android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK ) | ( android.os.PowerManager.ON_AFTER_RELEASE ) ) , com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG ) ; } if ( ! ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock.isHeld ( ) ) ) { com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock.acquire ( ( ( 1000 * 60 ) * 5 ) ) ; android.util.Log.d ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG , "acquired screen bright wakelock" ) ; } }

Target:
static void acquireScreenBrightWakeLock ( android.content.Context context , long timeout ) { if ( ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock ) == null ) { android.os.PowerManager pm = ( ( android.os.PowerManager ) ( context.getSystemService ( Context.POWER_SERVICE ) ) ) ; com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock = pm.newWakeLock ( ( ( android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK ) | ( android.os.PowerManager.ON_AFTER_RELEASE ) ) , com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG ) ; } if ( ! ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock.isHeld ( ) ) ) { com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock.acquire ( timeout ) ; android.util.Log.d ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG , "acquired screen bright wakelock" ) ; } }
Source:
public android.os.ParcelUuid [ ] getUuids ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return null ; try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.getUuids ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return null ; }

Target:
public boolean configHciSnoopLog ( boolean enable ) { try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.configHciSnoopLog ( enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return false ; }
Source:
public java.util.Iterator < com.android.jack.api01.ChainedException > iterator ( ) { java.util.ArrayList < com.android.jack.api01.ChainedException > list = new java.util.ArrayList < com.android.jack.api01.ChainedException > ( count ) ; com.android.jack.api01.ChainedException exception = this ; do { list.add ( exception ) ; exception = exception.next ; } while ( exception != null ) ; return list.iterator ( ) ; }

Target:
public java.util.Iterator < com.android.jack.api.v01.ChainedException > iterator ( ) { java.util.ArrayList < com.android.jack.api.v01.ChainedException > list = new java.util.ArrayList < com.android.jack.api.v01.ChainedException > ( count ) ; com.android.jack.api.v01.ChainedException exception = this ; do { list.add ( exception ) ; exception = exception.next ; } while ( exception != null ) ; return list.iterator ( ) ; }
Source:
public int getPhonebookAccessPermission ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; } try { return android.bluetooth.BluetoothDevice.sService.getPhonebookAccessPermission ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; }

Target:
public boolean cancelPairingUserInput ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot create pairing user input" ) ; return false ; } try { return service.cancelBondProcess ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public final char readChar ( ) throws java.io.IOException { int ch1 = in.read ( ) ; int ch2 = in.read ( ) ; if ( ( ch1 | ch2 ) < 0 ) throw new java.io.EOFException ( ) ; return ( ( char ) ( ( ch1 << 8 ) + ( ch2 << 0 ) ) ) ; }

Target:
public final char readChar ( ) throws java.io.IOException { readFully ( readBuffer , 0 , 2 ) ; return ( ( char ) ( libcore.io.Memory.peekShort ( readBuffer , 0 , java.nio.ByteOrder.BIG_ENDIAN ) ) ) ; }
Source:
public static void createTasks ( org.gradle.model.ModelMap < org.gradle.api.Task > tasks , org.gradle.nativeplatform.SharedLibraryBinarySpec binary , java.io.File buildDir , com.android.build.gradle.managed.NdkConfig ndkConfig , com.android.build.gradle.internal.NdkHandler ndkHandler ) { com.android.build.gradle.ndk.internal.StlConfiguration.createStlCopyTask ( ndkHandler , ndkConfig.getStl ( ) , tasks , buildDir , binary ) ; if ( java.lang.Boolean.TRUE.equals ( ndkConfig.getIsDebuggable ( ) ) ) { com.android.build.gradle.ndk.internal.NdkConfiguration.setupNdkGdbDebug ( tasks , binary , buildDir , ndkConfig , ndkHandler ) ; } com.android.build.gradle.ndk.internal.NdkConfiguration.createStripDebugTask ( tasks , binary , buildDir , ndkHandler ) ; }

Target:
public static void createTasks ( org.gradle.model.ModelMap < org.gradle.api.Task > tasks , org.gradle.nativeplatform.SharedLibraryBinarySpec binary , java.io.File buildDir , com.android.build.gradle.managed.NdkConfig ndkConfig , com.android.build.gradle.internal.NdkHandler ndkHandler ) { com.android.build.gradle.ndk.internal.StlConfiguration.createStlCopyTask ( ndkHandler , ndkConfig.getStl ( ) , tasks , buildDir , binary ) ; if ( java.lang.Boolean.TRUE.equals ( ndkConfig.getDebuggable ( ) ) ) { com.android.build.gradle.ndk.internal.NdkConfiguration.setupNdkGdbDebug ( tasks , binary , buildDir , ndkConfig , ndkHandler ) ; } com.android.build.gradle.ndk.internal.NdkConfiguration.createStripDebugTask ( tasks , binary , buildDir , ndkHandler ) ; }
Source:
public final void release ( ) { releaseResources ( ) ; if ( ( mBinder ) != null ) { mBinder.unlinkToDeath ( this , 0 ) ; } mBinder = null ; nullifyRecord ( ) ; }

Target:
public final void release ( ) throws android.os.RemoteException { synchronized ( this ) { if ( isReferenced ( ) ) { throw new java.lang.IllegalStateException ( "Cannot release a resource that has active references!" ) ; } if ( ( mResourceId ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { return ; } releaseResources ( ) ; if ( ( mBinder ) != null ) { mBinder.unlinkToDeath ( this , 0 ) ; } mBinder = null ; mResourceId = android.net.IpSecManager.INVALID_RESOURCE_ID ; } }
Source:
public boolean removeAll ( final java.util.Collection < ? > c ) { com.google.common.base.Predicate < java.util.Map.Entry < K , java.util.Collection < V > > > removalPredicate = new com.google.common.base.Predicate < java.util.Map.Entry < K , java.util.Collection < V > > > ( ) { @ java.lang.Override public boolean apply ( java.util.Map.Entry < K , java.util.Collection < V > > entry ) { return c.contains ( entry.getValue ( ) ) ; } } ; return removeEntriesIf ( removalPredicate ) ; }

Target:
public static < K , V > com.google.common.collect.SetMultimap < K , V > filterEntries ( com.google.common.collect.SetMultimap < K , V > unfiltered , com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > entryPredicate ) { com.google.common.base.Preconditions.checkNotNull ( entryPredicate ) ; return unfiltered instanceof com.google.common.collect.FilteredSetMultimap ? com.google.common.collect.Multimaps.filterFiltered ( ( ( com.google.common.collect.FilteredSetMultimap < K , V > ) ( unfiltered ) ) , entryPredicate ) : new com.google.common.collect.FilteredEntrySetMultimap < K , V > ( com.google.common.base.Preconditions.checkNotNull ( unfiltered ) , entryPredicate ) ; }
Source:
private void setNotification ( android.bluetooth.BluetoothGattCharacteristic characteristic , boolean enable ) { if ( characteristic != null ) { mBluetoothGatt.setCharacteristicNotification ( characteristic , enable ) ; android.bluetooth.BluetoothGattDescriptor descriptor = characteristic.getDescriptor ( com.android.cts.verifier.bluetooth.BleClientService.UPDATE_DESCRIPTOR_UUID ) ; if ( enable ) { if ( characteristic.getUuid ( ) . equals ( com.android.cts.verifier.bluetooth.BleClientService.INDICATE_CHARACTERISTIC_UUID ) ) { descriptor.setValue ( BluetoothGattDescriptor.ENABLE_INDICATION_VALUE ) ; } else { descriptor.setValue ( BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE ) ; } } else { descriptor.setValue ( BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE ) ; } mBluetoothGatt.writeDescriptor ( descriptor ) ; } }

Target:
private void setNotification ( boolean enable ) { android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleClientService.UPDATE_CHARACTERISTIC_UUID ) ; if ( characteristic != null ) mBluetoothGatt.setCharacteristicNotification ( characteristic , enable ) ; }
Source:
private void save ( java.io.File file ) throws java.io.IOException { org.w3c.dom.Document document = com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.createEmptyDocument ( ) ; if ( document != null ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationDescription description : mList ) { description.toXml ( document ) ; } java.lang.String xml = com.android.ide.eclipse.adt.internal.editors.formatting.XmlPrettyPrinter.prettyPrint ( document ) ; com.google.common.io.Files.write ( xml , file , com.google.common.base.Charsets.UTF_8 ) ; } }

Target:
private void save ( java.io.File file ) throws java.io.IOException { org.w3c.dom.Document document = com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.createEmptyDocument ( ) ; if ( document != null ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationDescription description : mList ) { description.toXml ( document ) ; } java.lang.String xml = com.android.ide.eclipse.adt.internal.editors.formatting.EclipseXmlPrettyPrinter.prettyPrint ( document ) ; com.google.common.io.Files.write ( xml , file , com.google.common.base.Charsets.UTF_8 ) ; } }
Source:
private static void setEnabled ( com.intellij.designer.propertyTable.RadPropertyTable table , com.intellij.openapi.actionSystem.Presentation presentation ) { try { com.intellij.designer.model.Property property = table.getSelectionProperty ( ) ; presentation.setEnabled ( ( ( property != null ) && ( ! ( table.isDefault ( property ) ) ) ) ) ; } catch ( java.lang.Exception e ) { presentation.setEnabled ( false ) ; } }

Target:
private static void setEnabled ( com.intellij.designer.propertyTable.RadPropertyTable table , com.intellij.openapi.actionSystem.Presentation presentation ) { try { com.intellij.designer.model.Property property = table.getSelectionProperty ( ) ; presentation.setEnabled ( ( ( ( property != null ) && ( ! ( table.isEditing ( ) ) ) ) && ( ! ( table.isDefault ( property ) ) ) ) ) ; } catch ( java.lang.Exception e ) { presentation.setEnabled ( false ) ; } }
Source:
public void testClear ( ) throws java.lang.Exception { final com.android.ide.common.caching.CreatingCache < java.lang.String , java.lang.String > cache = new com.android.ide.common.caching.CreatingCache < java.lang.String , java.lang.String > ( new com.android.ide.common.caching.CreatingCacheTest.DelayedFactory ( ) ) ; new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { cache.get ( "foo" ) ; } } . start ( ) ; java.lang.Thread.sleep ( 1000 ) ; cache.clear ( ) ; }

Target:
public void testClear ( ) throws java.lang.Exception { java.util.concurrent.CountDownLatch factoryLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; final com.android.ide.common.caching.CreatingCache < java.lang.String , java.lang.String > cache = new com.android.ide.common.caching.CreatingCache < java.lang.String , java.lang.String > ( new com.android.ide.common.caching.CreatingCacheTest.DelayedFactory ( factoryLatch ) ) ; java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; new java.lang.Thread ( new com.android.ide.common.caching.CreatingCacheTest.CacheRunnable ( cache , latch ) ) . start ( ) ; latch.await ( ) ; cache.clear ( ) ; }
Source:
public boolean isWifiCall ( ) { synchronized ( mLockObj ) { if ( ( mCallProfile ) == null ) { return false ; } java.lang.String callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE ) ; if ( ( callType == null ) || ( callType.isEmpty ( ) ) ) { callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE_ALT ) ; } int radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; try { radioTechnology = java.lang.Integer.parseInt ( callType ) ; } catch ( java.lang.NumberFormatException nfe ) { radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; } return radioTechnology == ( android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN ) ; } }

Target:
public boolean isWifiCall ( ) { synchronized ( mLockObj ) { if ( ( mCallProfile ) == null ) { return false ; } int radioTechnology = getRadioTechnology ( ) ; return radioTechnology == ( android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN ) ; } }