auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static void checkCallSuper ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.MethodDeclaration declaration , @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod superMethod = com.android.tools.lint.checks.CallSuperDetector.getRequiredSuperMethod ( method ) ; if ( superMethod != null ) { if ( ! ( com.android.tools.lint.checks.CallSuperDetector.SuperCallVisitor.callsSuper ( context , declaration , superMethod ) ) ) { java.lang.String methodName = method.getName ( ) ; java.lang.String message = ( "Overriding method should call `super." + methodName ) + "`" ; com.android.tools.lint.detector.api.Location location = context.getNameLocation ( declaration ) ; context.report ( com.android.tools.lint.checks.CallSuperDetector.ISSUE , declaration , location , message ) ; } } }

Target:
private static void checkCallSuper ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull com.intellij.psi.PsiMethod method ) { com.intellij.psi.PsiMethod superMethod = com.android.tools.lint.checks.CallSuperDetector.getRequiredSuperMethod ( context , method ) ; if ( superMethod != null ) { if ( ! ( com.android.tools.lint.checks.CallSuperDetector.SuperCallVisitor.callsSuper ( method , superMethod ) ) ) { java.lang.String methodName = method.getName ( ) ; java.lang.String message = ( "Overriding method should call `super." + methodName ) + "`" ; com.android.tools.lint.detector.api.Location location = context.getNameLocation ( method ) ; context.report ( com.android.tools.lint.checks.CallSuperDetector.ISSUE , method , location , message ) ; } } }
Source:
private static void testPackagePrivateAccessibleConstructor ( ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "sub.PPClass" ) ; java.lang.reflect.Constructor cons = c.getConstructor ( ) ; cons.setAccessible ( true ) ; cons.newInstance ( ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }

Target:
private static void testPackagePrivateAccessibleConstructor ( ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "sub.PPClass" ) ; java.lang.reflect.Constructor < ? > cons = c.getConstructor ( ) ; cons.setAccessible ( true ) ; cons.newInstance ( ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( java.lang.System.out ) ; } }
Source:
public void testReplacedFile ( ) throws java.lang.Exception { com.android.builder.resources.ResourceSet mergedSet = com.android.builder.resources.ResourceMergerTest.getMergedSet ( ) ; com.android.builder.resources.Resource layout = mergedSet.getResourceMap ( ) . get ( "layout/file_replaced_by_alias" ) ; assertNotNull ( layout.getValue ( ) ) ; }

Target:
public void testReplacedFile ( ) throws java.lang.Exception { com.android.builder.resources.ResourceMerger merger = com.android.builder.resources.ResourceMergerTest.getResourceMerger ( ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.builder.resources.Resource > mergedMap = merger.getResourceMap ( ) ; java.util.List < com.android.builder.resources.Resource > values = mergedMap.get ( "layout/file_replaced_by_alias" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.builder.resources.Resource layout = values.get ( 1 ) ; assertNotNull ( layout.getValue ( ) ) ; }
Source:
private static com.google.common.collect.ImmutableSet < java.lang.Class < ? > > getRawTypes ( java.lang.reflect.Type [ ] types ) { com.google.common.collect.ImmutableSet.Builder < java.lang.Class < ? > > builder = com.google.common.collect.ImmutableSet.builder ( ) ; for ( java.lang.reflect.Type type : types ) { builder.addAll ( com.google.common.reflect.TypeToken.getRawTypes ( type ) ) ; } return builder.build ( ) ; }

Target:
void visitParameterizedType ( java.lang.reflect.ParameterizedType t ) { builder.add ( ( ( java.lang.Class < ? > ) ( t.getRawType ( ) ) ) ) ; }
Source:
public static com.google.common.io.OutputSupplier < java.io.FileOutputStream > newOutputStreamSupplier ( java.io.File file ) { return com.google.common.io.Files.newOutputStreamSupplier ( file , false ) ; }

Target:
public byte [ ] read ( ) throws java.io.IOException { com.google.common.io.Closer closer = com.google.common.io.Closer.create ( ) ; try { java.io.FileInputStream in = closer.register ( openStream ( ) ) ; return com.google.common.io.Files.readFile ( in , in.getChannel ( ) . size ( ) ) ; } catch ( java.lang.Throwable e ) { throw closer.rethrow ( e ) ; } finally { closer.close ( ) ; } }
Source:
public void stopRinging ( ) { if ( ( mRingingCall ) != null ) { com.android.server.telecom.Log.event ( mRingingCall , Log.Events.STOP_RINGER ) ; mRingingCall = null ; } mRingtonePlayer.stop ( ) ; if ( mIsVibrating ) { mVibrator.cancel ( ) ; mIsVibrating = false ; } }

Target:
public void stopRinging ( ) { if ( ( mRingingCall ) != null ) { android.telecom.Log.addEvent ( mRingingCall , LogUtils.Events.STOP_RINGER ) ; mRingingCall = null ; } mRingtonePlayer.stop ( ) ; if ( mIsVibrating ) { mVibrator.cancel ( ) ; mIsVibrating = false ; } }
Source:
public void testExtensionsMutation ( ) { com.google.protobuf.nano.Extensions.ExtendableMessage extendableMessage = new com.google.protobuf.nano.Extensions.ExtendableMessage ( ) ; extendableMessage.setExtension ( SingularExtensions.someMessage , new com.google.protobuf.nano.Extensions.AnotherMessage ( ) ) ; extendableMessage.getExtension ( SingularExtensions.someMessage ) . string = "not empty" ; assertEquals ( "not empty" , extendableMessage.getExtension ( SingularExtensions.someMessage ) . string ) ; }

Target:
public void testExtensionsMutation ( ) { com.google.protobuf.nano.testext.Extensions.ExtendableMessage extendableMessage = new com.google.protobuf.nano.testext.Extensions.ExtendableMessage ( ) ; extendableMessage.setExtension ( SingularExtensions.someMessage , new com.google.protobuf.nano.testext.Extensions.AnotherMessage ( ) ) ; extendableMessage.getExtension ( SingularExtensions.someMessage ) . string = "not empty" ; assertEquals ( "not empty" , extendableMessage.getExtension ( SingularExtensions.someMessage ) . string ) ; }
Source:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; android.wm.cts.a225de Merge ; android.wm.cts.into noug ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; if ( ! ( supportsDragAndDrop ( ) ) ) { return ; } mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mSourcePackageName ) ) ) ; mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mTargetPackageName ) ) ) ; }
Source:
private boolean anyZonesUseUtc ( java.util.List < java.lang.String > countryTimeZoneIds , long startTimeMillis ) { for ( java.lang.String countryTimeZoneId : countryTimeZoneIds ) { com.ibm.icu.util.BasicTimeZone timeZone = ( ( com.ibm.icu.util.BasicTimeZone ) ( com.ibm.icu.util.TimeZone.getTimeZone ( countryTimeZoneId ) ) ) ; com.ibm.icu.util.TimeZoneRule [ ] rules = timeZone.getTimeZoneRules ( startTimeMillis ) ; for ( com.ibm.icu.util.TimeZoneRule rule : rules ) { int utcOffset = ( rule.getRawOffset ( ) ) + ( rule.getDSTSavings ( ) ) ; if ( utcOffset == 0 ) { return true ; } } } return false ; }

Target:
private static boolean anyZonesUseUtc ( java.util.List < java.lang.String > timeZoneIds , long startTimeMillis ) { for ( java.lang.String timeZoneId : timeZoneIds ) { com.ibm.icu.util.BasicTimeZone timeZone = ( ( com.ibm.icu.util.BasicTimeZone ) ( com.ibm.icu.util.TimeZone.getTimeZone ( timeZoneId ) ) ) ; com.ibm.icu.util.TimeZoneRule [ ] rules = timeZone.getTimeZoneRules ( startTimeMillis ) ; for ( com.ibm.icu.util.TimeZoneRule rule : rules ) { int utcOffset = ( rule.getRawOffset ( ) ) + ( rule.getDSTSavings ( ) ) ; if ( utcOffset == 0 ) { return true ; } } } return false ; }
Source:
public com.android.sdklib.IAndroidTarget [ ] getTargets ( ) { if ( ( mTargets ) == null ) { java.io.File sdkHome = getSdkHome ( ) ; if ( sdkHome != null ) { com.android.utils.StdLogger log = new com.android.utils.StdLogger ( com.android.utils.StdLogger.Level.WARNING ) ; com.android.sdklib.SdkManager manager = com.android.sdklib.SdkManager.createManager ( sdkHome.getPath ( ) , log ) ; if ( manager != null ) { mTargets = manager.getTargets ( ) ; } else { mTargets = new com.android.sdklib.IAndroidTarget [ 0 ] ; } } else { mTargets = new com.android.sdklib.IAndroidTarget [ 0 ] ; } } return mTargets ; }

Target:
public com.android.sdklib.IAndroidTarget [ ] getTargets ( ) { if ( ( mTargets ) == null ) { java.io.File sdkHome = getSdkHome ( ) ; if ( sdkHome != null ) { com.android.sdklib.repository.local.LocalSdk localSdk = new com.android.sdklib.repository.local.LocalSdk ( sdkHome ) ; mTargets = localSdk.getTargets ( ) ; } else { mTargets = new com.android.sdklib.IAndroidTarget [ 0 ] ; } } return mTargets ; }
Source:
public void testUpdateSubscribe ( ) { int sessionId = 1232 ; android.net.wifi.nan.SubscribeConfig subscribeConfig = new android.net.wifi.nan.SubscribeConfig.Builder ( ) . setServiceName ( "something.valid" ) . build ( ) ; int clientId = doConnect ( ) ; mDut.updateSubscribe ( clientId , sessionId , subscribeConfig ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . updateSubscribe ( clientId , sessionId , subscribeConfig ) ; }

Target:
public void testUpdateSubscribe ( ) { int sessionId = 1232 ; android.net.wifi.aware.SubscribeConfig subscribeConfig = new android.net.wifi.aware.SubscribeConfig.Builder ( ) . setServiceName ( "something.valid" ) . build ( ) ; int clientId = doConnect ( ) ; mDut.updateSubscribe ( clientId , sessionId , subscribeConfig ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . updateSubscribe ( clientId , sessionId , subscribeConfig ) ; }
Source:
public boolean isAlphaNumber ( java.lang.String number ) { if ( ! ( com.google.i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber ( number ) ) ) { return false ; } java.lang.StringBuilder strippedNumber = new java.lang.StringBuilder ( number ) ; maybeStripExtension ( strippedNumber ) ; return com.google.i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN.matcher ( strippedNumber ) . matches ( ) ; }

Target:
public boolean isAlphaNumber ( java.lang.CharSequence number ) { if ( ! ( com.google.i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber ( number ) ) ) { return false ; } java.lang.StringBuilder strippedNumber = new java.lang.StringBuilder ( number ) ; maybeStripExtension ( strippedNumber ) ; return com.google.i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN.matcher ( strippedNumber ) . matches ( ) ; }
Source:
private static < E > com.google.common.collect.ImmutableList < E > construct ( java.lang.Object ... elements ) { for ( int i = 0 ; i < ( elements.length ) ; i ++ ) { com.google.common.collect.ObjectArrays.checkElementNotNull ( elements [ i ] , i ) ; } return new com.google.common.collect.RegularImmutableList < E > ( elements ) ; }

Target:
static < E > com.google.common.collect.ImmutableList < E > asImmutableList ( java.lang.Object [ ] elements ) { return com.google.common.collect.ImmutableList.asImmutableList ( elements , elements.length ) ; }
Source:
private static void compileSourceToDex ( @ javax.annotation.Nonnull com.android.jack.Options options , @ javax.annotation.Nonnull java.io.File sourceFolderOrSourceList , @ javax.annotation.CheckForNull java.lang.String classpath , @ javax.annotation.Nonnull java.io.File out ) throws java.lang.Exception { options.setEcjArguments ( com.android.jack.TestTools.buildEcjArgs ( ) ) ; addFile ( sourceFolderOrSourceList , options.getEcjArguments ( ) ) ; options.setClasspath ( classpath ) ; options.setOutputFile ( out ) ; com.android.jack.experimental.incremental.JackIncremental.run ( options ) ; }

Target:
private static void compileSourceToDex ( @ javax.annotation.Nonnull com.android.jack.Options options , @ javax.annotation.Nonnull java.io.File sourceFolderOrSourceList , @ javax.annotation.CheckForNull java.lang.String classpath , @ javax.annotation.Nonnull java.io.File out ) throws java.lang.Exception { options.setEcjArguments ( com.android.jack.TestTools.buildEcjArgs ( ) ) ; addFile ( sourceFolderOrSourceList , options.getEcjArguments ( ) ) ; options.setClasspath ( classpath ) ; options.setOutputDir ( out ) ; com.android.jack.experimental.incremental.JackIncremental.run ( options ) ; }
Source:
public boolean onPackageChanged ( java.lang.String packageName , int uid , java.lang.String [ ] components ) { onPackageModified ( packageName ) ; return true ; }

Target:
public final void activityDestroyed ( android.os.IBinder token ) { if ( com.android.server.am.ActivityManagerService.DEBUG_SWITCH ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( "ACTIVITY DESTROYED: " + token ) ) ; synchronized ( this ) { com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; if ( stack != null ) { stack.activityDestroyedLocked ( token , "activityDestroyed" ) ; } } }
Source:
public boolean hasWaiters ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } lock.lock ( ) ; try { return ( guard.waiterCount ) > 0 ; } finally { lock.unlock ( ) ; } }

Target:
public boolean enterIf ( com.google.common.util.concurrent.Monitor.Guard guard , long time , java.util.concurrent.TimeUnit unit ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } if ( ! ( enter ( time , unit ) ) ) { return false ; } boolean satisfied = false ; try { return satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } }
Source:
public boolean equals ( @ javax.annotation.Nullable java.lang.Object obj ) { if ( obj == ( this ) ) { return true ; } if ( obj instanceof com.google.common.collect.Table ) { com.google.common.collect.Table < ? , ? , ? > other = ( ( com.google.common.collect.Table < ? , ? , ? > ) ( obj ) ) ; return cellSet ( ) . equals ( other.cellSet ( ) ) ; } return false ; }

Target:
public java.util.Set < com.google.common.collect.Table.Cell < R , C , V > > cellSet ( ) { return super . cellSet ( ) ; }
Source:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { HEAD ( 5 ) ; android.server.cts.c121a Merge ; }

Target:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME ) ; launchActivity ( false , false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; rotateAndCheckSizes ( initialSizes ) ; }
Source:
public < T > T [ ] toArray ( T [ ] other ) { if ( ( other.length ) < ( size ) ) { other = com.google.common.collect.ObjectArrays.newArray ( other , size ) ; } else if ( ( other.length ) > ( size ) ) { other [ size ] = null ; } java.lang.System.arraycopy ( array , offset , other , 0 , size ) ; return other ; }

Target:
public int lastIndexOf ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object == null ) { return - 1 ; } for ( int i = ( size ) - 1 ; i >= 0 ; i -- ) { if ( array [ ( ( offset ) + i ) ] . equals ( object ) ) { return i ; } } return - 1 ; }
Source:
public void testRevokeAffectsWholeGroup23 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokeAffectsWholeGroup_part1" ) ; } catch ( java.lang.AssertionError expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokeAffectsWholeGroup_part2" ) ; }

Target:
public void testRevokeAffectsWholeGroup23 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokeAffectsWholeGroup_part1" ) ; } catch ( java.lang.AssertionError expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokeAffectsWholeGroup_part2" ) ; }
Source:
public void test_remove ( ) { s = new java.util.Scanner ( "aab*b*" ) . useDelimiter ( "\\*" ) ; try { s.remove ( ) ; fail ( "should throw UnsupportedOperationException" ) ; } catch ( java.lang.UnsupportedOperationException e ) { } }

Target:
public void test_useRadix_I ( ) { s = new java.util.Scanner ( "test" ) ; try { s.useRadix ( ( ( java.lang.Character.MIN_RADIX ) - 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { s.useRadix ( ( ( java.lang.Character.MAX_RADIX ) + 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } s.useRadix ( 11 ) ; assertEquals ( 11 , s.radix ( ) ) ; }
Source:
public void test_da ( ) throws java.lang.Exception { libcore.icu.AlphabeticIndex da = new libcore.icu.AlphabeticIndex ( new java.util.Locale ( "da" ) ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Ænes" , "Æ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Øfer" , "Ø" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Œster" , "Ø" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Ågård" , "Å" ) ; }

Target:
public void test_da ( ) throws java.lang.Exception { libcore.icu.ImmutableIndex da = libcore.icu.AlphabeticIndexTest.createIndex ( new java.util.Locale ( "da" ) ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Ænes" , "Æ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Øfer" , "Ø" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Œster" , "Ø" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( da , "Ågård" , "Å" ) ; }
Source:
public void answer ( byte [ ] peer , int method , java.lang.String pin , boolean joinExisting , boolean persistent , int goIntent , ISupplicantP2pIface.connectCallback cb ) throws android.os.RemoteException { methods.add ( method ) ; if ( method == ( ISupplicantP2pIface.WpsProvisionMethod.DISPLAY ) ) { assertEquals ( pin , configPin ) ; } cb.onValues ( mStatusSuccess , pin ) ; }

Target:
public void answer ( byte [ ] peer , int method , java.lang.String pin , boolean joinExisting , boolean persistent , int goIntent , ISupplicantP2pIface.connectCallback cb ) throws android.os.RemoteException { methods.add ( method ) ; if ( ( method == ( ISupplicantP2pIface.WpsProvisionMethod.DISPLAY ) ) && ( android.text.TextUtils.isEmpty ( pin ) ) ) { cb.onValues ( mStatusSuccess , configPin ) ; } else { if ( method != ( ISupplicantP2pIface.WpsProvisionMethod.PBC ) ) { assertEquals ( pin , configPin ) ; } cb.onValues ( mStatusSuccess , "" ) ; } }
Source:
public void run ( ) { try { startBarrier.dec ( ) ; trackBarrier.waitFor ( ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( java.lang.System.out ) ; java.lang.System.exit ( 1 ) ; } l.add ( new java.lang.Double ( 0.0 ) ) ; if ( disableTracking ) { Main.enableAllocationTracking ( ( sameThread ? this : java.lang.Thread.currentThread ( ) ) , false ) ; } }

Target:
public void run ( ) { try { startBarrier.dec ( ) ; trackBarrier.waitFor ( ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( java.lang.System.out ) ; java.lang.System.exit ( 1 ) ; } l.add ( new java.lang.Double ( 0.0 ) ) ; if ( disableTracking ) { Main.enableAllocationTracking ( ( sameThread ? this : thisThread ) , false ) ; } }
Source:
public void setRingbackRequested ( java.lang.String callId , boolean ringback ) { com.android.server.telecom.Log.startSession ( "CSW.SRR" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setRingbackRequested %s %b" , callId , ringback ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setRingbackRequested ( ringback ) ; } else { } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void setRingbackRequested ( java.lang.String callId , boolean ringback ) { android.telecom.Log.startSession ( "CSW.SRR" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setRingbackRequested %s %b" , callId , ringback ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setRingbackRequested ( ringback ) ; } else { } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public void testDebugContextK ( ) { setupDebugContext ( ) ; Soob.forEach_write_k ( AUnused ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Soob.invoke_write_i ( 9 , 0 ) ; mRS.finish ( ) ; } Soob.invoke_send_msg ( ) ; waitForMessage ( ) ; Soob.destroy ( ) ; assertTrue ( mRanErrorHandler ) ; checkForErrors ( ) ; }

Target:
public void dontTestDebugContextK ( ) { setupDebugContext ( ) ; Soob.forEach_write_k ( AUnused ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Soob.invoke_write_i ( 9 , 0 ) ; mRS.finish ( ) ; } Soob.invoke_send_msg ( ) ; waitForMessage ( ) ; Soob.destroy ( ) ; assertTrue ( mRanErrorHandler ) ; checkForErrors ( ) ; }
Source:
public void TestFirst ( ) { android.icu.text.RuleBasedBreakIterator rbbi = new android.icu.text.RuleBasedBreakIterator ( "" ) ; rbbi.setText ( ( ( java.text.CharacterIterator ) ( null ) ) ) ; if ( ( rbbi.first ( ) ) != ( android.icu.text.BreakIterator.DONE ) ) { errln ( ( "RuleBasedBreakIterator.first() was suppose to return " + "BreakIterator.DONE when the object has a null fText." ) ) ; } }

Target:
public void TestFirst ( ) { android.icu.text.RuleBasedBreakIterator rbbi = new android.icu.text.RuleBasedBreakIterator ( ".;" ) ; rbbi.setText ( ( ( java.text.CharacterIterator ) ( null ) ) ) ; assertEquals ( "RuleBasedBreakIterator.first()" , BreakIterator.DONE , rbbi.first ( ) ) ; rbbi.setText ( "abc" ) ; assertEquals ( "RuleBasedBreakIterator.first()" , 0 , rbbi.first ( ) ) ; assertEquals ( "RuleBasedBreakIterator.next()" , 1 , rbbi.next ( ) ) ; }
Source:
public void onCallStateChanged ( int state , java.lang.String incomingNumber ) { if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( ( "PhoneStateListener onCallStateChanged: state is " + state ) ) ; if ( ( mEnableVideoCalling ) != null ) { mEnableVideoCalling.setEnabled ( ( state == ( android.telephony.TelephonyManager.CALL_STATE_IDLE ) ) ) ; } }

Target:
public void onCallStateChanged ( int state , java.lang.String incomingNumber ) { if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( ( "PhoneStateListener onCallStateChanged: state is " + state ) ) ; if ( ( mEnableVideoCalling ) != null ) { android.telephony.TelephonyManager telephonyManager = ( ( android.telephony.TelephonyManager ) ( getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; mEnableVideoCalling.setEnabled ( ( ( telephonyManager.getCallState ( ) ) == ( android.telephony.TelephonyManager.CALL_STATE_IDLE ) ) ) ; } }
Source:
private static org.w3c.dom.Element getNextSiblingElement ( org.w3c.dom.Element element ) { org.w3c.dom.Node sibling = element.getNextSibling ( ) ; while ( ( sibling != null ) && ( ( sibling.getNodeType ( ) ) != ( org.w3c.dom.Node.ELEMENT_NODE ) ) ) { sibling = sibling.getNextSibling ( ) ; } return ( ( org.w3c.dom.Element ) ( sibling ) ) ; }

Target:
public com.google.gson.JsonElement serialize ( com.android.manifmerger.Actions.ActionLocation src , java.lang.reflect.Type typeOfSrc , com.google.gson.JsonSerializationContext context ) { com.google.gson.JsonObject jsonObject = new com.google.gson.JsonObject ( ) ; jsonObject.add ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.POSITION_ELEMENT , context.serialize ( src.getSourceLocation ( ) ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.LINE_ATTRIBUTE , src.getPosition ( ) . getLine ( ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.COLUMN_ATTRIBUTE , src.getPosition ( ) . getColumn ( ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.OFFSET_ATTRIBUTE , src.getPosition ( ) . getOffset ( ) ) ; return jsonObject ; }
Source:
protected void fillRtTestInfos ( ) { rtTestInfos.add ( EXPLICIT001 ) ; rtTestInfos.add ( EXPLICIT002 ) ; rtTestInfos.add ( IMPLICIT001 ) ; rtTestInfos.add ( IMPLICIT002 ) ; rtTestInfos.add ( IMPLICIT003 ) ; rtTestInfos.add ( IMPLICIT004 ) ; rtTestInfos.add ( USELESS001 ) ; rtTestInfos.add ( USELESS002 ) ; }

Target:
protected void fillRtTestInfos ( ) { rtTestInfos.add ( EXPLICIT001 ) ; rtTestInfos.add ( EXPLICIT002 ) ; rtTestInfos.add ( IMPLICIT001 ) ; rtTestInfos.add ( IMPLICIT002 ) ; rtTestInfos.add ( IMPLICIT003 ) ; rtTestInfos.add ( IMPLICIT004 ) ; rtTestInfos.add ( USELESS001 ) ; rtTestInfos.add ( USELESS002 ) ; rtTestInfos.add ( USELESS004 ) ; }
Source:
public void setStreamVolume ( int streamType , int index , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.setMasterVolume ( index , flags , getContext ( ) . getOpPackageName ( ) ) ; } else { service.setStreamVolume ( streamType , index , flags , getContext ( ) . getOpPackageName ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in setStreamVolume" , e ) ; } }

Target:
public void setStreamVolume ( int streamType , int index , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.setMasterVolume ( index , flags , mApplicationContext.getOpPackageName ( ) ) ; } else { service.setStreamVolume ( streamType , index , flags , mApplicationContext.getOpPackageName ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in setStreamVolume" , e ) ; } }
Source:
public void testAesCbcHmacSha256Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacMd5Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 ) ; }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState " + ( mState ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getState(): not allowed for non-active user" ) ; return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mState ; }

Target:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return false ; return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }
Source:
public void testFailed ( com.android.ddmlib.testrunner.TestFailure status , com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( status.equals ( TestFailure.ERROR ) ) { mRunResult.reportTestFailure ( test , TestStatus.ERROR , trace ) ; } else { mRunResult.reportTestFailure ( test , TestStatus.FAILURE , trace ) ; } com.android.ddmlib.Log.d ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , java.lang.String.format ( "%s %s: %s" , test , status , trace ) ) ; }

Target:
public void testStarted ( com.android.ddmlib.testrunner.TestIdentifier test ) { mRunResult.testStarted ( test ) ; }
Source:
public static org.jetbrains.plugins.github.api.GithubGist createGist ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.api.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.util.List < org.jetbrains.plugins.github.api.GithubGist.FileContent > contents , @ org.jetbrains.annotations.NotNull java.lang.String description , boolean isPrivate ) throws java.io.IOException { java.lang.String request = org.jetbrains.plugins.github.api.GithubApiUtil.gson.toJson ( new org.jetbrains.plugins.github.api.GithubGistRequest ( contents , description , ( ! isPrivate ) ) ) ; return org.jetbrains.plugins.github.api.GithubApiUtil.createDataFromRaw ( org.jetbrains.plugins.github.api.GithubApiUtil.fromJson ( org.jetbrains.plugins.github.api.GithubApiUtil.postRequest ( auth , "/gists" , request ) , org.jetbrains.plugins.github.api.GithubGistRaw.class ) , org.jetbrains.plugins.github.api.GithubGist.class ) ; }

Target:
public static org.jetbrains.plugins.github.api.GithubGist createGist ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.util.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.util.List < org.jetbrains.plugins.github.api.GithubGist.FileContent > contents , @ org.jetbrains.annotations.NotNull java.lang.String description , boolean isPrivate ) throws java.io.IOException { java.lang.String request = org.jetbrains.plugins.github.api.GithubApiUtil.gson.toJson ( new org.jetbrains.plugins.github.api.GithubGistRequest ( contents , description , ( ! isPrivate ) ) ) ; return org.jetbrains.plugins.github.api.GithubApiUtil.createDataFromRaw ( org.jetbrains.plugins.github.api.GithubApiUtil.fromJson ( org.jetbrains.plugins.github.api.GithubApiUtil.postRequest ( auth , "/gists" , request ) , org.jetbrains.plugins.github.api.GithubGistRaw.class ) , org.jetbrains.plugins.github.api.GithubGist.class ) ; }
Source:
synchronized boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return sendReportNative ( id , data ) ; }

Target:
synchronized boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; } return ( ( checkDevice ( device ) ) && ( checkCallingUid ( ) ) ) && ( mHidDeviceNativeInterface.sendReport ( id , data ) ) ; }
Source:
public void testHasExtraWithKey ( ) { android.content.Intent intent = new android.content.Intent ( ) . putExtra ( "key1" , "value1" ) . putExtra ( "key2" , 100.0 ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtraWithKey ( "key1" ) . matches ( intent ) ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtraWithKey ( "key2" ) . matches ( intent ) ) ; }

Target:
public void hasExtraWithKeyDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( ) . putExtra ( "key1" , "value1" ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasExtraWithKey ( "key2" ) . matches ( intent ) ) ; }
Source:
public final void testPkgTypeBuildTool ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_BUILD_TOOLS ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeBuildTool ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_BUILD_TOOLS ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertFalse ( p.hasPath ( ) ) ; assertFalse ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public void reportPss ( android.app.IApplicationThread caller , int pss ) { com.android.server.Watchdog.PssRequestor req ; java.lang.String name ; com.android.server.am.ProcessRecord callerApp ; synchronized ( this ) { if ( caller == null ) { return ; } callerApp = getRecordForAppLocked ( caller ) ; if ( callerApp == null ) { return ; } callerApp.lastPss = pss ; req = callerApp ; name = callerApp.processName ; } com.android.server.Watchdog.getInstance ( ) . reportPss ( req , name , pss ) ; if ( ! ( callerApp.persistent ) ) { removeRequestedPss ( callerApp ) ; } }

Target:
public void run ( ) { try { java.lang.Thread.sleep ( 5000 ) ; } catch ( java.lang.InterruptedException e ) { } java.lang.String errorReport ; synchronized ( mStrictModeBuffer ) { errorReport = mStrictModeBuffer.toString ( ) ; if ( ( errorReport.length ( ) ) == 0 ) { return ; } mStrictModeBuffer.delete ( 0 , mStrictModeBuffer.length ( ) ) ; mStrictModeBuffer.trimToSize ( ) ; } dbox.addText ( dropboxTag , errorReport ) ; }
Source:
public static void math_013 ( ) { int a ; int b ; int res ; a = 3 ; b = 7 ; a += 32000 ; java.lang.System.out.println ( ( "a:" + a ) ) ; }

Target:
public static void math_013 ( ) { int a ; int b ; int res ; a = 3 ; b = 7 ; a += 32000 ; b -= 32000 ; java.lang.System.out.println ( ( "a:" + a ) ) ; java.lang.System.out.println ( ( "b:" + b ) ) ; }
Source:
public void notifyChange ( android.net.Uri uri , android.database.ContentObserver observer , boolean syncToNetwork ) { try { android.content.ContentResolver.getContentService ( ) . notifyChange ( uri , ( observer == null ? null : observer.getContentObserver ( ) ) , ( ( observer != null ) && ( observer.deliverSelfNotifications ( ) ) ) , syncToNetwork ) ; } catch ( android.os.RemoteException e ) { } }

Target:
public void notifyChange ( android.net.Uri uri , android.database.ContentObserver observer , boolean syncToNetwork , int userHandle ) { try { android.content.ContentResolver.getContentService ( ) . notifyChange ( uri , ( observer == null ? null : observer.getContentObserver ( ) ) , ( ( observer != null ) && ( observer.deliverSelfNotifications ( ) ) ) , syncToNetwork , userHandle ) ; } catch ( android.os.RemoteException e ) { } }
Source:
private void stopVpn ( ) { android.content.Intent intent = new android.content.Intent ( mActivity , com.android.cts.net.hostside.MyVpnService.class ) . putExtra ( ( ( mPackageName ) + ".cmd" ) , "disconnect" ) ; mActivity.startService ( intent ) ; }

Target:
public void onLost ( android.net.Network network ) { synchronized ( mLockShutdown ) { android.util.Log.i ( com.android.cts.net.hostside.VpnTest.TAG , ( ( ( "Got lost callback for network=" + network ) + ",mNetwork = " ) + ( mNetwork ) ) ) ; if ( ( mNetwork ) == network ) { mLockShutdown.notify ( ) ; } } }
Source:
public void callOnDropLeave ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.eclipse.adt.editors.layout.gscripts.IDragElement [ ] elements , com.android.ide.eclipse.adt.editors.layout.gscripts.DropFeedback feedback ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onDropLeave ( targetNode , elements , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropLeave() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }

Target:
public void callOnDropLeave ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.IDragElement [ ] elements , com.android.ide.common.api.DropFeedback feedback ) { com.android.ide.common.api.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onDropLeave ( targetNode , elements , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropLeave() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }
Source:
public boolean enableWBS ( ) { if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.enableWBS ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }

Target:
public void bindResponse ( int indId , boolean indStatus ) { final android.bluetooth.IBluetoothHeadset service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { service.bindResponse ( indId , indStatus ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } }
Source:
void moveUserToForeground ( com.android.server.am.UserState uss , int oldUserId , int newUserId ) { boolean homeInFront = mStackSupervisor.switchUserLocked ( newUserId , uss ) ; if ( homeInFront ) { startHomeActivityLocked ( newUserId , "moveUserToFroreground" ) ; } else { mStackSupervisor.resumeTopActivitiesLocked ( ) ; } com.android.server.am.EventLogTags.writeAmSwitchUser ( newUserId ) ; getUserManagerLocked ( ) . onUserForeground ( newUserId ) ; sendUserSwitchBroadcastsLocked ( oldUserId , newUserId ) ; }

Target:
public boolean moveTopActivityToPinnedStack ( int stackId , android.graphics.Rect bounds ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "moveTopActivityToPinnedStack()" ) ; synchronized ( this ) { if ( ! ( mSupportsPictureInPicture ) ) { throw new java.lang.IllegalStateException ( ( "moveTopActivityToPinnedStack:" + "Device doesn't support picture-in-pciture mode" ) ) ; } long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return mStackSupervisor.moveTopStackActivityToPinnedStackLocked ( stackId , bounds ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }
Source:
public com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resolveResourceId ( int id ) { if ( ( mResIdValueToNameMap ) != null ) { return mResIdValueToNameMap.get ( id ) ; } return null ; }

Target:
public com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resolveResourceId ( int id ) { com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > result = null ; if ( ( mResIdValueToNameMap ) != null ) { result = mResIdValueToNameMap.get ( id ) ; } if ( result == null ) { java.lang.String name = mRevDynamicIds.get ( id ) ; if ( name != null ) { result = com.android.util.Pair.of ( ResourceType.ID , name ) ; } } return result ; }
Source:
private static java.lang.Object newInstance ( java.lang.Class < ? > clazz , long constructorId ) { java.lang.System.logE ( ( "WARNING: ObjectStreamClass.newInstance(Class<?>, long) is private API and" + "will be removed in a future Android release." ) ) ; return sun.misc.Unsafe.getUnsafe ( ) . allocateInstance ( clazz ) ; }

Target:
private static java.lang.Object newInstance ( java.lang.Class < ? > clazz , long constructorId ) { final int targetSdkVersion = dalvik.system.VMRuntime.getRuntime ( ) . getTargetSdkVersion ( ) ; if ( ( targetSdkVersion > 0 ) && ( targetSdkVersion <= 24 ) ) { java.lang.System.logE ( ( "WARNING: ObjectStreamClass.newInstance(Class<?>, long) is private API and" + "will be removed in a future Android release." ) ) ; return sun.misc.Unsafe.getUnsafe ( ) . allocateInstance ( clazz ) ; } throw new java.lang.UnsupportedOperationException ( ( ( "ObjectStreamClass.newInstance(Class<?>, long) " + "is not supported on SDK " ) + targetSdkVersion ) ) ; }
Source:
public boolean checkForCondition ( ) { android.support.test.uiautomator.UiObject unlock = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . packageName ( "com.android.keyboard" ) . descriptionContains ( "Slide area" ) ) ; android.support.test.uiautomator.UiObject unlock2 = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( ( "com.android" + ".systemui:id/lock_icon" ) ) ) ; if ( ( unlock.exists ( ) ) || ( unlock2.exists ( ) ) ) { mDevice.pressMenu ( ) ; return true ; } return false ; }

Target:
public boolean checkForCondition ( ) { android.support.test.uiautomator.UiObject unlock = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . packageName ( "com.android.keyboard" ) . descriptionContains ( "Slide area" ) ) ; android.support.test.uiautomator.UiObject unlock2 = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( "com.android.systemui:id/lock_icon" ) ) ; if ( ( unlock.exists ( ) ) || ( unlock2.exists ( ) ) ) { mDevice.pressMenu ( ) ; return true ; } return false ; }
Source:
public java.lang.Object getValue ( ) { return value ; }

Target:
public java.lang.Object getValue ( ) { if ( allowMultiple ) { java.util.List result = com.google.common.collect.Lists.newArrayList ( ) ; com.google.common.collect.ListMultimap realValue = ( ( com.google.common.collect.ListMultimap ) ( value ) ) ; for ( com.google.devtools.common.options.OptionPriority priority : com.google.devtools.common.options.OptionPriority.values ( ) ) { if ( realValue.containsKey ( priority ) ) { result.addAll ( realValue.get ( priority ) ) ; } } return result ; } return value ; }
Source:
public boolean isPackageFrozen ( java.lang.String packageName ) { synchronized ( mPackages ) { final com.android.server.pm.PackageSetting ps = mSettings.mPackages.get ( packageName ) ; if ( ps != null ) { return ps.frozen ; } } android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( "Package " + packageName ) + " is missing; assuming frozen" ) ) ; return true ; }

Target:
public void notifyPackageUse ( java.lang.String packageName , int reason ) { synchronized ( mPackages ) { android.content.pm.PackageParser.Package p = mPackages.get ( packageName ) ; if ( p == null ) { return ; } p.mLastPackageUsageTimeInMills [ reason ] = java.lang.System.currentTimeMillis ( ) ; } }
Source:
private void setHighPerfModeEnabledNative ( boolean enable ) { if ( ! ( android.net.wifi.WifiNative.setSuspendOptimizationsCommand ( ( ! enable ) ) ) ) { loge ( "set suspend optimizations failed!" ) ; } if ( enable ) { if ( ! ( android.net.wifi.WifiNative.setPowerModeCommand ( android.net.wifi.WifiStateMachine.POWER_MODE_ACTIVE ) ) ) { loge ( "set power mode active failed!" ) ; } } else { if ( ! ( android.net.wifi.WifiNative.setPowerModeCommand ( android.net.wifi.WifiStateMachine.POWER_MODE_AUTO ) ) ) { loge ( "set power mode auto failed!" ) ; } } }

Target:
private void configureLinkProperties ( ) { if ( mWifiConfigStore.isUsingStaticIp ( mLastNetworkId ) ) { mLinkProperties = mWifiConfigStore.getLinkProperties ( mLastNetworkId ) ; } else { synchronized ( mDhcpInfoInternal ) { mLinkProperties = mDhcpInfoInternal.makeLinkProperties ( ) ; } mLinkProperties.setHttpProxy ( mWifiConfigStore.getProxyProperties ( mLastNetworkId ) ) ; } mLinkProperties.setInterfaceName ( mInterfaceName ) ; if ( android.net.wifi.WifiStateMachine.DBG ) { log ( ( ( ( "netId=" + ( mLastNetworkId ) ) + " Link configured: " ) + ( mLinkProperties.toString ( ) ) ) ) ; } }
Source:
protected synchronized boolean stop ( ) { android.util.Log.i ( com.android.bluetooth.hfp.HeadsetService.TAG , "stop()" ) ; if ( ! ( mStarted ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "stop() called before start()" ) ; return true ; } mStarted = false ; unregisterReceiver ( mHeadsetReceiver ) ; com.android.bluetooth.hfp.HeadsetStateMachine.destroy ( mStateMachine ) ; mStateMachine = null ; mStateMachinesThread.quitSafely ( ) ; mStateMachinesThread = null ; com.android.bluetooth.hfp.HeadsetService.setHeadsetService ( null ) ; return true ; }

Target:
protected synchronized boolean stop ( ) { android.util.Log.i ( com.android.bluetooth.hfp.HeadsetService.TAG , "stop()" ) ; if ( ! ( mStarted ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "stop() called before start()" ) ; return true ; } mStarted = false ; unregisterReceiver ( mHeadsetReceiver ) ; com.android.bluetooth.hfp.HeadsetStateMachine.destroy ( mStateMachine ) ; mStateMachine = null ; mNativeInterface.cleanup ( ) ; mSystemInterface.stop ( ) ; mStateMachinesThread.quitSafely ( ) ; mStateMachinesThread = null ; com.android.bluetooth.hfp.HeadsetService.setHeadsetService ( null ) ; return true ; }
Source:
public void testSendCallEventNull ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.sendCallEvent ( ids.mCallId , com.android.server.telecom.tests.BasicCallTests.TEST_EVENT , null ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . sendCallEvent ( ids.mCallId , com.android.server.telecom.tests.BasicCallTests.TEST_EVENT , null ) ; }

Target:
public void testSendCallEventNull ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.sendCallEvent ( ids.mCallId , com.android.server.telecom.tests.BasicCallTests.TEST_EVENT , null ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . sendCallEvent ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.BasicCallTests.TEST_EVENT ) , org.mockito.Matchers.isNull ( android.os.Bundle.class ) , org.mockito.Matchers.any ( ) ) ; }