auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onCreate ( ) { super . onCreate ( ) ; android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , "onCreate" ) ; mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; mTelecomManager = ( ( android.telecom.TelecomManager ) ( getSystemService ( Context.TELECOM_SERVICE ) ) ) ; mAdapter.getProfileProxy ( this , mServiceListener , BluetoothProfile.HEADSET_CLIENT ) ; }

Target:
public void onCreate ( ) { super . onCreate ( ) ; if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , "onCreate" ) ; } mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; mTelecomManager = ( ( android.telecom.TelecomManager ) ( getSystemService ( Context.TELECOM_SERVICE ) ) ) ; mAdapter.getProfileProxy ( this , mServiceListener , BluetoothProfile.HEADSET_CLIENT ) ; }
Source:
synchronized void nScriptSetVarObj ( long id , int slot , long val ) { validate ( ) ; rsnScriptSetVarObj ( mContext , id , slot , val ) ; }

Target:
synchronized long nIncTypeCreate ( long eid , int x , int y , int z , boolean mips , boolean faces , int yuv ) { validate ( ) ; return rsnIncTypeCreate ( mIncCon , eid , x , y , z , mips , faces , yuv ) ; }
Source:
private void checkFormatCall ( com.android.tools.lint.detector.api.JavaContext context , lombok.ast.MethodInvocation node ) { org.w3c.dom.Node current = node.getParent ( ) ; while ( ( ( current != null ) && ( ! ( current instanceof lombok.ast.MethodDeclaration ) ) ) && ( ! ( current instanceof lombok.ast.ConstructorDeclaration ) ) ) { current = current.getParent ( ) ; } if ( current != null ) { checkStringFormatCall ( context , current , node ) ; } }

Target:
private void checkFormatCall ( com.android.tools.lint.detector.api.JavaContext context , lombok.ast.MethodInvocation node ) { org.w3c.dom.Node current = com.android.tools.lint.checks.StringFormatDetector.getParentMethod ( node ) ; if ( current != null ) { checkStringFormatCall ( context , current , node ) ; } }
Source:
public android.webkit.WebBackForwardList restoreState ( final android.os.Bundle inState ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return restoreState ( inState ) ; } } ) ; return ret ; } if ( inState == null ) return null ; if ( ! ( mAwContents.restoreState ( inState ) ) ) return null ; return copyBackForwardList ( ) ; }

Target:
public android.webkit.WebBackForwardList saveState ( final android.os.Bundle outState ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return saveState ( outState ) ; } } ) ; return ret ; } if ( outState == null ) return null ; if ( ! ( mAwContents.saveState ( outState ) ) ) return null ; return copyBackForwardList ( ) ; }
Source:
final void get ( double [ ] dst , int dstOffset , int doubleCount ) { int byteCount = checkGetBounds ( SizeOf.DOUBLE , dst.length , dstOffset , doubleCount ) ; this . block.peekDoubleArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( char [ ] src , int srcOffset , int charCount ) { int byteCount = checkPutBounds ( SizeOf.CHAR , src.length , srcOffset , charCount ) ; this . block.pokeCharArray ( ( ( offset ) + ( position ) ) , src , srcOffset , charCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { org.eclipse.jface.viewers.IStructuredSelection selection = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( mFullTableViewer.getSelection ( ) ) ) ; java.lang.Object first = selection.getFirstElement ( ) ; if ( first instanceof com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier ) { com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier ) ( first ) ) ; mBaseConfiguration.removeQualifier ( qualifier ) ; mSelectedConfiguration.addQualifier ( qualifier ) ; mFullTableViewer.refresh ( ) ; mSelectionTableViewer.refresh ( ) ; mSelectionTableViewer.setSelection ( new org.eclipse.jface.viewers.StructuredSelection ( qualifier ) , true ) ; onChange ( false ) ; } }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { org.eclipse.jface.viewers.IStructuredSelection selection = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( mFullTableViewer.getSelection ( ) ) ) ; java.lang.Object first = selection.getFirstElement ( ) ; if ( first instanceof com.android.ide.common.resources.configuration.ResourceQualifier ) { com.android.ide.common.resources.configuration.ResourceQualifier qualifier = ( ( com.android.ide.common.resources.configuration.ResourceQualifier ) ( first ) ) ; mBaseConfiguration.removeQualifier ( qualifier ) ; mSelectedConfiguration.addQualifier ( qualifier ) ; mFullTableViewer.refresh ( ) ; mSelectionTableViewer.refresh ( ) ; mSelectionTableViewer.setSelection ( new org.eclipse.jface.viewers.StructuredSelection ( qualifier ) , true ) ; onChange ( false ) ; } }
Source:
public void testSkipAndroidSupportInAospHalf ( ) throws java.lang.Exception { java.lang.String expected ; if ( ( java.lang.System.getenv ( "ANDROID_BUILD_TOP" ) ) != null ) { expected = "No warnings." ; } else { expected = "Foo.class: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMError" ; } assertEquals ( expected , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/ApiCallTest2.java.txt=>src/src/android/support/foo/Foo.java" , "apicheck/ApiCallTest2.class.data=>bin/classes/android/support/foo/Foo.class" ) ) ; }

Target:
public void testSkipAndroidSupportInAospHalf ( ) throws java.lang.Exception { java.lang.String expected ; if ( ( java.lang.System.getenv ( "ANDROID_BUILD_TOP" ) ) != null ) { expected = "No warnings." ; } else { expected = "bin/classes/android/support/foo/Foo.class: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMError [NewApi]\n" + "1 errors, 0 warnings\n" ; } assertEquals ( expected , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/ApiCallTest2.java.txt=>src/src/android/support/foo/Foo.java" , "apicheck/ApiCallTest2.class.data=>bin/classes/android/support/foo/Foo.class" ) ) ; }
Source:
public boolean isLeEnabled ( ) { final int state = getLeState ( ) ; if ( state == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_ON" ) ; } else if ( state == ( android.bluetooth.BluetoothAdapter.STATE_BLE_ON ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_BLE_ON" ) ; } else { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_OFF" ) ; return false ; } return true ; }

Target:
public boolean isLeEnabled ( ) { final int state = getLeState ( ) ; if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , ( "isLeEnabled(): " + ( android.bluetooth.BluetoothAdapter.nameForState ( state ) ) ) ) ; return ( state == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) || ( state == ( android.bluetooth.BluetoothAdapter.STATE_BLE_ON ) ) ; }
Source:
android.view.animation.Animation loadAnimation ( android.view.WindowManager.LayoutParams lp , int animAttr ) { int anim = 0 ; android.content.Context context = mContext ; if ( animAttr >= 0 ) { com.android.server.AttributeCache.Entry ent = getCachedAnimations ( lp ) ; if ( ent != null ) { context = ent.context ; anim = ent.array.getResourceId ( animAttr , 0 ) ; } } if ( anim != 0 ) { return android.view.animation.AnimationUtils.loadAnimation ( context , anim ) ; } return null ; }

Target:
private android.view.animation.Animation loadAnimation ( int userId , java.lang.String packageName , int resId ) { int anim = 0 ; android.content.Context context = mContext ; if ( resId >= 0 ) { com.android.server.AttributeCache.Entry ent = getCachedAnimations ( userId , packageName , resId ) ; if ( ent != null ) { context = ent.context ; anim = resId ; } } if ( anim != 0 ) { return android.view.animation.AnimationUtils.loadAnimation ( context , anim ) ; } return null ; }
Source:
public int removeRights ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _removeRights ( mUniqueId , path ) ; }

Target:
public java.lang.String getOriginalMimeType ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } return _getOriginalMimeType ( mUniqueId , path ) ; }
Source:
public void sendTerminalResponse ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }

Target:
public void sendEnvelope ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }
Source:
private void unregisterForSimRecordEvents ( ) { mIccRecords.unregisterForNetworkSelectionModeAutomatic ( this ) ; mIccRecords.unregisterForNewSms ( this ) ; mIccRecords.unregisterForRecordsEvents ( this ) ; mIccRecords.unregisterForRecordsLoaded ( this ) ; }

Target:
private void unregisterForSimRecordEvents ( ) { com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; if ( r == null ) { return ; } r.unregisterForNetworkSelectionModeAutomatic ( this ) ; r.unregisterForNewSms ( this ) ; r.unregisterForRecordsEvents ( this ) ; r.unregisterForRecordsLoaded ( this ) ; }
Source:
private void convertTo9Patch ( ) { java.awt.image.BufferedImage buffer = com.android.draw9patch.graphics.GraphicsUtilities.createTranslucentCompatibleImage ( ( ( image.getWidth ( ) ) + 2 ) , ( ( image.getHeight ( ) ) + 2 ) ) ; java.awt.Graphics2D g2 = buffer.createGraphics ( ) ; g2.drawImage ( image , 1 , 1 , null ) ; g2.dispose ( ) ; image = buffer ; name = ( name.substring ( 0 , name.lastIndexOf ( '.' ) ) ) + ".9.png" ; }

Target:
private void convertTo9Patch ( ) { java.awt.image.BufferedImage buffer = com.android.draw9patch.graphics.GraphicsUtilities.createTranslucentCompatibleImage ( ( ( image.getWidth ( ) ) + 2 ) , ( ( image.getHeight ( ) ) + 2 ) ) ; java.awt.Graphics2D g2 = buffer.createGraphics ( ) ; g2.drawImage ( image , 1 , 1 , null ) ; g2.dispose ( ) ; image = buffer ; viewer.setImage ( image ) ; name = ( name.substring ( 0 , name.lastIndexOf ( '.' ) ) ) + ".9.png" ; }
Source:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( android.bluetooth.BluetoothPbapClient.DBG ) { android.bluetooth.BluetoothPbapClient.log ( "Proxy object connected" ) ; } mService = IBluetoothPbapClient.Stub.asInterface ( service ) ; if ( ( mServiceListener ) != null ) { mServiceListener.onServiceConnected ( BluetoothProfile.PBAP_CLIENT , this ) ; } }

Target:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( android.bluetooth.BluetoothPbapClient.DBG ) { android.bluetooth.BluetoothPbapClient.log ( "Proxy object connected" ) ; } mService = IBluetoothPbapClient.Stub.asInterface ( android.os.Binder.allowBlocking ( service ) ) ; if ( ( mServiceListener ) != null ) { mServiceListener.onServiceConnected ( BluetoothProfile.PBAP_CLIENT , this ) ; } }
Source:
public void testHasReturnType ( ) throws java.lang.Exception { assertTrue ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "(Landroid/app/Fragment;)Landroid/app/FragmentTransaction;" ) ) ; assertTrue ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()Landroid/app/FragmentTransaction;" ) ) ; assertFalse ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()Landroid/app/FragmentTransactions;" ) ) ; assertFalse ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()Landroid/app/FragmentTransactions" ) ) ; assertFalse ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()android/app/FragmentTransaction;" ) ) ; }

Target:
public void testCommit3 ( ) throws java.lang.Exception { assertEquals ( ( "" + "No warnings." ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk4.xml=>AndroidManifest.xml" , "project.properties19=>project.properties" , "bytecode/CommitTest2.java.txt=>src/test/pkg/CommitTest2.java" , "bytecode/CommitTest2$MyDialogFragment.class.data=>bin/classes/test/pkg/CommitTest2$MyDialogFragment.class" , "bytecode/CommitTest2.class.data=>bin/classes/test/pkg/CommitTest2.class" , "appcompat/Fragment.java.txt=>src/android/support/v4/app/Fragment.java" , "appcompat/DialogFragment.java.txt=>src/android/support/v4/app/DialogFragment.java" , "appcompat/FragmentTransaction.java.txt=>src/android/support/v4/app/FragmentTransaction.java" , "appcompat/FragmentManager.java.txt=>src/android/support/v4/app/FragmentManager.java" ) ) ; }
Source:
public boolean onKeyMultiple ( final int keyCode , final int repeatCount , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyMultiple ( keyCode , repeatCount , event ) ; } } ) ; return ret ; } com.android.webview.chromium.UnimplementedWebViewApi.invoke ( ) ; return false ; }

Target:
public boolean onKeyUp ( final int keyCode , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyUp ( keyCode , event ) ; } } ) ; return ret ; } return mAwContents.onKeyUp ( keyCode , event ) ; }
Source:
public void run ( ) { try { processConnection ( ) ; } catch ( java.lang.Exception e ) { com.google.mockwebserver.MockWebServer.logger.log ( java.util.logging.Level.WARNING , "MockWebServer connection failed" , e ) ; } }

Target:
private void acceptConnections ( ) throws java.lang.Exception { while ( true ) { java.net.Socket socket ; try { socket = serverSocket.accept ( ) ; } catch ( java.net.SocketException e ) { return ; } com.google.mockwebserver.SocketPolicy socketPolicy = dispatcher.peek ( ) . getSocketPolicy ( ) ; if ( socketPolicy == ( com.google.mockwebserver.SocketPolicy.DISCONNECT_AT_START ) ) { dispatchBookkeepingRequest ( 0 , socket ) ; socket.close ( ) ; } else { openClientSockets.put ( socket , true ) ; serveConnection ( socket ) ; } } }
Source:
public void testAvdTargets ( ) { runCmdLine ( "list" , "targets" ) ; assertEquals ( ( "P Available Android targets:\n" + ( ( ( ( ( ( ( "P ----------\n" + "P id: 1 or \"android-0\"\n" ) + "P Name: Android 0.0\n" ) + "P Type: Platform\n" ) + "P API level: 0\n" ) + "P Revision: 1\n" ) + "P Skins: HVGA (default), Tag1ArmSkin, Tag1X86Skin\n" ) + "P Tag/ABIs : default/armeabi, tag-1/armeabi, tag-1/x86\n" ) ) , getLog ( ) . toString ( ) ) ; runCmdLine ( "list" , "targets" , "--compact" ) ; assertEquals ( "P android-0\n" , getLog ( ) . toString ( ) ) ; }

Target:
public void testListTargets ( ) { runCmdLine ( "list" , "targets" , "--compact" ) ; assertEquals ( "P android-0\n" , getLog ( ) . toString ( ) ) ; runCmdLine ( "list" , "target" ) ; assertEquals ( ( "P Available Android targets:\n" + ( ( ( ( ( ( ( "P ----------\n" + "P id: 1 or \"android-0\"\n" ) + "P Name: Android 0.0\n" ) + "P Type: Platform\n" ) + "P API level: 0\n" ) + "P Revision: 1\n" ) + "P Skins: HVGA (default), Tag1ArmSkin, Tag1X86Skin\n" ) + "P Tag/ABIs : default/armeabi, tag-1/armeabi, tag-1/x86\n" ) ) , getLog ( ) . toString ( ) ) ; }
Source:
private static boolean verifyMagic ( byte [ ] magic ) { return ( ( java.util.Arrays.equals ( magic , com.android.dexdeps.DexData.HeaderItem.DEX_FILE_MAGIC_v035 ) ) || ( java.util.Arrays.equals ( magic , com.android.dexdeps.DexData.HeaderItem.DEX_FILE_MAGIC_v037 ) ) ) || ( java.util.Arrays.equals ( magic , com.android.dexdeps.DexData.HeaderItem.DEX_FILE_MAGIC_v038 ) ) ; }

Target:
private static boolean verifyMagic ( byte [ ] magic ) { return ( ( ( java.util.Arrays.equals ( magic , com.android.dexdeps.DexData.HeaderItem.DEX_FILE_MAGIC_v035 ) ) || ( java.util.Arrays.equals ( magic , com.android.dexdeps.DexData.HeaderItem.DEX_FILE_MAGIC_v037 ) ) ) || ( java.util.Arrays.equals ( magic , com.android.dexdeps.DexData.HeaderItem.DEX_FILE_MAGIC_v038 ) ) ) || ( java.util.Arrays.equals ( magic , com.android.dexdeps.DexData.HeaderItem.DEX_FILE_MAGIC_v039 ) ) ; }
Source:
public void testCancelServiceDiscovery_invalidArguments ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; org.mockito.Mockito.when ( mISupplicantP2pIfaceMock.cancelServiceDiscovery ( anyInt ( ) ) ) . thenReturn ( mStatusFailure ) ; assertFalse ( mDut.cancelServiceDiscovery ( null ) ) ; assertFalse ( mDut.cancelServiceDiscovery ( "not a number" ) ) ; }

Target:
public void testCancelServiceDiscovery_invalidArguments ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; org.mockito.Mockito.when ( mISupplicantP2pIfaceMock.cancelServiceDiscovery ( anyLong ( ) ) ) . thenReturn ( mStatusFailure ) ; assertFalse ( mDut.cancelServiceDiscovery ( null ) ) ; assertFalse ( mDut.cancelServiceDiscovery ( "not a number" ) ) ; }
Source:
public com.android.sched.vfs.InputOutputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { return getSectionVFS ( fileType ) . getRootInputOutputVDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputOutputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { return getSectionVFS ( fileType ) . getRootDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public final boolean visit ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDecl , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { if ( ( ( typeDecl.binding ) == null ) || ( ( typeDecl.binding.constantPoolName ( ) ) == null ) ) { assert false ; return false ; } createTypes ( typeDecl ) ; createMembers ( typeDecl ) ; return visit ( typeDecl ) ; }

Target:
public final boolean visit ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDecl , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { assert ! ( com.android.jack.ir.impl.JackIrBuilder.hasError ( typeDecl ) ) ; if ( ( typeDecl.binding.constantPoolName ( ) ) == null ) { assert false ; return false ; } createTypes ( typeDecl ) ; createMembers ( typeDecl ) ; return visit ( typeDecl ) ; }
Source:
private void checkPackageName ( int uid , java.lang.String packageName ) { if ( packageName == null ) { throw new java.lang.SecurityException ( "packageName cannot be null" ) ; } java.lang.String [ ] packages = mPackageManager.getPackagesForUid ( uid ) ; if ( packages == null ) { throw new java.lang.SecurityException ( ( "invalid UID " + uid ) ) ; } for ( java.lang.String pkg : packages ) { if ( packageName.equals ( pkg ) ) return ; } throw new java.lang.SecurityException ( "invalid package name" ) ; }

Target:
private boolean doesPackageHaveUid ( int uid , java.lang.String packageName ) { if ( packageName == null ) { return false ; } try { android.content.pm.ApplicationInfo appInfo = mPackageManager.getApplicationInfo ( packageName , 0 ) ; if ( ( appInfo.uid ) != uid ) { return false ; } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { return false ; } return true ; }
Source:
public static com.google.common.base.Optional < java.lang.String > getNormalizedNumber ( android.content.Context appContext , android.telecom.Call call ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; com.google.common.base.Optional < java.lang.String > e164 = com.android.dialer.telecom.TelecomCallUtil.getE164Number ( appContext , call ) ; if ( e164.isPresent ( ) ) { return e164 ; } java.lang.String rawNumber = com.android.dialer.telecom.TelecomCallUtil.getNumber ( call ) ; if ( android.text.TextUtils.isEmpty ( rawNumber ) ) { return com.google.common.base.Optional.absent ( ) ; } return com.google.common.base.Optional.of ( android.telephony.PhoneNumberUtils.normalizeNumber ( rawNumber ) ) ; }

Target:
public static com.google.common.base.Optional < java.lang.String > getNormalizedNumber ( android.content.Context appContext , android.telecom.Call call ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; com.google.common.base.Optional < java.lang.String > validE164 = com.android.dialer.telecom.TelecomCallUtil.getValidE164Number ( appContext , call ) ; if ( validE164.isPresent ( ) ) { return validE164 ; } java.lang.String rawNumber = com.android.dialer.telecom.TelecomCallUtil.getNumber ( call ) ; if ( android.text.TextUtils.isEmpty ( rawNumber ) ) { return com.google.common.base.Optional.absent ( ) ; } return com.google.common.base.Optional.of ( android.telephony.PhoneNumberUtils.normalizeNumber ( rawNumber ) ) ; }
Source:
public void testStandaloneWeekdayParsing ( ) throws java.lang.Exception { java.util.Locale fi = new java.util.Locale ( "fi" ) ; assertEquals ( java.util.Calendar.TUESDAY , libcore.java.text.SimpleDateFormatTest.parseDate ( fi , "cccc yyyy" , "tiistai 2000" ) . get ( java.util.Calendar.DAY_OF_WEEK ) ) ; assertEquals ( java.util.Calendar.TUESDAY , libcore.java.text.SimpleDateFormatTest.parseDate ( fi , "EEEE yyyy" , "tiistaina 2000" ) . get ( java.util.Calendar.DAY_OF_WEEK ) ) ; libcore.java.text.SimpleDateFormatTest.assertCannotParse ( fi , "cccc yyyy" , "tiistaina 2000" ) ; libcore.java.text.SimpleDateFormatTest.assertCannotParse ( fi , "EEEE yyyy" , "tiistai 2000" ) ; }

Target:
public void test_sl_dates ( ) throws java.lang.Exception { java.text.DateFormat df = java.text.DateFormat.getDateInstance ( java.text.DateFormat.SHORT , new java.util.Locale ( "sl" ) ) ; assertEquals ( java.util.TimeZone.getDefault ( ) , df.getTimeZone ( ) ) ; df.setTimeZone ( libcore.java.text.SimpleDateFormatTest.UTC ) ; assertEquals ( "1. 1. 70" , df.format ( 0L ) ) ; }
Source:
public java.lang.String getFileName ( ) { java.lang.String fileName ; if ( ( mFileNameTextField ) == null ) { fileName = "" ; } else { fileName = mFileNameTextField.getText ( ) . trim ( ) ; if ( ( ( fileName.length ( ) ) > 0 ) && ( ( fileName.indexOf ( '.' ) ) == ( - 1 ) ) ) { fileName = fileName + ( com.android.ide.eclipse.adt.AndroidConstants.DOT_XML ) ; } } return fileName ; }

Target:
public java.lang.String getFileName ( ) { java.lang.String fileName ; if ( ( mFileNameTextField ) == null ) { fileName = "" ; } else { fileName = mFileNameTextField.getText ( ) . trim ( ) ; if ( ( ( fileName.length ( ) ) > 0 ) && ( ( fileName.indexOf ( '.' ) ) == ( - 1 ) ) ) { fileName = fileName + ( com.android.ide.eclipse.adt.AdtConstants.DOT_XML ) ; } } return fileName ; }
Source:
public static android.content.SyncStatusInfo getSyncStatus ( android.accounts.Account account , java.lang.String authority ) { try { return android.content.ContentResolver.getContentService ( ) . getSyncStatus ( account , authority ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( "the ContentService should always be reachable" , e ) ; } }

Target:
public static java.util.List < android.content.PeriodicSync > getPeriodicSyncs ( android.accounts.Account account , java.lang.String authority ) { try { return android.content.ContentResolver.getContentService ( ) . getPeriodicSyncs ( account , authority , null ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( "the ContentService should always be reachable" , e ) ; } }
Source:
protected java.lang.String createMessage ( @ javax.annotation.Nonnull java.lang.String description ) { java.lang.String message = description + " cannot be read" ; java.lang.Throwable cause = getCause ( ) ; if ( cause != null ) { java.lang.String detail = cause.getMessage ( ) ; if ( detail != null ) { message += ": " + detail ; } } return message ; }

Target:
protected java.lang.String createMessage ( @ javax.annotation.Nonnull java.lang.String description ) { java.lang.String message = description + " failed to be read" ; java.lang.Throwable cause = getCause ( ) ; if ( cause != null ) { java.lang.String detail = cause.getMessage ( ) ; if ( detail != null ) { message += ": " + detail ; } } return message ; }
Source:
public void testAnonymous ( ) throws java.lang.Throwable { java.util.List < org.jetbrains.plugins.github.api.GithubGist.FileContent > expected = createContent ( ) ; java.lang.String url = org.jetbrains.plugins.github.GithubCreateGistAction.createGist ( myProject , org.jetbrains.plugins.github.GithubAuthData.createAnonymous ( myHost ) , expected , true , org.jetbrains.plugins.github.GIST_DESCRIPTION , null ) ; assertNotNull ( url ) ; GIST_ID = url.substring ( ( ( url.lastIndexOf ( '/' ) ) + 1 ) ) ; checkGistExists ( ) ; checkGistAnonymous ( ) ; checkGistPrivate ( ) ; checkGistDescription ( org.jetbrains.plugins.github.GIST_DESCRIPTION ) ; checkGistContent ( expected ) ; GIST_ID = null ; GIST = null ; }

Target:
public void testAnonymous ( ) throws java.lang.Throwable { java.util.List < org.jetbrains.plugins.github.api.GithubGist.FileContent > expected = createContent ( ) ; java.lang.String url = org.jetbrains.plugins.github.GithubCreateGistAction.createGist ( myProject , org.jetbrains.plugins.github.util.GithubAuthData.createAnonymous ( myHost ) , expected , true , org.jetbrains.plugins.github.GIST_DESCRIPTION , null ) ; assertNotNull ( url ) ; GIST_ID = url.substring ( ( ( url.lastIndexOf ( '/' ) ) + 1 ) ) ; checkGistExists ( ) ; checkGistAnonymous ( ) ; checkGistPrivate ( ) ; checkGistDescription ( org.jetbrains.plugins.github.GIST_DESCRIPTION ) ; checkGistContent ( expected ) ; GIST_ID = null ; GIST = null ; }
Source:
public void onOtaspChanged ( int otaspMode ) { com.android.phone.otasp.OtaspSimStateReceiver.logd ( ( "onOtaspChanged: otaspMode=" + otaspMode ) ) ; if ( ( ( otaspMode == ( com.android.internal.telephony.ServiceStateTracker.OTASP_NEEDED ) ) && ( com.android.phone.otasp.OtaspSimStateReceiver.isCarrierSupported ( ) ) ) && ( com.android.phone.PhoneGlobals.getPhone ( ) . getIccRecordsLoaded ( ) ) ) { com.android.phone.otasp.OtaspSimStateReceiver.logd ( "otasp activation required, start otaspActivationService" ) ; mContext.startService ( new android.content.Intent ( mContext , com.android.phone.otasp.OtaspActivationService.class ) ) ; } }

Target:
public void onOtaspChanged ( int otaspMode ) { com.android.phone.otasp.OtaspSimStateReceiver.logd ( ( "onOtaspChanged: otaspMode=" + otaspMode ) ) ; if ( otaspMode == ( com.android.internal.telephony.ServiceStateTracker.OTASP_NEEDED ) ) { com.android.phone.otasp.OtaspSimStateReceiver.logd ( "otasp activation required, start otaspActivationService" ) ; mContext.startService ( new android.content.Intent ( mContext , com.android.phone.otasp.OtaspActivationService.class ) ) ; } else if ( otaspMode == ( com.android.internal.telephony.ServiceStateTracker.OTASP_NOT_NEEDED ) ) { com.android.phone.otasp.OtaspActivationService.updateActivationState ( mContext , true ) ; } }
Source:
public void write ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode jNode ) throws java.io.IOException { com.android.sched.util.log.Event eventWriting = tracer.start ( JackEventType.NNODE_WRITING ) ; try { com.android.jack.jayce.v0002.io.ImportHelper importHelper = new com.android.jack.jayce.v0002.io.ImportHelper ( new com.android.jack.jayce.v0002.NodeFactory ( ) ) ; com.android.sched.util.log.Event eventConvert = tracer.start ( JackEventType.JNODE_TO_NNODE_CONVERSION ) ; com.android.jack.jayce.v0002.NNode nNode ; try { nNode = importHelper.load ( jNode ) ; } finally { eventConvert.end ( ) ; } writeNode ( nNode ) ; } finally { eventWriting.end ( ) ; } }

Target:
public void write ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode jNode ) throws java.io.IOException { try ( com.android.sched.util.log.Event eventWriting = tracer.open ( JackEventType.NNODE_WRITING ) ) { com.android.jack.jayce.v0002.io.ImportHelper importHelper = new com.android.jack.jayce.v0002.io.ImportHelper ( new com.android.jack.jayce.v0002.NodeFactory ( ) ) ; com.android.jack.jayce.v0002.NNode nNode ; try ( com.android.sched.util.log.Event eventConvert = tracer.open ( JackEventType.JNODE_TO_NNODE_CONVERSION ) ) { nNode = importHelper.load ( jNode ) ; } writeNode ( nNode ) ; } }
Source:
private com.android.build.gradle.ndk.NdkPlugin getNdkPlugin ( ) { org.gradle.api.Project targetProject = ( targetProjectName.isEmpty ( ) ) ? currentProject : currentProject.getRootProject ( ) . project ( targetProjectName ) ; com.android.build.gradle.ndk.NdkPlugin plugin = targetProject.getPlugins ( ) . findPlugin ( com.android.build.gradle.ndk.NdkPlugin.class ) ; if ( plugin == null ) { throw new org.gradle.api.InvalidUserDataException ( ( ( ( ( ( ( ( ( "Unable to find NdkPlugin in project '" + ( targetProjectName ) ) + "'. You may " ) + "need define your compile dependencies such that " ) + targetProject ) + " is " ) + "configured before " ) + ( currentProject ) ) + "." ) ) ; } return plugin ; }

Target:
private com.android.build.gradle.ndk.NdkPlugin getNdkPlugin ( ) { org.gradle.api.Project targetProject = ( targetProjectName.isEmpty ( ) ) ? currentProject : currentProject.getRootProject ( ) . project ( targetProjectName ) ; com.android.build.gradle.ndk.NdkPlugin plugin = targetProject.getPlugins ( ) . findPlugin ( com.android.build.gradle.ndk.NdkPlugin.class ) ; if ( plugin == null ) { throw new org.gradle.api.InvalidUserDataException ( ( ( "Unable to find NdkPlugin in project '" + ( targetProjectName ) ) + "'." ) ) ; } return plugin ; }
Source:
public void testWeirdUnitedStates ( ) throws java.lang.Exception { java.lang.String [ ] weird = new java.lang.String [ ] { "America/Phoenix" , "America/Adak" } ; for ( java.lang.String name : weird ) { java.util.TimeZone tz = java.util.TimeZone.getTimeZone ( name ) ; java.util.Calendar c = java.util.Calendar.getInstance ( tz ) ; java.util.TimeZone guess ; c.set ( 2008 , java.util.Calendar.OCTOBER , 20 , 12 , 0 , 0 ) ; guess = android.util.cts.TimeUtilsTest.guessTimeZone ( c , "us" ) ; assertEquals ( name , guess.getID ( ) ) ; } }

Target:
public void testWeirdUnitedStates ( ) throws java.lang.Exception { java.lang.String [ ] weird = new java.lang.String [ ] { "America/Phoenix" , "America/Adak" } ; for ( java.lang.String name : weird ) { java.util.TimeZone tz = java.util.TimeZone.getTimeZone ( name ) ; java.util.Calendar c = java.util.Calendar.getInstance ( tz ) ; java.util.TimeZone guess ; c.set ( 2016 , java.util.Calendar.OCTOBER , 20 , 12 , 0 , 0 ) ; guess = android.util.cts.TimeUtilsTest.guessTimeZone ( c , "us" ) ; assertEquals ( name , guess.getID ( ) ) ; } }
Source:
private void readArray ( com.android.dx.io.EncodedValueReader reader ) { for ( int i = 0 , size = reader.readArray ( ) ; i < size ; i ++ ) { switch ( reader.peek ( ) ) { case com.android.dx.io.EncodedValueReader.ENCODED_STRING : encounterString ( reader.readString ( ) ) ; break ; case com.android.dx.io.EncodedValueReader.ENCODED_ARRAY : readArray ( reader ) ; break ; } } }

Target:
private void readArray ( com.android.dex.EncodedValueReader reader ) { for ( int i = 0 , size = reader.readArray ( ) ; i < size ; i ++ ) { switch ( reader.peek ( ) ) { case com.android.dex.EncodedValueReader.ENCODED_STRING : encounterString ( reader.readString ( ) ) ; break ; case com.android.dex.EncodedValueReader.ENCODED_ARRAY : readArray ( reader ) ; break ; } } }
Source:
public void testApplyingWithCaseChangedNames ( ) throws java.lang.Exception { com.intellij.openapi.util.io.FileUtil.rename ( new java.io.File ( myOlderDir , "Readme.txt" ) , new java.io.File ( myOlderDir , "README.txt" ) ) ; com.intellij.updater.PatchFileCreator.create ( "from" , "to" , myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testApplyWhenCommonFileChangesStrict ( ) throws java.lang.Exception { myPatchSpec.setStrict ( true ) ; com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.openapi.util.io.FileUtil.copy ( new java.io.File ( myOlderDir , "/lib/bootstrap.jar" ) , new java.io.File ( myOlderDir , "/lib/boot.jar" ) ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertEquals ( 1 , preparationResult.validationResults.size ( ) ) ; assertEquals ( new com.intellij.updater.ValidationResult ( ValidationResult.Kind.ERROR , "lib/boot.jar" , ValidationResult.Action.VALIDATE , ValidationResult.MODIFIED_MESSAGE , ValidationResult.Option.NONE ) , preparationResult.validationResults.get ( 0 ) ) ; }
Source:
public void iccTransmitApduLogicalChannel ( int channel , int cla , int command , int p1 , int p2 , int p3 , java.lang.String data , android.os.Message response ) { mCi.iccTransmitApduLogicalChannel ( channel , cla , command , p1 , p2 , p3 , data , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_TRANSMIT_APDU_LOGICAL_CHANNEL_DONE , response ) ) ; }

Target:
public void iccTransmitApduLogicalChannel ( int channel , int cla , int command , int p1 , int p2 , int p3 , java.lang.String data , android.os.Message response ) { mCi.iccTransmitApduLogicalChannel ( channel , cla , command , p1 , p2 , p3 , data , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_TRANSMIT_APDU_LOGICAL_CHANNEL_DONE , response ) ) ; }
Source:
private void blackListCurrentDevice ( ) { mFeatures &= ~ ( com.android.bluetooth.avrcp.Avrcp.BTRC_FEAT_ABSOLUTE_VOLUME ) ; mAudioManager.avrcpSupportsAbsoluteVolume ( mAddress , isAbsoluteVolumeSupported ( ) ) ; android.content.SharedPreferences pref = mContext.getSharedPreferences ( com.android.bluetooth.avrcp.Avrcp.ABSOLUTE_VOLUME_BLACKLIST , Context.MODE_PRIVATE ) ; android.content.SharedPreferences.Editor editor = pref.edit ( ) ; editor.putBoolean ( mAddress , true ) ; editor.commit ( ) ; }

Target:
private void blackListCurrentDevice ( ) { mFeatures &= ~ ( com.android.bluetooth.avrcp.Avrcp.BTRC_FEAT_ABSOLUTE_VOLUME ) ; mAudioManager.avrcpSupportsAbsoluteVolume ( mAddress , isAbsoluteVolumeSupported ( ) ) ; android.content.SharedPreferences pref = mContext.getSharedPreferences ( com.android.bluetooth.avrcp.Avrcp.ABSOLUTE_VOLUME_BLACKLIST , Context.MODE_PRIVATE ) ; android.content.SharedPreferences.Editor editor = pref.edit ( ) ; editor.putBoolean ( mAddress , true ) ; editor.apply ( ) ; }
Source:
public void setRemoteVolumeController ( android.media.IRemoteVolumeController rvc ) { final int pid = android.os.Binder.getCallingPid ( ) ; final int uid = android.os.Binder.getCallingUid ( ) ; final long token = android.os.Binder.clearCallingIdentity ( ) ; try { enforceStatusBarPermission ( "listen for volume changes" , pid , uid ) ; mRvc = rvc ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }

Target:
public void setRemoteVolumeController ( android.media.IRemoteVolumeController rvc ) { final int pid = android.os.Binder.getCallingPid ( ) ; final int uid = android.os.Binder.getCallingUid ( ) ; final long token = android.os.Binder.clearCallingIdentity ( ) ; try { enforceSystemUiPermission ( "listen for volume changes" , pid , uid ) ; mRvc = rvc ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }
Source:
private void startTimer ( ) { if ( ( timeout ) == ( - 1 ) ) { return ; } synchronized ( lock ) { if ( ( timer ) != null ) { cancelTimer ( ) ; } com.android.jack.server.JackHttpServer.logger.log ( java.util.logging.Level.INFO , "Start timer" ) ; timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( timer ) != null ; timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { freeLoadedPrograms ( ) ; } } , ( ( timeout ) * 1000L ) ) ; } }

Target:
private void startTimer ( ) { synchronized ( lock ) { if ( ( timeout ) == ( com.android.jack.server.JackHttpServer.TIMEOUT_DISABLED ) ) { return ; } if ( ( timer ) != null ) { cancelTimer ( ) ; } com.android.jack.server.JackHttpServer.logger.log ( java.util.logging.Level.INFO , "Start timer" ) ; timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( timer ) != null ; timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { cancelTimer ( ) ; freeLoadedPrograms ( ) ; } } , ( ( timeout ) * 1000L ) ) ; } }
Source:
public void afterHandshake ( long session , long ssl , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; super . afterHandshake ( session , ssl , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long ssl , long context , java.net.Socket socket , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; org.junit.Assert.assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; super . afterHandshake ( session , ssl , context , socket , fd , callback ) ; }
Source:
private static java.lang.String getMajorVersionAsString ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vdir , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) throws com.android.jack.library.LibraryFormatException { try { return com.android.jack.library.JackLibraryFactory.getVersionString ( java.lang.Integer.parseInt ( ( ( java.lang.String ) ( libraryProperties.get ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) ) ) ) ; } catch ( java.lang.NumberFormatException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Fails to parse the property " + ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) + " from the library " ) + vdir ) , e ) ; throw new com.android.jack.library.LibraryFormatException ( vdir.getLocation ( ) ) ; } }

Target:
private static java.lang.String getMajorVersionAsString ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vdir , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) throws com.android.jack.library.LibraryFormatException { try { return com.android.jack.library.JackLibraryFactory.getVersionString ( java.lang.Integer.parseInt ( ( ( java.lang.String ) ( libraryProperties.get ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) ) ) ) ; } catch ( java.lang.NumberFormatException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Failed to parse the property " + ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) + " from the library " ) + vdir ) , e ) ; throw new com.android.jack.library.LibraryFormatException ( vdir.getLocation ( ) ) ; } }
Source:
public void testOcclude ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } gotoKeyguard ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_KEYGUARD_OCCLUDE , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }

Target:
public void testOcclude ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_KEYGUARD_OCCLUDE , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }
Source:
protected java.lang.Boolean doInBackground ( java.lang.String ... params ) { try { com.android.server.telecom.Log.continueSession ( mLogSubsession , "ABCF.dIB" ) ; com.android.server.telecom.Log.event ( mIncomingCall , Log.Events.BLOCK_CHECK_INITIATED ) ; return mBlockCheckerAdapter.isBlocked ( mContext , params [ 0 ] ) ; } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
protected java.lang.Boolean doInBackground ( java.lang.String ... params ) { try { android.telecom.Log.continueSession ( mLogSubsession , "ABCF.dIB" ) ; android.telecom.Log.addEvent ( mIncomingCall , LogUtils.Events.BLOCK_CHECK_INITIATED ) ; return mBlockCheckerAdapter.isBlocked ( mContext , params [ 0 ] ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public java.util.List < java.lang.String > getAllProviders ( ) { try { synchronized ( mLock ) { return _getAllProvidersLocked ( ) ; } } catch ( java.lang.SecurityException se ) { throw se ; } catch ( java.lang.Exception e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "getAllProviders got exception:" , e ) ; return null ; } }

Target:
public void onChange ( boolean selfChange ) { synchronized ( mLock ) { updateProvidersLocked ( ) ; } }
Source:
private void finishInitializing ( ) { if ( ( mCurrentCall ) == null ) { java.lang.String number = getAddress ( ) . getSchemeSpecificPart ( ) ; android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "Dialing " + number ) ) ; mHeadsetProfile.dial ( mDevice , number ) ; setDialing ( ) ; } else { handleCallChanged ( mCurrentCall ) ; } }

Target:
public java.util.UUID getUUID ( ) { return mCurrentCall.getUUID ( ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) return false ; com.google.gct.testing.CloudTestConfigurationImpl that = ( ( com.google.gct.testing.CloudTestConfigurationImpl ) ( o ) ) ; return ( id ) == ( that.id ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) return false ; com.google.gct.testing.CloudConfigurationImpl that = ( ( com.google.gct.testing.CloudConfigurationImpl ) ( o ) ) ; return ( id ) == ( that.id ) ; }
Source:
static void triggerInstanceOOM ( ) { Main.InstanceMemEater memEater = Main.InstanceMemEater.blowup ( ) ; Main.InstanceMemEater lastMemEater = memEater ; do { lastMemEater.next = Main.InstanceMemEater.blowup ( ) ; lastMemEater = lastMemEater.next ; } while ( lastMemEater != null ) ; memEater.confuseCompilerOptimization ( memEater ) ; java.lang.System.out.println ( "Instance allocation failed" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { if ( Main.triggerArrayOOM ( ) ) { java.lang.System.out.println ( "NEW_ARRAY correctly threw OOME" ) ; } if ( Main.triggerInstanceOOM ( ) ) { java.lang.System.out.println ( "NEW_INSTANCE correctly threw OOME" ) ; } }
Source:
private static android.net.NetworkState buildMobile4gState ( java.lang.String iface ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_WIMAX , 0 , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( iface ) ; final android.net.NetworkCapabilities capabilities = new android.net.NetworkCapabilities ( ) ; capabilities.setCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_METERED , false ) ; capabilities.setCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING , true ) ; return new android.net.NetworkState ( info , prop , capabilities , null , null , null ) ; }

Target:
private static android.net.NetworkState buildMobile4gState ( java.lang.String iface ) { final android.net.NetworkInfo info = new android.net.NetworkInfo ( android.net.ConnectivityManager.TYPE_WIMAX , 0 , null , null ) ; info.setDetailedState ( DetailedState.CONNECTED , null , null ) ; final android.net.LinkProperties prop = new android.net.LinkProperties ( ) ; prop.setInterfaceName ( iface ) ; final android.net.NetworkCapabilities capabilities = new android.net.NetworkCapabilities ( ) ; capabilities.setCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_METERED , false ) ; capabilities.setCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING , true ) ; return new android.net.NetworkState ( info , prop , capabilities , com.android.server.net.NetworkStatsServiceTest.MOBILE_NETWORK , null , null ) ; }
Source:
public int relayout ( android.view.IWindow window , android.view.WindowManager.LayoutParams attrs , int requestedWidth , int requestedHeight , int viewFlags , boolean insetsPending , android.graphics.Rect outFrame , android.graphics.Rect outContentInsets , android.graphics.Rect outVisibleInsets , android.view.Surface outSurface ) { return relayoutWindow ( this , window , attrs , requestedWidth , requestedHeight , viewFlags , insetsPending , outFrame , outContentInsets , outVisibleInsets , outSurface ) ; }

Target:
public int relayout ( android.view.IWindow window , android.view.WindowManager.LayoutParams attrs , int requestedWidth , int requestedHeight , int viewFlags , boolean insetsPending , android.graphics.Rect outFrame , android.graphics.Rect outContentInsets , android.graphics.Rect outVisibleInsets , android.content.res.Configuration outConfig , android.view.Surface outSurface ) { return relayoutWindow ( this , window , attrs , requestedWidth , requestedHeight , viewFlags , insetsPending , outFrame , outContentInsets , outVisibleInsets , outConfig , outSurface ) ; }