auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onDestroy ( ) { com.android.tv.dvr.DvrManager dvrManager = com.android.tv.TvApplication.getSingletons ( getActivity ( ) ) . getDvrManager ( ) ; if ( ( ( ( getFragmentManager ( ) . getBackStackEntryCount ( ) ) == ( mBackStackCount ) ) && ( getArguments ( ) . getBoolean ( DvrSeriesSettingsActivity.REMOVE_EMPTY_SERIES_RECORDING ) ) ) && ( dvrManager.canRemoveSeriesRecording ( mSeriesRecordingId ) ) ) { dvrManager.removeSeriesRecording ( mSeriesRecordingId ) ; } super . onDestroy ( ) ; }

Target:
public void onDestroy ( ) { if ( ( ( getFragmentManager ( ) . getBackStackEntryCount ( ) ) == ( mBackStackCount ) ) && ( getArguments ( ) . getBoolean ( DvrSeriesSettingsActivity.REMOVE_EMPTY_SERIES_RECORDING ) ) ) { mDvrDataManager.checkAndRemoveEmptySeriesRecording ( mSeriesRecordingId ) ; } super . onDestroy ( ) ; }
Source:
public void requestNetworkCapabilities ( android.net.ConnectivityManager.NetworkCallback networkCallback ) { try { mService.requestNetworkCapabilities ( networkCallback.networkRequest ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void requestNetwork ( android.net.NetworkRequest request , int timeoutMs , android.net.ConnectivityManager.NetworkCallback networkCallback ) { if ( timeoutMs <= 0 ) { throw new java.lang.IllegalArgumentException ( ( "Non-positive timeoutMs: " + timeoutMs ) ) ; } int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , getDefaultHandler ( ) ) ; }
Source:
private android.content.Intent waitForIntent ( int timeoutMs , java.util.concurrent.BlockingQueue < android.content.Intent > queue ) { try { android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNotNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( "Cannot obtain an Intent from the queue" ) ; } return null ; }

Target:
private android.content.Intent waitForIntent ( int timeoutMs , java.util.concurrent.BlockingQueue < android.content.Intent > queue ) { try { android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNotNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( "Cannot obtain an Intent from the queue: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public void visitMethod ( com.intellij.psi.PsiMethod method ) { if ( ! ( isEndpointClass ( method ) ) ) { return ; } if ( ! ( method.isConstructor ( ) ) ) { return ; } if ( ! ( isPublicNullaryConstructor ( method ) ) ) { holder.registerProblem ( method , "Each class that is within an API must have a public nullary constructor." , LocalQuickFix.EMPTY_ARRAY ) ; } }

Target:
public void visitClass ( com.intellij.psi.PsiClass psiClass ) { if ( ! ( isEndpointClass ( psiClass ) ) ) { return ; } com.intellij.psi.PsiMethod [ ] allConstructors = psiClass.getConstructors ( ) ; if ( ( allConstructors.length ) == 0 ) { return ; } for ( com.intellij.psi.PsiMethod aConstructor : allConstructors ) { if ( isPublicNullaryConstructor ( aConstructor ) ) { return ; } } holder.registerProblem ( psiClass , "Each class that is within an API must have a public nullary constructor." , LocalQuickFix.EMPTY_ARRAY ) ; }
Source:
public static void setPartyShuffleMenuIcon ( android.view.Menu menu ) { android.view.MenuItem item = menu.findItem ( com.android.music.MusicUtils.Defs.PARTY_SHUFFLE ) ; if ( item != null ) { int shuffle = com.android.music.MusicUtils.getCurrentShuffleMode ( ) ; if ( shuffle == ( MediaPlaybackService.SHUFFLE_AUTO ) ) { item.setIcon ( R.drawable.ic_menu_party_shuffle ) ; item.setTitle ( R.string.party_shuffle_off ) ; } else { item.setIcon ( R.drawable.ic_menu_party_shuffle ) ; item.setTitle ( R.string.party_shuffle ) ; } } }

Target:
public static android.graphics.Bitmap resizeBitmap ( android.graphics.Bitmap bitmap , android.graphics.Bitmap ref ) { int w = ref.getWidth ( ) ; int h = ref.getHeight ( ) ; return android.graphics.Bitmap.createScaledBitmap ( bitmap , w , h , false ) ; }
Source:
public void dispose ( ) { super . dispose ( ) ; if ( ( mHoverFgColor ) != null ) { mHoverFgColor.dispose ( ) ; mHoverFgColor = null ; } if ( ( mDropTarget ) != null ) { mDropTarget.dispose ( ) ; mDropTarget = null ; } if ( ( mRulesEngine ) != null ) { mRulesEngine.dispose ( ) ; mRulesEngine = null ; } }

Target:
public void dispose ( ) { super . dispose ( ) ; if ( ( mHoverFgColor ) != null ) { mHoverFgColor.dispose ( ) ; mHoverFgColor = null ; } if ( ( mDropTarget ) != null ) { mDropTarget.dispose ( ) ; mDropTarget = null ; } if ( ( mRulesEngine ) != null ) { mRulesEngine.dispose ( ) ; mRulesEngine = null ; } if ( ( mClipboard ) != null ) { mClipboard.dispose ( ) ; mClipboard = null ; } }
Source:
public final void activitySlept ( android.os.IBinder token ) { if ( DEBUG_ALL ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( "Activity slept: token=" + token ) ) ; final long origId = android.os.Binder.clearCallingIdentity ( ) ; synchronized ( this ) { final com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.isInStackLocked ( token ) ; if ( r != null ) { mStackSupervisor.activitySleptLocked ( r ) ; } } android.os.Binder.restoreCallingIdentity ( origId ) ; }

Target:
public final void activitySlept ( android.os.IBinder token ) { if ( com.android.server.am.ActivityManagerDebugConfig.DEBUG_ALL ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( "Activity slept: token=" + token ) ) ; final long origId = android.os.Binder.clearCallingIdentity ( ) ; synchronized ( this ) { final com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.isInStackLocked ( token ) ; if ( r != null ) { mStackSupervisor.activitySleptLocked ( r ) ; } } android.os.Binder.restoreCallingIdentity ( origId ) ; }
Source:
public static java.lang.String getSyntheticSwitchMapInitializerName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String enumName = com.android.jack.util.NamingTools.getValidName ( com.android.jack.ir.formatter.BinaryQualifiedNameFormatter.getFormatter ( ) . getName ( enumType ) ) ; java.lang.String methodName = com.android.jack.util.NamingTools.getNonSourceConflictingName ( ( ( "get" + enumName ) + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ) ) ; return methodName ; }

Target:
public static java.lang.String getSyntheticSwitchMapFieldName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String enumName = com.android.jack.ir.formatter.BinaryQualifiedNameFormatter.getFormatter ( ) . getName ( enumType ) ; return com.android.jack.util.NamingTools.getStrictNonSourceConflictingName ( ( enumName + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ) ) ; }
Source:
private void readZeroTerminated ( boolean hcrc ) throws java.io.IOException { int result ; while ( ( result = in.read ( ) ) > 0 ) { if ( hcrc ) { crc.update ( result ) ; } } if ( result == ( - 1 ) ) { throw new java.io.EOFException ( ) ; } if ( hcrc ) { crc.update ( result ) ; } }

Target:
private static void readZeroTerminated ( java.io.InputStream in , java.util.zip.CRC32 crc , boolean hcrc ) throws java.io.IOException { int result ; while ( ( result = in.read ( ) ) > 0 ) { if ( hcrc ) { crc.update ( result ) ; } } if ( result == ( - 1 ) ) { throw new java.io.EOFException ( ) ; } if ( hcrc ) { crc.update ( result ) ; } }
Source:
android.content.pm.ApplicationInfo getAppInfoForUser ( android.content.pm.ApplicationInfo info , int userId ) { if ( info == null ) return null ; android.content.pm.ApplicationInfo newInfo = new android.content.pm.ApplicationInfo ( info ) ; newInfo.uid = applyUserId ( info.uid , userId ) ; newInfo.dataDir = android.os.Environment.getDataUserPackageDirectory ( info.volumeUuid , userId , info.packageName ) . getAbsolutePath ( ) ; return newInfo ; }

Target:
android.content.pm.ApplicationInfo getAppInfoForUser ( android.content.pm.ApplicationInfo info , int userId ) { if ( info == null ) return null ; android.content.pm.ApplicationInfo newInfo = new android.content.pm.ApplicationInfo ( info ) ; newInfo.initForUser ( userId ) ; return newInfo ; }
Source:
public boolean setCurrentInputMethodSubtype ( android.view.inputmethod.InputMethodSubtype subtype ) { synchronized ( mH ) { try { return mService.setCurrentInputMethodSubtype ( subtype ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.view.inputmethod.InputMethodManager.TAG , ( "IME died: " + ( mCurId ) ) , e ) ; return false ; } } }

Target:
public int getInputMethodWindowVisibleHeight ( ) { synchronized ( mH ) { try { return mService.getInputMethodWindowVisibleHeight ( ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public void testParsingUncommonTimeZoneAbbreviations ( ) { java.lang.String fmt = "yyyy-MM-dd HH:mm:ss.SSS z" ; java.lang.String date = "2010-12-23 12:44:57.0 CET" ; assertEquals ( 1293104697000L , parseDate ( java.util.Locale.UK , fmt , date ) . getTimeInMillis ( ) ) ; assertEquals ( 1293104697000L , parseDate ( java.util.Locale.US , fmt , date ) . getTimeInMillis ( ) ) ; }

Target:
public void testParsingUncommonTimeZoneAbbreviations ( ) { java.lang.String fmt = "yyyy-MM-dd HH:mm:ss.SSS z" ; java.lang.String date = "2010-12-23 12:44:57.0 CET" ; assertEquals ( 1293104697000L , libcore.java.text.SimpleDateFormatTest.parseDate ( java.util.Locale.UK , fmt , date ) . getTimeInMillis ( ) ) ; assertEquals ( 1293104697000L , libcore.java.text.SimpleDateFormatTest.parseDate ( java.util.Locale.US , fmt , date ) . getTimeInMillis ( ) ) ; }
Source:
private static void createAndShowUI ( ) { final com.android.tools.perflib.vmtrace.viz.TraceView.TraceViewPanel traceViewPanel = new com.android.tools.perflib.vmtrace.viz.TraceView.TraceViewPanel ( ) ; final com.android.tools.perflib.vmtrace.VmTraceData traceData = com.android.tools.perflib.vmtrace.viz.TraceView.getVmTraceData ( com.android.tools.perflib.vmtrace.viz.TraceView.TRACE_FILE_NAME ) ; javax.swing.JFrame frame = new javax.swing.JFrame ( "TraceViewTestApplication" ) ; frame.setLayout ( new java.awt.BorderLayout ( ) ) ; frame.add ( traceViewPanel , java.awt.BorderLayout.CENTER ) ; frame.setDefaultCloseOperation ( javax.swing.WindowConstants.DISPOSE_ON_CLOSE ) ; frame.pack ( ) ; frame.setSize ( 800 , 600 ) ; frame.setVisible ( true ) ; traceViewPanel.setTrace ( traceData ) ; }

Target:
private static void createAndShowUI ( ) { final com.android.tools.perflib.vmtrace.viz.TraceView.TraceViewPanel traceViewPanel = new com.android.tools.perflib.vmtrace.viz.TraceView.TraceViewPanel ( ) ; final com.android.tools.perflib.vmtrace.VmTraceData traceData = com.android.tools.perflib.vmtrace.viz.TraceView.getVmTraceData ( com.android.tools.perflib.vmtrace.viz.TraceView.TRACE_FILE_NAME ) ; javax.swing.JFrame frame = new javax.swing.JFrame ( "TraceViewTestApplication" ) ; frame.setLayout ( new java.awt.BorderLayout ( ) ) ; frame.add ( traceViewPanel , java.awt.BorderLayout.CENTER ) ; frame.setDefaultCloseOperation ( javax.swing.WindowConstants.DISPOSE_ON_CLOSE ) ; frame.pack ( ) ; frame.setSize ( 1200 , 800 ) ; frame.setVisible ( true ) ; traceViewPanel.setTrace ( traceData ) ; }
Source:
public void setEncodingContent ( org.apache.harmony.security.asn1.BerOutputStream out ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( org.apache.harmony.security.asn1.ASN1UTCTime.UTC_PATTERN , java.util.Locale.US ) ; sdf.setTimeZone ( java.util.TimeZone.getTimeZone ( "UTC" ) ) ; out.content = sdf.format ( out.content ) . getBytes ( Charsets.UTF_8 ) ; out.length = ( ( byte [ ] ) ( out.content ) ) . length ; }

Target:
public void setEncodingContent ( org.apache.harmony.security.asn1.BerOutputStream out ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( org.apache.harmony.security.asn1.ASN1UTCTime.UTC_PATTERN , java.util.Locale.US ) ; sdf.setTimeZone ( java.util.TimeZone.getTimeZone ( "UTC" ) ) ; out.content = sdf.format ( out.content ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; out.length = ( ( byte [ ] ) ( out.content ) ) . length ; }
Source:
public boolean removeAll ( final java.util.Collection < ? > collection ) { com.google.common.base.Preconditions.checkNotNull ( collection ) ; com.google.common.base.Predicate < E > combinedPredicate = new com.google.common.base.Predicate < E > ( ) { @ java.lang.Override public boolean apply ( E input ) { return ( predicate.apply ( input ) ) && ( collection.contains ( input ) ) ; } } ; return com.google.common.collect.Iterables.removeIf ( unfiltered , combinedPredicate ) ; }

Target:
public boolean retainAll ( final java.util.Collection < ? > collection ) { return com.google.common.collect.Iterables.removeIf ( unfiltered , com.google.common.base.Predicates.and ( predicate , com.google.common.base.Predicates.not ( com.google.common.base.Predicates.in ( collection ) ) ) ) ; }
Source:
public void enter ( ) { log ( ( "Enter Connected: " + ( getCurrentMessage ( ) . what ) ) ) ; broadcastAudioState ( mCurrentDevice , BluetoothA2dpSink.STATE_NOT_PLAYING , BluetoothA2dpSink.STATE_PLAYING ) ; synchronized ( this ) { if ( ( mStreaming ) == null ) { if ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.DBG ) { log ( "Creating New A2dpSinkStreamHandler" ) ; } mStreaming = new com.android.bluetooth.a2dpsink.A2dpSinkStreamHandler ( this , mContext ) ; } } }

Target:
public void enter ( ) { log ( ( "Enter Connected: " + ( getCurrentMessage ( ) . what ) ) ) ; broadcastAudioState ( mCurrentDevice , BluetoothA2dpSink.STATE_NOT_PLAYING , BluetoothA2dpSink.STATE_PLAYING ) ; synchronized ( this ) { if ( ( mStreaming ) == null ) { if ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.DBG ) { log ( "Creating New A2dpSinkStreamHandler" ) ; } mStreaming = new com.android.bluetooth.a2dpsink.A2dpSinkStreamHandler ( this , mContext ) ; } } informAudioFocusStateNative ( 0 ) ; }
Source:
public void update ( com.android.server.wifi.hotspot2.NetworkDetail network , java.util.Map < com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType , com.android.server.wifi.hotspot2.anqp.ANQPElement > anqpElements ) { com.android.server.wifi.hotspot2.AnqpCache.CacheKey key = com.android.server.wifi.hotspot2.AnqpCache.CacheKey.buildKey ( network , com.android.server.wifi.hotspot2.AnqpCache.STANDARD_ESS ) ; synchronized ( mANQPCache ) { com.android.server.wifi.hotspot2.ANQPData data = mANQPCache.get ( key ) ; if ( ( data != null ) && ( data.hasData ( ) ) ) { data.merge ( anqpElements ) ; } else { data = new com.android.server.wifi.hotspot2.ANQPData ( mClock , network , anqpElements ) ; mANQPCache.put ( key , data ) ; } } }

Target:
public com.android.server.wifi.hotspot2.ANQPData getEntry ( com.android.server.wifi.hotspot2.ANQPNetworkKey key ) { return mANQPCache.get ( key ) ; }
Source:
public void test_getParameterCount ( ) throws java.lang.Exception { java.lang.Class [ ] expectedParameters = new java.lang.Class [ ] { java.lang.Object.class } ; java.lang.reflect.Method method = libcore.java.lang.reflect.MethodTest.MethodTestHelper.class . getMethod ( "m2" , expectedParameters ) ; int count = method.getParameterCount ( ) ; assertEquals ( 1 , count ) ; }

Target:
public void test_getParameterCount ( ) throws java.lang.Exception { java.lang.Class [ ] expectedParameters = new java.lang.Class [ 0 ] ; java.lang.reflect.Method method = libcore.java.lang.reflect.MethodTest.MethodTestHelper.class . getMethod ( "m1" , expectedParameters ) ; assertEquals ( 0 , method.getParameterCount ( ) ) ; expectedParameters = new java.lang.Class [ ] { java.lang.Object.class } ; method = libcore.java.lang.reflect.MethodTest.MethodTestHelper.class . getMethod ( "m2" , expectedParameters ) ; int count = method.getParameterCount ( ) ; assertEquals ( 1 , count ) ; }
Source:
public void treeChanged ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { tree = model.getTree ( ) ; selectedNode = model.getSelection ( ) ; setBounds ( ) ; setTransform ( ) ; } } } ) ; doRedraw ( ) ; }

Target:
public void viewportChanged ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { viewport = model.getViewport ( ) ; setBounds ( ) ; setTransform ( ) ; } } } ) ; doRedraw ( ) ; }
Source:
public void connectionServiceFocusLost ( ) { if ( ( mConnSvrFocusListener ) != null ) { mConnSvrFocusListener.onConnectionServiceReleased ( this ) ; } }

Target:
public void connectionServiceFocusLost ( ) { if ( ( mConnSvrFocusListener ) != null ) { mConnSvrFocusListener.onConnectionServiceReleased ( this ) ; } com.android.server.telecom.BindCallback callback = new com.android.server.telecom.BindCallback ( ) { @ java.lang.Override public void onSuccess ( ) { try { mServiceInterface.connectionServiceFocusLost ( android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { android.telecom.Log.d ( this , "failed to inform the focus lost event" ) ; } } @ java.lang.Override public void onFailure ( ) { } } ; mBinder.bind ( callback , null ) ; }
Source:
public WebView.HitTestResult getHitTestResult ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebView.HitTestResult ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebView.HitTestResult > ( ) { @ java.lang.Override public WebView.HitTestResult call ( ) { return getHitTestResult ( ) ; } } ) ; return ret ; } org.chromium.android_webview.AwContents.HitTestData data = mAwContents.getLastHitTestResult ( ) ; mHitTestResult.setType ( data.hitTestResultType ) ; mHitTestResult.setExtra ( data.hitTestResultExtraData ) ; return mHitTestResult ; }

Target:
public void invokeZoomPicker ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { invokeZoomPicker ( ) ; } } ) ; return ; } mAwContents.invokeZoomPicker ( ) ; }
Source:
public void testSwipeOverPartiallyOverlappedView ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.overlapped_pager ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.hasDescendant ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Position #0" ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.swipeLeft ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.hasDescendant ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Position #1" ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.swipeRight ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.hasDescendant ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Position #0" ) ) ) ) ; }

Target:
public void swipeOverPartiallyOverlappedView ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.overlapped_pager ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.hasDescendant ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Position #0" ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.swipeLeft ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.hasDescendant ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Position #1" ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.swipeRight ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.hasDescendant ( android.support.test.espresso.matcher.ViewMatchers.withText ( "Position #0" ) ) ) ) ; }
Source:
public void run ( ) { try { barrier.await ( ) ; task.run ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.BrokenBarrierException e ) { com.android.server.telecom.Log.e ( this , e , "Unexpectedly interrupted" ) ; } finally { latch.countDown ( ) ; } }

Target:
public void run ( ) { try { barrier.await ( ) ; task.run ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.BrokenBarrierException e ) { android.telecom.Log.e ( this , e , "Unexpectedly interrupted" ) ; } finally { latch.countDown ( ) ; } }
Source:
public long insert ( com.android.dialer.speeddial.database.SpeedDialEntry entry ) { long updateRowId ; try ( android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ) { updateRowId = db.insert ( com.android.dialer.speeddial.database.SpeedDialEntryDatabaseHelper.TABLE_NAME , null , buildContentValues ( entry ) ) ; } if ( updateRowId == ( - 1 ) ) { throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( "Attempted to insert a row that already exists." ) ; } return updateRowId ; }

Target:
public void update ( com.google.common.collect.ImmutableList < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { if ( entries.isEmpty ( ) ) { return ; } android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; db.beginTransaction ( ) ; try { update ( db , entries ) ; db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; db.close ( ) ; } }
Source:
public void testAesGcm96Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.getKey ( 288 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , true , 1 , true ) ; }

Target:
public void testAesCbcHmacSha512Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public void addTypeMapping ( @ javax.annotation.Nonnegative int index , @ javax.annotation.Nonnull com.android.jack.dx.rop.cst.CstType cstType ) { assert ( ( types [ index ] ) == null ) || ( ( types [ index ] . compareTo ( cstType ) ) == 0 ) ; if ( ( types [ index ] ) == null ) { types [ index ] = cstType ; } }

Target:
public void addTypeMapping ( @ javax.annotation.Nonnegative int index , @ javax.annotation.Nonnull com.android.jack.dx.rop.type.Type type ) { assert ( ( types [ index ] ) == null ) || ( ( types [ index ] . compareTo ( type ) ) == 0 ) ; if ( ( types [ index ] ) == null ) { types [ index ] = type ; } }
Source:
public void start ( ) { android.util.Log.d ( com.android.server.connectivity.tethering.OffloadController.TAG , "tethering offload not supported" ) ; }

Target:
public void start ( ) { if ( started ( ) ) return ; if ( ! ( mConfigInitialized ) ) { mConfigInitialized = mHwInterface.initOffloadConfig ( ) ; if ( ! ( mConfigInitialized ) ) { mLog.i ( "tethering offload config not supported" ) ; return ; } } mControlInitialized = mHwInterface.initOffloadControl ( ) ; }
Source:
private void waitPackageActionComplete ( ) { com.android.cts.Log.d ( "Enter waitPackageActionComplete()" ) ; synchronized ( this ) { if ( ! ( mTestStop ) ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.e ( "" , e ) ; } } } try { java.lang.Thread.sleep ( HostConfig.Ints.postInstallWaitMs.value ( ) ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.e ( "" , e ) ; } com.android.cts.Log.d ( "Leave waitPackageActionComplete()" ) ; }

Target:
private void waitPackageActionComplete ( ) { com.android.cts.Log.d ( "Enter waitPackageActionComplete()" ) ; synchronized ( this ) { if ( ! ( mTestStop ) ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.d ( "interrupted while waiting for package action complete" ) ; } } } try { java.lang.Thread.sleep ( HostConfig.Ints.postInstallWaitMs.value ( ) ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.d ( "sleeping after package action complete interrupted" ) ; } com.android.cts.Log.d ( "Leave waitPackageActionComplete()" ) ; }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction withIndex ( int newIndex ) { return new com.android.jack.dx.io.instructions.TwoRegisterDecodedInstruction ( getFormat ( ) , getOpcode ( ) , newIndex , getIndexType ( ) , getTarget ( ) , getLiteral ( ) , a , b ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction withIndex ( int newFirstIndex , int newSecondIndex ) { assert ( getSecondIndexType ( ) ) == ( com.android.jack.dx.io.IndexType.NONE ) ; return new com.android.jack.dx.io.instructions.TwoRegisterDecodedInstruction ( getFormat ( ) , getOpcode ( ) , newFirstIndex , getFirstIndexType ( ) , getTarget ( ) , getLiteral ( ) , a , b ) ; }
Source:
protected void made ( java.lang.Object o , java.lang.Object r ) { if ( ( com.google.doclava.Converter.mClassesNeedingInit ) == null ) { com.google.doclava.Converter.initClass ( ( ( com.google.doclava.ClassDoc ) ( o ) ) , ( ( com.google.doclava.ClassInfo ) ( r ) ) ) ; ( ( com.google.doclava.ClassInfo ) ( r ) ) . init2 ( ) ; } }

Target:
protected void made ( java.lang.Object o , java.lang.Object r ) { if ( ( com.google.doclava.Converter.mClassesNeedingInit ) == null ) { com.google.doclava.Converter.initClass ( ( ( com.sun.javadoc.ClassDoc ) ( o ) ) , ( ( com.google.doclava.ClassInfo ) ( r ) ) ) ; ( ( com.google.doclava.ClassInfo ) ( r ) ) . init2 ( ) ; } }
Source:
public int read ( ) throws java.io.IOException { if ( ( pos ) >= ( count ) ) { fill ( ) ; if ( ( pos ) >= ( count ) ) { return - 1 ; } } return ( buf [ ( ( pos ) ++ ) ] ) & 255 ; }

Target:
public int read ( ) throws java.io.IOException { if ( ( pos ) >= ( count ) ) { fill ( ) ; if ( ( pos ) >= ( count ) ) { return - 1 ; } } return java.lang.Byte.toUnsignedInt ( buf [ ( ( pos ) ++ ) ] ) ; }
Source:
public com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode findUiChildNode ( java.lang.String path ) { java.lang.String [ ] items = path.split ( "/" ) ; com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode ui_node = this ; for ( java.lang.String item : items ) { boolean next_segment = false ; for ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode c : ui_node.mUiChildren ) { if ( c.getDescriptor ( ) . getXmlName ( ) . equals ( item ) ) { ui_node = c ; next_segment = true ; break ; } } if ( ! next_segment ) { return null ; } } return ui_node ; }

Target:
public com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode findUiChildNode ( java.lang.String path ) { java.lang.String [ ] items = path.split ( "/" ) ; com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode uiNode = this ; for ( java.lang.String item : items ) { boolean nextSegment = false ; for ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode c : uiNode.mUiChildren ) { if ( c.getDescriptor ( ) . getXmlName ( ) . equals ( item ) ) { uiNode = c ; nextSegment = true ; break ; } } if ( ! nextSegment ) { return null ; } } return uiNode ; }
Source:
public java.io.File getJarJarRuleFile ( ) { return ( mBuildType.getJarJarRuleFile ( ) ) != null ? mBuildType.getJarJarRuleFile ( ) : getMergedFlavor ( ) . getJarJarRuleFile ( ) ; }

Target:
public java.util.Collection < java.io.File > getJarJarRuleFiles ( ) { com.google.common.collect.ImmutableList.Builder < java.io.File > jarjarRuleFiles = com.google.common.collect.ImmutableList.builder ( ) ; jarjarRuleFiles.addAll ( getMergedFlavor ( ) . getJarJarRuleFiles ( ) ) ; jarjarRuleFiles.addAll ( mBuildType.getJarJarRuleFiles ( ) ) ; return jarjarRuleFiles.build ( ) ; }
Source:
public static com.android.jack.dx.rop.code.SourcePosition getSourcePosition ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode stmt ) { if ( ( stmt.getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) { return com.android.jack.dx.rop.code.SourcePosition.NO_INFO ; } int startLine = stmt.getSourceInfo ( ) . getStartLine ( ) ; return new com.android.jack.dx.rop.code.SourcePosition ( new com.android.jack.dx.rop.cst.CstString ( stmt.getSourceInfo ( ) . getFileName ( ) ) , ( - 1 ) , ( startLine == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN_LINE_NUMBER ) ? - 1 : startLine ) ) ; }

Target:
public static com.android.jack.dx.rop.code.SourcePosition getSourcePosition ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo sourceInfo ) { if ( sourceInfo == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) { return com.android.jack.dx.rop.code.SourcePosition.NO_INFO ; } int startLine = sourceInfo.getStartLine ( ) ; return new com.android.jack.dx.rop.code.SourcePosition ( new com.android.jack.dx.rop.cst.CstString ( sourceInfo.getFileName ( ) ) , ( - 1 ) , ( startLine == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN_LINE_NUMBER ) ? - 1 : startLine ) ) ; }
Source:
public void testCreateSession ( ) throws java.lang.Exception { java.lang.String tag = "test session" ; android.media.session.MediaSession session = new android.media.session.MediaSession ( getContext ( ) , tag ) ; assertNotNull ( session.getSessionToken ( ) ) ; assertFalse ( "New session should not be active" , session.isActive ( ) ) ; android.media.session.MediaController controller = session.getController ( ) ; assertNotNull ( controller ) ; verifyNewSession ( controller , tag ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mAudioManager = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; mSession = new android.media.session.MediaSession ( getContext ( ) , android.media.cts.MediaSessionTest.TEST_SESSION_TAG ) ; }
Source:
public static boolean shouldSystemBlockNumber ( android.content.Context context , java.lang.String phoneNumber , android.os.Bundle extras ) { final android.os.Bundle res = context.getContentResolver ( ) . call ( android.provider.BlockedNumberContract.AUTHORITY_URI , android.provider.BlockedNumberContract.SystemContract.METHOD_SHOULD_SYSTEM_BLOCK_NUMBER , phoneNumber , extras ) ; return ( res != null ) && ( res.getBoolean ( android.provider.BlockedNumberContract.RES_NUMBER_IS_BLOCKED , false ) ) ; }

Target:
public static boolean shouldSystemBlockNumber ( android.content.Context context , java.lang.String phoneNumber , android.os.Bundle extras ) { try { final android.os.Bundle res = context.getContentResolver ( ) . call ( android.provider.BlockedNumberContract.AUTHORITY_URI , android.provider.BlockedNumberContract.SystemContract.METHOD_SHOULD_SYSTEM_BLOCK_NUMBER , phoneNumber , extras ) ; return ( res != null ) && ( res.getBoolean ( android.provider.BlockedNumberContract.RES_NUMBER_IS_BLOCKED , false ) ) ; } catch ( java.lang.NullPointerException | java.lang.IllegalArgumentException ex ) { android.telecom.Log.w ( null , "shouldSystemBlockNumber: provider not ready." ) ; return false ; } }
Source:
static void requestDeleteManagedProfile ( android.content.Context context ) { try { android.content.Intent intent = new android.content.Intent ( com.android.cts.verifier.managedprovisioning.ByodHelperActivity.ACTION_REMOVE_MANAGED_PROFILE ) ; context.startActivity ( intent ) ; java.lang.String message = context.getString ( R.string.provisioning_byod_delete_profile ) ; android.widget.Toast.makeText ( context , message , Toast.LENGTH_SHORT ) . show ( ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.d ( com.android.cts.verifier.managedprovisioning.Utils.TAG , "requestDeleteProfileOwner: ActivityNotFoundException" , e ) ; } }

Target:
static void requestDeleteManagedProfile ( android.content.Context context ) { try { android.content.Intent intent = new android.content.Intent ( ByodHelperActivity.ACTION_REMOVE_MANAGED_PROFILE ) ; context.startActivity ( intent ) ; java.lang.String message = context.getString ( R.string.provisioning_byod_delete_profile ) ; android.widget.Toast.makeText ( context , message , Toast.LENGTH_SHORT ) . show ( ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.d ( com.android.cts.verifier.managedprovisioning.Utils.TAG , "requestDeleteProfileOwner: ActivityNotFoundException" , e ) ; } }
Source:
public final boolean bool_literal ( ) throws org.jf.smali.RecognitionException { boolean value = false ; org.antlr.runtime.tree.CommonTree BOOL_LITERAL217 = null ; try { { BOOL_LITERAL217 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.BOOL_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_BOOL_LITERAL_in_bool_literal3619 ) ) ) ; value = java.lang.Boolean.parseBoolean ( ( BOOL_LITERAL217 != null ? BOOL_LITERAL217.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final boolean bool_literal ( ) throws org.jf.smali.RecognitionException { boolean value = false ; org.antlr.runtime.tree.CommonTree BOOL_LITERAL212 = null ; try { { BOOL_LITERAL212 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.BOOL_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_BOOL_LITERAL_in_bool_literal3504 ) ) ) ; value = java.lang.Boolean.parseBoolean ( ( BOOL_LITERAL212 != null ? BOOL_LITERAL212.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public void run ( ) { org.eclipse.swt.graphics.Color c = mVerboseColor ; for ( org.eclipse.swt.widgets.TableItem it : mTable.getItems ( ) ) { java.lang.Object data = it.getData ( ) ; if ( data instanceof com.android.ddmuilib.logcat.LogCatMessage ) { c = getForegroundColor ( ( ( com.android.ddmuilib.logcat.LogCatMessage ) ( data ) ) ) ; } it.setForeground ( c ) ; } }

Target:
public void run ( ) { org.eclipse.swt.graphics.Color c = mVerboseColor ; for ( org.eclipse.swt.widgets.TableItem it : mTable.getItems ( ) ) { java.lang.Object data = it.getData ( ) ; if ( data instanceof com.android.ddmlib.logcat.LogCatMessage ) { c = getForegroundColor ( ( ( com.android.ddmlib.logcat.LogCatMessage ) ( data ) ) ) ; } it.setForeground ( c ) ; } }
Source:
public void testCreateSession ( ) throws java.lang.Exception { java.lang.String tag = "test session" ; android.media.session.MediaSession session = new android.media.session.MediaSession ( getContext ( ) , tag ) ; assertNotNull ( session.getSessionToken ( ) ) ; assertFalse ( "New session should not be active" , session.isActive ( ) ) ; android.media.session.MediaController controller = session.getController ( ) ; assertNotNull ( controller ) ; verifyNewSession ( controller , tag ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { mSession.release ( ) ; super . tearDown ( ) ; }
Source:
public static int $noinline$runSmaliTestConst ( java.lang.String name , int arg ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , int . class ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , arg ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }

Target:
public static int $noinline$runSmaliTestInt ( java.lang.String name , int arg ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , int . class ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , arg ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }
Source:
protected void handleUpdateState ( com.android.systemui.qs.tiles.BooleanState state , java.lang.Object arg ) { final android.graphics.drawable.Drawable mEnable = mContext.getDrawable ( R.drawable.ic_qs_nfc_enabled ) ; final android.graphics.drawable.Drawable mDisable = mContext.getDrawable ( R.drawable.ic_qs_nfc_disabled ) ; state.value = ( ( mAdapter ) == null ) ? false : mAdapter.isEnabled ( ) ; state.label = mContext.getString ( R.string.quick_settings_nfc_label ) ; state.icon = new com.android.systemui.qs.tiles.DrawableIcon ( ( state.value ? mEnable : mDisable ) ) ; state.minimalAccessibilityClassName = state.expandedAccessibilityClassName = android.widget.Switch.class . getName ( ) ; state.contentDescription = state.label ; }

Target:
private android.nfc.NfcAdapter getAdapter ( ) { if ( ( mAdapter ) == null ) { try { mAdapter = android.nfc.NfcAdapter.getNfcAdapter ( mContext ) ; } catch ( java.lang.UnsupportedOperationException e ) { mAdapter = null ; } } return mAdapter ; }
Source:
public void testWildcardMatchesChildDomain ( ) { assertFalse ( verifier.verifyHostName ( "a.b.c.d" , "*.c.d" ) ) ; }

Target:
public void testNullParameters ( ) { java.lang.String hostname = "www.example.com" ; libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubSSLSession session = new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubSSLSession ( ) ; session.peerCertificates = new java.security.cert.Certificate [ ] { new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=www.example.com" ) } ; verifier.verify ( hostname , session ) ; try { verifier.verify ( hostname , null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { verifier.verify ( null , session ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }
Source:
private int moveDexFilesLI ( android.content.pm.PackageParser.Package newPackage ) { if ( ( ( newPackage.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_HAS_CODE ) ) != 0 ) { int retCode = mInstaller.movedex ( newPackage.mScanPath , newPackage.mPath ) ; if ( retCode != 0 ) { mInstaller.rmdex ( newPackage.mPath ) ; } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }

Target:
private int moveDexFilesLI ( android.content.pm.PackageParser.Package newPackage ) { if ( ( ( newPackage.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_HAS_CODE ) ) != 0 ) { final java.lang.String instructionSet = getAppInstructionSet ( newPackage.applicationInfo ) ; int retCode = mInstaller.movedex ( newPackage.mScanPath , newPackage.mPath , instructionSet ) ; if ( retCode != 0 ) { newPackage.mDexOptNeeded = true ; mInstaller.rmdex ( newPackage.mScanPath , instructionSet ) ; mInstaller.rmdex ( newPackage.mPath , instructionSet ) ; } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }
Source:
public void pushProgramToDevice ( java.lang.String programName , java.lang.String testLocation ) { assert ! ( isHost ) ; if ( ! ( programPushed ) ) { executeCommand ( ( ( ( ( getExecutionPrefixWithAdb ( "push" ) ) + programName ) + " " ) + testLocation ) , false ) ; programPushed = true ; } }

Target:
public void pushProgramToDevice ( java.lang.String programName , java.lang.String testLocation ) { assert ! ( isHost ) ; if ( ! ( programPushed ) ) { java.lang.String command = ( ( ( getExecutionPrefixWithAdb ( "push" ) ) + programName ) + " " ) + testLocation ; dexfuzz.ExecutionResult result = executeCommand ( command , false ) ; if ( ( result.returnValue ) != 0 ) { dexfuzz.Log.errorAndQuit ( "Could not ADB PUSH program to device." ) ; } programPushed = true ; } }
Source:
void expectAvailableAndValidatedCallbacks ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent ) { expectAvailableCallbacks ( agent , false , com.android.server.ConnectivityServiceTest.TestNetworkCallback.TIMEOUT_MS ) ; expectCapabilitiesWith ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent ) ; }

Target:
void expectAvailableDoubleValidatedCallbacks ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , agent , com.android.server.ConnectivityServiceTest.TestNetworkCallback.TIMEOUT_MS ) ; android.net.NetworkCapabilities nc1 = expectCapabilitiesWith ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent ) ; expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.LINK_PROPERTIES , agent , com.android.server.ConnectivityServiceTest.TestNetworkCallback.TIMEOUT_MS ) ; android.net.NetworkCapabilities nc2 = expectCapabilitiesWith ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent ) ; org.junit.Assert.assertEquals ( nc1 , nc2 ) ; }
Source:
public boolean unplug ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothHidDevice.TAG , ( "unplug(): device=" + device ) ) ; boolean result = false ; final android.bluetooth.IBluetoothHidDevice service = mService ; if ( service != null ) { try { result = service.unplug ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHidDevice.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHidDevice.TAG , "Proxy not attached to service" ) ; } return result ; }

Target:
public void onVirtualCableUnplug ( android.bluetooth.BluetoothDevice device ) { android.util.Log.d ( android.bluetooth.BluetoothHidDevice.Callback.TAG , ( "onVirtualCableUnplug: device=" + device ) ) ; }
Source:
public void testConvertMarkup4 ( ) throws java.lang.Exception { java.lang.String explanation = "The manifest should contain a `<uses-sdk>` element which defines the " + ( ( "minimum minimum API Level required for the application to run, " + "as well as the target version (the highest API level you have tested " ) + "the version for.)" ) ; assertEquals ( ( "The manifest should contain a <code>&lt;uses-sdk></code> element which defines the " + ( ( "minimum minimum API Level required for the application to run, " + "as well as the target version (the highest API level you have tested " ) + "the version for.)" ) ) , com.android.tools.lint.detector.api.Issue.convertMarkup ( explanation , true ) ) ; }

Target:
public void testIssueUrls ( ) { com.android.tools.lint.detector.api.Implementation implementation = new com.android.tools.lint.detector.api.Implementation ( com.android.tools.lint.checks.AccessibilityDetector.class , Scope.RESOURCE_FILE_SCOPE ) ; com.android.tools.lint.detector.api.Issue issue = com.android.tools.lint.detector.api.Issue.create ( "MyId" , "ShortDesc" , "Desc" , "Explanation" , Category.CORRECTNESS , 10 , Severity.ERROR , implementation ) ; assertTrue ( issue.getMoreInfo ( ) . isEmpty ( ) ) ; java.lang.String url1 = "http://tools.android.com" ; java.lang.String url2 = "http://tools.android.com/recent" ; issue.addMoreInfo ( url1 ) ; assertEquals ( java.util.Collections.singletonList ( url1 ) , issue.getMoreInfo ( ) ) ; issue.addMoreInfo ( url2 ) ; assertEquals ( java.util.Arrays.asList ( url1 , url2 ) , issue.getMoreInfo ( ) ) ; }
Source:
private boolean handleProjectSelection ( org.eclipse.core.resources.IProject project ) { try { if ( project.hasNature ( AndroidConstants.NATURE_DEFAULT ) ) { if ( ( mCurrentProject ) != project ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources projRes = com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getInstance ( ) . getProjectResources ( project ) ; if ( projRes != null ) { mTreeViewer.setInput ( projRes ) ; mCurrentProject = project ; return true ; } } } } catch ( org.eclipse.core.runtime.CoreException e ) { } return false ; }

Target:
private boolean handleProjectSelection ( org.eclipse.core.resources.IProject project ) { try { if ( project.hasNature ( AdtConstants.NATURE_DEFAULT ) ) { if ( ( mCurrentProject ) != project ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources projRes = com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getInstance ( ) . getProjectResources ( project ) ; if ( projRes != null ) { mTreeViewer.setInput ( projRes ) ; mCurrentProject = project ; return true ; } } } } catch ( org.eclipse.core.runtime.CoreException e ) { } return false ; }
Source:
void createReportTasks ( org.gradle.model.collection.CollectionBuilder < org.gradle.api.Task > tasks , com.android.build.gradle.model.AndroidComponentSpec spec ) { com.android.build.gradle.internal.VariantManager variantManager ; ( spec = DefaultAndroidComponentSpec ) . new tasks.create ( "androidDependencies" , DependencyReportTask ) { com.android.build.gradle.internal.tasks.DependencyReportTask dependencyReportTask = com.android.build.gradle.model.dependencyReportTask.setDescription ( "Displays the Android dependencies of the project" ) . setVariants ( variantManager.variantDataList ) . setGroup ( "Android" ) [ tasks.create ( "signingReport" , com.android.build.gradle.internal.tasks.SigningReportTask ) ] ; { com.android.build.gradle.internal.tasks.SigningReportTask signingReportTask ; signingReportTask.setDescription ( "Displays the signing info for each variant" ) ; signingReportTask.setVariants ( variantManager.variantDataList ) ; signingReportTask.setGroup ( "Android" ) ; } } ; }

Target:
public void execute ( com.android.build.gradle.internal.tasks.SigningReportTask signingReportTask ) { signingReportTask.setDescription ( "Displays the signing info for each variant" ) ; signingReportTask.setVariants ( variantManager.getVariantDataList ( ) ) ; signingReportTask.setGroup ( "Android" ) ; }
Source:
public void write ( @ javax.annotation.Nonnull java.io.PrintStream ps ) { writeMapOne2Many ( ps , hierarchyDependencies ) ; ps.print ( Dependency.MAP_SEPARATOR ) ; ps.println ( ) ; writeMapOne2Many ( ps , constantDependencies ) ; ps.print ( Dependency.MAP_SEPARATOR ) ; ps.println ( ) ; writeMapOne2Many ( ps , codeDependencies ) ; ps.print ( Dependency.MAP_SEPARATOR ) ; ps.println ( ) ; }

Target:
public void write ( @ javax.annotation.Nonnull java.io.PrintStream ps ) { writeMapOne2Many ( ps , hierarchyDependencies ) ; ps.print ( Dependency.END_OF_MAP ) ; ps.println ( ) ; writeMapOne2Many ( ps , constantDependencies ) ; ps.print ( Dependency.END_OF_MAP ) ; ps.println ( ) ; writeMapOne2Many ( ps , codeDependencies ) ; ps.print ( Dependency.END_OF_MAP ) ; ps.println ( ) ; }
Source:
private com.android.ide.eclipse.ndk.internal.NativeAbi getCompatibleAbi ( java.lang.String deviceAbi1 , java.lang.String deviceAbi2 , java.util.Collection < com.android.ide.eclipse.ndk.internal.NativeAbi > appAbis ) { for ( com.android.ide.eclipse.ndk.internal.NativeAbi abi : appAbis ) { if ( ( abi.toString ( ) . equals ( deviceAbi1 ) ) || ( abi.toString ( ) . equals ( deviceAbi2 ) ) ) { return abi ; } } return null ; }

Target:
private com.android.ide.eclipse.ndk.internal.NativeAbi getCompatibleAbi ( java.lang.String deviceAbi1 , java.lang.String deviceAbi2 , java.util.Collection < com.android.ide.eclipse.ndk.internal.NativeAbi > appAbis ) { for ( com.android.ide.eclipse.ndk.internal.NativeAbi abi : appAbis ) { if ( ( abi.getAbi ( ) . equals ( deviceAbi1 ) ) || ( abi.getAbi ( ) . equals ( deviceAbi2 ) ) ) { return abi ; } } return null ; }