auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JInstanceOf instanceOf ) { com.android.jack.ir.ast.JExpression expr = instanceOf.getExpr ( ) ; if ( ( expr instanceof com.android.jack.ir.ast.JNullLiteral ) || ( isCastOfNull ( expr ) ) ) { assert ( currentMethod ) != null ; com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( currentMethod ) ; tr.append ( new com.android.jack.transformations.request.Replace ( instanceOf , new com.android.jack.ir.ast.JBooleanLiteral ( instanceOf.getSourceInfo ( ) , false ) ) ) ; tr.commit ( ) ; } }

Target:
public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JInstanceOf instanceOf ) { if ( enableNullInstanceOf ) { com.android.jack.ir.ast.JExpression expr = instanceOf.getExpr ( ) ; if ( ( expr instanceof com.android.jack.ir.ast.JNullLiteral ) || ( isCastOfNull ( expr ) ) ) { assert ( currentMethod ) != null ; com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( currentMethod ) ; tr.append ( new com.android.jack.transformations.request.Replace ( instanceOf , new com.android.jack.ir.ast.JBooleanLiteral ( instanceOf.getSourceInfo ( ) , false ) ) ) ; tr.commit ( ) ; } } }
Source:
public void testUnreflectSpecial_superCalls ( ) throws java.lang.Throwable { java.lang.reflect.Method overridenMethod = libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester.class . getMethod ( "overridenMethod" ) ; libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester instance = new libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester ( "unused" ) ; java.lang.invoke.MethodHandle mh = libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester.lookup.unreflectSpecial ( overridenMethod , libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester.class ) ; assertEquals ( "Base" , ( ( java.lang.String ) ( mh.invoke ( instance ) ) ) ) ; }

Target:
public void testUnreflectSpecial_superCalls ( ) throws java.lang.Throwable { java.lang.reflect.Method overridenMethod = libcore.java.lang.invoke.MethodHandlesTest.UnreflectTesterBase.class . getMethod ( "overridenMethod" ) ; libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester instance = new libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester ( "unused" ) ; java.lang.invoke.MethodHandle mh = libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester.lookup.unreflectSpecial ( overridenMethod , libcore.java.lang.invoke.MethodHandlesTest.UnreflectTester.class ) ; assertEquals ( "Base" , ( ( java.lang.String ) ( mh.invoke ( instance ) ) ) ) ; }
Source:
private android.net.NetworkStats getNetworkStatsTethering ( ) throws android.os.RemoteException { try { return mNetworkManager.getNetworkStatsTethering ( ) ; } catch ( java.lang.IllegalStateException e ) { android.util.Log.wtf ( com.android.server.net.NetworkStatsService.TAG , "problem reading network stats" , e ) ; return new android.net.NetworkStats ( 0L , 10 ) ; } }

Target:
private android.net.NetworkStats getNetworkStatsTethering ( int how ) throws android.os.RemoteException { try { return mNetworkManager.getNetworkStatsTethering ( how ) ; } catch ( java.lang.IllegalStateException e ) { android.util.Log.wtf ( com.android.server.net.NetworkStatsService.TAG , "problem reading network stats" , e ) ; return new android.net.NetworkStats ( 0L , 10 ) ; } }
Source:
public void testManifestEExistingI ( ) { int iFlags = PackageManager.INSTALL_INTERNAL ; int rFlags = PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_sdcard , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL ) ; }

Target:
public void testFlagFExistingE ( ) { if ( android.os.Environment.isExternalStorageEmulated ( ) ) { return ; } int iFlags = android.content.pm.PackageManager.INSTALL_EXTERNAL ; int rFlags = ( android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ) | ( android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ) ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install , rFlags , true , false , ( - 1 ) , ( - 1 ) ) ; }
Source:
private void onLockedAllRecordsLoaded ( ) { if ( com.android.internal.telephony.uicc.IsimUiccRecords.DBG ) log ( "SIM locked; record load complete" ) ; mLockedRecordsLoadedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , null , null ) ) ; }

Target:
private void onLockedAllRecordsLoaded ( ) { if ( com.android.internal.telephony.uicc.IsimUiccRecords.DBG ) log ( "SIM locked; record load complete" ) ; if ( ( mLockedRecordsReqReason ) == ( LOCKED_RECORDS_REQ_REASON_LOCKED ) ) { mLockedRecordsLoadedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , null , null ) ) ; } else if ( ( mLockedRecordsReqReason ) == ( LOCKED_RECORDS_REQ_REASON_NETWORK_LOCKED ) ) { mNetworkLockedRecordsLoadedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , null , null ) ) ; } else { loge ( ( "onLockedAllRecordsLoaded: unexpected mLockedRecordsReqReason " + ( mLockedRecordsReqReason ) ) ) ; } }
Source:
public void run ( ) { mHandler.removeCallbacks ( this ) ; int retCode = - 1 ; synchronized ( mInstallLock ) { retCode = mInstaller.freeCache ( volumeUuid , freeStorageSize ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "Couldn't clear application caches" ) ; } } if ( observer != null ) { try { observer.onRemoveCompleted ( null , ( retCode >= 0 ) ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "RemoveException when invoking call back" ) ; } } }

Target:
void freeStorage ( java.lang.String volumeUuid , long freeStorageSize ) throws java.io.IOException { synchronized ( mInstallLock ) { try { mInstaller.freeCache ( volumeUuid , freeStorageSize ) ; } catch ( com.android.internal.os.InstallerConnection.InstallerException e ) { throw new java.io.IOException ( "Failed to free enough space" , e ) ; } } }
Source:
private void cmdStats ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { synchronized ( mLock ) { pw.println ( ( "Buffered events: " + ( mBuffer.size ( ) ) ) ) ; pw.println ( ( "Buffer capacity: " + ( mCapacity ) ) ) ; pw.println ( ( "Dropped events: " + ( mDropped ) ) ) ; } if ( ( mNetdListener ) != null ) { mNetdListener.dump ( pw ) ; } }

Target:
private void cmdListAsProto ( java.io.PrintWriter pw ) { final java.util.List < android.net.ConnectivityMetricsEvent > events = getEvents ( ) ; for ( com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent ev : com.android.server.connectivity.IpConnectivityEventBuilder.toProto ( events ) ) { pw.print ( ev.toString ( ) ) ; } if ( ( mNetdListener ) != null ) { mNetdListener.listAsProtos ( pw ) ; } mDefaultNetworkMetrics.listEventsAsProto ( pw ) ; }
Source:
public void seek ( long offset ) throws java.io.IOException { if ( offset < 0 ) { throw new java.io.IOException ( ( "offset < 0: " + offset ) ) ; } try { Libcore.os.lseek ( fd , offset , java.io.SEEK_SET ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } }

Target:
public void seek ( long offset ) throws java.io.IOException { if ( offset < 0 ) { throw new java.io.IOException ( ( "offset < 0: " + offset ) ) ; } try { Libcore.os.lseek ( fd , offset , java.io.SEEK_SET ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } }
Source:
public void testHashCode ( ) { tests.api.javax.security.cert.CertificateTest.TBTCert tbt_cert = new tests.api.javax.security.cert.CertificateTest.TBTCert ( ) { public byte [ ] getEncoded ( ) { return new byte [ ] { 1 , 2 , 3 } ; } } ; tests.api.javax.security.cert.CertificateTest.TBTCert tbt_cert_1 = new tests.api.javax.security.cert.CertificateTest.TBTCert ( ) { public byte [ ] getEncoded ( ) { return new byte [ ] { 1 , 2 , 3 } ; } } ; assertTrue ( "Equal objects should have the same hash codes." , ( ( tbt_cert.hashCode ( ) ) == ( tbt_cert_1.hashCode ( ) ) ) ) ; }

Target:
public void testHashCode ( ) { org.apache.harmony.tests.javax.security.cert.CertificateTest.TBTCert tbt_cert = new org.apache.harmony.tests.javax.security.cert.CertificateTest.TBTCert ( ) { public byte [ ] getEncoded ( ) { return new byte [ ] { 1 , 2 , 3 } ; } } ; org.apache.harmony.tests.javax.security.cert.CertificateTest.TBTCert tbt_cert_1 = new org.apache.harmony.tests.javax.security.cert.CertificateTest.TBTCert ( ) { public byte [ ] getEncoded ( ) { return new byte [ ] { 1 , 2 , 3 } ; } } ; assertTrue ( "Equal objects should have the same hash codes." , ( ( tbt_cert.hashCode ( ) ) == ( tbt_cert_1.hashCode ( ) ) ) ) ; }
Source:
public void testAPInterfaceFailedWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testNullConfigIsPassedToWifiInjector ( ) throws java.lang.Exception { enterSoftApActiveMode ( null ) ; }
Source:
private void updateRoamingState ( boolean newRoaming ) { if ( ( mCT.getState ( ) ) == ( PhoneConstants.State.IDLE ) ) { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( "updateRoamingState now: " + newRoaming ) ) ; mRoaming = newRoaming ; com.android.ims.ImsManager.setWfcMode ( mContext , com.android.ims.ImsManager.getWfcMode ( mContext , newRoaming ) , newRoaming ) ; } else { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( "updateRoamingState postponed: " + newRoaming ) ) ; mCT.registerForVoiceCallEnded ( this , com.android.internal.telephony.imsphone.ImsPhone.EVENT_VOICE_CALL_ENDED , null ) ; } }

Target:
private void updateRoamingState ( boolean newRoaming ) { if ( ( mCT.getState ( ) ) == ( PhoneConstants.State.IDLE ) ) { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) logd ( ( "updateRoamingState now: " + newRoaming ) ) ; mRoaming = newRoaming ; com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mContext , mPhoneId ) ; imsManager.setWfcMode ( imsManager.getWfcMode ( newRoaming ) , newRoaming ) ; } else { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) logd ( ( "updateRoamingState postponed: " + newRoaming ) ) ; mCT.registerForVoiceCallEnded ( this , com.android.internal.telephony.imsphone.ImsPhone.EVENT_VOICE_CALL_ENDED , null ) ; } }
Source:
public boolean isImsRegistered ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return false ; return telephony.isImsRegistered ( ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
public boolean isWifiCallingAvailable ( ) { try { return getITelephony ( ) . isWifiCallingAvailable ( getSubId ( ) ) ; } catch ( android.os.RemoteException | java.lang.NullPointerException ex ) { return false ; } }
Source:
public void dragFinished ( org.eclipse.swt.dnd.DragSourceEvent e ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "dragFinished" ) ; if ( ( e.detail ) == ( org.eclipse.swt.dnd.DND.DROP_MOVE ) ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "dragFinished => MOVE" ) ; } mDragSelection.clear ( ) ; mDragElements = null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.GlobalCanvasDragInfo.getInstance ( ) . stopDrag ( ) ; }

Target:
public void run ( ) { cutDragSelection ( ) ; }
Source:
private static com.google.common.collect.ImmutableList < java.lang.reflect.Field > getAllAnnotatedFieldsSorted ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass ) { java.util.List < java.lang.reflect.Field > unsortedFields = new java.util.ArrayList < > ( ) ; for ( java.lang.reflect.Field field : optionsClass.getFields ( ) ) { if ( field.isAnnotationPresent ( com.google.devtools.common.options.Option.class ) ) { unsortedFields.add ( field ) ; } } return com.google.devtools.common.options.IsolatedOptionsData.fieldOrdering.immutableSortedCopy ( unsortedFields ) ; }

Target:
private static com.google.common.collect.ImmutableList < com.google.devtools.common.options.OptionDefinition > getAllOptionDefinitionsSorted ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass ) { return java.util.Arrays.stream ( optionsClass.getFields ( ) ) . map ( ( field ) -> { try { return com.google.devtools.common.options.OptionDefinition.extractOptionDefinition ( field ) ; } catch ( com.google.devtools.common.options.OptionsParser.ConstructionException e ) { return null ; } } ) . filter ( java.util.Objects :: nonNull ) . sorted ( OptionDefinition.BY_OPTION_NAME ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( com.google.common.collect.ImmutableList ) ) ; }
Source:
public int getProvisionedValue ( int item ) throws com.android.ims.ImsException { int ret = 0 ; try { ret = miConfig.getProvisionedValue ( item ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getValue()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } if ( DBG ) android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( ( ( "getProvisionedValue(): item = " + item ) + ", ret =" ) + ret ) ) ; return ret ; }

Target:
public int getConfigInt ( int item ) throws com.android.ims.ImsException { int ret = 0 ; try { ret = miConfig.getConfigInt ( item ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getInt()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } if ( DBG ) android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( ( ( "getInt(): item = " + item ) + ", ret =" ) + ret ) ) ; return ret ; }
Source:
public void drawString ( java.lang.String string , int x , int y ) { checkGC ( ) ; x = mHScale.translate ( x ) ; y = mVScale.translate ( y ) ; getGc ( ) . drawString ( string , x , y , true ) ; }

Target:
public void drawString ( java.lang.String string , int x , int y ) { checkGC ( ) ; useStrokeAlpha ( ) ; x = mHScale.translate ( x ) ; y = mVScale.translate ( y ) ; getGc ( ) . drawString ( string , x , y , true ) ; }
Source:
public int queryCodenameApiLevel ( @ com.android.annotations.NonNull java.lang.String codename ) { com.android.ide.eclipse.adt.internal.sdk.Sdk sdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( sdk != null ) { com.android.sdklib.IAndroidTarget t = sdk.getTargetFromHashString ( ( ( com.android.sdklib.IAndroidTarget.PLATFORM_HASH_PREFIX ) + codename ) ) ; if ( t != null ) { return t.getVersion ( ) . getApiLevel ( ) ; } } return com.android.manifmerger.ICallback.UNKNOWN_CODENAME ; }

Target:
public int queryCodenameApiLevel ( @ com.android.annotations.NonNull java.lang.String codename ) { com.android.ide.eclipse.adt.internal.sdk.Sdk sdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( sdk != null ) { try { com.android.sdklib.AndroidVersion version = new com.android.sdklib.AndroidVersion ( codename ) ; java.lang.String hashString = com.android.sdklib.AndroidTargetHash.getPlatformHashString ( version ) ; com.android.sdklib.IAndroidTarget t = sdk.getTargetFromHashString ( hashString ) ; if ( t != null ) { return t.getVersion ( ) . getApiLevel ( ) ; } } catch ( com.android.sdklib.AndroidVersion ignore ) { } } return com.android.manifmerger.ICallback.UNKNOWN_CODENAME ; }
Source:
private java.lang.String verifyMeasurements ( float ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation verifyMeasurements = new android.hardware.cts.helpers.sensoroperations.TestSensorOperation ( environment , 100 ) ; verifyMeasurements.addVerification ( new android.hardware.cts.helpers.sensorverification.MeanVerification ( expectations , new float [ ] { 1.95F , 1.95F , 1.95F } ) ) ; verifyMeasurements.execute ( ) ; return null ; }

Target:
private java.lang.String verifyMeasurements ( float ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation verifyMeasurements = android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createOperation ( environment , 100 ) ; verifyMeasurements.addVerification ( new android.hardware.cts.helpers.sensorverification.MeanVerification ( expectations , new float [ ] { 1.95F , 1.95F , 1.95F } ) ) ; verifyMeasurements.execute ( getCurrentTestNode ( ) ) ; return null ; }
Source:
public static void recordPercentageHistogram ( java.lang.String name , int sample ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordEnumeratedHistogram ( name , key , sample , 101 ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void recordPercentageHistogram ( java.lang.String name , int sample ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordEnumeratedHistogram ( name , key , sample , 101 ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
private void moveDown ( ) { if ( ( selectedConfiguration ) != null ) { int index = editableConfigurations.indexOf ( selectedConfiguration ) ; if ( ( index != ( - 1 ) ) && ( index < ( ( editableConfigurations.size ( ) ) - 1 ) ) ) { moveConfigurationToIndex ( ( index + 1 ) , selectedConfiguration ) ; } } }

Target:
public boolean isEnabled ( com.intellij.openapi.actionSystem.AnActionEvent e ) { return ( ( ( selectedConfiguration ) != null ) && ( selectedConfiguration.isEditable ( ) ) ) && ( ( editableConfigurations.indexOf ( selectedConfiguration ) ) > 0 ) ; }
Source:
private void recordTosAcceptance ( ) { if ( isVvm3 ( ) ) { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_VVM3_TOS_VERSION ) . apply ( ) ; } else { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_DIALER_TOS_VERSION ) . apply ( ) ; } android.telecom.PhoneAccountHandle handle = new android.telecom.PhoneAccountHandle ( android.content.ComponentName.unflattenFromString ( status.phoneAccountComponentName ) , status.phoneAccountId ) ; com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context , handle ) ; }

Target:
private void recordTosAcceptance ( ) { if ( isVvm3 ( ) ) { preferences.edit ( ) . putInt ( VoicemailVersionConstants.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , VoicemailVersionConstants.CURRENT_VVM3_TOS_VERSION ) . apply ( ) ; } else { preferences.edit ( ) . putInt ( VoicemailVersionConstants.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , VoicemailVersionConstants.CURRENT_DIALER_TOS_VERSION ) . apply ( ) ; } android.telecom.PhoneAccountHandle handle = new android.telecom.PhoneAccountHandle ( android.content.ComponentName.unflattenFromString ( status.phoneAccountComponentName ) , status.phoneAccountId ) ; com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context , handle ) ; }
Source:
public void compareExtStructure ( ) throws java.lang.Exception { com.android.jack.test.helper.SourceToDexComparisonTestHelper helper = new com.android.jack.test.helper.CheckDexStructureTestHelper ( com.android.jack.compile.androidtree.ext.ExtCompilationTest.SOURCELIST ) ; helper.setCandidateClasspath ( com.android.jack.compile.androidtree.ext.ExtCompilationTest.CLASSPATH ) ; helper.setReferenceClasspath ( com.android.jack.compile.androidtree.ext.ExtCompilationTest.REF_CLASSPATH ) ; com.android.jack.test.comparator.ComparatorDex comparator = helper.createDexFileComparator ( ) ; comparator.setCompareDebugInfoBinary ( false ) ; comparator.setCompareInstructionNumber ( true ) ; comparator.setInstructionNumberTolerance ( 0.4F ) ; helper.runTest ( comparator ) ; }

Target:
public void compareExtStructure ( ) throws java.lang.Exception { com.android.jack.test.helper.SourceToDexComparisonTestHelper helper = new com.android.jack.test.helper.CheckDexStructureTestHelper ( com.android.jack.compile.androidtree.ext.ExtCompilationTest.SOURCELIST ) ; helper.setCandidateClasspath ( com.android.jack.compile.androidtree.ext.ExtCompilationTest.CLASSPATH ) ; helper.setReferenceClasspath ( com.android.jack.compile.androidtree.ext.ExtCompilationTest.REF_CLASSPATH ) ; helper.setSourceLevel ( SourceLevel.JAVA_7 ) ; com.android.jack.test.comparator.ComparatorDex comparator = helper.createDexFileComparator ( ) ; comparator.setCompareDebugInfoBinary ( false ) ; comparator.setCompareInstructionNumber ( true ) ; comparator.setInstructionNumberTolerance ( 0.4F ) ; helper.runTest ( comparator ) ; }
Source:
public static boolean isExpansionOption ( com.google.devtools.common.options.Option annotation ) { return ( ( annotation.expansion ( ) . length ) > 0 ) || ( com.google.devtools.common.options.OptionsData.usesExpansionFunction ( annotation ) ) ; }

Target:
private static com.google.common.collect.ImmutableList < com.google.devtools.common.options.OptionDefinition > getAllOptionDefinitionsSorted ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass ) { return java.util.Arrays.stream ( optionsClass.getFields ( ) ) . map ( ( field ) -> { try { return com.google.devtools.common.options.OptionDefinition.extractOptionDefinition ( field ) ; } catch ( com.google.devtools.common.options.OptionsParser.ConstructionException e ) { return null ; } } ) . filter ( java.util.Objects :: nonNull ) . sorted ( OptionDefinition.BY_OPTION_NAME ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( com.google.common.collect.ImmutableList ) ) ; }
Source:
public static float [ ] normalize ( float [ ] a ) { float length = ( ( float ) ( java.lang.Math.sqrt ( ( ( ( a [ 0 ] ) * ( a [ 0 ] ) ) + ( ( a [ 1 ] ) * ( a [ 1 ] ) ) ) ) ) ) ; float [ ] b = new float [ ] { ( a [ 0 ] ) / length , ( a [ 1 ] ) / length } ; return b ; }

Target:
public static float [ ] normalize ( float [ ] a ) { float length = ( ( float ) ( java.lang.Math.hypot ( a [ 0 ] , a [ 1 ] ) ) ) ; float [ ] b = new float [ ] { ( a [ 0 ] ) / length , ( a [ 1 ] ) / length } ; return b ; }
Source:
public void getVisitedHistory ( android.webkit.ValueCallback < java.lang.String [ ] > callback ) { org.chromium.content.common.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "getVisitedHistory" ) ; mWebChromeClient.getVisitedHistory ( callback ) ; } org.chromium.content.common.TraceEvent.end ( ) ; }

Target:
public void getVisitedHistory ( android.webkit.ValueCallback < java.lang.String [ ] > callback ) { org.chromium.base.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "getVisitedHistory" ) ; mWebChromeClient.getVisitedHistory ( callback ) ; } org.chromium.base.TraceEvent.end ( ) ; }
Source:
public void setNetworkSelectionModeAutomatic ( int subId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setNetworkSelectionModeAutomatic ( subId ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeAutomatic RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeAutomatic NPE" , ex ) ; } }

Target:
public com.android.ims.internal.IImsRegistration getImsRegistration ( int slotIndex , int feature ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getImsRegistration ( slotIndex , feature ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsRegistration, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public java.lang.Boolean bluetoothA2dpSinkConnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "device" , description = "Name or MAC address of a bluetooth device." ) java.lang.String device ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpSinkFacade.sA2dpSinkProfile ) == null ) return false ; android.bluetooth.BluetoothDevice mDevice = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( BluetoothFacade.DiscoveredDevices , device ) ; com.googlecode.android_scripting.Log.d ( ( "Connecting to device " + ( mDevice.getAliasName ( ) ) ) ) ; return a2dpSinkConnect ( mDevice ) ; }

Target:
public java.lang.Boolean bluetoothA2dpSinkConnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "device" , description = "Name or MAC address of a bluetooth device." ) java.lang.String deviceStr ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpSinkFacade.sA2dpSinkProfile ) == null ) return false ; android.bluetooth.BluetoothDevice device = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( BluetoothFacade.DiscoveredDevices , deviceStr ) ; com.googlecode.android_scripting.Log.d ( ( "Connecting to device " + ( device.getAliasName ( ) ) ) ) ; return a2dpSinkConnect ( device ) ; }
Source:
public void trackingDisabled_triggerUpdateIfNeededNotAllowed ( ) { configureTrackingDisabled ( ) ; mPackageTracker.start ( ) ; mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; try { mPackageTracker.triggerUpdateIfNeeded ( true ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; }

Target:
public void trackingDisabled_triggerUpdateIfNeededNotAllowed ( ) { configureTrackingDisabled ( ) ; mPackageTracker.start ( ) ; mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; try { mPackageTracker.triggerUpdateIfNeeded ( true ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; }
Source:
public static int canMergeAfterBCE1 ( ) { int [ ] array = new int [ ] { 0 , 1 , 2 , 3 } ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = ( array [ i ] ) + 1 ; } return array [ ( ( array.length ) - 1 ) ] ; }

Target:
public static int canMergeAfterBCE1 ( ) { int [ ] array = new int [ ] { 0 , 7 , 14 , 21 } ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = ( array [ i ] ) / 7 ; } return array [ ( ( array.length ) - 1 ) ] ; }
Source:
private com.android.jack.ir.ast.JMethod findImplementation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass receiverType ) { com.android.jack.ir.ast.JClass currentType = receiverType ; while ( currentType instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.ir.ast.JMethod foundMethod = findMethod ( methodId , currentType , returnType ) ; if ( foundMethod != null ) { return foundMethod ; } currentType = ( ( com.android.jack.ir.ast.JDefinedClass ) ( currentType ) ) . getSuperClass ( ) ; } return null ; }

Target:
private com.android.jack.ir.ast.JMethod findImplementation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodIdWide methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass receiverType ) { com.android.jack.ir.ast.JClass currentType = receiverType ; while ( currentType instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.ir.ast.JMethod foundMethod = findMethod ( methodId , currentType , returnType ) ; if ( foundMethod != null ) { return foundMethod ; } currentType = ( ( com.android.jack.ir.ast.JDefinedClass ) ( currentType ) ) . getSuperClass ( ) ; } return null ; }
Source:
private void handleViewItemSelected ( ) { com.android.cts.verifier.TestResultsReport report = new com.android.cts.verifier.TestResultsReport ( this , mAdapter ) ; android.content.Intent intent = new android.content.Intent ( this , com.android.cts.verifier.ReportViewerActivity.class ) ; intent.putExtra ( ReportViewerActivity.EXTRA_REPORT_CONTENTS , report.getContents ( ) ) ; startActivity ( intent ) ; }

Target:
private void handleViewItemSelected ( ) { try { com.android.cts.verifier.TestResultsReport report = new com.android.cts.verifier.TestResultsReport ( this , mAdapter ) ; android.content.Intent intent = new android.content.Intent ( this , com.android.cts.verifier.ReportViewerActivity.class ) ; intent.putExtra ( ReportViewerActivity.EXTRA_REPORT_CONTENTS , report.getContents ( ) ) ; startActivity ( intent ) ; } catch ( java.io.IOException e ) { android.widget.Toast.makeText ( this , R.string.test_results_error , Toast.LENGTH_SHORT ) . show ( ) ; android.util.Log.e ( com.android.cts.verifier.TestListActivity.TAG , "Couldn't copy test results report" , e ) ; } }
Source:
boolean checkAudioSettingsPermission ( java.lang.String method ) { if ( ( mContext.checkCallingOrSelfPermission ( "android.permission.MODIFY_AUDIO_SETTINGS" ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return true ; } java.lang.String msg = ( ( ( ( "Audio Settings Permission Denial: " + method ) + " from pid=" ) + ( android.os.Binder.getCallingPid ( ) ) ) + ", uid=" ) + ( android.os.Binder.getCallingUid ( ) ) ; android.util.Log.w ( android.media.AudioService.TAG , msg ) ; return false ; }

Target:
boolean checkAudioSettingsPermission ( java.lang.String method ) { if ( ( mContext.checkCallingOrSelfPermission ( android.Manifest.permission.MODIFY_AUDIO_SETTINGS ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return true ; } java.lang.String msg = ( ( ( ( "Audio Settings Permission Denial: " + method ) + " from pid=" ) + ( android.os.Binder.getCallingPid ( ) ) ) + ", uid=" ) + ( android.os.Binder.getCallingUid ( ) ) ; android.util.Log.w ( android.media.AudioService.TAG , msg ) ; return false ; }
Source:
public void writeOnImsCallHandoverEvent ( int phoneId , int eventType , com.android.ims.internal.ImsCallSession session , int srcAccessTech , int targetAccessTech , com.android.ims.ImsReasonInfo reasonInfo ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( eventType ) . setCallIndex ( getCallId ( session ) ) . setSrcAccessTech ( srcAccessTech ) . setTargetAccessTech ( targetAccessTech ) . setImsReasonInfo ( toImsReasonInfoProto ( reasonInfo ) ) ) ; } }

Target:
public void writeOnImsCommand ( int phoneId , android.telephony.ims.ImsCallSession session , int command ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.RilCall.Type.IMS_COMMAND ) . setCallIndex ( getCallId ( session ) ) . setImsCommand ( command ) ) ; } }
Source:
public boolean clearUsedByOtherApps ( java.lang.String packageName ) { synchronized ( mPackageUseInfoMap ) { com.android.server.pm.dex.PackageDexUsage.PackageUseInfo packageUseInfo = mPackageUseInfoMap.get ( packageName ) ; if ( ( packageUseInfo == null ) || ( ! ( packageUseInfo.mIsUsedByOtherApps ) ) ) { return false ; } packageUseInfo.mIsUsedByOtherApps = false ; return true ; } }

Target:
boolean clearUsedByOtherApps ( java.lang.String packageName ) { synchronized ( mPackageUseInfoMap ) { com.android.server.pm.dex.PackageDexUsage.PackageUseInfo packageUseInfo = mPackageUseInfoMap.get ( packageName ) ; if ( packageUseInfo == null ) { return false ; } return packageUseInfo.clearCodePathUsedByOtherApps ( ) ; } }
Source:
public void testIssue42798 ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( "src/test/pkg/StringFormat3.java:12: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String [StringFormatMatches]\n" + " context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:13: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String [StringFormatMatches]\n" ) + " String s4 = String.format(context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "res/values/formatstrings5.xml" , "src/test/pkg/StringFormat3.java.txt=>src/test/pkg/StringFormat3.java" ) ) ; }

Target:
public void testIssue42798 ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "src/test/pkg/StringFormat3.java:16: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String [StringFormatMatches]\n" + " context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:17: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String [StringFormatMatches]\n" ) + " String s4 = String.format(context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:22: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String [StringFormatMatches]\n" ) + " context.getString(R.string.gridview_views_count), \"string\");\n" ) + " ~~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "3 errors, 0 warnings\n" ) ) , lintProject ( "res/values/formatstrings5.xml" , "src/test/pkg/StringFormat3.java.txt=>src/test/pkg/StringFormat3.java" ) ) ; }
Source:
public int getNodeEndOffset ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( getPosition ( node , ( - 1 ) , ( - 1 ) ) ) ) ; if ( pos != null ) { com.android.tools.lint.Position end = pos.getEnd ( ) ; if ( end != null ) { return end.getOffset ( ) ; } } return - 1 ; }

Target:
public int getNodeEndOffset ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( mParser.getPosition ( node , ( - 1 ) , ( - 1 ) ) ) ) ; if ( pos != null ) { com.android.utils.PositionXmlParser.Position end = pos.getEnd ( ) ; if ( end != null ) { return end.getOffset ( ) ; } } return - 1 ; }
Source:
public static < T > java.util.Iterator < T > concat ( java.util.Iterator < ? extends T > a , java.util.Iterator < ? extends T > b ) { com.google.common.base.Preconditions.checkNotNull ( a ) ; com.google.common.base.Preconditions.checkNotNull ( b ) ; return com.google.common.collect.Iterators.concat ( java.util.Arrays.asList ( a , b ) . iterator ( ) ) ; }

Target:
public static < T > com.google.common.collect.UnmodifiableIterator < T > emptyIterator ( ) { return com.google.common.collect.Iterators.emptyListIterator ( ) ; }
Source:
private boolean satisfiedByNetworkCapabilities ( android.net.NetworkCapabilities nc , boolean onlyImmutable ) { return ( ( ( ( ( nc != null ) && ( satisfiedByNetCapabilities ( nc , onlyImmutable ) ) ) && ( satisfiedByTransportTypes ( nc ) ) ) && ( onlyImmutable || ( satisfiedByLinkBandwidths ( nc ) ) ) ) && ( satisfiedBySpecifier ( nc ) ) ) && ( onlyImmutable || ( satisfiedBySignalStrength ( nc ) ) ) ; }

Target:
private boolean satisfiedByNetworkCapabilities ( android.net.NetworkCapabilities nc , boolean onlyImmutable ) { return ( ( ( ( ( ( nc != null ) && ( satisfiedByNetCapabilities ( nc , onlyImmutable ) ) ) && ( satisfiedByTransportTypes ( nc ) ) ) && ( onlyImmutable || ( satisfiedByLinkBandwidths ( nc ) ) ) ) && ( satisfiedBySpecifier ( nc ) ) ) && ( onlyImmutable || ( satisfiedBySignalStrength ( nc ) ) ) ) && ( onlyImmutable || ( satisfiedByUids ( nc ) ) ) ; }
Source:
protected void onSaveInstanceState ( android.os.Bundle out ) { if ( mPinDialog.isDialogOpen ( ) ) { out.putInt ( com.android.settings.SimLockSettings.DIALOG_STATE , mDialogState ) ; out.putString ( com.android.settings.SimLockSettings.DIALOG_PIN , mPinDialog.getEditText ( ) . getText ( ) . toString ( ) ) ; out.putString ( com.android.settings.SimLockSettings.DIALOG_ERROR , mError ) ; out.putBoolean ( com.android.settings.SimLockSettings.ENABLE_TO_STATE , mToState ) ; } else { super . onSaveInstanceState ( out ) ; } }

Target:
protected void onSaveInstanceState ( android.os.Bundle out ) { if ( mPinDialog.isDialogOpen ( ) ) { out.putInt ( com.android.settings.IccLockSettings.DIALOG_STATE , mDialogState ) ; out.putString ( com.android.settings.IccLockSettings.DIALOG_PIN , mPinDialog.getEditText ( ) . getText ( ) . toString ( ) ) ; out.putString ( com.android.settings.IccLockSettings.DIALOG_ERROR , mError ) ; out.putBoolean ( com.android.settings.IccLockSettings.ENABLE_TO_STATE , mToState ) ; } else { super . onSaveInstanceState ( out ) ; } }
Source:
private void autoConnectA2dpSink ( ) { com.android.bluetooth.a2dp.A2dpSinkService a2dpSinkService = com.android.bluetooth.a2dp.A2dpSinkService.getA2dpSinkService ( ) ; android.bluetooth.BluetoothDevice [ ] bondedDevices = getBondedDevices ( ) ; if ( ( bondedDevices == null ) || ( a2dpSinkService == null ) ) { return ; } for ( android.bluetooth.BluetoothDevice device : bondedDevices ) { debugLog ( ( "autoConnectA2dp() - Connecting A2DP Sink with " + ( device.toString ( ) ) ) ) ; a2dpSinkService.connect ( device ) ; } }

Target:
public void autoConnect ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { errorLog ( "autoConnect() - BT is not ON. Exiting autoConnect" ) ; return ; } if ( ( isQuietModeEnabled ( ) ) == false ) { debugLog ( "autoConnect() - Initiate auto connection on BT on..." ) ; autoConnectHeadset ( ) ; autoConnectA2dp ( ) ; autoConnectHeadsetClient ( ) ; autoConnectA2dpSink ( ) ; autoConnectPbapClient ( ) ; } else { debugLog ( "autoConnect() - BT is in quiet mode. Not initiating auto connections" ) ; } }
Source:
public android.net.wifi.WifiConfiguration getSavedNetworkForScanDetailAndCache ( com.android.server.wifi.ScanDetail scanDetail ) { android.net.wifi.WifiConfiguration network = getSavedNetworkForScanDetail ( scanDetail ) ; if ( network == null ) { return null ; } saveToScanDetailCacheForNetwork ( network , scanDetail ) ; return getConfiguredNetworkWithPassword ( network.networkId ) ; }

Target:
public android.net.wifi.WifiConfiguration getSavedNetworkForScanDetailAndCache ( com.android.server.wifi.ScanDetail scanDetail ) { android.net.wifi.WifiConfiguration network = getSavedNetworkForScanDetail ( scanDetail ) ; if ( network == null ) { return null ; } saveToScanDetailCacheForNetwork ( network , scanDetail ) ; if ( ( ( scanDetail.getNetworkDetail ( ) ) != null ) && ( ( scanDetail.getNetworkDetail ( ) . getDtimInterval ( ) ) > 0 ) ) { network.dtimInterval = scanDetail.getNetworkDetail ( ) . getDtimInterval ( ) ; } return createExternalWifiConfiguration ( network , true ) ; }
Source:
private void fetchActiveDevices ( ) { com.android.settingslib.bluetooth.A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile ( ) ; if ( a2dpProfile != null ) { mIsActiveDeviceA2dp = mDevice.equals ( a2dpProfile.getActiveDevice ( ) ) ; } com.android.settingslib.bluetooth.HeadsetProfile headsetProfile = mProfileManager.getHeadsetProfile ( ) ; if ( headsetProfile != null ) { mIsActiveDeviceHeadset = mDevice.equals ( headsetProfile.getActiveDevice ( ) ) ; } com.android.settingslib.bluetooth.HearingAidProfile hearingAidProfile = mProfileManager.getHearingAidProfile ( ) ; if ( hearingAidProfile != null ) { mIsActiveDeviceHearingAid = hearingAidProfile.isActiveDevice ( mDevice ) ; } }

Target:
private void fetchActiveDevices ( ) { com.android.settingslib.bluetooth.A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile ( ) ; if ( a2dpProfile != null ) { mIsActiveDeviceA2dp = mDevice.equals ( a2dpProfile.getActiveDevice ( ) ) ; } com.android.settingslib.bluetooth.HeadsetProfile headsetProfile = mProfileManager.getHeadsetProfile ( ) ; if ( headsetProfile != null ) { mIsActiveDeviceHeadset = mDevice.equals ( headsetProfile.getActiveDevice ( ) ) ; } com.android.settingslib.bluetooth.HearingAidProfile hearingAidProfile = mProfileManager.getHearingAidProfile ( ) ; if ( hearingAidProfile != null ) { mIsActiveDeviceHearingAid = hearingAidProfile.getActiveDevices ( ) . contains ( mDevice ) ; } }
Source:
public void testMultipleSdk ( ) throws java.lang.Exception { assertEquals ( ( "AndroidManifest.xml:7: Warning: <uses-sdk> tag should specify a target API level (the highest verified version; when running on later versions, compatibility behaviors may be enabled) with android:targetSdkVersion=\"?\"\n" + ( ( ( "AndroidManifest.xml:9: Warning: <uses-sdk> tag should specify a minimum API level with android:minSdkVersion=\"?\"\n" + "ManifestOrderDetectorTest_testMultipleSdk/AndroidManifest.xml:8: Error: There should only be a single <uses-sdk> element in the manifest: merge these together\n" ) + "=> ManifestOrderDetectorTest_testMultipleSdk/AndroidManifest.xml:7: Also appears here\n" ) + "=> ManifestOrderDetectorTest_testMultipleSdk/AndroidManifest.xml:9: Also appears here" ) ) , lintProject ( "multiplesdk.xml=>AndroidManifest.xml" , "res/values/strings.xml" ) ) ; }

Target:
public void testMultipleSdk ( ) throws java.lang.Exception { assertEquals ( ( "AndroidManifest.xml:8: Error: There should only be a single <uses-sdk> element in the manifest: merge these together [MultipleUsesSdk]\n" + ( ( ( ( ( ( ( ( ( ( ( " <uses-sdk android:targetSdkVersion=\"14\" />\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " AndroidManifest.xml:7: Also appears here\n" ) + " AndroidManifest.xml:9: Also appears here\n" ) + "AndroidManifest.xml:7: Warning: <uses-sdk> tag should specify a target API level (the highest verified version; when running on later versions, compatibility behaviors may be enabled) with android:targetSdkVersion=\"?\" [UsesMinSdkAttributes]\n" ) + " <uses-sdk android:minSdkVersion=\"5\" />\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "AndroidManifest.xml:9: Warning: <uses-sdk> tag should specify a minimum API level with android:minSdkVersion=\"?\" [UsesMinSdkAttributes]\n" ) + " <uses-sdk android:maxSdkVersion=\"15\" />\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 2 warnings\n" ) + "" ) ) , lintProject ( "multiplesdk.xml=>AndroidManifest.xml" , "res/values/strings.xml" ) ) ; }
Source:
public void onServicesDiscovered ( android.bluetooth.BluetoothGatt gatt , int status ) { if ( com.android.cts.verifier.bluetooth.BleClientService.DEBUG ) { android.util.Log.d ( com.android.cts.verifier.bluetooth.BleClientService.TAG , "onServiceDiscovered" ) ; } if ( ( status == ( android.bluetooth.BluetoothGatt.GATT_SUCCESS ) ) && ( ( mBluetoothGatt.getService ( com.android.cts.verifier.bluetooth.BleClientService.SERVICE_UUID ) ) != null ) ) { notifyServicesDiscovered ( ) ; } }

Target:
public void onServicesDiscovered ( android.bluetooth.BluetoothGatt gatt , int status ) { if ( com.android.cts.verifier.bluetooth.BleClientService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleClientService.TAG , "onServiceDiscovered" ) ; if ( ( status == ( android.bluetooth.BluetoothGatt.GATT_SUCCESS ) ) && ( ( mBluetoothGatt.getService ( com.android.cts.verifier.bluetooth.BleClientService.SERVICE_UUID ) ) != null ) ) { notifyServicesDiscovered ( ) ; sleep ( 1000 ) ; writeCharacteristic ( com.android.cts.verifier.bluetooth.BleClientService.WRITE_VALUE ) ; } }
Source:
protected void engineSetParameter ( java.security.spec.AlgorithmParameterSpec arg0 ) throws java.security.InvalidAlgorithmParameterException { spiImpl.engineSetParameter ( arg0 ) ; }

Target:
private java.security.SignatureSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( spiImpl ) != null ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = java.security.Signature.tryAlgorithm ( key , provider , algorithm ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( getAlgorithm ( ) ) ) ) ; } spiImpl = ( ( java.security.SignatureSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
public com.android.internal.telephony.InboundSmsTracker makeInboundSmsTracker ( byte [ ] pdu , long timestamp , int destPort , boolean is3gpp2 , java.lang.String address , int referenceNumber , int sequenceNumber , int messageCount , boolean is3gpp2WapPdu , java.lang.String messageBody ) { return new com.android.internal.telephony.InboundSmsTracker ( pdu , timestamp , destPort , is3gpp2 , address , referenceNumber , sequenceNumber , messageCount , is3gpp2WapPdu , messageBody ) ; }

Target:
public com.android.internal.telephony.InboundSmsTracker makeInboundSmsTracker ( byte [ ] pdu , long timestamp , int destPort , boolean is3gpp2 , java.lang.String address , java.lang.String displayAddr , int referenceNumber , int sequenceNumber , int messageCount , boolean is3gpp2WapPdu , java.lang.String messageBody ) { return new com.android.internal.telephony.InboundSmsTracker ( pdu , timestamp , destPort , is3gpp2 , address , displayAddr , referenceNumber , sequenceNumber , messageCount , is3gpp2WapPdu , messageBody ) ; }