auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void sendImsFeatureCreatedCallback ( int slot , int feature ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureCallback > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureCallback callbacks = i.next ( ) ; try { callbacks.imsFeatureCreated ( slot , feature ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureCreatedCallback: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }

Target:
private void sendImsFeatureCreatedCallback ( int slot , int feature ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureCallback > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureCallback callbacks = i.next ( ) ; try { callbacks.imsFeatureCreated ( slot , feature ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureCreatedCallback: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } }
Source:
public void traverse ( @ javax.annotation.Nonnull com.android.sched.scheduler.ScheduleInstance < ? super com.android.sched.item.Component > schedule ) throws java.lang.Exception { schedule.process ( this ) ; ifExpr.traverse ( schedule ) ; if ( ( thenStmt ) != null ) { thenStmt.traverse ( schedule ) ; } if ( ( elseStmt ) != null ) { elseStmt.traverse ( schedule ) ; } }

Target:
public void traverse ( @ javax.annotation.Nonnull com.android.sched.scheduler.ScheduleInstance < ? super com.android.sched.item.Component > schedule ) throws java.lang.Exception { schedule.process ( this ) ; ifExpr.traverse ( schedule ) ; thenStmt.traverse ( schedule ) ; if ( ( elseStmt ) != null ) { elseStmt.traverse ( schedule ) ; } }
Source:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { com.android.jack.ir.ast.JDefinedClassOrInterface definedClass = method.getEnclosingType ( ) ; if ( ( ( ( ! ( definedClass instanceof com.android.jack.ir.ast.JDefinedClass ) ) || ( definedClass.isExternal ( ) ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) { return ; } com.android.jack.transformations.enums.opt.SwitchEnumUsageCollector.Visitor visitor = new com.android.jack.transformations.enums.opt.SwitchEnumUsageCollector.Visitor ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( definedClass ) ) ) ; visitor.accept ( method ) ; }

Target:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { com.android.jack.ir.ast.JDefinedClassOrInterface definedClass = method.getEnclosingType ( ) ; if ( ( ( ! ( definedClass instanceof com.android.jack.ir.ast.JDefinedClass ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) { return ; } com.android.jack.transformations.enums.opt.SwitchEnumUsageCollector.Visitor visitor = new com.android.jack.transformations.enums.opt.SwitchEnumUsageCollector.Visitor ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( definedClass ) ) ) ; visitor.accept ( method ) ; }
Source:
public void testSetOffset ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.lang.String text = "cha" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 0 , iterator.getOffset ( ) ) ; }

Target:
public void testSetOffset ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.lang.String text = "cha" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; }
Source:
public static void setVisualVoicemailEnabled ( android.telephony.TelephonyManager telephonyManager , android.telecom.PhoneAccountHandle handle , boolean enabled ) { if ( ( android.os.Build.VERSION.SDK_INT ) < ( android.os.Build.VERSION_CODES.N_MR1 ) ) { com.android.dialer.common.Assert.fail ( "setVisualVoicemailEnabled called on pre-NMR1" ) ; } try { android.telephony.TelephonyManager.class . getMethod ( "setVisualVoicemailEnabled" , android.telecom.PhoneAccountHandle.class , boolean . class ) . invoke ( telephonyManager , handle , enabled ) ; } catch ( java.lang.NoSuchMethodException | java.lang.IllegalAccessException | java.lang.reflect.InvocationTargetException e ) { com.android.dialer.common.LogUtil.e ( "TelephonyManagerCompat.setVisualVoicemailEnabled" , "failed" , e ) ; } }

Target:
public static void setVisualVoicemailEnabled ( android.telephony.TelephonyManager telephonyManager , android.telecom.PhoneAccountHandle handle , boolean enabled ) { try { android.telephony.TelephonyManager.class . getMethod ( "setVisualVoicemailEnabled" , android.telecom.PhoneAccountHandle.class , boolean . class ) . invoke ( telephonyManager , handle , enabled ) ; } catch ( java.lang.NoSuchMethodException | java.lang.IllegalAccessException | java.lang.reflect.InvocationTargetException e ) { com.android.dialer.common.LogUtil.e ( "TelephonyManagerCompat.setVisualVoicemailEnabled" , "failed" , e ) ; } }
Source:
private org.mockito.ArgumentCaptor < android.location.CountryListener > verifyCountryIso ( android.location.CountryDetector mockDetector , java.lang.String resultIso ) { org.mockito.ArgumentCaptor < android.location.CountryListener > captor = org.mockito.ArgumentCaptor.forClass ( android.location.CountryListener.class ) ; org.mockito.Mockito.verify ( mockDetector ) . addCountryListener ( captor.capture ( ) , org.mockito.Matchers.any ( android.os.Looper.class ) ) ; assertEquals ( com.android.server.telecom.tests.CallLogManagerTest.TEST_ISO , resultIso ) ; return captor ; }

Target:
private org.mockito.ArgumentCaptor < android.location.CountryListener > verifyCountryIso ( android.location.CountryDetector mockDetector , java.lang.String resultIso ) { org.mockito.ArgumentCaptor < android.location.CountryListener > captor = org.mockito.ArgumentCaptor.forClass ( android.location.CountryListener.class ) ; org.mockito.Mockito.verify ( mockDetector ) . addCountryListener ( captor.capture ( ) , org.mockito.Matchers.any ( android.os.Looper.class ) ) ; org.junit.Assert.assertEquals ( com.android.server.telecom.tests.CallLogManagerTest.TEST_ISO , resultIso ) ; return captor ; }
Source:
public final java.nio.ByteBuffer putChar ( int i , char x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putChar ( ix ( checkIndex ( i , SizeOf.CHAR ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putChar ( int i , char x ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } putChar ( ix ( checkIndex ( i , SizeOf.CHAR ) ) , x ) ; return this ; }
Source:
public void continueOperation ( android.content.Intent resolutionIntent , android.os.Bundle resolutionExtras ) { if ( ! ( isEnabled ( ) ) ) { android.app.PendingIntent callbackIntent = resolutionIntent.getParcelableExtra ( android.telephony.euicc.EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_RESOLUTION_CALLBACK_INTENT ) ; if ( callbackIntent != null ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; } return ; } try { android.telephony.euicc.EuiccManager.getIEuiccController ( ) . continueOperation ( resolutionIntent , resolutionExtras ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void continueOperation ( android.content.Intent resolutionIntent , android.os.Bundle resolutionExtras ) { if ( ! ( isEnabled ( ) ) ) { android.app.PendingIntent callbackIntent = resolutionIntent.getParcelableExtra ( android.telephony.euicc.EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_RESOLUTION_CALLBACK_INTENT ) ; if ( callbackIntent != null ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; } return ; } try { getIEuiccController ( ) . continueOperation ( resolutionIntent , resolutionExtras ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
private static com.android.vts.entity.ProfilingPointRunEntity createProfilingReport ( java.lang.String [ ] labels , long [ ] values , com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode regressionMode ) { java.util.List < java.lang.String > labelList = java.util.Arrays.asList ( labels ) ; java.util.List < java.lang.Long > valueList = new java.util.ArrayList < > ( ) ; for ( long value : values ) { valueList.add ( value ) ; } return new com.android.vts.entity.ProfilingPointRunEntity ( com.google.appengine.api.datastore.KeyFactory.createKey ( TestEntity.KIND , "test" ) , "name" , 0 , regressionMode.getNumber ( ) , labelList , valueList , "x" , "y" ) ; }

Target:
private static com.android.vts.entity.ProfilingPointRunEntity createProfilingReport ( java.lang.String [ ] labels , long [ ] values , com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode regressionMode ) { java.util.List < java.lang.String > labelList = java.util.Arrays.asList ( labels ) ; java.util.List < java.lang.Long > valueList = new java.util.ArrayList < > ( ) ; for ( long value : values ) { valueList.add ( value ) ; } return new com.android.vts.entity.ProfilingPointRunEntity ( com.google.appengine.api.datastore.KeyFactory.createKey ( TestEntity.KIND , "test" ) , "name" , 0 , regressionMode.getNumber ( ) , labelList , valueList , "x" , "y" , null ) ; }
Source:
public void getWindowDisplayFrame ( com.android.server.WindowManagerService.Session session , android.view.IWindow client , android.graphics.Rect outDisplayFrame ) { synchronized ( mWindowMap ) { com.android.server.WindowManagerService.WindowState win = windowForClientLocked ( session , client ) ; if ( win == null ) { outDisplayFrame.setEmpty ( ) ; return ; } outDisplayFrame.set ( win.mDisplayFrame ) ; } }

Target:
public void getWindowDisplayFrame ( com.android.server.WindowManagerService.Session session , android.view.IWindow client , android.graphics.Rect outDisplayFrame ) { synchronized ( mWindowMap ) { com.android.server.WindowManagerService.WindowState win = windowForClientLocked ( session , client , false ) ; if ( win == null ) { outDisplayFrame.setEmpty ( ) ; return ; } outDisplayFrame.set ( win.mDisplayFrame ) ; } }
Source:
public void testStyleables2 ( ) throws java.lang.Exception { check ( "test.pkg" , ( "int[] styleable LimitedSizeLinearLayout { 0x7f010000, 0x7f010001 }\n" + ( ( "int styleable LimitedSizeLinearLayout_max_height 1\n" + "int styleable LimitedSizeLinearLayout_max_width 0\n" ) + "int xml authenticator 0x7f040000\n" ) ) , ( "/* AUTO-GENERATED FILE. DO NOT MODIFY.\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " *\n" + " * This class was automatically generated by the\n" ) + " * aapt tool from the resource data it found. It\n" ) + " * should not be modified by hand.\n" ) + " */\n" ) + "package test.pkg;\n" ) + "\n" ) + "public final class R {\n" ) + " public static final class styleable {\n" ) + " public static final int LimitedSizeLinearLayout_max_height = 1;\n" ) + " public static final int LimitedSizeLinearLayout_max_width = 0;\n" ) + " public static final int[] LimitedSizeLinearLayout = { 0x7f010000, 0x7f010001 };\n" ) + " }\n" ) + " public static final class xml {\n" ) + " public static final int authenticator = 0x7f040000;\n" ) + " }\n" ) + "}\n" ) ) ) ; }

Target:
public void testStyleables2 ( ) throws java.lang.Exception { check ( "test.pkg" , ( "/* AUTO-GENERATED FILE. DO NOT MODIFY.\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " *\n" + " * This class was automatically generated by the\n" ) + " * aapt tool from the resource data it found. It\n" ) + " * should not be modified by hand.\n" ) + " */\n" ) + "package test.pkg;\n" ) + "\n" ) + "public final class R {\n" ) + " public static final class styleable {\n" ) + " public static final int[] LimitedSizeLinearLayout = { 0x7f010000, 0x7f010001 };\n" ) + " public static final int LimitedSizeLinearLayout_max_height = 1;\n" ) + " public static final int LimitedSizeLinearLayout_max_width = 0;\n" ) + " }\n" ) + " public static final class xml {\n" ) + " public static final int authenticator = 0x7f040000;\n" ) + " }\n" ) + "}\n" ) ) , null , ( "int[] styleable LimitedSizeLinearLayout { 0x7f010000, 0x7f010001 }\n" + ( ( "int styleable LimitedSizeLinearLayout_max_height 1\n" + "int styleable LimitedSizeLinearLayout_max_width 0\n" ) + "int xml authenticator 0x7f040000\n" ) ) ) ; }
Source:
public java.util.List < java.io.File > getJavaClassFolders ( ) { if ( ( mJavaClassFolders ) == null ) { mJavaClassFolders = new java.util.ArrayList < java.io.File > ( 1 ) ; java.io.File outputClassFolder = mVariant.getMainArtifact ( ) . getClassesFolder ( ) ; if ( ( outputClassFolder != null ) && ( outputClassFolder.exists ( ) ) ) { mJavaClassFolders.add ( outputClassFolder ) ; } } return mJavaClassFolders ; }

Target:
public java.util.List < java.io.File > getJavaClassFolders ( ) { if ( ( mJavaClassFolders ) == null ) { mJavaClassFolders = new java.util.ArrayList < java.io.File > ( 1 ) ; java.io.File outputClassFolder = mVariant.getMainArtifact ( ) . getClassesFolder ( ) ; if ( outputClassFolder.exists ( ) ) { mJavaClassFolders.add ( outputClassFolder ) ; } } return mJavaClassFolders ; }
Source:
public static java.lang.String hex ( java.lang.CharSequence s ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; for ( int i = 0 ; i < ( s.length ( ) ) ; ++ i ) { if ( i != 0 ) result.append ( ',' ) ; result.append ( android.icu.dev.test.TestFmwk.hex ( s.charAt ( i ) ) ) ; } return result.toString ( ) ; }

Target:
protected static java.lang.String hex ( java.lang.CharSequence s ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; for ( int i = 0 ; i < ( s.length ( ) ) ; ++ i ) { if ( i != 0 ) result.append ( ',' ) ; result.append ( android.icu.dev.test.TestFmwk.hex ( s.charAt ( i ) ) ) ; } return result.toString ( ) ; }
Source:
public void removeRights ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } _removeRights ( mUniqueId , path ) ; }

Target:
public int removeRights ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _removeRights ( mUniqueId , path ) ; }
Source:
public void testDefaultMethodFails ( ) throws java.lang.Exception { org.objectweb.asm.ClassReader reader = new org.objectweb.asm.ClassReader ( com.google.devtools.build.android.desugar.Java7CompatibilityTest.WithDefault.class . getName ( ) ) ; try { reader.accept ( new com.google.devtools.build.android.desugar.Java7Compatibility ( null , null ) , 0 ) ; org.junit.Assert.fail ( "IllegalArgumentException expected" ) ; } catch ( java.lang.IllegalArgumentException expected ) { com.google.common.truth.Truth.assertThat ( expected ) . hasMessageThat ( ) . contains ( "getVersion()I" ) ; } }

Target:
public void testDefaultMethodFails ( ) throws java.lang.Exception { org.objectweb.asm.ClassReader reader = new org.objectweb.asm.ClassReader ( com.google.devtools.build.android.desugar.Java7CompatibilityTest.WithDefault.class . getName ( ) ) ; try { reader.accept ( new com.google.devtools.build.android.desugar.Java7Compatibility ( null , null , null ) , 0 ) ; org.junit.Assert.fail ( "IllegalArgumentException expected" ) ; } catch ( java.lang.IllegalArgumentException expected ) { com.google.common.truth.Truth.assertThat ( expected ) . hasMessageThat ( ) . contains ( "getVersion()I" ) ; } }
Source:
private boolean isSniEnabledByDefault ( ) { java.lang.String enableSNI = java.lang.System.getProperty ( "jsse.enableSNIExtension" , ( org.conscrypt.Platform.isSniEnabledByDefault ( ) ? "true" : "false" ) ) ; if ( "true" . equalsIgnoreCase ( enableSNI ) ) { return true ; } else if ( "false" . equalsIgnoreCase ( enableSNI ) ) { return false ; } else { throw new java.lang.RuntimeException ( "Can only set \"jsse.enableSNIExtension\" to \"true\" or \"false\"" ) ; } }

Target:
private boolean isSniEnabledByDefault ( ) { java.lang.String enableSNI = java.lang.System.getProperty ( "jsse.enableSNIExtension" , "true" ) ; if ( "true" . equalsIgnoreCase ( enableSNI ) ) { return true ; } else if ( "false" . equalsIgnoreCase ( enableSNI ) ) { return false ; } else { throw new java.lang.RuntimeException ( "Can only set \"jsse.enableSNIExtension\" to \"true\" or \"false\"" ) ; } }
Source:
public void setUiTTYMode ( int slotId , int featureType , int sessionId , int uiTtyMode , android.os.Message onComplete ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.setUiTTYMode ( sessionId , uiTtyMode , onComplete ) ; } } }

Target:
public void setUiTTYMode ( int slotId , int featureType , int uiTtyMode , android.os.Message onComplete ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.setUiTTYMode ( uiTtyMode , onComplete ) ; } } }
Source:
static void setLong ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , long value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }

Target:
static void setLong ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , long value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( expectFailure , exceptionThrown ) ; }
Source:
static android.net.Uri getContentFilterUri ( java.lang.String query , int directoryId ) { android.net.Uri baseUri = ( ( android.os.Build.VERSION.SDK_INT ) >= ( android.os.Build.VERSION_CODES.N ) ) ? com.android.dialer.searchfragment.remote.RemoteContactsCursorLoader.ENTERPRISE_CONTENT_FILTER_URI : android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_FILTER_URI ; return baseUri.buildUpon ( ) . appendPath ( query ) . appendQueryParameter ( ContactsContract.DIRECTORY_PARAM_KEY , java.lang.String.valueOf ( directoryId ) ) . appendQueryParameter ( ContactsContract.REMOVE_DUPLICATE_ENTRIES , "true" ) . appendQueryParameter ( ContactsContract.LIMIT_PARAM_KEY , com.android.dialer.searchfragment.remote.RemoteContactsCursorLoader.MAX_RESULTS ) . build ( ) ; }

Target:
static android.net.Uri getContentFilterUri ( java.lang.String query , long directoryId ) { android.net.Uri baseUri = ( ( android.os.Build.VERSION.SDK_INT ) >= ( android.os.Build.VERSION_CODES.N ) ) ? com.android.dialer.searchfragment.remote.RemoteContactsCursorLoader.ENTERPRISE_CONTENT_FILTER_URI : android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_FILTER_URI ; return baseUri.buildUpon ( ) . appendPath ( query ) . appendQueryParameter ( ContactsContract.DIRECTORY_PARAM_KEY , java.lang.String.valueOf ( directoryId ) ) . appendQueryParameter ( ContactsContract.REMOVE_DUPLICATE_ENTRIES , "true" ) . appendQueryParameter ( ContactsContract.LIMIT_PARAM_KEY , com.android.dialer.searchfragment.remote.RemoteContactsCursorLoader.MAX_RESULTS ) . build ( ) ; }
Source:
private static void verifyRequestFocusDone ( com.android.server.telecom.ConnectionServiceFocusManager focusManager , com.android.server.telecom.tests.CallFocus call , com.android.server.telecom.tests.RequestFocusCallback callback , boolean isConnectionServiceFocusChanged ) { org.mockito.Mockito.verify ( callback ) . onRequestFocusDone ( call ) ; org.mockito.Mockito.verify ( call.getConnectionServiceWrapper ( ) , org.mockito.Mockito.times ( ( isConnectionServiceFocusChanged ? 1 : 0 ) ) ) . connectionServiceFocusGained ( ) ; assertEquals ( call.getConnectionServiceWrapper ( ) , focusManager.getCurrentFocusConnectionService ( ) ) ; }

Target:
private static void verifyRequestFocusDone ( com.android.server.telecom.ConnectionServiceFocusManager focusManager , com.android.server.telecom.tests.CallFocus call , com.android.server.telecom.tests.RequestFocusCallback callback , boolean isConnectionServiceFocusChanged ) { org.mockito.Mockito.verify ( callback ) . onRequestFocusDone ( call ) ; org.mockito.Mockito.verify ( call.getConnectionServiceWrapper ( ) , org.mockito.Mockito.times ( ( isConnectionServiceFocusChanged ? 1 : 0 ) ) ) . connectionServiceFocusGained ( ) ; org.junit.Assert.assertEquals ( call.getConnectionServiceWrapper ( ) , focusManager.getCurrentFocusConnectionService ( ) ) ; }
Source:
public static java.lang.Object getDeserilizedObject ( java.lang.Object inputObject ) throws java.io.IOException , java.lang.ClassNotFoundException { java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream ( ) ; java.io.ObjectOutputStream oos = new java.io.ObjectOutputStream ( bos ) ; oos.writeObject ( inputObject ) ; oos.close ( ) ; java.io.ByteArrayInputStream bis = new java.io.ByteArrayInputStream ( bos.toByteArray ( ) ) ; java.io.ObjectInputStream ois = new java.io.ObjectInputStream ( bis ) ; java.lang.Object outputObject = ois.readObject ( ) ; tests.util.SerializationTester.lastOutput = outputObject ; ois.close ( ) ; return outputObject ; }

Target:
public static java.lang.Object getDeserilizedObject ( java.lang.Object inputObject ) throws java.io.IOException , java.lang.ClassNotFoundException { java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream ( ) ; java.io.ObjectOutputStream oos = new java.io.ObjectOutputStream ( bos ) ; oos.writeObject ( inputObject ) ; oos.close ( ) ; java.io.ByteArrayInputStream bis = new java.io.ByteArrayInputStream ( bos.toByteArray ( ) ) ; java.io.ObjectInputStream ois = new java.io.ObjectInputStream ( bis ) ; java.lang.Object outputObject = ois.readObject ( ) ; ois.close ( ) ; return outputObject ; }
Source:
void checkMap ( java.util.Map m1 , java.util.Map m2 ) { if ( m1.equals ( m2 ) ) return ; java.lang.StringBuffer buffer = new java.lang.StringBuffer ( ) ; java.util.Set m1entries = m1.entrySet ( ) ; java.util.Set m2entries = m2.entrySet ( ) ; getEntries ( "\r\nIn First, and not Second" , m1entries , m2entries , buffer , 20 ) ; getEntries ( "\r\nIn Second, and not First" , m2entries , m1entries , buffer , 20 ) ; errln ( buffer.toString ( ) ) ; }

Target:
void checkMap ( java.util.Map m1 , java.util.Map m2 ) { if ( m1.equals ( m2 ) ) return ; java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; java.util.Set m1entries = m1.entrySet ( ) ; java.util.Set m2entries = m2.entrySet ( ) ; getEntries ( "\r\nIn First, and not Second" , m1entries , m2entries , buffer , 20 ) ; getEntries ( "\r\nIn Second, and not First" , m2entries , m1entries , buffer , 20 ) ; errln ( buffer.toString ( ) ) ; }
Source:
public void handleSetListening ( boolean listening ) { if ( ( mListening ) == listening ) return ; mListening = listening ; if ( mListening ) { mController.addCallback ( mZenCallback ) ; com.android.systemui.Prefs.registerListener ( mContext , mPrefListener ) ; } else { mController.removeCallback ( mZenCallback ) ; com.android.systemui.Prefs.unregisterListener ( mContext , mPrefListener ) ; } }

Target:
public void handleSetListening ( boolean listening ) { if ( ( mListening ) == listening ) return ; mListening = listening ; if ( ( mController ) == null ) return ; if ( mListening ) { mController.addCallback ( mZenCallback ) ; com.android.systemui.Prefs.registerListener ( mContext , mPrefListener ) ; } else { mController.removeCallback ( mZenCallback ) ; com.android.systemui.Prefs.unregisterListener ( mContext , mPrefListener ) ; } }
Source:
public static com.android.sdklib.internal.avd.AvdManager getInstance ( @ com.android.annotations.NonNull com.android.sdklib.repository.local.LocalSdk localSdk , @ com.android.annotations.NonNull com.android.utils.ILogger log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { synchronized ( com.android.sdklib.internal.avd.AvdManager.mManagers ) { com.android.sdklib.internal.avd.AvdManager manager ; if ( ( manager = com.android.sdklib.internal.avd.AvdManager.mManagers.get ( localSdk.getLocation ( ) ) ) != null ) { return manager ; } manager = new com.android.sdklib.internal.avd.AvdManager ( localSdk , log ) ; com.android.sdklib.internal.avd.AvdManager.mManagers.put ( localSdk.getLocation ( ) . getPath ( ) , manager ) ; return manager ; } }

Target:
public static com.android.sdklib.internal.avd.AvdManager getInstance ( @ com.android.annotations.NonNull com.android.sdklib.repository.local.LocalSdk localSdk , @ com.android.annotations.NonNull com.android.utils.ILogger log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { synchronized ( com.android.sdklib.internal.avd.AvdManager.mManagers ) { com.android.sdklib.internal.avd.AvdManager manager ; if ( ( manager = com.android.sdklib.internal.avd.AvdManager.mManagers.get ( localSdk.getLocation ( ) . getPath ( ) ) ) != null ) { return manager ; } manager = new com.android.sdklib.internal.avd.AvdManager ( localSdk , log ) ; com.android.sdklib.internal.avd.AvdManager.mManagers.put ( localSdk.getLocation ( ) . getPath ( ) , manager ) ; return manager ; } }
Source:
public void decreaseMessageSize ( int decreaseSize ) { if ( ( decreaseSize > 0 ) && ( null != ( mParent ) ) ) { int size = mParent.getCurrentMessageSize ( ) ; size -= decreaseSize ; mParent.setCurrentMessageSize ( size ) ; } }

Target:
public void decreaseMessageSize ( int decreaseSize ) { if ( ( decreaseSize > 0 ) && ( null != ( mParent ) ) ) { int size = mParent.getCurrentMessageSize ( ) ; size -= decreaseSize ; if ( size < 0 ) { size = 0 ; } mParent.setCurrentMessageSize ( size ) ; } }
Source:
public static android.support.v8.renderscript.ScriptIntrinsicYuvToRGB create ( android.support.v8.renderscript.RenderScript rs , android.support.v8.renderscript.Element e ) { if ( rs.isNative ) { android.support.v8.renderscript.RenderScriptThunker rst = ( ( android.support.v8.renderscript.RenderScriptThunker ) ( rs ) ) ; return android.support.v8.renderscript.ScriptIntrinsicYuvToRGBThunker.create ( rs , e ) ; } int id = rs.nScriptIntrinsicCreate ( 6 , e.getID ( rs ) ) ; android.support.v8.renderscript.ScriptIntrinsicYuvToRGB si = new android.support.v8.renderscript.ScriptIntrinsicYuvToRGB ( id , rs ) ; return si ; }

Target:
public static android.support.v8.renderscript.ScriptIntrinsicYuvToRGB create ( android.support.v8.renderscript.RenderScript rs , android.support.v8.renderscript.Element e ) { int id = rs.nScriptIntrinsicCreate ( 6 , e.getID ( rs ) ) ; android.support.v8.renderscript.ScriptIntrinsicYuvToRGB si = new android.support.v8.renderscript.ScriptIntrinsicYuvToRGB ( id , rs ) ; return si ; }
Source:
public android.bluetooth.BluetoothSocket createScoSocket ( ) throws java.io.IOException { if ( ( isBluetoothEnabled ( ) ) == false ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_SCO , ( - 1 ) , true , true , this , ( - 1 ) , null ) ; }

Target:
public android.bluetooth.BluetoothSocket createScoSocket ( ) throws java.io.IOException { if ( ! ( isBluetoothEnabled ( ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_SCO , ( - 1 ) , true , true , this , ( - 1 ) , null ) ; }
Source:
public void run ( ) { java.lang.Class < ? > klass = null ; try { klass = java.lang.Class.forName ( org.apache.harmony.jpda.tests.jdwp.ReferenceType.SourceDebugExtensionDebuggee.classWithSourceDebugExtension ) ; } catch ( java.lang.ClassNotFoundException e ) { logWriter.println ( ( "--> Debuggee: Could not find class " + ( org.apache.harmony.jpda.tests.jdwp.ReferenceType.SourceDebugExtensionDebuggee.classWithSourceDebugExtension ) ) ) ; } synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; logWriter.println ( "--> Debuggee: SourceDebugExtensionDebuggee..." ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; }

Target:
public void run ( ) { synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; logWriter.println ( "--> Debuggee: SourceDebugExtensionDebuggee..." ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.phone.CallFeaturesSetting.EVENT_CLIR_EXECUTED : handleSetCLIRMessage ( ) ; break ; case com.android.phone.CallFeaturesSetting.EVENT_CW_EXECUTED : handleSetCWMessage ( ) ; break ; case com.android.phone.CallFeaturesSetting.EVENT_CF_EXECUTED : handleSetCFMessage ( msg.arg1 , ( ( android.os.AsyncResult ) ( msg.obj ) ) ) ; break ; case com.android.phone.CallFeaturesSetting.EVENT_VOICEMAIL_CHANGED : handleSetVMMessage ( ( ( android.os.AsyncResult ) ( msg.obj ) ) ) ; break ; case com.android.phone.CallFeaturesSetting.EVENT_ENHANCED_VP_EXECUTED : if ( com.android.phone.CallFeaturesSetting.DBG ) android.util.Log.d ( com.android.phone.CallFeaturesSetting.LOG_TAG , "setOptionComplete: Received event EVENT_ENHANCED_VP_EXECUTED" ) ; handleSetVPMessage ( ) ; break ; default : } }

Target:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.phone.CallFeaturesSetting.EVENT_CLIR_EXECUTED : handleSetCLIRMessage ( ) ; break ; case com.android.phone.CallFeaturesSetting.EVENT_CW_EXECUTED : handleSetCWMessage ( ) ; break ; case com.android.phone.CallFeaturesSetting.EVENT_CF_EXECUTED : handleSetCFMessage ( msg.arg1 , ( ( android.os.AsyncResult ) ( msg.obj ) ) ) ; break ; case com.android.phone.CallFeaturesSetting.EVENT_VOICEMAIL_CHANGED : handleSetVMMessage ( ( ( android.os.AsyncResult ) ( msg.obj ) ) ) ; break ; default : } }
Source:
public int getDrmObjectType ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _getDrmObjectType ( mUniqueId , path , mimeType ) ; }

Target:
public int getDrmObjectType ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } return _getDrmObjectType ( mUniqueId , path , mimeType ) ; }
Source:
public void test_SSL_get_servername_null ( ) throws java.lang.Exception { try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_servername ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } int c = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; int s = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_new ( c ) ; assertNull ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_servername ( s ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_free ( s ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c ) ; org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.assertNoErrors ( ) ; }

Target:
public void test_SSL_get_servername_null ( ) throws java.lang.Exception { try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_servername ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } int c = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; int s = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_new ( c ) ; assertNull ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_servername ( s ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_free ( s ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c ) ; }
Source:
public void showInputMethodPickerFromClient ( com.android.internal.view.IInputMethodClient client ) { synchronized ( mMethodMap ) { if ( ( ( ( mCurClient ) == null ) || ( client == null ) ) || ( ( mCurClient.client.asBinder ( ) ) != ( client.asBinder ( ) ) ) ) { android.util.Slog.w ( com.android.server.InputMethodManagerService.TAG , ( "Ignoring showInputMethodDialogFromClient of: " + client ) ) ; return ; } mHandler.sendEmptyMessage ( com.android.server.InputMethodManagerService.MSG_SHOW_IM_PICKER ) ; } }

Target:
public void showInputMethodPickerFromClient ( com.android.internal.view.IInputMethodClient client ) { synchronized ( mMethodMap ) { if ( ( ( ( mCurClient ) == null ) || ( client == null ) ) || ( ( mCurClient.client.asBinder ( ) ) != ( client.asBinder ( ) ) ) ) { android.util.Slog.w ( com.android.server.InputMethodManagerService.TAG , ( "Ignoring showInputMethodDialogFromClient of: " + client ) ) ; } mHandler.sendEmptyMessage ( com.android.server.InputMethodManagerService.MSG_SHOW_IM_PICKER ) ; } }
Source:
private void addImportedResource ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFile file , @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session , @ javax.annotation.Nonnull java.lang.String currentPath ) throws com.android.jack.resource.ResourceImportConflictException { com.android.sched.vfs.VPath path = new com.android.sched.vfs.VPath ( currentPath , com.android.jack.backend.jayce.JayceFileImporter.VPATH_SEPARATOR ) ; com.android.jack.ir.ast.Resource newResource = new com.android.jack.ir.ast.Resource ( path , file ) ; for ( com.android.jack.ir.ast.Resource existingResource : session.getResources ( ) ) { if ( existingResource.getPath ( ) . equals ( path ) ) { throw new com.android.jack.resource.ResourceImportConflictException ( newResource.getLocation ( ) , existingResource.getLocation ( ) ) ; } } session.addResource ( newResource ) ; }

Target:
private void addImportedResource ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFile file , @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session , @ javax.annotation.Nonnull java.lang.String currentPath ) throws com.android.jack.resource.ResourceImportConflictException { com.android.sched.vfs.VPath path = new com.android.sched.vfs.VPath ( currentPath , com.android.jack.backend.jayce.JayceFileImporter.VPATH_SEPARATOR ) ; com.android.jack.ir.ast.Resource newResource = new com.android.jack.ir.ast.Resource ( path , file ) ; for ( com.android.jack.ir.ast.Resource existingResource : session.getResources ( ) ) { if ( existingResource.getPath ( ) . equals ( path ) ) { throw new com.android.jack.resource.ResourceImportConflictException ( existingResource , newResource.getLocation ( ) ) ; } } session.addResource ( newResource ) ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] buffer = new byte [ 1 ] ; org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , buffer , 0 , 1 , 0 ) ; assertEquals ( 42 , buffer [ 0 ] ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] buffer = new byte [ 1 ] ; org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , buffer , 0 , 1 , 0 ) ; org.junit.Assert.assertEquals ( 42 , buffer [ 0 ] ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
private java.lang.String formatPhoneNumber ( java.lang.String number , java.lang.String normalizedNumber , java.lang.String countryIso ) { if ( android.text.TextUtils.isEmpty ( number ) ) { return "" ; } if ( com.android.dialer.phonenumberutil.PhoneNumberHelper.isUriNumber ( number ) ) { return number ; } if ( android.text.TextUtils.isEmpty ( countryIso ) ) { countryIso = currentCountryIso ; } return android.telephony.PhoneNumberUtils.formatNumber ( number , normalizedNumber , countryIso ) ; }

Target:
private java.lang.String formatPhoneNumber ( java.lang.String number , java.lang.String normalizedNumber , java.lang.String countryIso ) { if ( android.text.TextUtils.isEmpty ( number ) ) { return "" ; } if ( com.android.dialer.phonenumberutil.PhoneNumberHelper.isUriNumber ( number ) ) { return number ; } if ( android.text.TextUtils.isEmpty ( countryIso ) ) { countryIso = currentCountryIso ; } return com.android.dialer.phonenumberutil.PhoneNumberHelper.formatNumber ( context , number , normalizedNumber , countryIso ) ; }
Source:
public static int runTest ( int input ) throws java.lang.Exception { java.lang.Class < ? > c = java.lang.Class.forName ( "TestCase" ) ; java.lang.reflect.Method m = c.getMethod ( "testCase" , new java.lang.Class [ ] { int . class } ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , input ) ) ) ; }

Target:
public static int runTest ( int input ) throws java.lang.Exception { java.lang.Class < ? > c = java.lang.Class.forName ( "TestCase" ) ; java.lang.reflect.Method m = c.getMethod ( "testCase" , int . class ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , input ) ) ) ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , byte [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , data.length ) ; }

Target:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , int [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }
Source:
public void setSupplicantLogLevel ( boolean turnOnVerbose ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { int logLevel = ( turnOnVerbose ) ? SupplicantStaIfaceHal.LOG_LEVEL_DEBUG : SupplicantStaIfaceHal.LOG_LEVEL_INFO ; mSupplicantStaIfaceHal.setLogLevel ( logLevel ) ; } else { doStringCommand ( ( "LOG_LEVEL " + ( turnOnVerbose ? "DEBUG" : "INFO" ) ) ) ; } }

Target:
public void setSupplicantLogLevel ( boolean turnOnVerbose ) { int logLevel = ( turnOnVerbose ) ? SupplicantStaIfaceHal.LOG_LEVEL_DEBUG : SupplicantStaIfaceHal.LOG_LEVEL_INFO ; mSupplicantStaIfaceHal.setLogLevel ( logLevel ) ; }
Source:
public void test_getSoTimeout ( ) throws java.lang.Exception { java.net.ServerSocket server = new java.net.ServerSocket ( 0 ) ; java.net.Socket client = new java.net.Socket ( java.net.InetAddress.getLocalHost ( ) , server.getLocalPort ( ) ) ; final int timeoutSet = 100 ; client.setSoTimeout ( timeoutSet ) ; int actualTimeout = client.getSoTimeout ( ) ; assertTrue ( "Returned incorrect sotimeout" , ( ( java.lang.Math.abs ( ( timeoutSet - actualTimeout ) ) ) <= 10 ) ) ; client.close ( ) ; server.close ( ) ; }

Target:
public void test_getSoTimeout ( ) throws java.lang.Exception { try ( java.net.ServerSocket server = new java.net.ServerSocket ( 0 ) ; java.net.Socket client = new java.net.Socket ( java.net.InetAddress.getLocalHost ( ) , server.getLocalPort ( ) ) ) { final int timeoutSet = 100 ; client.setSoTimeout ( timeoutSet ) ; int actualTimeout = client.getSoTimeout ( ) ; assertTrue ( "Returned incorrect sotimeout" , ( ( java.lang.Math.abs ( ( timeoutSet - actualTimeout ) ) ) <= 10 ) ) ; } }
Source:
public void onAppStatusChanged ( android.bluetooth.BluetoothDevice pluggedDevice , android.bluetooth.BluetoothHidDeviceAppConfiguration config , boolean registered ) { com.googlecode.android_scripting.facade.bluetooth.BluetoothHidDeviceFacade.sAppConfig = config ; com.googlecode.android_scripting.Log.d ( ( ( ( "onAppStatusChanged: pluggedDevice=" + pluggedDevice ) + " registered=" ) + registered ) ) ; android.os.Bundle result = new android.os.Bundle ( ) ; result.putBoolean ( "registered" , registered ) ; mEventFacade.postEvent ( "onAppStatusChanged" , result ) ; }

Target:
public void onAppStatusChanged ( android.bluetooth.BluetoothDevice pluggedDevice , boolean registered ) { com.googlecode.android_scripting.Log.d ( ( ( ( "onAppStatusChanged: pluggedDevice=" + pluggedDevice ) + " registered=" ) + registered ) ) ; android.os.Bundle result = new android.os.Bundle ( ) ; result.putBoolean ( "registered" , registered ) ; mEventFacade.postEvent ( "onAppStatusChanged" , result ) ; }
Source:
private static com.google.common.collect.ImmutableList < java.util.zip.ZipEntry > getSortedClassEntriess ( java.util.zip.ZipFile jar ) { return jar.stream ( ) . filter ( ( entry ) -> entry.getName ( ) . endsWith ( ".class" ) ) . sorted ( java.util.Comparator.comparing ( java.util.zip.ZipEntry :: getName ) ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( com.google.common.collect.ImmutableList ) ) ; }

Target:
private static com.google.common.collect.ImmutableList < java.util.zip.ZipEntry > getSortedClassEntriess ( java.util.zip.ZipFile jar ) { return jar.stream ( ) . filter ( ( entry ) -> entry.getName ( ) . endsWith ( ".class" ) ) . sorted ( ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( com.google.common.collect.ImmutableList ) ) ; }
Source:
public void testFindAll ( ) throws java.lang.InterruptedException { java.lang.String p = "<p>Find all instances of find on the page and highlight them.</p>" ; mWebView.loadData ( ( ( "<html><body>" + p ) + "</body></html>" ) , "text/html" , "UTF-8" ) ; waitForLoadComplete ( mWebView , android.webkit.cts.WebViewTest.TEST_TIMEOUT ) ; assertEquals ( 2 , mWebView.findAll ( "find" ) ) ; }

Target:
public void run ( ) { assertEquals ( 2 , mWebView.findAll ( "find" ) ) ; }
Source:
public void onMeasure ( final int widthMeasureSpec , final int heightMeasureSpec ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; } } ) ; return ; } mAwContents.getAwContentsProxy ( ) . onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; }

Target:
public void onMeasure ( final int widthMeasureSpec , final int heightMeasureSpec ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; } } ) ; return ; } mAwContents.onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; }
Source:
public void testToArray_ArrayStoreException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "zfasdfsdf" ) ; c.add ( "asdadasd" ) ; c.toArray ( new java.lang.Long [ 5 ] ) ; shouldThrow ( ) ; } catch ( java.lang.ArrayStoreException success ) { } }

Target:
public void testToArray_ArrayStoreException ( ) { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "zfasdfsdf" ) ; c.add ( "asdadasd" ) ; try { c.toArray ( new java.lang.Long [ 5 ] ) ; shouldThrow ( ) ; } catch ( java.lang.ArrayStoreException success ) { } }
Source:
public int drainTo ( java.util.Collection < ? super E > c , int maxElements ) { if ( c == null ) throw new java.lang.NullPointerException ( ) ; if ( c == ( this ) ) throw new java.lang.IllegalArgumentException ( ) ; int n = 0 ; E e ; while ( ( n < maxElements ) && ( ( e = poll ( ) ) != null ) ) { c.add ( e ) ; ++ n ; } return n ; }

Target:
public int drainTo ( java.util.Collection < ? super E > c , int maxElements ) { if ( c == null ) throw new java.lang.NullPointerException ( ) ; if ( c == ( this ) ) throw new java.lang.IllegalArgumentException ( ) ; int n = 0 ; for ( E e ; ( n < maxElements ) && ( ( e = poll ( ) ) != null ) ; ) { c.add ( e ) ; ++ n ; } return n ; }
Source:
public void testSetTextCharacterIterator ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( new java.text.StringCharacterIterator ( "cha" ) ) ; iterator.setOffset ( 1 ) ; assertEquals ( 0 , iterator.getOffset ( ) ) ; }

Target:
public void testSetTextCharacterIterator ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( new java.text.StringCharacterIterator ( "cha" ) ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; }
Source:
private static boolean phoneIsCdma ( ) { boolean isCdma = false ; try { com.android.internal.telephony.ITelephony phone = ITelephony.Stub.asInterface ( android.os.ServiceManager.checkService ( "phone" ) ) ; if ( phone != null ) { isCdma = ( phone.getActivePhoneType ( ) ) == ( android.telephony.TelephonyManager.PHONE_TYPE_CDMA ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.cellbroadcastreceiver.CellBroadcastReceiver.TAG , "phone.getActivePhoneType() failed" , e ) ; } return isCdma ; }

Target:
static boolean phoneIsCdma ( ) { boolean isCdma = false ; try { com.android.internal.telephony.ITelephony phone = ITelephony.Stub.asInterface ( android.os.ServiceManager.checkService ( "phone" ) ) ; if ( phone != null ) { isCdma = ( phone.getActivePhoneType ( ) ) == ( android.telephony.TelephonyManager.PHONE_TYPE_CDMA ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.cellbroadcastreceiver.CellBroadcastReceiver.TAG , "phone.getActivePhoneType() failed" , e ) ; } return isCdma ; }
Source:
private void setUsbTethering ( boolean enabled ) { android.net.ConnectivityManager cm = ( ( android.net.ConnectivityManager ) ( getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; if ( ( cm.setUsbTethering ( enabled ) ) != ( android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ) { mUsbTether.setChecked ( false ) ; mUsbTether.setSummary ( R.string.usb_tethering_errored_subtext ) ; return ; } mUsbTether.setSummary ( "" ) ; }

Target:
private void setUsbTethering ( boolean enabled ) { android.net.ConnectivityManager cm = ( ( android.net.ConnectivityManager ) ( getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; mUsbTether.setChecked ( false ) ; if ( ( cm.setUsbTethering ( enabled ) ) != ( android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ) { mUsbTether.setSummary ( R.string.usb_tethering_errored_subtext ) ; return ; } mUsbTether.setSummary ( "" ) ; }