auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void init ( com.android.ide.eclipse.adt.internal.project.AndroidManifestParser manifestParser ) { com.android.ide.eclipse.adt.internal.project.AndroidManifestParser.Instrumentation [ ] instrumentations = manifestParser.getInstrumentations ( ) ; mInstrumentationNames = new java.lang.String [ instrumentations.length ] ; for ( int i = 0 ; i < ( instrumentations.length ) ; i ++ ) { mInstrumentationNames [ i ] = instrumentations [ i ] . getName ( ) ; } mHasRunnerLibrary = hasTestRunnerLibrary ( manifestParser ) ; }

Target:
private void init ( com.android.sdklib.xml.AndroidManifestParser.ManifestData manifestData ) { com.android.sdklib.xml.AndroidManifestParser.Instrumentation [ ] instrumentations = manifestData.getInstrumentations ( ) ; mInstrumentationNames = new java.lang.String [ instrumentations.length ] ; for ( int i = 0 ; i < ( instrumentations.length ) ; i ++ ) { mInstrumentationNames [ i ] = instrumentations [ i ] . getName ( ) ; } mHasRunnerLibrary = hasTestRunnerLibrary ( manifestData ) ; }
Source:
public void printPlan ( @ javax.annotation.Nonnull com.android.sched.scheduler.Plan < ? > plan ) throws com.android.sched.util.file.CannotWriteException { com.android.sched.util.stream.ExtendedPrintWriter writer = planFile.getPrintWriter ( ) ; try { writer.println ( plan.getDescription ( ) ) ; } finally { writer.close ( ) ; try { writer.throwPendingException ( ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotWriteException ( planFile.getLocation ( ) , e ) ; } } }

Target:
public void printPlan ( @ javax.annotation.Nonnull com.android.sched.scheduler.Plan < ? > plan ) throws com.android.sched.util.file.CannotWriteException { com.android.sched.util.stream.CustomPrintWriter writer = planFile.getPrintWriter ( ) ; try { writer.println ( plan.getDescription ( ) ) ; } finally { writer.close ( ) ; try { writer.throwPendingException ( ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotWriteException ( planFile.getLocation ( ) , e ) ; } } }
Source:
public long getDelayUntilTime ( android.accounts.Account account , java.lang.String providerName ) { synchronized ( mAuthorities ) { android.content.SyncStorageEngine.AuthorityInfo authority = getAuthorityLocked ( account , providerName , "getDelayUntil" ) ; if ( authority == null ) { return 0 ; } return authority.delayUntil ; } }

Target:
public android.util.Pair < java.lang.Long , java.lang.Long > getBackoff ( android.accounts.Account account , int userId , java.lang.String providerName ) { synchronized ( mAuthorities ) { android.content.SyncStorageEngine.AuthorityInfo authority = getAuthorityLocked ( account , userId , providerName , "getBackoff" ) ; if ( ( authority == null ) || ( ( authority.backoffTime ) < 0 ) ) { return null ; } return android.util.Pair.create ( authority.backoffTime , authority.backoffDelay ) ; } }
Source:
public com.android.tools.perflib.heap.Heap setHeapTo ( int id , java.lang.String name ) { com.android.tools.perflib.heap.Heap heap = mHeaps.get ( id ) ; if ( heap == null ) { heap = new com.android.tools.perflib.heap.Heap ( name ) ; heap.mSnapshot = this ; mHeaps.put ( id , heap ) ; } mCurrentHeap = heap ; return mCurrentHeap ; }

Target:
public com.android.tools.perflib.heap.Heap getHeap ( int id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { if ( ( mHeaps.get ( i ) . getId ( ) ) == id ) { return mHeaps.get ( i ) ; } } return null ; }
Source:
public void testParagraphTagGeneration ( ) { getSettings ( ) . getRootSettings ( ) . ENABLE_JAVADOC_FORMATTING = true ; getSettings ( ) . getRootSettings ( ) . JD_P_AT_EMPTY_LINES = true ; doTextTest ( ( "/**\n" + ( ( ( ( ( ( ( ( ( ( " * line 1\n" + " *\n" ) + " * line 2\n" ) + " * <pre>\n" ) + " * line 3\n" ) + " *\n" ) + " * line 4\n" ) + " * </pre>\n" ) + " */\n" ) + "class Test {\n" ) + "}" ) ) , ( "/**\n" + ( ( ( ( ( ( ( ( ( ( " * line 1\n" + " * <p/>\n" ) + " * line 2\n" ) + " * <pre>\n" ) + " * line 3\n" ) + " *\n" ) + " * line 4\n" ) + " * </pre>\n" ) + " */\n" ) + "class Test {\n" ) + "}" ) ) ) ; }

Target:
public void testParagraphTagGeneration ( ) { getSettings ( ) . getRootSettings ( ) . ENABLE_JAVADOC_FORMATTING = true ; getSettings ( ) . getRootSettings ( ) . JD_P_AT_EMPTY_LINES = true ; com.intellij.openapi.roots.LanguageLevelProjectExtension.getInstance ( getProject ( ) ) . setLanguageLevel ( LanguageLevel.JDK_1_7 ) ; doTextTest ( ( "/**\n" + ( ( ( ( ( ( ( ( ( ( " * line 1\n" + " *\n" ) + " * line 2\n" ) + " * <pre>\n" ) + " * line 3\n" ) + " *\n" ) + " * line 4\n" ) + " * </pre>\n" ) + " */\n" ) + "class Test {\n" ) + "}" ) ) , ( "/**\n" + ( ( ( ( ( ( ( ( ( ( " * line 1\n" + " * <p/>\n" ) + " * line 2\n" ) + " * <pre>\n" ) + " * line 3\n" ) + " *\n" ) + " * line 4\n" ) + " * </pre>\n" ) + " */\n" ) + "class Test {\n" ) + "}" ) ) ) ; }
Source:
private boolean showDuoPrimaryButton ( ) { return ( ( ( accountHandle ) != null ) && ( accountHandle.getComponentName ( ) . equals ( DuoConstants.PHONE_ACCOUNT_COMPONENT_NAME ) ) ) && ( com.android.dialer.duo.DuoComponent.get ( context ) . getDuo ( ) . isReachable ( context , number ) ) ; }

Target:
private boolean showDuoPrimaryButton ( ) { com.android.dialer.duo.Duo duo = com.android.dialer.duo.DuoComponent.get ( context ) . getDuo ( ) ; return ( ( ( accountHandle ) != null ) && ( duo.isDuoAccount ( accountHandle ) ) ) && ( duo.isReachable ( context , number ) ) ; }
Source:
public void requestIccSimAuthentication ( int authContext , java.lang.String data , java.lang.String aid , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SIM_AUTHENTICATION , response ) ; rr.mParcel.writeInt ( authContext ) ; rr.mParcel.writeString ( data ) ; rr.mParcel.writeString ( aid ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void requestIccSimAuthentication ( int authContext , java.lang.String data , java.lang.String aid , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SIM_AUTHENTICATION , response , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( authContext ) ; rr.mParcel.writeString ( data ) ; rr.mParcel.writeString ( aid ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public void onLoadFinished ( android.content.Loader < android.database.Cursor > loader , android.database.Cursor data ) { adapter.setContactCursor ( data ) ; fragment.setEmptyViewVisibility ( ( ( adapter.getCount ( ) ) == 0 ) ) ; }

Target:
public void onLoadFinished ( android.content.Loader < android.database.Cursor > loader , android.database.Cursor data ) { adapter.setContactCursor ( data ) ; fragment.setEmptyViewVisibility ( ( ( adapter.getCount ( ) ) == 0 ) ) ; com.android.dialer.common.FragmentUtils.getParentUnsafe ( fragment , com.android.dialer.app.list.OldSpeedDialFragment.HostInterface.class ) . setHasFrequents ( ( ( adapter.getNumFrequents ( ) ) > 0 ) ) ; }
Source:
public void testOnSetUpAdapterSingleInstance ( ) throws java.lang.Exception { java.io.File testAdapter = new java.io.File ( mTestDir , ( ( VTS_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ; testAdapter.createNewFile ( ) ; java.lang.String output = "android.hardware.foo@1.1::IFoo/default" ; doReturn ( output ) . doReturn ( "" ) . when ( mDevice ) . executeShellCommand ( java.lang.String.format ( LIST_HAL_CMD , TEST_HAL_PACKAGE ) ) ; mPreparer.setUp ( mDevice , mBuildInfo ) ; verify ( mDevice , times ( 1 ) ) . pushFile ( eq ( testAdapter ) , eq ( ( ( TARGET_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ) ; java.lang.String adapterCmd = java.lang.String.format ( "%s /data/nativetest64/%s %s %s %d" , SCRIPT_PATH , TEST_HAL_ADAPTER_BINARY , "IFoo" , "default" , THREAD_COUNT_DEFAULT ) ; verify ( mDevice , times ( 1 ) ) . executeShellCommand ( eq ( adapterCmd ) ) ; }

Target:
public void testOnSetUpAdapterSingleInstance ( ) throws java.lang.Exception { java.io.File testAdapter = createTestAdapter ( ) ; java.lang.String output = "android.hardware.foo@1.1::IFoo/default" ; doReturn ( output ) . doReturn ( "" ) . when ( mDevice ) . executeShellCommand ( java.lang.String.format ( LIST_HAL_CMD , TEST_HAL_PACKAGE ) ) ; mPreparer.setUp ( mDevice , mBuildInfo ) ; verify ( mDevice , times ( 1 ) ) . pushFile ( eq ( testAdapter ) , eq ( ( ( TARGET_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ) ; java.lang.String adapterCmd = java.lang.String.format ( "%s /data/nativetest64/%s %s %s %d" , SCRIPT_PATH , TEST_HAL_ADAPTER_BINARY , "IFoo" , "default" , THREAD_COUNT_DEFAULT ) ; verify ( mDevice , times ( 1 ) ) . executeShellCommand ( eq ( adapterCmd ) ) ; }
Source:
static com.android.systemui.statusbar.policy.NetworkControllerImpl.Config readConfig ( android.content.Context context ) { com.android.systemui.statusbar.policy.NetworkControllerImpl.Config config = new com.android.systemui.statusbar.policy.NetworkControllerImpl.Config ( ) ; android.content.res.Resources res = context.getResources ( ) ; config.showAtLeast3G = res.getBoolean ( R.bool.config_showMin3G ) ; config.alwaysShowCdmaRssi = res.getBoolean ( com.android.internal.R.bool.config_alwaysUseCdmaRssi ) ; config.show4gForLte = res.getBoolean ( R.bool.config_show4GForLTE ) ; config.hspaDataDistinguishable = res.getBoolean ( R.bool.config_hspa_data_distinguishable ) ; return config ; }

Target:
static com.android.systemui.statusbar.policy.NetworkControllerImpl.Config readConfig ( android.content.Context context ) { com.android.systemui.statusbar.policy.NetworkControllerImpl.Config config = new com.android.systemui.statusbar.policy.NetworkControllerImpl.Config ( ) ; android.content.res.Resources res = context.getResources ( ) ; config.showAtLeast3G = res.getBoolean ( R.bool.config_showMin3G ) ; config.alwaysShowCdmaRssi = res.getBoolean ( com.android.internal.R.bool.config_alwaysUseCdmaRssi ) ; config.show4gForLte = res.getBoolean ( R.bool.config_show4GForLTE ) ; config.hspaDataDistinguishable = res.getBoolean ( R.bool.config_hspa_data_distinguishable ) ; config.hideLtePlus = res.getBoolean ( R.bool.config_hideLtePlus ) ; return config ; }
Source:
private com.android.jack.dx.rop.annotation.Annotation createAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotationLiteral annotationLiteral ) throws com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException { com.android.jack.dx.rop.annotation.Annotation ropAnnotation = new com.android.jack.dx.rop.annotation.Annotation ( com.android.jack.backend.dex.rop.RopHelper.getCstType ( annotationLiteral.getType ( ) ) , com.android.jack.backend.dex.AnnotationBuilder.getVisibility ( annotationLiteral.getRetentionPolicy ( ) ) ) ; constantBuilder.createAnnotationPairs ( annotationLiteral , ropAnnotation ) ; ropAnnotation.setImmutable ( ) ; return ropAnnotation ; }

Target:
private com.android.jack.dx.rop.annotation.Annotation createAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotation annotation ) throws com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException { com.android.jack.dx.rop.annotation.Annotation ropAnnotation = new com.android.jack.dx.rop.annotation.Annotation ( com.android.jack.backend.dex.rop.RopHelper.getCstType ( annotation.getType ( ) ) , com.android.jack.backend.dex.AnnotationBuilder.getVisibility ( annotation.getRetentionPolicy ( ) ) ) ; constantBuilder.createAnnotationPairs ( annotation , ropAnnotation ) ; ropAnnotation.setImmutable ( ) ; return ropAnnotation ; }
Source:
public final float float_literal ( ) throws org.jf.smali.RecognitionException { float value = 0.0F ; org.antlr.runtime.tree.CommonTree FLOAT_LITERAL195 = null ; try { { FLOAT_LITERAL195 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.FLOAT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_FLOAT_LITERAL_in_float_literal3307 ) ) ) ; value = org.jf.smali.LiteralTools.parseFloat ( ( FLOAT_LITERAL195 != null ? FLOAT_LITERAL195.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final byte byte_literal ( ) throws org.jf.smali.RecognitionException { byte value = 0 ; org.antlr.runtime.tree.CommonTree BYTE_LITERAL194 = null ; try { { BYTE_LITERAL194 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.BYTE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_BYTE_LITERAL_in_byte_literal3294 ) ) ) ; value = org.jf.smali.LiteralTools.parseByte ( ( BYTE_LITERAL194 != null ? BYTE_LITERAL194.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public void run ( ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart graphicalEditor = getEditorDelegate ( ) . getGraphicalEditor ( ) ; org.eclipse.swt.custom.StyledText errorLabel = graphicalEditor.getErrorLabel ( ) ; if ( errorLabel.isFocusControl ( ) ) { errorLabel.selectAll ( ) ; return ; } mSelectionManager.selectAll ( ) ; }

Target:
public void run ( ) { mClipboardSupport.deleteSelection ( getDeleteLabel ( ) , mSelectionManager.getSnapshot ( ) ) ; }
Source:
public void onServiceConnected ( ) { if ( ( mListener ) != null ) { mListener.onServiceConnected ( ) ; } }

Target:
public void onConnected ( ) { if ( ( ( mListener ) != null ) && ( ( mExecutor ) != null ) ) { mExecutor.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mListener.onConnected ( ) ; } } ) ; } }
Source:
com.android.sched.vfs.DirectFS.DirectVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.DirectFS.DirectVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File file = new java.io.File ( parent.getNativePath ( ) , name ) ; try { com.android.sched.util.file.Directory.create ( file , new com.android.sched.util.location.DirectoryLocation ( file ) ) ; } catch ( com.android.sched.util.file.FileAlreadyExistsException e ) { } return new com.android.sched.vfs.DirectFS.DirectNonRootVDir ( this , parent , name ) ; }

Target:
com.android.sched.vfs.ParentVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File path = getNativeFile ( parent.getPath ( ) , name ) ; try { com.android.sched.util.file.Directory.create ( path , new com.android.sched.util.location.DirectoryLocation ( path ) ) ; } catch ( com.android.sched.util.file.FileAlreadyExistsException e ) { } return new com.android.sched.vfs.ParentVDir ( this , parent , name ) ; }
Source:
private void writeStandardProjectResources ( com.android.jarutils.SignedJarBuilder jarBuilder , org.eclipse.jdt.core.IJavaProject javaProject , org.eclipse.core.resources.IWorkspaceRoot wsRoot , java.util.ArrayList < java.lang.String > list ) throws java.io.IOException { java.util.ArrayList < org.eclipse.core.runtime.IPath > sourceFolders = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getSourceClasspaths ( javaProject ) ; for ( org.eclipse.core.runtime.IPath sourcePath : sourceFolders ) { org.eclipse.core.resources.IResource sourceResource = wsRoot.findMember ( sourcePath ) ; if ( ( sourceResource != null ) && ( ( sourceResource.getType ( ) ) == ( org.eclipse.core.resources.IResource.FOLDER ) ) ) { writeStandardSourceFolderResources ( jarBuilder , sourcePath , ( ( org.eclipse.core.resources.IFolder ) ( sourceResource ) ) , list ) ; } } }

Target:
private void writeStandardProjectResources ( com.android.sdklib.internal.build.SignedJarBuilder jarBuilder , org.eclipse.jdt.core.IJavaProject javaProject , org.eclipse.core.resources.IWorkspaceRoot wsRoot , java.util.ArrayList < java.lang.String > list ) throws java.io.IOException { java.util.ArrayList < org.eclipse.core.runtime.IPath > sourceFolders = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getSourceClasspaths ( javaProject ) ; for ( org.eclipse.core.runtime.IPath sourcePath : sourceFolders ) { org.eclipse.core.resources.IResource sourceResource = wsRoot.findMember ( sourcePath ) ; if ( ( sourceResource != null ) && ( ( sourceResource.getType ( ) ) == ( org.eclipse.core.resources.IResource.FOLDER ) ) ) { writeStandardSourceFolderResources ( jarBuilder , sourcePath , ( ( org.eclipse.core.resources.IFolder ) ( sourceResource ) ) , list ) ; } } }
Source:
public boolean enableNoAutoConnect ( ) { if ( ( isEnabled ( ) ) == true ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enableNoAutoConnect(): BT is already enabled..!" ) ; return true ; } try { return mManagerService.enableNoAutoConnect ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public boolean enableNoAutoConnect ( ) { if ( ( isEnabled ( ) ) == true ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enableNoAutoConnect(): BT already enabled!" ) ; return true ; } try { return mManagerService.enableNoAutoConnect ( android.app.ActivityThread.currentPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }
Source:
public static void computeSincos ( android.renderscript.cts.TestSincos.ArgumentsFloatFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 12 ; args.outCosptr = ( ( float ) ( java.lang.StrictMath.cos ( args.inV ) ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.sin ( args.inV ) ) ) ; }

Target:
public static void computeSincos ( android.renderscript.cts.TestSincos.ArgumentsFloatFloatFloat args ) { args.outCosptr = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.cos ( args.inV ) , 4 , 128 ) ; args.out = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.sin ( args.inV ) , 4 , 128 ) ; }
Source:
private void processAtCpbr ( java.lang.String atString , int type , android.bluetooth.BluetoothDevice device ) { log ( ( "processAtCpbr - atString = " + atString ) ) ; if ( ( mPhonebook ) != null ) { mPhonebook.handleCpbrCommand ( atString , type , device ) ; } else { android.util.Log.e ( com.android.bluetooth.hfp.HeadsetStateMachine.TAG , "Phonebook handle null for At+CPBR" ) ; atResponseCodeNative ( HeadsetHalConstants.AT_RESPONSE_ERROR , 0 , getByteAddress ( device ) ) ; } }

Target:
private void processAtCpbr ( java.lang.String atString , int type , android.bluetooth.BluetoothDevice device ) { log ( ( "processAtCpbr - atString = " + atString ) ) ; if ( ( mPhonebook ) != null ) { mPhonebook.handleCpbrCommand ( atString , type , device ) ; } else { android.util.Log.e ( com.android.bluetooth.hfp.HeadsetStateMachine.TAG , "Phonebook handle null for At+CPBR" ) ; mNativeInterface.atResponseCode ( device , HeadsetHalConstants.AT_RESPONSE_ERROR , 0 ) ; } }
Source:
private void restoreSwipeHintTexts ( ) { if ( ( getAnswerMethod ( ) ) != null ) { if ( allowAnswerAndRelease ( ) ) { if ( hasCallOnHold ( ) ) { getAnswerMethod ( ) . setHintText ( getText ( R.string.call_incoming_default_label_answer_and_release_third ) ) ; } else if ( primaryCallState.supportsCallOnHold ) { getAnswerMethod ( ) . setHintText ( getText ( R.string.call_incoming_default_label_answer_and_release_second ) ) ; } } else { getAnswerMethod ( ) . setHintText ( null ) ; } } }

Target:
private void restoreSwipeHintTexts ( ) { if ( ( getAnswerMethod ( ) ) != null ) { if ( allowAnswerAndRelease ( ) ) { if ( hasCallOnHold ( ) ) { getAnswerMethod ( ) . setHintText ( getText ( R.string.call_incoming_default_label_answer_and_release_third ) ) ; } else if ( primaryCallState.supportsCallOnHold ( ) ) { getAnswerMethod ( ) . setHintText ( getText ( R.string.call_incoming_default_label_answer_and_release_second ) ) ; } } else { getAnswerMethod ( ) . setHintText ( null ) ; } } }
Source:
public void setSimPowerStateForSlot ( int slotId , boolean powerUp ) { enforceModifyPermission ( ) ; int [ ] subId = mSubscriptionController.getSubIdUsingSlotId ( slotId ) ; if ( ( subId == null ) || ( ( subId.length ) == 0 ) ) { return ; } final com.android.internal.telephony.Phone phone = getPhone ( subId [ 0 ] ) ; if ( phone != null ) { phone.setSimPowerState ( powerUp ) ; } }

Target:
public void setSimPowerStateForSlot ( int slotIndex , boolean powerUp ) { enforceModifyPermission ( ) ; int [ ] subId = mSubscriptionController.getSubIdUsingSlotIndex ( slotIndex ) ; if ( ( subId == null ) || ( ( subId.length ) == 0 ) ) { return ; } final com.android.internal.telephony.Phone phone = getPhone ( subId [ 0 ] ) ; if ( phone != null ) { phone.setSimPowerState ( powerUp ) ; } }
Source:
public void testCanRecreateAdb ( ) throws java.io.IOException { java.io.File adbPath = new java.io.File ( mAndroidHome , ( ( "platform-tools" + ( java.io.File.separator ) ) + "adb" ) ) ; com.android.ddmlib.AndroidDebugBridge adb = com.android.ddmlib.AndroidDebugBridge.createBridge ( adbPath.getCanonicalPath ( ) , true ) ; assertNotNull ( adb ) ; com.android.ddmlib.AndroidDebugBridge.terminate ( ) ; adb = com.android.ddmlib.AndroidDebugBridge.createBridge ( adbPath.getCanonicalPath ( ) , true ) ; assertNotNull ( adb ) ; com.android.ddmlib.AndroidDebugBridge.terminate ( ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { mAndroidHome = java.lang.System.getenv ( "ANDROID_HOME" ) ; assertNotNull ( "This test requires ANDROID_HOME environment variable to point to a valid SDK" , mAndroidHome ) ; mAdbPath = new java.io.File ( mAndroidHome , ( ( "platform-tools" + ( java.io.File.separator ) ) + "adb" ) ) ; com.android.ddmlib.AndroidDebugBridge.initIfNeeded ( false ) ; }
Source:
private void assertTimeLimit ( java.lang.String descr , long timeLimit , java.lang.Runnable fn ) { long timeTaken = durationOf ( fn ) ; java.lang.String msg = java.lang.String.format ( "%s: took %dms, limit was %dms" , descr , timeTaken , timeLimit ) ; android.util.Log.d ( com.android.server.ConnectivityServiceTest.TAG , msg ) ; assertTrue ( msg , ( timeTaken <= timeLimit ) ) ; }

Target:
private void assertTimeLimit ( java.lang.String descr , long timeLimit , java.lang.Runnable fn ) { long timeTaken = durationOf ( fn ) ; java.lang.String msg = java.lang.String.format ( "%s: took %dms, limit was %dms" , descr , timeTaken , timeLimit ) ; android.util.Log.d ( com.android.server.ConnectivityServiceTest.TAG , msg ) ; org.junit.Assert.assertTrue ( msg , ( timeTaken <= timeLimit ) ) ; }
Source:
private void assertStatsFilesExist ( boolean exist ) { final java.io.File basePath = new java.io.File ( mStatsDir , "netstats" ) ; if ( exist ) { assertTrue ( ( ( basePath.list ( ) . length ) > 0 ) ) ; } else { assertTrue ( ( ( basePath.list ( ) . length ) == 0 ) ) ; } }

Target:
private void assertStatsFilesExist ( boolean exist ) { final java.io.File basePath = new java.io.File ( mStatsDir , "netstats" ) ; if ( exist ) { org.junit.Assert.assertTrue ( ( ( basePath.list ( ) . length ) > 0 ) ) ; } else { org.junit.Assert.assertTrue ( ( ( basePath.list ( ) . length ) == 0 ) ) ; } }
Source:
public void onRangingSuccess ( int rangingId , android.net.wifi.RttManager.ParcelableRttResults results ) { if ( com.android.server.wifi.nan.WifiNanClientState.VDBG ) { android.util.Log.v ( com.android.server.wifi.nan.WifiNanClientState.TAG , ( ( ( "onRangingSuccess: rangingId=" + rangingId ) + ", results=" ) + results ) ) ; } try { mCallback.onRangingSuccess ( rangingId , results ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.server.wifi.nan.WifiNanClientState.TAG , ( "onRangingSuccess: RemoteException - ignored: " + e ) ) ; } }

Target:
public void onRangingSuccess ( int rangingId , android.net.wifi.RttManager.ParcelableRttResults results ) { if ( com.android.server.wifi.aware.WifiAwareClientState.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareClientState.TAG , ( ( ( "onRangingSuccess: rangingId=" + rangingId ) + ", results=" ) + results ) ) ; } try { mCallback.onRangingSuccess ( rangingId , results ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.server.wifi.aware.WifiAwareClientState.TAG , ( "onRangingSuccess: RemoteException - ignored: " + e ) ) ; } }
Source:
public void testTearDown ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; org.mockito.Mockito.when ( wificondControl.tearDownInterfaces ( ) ) . thenReturn ( true ) ; mWifiNative.setWificondControl ( wificondControl ) ; org.junit.Assert.assertTrue ( mWifiNative.tearDown ( ) ) ; org.mockito.Mockito.verify ( wificondControl ) . tearDownInterfaces ( ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . stopVendorHal ( ) ; }

Target:
public void testSignalPoll ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mWificondControl.signalPoll ( ) ) . thenReturn ( com.android.server.wifi.WifiNativeTest.SIGNAL_POLL_RESULT ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiNativeTest.SIGNAL_POLL_RESULT , mWifiNative.signalPoll ( ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . signalPoll ( ) ; }
Source:
public static void computeAsinh ( android.renderscript.cts.TestAsinh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 5 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.log ( ( x + ( java.lang.StrictMath.sqrt ( ( ( x * x ) + 1.0 ) ) ) ) ) ) ) ; }

Target:
public static void computeTgamma ( android.renderscript.cts.TestTgamma.ArgumentsFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.tgamma ( args.in ) , 16 , 128 ) ; }
Source:
public void onServiceDisconnected ( android.content.ComponentName name ) { synchronized ( mLock ) { mIsBinding = false ; } if ( ( mIImsServiceController ) != null ) { mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; } notifyAllFeaturesRemoved ( ) ; cleanUpService ( ) ; mHandler.postDelayed ( mRestartImsServiceRunnable , mRebindRetry.getRetryTimeout ( ) ) ; }

Target:
public void onServiceDisconnected ( android.content.ComponentName name ) { synchronized ( mLock ) { mIsBinding = false ; } if ( ( mIImsServiceController ) != null ) { mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; } notifyAllFeaturesRemoved ( ) ; cleanUpService ( ) ; android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "ImsService(" + name ) + "): onServiceDisconnected. Rebinding..." ) ) ; startDelayedRebindToService ( ) ; }
Source:
public void initialize ( ) { mNetworkSelect = ( ( com.android.phone.NetworkSelectListPreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_NETWORK_SELECT_KEY ) ) ) ; mAutoSelect = ( ( android.preference.TwoStatePreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_AUTO_SELECT_KEY ) ) ) ; mProgressDialog = new android.app.ProgressDialog ( getContext ( ) ) ; }

Target:
public void initialize ( ) { mEnableNewManualSelectNetworkUI = getContext ( ) . getResources ( ) . getBoolean ( com.android.internal.R.bool.config_enableNewAutoSelectNetworkUI ) ; mAutoSelect = ( ( android.preference.TwoStatePreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_AUTO_SELECT_KEY ) ) ) ; mChooseNetwork = findPreference ( com.android.phone.NetworkOperators.BUTTON_CHOOSE_NETWORK_KEY ) ; mNetworkSelect = ( ( com.android.phone.NetworkSelectListPreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_NETWORK_SELECT_KEY ) ) ) ; if ( mEnableNewManualSelectNetworkUI ) { this . removePreference ( mNetworkSelect ) ; } else { this . removePreference ( mChooseNetwork ) ; } mProgressDialog = new android.app.ProgressDialog ( getContext ( ) ) ; }
Source:
private void launchService ( boolean usePublicIp ) { android.content.Intent intent = new android.content.Intent ( this , com.googlecode.android_scripting.activity.ScriptingLayerService.class ) ; intent.setAction ( Constants.ACTION_LAUNCH_SERVER ) ; intent.putExtra ( Constants.EXTRA_USE_EXTERNAL_IP , usePublicIp ) ; intent.putExtra ( Constants.EXTRA_USE_SERVICE_PORT , getPrefInt ( "use_service_port" , 0 ) ) ; startService ( intent ) ; }

Target:
private void launchService ( boolean usePublicIp ) { android.content.Intent intent = new android.content.Intent ( this , com.googlecode.android_scripting.service.ScriptingLayerService.class ) ; intent.setAction ( Constants.ACTION_LAUNCH_SERVER ) ; intent.putExtra ( Constants.EXTRA_USE_EXTERNAL_IP , usePublicIp ) ; intent.putExtra ( Constants.EXTRA_USE_SERVICE_PORT , getPrefInt ( "use_service_port" , 0 ) ) ; startService ( intent ) ; }
Source:
public static java.lang.String getReadOnlyToken ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.api.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String user , @ org.jetbrains.annotations.NotNull java.lang.String repo , @ org.jetbrains.annotations.Nullable java.lang.String note ) throws java.io.IOException { org.jetbrains.plugins.github.api.GithubRepo repository = org.jetbrains.plugins.github.api.GithubApiUtil.getDetailedRepoInfo ( auth , user , repo ) ; java.util.List < java.lang.String > scopes = ( repository.isPrivate ( ) ) ? java.util.Collections.singletonList ( "repo" ) : java.util.Collections.< java.lang.String > emptyList ( ) ; return org.jetbrains.plugins.github.api.GithubApiUtil.getScopedToken ( auth , scopes , note ) ; }

Target:
public static java.lang.String getReadOnlyToken ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.util.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String user , @ org.jetbrains.annotations.NotNull java.lang.String repo , @ org.jetbrains.annotations.Nullable java.lang.String note ) throws java.io.IOException { org.jetbrains.plugins.github.api.GithubRepo repository = org.jetbrains.plugins.github.api.GithubApiUtil.getDetailedRepoInfo ( auth , user , repo ) ; java.util.List < java.lang.String > scopes = ( repository.isPrivate ( ) ) ? java.util.Collections.singletonList ( "repo" ) : java.util.Collections.< java.lang.String > emptyList ( ) ; return org.jetbrains.plugins.github.api.GithubApiUtil.getScopedToken ( auth , scopes , note ) ; }
Source:
void load ( java.lang.String absolutePath , java.lang.ClassLoader loader ) { checkTargetSdkVersionForLoad ( "java.lang.Runtime#load(String, ClassLoader)" ) ; java.lang.System.logE ( ( "java.lang.Runtime#load(String, ClassLoader)" + " is private and will be removed in a future Android release" ) ) ; if ( absolutePath == null ) { throw new java.lang.NullPointerException ( "absolutePath == null" ) ; } java.lang.String error = doLoad ( absolutePath , loader ) ; if ( error != null ) { throw new java.lang.UnsatisfiedLinkError ( error ) ; } }

Target:
void load ( java.lang.String absolutePath , java.lang.ClassLoader loader ) { checkTargetSdkVersionForLoad ( "java.lang.Runtime#load(String, ClassLoader)" ) ; java.lang.System.logE ( ( "java.lang.Runtime#load(String, ClassLoader)" + " is private and will be removed in a future Android release" ) ) ; if ( absolutePath == null ) { throw new java.lang.NullPointerException ( "absolutePath == null" ) ; } java.lang.String error = java.lang.Runtime.nativeLoad ( absolutePath , loader ) ; if ( error != null ) { throw new java.lang.UnsatisfiedLinkError ( error ) ; } }
Source:
public org.eclipse.swt.graphics.Image getImage ( java.lang.Object element ) { assert element instanceof com.android.sdkuilib.internal.repository.ArchiveInfo ; com.android.sdkuilib.internal.repository.ArchiveInfo ai = ( ( com.android.sdkuilib.internal.repository.ArchiveInfo ) ( element ) ) ; com.android.sdkuilib.internal.repository.icons.ImageFactory imgFactory = mUpdaterData.getImageFactory ( ) ; if ( imgFactory != null ) { if ( ai.isAccepted ( ) ) { return imgFactory.getImageByName ( "accept_icon16.png" ) ; } else if ( ai.isRejected ( ) ) { return imgFactory.getImageByName ( "reject_icon16.png" ) ; } return imgFactory.getImageByName ( "unknown_icon16.png" ) ; } return super . getImage ( element ) ; }

Target:
public java.lang.String getText ( java.lang.Object element ) { if ( element instanceof com.android.sdkuilib.internal.repository.SdkUpdaterChooserDialog.LicenseEntry ) { return ( ( com.android.sdkuilib.internal.repository.SdkUpdaterChooserDialog.LicenseEntry ) ( element ) ) . getLicenseRef ( ) ; } else if ( element instanceof com.android.sdkuilib.internal.repository.ArchiveInfo ) { com.android.sdkuilib.internal.repository.ArchiveInfo ai = ( ( com.android.sdkuilib.internal.repository.ArchiveInfo ) ( element ) ) ; java.lang.String desc = ai.getShortDescription ( ) ; if ( ai.isDependencyFor ( ) ) { desc += " [*]" ; } return desc ; } assert ( element instanceof java.lang.String ) || ( element instanceof com.android.sdkuilib.internal.repository.ArchiveInfo ) ; return null ; }
Source:
void expandCapacity ( int minimumCapacity ) { int newCapacity = ( ( value.length ) * 2 ) + 2 ; if ( ( newCapacity - minimumCapacity ) < 0 ) newCapacity = minimumCapacity ; if ( newCapacity < 0 ) { if ( minimumCapacity < 0 ) throw new java.lang.OutOfMemoryError ( ) ; newCapacity = java.lang.Integer.MAX_VALUE ; } value = java.util.Arrays.copyOf ( value , newCapacity ) ; }

Target:
private void ensureCapacityInternal ( int minimumCapacity ) { if ( ( minimumCapacity - ( value.length ) ) > 0 ) { value = java.util.Arrays.copyOf ( value , newCapacity ( minimumCapacity ) ) ; } }
Source:
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 ) ; }

Target:
private void unregisterForSimRecordEvents ( ) { com.android.internal.telephony.uicc.IccRecords r = mIccRecords.get ( ) ; if ( r == null ) { return ; } r.unregisterForNetworkSelectionModeAutomatic ( this ) ; r.unregisterForNewSms ( this ) ; r.unregisterForRecordsEvents ( this ) ; r.unregisterForRecordsLoaded ( this ) ; }
Source:
final void setInitialItems ( java.util.List < T > items ) { java.util.List < T > itemsCopy = new java.util.ArrayList < > ( items ) ; java.util.Collections.sort ( itemsCopy , mComparator ) ; com.android.tv.dvr.ui.SortedArrayAdapter.addAll ( 0 , itemsCopy.subList ( 0 , java.lang.Math.min ( mMaxItemCount , itemsCopy.size ( ) ) ) ) ; }

Target:
final void setInitialItems ( java.util.List < T > items ) { java.util.List < T > itemsCopy = new java.util.ArrayList < > ( items ) ; java.util.Collections.sort ( itemsCopy , mComparator ) ; for ( T item : itemsCopy ) { add ( item , true ) ; if ( ( com.android.tv.dvr.ui.SortedArrayAdapter.size ( ) ) == ( mMaxItemCount ) ) { break ; } } }
Source:
protected dalvik.system.EmulatedStackFrame.StackFrameAccessor asReturnValueAccessor ( ) { java.lang.Class < ? > rtype = frame.type.rtype ( ) ; argumentIdx = - 2 ; if ( rtype.isPrimitive ( ) ) { frameBuf.position ( ( ( frameBuf.capacity ( ) ) - ( dalvik.system.EmulatedStackFrame.getSize ( rtype ) ) ) ) ; } else { referencesOffset = ( frame.references.length ) - 1 ; } return this ; }

Target:
public void makeReturnValueAccessor ( ) { java.lang.Class < ? > rtype = frame.type.rtype ( ) ; argumentIdx = dalvik.system.EmulatedStackFrame.StackFrameAccessor.RETURN_VALUE_IDX ; if ( rtype.isPrimitive ( ) ) { frameBuf.position ( ( ( frameBuf.capacity ( ) ) - ( dalvik.system.EmulatedStackFrame.getSize ( rtype ) ) ) ) ; } else { referencesOffset = ( frame.references.length ) - 1 ; } }
Source:
public void runCmdLine ( java.util.List < java.lang.String > command ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { java.lang.String [ ] cmdArray = command.toArray ( new java.lang.String [ command.size ( ) ] ) ; runCmdLine ( cmdArray ) ; }

Target:
public void runCmdLine ( @ com.android.annotations.NonNull java.util.List < java.lang.String > command , @ com.android.annotations.Nullable java.util.Map < java.lang.String , java.lang.String > envVariableMap ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { java.lang.String [ ] cmdArray = command.toArray ( new java.lang.String [ command.size ( ) ] ) ; runCmdLine ( cmdArray , envVariableMap ) ; }
Source:
protected void tearDown ( ) throws java.lang.Exception { android.content.SharedPreferences sharedPreferences = mContext.getSharedPreferences ( ( ( java.lang.String ) ( null ) ) , 0 ) ; sharedPreferences.edit ( ) . clear ( ) . commit ( ) ; restoreInstances ( ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { mSimulatedCommands.dispose ( ) ; android.content.SharedPreferences sharedPreferences = mContext.getSharedPreferences ( ( ( java.lang.String ) ( null ) ) , 0 ) ; sharedPreferences.edit ( ) . clear ( ) . commit ( ) ; restoreInstances ( ) ; }
Source:
public void testRandomAccessFileHasCleanupFinalizer ( ) throws java.lang.Exception { int tooManyOpenFiles = 2000 ; java.io.File file = java.io.File.createTempFile ( "RandomAccessFileTest" , "tmp" ) ; for ( int i = 0 ; i < tooManyOpenFiles ; i ++ ) { createRandomAccessFile ( file ) ; libcore.java.lang.ref.FinalizationTester.induceFinalization ( ) ; } }

Target:
public void testRandomAccessFileHasCleanupFinalizer ( ) throws java.lang.Exception { java.io.File file = java.io.File.createTempFile ( "RandomAccessFileTest" , "tmp" ) ; try ( java.io.RandomAccessFile accessFile = new java.io.RandomAccessFile ( file , "rw" ) ) { resourceLeakageDetectorRule.assertUnreleasedResourceCount ( accessFile , 1 ) ; } }
Source:
public boolean retainAll ( final java.util.Collection < ? > c ) { com.google.common.base.Preconditions.checkNotNull ( c ) ; com.google.common.base.Predicate < java.util.Map.Entry < R , V > > predicate = new com.google.common.base.Predicate < java.util.Map.Entry < R , V > > ( ) { @ java.lang.Override public boolean apply ( java.util.Map.Entry < R , V > entry ) { return ! ( c.contains ( entry.getKey ( ) ) ) ; } } ; return removePredicate ( predicate ) ; }

Target:
public boolean retainAll ( final java.util.Collection < ? > c ) { return removeFromColumnIf ( com.google.common.collect.Maps.< V > valuePredicateOnEntries ( com.google.common.base.Predicates.not ( com.google.common.base.Predicates.in ( c ) ) ) ) ; }
Source:
public void sendUssdResponse ( java.lang.String ussdMessge ) { android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , "sendUssdResponse" ) ; com.android.internal.telephony.imsphone.ImsPhoneMmiCode mmi = com.android.internal.telephony.imsphone.ImsPhoneMmiCode.newFromUssdUserInput ( ussdMessge , this ) ; mPendingMMIs.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.sendUssd ( ussdMessge ) ; }

Target:
public void sendUssdResponse ( java.lang.String ussdMessge ) { logd ( "sendUssdResponse" ) ; com.android.internal.telephony.imsphone.ImsPhoneMmiCode mmi = com.android.internal.telephony.imsphone.ImsPhoneMmiCode.newFromUssdUserInput ( ussdMessge , this ) ; mPendingMMIs.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.sendUssd ( ussdMessge ) ; }
Source:
private void applyLidSwitchState ( ) { if ( ( ( mLidState ) == ( android.view.WindowManagerPolicy.WindowManagerFuncs.LID_CLOSED ) ) && ( mLidControlsSleep ) ) { mPowerManager.goToSleep ( android.os.SystemClock.uptimeMillis ( ) , PowerManager.GO_TO_SLEEP_REASON_LID_SWITCH , PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE ) ; } synchronized ( mLock ) { updateWakeGestureListenerLp ( ) ; } }

Target:
private void applyLidSwitchState ( ) { if ( ( ( mLidState ) == ( android.view.WindowManagerPolicy.WindowManagerFuncs.LID_CLOSED ) ) && ( mLidControlsSleep ) ) { mPowerManager.goToSleep ( android.os.SystemClock.uptimeMillis ( ) , PowerManager.GO_TO_SLEEP_REASON_LID_SWITCH , PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE ) ; } else if ( ( ( mLidState ) == ( android.view.WindowManagerPolicy.WindowManagerFuncs.LID_CLOSED ) ) && ( mLidControlsScreenLock ) ) { mWindowManagerFuncs.lockDeviceNow ( ) ; } synchronized ( mLock ) { updateWakeGestureListenerLp ( ) ; } }
Source:
public int getRadioTechnology ( ) { synchronized ( mLockObj ) { if ( ( mCallProfile ) == null ) { return android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; } java.lang.String callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE ) ; if ( ( callType == null ) || ( callType.isEmpty ( ) ) ) { callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE_ALT ) ; } int radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; try { radioTechnology = java.lang.Integer.parseInt ( callType ) ; } catch ( java.lang.NumberFormatException nfe ) { radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; } return radioTechnology ; } }

Target:
public boolean isVideoCall ( ) { synchronized ( mLockObj ) { return ( ( mCallProfile ) != null ) && ( mCallProfile.isVideoCall ( ) ) ; } }
Source:
private java.util.List < com.android.manifmerger.Actions.AttributeRecord > getAttributeRecords ( com.android.manifmerger.XmlAttribute attribute ) { com.android.manifmerger.XmlElement originElement = attribute.getOwnerElement ( ) ; com.android.manifmerger.XmlNode.NodeKey storageKey = originElement.getId ( ) ; com.android.manifmerger.Actions.DecisionTreeRecord nodeDecisionTree = mRecords.get ( storageKey ) ; assert nodeDecisionTree != null ; java.util.List < com.android.manifmerger.Actions.AttributeRecord > attributeRecords = nodeDecisionTree.mAttributeRecords.get ( attribute.getName ( ) ) ; if ( attributeRecords == null ) { attributeRecords = new java.util.ArrayList < com.android.manifmerger.Actions.AttributeRecord > ( ) ; nodeDecisionTree.mAttributeRecords.put ( attribute.getName ( ) , attributeRecords ) ; } return attributeRecords ; }

Target:
private java.util.List < com.android.manifmerger.Actions.AttributeRecord > getAttributeRecords ( com.android.manifmerger.XmlAttribute attribute ) { com.android.manifmerger.XmlElement originElement = attribute.getOwnerElement ( ) ; com.android.manifmerger.XmlNode.NodeKey storageKey = originElement.getOriginalId ( ) ; com.android.manifmerger.Actions.DecisionTreeRecord nodeDecisionTree = mRecords.get ( storageKey ) ; assert nodeDecisionTree != null ; java.util.List < com.android.manifmerger.Actions.AttributeRecord > attributeRecords = nodeDecisionTree.mAttributeRecords.get ( attribute.getName ( ) ) ; if ( attributeRecords == null ) { attributeRecords = new java.util.ArrayList < com.android.manifmerger.Actions.AttributeRecord > ( ) ; nodeDecisionTree.mAttributeRecords.put ( attribute.getName ( ) , attributeRecords ) ; } return attributeRecords ; }
Source:
public void testSecurityPatchFound ( ) { if ( ( Build.VERSION.SDK_INT ) < ( Build.VERSION_CODES.M ) ) { android.util.Log.w ( android.os.cts.SecurityPatchTest.TAG , "Skipping M+ Test." ) ; return ; } java.lang.String buildSecurityPatch = android.os.SystemProperties.get ( "ro.build.version.security_patch" , "" ) ; java.lang.String error = java.lang.String.format ( android.os.cts.SecurityPatchTest.SECURITY_PATCH_ERROR , buildSecurityPatch ) ; assertTrue ( error , ( ! ( buildSecurityPatch.isEmpty ( ) ) ) ) ; }

Target:
public void testSecurityPatchFound ( ) { if ( mSkipTests ) { android.util.Log.w ( android.os.cts.SecurityPatchTest.TAG , "Skipping M+ Test." ) ; return ; } java.lang.String buildSecurityPatch = android.os.SystemProperties.get ( "ro.build.version.security_patch" , "" ) ; java.lang.String error = java.lang.String.format ( android.os.cts.SecurityPatchTest.SECURITY_PATCH_ERROR , buildSecurityPatch ) ; assertTrue ( error , ( ! ( buildSecurityPatch.isEmpty ( ) ) ) ) ; }
Source:
public final void setConferenceableConnections ( java.util.List < android.telecom.Connection > conferenceableConnections ) { clearConferenceableList ( ) ; for ( android.telecom.Connection c : conferenceableConnections ) { if ( ! ( mConferenceableConnections.contains ( c ) ) ) { c.addConnectionListener ( mConnectionDeathListener ) ; mConferenceableConnections.add ( c ) ; } } fireOnConferenceableConnectionsChanged ( ) ; }

Target:
public final void setConferenceableConnections ( java.util.List < android.telecom.Connection > conferenceableConnections ) { if ( java.util.Objects.equals ( mConferenceableConnections , conferenceableConnections ) ) { return ; } clearConferenceableList ( ) ; for ( android.telecom.Connection c : conferenceableConnections ) { if ( ! ( mConferenceableConnections.contains ( c ) ) ) { c.addConnectionListener ( mConnectionDeathListener ) ; mConferenceableConnections.add ( c ) ; } } fireOnConferenceableConnectionsChanged ( ) ; }
Source:
private void onAvdManager ( ) { com.android.sdklib.internal.repository.ITaskFactory oldFactory = mUpdaterData.getTaskFactory ( ) ; try { com.android.sdkuilib.internal.repository.sdkman2.AvdManagerWindowImpl1 win = new com.android.sdkuilib.internal.repository.sdkman2.AvdManagerWindowImpl1 ( mShell , mUpdaterData , com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext.SDK_MANAGER ) ; win.open ( ) ; } catch ( java.lang.Exception e ) { mUpdaterData.getSdkLog ( ) . error ( e , "AVD Manager window error" ) ; } finally { mUpdaterData.setTaskFactory ( oldFactory ) ; } }

Target:
private void onAvdManager ( ) { com.android.sdklib.internal.repository.ITaskFactory oldFactory = mUpdaterData.getTaskFactory ( ) ; try { com.android.sdkuilib.internal.repository.sdkman2.AvdManagerWindowImpl1 win = new com.android.sdkuilib.internal.repository.sdkman2.AvdManagerWindowImpl1 ( mShell , mUpdaterData , com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext.DIALOG ) ; win.open ( ) ; } catch ( java.lang.Exception e ) { mUpdaterData.getSdkLog ( ) . error ( e , "AVD Manager window error" ) ; } finally { mUpdaterData.setTaskFactory ( oldFactory ) ; } }
Source:
public void testVload_uint ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.I32 ( mRS ) , w ) ) ; int [ ] tmp = randomIntArray ( w ) ; int [ ] tmp2 = new int [ w ] ; script.forEach_copy2d_uint ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch uint: " ) ; }

Target:
public void testVload_uint ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.U32 ( mRS ) , w ) ) ; int [ ] tmp = randomIntArray ( w ) ; int [ ] tmp2 = new int [ w ] ; script.forEach_copy2d_uint ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch uint: " ) ; }
Source:
public void matchProviderWithNoMatch ( ) throws java.lang.Exception { com.android.server.wifi.hotspot2.PasspointProvider provider = addTestProvider ( ) ; com.android.server.wifi.hotspot2.ANQPData entry = new com.android.server.wifi.hotspot2.ANQPData ( mClock , null ) ; org.mockito.Mockito.when ( mAnqpCache.getEntry ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_ANQP_KEY ) ) . thenReturn ( entry ) ; org.mockito.Mockito.when ( provider.match ( org.mockito.Mockito.anyMap ( ) ) ) . thenReturn ( PasspointMatch.None ) ; java.util.List < android.util.Pair < com.android.server.wifi.hotspot2.PasspointProvider , com.android.server.wifi.hotspot2.PasspointMatch > > result = mManager.matchProvider ( createTestScanResult ( ) ) ; org.junit.Assert.assertEquals ( 0 , result.size ( ) ) ; }

Target:
public void matchProviderWithNoMatch ( ) throws java.lang.Exception { com.android.server.wifi.hotspot2.PasspointProvider provider = addTestProvider ( ) ; com.android.server.wifi.hotspot2.ANQPData entry = new com.android.server.wifi.hotspot2.ANQPData ( mClock , null ) ; org.mockito.Mockito.when ( mAnqpCache.getEntry ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_ANQP_KEY ) ) . thenReturn ( entry ) ; org.mockito.Mockito.when ( provider.match ( org.mockito.Mockito.anyMap ( ) ) ) . thenReturn ( PasspointMatch.None ) ; org.junit.Assert.assertNull ( mManager.matchProvider ( createTestScanResult ( ) ) ) ; }