auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onMessageSendFailed ( int messageId , int reason ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "messageId" , messageId ) ; mResults.putInt ( "reason" , reason ) ; mEventFacade.postEvent ( "WifiNanSessionOnMessageSendFailed" , mResults ) ; }

Target:
public void onMessageSendFailed ( int messageId ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "messageId" , messageId ) ; mEventFacade.postEvent ( "WifiNanSessionOnMessageSendFailed" , mResults ) ; }
Source:
protected com.android.sdklib.internal.repository.archives.Archive [ ] initializeArchives ( java.util.Properties props , com.android.sdklib.internal.repository.archives.Archive.Os archiveOs , com.android.sdklib.internal.repository.archives.Archive.Arch archiveArch , java.lang.String archiveOsPath ) { return new com.android.sdklib.internal.repository.archives.Archive [ ] { new com.android.sdklib.internal.repository.archives.Archive ( this , props , archiveOs , archiveArch , archiveOsPath ) { @ java.lang.Override public java.lang.String toString ( ) { return mTestHandle ; } } } ; }

Target:
protected com.android.sdklib.internal.repository.archives.Archive [ ] initializeArchives ( java.util.Properties props , java.lang.String archiveOsPath ) { return new com.android.sdklib.internal.repository.archives.Archive [ ] { new com.android.sdklib.internal.repository.archives.Archive ( this , props , archiveOsPath ) { @ java.lang.Override public java.lang.String toString ( ) { return mTestHandle ; } } } ; }
Source:
public void exit ( ) { mIPv6TetherSvc.stop ( ) ; try { mNMService.untetherInterface ( mIfaceName ) ; } catch ( java.lang.Exception ee ) { mLastError = android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR ; android.util.Log.e ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Failed to untether interface: " + ( ee.toString ( ) ) ) ) ; } configureIfaceIp ( false ) ; }

Target:
public void exit ( ) { mIPv6TetherSvc.stop ( ) ; try { mNMService.untetherInterface ( mIfaceName ) ; } catch ( java.lang.Exception e ) { mLastError = android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR ; android.util.Log.e ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Failed to untether interface: " + ( e.toString ( ) ) ) ) ; } configureIfaceIp ( false ) ; }
Source:
public final void accept ( @ com.android.annotations.NonNull com.android.tools.perflib.heap.Visitor visitor ) { visitor.visitArrayInstance ( this ) ; if ( ( mType ) == ( Type.OBJECT ) ) { for ( java.lang.Object value : getValues ( ) ) { if ( value instanceof com.android.tools.perflib.heap.Instance ) { if ( ! ( mReferencesAdded ) ) { ( ( com.android.tools.perflib.heap.Instance ) ( value ) ) . addReference ( this ) ; } visitor.visitLater ( this , ( ( com.android.tools.perflib.heap.Instance ) ( value ) ) ) ; } } mReferencesAdded = true ; } }

Target:
public final void accept ( @ com.android.annotations.NonNull com.android.tools.perflib.heap.Visitor visitor ) { visitor.visitArrayInstance ( this ) ; if ( ( mType ) == ( Type.OBJECT ) ) { for ( java.lang.Object value : getValues ( ) ) { if ( value instanceof com.android.tools.perflib.heap.Instance ) { if ( ! ( mReferencesAdded ) ) { ( ( com.android.tools.perflib.heap.Instance ) ( value ) ) . addReference ( null , this ) ; } visitor.visitLater ( this , ( ( com.android.tools.perflib.heap.Instance ) ( value ) ) ) ; } } mReferencesAdded = true ; } }
Source:
public java.lang.String getFieldValue ( java.lang.String key , java.lang.String prefix ) { java.lang.String value = mFields.get ( key ) ; if ( ( android.text.TextUtils.isEmpty ( value ) ) || ( android.net.wifi.WifiEnterpriseConfig.EMPTY_VALUE.equals ( value ) ) ) return "" ; value = removeDoubleQuotes ( value ) ; if ( value.startsWith ( prefix ) ) { return value.substring ( prefix.length ( ) ) ; } else { return value ; } }

Target:
private java.lang.String getFieldValue ( java.lang.String key , java.lang.String prefix ) { java.lang.String value = mFields.get ( key ) ; if ( ( android.text.TextUtils.isEmpty ( value ) ) || ( android.net.wifi.WifiEnterpriseConfig.EMPTY_VALUE.equals ( value ) ) ) return "" ; value = removeDoubleQuotes ( value ) ; if ( value.startsWith ( prefix ) ) { return value.substring ( prefix.length ( ) ) ; } else { return value ; } }
Source:
public java.util.List < com.android.jack.ir.ast.JEnumField > sortEnumFields ( ) { if ( ! ( areFieldsSorted ) ) { java.util.Collections.sort ( enumFields , new java.util.Comparator < com.android.jack.ir.ast.JEnumField > ( ) { @ java.lang.Override public int compare ( com.android.jack.ir.ast.JEnumField field1 , com.android.jack.ir.ast.JEnumField field2 ) { return field1.getName ( ) . compareTo ( field2.getName ( ) ) ; } } ) ; areFieldsSorted = true ; } return enumFields ; }

Target:
public void sortEnumFields ( ) { if ( ! ( areFieldsSorted ) ) { java.util.Collections.sort ( enumFields , new java.util.Comparator < com.android.jack.ir.ast.JEnumField > ( ) { @ java.lang.Override public int compare ( com.android.jack.ir.ast.JEnumField field1 , com.android.jack.ir.ast.JEnumField field2 ) { return field1.getName ( ) . compareTo ( field2.getName ( ) ) ; } } ) ; areFieldsSorted = true ; } }
Source:
public static java.lang.Package create ( com.android.sdklib.internal.repository.sources.SdkSource source , java.util.Properties props , int apiLevel , java.lang.String codename , int revision , java.lang.String license , java.lang.String description , java.lang.String descUrl , com.android.sdklib.internal.repository.archives.Archive.Os archiveOs , com.android.sdklib.internal.repository.archives.Archive.Arch archiveArch , java.lang.String archiveOsPath ) { return new com.android.sdklib.internal.repository.packages.DocPackage ( source , props , apiLevel , codename , revision , license , description , descUrl , archiveOs , archiveArch , archiveOsPath ) ; }

Target:
public static java.lang.Package create ( com.android.sdklib.internal.repository.sources.SdkSource source , java.util.Properties props , int apiLevel , java.lang.String codename , int revision , java.lang.String license , java.lang.String description , java.lang.String descUrl , java.lang.String archiveOsPath ) { return new com.android.sdklib.internal.repository.packages.DocPackage ( source , props , apiLevel , codename , revision , license , description , descUrl , archiveOsPath ) ; }
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 ) ; mPanProfile.panDisconnect ( device ) ; mPbapClientProfile.pbapClientDisconnect ( 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 ) ; mHspProfile.hspDisconnect ( device ) ; mHfpClientProfile.hfpClientDisconnect ( device ) ; mPbapClientProfile.pbapClientDisconnect ( device ) ; mPanProfile.panDisconnect ( device ) ; }
Source:
private void addRemoteTool ( com.android.sdklib.repository.FullRevision revision , com.android.sdklib.repository.FullRevision minPlatformToolsRev ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newTool ( revision , minPlatformToolsRev ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemoteTool ( com.android.sdklib.repository.FullRevision revision , com.android.sdklib.repository.FullRevision minPlatformToolsRev ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newTool ( revision , minPlatformToolsRev ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource , 0 ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }
Source:
public boolean isTtyModeSupported ( ) { android.telecom.TelecomManager telecomManager = android.telecom.TelecomManager.from ( mPhone.getContext ( ) ) ; android.telephony.TelephonyManager telephonyManager = ( ( android.telephony.TelephonyManager ) ( mPhone.getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; return ( ! ( telephonyManager.isMultiSimEnabled ( ) ) ) && ( telecomManager.isTtySupported ( ) ) ; }

Target:
public boolean isTtyModeSupported ( ) { android.telecom.TelecomManager telecomManager = android.telecom.TelecomManager.from ( mPhone.getContext ( ) ) ; android.telephony.TelephonyManager telephonyManager = ( ( android.telephony.TelephonyManager ) ( mPhone.getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; return telecomManager.isTtySupported ( ) ; }
Source:
public void rootsChanged ( com.intellij.openapi.roots.ModuleRootEvent event ) { java.util.Map < com.intellij.openapi.fileEditor.impl.VirtualFile , com.intellij.openapi.fileEditor.impl.NonProjectFileWritingAccessProvider.AccessStatus > files = com.intellij.openapi.fileEditor.impl.NonProjectFileWritingAccessProvider.getRegisteredFiles ( project ) ; for ( com.intellij.openapi.fileEditor.impl.VirtualFile each : new java.util.ArrayList < com.intellij.openapi.fileEditor.impl.VirtualFile > ( files.keySet ( ) ) ) { if ( isProjectFile ( each ) ) { files.remove ( each ) ; com.intellij.ui.EditorNotifications.getInstance ( myProject ) . updateNotifications ( each ) ; } } }

Target:
public void rootsChanged ( com.intellij.openapi.roots.ModuleRootEvent event ) { java.util.Map < com.intellij.openapi.fileEditor.impl.VirtualFile , com.intellij.openapi.fileEditor.impl.NonProjectFileWritingAccessProvider.AccessStatus > files = com.intellij.openapi.fileEditor.impl.NonProjectFileWritingAccessProvider.getRegisteredFiles ( project ) ; for ( com.intellij.openapi.fileEditor.impl.VirtualFile each : new java.util.ArrayList < com.intellij.openapi.fileEditor.impl.VirtualFile > ( files.keySet ( ) ) ) { if ( isProjectFile ( each ) ) { files.remove ( each ) ; } } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JBinaryOperation binOp ) { com.android.sched.util.log.Tracer tracer = com.android.sched.util.log.TracerFactory.getTracer ( ) ; if ( binOp instanceof com.android.jack.ir.ast.JShiftOperation ) { computeStat ( binOp , tracer.getStatistic ( com.android.jack.statistics.BinaryOperationWithCst.StatBinOp.SHIFT_WITH_LIT8 ) , java.lang.Byte.MIN_VALUE , java.lang.Byte.MAX_VALUE ) ; } if ( binOp instanceof com.android.jack.ir.ast.JLogicalAndBitwiseOperation ) { computeStat ( binOp , tracer.getStatistic ( com.android.jack.statistics.BinaryOperationWithCst.StatBinOp.LOGICAL_WITH_LIT16 ) , java.lang.Short.MIN_VALUE , java.lang.Short.MAX_VALUE ) ; } if ( binOp instanceof com.android.jack.ir.ast.JArithmeticBinaryOperation ) { computeStat ( binOp , tracer.getStatistic ( com.android.jack.statistics.BinaryOperationWithCst.StatBinOp.ARITHMETIC_WITH_LIT16 ) , java.lang.Short.MIN_VALUE , java.lang.Short.MAX_VALUE ) ; } return super . visit ( binOp ) ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JBinaryOperation binOp ) { if ( binOp instanceof com.android.jack.ir.ast.JShiftOperation ) { computeStat ( binOp , tracer.getStatistic ( com.android.jack.statistics.BinaryOperationWithCst.StatBinOp.SHIFT_WITH_LIT8 ) , java.lang.Byte.MIN_VALUE , java.lang.Byte.MAX_VALUE ) ; } if ( binOp instanceof com.android.jack.ir.ast.JLogicalAndBitwiseOperation ) { computeStat ( binOp , tracer.getStatistic ( com.android.jack.statistics.BinaryOperationWithCst.StatBinOp.LOGICAL_WITH_LIT16 ) , java.lang.Short.MIN_VALUE , java.lang.Short.MAX_VALUE ) ; } if ( binOp instanceof com.android.jack.ir.ast.JArithmeticBinaryOperation ) { computeStat ( binOp , tracer.getStatistic ( com.android.jack.statistics.BinaryOperationWithCst.StatBinOp.ARITHMETIC_WITH_LIT16 ) , java.lang.Short.MIN_VALUE , java.lang.Short.MAX_VALUE ) ; } return super . visit ( binOp ) ; }
Source:
static int initRaster ( int nativeBitmapOrZero ) { if ( nativeBitmapOrZero > 0 ) { android.graphics.Bitmap_Delegate bitmapDelegate = android.graphics.Bitmap_Delegate.getDelegate ( nativeBitmapOrZero ) ; android.graphics.Canvas_Delegate newDelegate = new android.graphics.Canvas_Delegate ( bitmapDelegate ) ; return android.graphics.Canvas_Delegate.sManager.addNewDelegate ( newDelegate ) ; } android.graphics.Canvas_Delegate newDelegate = new android.graphics.Canvas_Delegate ( ) ; return android.graphics.Canvas_Delegate.sManager.addNewDelegate ( newDelegate ) ; }

Target:
static long initRaster ( long nativeBitmapOrZero ) { if ( nativeBitmapOrZero > 0 ) { android.graphics.Bitmap_Delegate bitmapDelegate = android.graphics.Bitmap_Delegate.getDelegate ( nativeBitmapOrZero ) ; android.graphics.Canvas_Delegate newDelegate = new android.graphics.Canvas_Delegate ( bitmapDelegate ) ; return android.graphics.Canvas_Delegate.sManager.addNewDelegate ( newDelegate ) ; } android.graphics.Canvas_Delegate newDelegate = new android.graphics.Canvas_Delegate ( ) ; return android.graphics.Canvas_Delegate.sManager.addNewDelegate ( newDelegate ) ; }
Source:
public void nodeDeleted ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent , com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode child , int previousIndex ) { if ( parent == ( mTargetNode.getNode ( ) ) ) { for ( int i = 0 , n = indices.size ( ) ; i < n ; i ++ ) { int idx = indices.get ( i ) ; if ( idx >= previousIndex ) { indices.set ( i , ( idx - 1 ) ) ; } } assert ! ( added.contains ( child ) ) ; } }

Target:
public void nodeDeleted ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent , com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode child , int previousIndex ) { if ( parent == ( mTargetNode.getNode ( ) ) ) { for ( int i = 0 , n = indices.size ( ) ; i < n ; i ++ ) { int idx = indices.get ( i ) ; if ( idx >= previousIndex ) { indices.set ( i , ( idx - 1 ) ) ; } } } }
Source:
public void testStageInstallWithErrorCode_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertInstallDistroStaged ( distro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( distro ) ) ; assertInstallDistroStaged ( distro ) ; assertNoInstalledDistro ( ) ; }
Source:
public void openLibraryOrSdkSettings ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.roots.OrderEntry orderEntry ) { warnIfGradleProject ( ) ; final com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable config = com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( myProject ) ; com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( myProject , config , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( orderEntry instanceof com.intellij.openapi.roots.JdkOrderEntry ) { config.select ( ( ( com.intellij.openapi.roots.JdkOrderEntry ) ( orderEntry ) ) . getJdk ( ) , true ) ; } else { config.select ( ( ( com.intellij.openapi.roots.LibraryOrderEntry ) ( orderEntry ) ) , true ) ; } } } ) ; }

Target:
public void openLibraryOrSdkSettings ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.roots.OrderEntry orderEntry ) { final com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable config = com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( myProject ) ; com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( myProject , config , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( orderEntry instanceof com.intellij.openapi.roots.JdkOrderEntry ) { config.select ( ( ( com.intellij.openapi.roots.JdkOrderEntry ) ( orderEntry ) ) . getJdk ( ) , true ) ; } else { config.select ( ( ( com.intellij.openapi.roots.LibraryOrderEntry ) ( orderEntry ) ) , true ) ; } } } ) ; }
Source:
private void doFollowReferencesTestImpl ( Main.A root , int stopAfter , int followSet , java.lang.Object asRoot , Main.Verifier v , java.lang.String additionalEnabled ) { java.lang.String [ ] lines = Main.followReferences ( heapFilter , klass , root , stopAfter , followSet , asRoot ) ; if ( ( ( heapFilter ) == 0 ) && ( ( klass ) == null ) ) { v.process ( lines , additionalEnabled ) ; } else { java.util.Arrays.sort ( lines ) ; for ( java.lang.String l : lines ) { java.lang.System.out.println ( l ) ; } } }

Target:
private void doFollowReferencesTestImpl ( Main.A root , int stopAfter , int followSet , java.lang.Object asRoot , Main.Verifier v , java.lang.String additionalEnabled ) { java.lang.String [ ] lines = Main.followReferences ( heapFilter , klass , root , stopAfter , followSet , asRoot ) ; v.process ( lines , additionalEnabled , ( ( ( heapFilter ) != 0 ) || ( ( klass ) != null ) ) ) ; }
Source:
public E get ( int key , E valueIfKeyNotFound ) { int i = com.android.layoutlib.bridge.util.SparseWeakArray.binarySearch ( mKeys , 0 , mSize , key ) ; if ( ( ( i < 0 ) || ( ( mValues [ i ] ) == ( com.android.layoutlib.bridge.util.SparseWeakArray.DELETED ) ) ) || ( ( mValues [ i ] . get ( ) ) == null ) ) { return valueIfKeyNotFound ; } else { return ( ( E ) ( mValues [ i ] . get ( ) ) ) ; } }

Target:
public E get ( long key , E valueIfKeyNotFound ) { int i = com.android.layoutlib.bridge.util.SparseWeakArray.binarySearch ( mKeys , 0 , mSize , key ) ; if ( ( ( i < 0 ) || ( ( mValues [ i ] ) == ( com.android.layoutlib.bridge.util.SparseWeakArray.DELETED ) ) ) || ( ( mValues [ i ] . get ( ) ) == null ) ) { return valueIfKeyNotFound ; } else { return ( ( E ) ( mValues [ i ] . get ( ) ) ) ; } }
Source:
public void bufferChanged ( java.util.List < com.android.ddmlib.logcat.LogCatMessage > addedMessages , java.util.List < com.android.ddmlib.logcat.LogCatMessage > deletedMessages ) { synchronized ( mLogBuffer ) { addedMessages = applyCurrentFilters ( addedMessages ) ; deletedMessages = applyCurrentFilters ( deletedMessages ) ; mLogBuffer.addAll ( addedMessages ) ; mDeletedLogCount += deletedMessages.size ( ) ; } refreshLogCatTable ( ) ; updateUnreadCount ( addedMessages ) ; refreshFiltersTable ( ) ; }

Target:
public void bufferChanged ( java.util.List < com.android.ddmlib.logcat.LogCatMessage > addedMessages , java.util.List < com.android.ddmlib.logcat.LogCatMessage > deletedMessages ) { updateUnreadCount ( addedMessages ) ; refreshFiltersTable ( ) ; synchronized ( mLogBuffer ) { addedMessages = applyCurrentFilters ( addedMessages ) ; deletedMessages = applyCurrentFilters ( deletedMessages ) ; mLogBuffer.addAll ( addedMessages ) ; mDeletedLogCount += deletedMessages.size ( ) ; } refreshLogCatTable ( ) ; }
Source:
public void onFocusChanged ( final boolean focused , final int direction , final android.graphics.Rect previouslyFocusedRect ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onFocusChanged ( focused , direction , previouslyFocusedRect ) ; } } ) ; return ; } mAwContents.getAwContentsProxy ( ) . onFocusChanged ( focused , direction , previouslyFocusedRect ) ; }

Target:
public void onFocusChanged ( final boolean focused , final int direction , final android.graphics.Rect previouslyFocusedRect ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onFocusChanged ( focused , direction , previouslyFocusedRect ) ; } } ) ; return ; } mAwContents.onFocusChanged ( focused , direction , previouslyFocusedRect ) ; }
Source:
public boolean visit ( org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration , org.eclipse.jdt.internal.compiler.lookup.MethodScope scope ) { org.eclipse.jdt.internal.compiler.ast.Annotation [ ] annotations = fieldDeclaration.annotations ; if ( hasRelevantAnnotations ( annotations ) ) { org.eclipse.jdt.internal.compiler.lookup.FieldBinding fieldBinding = fieldDeclaration.binding ; if ( fieldBinding == null ) { return false ; } java.lang.String fqn = com.android.build.gradle.tasks.annotations.Extractor.getFqn ( scope ) ; com.android.build.gradle.tasks.annotations.Extractor.Item item = com.android.build.gradle.tasks.annotations.Extractor.FieldItem.create ( fqn , fieldBinding ) ; if ( item != null ) { assert fqn != null ; addItem ( fqn , item ) ; addAnnotations ( annotations , item ) ; } } return false ; }

Target:
public boolean visit ( org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration , org.eclipse.jdt.internal.compiler.lookup.MethodScope scope ) { org.eclipse.jdt.internal.compiler.ast.Annotation [ ] annotations = fieldDeclaration.annotations ; if ( hasRelevantAnnotations ( annotations ) ) { org.eclipse.jdt.internal.compiler.lookup.FieldBinding fieldBinding = fieldDeclaration.binding ; if ( fieldBinding == null ) { return false ; } java.lang.String fqn = com.android.build.gradle.tasks.annotations.Extractor.getFqn ( scope ) ; com.android.build.gradle.tasks.annotations.Extractor.Item item = com.android.build.gradle.tasks.annotations.Extractor.FieldItem.create ( fqn , fieldBinding ) ; if ( item != null ) { addItem ( fqn , item ) ; addAnnotations ( annotations , item ) ; } } return false ; }
Source:
private static void initFormatStringsLocked ( ) { android.content.res.Resources r = android.content.res.Resources.getSystem ( ) ; android.content.res.Configuration cfg = r.getConfiguration ( ) ; if ( ( ( android.text.format.DateUtils.sLastConfig ) == null ) || ( ! ( android.text.format.DateUtils.sLastConfig.equals ( cfg ) ) ) ) { android.text.format.DateUtils.sLastConfig = cfg ; android.text.format.DateUtils.sStatusTimeFormat = java.text.DateFormat.getTimeInstance ( java.text.DateFormat.SHORT ) ; android.text.format.DateUtils.sElapsedFormatMMSS = r.getString ( com.android.internal.R.string.elapsed_time_short_format_mm_ss ) ; android.text.format.DateUtils.sElapsedFormatHMMSS = r.getString ( com.android.internal.R.string.elapsed_time_short_format_h_mm_ss ) ; } }

Target:
private static void initFormatStringsLocked ( ) { android.content.res.Resources r = android.content.res.Resources.getSystem ( ) ; android.content.res.Configuration cfg = r.getConfiguration ( ) ; if ( ( ( android.text.format.DateUtils.sLastConfig ) == null ) || ( ! ( android.text.format.DateUtils.sLastConfig.equals ( cfg ) ) ) ) { android.text.format.DateUtils.sLastConfig = cfg ; android.text.format.DateUtils.sElapsedFormatMMSS = r.getString ( com.android.internal.R.string.elapsed_time_short_format_mm_ss ) ; android.text.format.DateUtils.sElapsedFormatHMMSS = r.getString ( com.android.internal.R.string.elapsed_time_short_format_h_mm_ss ) ; } }
Source:
private java.lang.String describe ( java.lang.String tag , java.lang.String message ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; if ( tag != null ) { sb.append ( tag ) ; } if ( message != null ) { if ( ( sb.length ( ) ) > 0 ) { sb.append ( ": " ) ; } sb.append ( message ) ; } return sb.toString ( ) ; }

Target:
private java.lang.String describe ( java.lang.String message ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; if ( message != null ) { if ( ( sb.length ( ) ) > 0 ) { sb.append ( ": " ) ; } sb.append ( message ) ; } return sb.toString ( ) ; }
Source:
public java.lang.String getModuleReference ( ) { java.lang.String moduleName = getModuleName ( ) ; java.io.File file = new java.io.File ( moduleName ) ; java.lang.StringBuilder builder = new java.lang.StringBuilder ( ( ( moduleName.length ( ) ) + 1 ) ) ; while ( file != null ) { builder.insert ( 0 , file.getName ( ) ) ; builder.insert ( 0 , ':' ) ; file = file.getParentFile ( ) ; } return builder.toString ( ) ; }

Target:
public java.lang.String getModuleReference ( ) { return ':' + ( getModuleName ( ) ) ; }
Source:
public void testEndCallWithNonRingingForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getForegroundCall ( ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }

Target:
public void testEndCallWithNonRingingForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getForegroundCall ( ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( null ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }
Source:
public void testSendTextWithOutDesAddr ( ) { mCdmaSmsDispatcher.sendText ( null , "222" , com.android.internal.telephony.cdma.TAG , null , null , null , null , false , ( - 1 ) , false , ( - 1 ) ) ; verify ( mSimulatedCommandsVerifier , times ( 0 ) ) . sendImsGsmSms ( anyString ( ) , anyString ( ) , anyInt ( ) , anyInt ( ) , any ( android.os.Message.class ) ) ; }

Target:
public void testSendTextWithOutDesAddr ( ) { mCdmaSmsDispatcher.sendText ( null , "222" , com.android.internal.telephony.cdma.TAG , null , null , null , null , false ) ; verify ( mSimulatedCommandsVerifier , times ( 0 ) ) . sendImsGsmSms ( anyString ( ) , anyString ( ) , anyInt ( ) , anyInt ( ) , any ( android.os.Message.class ) ) ; }
Source:
private java.util.Map.Entry < K , V2 > transformEntry ( java.util.Map.Entry < K , V1 > entry ) { if ( entry == null ) { return null ; } K key = entry.getKey ( ) ; V2 v2 = transformer.transformEntry ( key , entry.getValue ( ) ) ; return com.google.common.collect.Maps.immutableEntry ( key , v2 ) ; }

Target:
private java.util.Map.Entry < K , V2 > transformEntry ( @ javax.annotation.Nullable java.util.Map.Entry < K , V1 > entry ) { return entry == null ? null : com.google.common.collect.Maps.transformEntry ( transformer , entry ) ; }
Source:
public com.android.jack.dx.dex.file.TypeIdItem intern ( com.android.jack.dx.rop.type.Type type ) { if ( type == null ) { throw new java.lang.NullPointerException ( "type == null" ) ; } throwIfPrepared ( ) ; com.android.jack.dx.dex.file.TypeIdItem result = typeIds.get ( type ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.TypeIdItem ( new com.android.jack.dx.rop.cst.CstType ( type ) ) ; typeIds.put ( type , result ) ; } return result ; }

Target:
public com.android.jack.dx.dex.file.TypeIdItem intern ( com.android.jack.dx.rop.type.Type type ) { assert type != null ; throwIfPrepared ( ) ; com.android.jack.dx.dex.file.TypeIdItem result = typeIds.get ( type ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.TypeIdItem ( type ) ; typeIds.put ( type , result ) ; } return result ; }
Source:
public void _test ( java.lang.String localeName ) throws java.io.IOException , org.xml.sax.SAXException { java.io.File f = new java.io.File ( android.icu.dev.test.cldr.TestCLDRVsICU.CLDR_DIRECTORY , ( ( "test/" + localeName ) + ".xml" ) ) ; logln ( ( "Testing " + ( f.getCanonicalPath ( ) ) ) ) ; SAX.parse ( f , DEFAULT_HANDLER ) ; }

Target:
private void _test ( java.lang.String localeName ) throws java.io.IOException , org.xml.sax.SAXException { java.io.File f = new java.io.File ( android.icu.dev.test.cldr.TestCLDRVsICU.CLDR_DIRECTORY , ( ( "test/" + localeName ) + ".xml" ) ) ; logln ( ( "Testing " + ( f.getCanonicalPath ( ) ) ) ) ; SAX.parse ( f , DEFAULT_HANDLER ) ; }
Source:
public void testWakeLockTimeout ( ) throws java.lang.Exception { com.android.internal.telephony.RILTest.invokeMethod ( mRILInstance , "obtainRequest" , new java.lang.Class < ? > [ ] { java.lang.Integer.TYPE , android.os.Message.class , android.os.WorkSource.class } , new java.lang.Object [ ] { com.android.internal.telephony.RILConstants.RIL_REQUEST_GET_SIM_STATUS , obtainMessage ( ) , null } ) ; junit.framework.Assert.assertTrue ( mRILInstance.getWakeLock ( RIL.FOR_WAKELOCK ) . isHeld ( ) ) ; waitForHandlerActionDelayed ( mRilHandler , 10 , com.android.internal.telephony.RILTest.DEFAULT_WAKE_LOCK_TIMEOUT_MS ) ; junit.framework.Assert.assertFalse ( mRILInstance.getWakeLock ( RIL.FOR_WAKELOCK ) . isHeld ( ) ) ; }

Target:
public void testWakeLockTimeout ( ) throws java.lang.Exception { invokeMethod ( mRILInstance , "obtainRequest" , new java.lang.Class < ? > [ ] { java.lang.Integer.TYPE , android.os.Message.class , android.os.WorkSource.class } , new java.lang.Object [ ] { com.android.internal.telephony.RILConstants.RIL_REQUEST_GET_SIM_STATUS , obtainMessage ( ) , null } ) ; junit.framework.Assert.assertTrue ( mRILInstance.getWakeLock ( RIL.FOR_WAKELOCK ) . isHeld ( ) ) ; waitForHandlerActionDelayed ( mRilHandler , 10 , com.android.internal.telephony.RILTest.DEFAULT_WAKE_LOCK_TIMEOUT_MS ) ; junit.framework.Assert.assertFalse ( mRILInstance.getWakeLock ( RIL.FOR_WAKELOCK ) . isHeld ( ) ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof com.ibm.icu.text.DateTimePatternGenerator.DateTimeMatcher ) ) { return false ; } com.ibm.icu.text.DateTimePatternGenerator.DateTimeMatcher that = ( ( com.ibm.icu.text.DateTimePatternGenerator.DateTimeMatcher ) ( other ) ) ; for ( int i = 0 ; i < ( original.length ) ; ++ i ) { if ( ! ( original [ i ] . equals ( that.original [ i ] ) ) ) return false ; } return true ; }

Target:
public java.lang.String toString ( ) { return original.toString ( ) ; }
Source:
public boolean disconnect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "disconnect()" ) ; } com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) { return false ; } return service.disconnect ( device ) ; }

Target:
public boolean disconnect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "disconnect()" ) ; } com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) { return false ; } service.disconnect ( device ) ; return true ; }
Source:
public void getProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }

Target:
public void getProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }
Source:
private java.lang.String verifyMeasurements ( float ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation verifyMeasurements = android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createOperation ( environment , 100 ) ; verifyMeasurements.addVerification ( new android.hardware.cts.helpers.sensorverification.MeanVerification ( expectations , new float [ ] { 1.95F , 1.95F , 1.95F } ) ) ; verifyMeasurements.execute ( getCurrentTestNode ( ) ) ; return null ; }

Target:
private java.lang.String verifyMeasurements ( float ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation verifyMeasurements = android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createOperation ( environment , 100 ) ; verifyMeasurements.addVerification ( new android.hardware.cts.helpers.sensorverification.MeanVerification ( expectations , new float [ ] { 1.95F , 1.95F , 1.95F } , new float [ ] { 1.95F , 1.95F , 1.95F } ) ) ; verifyMeasurements.execute ( getCurrentTestNode ( ) ) ; return null ; }
Source:
public void test_markSupported ( ) { java.io.InputStream is = new java.io.ByteArrayInputStream ( new byte [ 10 ] ) ; java.util.zip.InflaterInputStream iis = new java.util.zip.InflaterInputStream ( is ) ; assertFalse ( iis.markSupported ( ) ) ; assertTrue ( is.markSupported ( ) ) ; }

Target:
public void test_markSupported ( ) throws java.io.IOException { java.io.InputStream is = new java.io.ByteArrayInputStream ( new byte [ 10 ] ) ; try ( java.util.zip.InflaterInputStream iis = new java.util.zip.InflaterInputStream ( is ) ) { assertFalse ( iis.markSupported ( ) ) ; assertTrue ( is.markSupported ( ) ) ; } }
Source:
private static android.net.Uri getVoicemailRingtoneUri ( @ android.support.annotation.NonNull android.content.Context context , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle handle ) { if ( ( android.os.Build.VERSION.SDK_INT ) < ( android.os.Build.VERSION_CODES.N ) ) { return null ; } if ( handle == null ) { com.android.dialer.common.LogUtil.i ( "VisualVoicemailNotifier.getVoicemailRingtoneUri" , "null handle, getting fallback" ) ; handle = com.android.dialer.app.calllog.VisualVoicemailNotifier.getFallbackAccount ( context ) ; if ( handle == null ) { com.android.dialer.common.LogUtil.i ( "VisualVoicemailNotifier.getVoicemailRingtoneUri" , "no fallback handle, using null (default) ringtone" ) ; return null ; } } return context.getSystemService ( android.telephony.TelephonyManager.class ) . getVoicemailRingtoneUri ( handle ) ; }

Target:
private static android.net.Uri getVoicemailRingtoneUri ( @ android.support.annotation.NonNull android.content.Context context , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle handle ) { if ( handle == null ) { com.android.dialer.common.LogUtil.i ( "VisualVoicemailNotifier.getVoicemailRingtoneUri" , "null handle, getting fallback" ) ; handle = com.android.dialer.app.calllog.VisualVoicemailNotifier.getFallbackAccount ( context ) ; if ( handle == null ) { com.android.dialer.common.LogUtil.i ( "VisualVoicemailNotifier.getVoicemailRingtoneUri" , "no fallback handle, using null (default) ringtone" ) ; return null ; } } return context.getSystemService ( android.telephony.TelephonyManager.class ) . getVoicemailRingtoneUri ( handle ) ; }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getClient = " + ( mService.getRemoteDevice ( ) ) ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return null ; return service.getRemoteDevice ( ) ; }

Target:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getClient = " + ( mService.getRemoteDevice ( ) ) ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return null ; } return service.getRemoteDevice ( ) ; }
Source:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "getConnectedDevices()" ) ; com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) return new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( 0 ) ; return service.getConnectedDevices ( ) ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "getConnectedDevices()" ) ; } com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) { return new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( 0 ) ; } return service.getConnectedDevices ( ) ; }
Source:
public boolean unlock ( java.lang.String password ) { try { mError = mBinder.unlock ( password ) ; return ( mError ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean unlock ( int userId , java.lang.String password ) { try { mError = mBinder.unlock ( userId , password ) ; return ( mError ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public boolean getScanCapabilities ( com.android.server.wifi.WifiNative.ScanCapabilities capabilities ) { try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.getScanCapabilities ( capabilities ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } legacyHalWarning ( ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { return ( isHalStarted ( ) ) && ( com.android.server.wifi.WifiNative.getScanCapabilitiesNative ( com.android.server.wifi.WifiNative.sWlan0Index , capabilities ) ) ; } }

Target:
public boolean getScanCapabilities ( com.android.server.wifi.WifiNative.ScanCapabilities capabilities ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return ( isHalStarted ( ) ) && ( com.android.server.wifi.WifiNative.getScanCapabilitiesNative ( com.android.server.wifi.WifiNative.sWlan0Index , capabilities ) ) ; } }
Source:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; try { return loadVDir ( parent , name ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.sched.util.file.CannotCreateFileException ( getVDirLocation ( parent , name ) ) ; } }

Target:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; try { return loadVDir ( parent , name ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.sched.util.file.CannotCreateFileException ( getVDirLocation ( parent , name ) , e ) ; } }
Source:
public android.os.Bundle sendWallpaperCommand ( android.os.IBinder window , java.lang.String action , int x , int y , int z , android.os.Bundle extras , boolean sync ) { synchronized ( mWindowMap ) { long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return sendWindowWallpaperCommandLocked ( windowForClientLocked ( this , window ) , action , x , y , z , extras , sync ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }

Target:
public android.os.Bundle sendWallpaperCommand ( android.os.IBinder window , java.lang.String action , int x , int y , int z , android.os.Bundle extras , boolean sync ) { synchronized ( mWindowMap ) { long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return sendWindowWallpaperCommandLocked ( windowForClientLocked ( this , window , true ) , action , x , y , z , extras , sync ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }
Source:
public static final org.bouncycastle.crypto.Digest clonePRFHash ( int prfAlgorithm , org.bouncycastle.crypto.Digest hash ) { switch ( prfAlgorithm ) { case PRFAlgorithm.tls_prf_legacy : return new org.bouncycastle.crypto.tls.CombinedHash ( ( ( org.bouncycastle.crypto.tls.CombinedHash ) ( hash ) ) ) ; default : return org.bouncycastle.crypto.tls.TlsUtils.cloneHash ( org.bouncycastle.crypto.tls.TlsUtils.getHashAlgorithmForPRFAlgorithm ( prfAlgorithm ) , hash ) ; } }

Target:
public static org.bouncycastle.crypto.Digest clonePRFHash ( int prfAlgorithm , org.bouncycastle.crypto.Digest hash ) { switch ( prfAlgorithm ) { case PRFAlgorithm.tls_prf_legacy : return new org.bouncycastle.crypto.tls.CombinedHash ( ( ( org.bouncycastle.crypto.tls.CombinedHash ) ( hash ) ) ) ; default : return org.bouncycastle.crypto.tls.TlsUtils.cloneHash ( org.bouncycastle.crypto.tls.TlsUtils.getHashAlgorithmForPRFAlgorithm ( prfAlgorithm ) , hash ) ; } }
Source:
public void testAppIdleNetworkAccess_whenCharging ( ) throws java.lang.Exception { if ( ! ( isSupported ( ) ) ) return ; setAppIdle ( true ) ; assertBackgroundNetworkAccess ( false ) ; turnBatteryOn ( ) ; assertBackgroundNetworkAccess ( true ) ; turnBatteryOff ( ) ; assertBackgroundNetworkAccess ( false ) ; setAppIdle ( false ) ; assertBackgroundNetworkAccess ( true ) ; setBatterySaverMode ( true ) ; assertBackgroundNetworkAccess ( false ) ; turnBatteryOn ( ) ; assertBackgroundNetworkAccess ( true ) ; turnBatteryOff ( ) ; assertBackgroundNetworkAccess ( true ) ; }

Target:
public void testAppIdleNetworkAccess_whenCharging ( ) throws java.lang.Exception { if ( ! ( isSupported ( ) ) ) return ; setAppIdle ( true ) ; assertBackgroundNetworkAccess ( false ) ; turnBatteryOn ( ) ; assertBackgroundNetworkAccess ( true ) ; turnBatteryOff ( ) ; assertBackgroundNetworkAccess ( false ) ; setAppIdle ( false ) ; assertBackgroundNetworkAccess ( true ) ; setBatterySaverMode ( true ) ; assertBackgroundNetworkAccess ( false ) ; setBatterySaverMode ( false ) ; turnBatteryOn ( ) ; assertBackgroundNetworkAccess ( true ) ; turnBatteryOff ( ) ; assertBackgroundNetworkAccess ( true ) ; }
Source:
public void visitBranchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.BranchInstruction branchInstruction ) { branchInstruction.branchOffset = newBranchOffset ( offset , branchInstruction.branchOffset ) ; instructionWriter.visitBranchInstruction ( clazz , method , codeAttribute , newOffset , branchInstruction ) ; newOffset += branchInstruction.length ( newOffset ) ; }

Target:
public void visitBranchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.BranchInstruction branchInstruction ) { branchInstruction.branchOffset = newBranchOffset ( offset , branchInstruction.branchOffset , newOffset ) ; instructionWriter.visitBranchInstruction ( clazz , method , codeAttribute , newOffset , branchInstruction ) ; newOffset += branchInstruction.length ( newOffset ) ; }
Source:
private static void checkService ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Element element ) { if ( ( com.android.tools.lint.checks.SecurityDetector.getExported ( element ) ) && ( com.android.tools.lint.checks.SecurityDetector.isUnprotectedByPermission ( element ) ) ) { context.report ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_SERVICE , element , context.getLocation ( element ) , "Exported service does not require permission" , null ) ; } }

Target:
private static void checkService ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Element element ) { if ( ( com.android.tools.lint.checks.SecurityDetector.getExported ( element ) ) && ( com.android.tools.lint.checks.SecurityDetector.isUnprotectedByPermission ( element ) ) ) { context.report ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_SERVICE , element , context.getLocation ( element ) , "Exported service does not require permission" ) ; } }
Source:
static void native_setScale ( int native_object , float sx , float sy ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return ; } d.mValues [ 0 ] = sx ; d.mValues [ 1 ] = 0 ; d.mValues [ 2 ] = 0 ; d.mValues [ 3 ] = 0 ; d.mValues [ 4 ] = sy ; d.mValues [ 5 ] = 0 ; d.mValues [ 6 ] = 0 ; d.mValues [ 7 ] = 0 ; d.mValues [ 8 ] = 1 ; }

Target:
static void native_setScale ( long native_object , float sx , float sy ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return ; } d.mValues [ 0 ] = sx ; d.mValues [ 1 ] = 0 ; d.mValues [ 2 ] = 0 ; d.mValues [ 3 ] = 0 ; d.mValues [ 4 ] = sy ; d.mValues [ 5 ] = 0 ; d.mValues [ 6 ] = 0 ; d.mValues [ 7 ] = 0 ; d.mValues [ 8 ] = 1 ; }
Source:
private boolean isUidIdle ( int uid ) { final java.lang.String [ ] packages = mContext.getPackageManager ( ) . getPackagesForUid ( uid ) ; final int userId = android.os.UserHandle.getUserId ( uid ) ; for ( java.lang.String packageName : packages ) { if ( ! ( mUsageStats.isAppIdle ( packageName , uid , userId ) ) ) { return false ; } } return true ; }

Target:
private boolean isUidIdle ( int uid ) { final java.lang.String [ ] packages = mContext.getPackageManager ( ) . getPackagesForUid ( uid ) ; final int userId = android.os.UserHandle.getUserId ( uid ) ; if ( packages != null ) { for ( java.lang.String packageName : packages ) { if ( ! ( mUsageStats.isAppIdle ( packageName , uid , userId ) ) ) { return false ; } } } return true ; }
Source:
public void setUp ( ) throws java.lang.Exception { mSnapshot = new com.android.tools.perflib.heap.Snapshot ( new com.android.tools.perflib.heap.io.InMemoryBuffer ( 10 ) ) ; mSnapshot.setHeapTo ( 13 , "testHeap" ) ; mDummyClass.setInstanceSize ( 20 ) ; mDummyClass.setFields ( new com.android.tools.perflib.heap.Field [ 0 ] ) ; mSnapshot.addClass ( 42 , mDummyClass ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mSnapshot = new com.android.tools.perflib.heap.Snapshot ( new com.android.tools.perflib.heap.io.InMemoryBuffer ( 10 ) ) ; mSnapshot.setHeapTo ( 13 , "testHeap" ) ; mDummyClass.setFields ( new com.android.tools.perflib.heap.Field [ 0 ] ) ; mSnapshot.addClass ( 42 , mDummyClass ) ; }