auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.util.List < android.net.wifi.WifiConfiguration > getConfiguredNetworks ( ) { enforceAccessPermission ( ) ; mLog.trace ( "getConfiguredNetworks uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncGetConfiguredNetworks ( android.os.Binder.getCallingUid ( ) , mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return null ; } }

Target:
public android.content.pm.ParceledListSlice < android.net.wifi.WifiConfiguration > getPrivilegedConfiguredNetworks ( ) { enforceReadCredentialPermission ( ) ; enforceAccessPermission ( ) ; mLog.trace ( "getPrivilegedConfiguredNetworks uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { java.util.List < android.net.wifi.WifiConfiguration > configs = mWifiStateMachine.syncGetPrivilegedConfiguredNetwork ( mWifiStateMachineChannel ) ; if ( configs != null ) { return new android.content.pm.ParceledListSlice < android.net.wifi.WifiConfiguration > ( configs ) ; } } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; } return null ; }
Source:
public void testBadIpPacket ( ) throws java.lang.Exception { final byte [ ] packet = com.android.internal.util.HexDump.hexStringToByteArray ( "450001518d0600004011144dc0a82b01c0a82bf7" ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket offerPacket = android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , packet.length , android.net.dhcp.ENCAP_L3 ) ; } catch ( android.net.dhcp.DhcpPacket.DhcpPacket expected ) { assertDhcpErrorCodes ( DhcpErrorEvent.L3_TOO_SHORT , expected.errorCode ) ; return ; } fail ( "Dhcp packet parsing should have failed" ) ; }

Target:
public void testBadIpPacket ( ) throws java.lang.Exception { final byte [ ] packet = com.android.internal.util.HexDump.hexStringToByteArray ( "450001518d0600004011144dc0a82b01c0a82bf7" ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket offerPacket = android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , packet.length , android.net.dhcp.ENCAP_L3 ) ; } catch ( android.net.dhcp.DhcpPacket.DhcpPacket expected ) { assertDhcpErrorCodes ( DhcpErrorEvent.L3_TOO_SHORT , expected.errorCode ) ; return ; } org.junit.Assert.fail ( "Dhcp packet parsing should have failed" ) ; }
Source:
public int queryCodenameApiLevel ( @ com.android.annotations.NonNull java.lang.String codename ) { if ( codename.equals ( target.getVersion ( ) . getCodename ( ) ) ) { return target.getVersion ( ) . getApiLevel ( ) ; } return com.android.manifmerger.ICallback.UNKNOWN_CODENAME ; }

Target:
public java.io.File getMultiDexSupportJar ( ) { if ( ( mTargetInfo ) != null ) { return new java.io.File ( mTargetInfo.getBuildTools ( ) . getLocation ( ) . getAbsolutePath ( ) , ( ( "multidex" + ( java.io.File.separator ) ) + "android-support-multidex.jar" ) ) ; } return null ; }
Source:
public com.android.build.gradle.tasks.ManifestProcessorTask getProcessManifest ( ) { if ( ( outputs.size ( ) ) > 1 ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "More than one output on variant '%s', cannot call getProcessManifest() on it. Call it on one of its outputs instead." , getName ( ) ) ) ; } plugin.displayDeprecationWarning ( "variant.getProcessManifest() is deprecated. Call it on one of variant.getOutputs() instead." ) ; return outputs.get ( 0 ) . getProcessManifest ( ) ; }

Target:
public void buildConfigField ( @ com.android.annotations.NonNull java.lang.String type , @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String value ) { getVariantData ( ) . getVariantConfiguration ( ) . addBuildConfigField ( type , name , value ) ; }
Source:
public final void parkUntil$ ( long time ) { synchronized ( lock ) { long delayMillis = time - ( java.lang.System.currentTimeMillis ( ) ) ; if ( delayMillis <= 0 ) { parkState = java.lang.Thread.ParkState.UNPARKED ; } else { parkFor$ ( ( delayMillis * ( java.lang.Thread.NANOS_PER_MILLI ) ) ) ; } } }

Target:
public final void parkUntil$ ( long time ) { synchronized ( lock ) { final long currentTime = java.lang.System.currentTimeMillis ( ) ; if ( time <= currentTime ) { parkState = java.lang.Thread.ParkState.UNPARKED ; } else { long delayMillis = time - currentTime ; long maxValue = ( java.lang.Long.MAX_VALUE ) / ( java.lang.Thread.NANOS_PER_MILLI ) ; if ( delayMillis > maxValue ) { delayMillis = maxValue ; } parkFor$ ( ( delayMillis * ( java.lang.Thread.NANOS_PER_MILLI ) ) ) ; } } }
Source:
public void enter ( ) { super . enter ( ) ; mConnectingTimestampMs = java.lang.Long.MIN_VALUE ; mPhonebook.resetAtState ( ) ; mSystemInterface.getHeadsetPhoneState ( ) . listenForPhoneState ( false ) ; mVoiceRecognitionStarted = false ; mWaitingForVoiceRecognition = false ; mAudioParams.clear ( ) ; broadcastStateTransitions ( ) ; }

Target:
public void enter ( ) { super . enter ( ) ; mConnectingTimestampMs = java.lang.Long.MIN_VALUE ; mPhonebook.resetAtState ( ) ; mSystemInterface.getHeadsetPhoneState ( ) . listenForPhoneState ( false ) ; mVoiceRecognitionStarted = false ; mWaitingForVoiceRecognition = false ; mAudioParams.clear ( ) ; broadcastStateTransitions ( ) ; if ( ( ( mPrevState ) != null ) && ( ( mAdapterService.getBondState ( mDevice ) ) == ( android.bluetooth.BluetoothDevice.BOND_NONE ) ) ) { getHandler ( ) . post ( ( ) -> com.android.bluetooth.hfp.mHeadsetService.removeStateMachine ( com.android.bluetooth.hfp.mDevice ) ) ; } }
Source:
private void testInterruptReadableChannel ( final java.nio.channels.ReadableByteChannel channel ) throws java.lang.Exception { interruptMeLater ( ) ; try { channel.read ( java.nio.ByteBuffer.allocate ( libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ) ) ; fail ( ) ; } catch ( java.nio.channels.ClosedByInterruptException expected ) { } }

Target:
private void testInterruptReadableChannel ( final java.nio.channels.ReadableByteChannel channel ) throws java.lang.Exception { java.lang.Thread thread = interruptMeLater ( ) ; try { channel.read ( java.nio.ByteBuffer.allocate ( libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ) ) ; fail ( ) ; } catch ( java.nio.channels.ClosedByInterruptException expected ) { } finally { libcore.java.io.InterruptedStreamTest.confirmInterrupted ( thread ) ; } }
Source:
public void entering ( java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.Object param1 ) { if ( ( java.util.logging.Level.FINER.intValue ( ) ) < ( levelValue ) ) { return ; } java.lang.Object [ ] params = new java.lang.Object [ ] { param1 } ; logp ( java.util.logging.Level.FINER , sourceClass , sourceMethod , "ENTRY {0}" , params ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; doLog ( lr , bundleName ) ; }
Source:
private byte [ ] convertUcByteToLcByteArray ( java.util.ArrayList < java.lang.Byte > from ) { if ( from == null ) { return null ; } byte [ ] to = new byte [ from.size ( ) ] ; for ( int i = 0 ; i < ( from.size ( ) ) ; ++ i ) { to [ i ] = from.get ( i ) ; } return to ; }

Target:
private byte [ ] convertArrayListToNativeByteArray ( java.util.ArrayList < java.lang.Byte > from ) { if ( from == null ) { return null ; } byte [ ] to = new byte [ from.size ( ) ] ; for ( int i = 0 ; i < ( from.size ( ) ) ; ++ i ) { to [ i ] = from.get ( i ) ; } return to ; }
Source:
void addRemoteMessage ( java.lang.String message ) { if ( android.text.TextUtils.isEmpty ( message ) ) { return ; } updateCurrentRemoteMessage ( message ) ; if ( ( messageListener ) != null ) { messageListener.onUpdateRemoteMessage ( com.android.incallui.rtt.impl.RttChatMessage.getLastIndexRemoteMessage ( rttMessages ) ) ; } }

Target:
void addRemoteMessage ( java.lang.String message ) { if ( android.text.TextUtils.isEmpty ( message ) ) { return ; } updateCurrentRemoteMessage ( message ) ; if ( ( messageListener ) != null ) { messageListener.onUpdateRemoteMessage ( toItemPosition ( com.android.incallui.rtt.impl.RttChatMessage.getLastIndexRemoteMessage ( rttMessages ) ) ) ; } }
Source:
public com.google.gct.testing.results.AssertEqualsDiffViewerProvider getDiffViewerProvider ( ) { if ( ( myState ) instanceof com.google.gct.testing.results.AssertEqualsDiffViewerProvider ) { return ( ( com.google.gct.testing.results.AssertEqualsDiffViewerProvider ) ( myState ) ) ; } return null ; }

Target:
public com.intellij.execution.testframework.stacktrace.DiffHyperlink getDiffViewerProvider ( ) { if ( ( myState ) instanceof com.google.gct.testing.results.TestComparisionFailedState ) { return ( ( com.google.gct.testing.results.TestComparisionFailedState ) ( myState ) ) . getHyperlink ( ) ; } if ( ( myChildren ) != null ) { for ( com.google.gct.testing.results.GoogleCloudTestProxy child : myChildren ) { if ( ! ( child.isDefect ( ) ) ) continue ; final com.intellij.execution.testframework.stacktrace.DiffHyperlink provider = child.getDiffViewerProvider ( ) ; if ( provider != null ) { return provider ; } } } return null ; }
Source:
public void testQuerySystemForCarMode_True ( ) { org.mockito.Mockito.when ( mContext.getSystemService ( Context.UI_MODE_SERVICE ) ) . thenReturn ( mUiModeManager ) ; org.mockito.Mockito.when ( mUiModeManager.getCurrentModeType ( ) ) . thenReturn ( Configuration.UI_MODE_TYPE_CAR ) ; assertTrue ( new com.android.server.telecom.SystemStateProvider ( mContext ) . isCarMode ( ) ) ; }

Target:
public void testQuerySystemForCarMode_True ( ) { org.mockito.Mockito.when ( mContext.getSystemService ( Context.UI_MODE_SERVICE ) ) . thenReturn ( mUiModeManager ) ; org.mockito.Mockito.when ( mUiModeManager.getCurrentModeType ( ) ) . thenReturn ( Configuration.UI_MODE_TYPE_CAR ) ; org.junit.Assert.assertTrue ( new com.android.server.telecom.SystemStateProvider ( mContext ) . isCarMode ( ) ) ; }
Source:
public void cacheMiss ( ) throws java.lang.Exception { mCacheQueue.add ( mRequest ) ; mCacheQueue.waitUntilEmpty ( com.android.volley.CacheDispatcherTest.TIMEOUT_MILLIS ) ; assertFalse ( mDelivery.wasEitherResponseCalled ( ) ) ; assertTrue ( ( ( mNetworkQueue.size ( ) ) > 0 ) ) ; com.android.volley.Request request = mNetworkQueue.take ( ) ; assertNull ( request.getCacheEntry ( ) ) ; }

Target:
public void cacheMiss ( ) throws java.lang.Exception { mDispatcher.processRequest ( mRequest ) ; com.android.volley.CacheDispatcherTest.verifyNoResponse ( mDelivery ) ; org.mockito.Mockito.verify ( mNetworkQueue ) . put ( mRequest ) ; org.junit.Assert.assertNull ( mRequest.getCacheEntry ( ) ) ; }
Source:
public java.lang.String getProperty ( java.lang.String name ) { java.util.concurrent.Future < java.lang.String > future = mPropFetcher.getProperty ( name ) ; try { return future.get ( 1 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } catch ( java.util.concurrent.ExecutionException e ) { } catch ( java.util.concurrent.TimeoutException e ) { } return null ; }

Target:
public java.lang.String getProperty ( java.lang.String name ) { java.util.concurrent.Future < java.lang.String > future = mPropFetcher.getProperty ( name ) ; try { return future.get ( 1 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { } catch ( java.util.concurrent.ExecutionException e ) { } catch ( java.util.concurrent.TimeoutException e ) { } return null ; }
Source:
private void requestUpdate ( ) { java.lang.Thread compositionThread = mCompositionThread ; if ( ( compositionThread == null ) || ( ! ( compositionThread.isAlive ( ) ) ) ) { return ; } android.os.Message msg = mHandler.obtainMessage ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.GlCompositor.CompositionHandler.DO_RENDERING ) ; mHandler.sendMessage ( msg ) ; }

Target:
private void requestUpdate ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.GlCompositor.GlWindow w ) { java.lang.Thread compositionThread = mCompositionThread ; if ( ( compositionThread == null ) || ( ! ( compositionThread.isAlive ( ) ) ) ) { return ; } android.os.Message msg = mHandler.obtainMessage ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.GlCompositor.CompositionHandler.DO_RENDERING , w ) ; mHandler.sendMessage ( msg ) ; }
Source:
public void testNullExtensions ( ) throws java.lang.Exception { com.google.protobuf.nano.Extensions.ExtendableMessage message = new com.google.protobuf.nano.Extensions.ExtendableMessage ( ) ; message.setExtension ( SingularExtensions.someMessage , null ) ; assertEquals ( 0 , com.google.protobuf.nano.MessageNano.toByteArray ( message ) . length ) ; com.google.protobuf.nano.Extensions.AnotherMessage another = new com.google.protobuf.nano.Extensions.AnotherMessage ( ) ; message.setExtension ( SingularExtensions.someMessage , another ) ; assertTrue ( ( ( com.google.protobuf.nano.MessageNano.toByteArray ( message ) . length ) > 0 ) ) ; message.setExtension ( SingularExtensions.someMessage , null ) ; assertEquals ( 0 , com.google.protobuf.nano.MessageNano.toByteArray ( message ) . length ) ; }

Target:
public void testNullExtensions ( ) throws java.lang.Exception { com.google.protobuf.nano.testext.Extensions.ExtendableMessage message = new com.google.protobuf.nano.testext.Extensions.ExtendableMessage ( ) ; message.setExtension ( SingularExtensions.someMessage , null ) ; assertEquals ( 0 , com.google.protobuf.nano.MessageNano.toByteArray ( message ) . length ) ; com.google.protobuf.nano.testext.Extensions.AnotherMessage another = new com.google.protobuf.nano.testext.Extensions.AnotherMessage ( ) ; message.setExtension ( SingularExtensions.someMessage , another ) ; assertTrue ( ( ( com.google.protobuf.nano.MessageNano.toByteArray ( message ) . length ) > 0 ) ) ; message.setExtension ( SingularExtensions.someMessage , null ) ; assertEquals ( 0 , com.google.protobuf.nano.MessageNano.toByteArray ( message ) . length ) ; }
Source:
public static java.lang.String parseSvgToXml ( java.io.File inputSVG , java.io.OutputStream outStream ) { java.lang.String errorLog = null ; try { com.android.assetstudiolib.vectordrawable.SvgTree svgTree = com.android.assetstudiolib.vectordrawable.Svg2Vector.parse ( inputSVG ) ; errorLog = svgTree.getErrorLog ( ) ; com.android.assetstudiolib.vectordrawable.Svg2Vector.writeFile ( outStream , svgTree ) ; } catch ( java.lang.Exception e ) { errorLog = ( ( "EXCEPTION in parsing " + ( inputSVG.getName ( ) ) ) + ":\n" ) + ( e.getMessage ( ) ) ; } return errorLog ; }

Target:
public static java.lang.String parseSvgToXml ( java.io.File inputSVG , java.io.OutputStream outStream ) { java.lang.String errorLog = null ; try { com.android.assetstudiolib.vectordrawable.SvgTree svgTree = com.android.assetstudiolib.vectordrawable.Svg2Vector.parse ( inputSVG ) ; errorLog = svgTree.getErrorLog ( ) ; if ( svgTree.canConvertToVectorDrawable ( ) ) { com.android.assetstudiolib.vectordrawable.Svg2Vector.writeFile ( outStream , svgTree ) ; } } catch ( java.lang.Exception e ) { errorLog = ( ( "EXCEPTION in parsing " + ( inputSVG.getName ( ) ) ) + ":\n" ) + ( e.getMessage ( ) ) ; } return errorLog ; }
Source:
public void onUiShowing ( boolean showing ) { if ( showing ) { hide ( ) ; } else { if ( ( getCall ( ) ) != null ) { show ( ) ; } } }

Target:
public void onUiShowing ( boolean showing ) { com.android.dialer.common.LogUtil.i ( "ReturnToCallController.onUiShowing" , ( "showing: " + showing ) ) ; if ( showing ) { com.android.dialer.common.LogUtil.i ( "ReturnToCallController.onUiShowing" , "going to hide" ) ; hide ( ) ; } else { if ( ( getCall ( ) ) != null ) { com.android.dialer.common.LogUtil.i ( "ReturnToCallController.onUiShowing" , "going to show" ) ; show ( ) ; } } }
Source:
public void setPackageStoppedState ( java.lang.String packageName , boolean stopped ) { final int uid = android.os.Binder.getCallingUid ( ) ; final int permission = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE ) ; final boolean allowedByPermission = permission == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; synchronized ( mPackages ) { if ( mSettings.setPackageStoppedStateLPw ( packageName , stopped , allowedByPermission , uid ) ) { scheduleWriteStoppedPackagesLocked ( ) ; } } }

Target:
public void setPackageStoppedState ( java.lang.String packageName , boolean stopped , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; final int uid = android.os.Binder.getCallingUid ( ) ; final int permission = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE ) ; final boolean allowedByPermission = permission == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; checkValidCaller ( uid , userId ) ; synchronized ( mPackages ) { if ( mSettings.setPackageStoppedStateLPw ( packageName , stopped , allowedByPermission , uid , userId ) ) { scheduleWritePackageRestrictionsLocked ( userId ) ; } } }
Source:
public boolean sameItemAs ( java.lang.Package pkg , com.android.sdklib.internal.repository.packages.FullRevision.PreviewComparison comparePreview ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.BuildToolPackage ) { com.android.sdklib.internal.repository.packages.BuildToolPackage rhs = ( ( com.android.sdklib.internal.repository.packages.BuildToolPackage ) ( pkg ) ) ; return ( rhs.getRevision ( ) . compareTo ( getRevision ( ) , comparePreview ) ) == 0 ; } return false ; }

Target:
public boolean sameItemAs ( java.lang.Package pkg , com.android.sdklib.repository.FullRevision.PreviewComparison comparePreview ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.BuildToolPackage ) { com.android.sdklib.internal.repository.packages.BuildToolPackage rhs = ( ( com.android.sdklib.internal.repository.packages.BuildToolPackage ) ( pkg ) ) ; return ( rhs.getRevision ( ) . compareTo ( getRevision ( ) , comparePreview ) ) == 0 ; } return false ; }
Source:
private static byte [ ] computeClassDigest ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.security.NoSuchAlgorithmException { com.android.jack.digest.OriginDigestMarker marker = type.getMarker ( com.android.jack.digest.OriginDigestMarker.class ) ; if ( marker != null ) { return marker.getDigest ( ) ; } java.lang.String className = com.android.jack.coverage.CodeCoverageSelector.formatter.getName ( type ) ; byte [ ] classNameAsBytes = className.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; java.security.MessageDigest messageDigest = java.security.MessageDigest.getInstance ( "SHA-1" ) ; messageDigest.update ( classNameAsBytes ) ; byte [ ] digest = messageDigest.digest ( ) ; assert digest != null ; return digest ; }

Target:
private static byte [ ] stringToBytes ( @ javax.annotation.Nonnull java.lang.String str ) { return str.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { final java.lang.reflect.Constructor < com.android.server.wifi.WifiNative > wifiNativeConstructor = com.android.server.wifi.WifiNative.class . getDeclaredConstructor ( java.lang.String.class , java.lang.Boolean.TYPE ) ; wifiNativeConstructor.setAccessible ( true ) ; mWifiNative = org.mockito.Mockito.spy ( wifiNativeConstructor.newInstance ( "test" , true ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { final java.lang.reflect.Constructor < com.android.server.wifi.WifiNative > wifiNativeConstructor = com.android.server.wifi.WifiNative.class . getDeclaredConstructor ( java.lang.String.class , java.lang.Boolean.TYPE ) ; wifiNativeConstructor.setAccessible ( true ) ; mWifiNative = org.mockito.Mockito.spy ( wifiNativeConstructor.newInstance ( "test" , true ) ) ; mWifiVendorHal = org.mockito.Mockito.mock ( com.android.server.wifi.WifiVendorHal.class ) ; org.mockito.Mockito.when ( mWifiVendorHal.startVendorHal ( org.mockito.Mockito.anyBoolean ( ) ) ) . thenReturn ( true ) ; mWifiNative.setWifiVendorHal ( mWifiVendorHal ) ; }
Source:
protected boolean engineVerify ( byte [ ] sigBytes ) throws java.security.SignatureException { if ( ( key ) == null ) { throw new java.security.SignatureException ( "Need DSA or RSA public key" ) ; } try { int result = org.conscrypt.NativeCrypto.EVP_VerifyFinal ( ctx , sigBytes , 0 , sigBytes.length , key.getPkeyContext ( ) ) ; return result == 1 ; } catch ( java.lang.Exception ex ) { return false ; } finally { resetContext ( ) ; } }

Target:
protected boolean engineVerify ( byte [ ] sigBytes ) throws java.security.SignatureException { if ( ( key ) == null ) { throw new java.security.SignatureException ( "Need RSA public key" ) ; } try { int result = org.conscrypt.NativeCrypto.EVP_VerifyFinal ( ctx , sigBytes , 0 , sigBytes.length , key.getPkeyContext ( ) ) ; return result == 1 ; } catch ( java.lang.Exception ex ) { return false ; } finally { resetContext ( ) ; } }
Source:
public java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > getAnnotations ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedField field ) { com.android.tools.lint.ExternalAnnotationRepository.FieldInfo f = findField ( field ) ; if ( f == null ) { return null ; } return f.annotations ; }

Target:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedField field , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.FieldInfo f = findField ( field ) ; if ( f == null ) { return null ; } java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = f.getAnnotations ( ) ; if ( annotations != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }
Source:
public void addCall ( android.telecom.Call call ) { if ( mCalls.contains ( call ) ) { android.util.Log.e ( com.android.server.telecom.testapps.TestCallList.TAG , "addCall: Call already added." ) ; return ; } android.util.Log.i ( com.android.server.telecom.testapps.TestCallList.TAG , ( ( ( "addCall: " + call ) + " " ) + ( java.lang.System.identityHashCode ( this ) ) ) ) ; mCalls.add ( call ) ; call.addListener ( this ) ; for ( com.android.server.telecom.testapps.TestCallList.Listener l : mListeners ) { l.onCallAdded ( call ) ; } }

Target:
public void addCall ( android.telecom.Call call ) { if ( mCalls.contains ( call ) ) { android.util.Log.e ( com.android.server.telecom.testapps.TestCallList.TAG , "addCall: Call already added." ) ; return ; } android.util.Log.i ( com.android.server.telecom.testapps.TestCallList.TAG , ( ( ( "addCall: " + call ) + " " ) + ( java.lang.System.identityHashCode ( this ) ) ) ) ; mCalls.add ( call ) ; call.registerCallback ( this ) ; for ( com.android.server.telecom.testapps.TestCallList.Listener l : mListeners ) { l.onCallAdded ( call ) ; } }
Source:
public void testAppManager ( ) throws java.lang.Exception { com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( mInstrumentation , "FredVPN.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( mInstrumentation , "HelloCompute.apk" ) ; assertTrue ( "Failed to find FredVPN." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( mInstrumentation , "TestVPN" , null ) ) ; assertTrue ( "Failed to find RsHelloCompute." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( mInstrumentation , "RsHelloCompute" , null ) ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( mInstrumentation , "TestVPN" , null ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( mInstrumentation , "RsHelloCompute" , null ) ; }

Target:
public void testAppManager ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "FredVPN.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "HelloCompute.apk" ) ; org.junit.Assert.assertTrue ( "Failed to find FredVPN." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( instrumentation , "TestVPN" , null ) ) ; org.junit.Assert.assertTrue ( "Failed to find RsHelloCompute." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( instrumentation , "RsHelloCompute" , null ) ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( instrumentation , "TestVPN" , null ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( instrumentation , "RsHelloCompute" , null ) ; }
Source:
public boolean addAll ( java.util.Collection < ? extends E > c ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
private static boolean removeOccurrencesImpl ( com.google.common.collect.Multiset < ? > multisetToModify , java.lang.Iterable < ? > occurrencesToRemove ) { com.google.common.base.Preconditions.checkNotNull ( multisetToModify ) ; com.google.common.base.Preconditions.checkNotNull ( occurrencesToRemove ) ; boolean changed = false ; for ( java.lang.Object o : occurrencesToRemove ) { changed |= multisetToModify.remove ( o ) ; } return changed ; }
Source:
public static java.lang.String getReplacedType ( @ com.android.annotations.NonNull java.lang.String message ) { int index = message.indexOf ( '.' ) ; if ( ( index != ( - 1 ) ) && ( message.startsWith ( "Use " ) ) ) { return message.substring ( 4 , index ) ; } return null ; }

Target:
public static java.lang.String getReplacedType ( @ com.android.annotations.NonNull java.lang.String message , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.TextFormat format ) { message = format.toText ( message ) ; int index = message.indexOf ( '.' ) ; if ( ( index != ( - 1 ) ) && ( message.startsWith ( "Use " ) ) ) { return message.substring ( 4 , index ) ; } return null ; }
Source:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToUnicode ( input , result , info ) ; if ( info.hasErrors ( ) ) { return input ; } return result.toString ( ) ; }

Target:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { return libcore.icu.NativeIDN.toUnicode ( input , flags ) ; }
Source:
public V remove ( java.lang.Object key ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; java.util.concurrent.ConcurrentHashMap.Segment < K , V > s = segmentForHash ( hash ) ; return s == null ? null : s.remove ( key , hash , null ) ; }

Target:
public boolean containsKey ( java.lang.Object key ) { return ( get ( key ) ) != null ; }
Source:
public synchronized void receive ( java.net.DatagramPacket pack ) throws java.io.IOException { checkOpen ( ) ; ensureBound ( ) ; if ( pack == null ) { throw new java.lang.NullPointerException ( ) ; } if ( ( pendingConnectException ) != null ) { throw new java.net.SocketException ( "Pending connect failure" , pendingConnectException ) ; } pack.setLength ( pack.getCapacity ( ) ) ; impl.receive ( pack ) ; }

Target:
public synchronized void receive ( java.net.DatagramPacket pack ) throws java.io.IOException { checkOpen ( ) ; ensureBound ( ) ; if ( pack == null ) { throw new java.lang.NullPointerException ( ) ; } if ( ( pendingConnectException ) != null ) { throw new java.net.SocketException ( "Pending connect failure" , pendingConnectException ) ; } pack.resetLengthForReceive ( ) ; impl.receive ( pack ) ; }
Source:
public static vogar.ExpectationStore parse ( vogar.Log log , java.util.Set < java.io.File > expectationFiles , vogar.ModeId mode ) throws java.io.IOException { vogar.ExpectationStore result = new vogar.ExpectationStore ( log ) ; for ( java.io.File f : expectationFiles ) { if ( f.exists ( ) ) { result.parse ( f , mode ) ; } } return result ; }

Target:
public static vogar.ExpectationStore parse ( vogar.Log log , java.util.Set < java.io.File > expectationFiles , vogar.ModeId mode , vogar.Variant variant ) throws java.io.IOException { vogar.ExpectationStore result = new vogar.ExpectationStore ( log ) ; for ( java.io.File f : expectationFiles ) { if ( f.exists ( ) ) { result.parse ( f , mode , variant ) ; } } return result ; }
Source:
public java.lang.Boolean bluetoothA2dpSinkConnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "device" , description = "Name or MAC address of a bluetooth device." ) java.lang.String device ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpSinkFacade.sA2dpSinkProfile ) == null ) return false ; android.bluetooth.BluetoothDevice mDevice = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( BluetoothFacade.DiscoveredDevices , device ) ; com.googlecode.android_scripting.Log.d ( ( "Connecting to device " + ( mDevice.getAliasName ( ) ) ) ) ; return a2dpSinkConnect ( mDevice ) ; }

Target:
public void bluetoothA2dpSinkSetPriority ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "device" , description = "Mac address of a BT device." ) java.lang.String deviceStr , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "priority" , description = "Priority that needs to be set." ) java.lang.Integer priority ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpSinkFacade.sA2dpSinkProfile ) == null ) return ; android.bluetooth.BluetoothDevice device = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( mBluetoothAdapter.getBondedDevices ( ) , deviceStr ) ; com.googlecode.android_scripting.Log.d ( ( ( ( "Changing priority of device " + ( device.getAliasName ( ) ) ) + " p: " ) + priority ) ) ; com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpSinkFacade.sA2dpSinkProfile.setPriority ( device , priority ) ; }
Source:
public com.android.ahat.DocString render ( com.android.tools.perflib.heap.Instance element ) { if ( element == null ) { return com.android.ahat.DocString.link ( com.android.ahat.DocString.uri ( "roots" ) , com.android.ahat.DocString.text ( "ROOT" ) ) ; } else { return com.android.ahat.DocString.text ( "→ " ) . append ( com.android.ahat.Value.render ( element ) ) ; } }

Target:
public com.android.ahat.DocString render ( com.android.tools.perflib.heap.Instance element ) { if ( element == null ) { return com.android.ahat.DocString.link ( com.android.ahat.DocString.uri ( "rooted" ) , com.android.ahat.DocString.text ( "ROOT" ) ) ; } else { return com.android.ahat.DocString.text ( "→ " ) . append ( com.android.ahat.Value.render ( element ) ) ; } }
Source:
public void setApplicationRestrictions ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName , android.os.Bundle settings ) { throwIfParentInstance ( "setApplicationRestrictions" ) ; if ( ( mService ) != null ) { try { mService.setApplicationRestrictions ( admin , packageName , settings ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }

Target:
public void setApplicationRestrictions ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName , android.os.Bundle settings ) { throwIfParentInstance ( "setApplicationRestrictions" ) ; if ( ( mService ) != null ) { try { mService.setApplicationRestrictions ( admin , mContext.getPackageName ( ) , packageName , settings ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public void onViewCreated ( android.view.View view , android.os.Bundle savedInstanceState ) { super . onViewCreated ( view , savedInstanceState ) ; java.lang.String currentCountryIso = com.android.contacts.common.GeoUtil.getCurrentCountryIso ( getActivity ( ) ) ; mAdapter = new com.android.dialer.calllog.CallLogAdapter ( getActivity ( ) , this , new com.android.dialer.calllog.ContactInfoHelper ( getActivity ( ) , currentCountryIso ) ) ; setListAdapter ( mAdapter ) ; getListView ( ) . setItemsCanFocus ( true ) ; }

Target:
public void onViewCreated ( android.view.View view , android.os.Bundle savedInstanceState ) { super . onViewCreated ( view , savedInstanceState ) ; updateEmptyMessage ( mCallTypeFilter ) ; java.lang.String currentCountryIso = com.android.contacts.common.GeoUtil.getCurrentCountryIso ( getActivity ( ) ) ; mAdapter = com.android.dialerbind.ObjectFactory.newCallLogAdapter ( getActivity ( ) , this , new com.android.dialer.calllog.ContactInfoHelper ( getActivity ( ) , currentCountryIso ) , false , true ) ; setListAdapter ( mAdapter ) ; getListView ( ) . setItemsCanFocus ( true ) ; }
Source:
public synchronized boolean enable ( boolean quietMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; debugLog ( ( "enable() - Enable called with quiet mode status = " + ( mQuietmode ) ) ) ; mQuietmode = quietMode ; android.os.Message m = mAdapterStateMachine.obtainMessage ( AdapterState.BLE_TURN_ON ) ; mAdapterStateMachine.sendMessage ( m ) ; mBluetoothStartTime = java.lang.System.currentTimeMillis ( ) ; return true ; }

Target:
public synchronized boolean enable ( boolean quietMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; if ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_BLUETOOTH , UserHandle.SYSTEM ) ) { debugLog ( "enable() called when Bluetooth was disallowed" ) ; return false ; } debugLog ( ( "enable() - Enable called with quiet mode status = " + ( mQuietmode ) ) ) ; mQuietmode = quietMode ; android.os.Message m = mAdapterStateMachine.obtainMessage ( AdapterState.BLE_TURN_ON ) ; mAdapterStateMachine.sendMessage ( m ) ; mBluetoothStartTime = java.lang.System.currentTimeMillis ( ) ; return true ; }
Source:
boolean connectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ! ( mStateMachine.isConnected ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "connectAudio: profile not connected" ) ; return false ; } if ( mStateMachine.isAudioOn ( ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "connectAudio: audio is already ON" ) ; return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO ) ; return true ; }

Target:
boolean disconnectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mStateMachine.getAudioState ( ) ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "disconnectAudio, audio is not connected" ) ; return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.DISCONNECT_AUDIO , mStateMachine.getCurrentDevice ( ) ) ; return true ; }
Source:
public void execute ( proguard.preverify.ClassPool programClassPool ) { programClassPool.classesAccept ( new proguard.preverify.ClassCleaner ( ) ) ; proguard.preverify.ClassVisitor preverifier = new proguard.preverify.AllMethodVisitor ( new proguard.classfile.attribute.visitor.AllAttributeVisitor ( new proguard.preverify.CodePreverifier ( configuration.microEdition ) ) ) ; if ( ! ( configuration.microEdition ) ) { preverifier = new proguard.preverify.ClassVersionFilter ( ClassConstants.INTERNAL_CLASS_VERSION_1_6 , preverifier ) ; } programClassPool.classesAccept ( preverifier ) ; }

Target:
public void execute ( proguard.preverify.ClassPool programClassPool ) { programClassPool.classesAccept ( new proguard.preverify.ClassCleaner ( ) ) ; programClassPool.classesAccept ( new proguard.preverify.ClassVersionFilter ( ( configuration.microEdition ? ClassConstants.CLASS_VERSION_1_0 : ClassConstants.CLASS_VERSION_1_6 ) , new proguard.preverify.AllMethodVisitor ( new proguard.classfile.attribute.visitor.AllAttributeVisitor ( new proguard.preverify.CodePreverifier ( configuration.microEdition ) ) ) ) ) ; }
Source:
private void disconnectProfiles ( android.bluetooth.BluetoothDevice device , java.lang.String deviceID ) { com.googlecode.android_scripting.Log.d ( ( "Disconnecting device " + device ) ) ; mA2dpProfile.a2dpDisconnect ( device ) ; mA2dpSinkProfile.a2dpSinkDisconnect ( device ) ; mHidProfile.hidDisconnect ( device ) ; mHspProfile.hspDisconnect ( device ) ; mHfpClientProfile.hfpClientDisconnect ( device ) ; mPbapClientProfile.pbapClientDisconnect ( device ) ; mPanProfile.panDisconnect ( device ) ; mMapClientProfile.mapClientDisconnect ( device ) ; }

Target:
private void disconnectProfiles ( android.bluetooth.BluetoothDevice device , java.lang.String deviceID ) { com.googlecode.android_scripting.Log.d ( ( "Disconnecting device " + device ) ) ; mA2dpProfile.a2dpDisconnect ( device ) ; mA2dpSinkProfile.a2dpSinkDisconnect ( device ) ; mHidProfile.hidDisconnect ( device ) ; mHidDeviceProfile.hidDeviceDisconnect ( device ) ; mHspProfile.hspDisconnect ( device ) ; mHfpClientProfile.hfpClientDisconnect ( device ) ; mPbapClientProfile.pbapClientDisconnect ( device ) ; mPanProfile.panDisconnect ( device ) ; mMapClientProfile.mapClientDisconnect ( device ) ; }
Source:
boolean hasCallbackAlreadyHappened ( int callback ) { synchronized ( mLocalLock ) { java.util.Iterator < java.lang.Integer > it = mCallbackQueue.iterator ( ) ; while ( it.hasNext ( ) ) { if ( ( it.next ( ) ) == callback ) { return true ; } } } return false ; }

Target:
boolean waitForCallback ( int callback ) { synchronized ( mLocalLock ) { boolean found = mCallbackQueue.remove ( callback ) ; if ( found ) { return true ; } mCurrentWaitForCallback = callback ; mBlocker = new java.util.concurrent.CountDownLatch ( 1 ) ; } try { return mBlocker.await ( android.net.wifi.aware.cts.SingleDeviceTest.WAIT_FOR_AWARE_CHANGE_SECS , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { return false ; } }
Source:
public void write ( byte [ ] b , int off , int len ) throws java.io.IOException { if ( ( closed ) && ( len > 0 ) ) { throw new java.io.IOException ( "Stream Closed" ) ; } java.lang.Object traceContext = sun.misc.IoTrace.fileWriteBegin ( path ) ; int bytesWritten = 0 ; try { libcore.io.IoBridge.write ( fd , b , off , len ) ; bytesWritten = len ; } finally { sun.misc.IoTrace.fileWriteEnd ( traceContext , bytesWritten ) ; } }

Target:
public void write ( byte [ ] b , int off , int len ) throws java.io.IOException { if ( ( closed ) && ( len > 0 ) ) { throw new java.io.IOException ( "Stream Closed" ) ; } tracker.trackIo ( len ) ; libcore.io.IoBridge.write ( fd , b , off , len ) ; }
Source:
void separate ( com.android.internal.telephony.gsm.GsmConnection conn ) throws com.android.internal.telephony.CallStateException { if ( ( conn.owner ) != ( this ) ) { throw new com.android.internal.telephony.CallStateException ( ( ( ( "GsmConnection " + conn ) + "does not belong to GsmCallTracker " ) + ( this ) ) ) ; } try { cm.separateConnection ( conn.getGSMIndex ( ) , obtainCompleteMessage ( com.android.internal.telephony.gsm.EVENT_SEPARATE_RESULT ) ) ; } catch ( com.android.internal.telephony.CallStateException ex ) { android.util.Log.w ( com.android.internal.telephony.gsm.GsmCallTracker.LOG_TAG , ( "GsmCallTracker WARN: separate() on absent connection " + conn ) ) ; } }

Target:
void separate ( com.android.internal.telephony.gsm.GsmConnection conn ) throws com.android.internal.telephony.CallStateException { if ( ( conn.owner ) != ( this ) ) { throw new com.android.internal.telephony.CallStateException ( ( ( ( "GsmConnection " + conn ) + "does not belong to GsmCallTracker " ) + ( this ) ) ) ; } try { cm.separateConnection ( conn.getGSMIndex ( ) , obtainCompleteMessage ( com.android.internal.telephony.gsm.EVENT_SEPARATE_RESULT ) ) ; } catch ( com.android.internal.telephony.CallStateException ex ) { android.telephony.Rlog.w ( com.android.internal.telephony.gsm.GsmCallTracker.LOG_TAG , ( "GsmCallTracker WARN: separate() on absent connection " + conn ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { mContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; if ( ( android.os.Looper.myLooper ( ) ) == null ) { android.os.Looper.prepare ( ) ; } }

Target:
public void setUp ( ) throws java.lang.Exception { mContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; if ( ( android.os.Looper.myLooper ( ) ) == null ) { android.os.Looper.prepare ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { if ( ( android.os.Looper.myLooper ( ) ) != null ) { break ; } android.os.Looper.prepare ( ) ; java.lang.Thread.sleep ( 100 ) ; } } }
Source:
public void inflate ( android.content.res.Resources r , org.xmlpull.v1.XmlPullParser parser , android.util.AttributeSet attrs , android.content.res.Resources.Theme theme ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.TypedArray a = obtainAttributes ( r , theme , attrs , R.styleable.GradientDrawable ) ; super . inflateWithAttributes ( r , parser , a , R.styleable.GradientDrawable_visible ) ; updateStateFromTypedArray ( a ) ; a.recycle ( ) ; inflateChildElements ( r , parser , attrs , theme ) ; mGradientState.computeOpacity ( ) ; }

Target:
public void inflate ( android.content.res.Resources r , org.xmlpull.v1.XmlPullParser parser , android.util.AttributeSet attrs , android.content.res.Resources.Theme theme ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.TypedArray a = obtainAttributes ( r , theme , attrs , R.styleable.GradientDrawable ) ; super . inflateWithAttributes ( r , parser , a , R.styleable.GradientDrawable_visible ) ; updateStateFromTypedArray ( a ) ; a.recycle ( ) ; inflateChildElements ( r , parser , attrs , theme ) ; mGradientState.computeOpacity ( ) ; initializeWithState ( mGradientState ) ; }
Source:
public final java.nio.FloatBuffer asFloatBuffer ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 2 ; return new java.nio.ByteBufferAsFloatBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }

Target:
final void getUnchecked ( int pos , float [ ] dst , int dstOffset , int length ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } libcore.io.Memory.peekFloatArray ( ix ( pos ) , dst , dstOffset , length , ( ! ( nativeByteOrder ) ) ) ; }
Source:
public void test_toLocalizedPattern ( ) { java.text.SimpleDateFormat f2 = new java.text.SimpleDateFormat ( "GyMdkHmsSEDFwWahKz" , new java.util.Locale ( "de" , "CH" ) ) ; java.lang.String pattern = f2.toLocalizedPattern ( ) ; assertTrue ( ( "Wrong pattern: " + pattern ) , pattern.equals ( "GuMtkHmsSEDFwWahKz" ) ) ; f2 = new java.text.SimpleDateFormat ( "G y M d Z" , new java.util.Locale ( "de" , "CH" ) ) ; pattern = f2.toLocalizedPattern ( ) ; assertTrue ( ( "Wrong pattern: " + pattern ) , pattern.equals ( "G u M t Z" ) ) ; }

Target:
public void test_toLocalizedPattern ( ) { java.text.SimpleDateFormat f2 = new java.text.SimpleDateFormat ( "GyMdkHmsSEDFwWahKzZLc" , new java.util.Locale ( "de" , "CH" ) ) ; assertEquals ( f2.toPattern ( ) , f2.toLocalizedPattern ( ) ) ; }
Source:
static java.lang.String getContentType ( java.lang.String fileName ) throws java.io.IOException { java.lang.String resourceName = "resources/" + fileName ; java.net.URL url = java.lang.ClassLoader.getSystemClassLoader ( ) . getResource ( resourceName ) ; assertNotNull ( ( "Cannot find test resource " + resourceName ) , url ) ; return new libcore.net.url.FileURLConnection ( url ) . getContentType ( ) ; }

Target:
private java.lang.String getContentType ( java.lang.String fileName ) throws java.io.IOException { java.lang.String resourceName = "resources/" + fileName ; java.net.URL url = createTempFileWithContent ( resourceName ) ; return new libcore.net.url.FileURLConnection ( url ) . getContentType ( ) ; }
Source:
public void run ( ) { switch ( mType ) { case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_NONE : selectNone ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_PARENT : selectParent ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_SAME_TYPE : selectSameType ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_SIBLINGS : selectSiblings ( ) ; break ; } java.util.List < com.android.ide.common.api.INode > nodes = new java.util.ArrayList < com.android.ide.common.api.INode > ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem item : getSelections ( ) ) { nodes.add ( item.getNode ( ) ) ; } updateOutlineSelection ( nodes ) ; }

Target:
public void run ( ) { switch ( mType ) { case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_NONE : selectNone ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_PARENT : selectParent ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_SAME_TYPE : selectSameType ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager.SELECT_SIBLINGS : selectSiblings ( ) ; break ; } java.util.List < com.android.ide.common.api.INode > nodes = new java.util.ArrayList < com.android.ide.common.api.INode > ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem item : getSelections ( ) ) { nodes.add ( item.getNode ( ) ) ; } setOutlineSelection ( nodes ) ; }
Source:
public static com.android.tools.lint.checks.PermissionHolder join ( @ com.android.annotations.NonNull final com.android.tools.lint.checks.PermissionHolder lookup , @ com.android.annotations.Nullable final java.util.Set < java.lang.String > permissions ) { if ( ( permissions != null ) && ( ! ( permissions.isEmpty ( ) ) ) ) { return new com.android.tools.lint.checks.PermissionHolder ( ) { @ java.lang.Override public boolean hasPermission ( @ com.android.annotations.NonNull java.lang.String permission ) { return ( lookup.hasPermission ( permission ) ) || ( permissions.contains ( permission ) ) ; } @ java.lang.Override public boolean isRevocable ( @ com.android.annotations.NonNull java.lang.String permission ) { return lookup.isRevocable ( permission ) ; } } ; } return lookup ; }

Target:
public com.android.sdklib.AndroidVersion getTargetSdkVersion ( ) { return lookup.getTargetSdkVersion ( ) ; }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ; } return service.getState ( ) ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getConnectionState: " + device ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; } return service.getConnectionState ( device ) ; }