auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testOverlay2Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay2" , BasePlugin.GRADLE_MIN_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/one/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "variant_type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }

Target:
public void testOverlay2Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay2" , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/one/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "variant_type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }
Source:
public void onClosedCaptionsChanged ( android.media.tv.TvTrackInfo track ) { mClosedCaptionsLanguage = ( track == null ) ? null : ( track.getLanguage ( ) ) != null ? track.getLanguage ( ) : mContext.getString ( R.string.default_language ) ; notifyOptionChanged ( com.android.tv.TvOptionsManager.OPTION_CLOSED_CAPTIONS ) ; }

Target:
public void onClosedCaptionsChanged ( android.media.tv.TvTrackInfo track , int trackIndex ) { mClosedCaptionsLanguage = ( track == null ) ? null : ( track.getLanguage ( ) ) != null ? track.getLanguage ( ) : mContext.getString ( R.string.closed_caption_unknown_language , ( trackIndex + 1 ) ) ; notifyOptionChanged ( com.android.tv.TvOptionsManager.OPTION_CLOSED_CAPTIONS ) ; }
Source:
private void filterSelectionChanged ( ) { int idx = getSelectedSavedFilterIndex ( ) ; if ( idx == ( - 1 ) ) { idx = 0 ; mFiltersTableViewer.getTable ( ) . setSelection ( idx ) ; } mCurrentSelectedFilterIndex = idx ; resetUnreadCountForSelectedFilter ( ) ; updateFiltersToolBar ( ) ; updateAppliedFilters ( ) ; }

Target:
private void reloadLogBuffer ( ) { mTable.removeAll ( ) ; synchronized ( mLogBuffer ) { mLogBuffer.clear ( ) ; mDeletedLogCount = 0 ; } if ( ( mReceiver ) == null ) { return ; } java.util.List < com.android.ddmuilib.logcat.LogCatMessage > addedMessages = mReceiver.getMessages ( ) . getAllMessages ( ) ; java.util.List < com.android.ddmuilib.logcat.LogCatMessage > deletedMessages = java.util.Collections.emptyList ( ) ; bufferChanged ( addedMessages , deletedMessages ) ; }
Source:
protected DateFormat.Field patternCharToDateFormatField ( char ch ) { int patternCharIndex = - 1 ; if ( ( 'A' <= ch ) && ( ch <= 'z' ) ) { patternCharIndex = com.ibm.icu.text.SimpleDateFormat.PATTERN_CHAR_TO_INDEX [ ( ( ( int ) ( ch ) ) - ( com.ibm.icu.text.SimpleDateFormat.PATTERN_CHAR_BASE ) ) ] ; } if ( patternCharIndex != ( - 1 ) ) { return com.ibm.icu.text.SimpleDateFormat.PATTERN_INDEX_TO_DATE_FORMAT_ATTRIBUTE [ patternCharIndex ] ; } return null ; }

Target:
protected DateFormat.Field patternCharToDateFormatField ( char ch ) { int patternCharIndex = com.ibm.icu.text.SimpleDateFormat.getIndexFromChar ( ch ) ; if ( patternCharIndex != ( - 1 ) ) { return com.ibm.icu.text.SimpleDateFormat.PATTERN_INDEX_TO_DATE_FORMAT_ATTRIBUTE [ patternCharIndex ] ; } return null ; }
Source:
public void setChannelIdPrivateKey ( java.security.PrivateKey privateKey ) { if ( ! ( getUseClientMode ( ) ) ) { throw new java.lang.IllegalStateException ( "Server mode" ) ; } synchronized ( stateLock ) { if ( ( state ) != ( org.conscrypt.OpenSSLSocketImpl.STATE_NEW ) ) { throw new java.lang.IllegalStateException ( ( "Could not change Channel ID private key after the initial handshake has" + " begun." ) ) ; } } if ( privateKey == null ) { sslParameters.channelIdEnabled = false ; sslParameters.channelIdPrivateKey = null ; } else { sslParameters.channelIdEnabled = true ; try { sslParameters.channelIdPrivateKey = org.conscrypt.OpenSSLKey.fromPrivateKey ( privateKey ) ; } catch ( java.security.InvalidKeyException e ) { } } }

Target:
public void setChannelIdPrivateKey ( java.security.PrivateKey privateKey ) { if ( ! ( getUseClientMode ( ) ) ) { throw new java.lang.IllegalStateException ( "Server mode" ) ; } synchronized ( stateLock ) { if ( ( state ) != ( org.conscrypt.OpenSSLSocketImpl.STATE_NEW ) ) { throw new java.lang.IllegalStateException ( ( "Could not change Channel ID private key after the initial handshake has" + " begun." ) ) ; } } if ( privateKey == null ) { sslParameters.channelIdEnabled = false ; channelIdPrivateKey = null ; } else { sslParameters.channelIdEnabled = true ; try { channelIdPrivateKey = org.conscrypt.OpenSSLKey.fromPrivateKey ( privateKey ) ; } catch ( java.security.InvalidKeyException e ) { } } }
Source:
private void pruneUnreachableDef ( com.android.jack.ir.ast.cfg.JPhiBlockElement phi ) { if ( ( phi.getLhs ( ) . getTarget ( ) ) instanceof com.android.jack.ir.ast.JParameter ) { return ; } com.android.sched.transform.TransformRequest tr = new com.android.sched.transform.TransformRequest ( ) ; for ( com.android.jack.ir.ast.JSsaVariableRef rhs : phi.getRhs ( ) ) { if ( ( rhs.getVersion ( ) ) == 0 ) { tr.append ( new com.android.jack.transformations.request.Replace ( rhs , phi.getLhs ( ) . makeRef ( rhs.getSourceInfo ( ) ) ) ) ; } } tr.commit ( ) ; }

Target:
private void pruneUnreachableDef ( com.android.jack.ir.ast.cfg.JPhiBlockElement phi ) { if ( ( phi.getLhs ( ) . getTarget ( ) ) instanceof com.android.jack.ir.ast.JParameter ) { return ; } com.android.sched.transform.TransformRequest tr = new com.android.sched.transform.TransformRequest ( ) ; for ( com.android.jack.ir.ast.JSsaVariableUseRef rhs : phi.getRhs ( ) ) { if ( ( rhs.getVersion ( ) ) == 0 ) { tr.append ( new com.android.jack.transformations.request.Replace ( rhs , phi.getLhs ( ) . makeRef ( rhs.getSourceInfo ( ) ) ) ) ; } } tr.commit ( ) ; }
Source:
public void testFail ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testFail" ) ; fail ( "Expected remote failure" ) ; } catch ( java.lang.AssertionError expected ) { } }

Target:
public void testRevokePropagatedOnUpgradeNewToNewModel ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part1" ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeNewToNewModel_part2" ) ; }
Source:
public static com.google.gct.intellij.endpoints.util.PsiFile addIfMissingFile ( com.google.gct.intellij.endpoints.util.PsiDirectory dir , com.google.gct.intellij.endpoints.util.PsiFile file ) { final com.google.gct.intellij.endpoints.util.PsiFile existingFile = dir.findFile ( file.getName ( ) ) ; if ( existingFile != null ) { return existingFile ; } return ( ( com.google.gct.intellij.endpoints.util.PsiFile ) ( dir.add ( file ) ) ) ; }

Target:
public static com.google.gct.idea.appengine.util.PsiFile addIfMissingFile ( com.google.gct.idea.appengine.util.PsiDirectory dir , com.google.gct.idea.appengine.util.PsiFile file ) { final com.google.gct.idea.appengine.util.PsiFile existingFile = dir.findFile ( file.getName ( ) ) ; if ( existingFile != null ) { return existingFile ; } return ( ( com.google.gct.idea.appengine.util.PsiFile ) ( dir.add ( file ) ) ) ; }
Source:
public boolean isOffloadedFilteringSupported ( ) { if ( ! ( getLeAccess ( ) ) ) return false ; try { return mService.isOffloadedFilteringSupported ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "failed to get isOffloadedFilteringSupported, error: " , e ) ; } return false ; }

Target:
public boolean isOffloadedFilteringSupported ( ) { if ( ! ( getLeAccess ( ) ) ) return false ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.isOffloadedFilteringSupported ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "failed to get isOffloadedFilteringSupported, error: " , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return false ; }
Source:
public void setIsVoipAudioMode ( java.lang.String callId , boolean isVoip ) { com.android.server.telecom.Log.startSession ( "CSW.sIVAM" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setIsVoipAudioMode %s %b" , callId , isVoip ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setIsVoipAudioMode ( isVoip ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void setIsVoipAudioMode ( java.lang.String callId , boolean isVoip ) { android.telecom.Log.startSession ( "CSW.sIVAM" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setIsVoipAudioMode %s %b" , callId , isVoip ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setIsVoipAudioMode ( isVoip ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
private void generateDocument ( java.io.File reportDir , long elapsedTime ) { java.lang.String timestamp = getTimestamp ( ) ; java.io.OutputStream stream = null ; try { stream = createOutputResultStream ( reportDir ) ; org.kxml2.io.KXmlSerializer serializer = new org.kxml2.io.KXmlSerializer ( ) ; serializer.setOutput ( stream , SdkConstants.UTF_8 ) ; serializer.startDocument ( SdkConstants.UTF_8 , null ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; printTestResults ( serializer , timestamp , elapsedTime ) ; serializer.endDocument ( ) ; java.lang.String msg = java.lang.String.format ( ( "XML test result file generated at %s. Total tests %d, " + "Failed %d, Error %d" ) , getAbsoluteReportPath ( ) , mRunResult.getNumTests ( ) , mRunResult.getNumFailedTests ( ) , mRunResult.getNumErrorTests ( ) ) ; com.android.ddmlib.Log.logAndDisplay ( LogLevel.INFO , com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , msg ) ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , "Failed to generate report data" ) ; } finally { if ( stream != null ) { try { stream.close ( ) ; } catch ( java.io.IOException ignored ) { } } } }

Target:
public void testRunStopped ( long elapsedTime ) { mRunResult.testRunStopped ( elapsedTime ) ; }
Source:
public void doUpdateVisitedHistory ( java.lang.String url , boolean isReload ) { org.chromium.content.common.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( ( ( "doUpdateVisitedHistory=" + url ) + " reload=" ) + isReload ) ) ; mWebViewClient.doUpdateVisitedHistory ( mWebView , url , isReload ) ; org.chromium.content.common.TraceEvent.end ( ) ; }

Target:
public void doUpdateVisitedHistory ( java.lang.String url , boolean isReload ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( ( ( "doUpdateVisitedHistory=" + url ) + " reload=" ) + isReload ) ) ; mWebViewClient.doUpdateVisitedHistory ( mWebView , url , isReload ) ; org.chromium.base.TraceEvent.end ( ) ; }
Source:
public void testIsEntryStored ( ) throws java.io.IOException { java.lang.String fileName = jarFile.getCanonicalPath ( ) ; libcore.io.ClassPathURLStreamHandler streamHandler = new libcore.io.ClassPathURLStreamHandler ( fileName ) ; assertFalse ( streamHandler.isEntryStored ( "this/file/does/not/exist.txt" ) ) ; assertFalse ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.ENTRY_IN_SUBDIR ) ) ; assertTrue ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.ENTRY_STORED ) ) ; assertFalse ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.DIR_ENTRY_WITHOUT_SLASH ) ) ; assertTrue ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.DIR_ENTRY_WITH_SLASH ) ) ; }

Target:
public void testIsEntryStored ( ) throws java.io.IOException { java.lang.String fileName = jarFile.getPath ( ) ; libcore.io.ClassPathURLStreamHandler streamHandler = new libcore.io.ClassPathURLStreamHandler ( fileName ) ; assertFalse ( streamHandler.isEntryStored ( "this/file/does/not/exist.txt" ) ) ; assertFalse ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.ENTRY_IN_SUBDIR ) ) ; assertTrue ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.ENTRY_STORED ) ) ; assertFalse ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.DIR_ENTRY_WITHOUT_SLASH ) ) ; assertTrue ( streamHandler.isEntryStored ( libcore.io.ClassPathURLStreamHandlerTest.DIR_ENTRY_WITH_SLASH ) ) ; }
Source:
public final synchronized boolean enqueueInternal ( ) { if ( ( this ) instanceof sun.misc.Cleaner ) { sun.misc.Cleaner cl = ( ( sun.misc.Cleaner ) ( this ) ) ; cl.clean ( ) ; return true ; } if ( ( ( queue ) != null ) && ( ( queueNext ) == null ) ) { queue.enqueue ( this ) ; queue = null ; return true ; } return false ; }

Target:
public boolean isEnqueued ( ) { return ( ( queue ) != null ) && ( queue.isEnqueued ( this ) ) ; }
Source:
public boolean matches ( @ com.android.annotations.NonNull java.lang.String name ) { int length = name.length ( ) ; char [ ] chars = mBinding.readableName ( ) ; if ( ( chars.length ) != length ) { return false ; } for ( int i = 0 ; i < length ; i ++ ) { if ( ( chars [ i ] ) != ( name.charAt ( i ) ) ) { return false ; } } return true ; }

Target:
public boolean matches ( @ com.android.annotations.NonNull java.lang.String name ) { return com.android.tools.lint.EcjParser.sameChars ( name , mBinding.readableName ( ) ) ; }
Source:
protected void appendHandle ( final org.objectweb.asm.Handle h ) { buf.append ( '\n' ) . append ( tab3 ) ; int tag = h.getTag ( ) ; buf.append ( "// handle kind 0x" ) . append ( java.lang.Integer.toHexString ( tag ) ) . append ( " : " ) ; switch ( tag ) { case org.objectweb.asm.Opcodes.H_GETFIELD : buf.append ( "GETFIELD" ) ; break ; case org.objectweb.asm.Opcodes.H_GETSTATIC : buf.append ( "GETSTATIC" ) ; break ; case org.objectweb.asm.Opcodes.H_PUTFIELD : buf.append ( "PUTFIELD" ) ; break ; case org.objectweb.asm.Opcodes.H_PUTSTATIC : buf.append ( "PUTSTATIC" ) ; break ; case org.objectweb.asm.Opcodes.H_INVOKEINTERFACE : buf.append ( "INVOKEINTERFACE" ) ; break ; case org.objectweb.asm.Opcodes.H_INVOKESPECIAL : buf.append ( "INVOKESPECIAL" ) ; break ; case org.objectweb.asm.Opcodes.H_INVOKESTATIC : buf.append ( "INVOKESTATIC" ) ; break ; case org.objectweb.asm.Opcodes.H_INVOKEVIRTUAL : buf.append ( "INVOKEVIRTUAL" ) ; break ; case org.objectweb.asm.Opcodes.H_NEWINVOKESPECIAL : buf.append ( "NEWINVOKESPECIAL" ) ; break ; } buf.append ( '\n' ) ; buf.append ( tab3 ) ; appendDescriptor ( org.objectweb.asm.util.Textifier.INTERNAL_NAME , h.getOwner ( ) ) ; buf.append ( '.' ) ; buf.append ( h.getName ( ) ) ; buf.append ( '(' ) ; appendDescriptor ( org.objectweb.asm.util.Textifier.HANDLE_DESCRIPTOR , h.getDesc ( ) ) ; buf.append ( ')' ) . append ( '\n' ) ; }

Target:
public org.objectweb.asm.util.Printer visitTryCatchAnnotation ( int typeRef , org.objectweb.asm.TypePath typePath , java.lang.String desc , boolean visible ) { buf.setLength ( 0 ) ; buf.append ( tab2 ) . append ( "TRYCATCHBLOCK @" ) ; appendDescriptor ( org.objectweb.asm.util.Textifier.FIELD_DESCRIPTOR , desc ) ; buf.append ( '(' ) ; text.add ( buf.toString ( ) ) ; org.objectweb.asm.util.Textifier t = createTextifier ( ) ; text.add ( t.getText ( ) ) ; buf.setLength ( 0 ) ; buf.append ( ") : " ) ; appendTypeReference ( typeRef ) ; buf.append ( ", " ) . append ( typePath ) ; buf.append ( ( visible ? "\n" : " // invisible\n" ) ) ; text.add ( buf.toString ( ) ) ; return t ; }
Source:
public int getMinSdk ( ) { com.android.builder.model.ApiVersion minSdk = mProject.getDefaultConfig ( ) . getProductFlavor ( ) . getMinSdkVersion ( ) ; if ( minSdk != null ) { return minSdk.getApiLevel ( ) ; } return mMinSdk ; }

Target:
public com.android.sdklib.AndroidVersion getMinSdkVersion ( ) { if ( ( mMinSdkVersion ) == null ) { com.android.builder.model.ProductFlavor flavor = mProject.getDefaultConfig ( ) . getProductFlavor ( ) ; com.android.builder.model.ApiVersion minSdk = flavor.getMinSdkVersion ( ) ; if ( minSdk != null ) { mMinSdkVersion = com.android.tools.lint.detector.api.LintUtils.convertVersion ( minSdk , mClient.getTargets ( ) ) ; } else { mMinSdkVersion = super . getMinSdkVersion ( ) ; } } return mMinSdkVersion ; }
Source:
private static boolean isIncrementalCompilation ( @ javax.annotation.Nonnull com.android.jack.Options options , @ javax.annotation.Nonnull java.io.File typeDependencies , @ javax.annotation.Nonnull java.io.File fileDependencies ) { if ( ( ( ! ( options.getEcjArguments ( ) . isEmpty ( ) ) ) && ( typeDependencies.exists ( ) ) ) && ( fileDependencies.exists ( ) ) ) { return true ; } return false ; }

Target:
private static void deleteFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath vpath ) throws com.android.jack.experimental.incremental.IncrementalException { try { assert ( com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary ) != null ; com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary.getFile ( fileType , vpath ) ; com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary.delete ( fileType , vpath ) ; } catch ( com.android.jack.library.FileTypeDoesNotExistException e ) { } catch ( com.android.sched.util.file.CannotDeleteFileException e ) { throw new com.android.jack.experimental.incremental.IncrementalException ( e ) ; } }
Source:
public void testGetDeviceId ( ) { java.lang.String deviceId = mTelephonyManager.getDeviceId ( ) ; int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : android.telephony.cts.TelephonyManagerTest.assertImeiDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : android.telephony.cts.TelephonyManagerTest.assertCdmaDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : assertNull ( deviceId ) ; assertSerialNumber ( ) ; assertMacAddressReported ( ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }

Target:
public void testGetDeviceId ( ) { java.lang.String deviceId = mTelephonyManager.getDeviceId ( ) ; int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : android.telephony.cts.TelephonyManagerTest.assertGsmDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : android.telephony.cts.TelephonyManagerTest.assertCdmaDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : assertNull ( deviceId ) ; assertSerialNumber ( ) ; assertMacAddressReported ( ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }
Source:
public void run ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.InterruptedException , java.lang.reflect.InvocationTargetException { com.android.ddmlib.SyncService.SyncResult result = sync.pullFile ( remote , local , new com.android.ddmuilib.SyncProgressMonitor ( monitor , java.lang.String.format ( "Pulling %1$s from the device" , remote.getName ( ) ) ) ) ; if ( ( result.getCode ( ) ) != ( com.android.ddmlib.SyncService.RESULT_OK ) ) { com.android.ddmuilib.console.DdmConsole.printErrorToConsole ( java.lang.String.format ( "Failed to pull %1$s: %2$s" , remote , result.getMessage ( ) ) ) ; } sync.close ( ) ; }

Target:
public void run ( com.android.ddmlib.SyncService.ISyncProgressMonitor monitor ) throws com.android.ddmlib.SyncException , com.android.ddmlib.TimeoutException , java.io.IOException { sync.pullFile ( remote , local , monitor ) ; }
Source:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method , int parameterIndex , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.MethodInfo m = findMethod ( method ) ; if ( m == null ) { return null ; } if ( ( m.parameterAnnotations ) != null ) { java.util.Collection < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = m.parameterAnnotations.get ( parameterIndex ) ; if ( annotations != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } } return null ; }

Target:
public java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > getAnnotations ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method ) { com.android.tools.lint.ExternalAnnotationRepository.MethodInfo m = findMethod ( method ) ; if ( m == null ) { return null ; } return m.getAnnotations ( ) ; }
Source:
private void blockReportNumberAndFinish ( java.lang.String number , boolean reportAsSpam , com.android.dialer.logging.ContactLookupResult.Type contactLookupResultType ) { if ( reportAsSpam ) { logCallImpression ( DialerImpression.Type.SPAM_AFTER_CALL_NOTIFICATION_MARKED_NUMBER_AS_SPAM ) ; com.android.dialer.spam.Spam.get ( this ) . reportSpamFromAfterCallNotification ( number , getCountryIso ( ) , CallLog.Calls.INCOMING_TYPE , ReportingLocation.Type.FEEDBACK_PROMPT , contactLookupResultType ) ; } logCallImpression ( DialerImpression.Type.SPAM_AFTER_CALL_NOTIFICATION_BLOCK_NUMBER ) ; filteredNumberAsyncQueryHandler.blockNumber ( null , number , getCountryIso ( ) ) ; finish ( ) ; }

Target:
private void blockReportNumberAndFinish ( java.lang.String number , boolean reportAsSpam , com.android.dialer.logging.ContactLookupResult.Type contactLookupResultType ) { if ( reportAsSpam ) { logCallImpression ( DialerImpression.Type.SPAM_AFTER_CALL_NOTIFICATION_MARKED_NUMBER_AS_SPAM ) ; com.android.dialer.spam.SpamComponent.get ( this ) . spam ( ) . reportSpamFromAfterCallNotification ( number , getCountryIso ( ) , CallLog.Calls.INCOMING_TYPE , ReportingLocation.Type.FEEDBACK_PROMPT , contactLookupResultType ) ; } logCallImpression ( DialerImpression.Type.SPAM_AFTER_CALL_NOTIFICATION_BLOCK_NUMBER ) ; filteredNumberAsyncQueryHandler.blockNumber ( null , number , getCountryIso ( ) ) ; finish ( ) ; }
Source:
private com.android.jill.frontend.java.Variable getVariableWithLocalIndex ( @ javax.annotation.Nonnegative int localIdx , @ javax.annotation.Nonnull java.lang.String id , @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull org.objectweb.asm.Type type , @ javax.annotation.CheckForNull java.lang.String signature ) { com.android.jill.frontend.java.Variable var = nameToVar.get ( id ) ; if ( var == null ) { var = new com.android.jill.frontend.java.Variable ( id , name , type , signature , localIdx , ( ( getLocalVariableNode ( localIdx ) ) == null ) ) ; nameToVar.put ( id , var ) ; } return var ; }

Target:
private com.android.jill.frontend.java.Variable getLocalVariable ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , @ javax.annotation.Nonnegative int localIdx ) { org.objectweb.asm.tree.analysis.BasicValue bv = frame.getLocal ( localIdx ) ; assert bv != ( org.objectweb.asm.tree.analysis.BasicValue.UNINITIALIZED_VALUE ) ; com.android.jill.frontend.java.Variable v ; java.lang.String id = getUnnamedLocalId ( localIdx , bv.getType ( ) ) ; java.lang.String localName = id ; org.objectweb.asm.Type localType = typeToUntyped ( bv.getType ( ) ) ; v = getVariableWithLocalIndex ( localIdx , id , localName , localType , null , com.android.jill.frontend.java.MethodBodyWriter.NO_MODIFIER ) ; return v ; }
Source:
public static boolean isManifestClassAttribute ( @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String name = attribute.getLocalName ( ) ; if ( name == null ) { return false ; } if ( ( ( ( ( name.equals ( com.android.SdkConstants.ATTR_NAME ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_TARGET_ACTIVITY ) ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_MANAGE_SPACE_ACTIVITY ) ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_BACKUP_AGENT ) ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_PARENT_ACTIVITY_NAME ) ) ) { return com.android.SdkConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ; } return false ; }

Target:
public static boolean isManifestClassAttribute ( @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { return com.android.ide.eclipse.adt.internal.refactorings.core.RefactoringUtil.isManifestClassAttribute ( attribute.getOwnerElement ( ) . getTagName ( ) , attribute.getNamespaceURI ( ) , attribute.getLocalName ( ) ) ; }
Source:
public void onCreateActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { mPriorityGuidedAction = new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.SeriesSettingsFragment.ACTION_ID_PRIORITY ) . title ( mProrityActionTitle ) . build ( ) ; updatePriorityGuidedAction ( false ) ; actions.add ( mPriorityGuidedAction ) ; mChannelsGuidedAction = new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.SeriesSettingsFragment.ACTION_ID_CHANNEL ) . title ( mChannelsActionTitle ) . subActions ( buildChannelSubAction ( ) ) . build ( ) ; actions.add ( mChannelsGuidedAction ) ; updateChannelsGuidedAction ( false ) ; }

Target:
public void onCreateButtonActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . clickAction ( GuidedAction.ACTION_ID_OK ) . build ( ) ) ; actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . clickAction ( GuidedAction.ACTION_ID_CANCEL ) . build ( ) ) ; }
Source:
private int deleteCodeCacheDirsLI ( java.lang.String volumeUuid , java.lang.String packageName ) { int [ ] users = com.android.server.pm.PackageManagerService.sUserManager.getUserIds ( ) ; int res = 0 ; for ( int user : users ) { int resInner = mInstaller.deleteCodeCacheFiles ( volumeUuid , packageName , user ) ; if ( resInner < 0 ) { res = resInner ; } } return res ; }

Target:
private void destroyAppProfilesLeafLIF ( android.content.pm.PackageParser.Package pkg ) { try { mInstaller.destroyAppProfiles ( pkg.packageName ) ; } catch ( com.android.internal.os.InstallerConnection.InstallerException e ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , java.lang.String.valueOf ( e ) ) ; } }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.SuperReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { assert getTypeMap ( ) . get ( x.resolvedType ) . equals ( curClass.classType.getSuperClass ( ) ) ; push ( makeThisRef ( makeSourceInfo ( x ) ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.SuperReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.ast.JClass superClass ; assert ( ( superClass = curClass.classType.getSuperClass ( ) ) == null ) || ( getTypeMap ( ) . get ( x.resolvedType ) . isSameType ( superClass ) ) ; push ( makeThisRef ( makeSourceInfo ( x ) ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }
Source:
private void verifyNoNetwork ( ) { waitForIdle ( ) ; assertNull ( mCm.getActiveNetworkInfo ( ) ) ; assertNull ( mCm.getActiveNetwork ( ) ) ; assertNull ( mCm.getActiveNetworkForUid ( java.lang.Process.myUid ( ) ) ) ; com.android.server.ConnectivityServiceTest.assertEmpty ( mCm.getAllNetworks ( ) ) ; }

Target:
private void verifyNoNetwork ( ) { waitForIdle ( ) ; org.junit.Assert.assertNull ( mCm.getActiveNetworkInfo ( ) ) ; org.junit.Assert.assertNull ( mCm.getActiveNetwork ( ) ) ; org.junit.Assert.assertNull ( mCm.getActiveNetworkForUid ( java.lang.Process.myUid ( ) ) ) ; com.android.server.ConnectivityServiceTest.assertEmpty ( mCm.getAllNetworks ( ) ) ; }
Source:
private com.android.server.telecom.Call reuseOutgoingCall ( android.net.Uri handle ) { com.android.server.telecom.Call reusedCall = null ; for ( com.android.server.telecom.Call pendingCall : mPendingCallsToDisconnect ) { if ( ( reusedCall == null ) && ( areHandlesEqual ( pendingCall.getHandle ( ) , handle ) ) ) { mPendingCallsToDisconnect.remove ( pendingCall ) ; com.android.server.telecom.Log.i ( this , "Reusing disconnected call %s" , pendingCall ) ; reusedCall = pendingCall ; } else { com.android.server.telecom.Log.i ( this , "Not reusing disconnected call %s" , pendingCall ) ; pendingCall.disconnect ( ) ; } } return reusedCall ; }

Target:
private com.android.server.telecom.Call reuseOutgoingCall ( android.net.Uri handle ) { com.android.server.telecom.Call reusedCall = null ; for ( com.android.server.telecom.Call pendingCall : mPendingCallsToDisconnect ) { if ( ( reusedCall == null ) && ( areHandlesEqual ( pendingCall.getHandle ( ) , handle ) ) ) { mPendingCallsToDisconnect.remove ( pendingCall ) ; android.telecom.Log.i ( this , "Reusing disconnected call %s" , pendingCall ) ; reusedCall = pendingCall ; } else { android.telecom.Log.i ( this , "Not reusing disconnected call %s" , pendingCall ) ; pendingCall.disconnect ( ) ; } } return reusedCall ; }
Source:
private void handleWakeLock ( ) { com.android.server.telecom.Call ringingCall = mCallsManager.getRingingCall ( ) ; if ( ringingCall != null ) { mTelecomWakeLock.acquire ( ) ; com.android.server.telecom.Log.i ( this , "Acquiring full wake lock" ) ; } else { mTelecomWakeLock.release ( 0 ) ; com.android.server.telecom.Log.i ( this , "Releasing full wake lock" ) ; } }

Target:
private void handleWakeLock ( ) { com.android.server.telecom.Call ringingCall = mCallsManager.getRingingCall ( ) ; if ( ringingCall != null ) { mTelecomWakeLock.acquire ( ) ; android.telecom.Log.i ( this , "Acquiring full wake lock" ) ; } else { mTelecomWakeLock.release ( 0 ) ; android.telecom.Log.i ( this , "Releasing full wake lock" ) ; } }
Source:
public static byte [ ] serializeECPoint ( short [ ] ecPointFormats , org.bouncycastle.math.ec.ECPoint point ) throws java.io.IOException { org.bouncycastle.math.ec.ECCurve curve = point.getCurve ( ) ; boolean compressed = false ; if ( curve instanceof org.bouncycastle.math.ec.ECCurve.F2m ) { compressed = org.bouncycastle.crypto.tls.TlsECCUtils.isCompressionPreferred ( ecPointFormats , ECPointFormat.ansiX962_compressed_char2 ) ; } else if ( curve instanceof org.bouncycastle.math.ec.ECCurve.Fp ) { compressed = org.bouncycastle.crypto.tls.TlsECCUtils.isCompressionPreferred ( ecPointFormats , ECPointFormat.ansiX962_compressed_prime ) ; } return point.getEncoded ( compressed ) ; }

Target:
public static byte [ ] serializeECPoint ( short [ ] ecPointFormats , org.bouncycastle.math.ec.ECPoint point ) throws java.io.IOException { org.bouncycastle.math.ec.ECCurve curve = point.getCurve ( ) ; boolean compressed = false ; if ( org.bouncycastle.math.ec.ECAlgorithms.isFpCurve ( curve ) ) { compressed = org.bouncycastle.crypto.tls.TlsECCUtils.isCompressionPreferred ( ecPointFormats , ECPointFormat.ansiX962_compressed_prime ) ; } else if ( org.bouncycastle.math.ec.ECAlgorithms.isF2mCurve ( curve ) ) { compressed = org.bouncycastle.crypto.tls.TlsECCUtils.isCompressionPreferred ( ecPointFormats , ECPointFormat.ansiX962_compressed_char2 ) ; } return point.getEncoded ( compressed ) ; }
Source:
public android.net.IpSecTransform buildTunnelModeTransform ( java.net.InetAddress localAddress , java.net.InetAddress remoteAddress ) { mConfig.setLocalAddress ( localAddress.getHostAddress ( ) ) ; mConfig.setRemoteAddress ( remoteAddress.getHostAddress ( ) ) ; mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }

Target:
public android.net.IpSecTransform buildTunnelModeTransform ( @ android.annotation.NonNull java.net.InetAddress sourceAddress , @ android.annotation.NonNull android.net.IpSecManager.SecurityParameterIndex spi ) throws IpSecManager.ResourceUnavailableException , IpSecManager.SpiUnavailableException , java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( sourceAddress ) ; com.android.internal.util.Preconditions.checkNotNull ( spi ) ; if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; mConfig.setSourceAddress ( sourceAddress.getHostAddress ( ) ) ; mConfig.setSpiResourceId ( spi.getResourceId ( ) ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }
Source:
public java.util.Collection < java.util.List < ? > > valueOfSubjectAlternativeName ( ) throws java.io.IOException { org.apache.harmony.security.x509.Extension extension = getExtensionByOID ( "2.5.29.17" ) ; if ( extension == null ) { return null ; } java.util.Collection < java.util.List < ? > > collection = ( ( org.apache.harmony.security.x509.GeneralNames ) ( GeneralNames.ASN1.decode ( extension.getExtnValue ( ) ) ) ) . getPairsList ( ) ; if ( ( collection.size ( ) ) == 0 ) { return null ; } return collection ; }

Target:
private static java.util.Collection < java.util.List < ? > > decodeGeneralNames ( org.apache.harmony.security.x509.Extension extension ) throws java.io.IOException { if ( extension == null ) { return null ; } java.util.Collection < java.util.List < ? > > collection = ( ( org.apache.harmony.security.x509.GeneralNames ) ( GeneralNames.ASN1.decode ( extension.getExtnValue ( ) ) ) ) . getPairsList ( ) ; if ( ( collection.size ( ) ) == 0 ) { return null ; } return java.util.Collections.unmodifiableCollection ( collection ) ; }
Source:
private void activate ( ) { java.io.File binDir = new java.io.File ( mVenvDir , ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.isOnWindows ( ) ? "Scripts" : "bin" ) ) ; mRunUtil.setWorkingDir ( binDir ) ; java.lang.String path = java.lang.System.getenv ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH ) ; mRunUtil.setEnvVariable ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH , ( ( binDir + ( java.io.File.pathSeparator ) ) + path ) ) ; java.io.File pipFile = new java.io.File ( binDir , com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PIP ) ; pipFile.setExecutable ( true ) ; mPip = pipFile.getAbsolutePath ( ) ; }

Target:
private void activate ( ) { java.io.File binDir = new java.io.File ( mVenvDir , "bin" ) ; mRunUtil.setWorkingDir ( binDir ) ; java.lang.String path = java.lang.System.getenv ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH ) ; mRunUtil.setEnvVariable ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH , ( ( binDir + ":" ) + path ) ) ; java.io.File pipFile = new java.io.File ( binDir , com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PIP ) ; pipFile.setExecutable ( true ) ; mPip = pipFile.getAbsolutePath ( ) ; }
Source:
void startRunningVoiceLocked ( android.service.voice.IVoiceInteractionSession session , int targetUid ) { mVoiceWakeLock.setWorkSource ( new android.os.WorkSource ( targetUid ) ) ; if ( ( ( mRunningVoice ) == null ) || ( ( mRunningVoice.asBinder ( ) ) != ( session.asBinder ( ) ) ) ) { boolean wasRunningVoice = ( mRunningVoice ) != null ; mRunningVoice = session ; if ( ! wasRunningVoice ) { mVoiceWakeLock.acquire ( ) ; updateSleepIfNeededLocked ( ) ; } } }

Target:
void startRunningVoiceLocked ( android.service.voice.IVoiceInteractionSession session , int targetUid ) { android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG , "<<< startRunningVoiceLocked()" ) ; mVoiceWakeLock.setWorkSource ( new android.os.WorkSource ( targetUid ) ) ; if ( ( ( mRunningVoice ) == null ) || ( ( mRunningVoice.asBinder ( ) ) != ( session.asBinder ( ) ) ) ) { boolean wasRunningVoice = ( mRunningVoice ) != null ; mRunningVoice = session ; if ( ! wasRunningVoice ) { mVoiceWakeLock.acquire ( ) ; updateSleepIfNeededLocked ( ) ; } } }
Source:
public com.android.internal.telephony.gsm.DataActivityState getDataActivityState ( ) { com.android.internal.telephony.gsm.DataActivityState ret = DataActivityState.NONE ; if ( ( mSST.getCurrentGprsState ( ) ) == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) { switch ( mDataConnectionTracker.getActivity ( ) ) { case DATAIN : ret = DataActivityState.DATAIN ; break ; case DATAOUT : ret = DataActivityState.DATAOUT ; break ; case DATAINANDOUT : ret = DataActivityState.DATAINANDOUT ; break ; case DORMANT : ret = DataActivityState.DORMANT ; break ; } } return ret ; }

Target:
public com.android.internal.telephony.gsm.DataActivityState getDataActivityState ( ) { com.android.internal.telephony.gsm.DataActivityState ret = DataActivityState.NONE ; if ( ( mSST.getCurrentDataConnectionState ( ) ) == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) { switch ( mDcTracker.getActivity ( ) ) { case DATAIN : ret = DataActivityState.DATAIN ; break ; case DATAOUT : ret = DataActivityState.DATAOUT ; break ; case DATAINANDOUT : ret = DataActivityState.DATAINANDOUT ; break ; case DORMANT : ret = DataActivityState.DORMANT ; break ; default : ret = DataActivityState.NONE ; break ; } } return ret ; }
Source:
public java.util.Map < java.lang.String , com.android.build.gradle.integration.common.fixture.GradleTestProject.SubProjectData > getMultiModel ( ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { return buildMultiModel ( connection ) ; } finally { connection.close ( ) ; } }

Target:
public com.android.builder.model.AndroidProject getSingleModel ( ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; return modelMap.get ( ":" ) ; } finally { connection.close ( ) ; } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.d ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "received intent: " + intent ) ) ; java.lang.String action = intent.getAction ( ) ; switch ( action ) { case android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED : onHfIndicatorValueChanged ( intent ) ; break ; default : android.util.Log.w ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "unhandled intent: " + intent ) ) ; break ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.d ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "Received intent: " + intent ) ) ; java.lang.String action = intent.getAction ( ) ; switch ( action ) { case android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED : onHfIndicatorValueChanged ( intent ) ; break ; case android.bluetooth.BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT : onVendorSpecificHeadsetEvent ( intent ) ; break ; default : android.util.Log.w ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "Unhandled intent: " + intent ) ) ; break ; } }
Source:
public void setContext ( android.content.Context context ) { super . setContext ( context ) ; mCameraManager = ( ( android.hardware.camera2.CameraManager ) ( context.getSystemService ( Context.CAMERA_SERVICE ) ) ) ; assertNotNull ( "Can't connect to camera manager!" , mCameraManager ) ; }

Target:
public void setContext ( android.content.Context context ) { super . setContext ( context ) ; mCameraManager = ( ( android.hardware.camera2.CameraManager ) ( context.getSystemService ( Context.CAMERA_SERVICE ) ) ) ; assertNotNull ( "Can't connect to camera manager!" , mCameraManager ) ; mWindowManager = ( ( android.view.WindowManager ) ( mContext.getSystemService ( Context.WINDOW_SERVICE ) ) ) ; }
Source:
public boolean setPairingConfirmation ( boolean confirm ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot set pairing confirmation" ) ; return false ; } try { return android.bluetooth.BluetoothDevice.sService.setPairingConfirmation ( this , confirm ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean setPin ( byte [ ] pin ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot set Remote Device pin" ) ; return false ; } try { return service.setPin ( this , true , pin.length , pin ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
private boolean shouldStub ( int access , java.lang.String name , java.lang.String desc ) { return ( com.google.devtools.build.android.desugar.BitFlags.noneSet ( access , ( ( ( ( org.objectweb.asm.Opcodes.ACC_ABSTRACT ) | ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) | ( org.objectweb.asm.Opcodes.ACC_BRIDGE ) ) | ( org.objectweb.asm.Opcodes.ACC_PRIVATE ) ) ) ) && ( ! ( instanceMethods.contains ( ( ( name + ":" ) + desc ) ) ) ) ; }

Target:
private boolean shouldStubAsDefaultMethod ( int access , java.lang.String name , java.lang.String desc ) { return ( com.google.devtools.build.android.desugar.BitFlags.noneSet ( access , ( ( ( ( org.objectweb.asm.Opcodes.ACC_ABSTRACT ) | ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) | ( org.objectweb.asm.Opcodes.ACC_BRIDGE ) ) | ( org.objectweb.asm.Opcodes.ACC_PRIVATE ) ) ) ) && ( ! ( instanceMethods.contains ( ( ( name + ":" ) + desc ) ) ) ) ; }
Source:
synchronized void nAllocationData1D ( long id , int off , int mip , int count , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData1D ( mContext , id , off , mip , count , d , sizeBytes ) ; }

Target:
synchronized void nAllocationRead1D ( long id , int off , int mip , int count , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationRead1D ( mContext , id , off , mip , count , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public static com.android.internal.telephony.gsm.SmsMessage newFromCMT ( java.lang.String [ ] lines ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( com.android.internal.telephony.uicc.IccUtils.hexStringToBytes ( lines [ 1 ] ) ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "SMS PDU parsing failed: " , ex ) ; return null ; } }

Target:
public static com.android.internal.telephony.gsm.SmsMessage newFromCMT ( byte [ ] pdu ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( pdu ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "SMS PDU parsing failed: " , ex ) ; return null ; } }
Source:
public void binderDied ( ) { if ( com.android.server.wifi.nan.WifiNanServiceImpl.DBG ) android.util.Log.d ( com.android.server.wifi.nan.WifiNanServiceImpl.TAG , ( "binderDied: clientId=" + clientId ) ) ; binder.unlinkToDeath ( this , 0 ) ; synchronized ( mLock ) { mDeathRecipientsByClientId.delete ( clientId ) ; mUidByClientId.delete ( clientId ) ; } mStateManager.disconnect ( clientId ) ; }

Target:
public void binderDied ( ) { if ( com.android.server.wifi.aware.WifiAwareServiceImpl.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareServiceImpl.TAG , ( "binderDied: clientId=" + clientId ) ) ; binder.unlinkToDeath ( this , 0 ) ; synchronized ( mLock ) { mDeathRecipientsByClientId.delete ( clientId ) ; mUidByClientId.delete ( clientId ) ; } mStateManager.disconnect ( clientId ) ; }
Source:
public void run ( ) { for ( com.android.ide.common.api.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.common.api.MenuAction.Action ) { com.android.ide.common.api.IMenuCallback c = ( ( com.android.ide.common.api.MenuAction.Action ) ( a2 ) ) . getCallback ( ) ; if ( c != null ) { try { c.action ( a2 , null , null ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine gre = mCanvas.getRulesEngine ( ) ; gre.logError ( "XML edit operation failed: %s" , e.toString ( ) ) ; } } } } }

Target:
public void run ( ) { for ( com.android.ide.common.api.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.common.api.MenuAction.Action ) { com.android.ide.common.api.IMenuCallback c = ( ( com.android.ide.common.api.MenuAction.Action ) ( a2 ) ) . getCallback ( ) ; if ( c != null ) { try { c.action ( a2 , null , null ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "XML edit operation failed: %s" , e.toString ( ) ) ; } } } } }
Source:
public void copyFromUnchecked ( byte [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } }

Target:
public void copyFromUnchecked ( byte [ ] d ) { copyFromUnchecked ( d , Element.DataType.SIGNED_8 , d.length ) ; }