auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void write ( java.io.OutputStream out ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataOutputStream dataOut = new java.io.DataOutputStream ( out ) ; try { dataOut.writeUTF ( myOldBuild ) ; dataOut.writeUTF ( myNewBuild ) ; dataOut.writeBoolean ( myIsBinary ) ; dataOut.writeBoolean ( myIsStrict ) ; dataOut.writeBoolean ( myIsNormalized ) ; writeActions ( dataOut , myActions ) ; } finally { dataOut.flush ( ) ; } }

Target:
public void write ( java.io.OutputStream out ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataOutputStream dataOut = new java.io.DataOutputStream ( out ) ; try { dataOut.writeUTF ( myOldBuild ) ; dataOut.writeUTF ( myNewBuild ) ; dataOut.writeBoolean ( myIsBinary ) ; dataOut.writeBoolean ( myIsStrict ) ; dataOut.writeBoolean ( myIsNormalized ) ; com.intellij.updater.Patch.writeMap ( dataOut , myWarnings ) ; writeActions ( dataOut , myActions ) ; } finally { dataOut.flush ( ) ; } }
Source:
public void log ( com.android.utils.ILogger logger ) { for ( com.android.manifmerger.MergingReport.Record record : mRecords ) { switch ( record.mSeverity ) { case WARNING : logger.warning ( record.toString ( ) ) ; break ; case ERROR : logger.error ( null , record.toString ( ) ) ; break ; case INFO : logger.info ( record.toString ( ) ) ; break ; default : logger.error ( null , ( "Unhandled record type " + ( record.mSeverity ) ) ) ; } } mActions.log ( logger ) ; }

Target:
public void log ( com.android.utils.ILogger logger ) { for ( com.android.manifmerger.MergingReport.Record record : mRecords ) { switch ( record.mSeverity ) { case WARNING : logger.warning ( record.toString ( ) ) ; break ; case ERROR : logger.error ( null , record.toString ( ) ) ; break ; case INFO : logger.verbose ( record.toString ( ) ) ; break ; default : logger.error ( null , ( "Unhandled record type " + ( record.mSeverity ) ) ) ; } } mActions.log ( logger ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { mAndroidHome = java.lang.System.getenv ( "ANDROID_HOME" ) ; assertNotNull ( "This test requires ANDROID_HOME environment variable to point to a valid SDK" , mAndroidHome ) ; com.android.ddmlib.AndroidDebugBridge.init ( false ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { mAndroidHome = java.lang.System.getenv ( "ANDROID_HOME" ) ; assertNotNull ( "This test requires ANDROID_HOME environment variable to point to a valid SDK" , mAndroidHome ) ; mAdbPath = new java.io.File ( mAndroidHome , ( ( "platform-tools" + ( java.io.File.separator ) ) + "adb" ) ) ; com.android.ddmlib.AndroidDebugBridge.initIfNeeded ( false ) ; }
Source:
public void setRttStreams ( boolean shouldBeRtt ) { boolean areStreamsInitialized = ( ( mInCallToConnectionServiceStreams ) != null ) && ( ( mConnectionServiceToInCallStreams ) != null ) ; if ( shouldBeRtt && ( ! areStreamsInitialized ) ) { try { mInCallToConnectionServiceStreams = android.os.ParcelFileDescriptor.createReliablePipe ( ) ; mConnectionServiceToInCallStreams = android.os.ParcelFileDescriptor.createReliablePipe ( ) ; } catch ( java.io.IOException e ) { android.telecom.Log.e ( this , e , "Failed to create pipes for RTT call." ) ; } } else if ( ( ! shouldBeRtt ) && areStreamsInitialized ) { closeRttPipes ( ) ; mInCallToConnectionServiceStreams = null ; mConnectionServiceToInCallStreams = null ; } }

Target:
private void requestHandover ( android.telecom.PhoneAccountHandle handoverToHandle , int videoState , android.os.Bundle extras , boolean isLegacy ) { for ( com.android.server.telecom.Call.Listener l : mListeners ) { l.onHandoverRequested ( this , handoverToHandle , videoState , extras , isLegacy ) ; } }
Source:
public void testSubList2_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.subList ( 1 , 100 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testRemove1_IndexOutOfBounds ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.remove ( ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public static java.lang.String getPropertyText ( @ org.jetbrains.annotations.NonNls java.lang.String name , @ org.jetbrains.annotations.NonNls java.lang.String value ) { return ( ( com.intellij.lang.properties.psi.PropertiesElementFactory.escape ( name ) ) + "=" ) + ( com.intellij.lang.properties.psi.PropertiesElementFactory.escapeValue ( value ) ) ; }

Target:
public static java.lang.String getPropertyText ( @ org.jetbrains.annotations.NonNls java.lang.String name , @ org.jetbrains.annotations.NonNls java.lang.String value , @ org.jetbrains.annotations.NonNls java.lang.Character delimiter , @ org.jetbrains.annotations.Nullable com.intellij.openapi.project.Project project ) { if ( delimiter == null ) { delimiter = ( project == null ) ? com.intellij.lang.properties.psi.codeStyle.PropertiesCodeStyleSettings.DEFAULT_KEY_VALUE_DELIMITER : com.intellij.lang.properties.psi.codeStyle.PropertiesCodeStyleSettings.getInstance ( project ) . KEY_VALUE_DELIMITER ; } return ( ( com.intellij.lang.properties.psi.PropertiesElementFactory.escape ( name ) ) + ( java.lang.String.valueOf ( delimiter ) ) ) + ( com.intellij.lang.properties.psi.PropertiesElementFactory.escapeValue ( value ) ) ; }
Source:
private void launchSystemDialer ( android.net.Uri handle ) { android.content.Intent systemDialerIntent = new android.content.Intent ( ) ; final android.content.res.Resources resources = mContext.getResources ( ) ; systemDialerIntent.setClassName ( resources.getString ( R.string.ui_default_package ) , resources.getString ( R.string.dialer_default_class ) ) ; systemDialerIntent.setAction ( Intent.ACTION_DIAL ) ; systemDialerIntent.setData ( handle ) ; systemDialerIntent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; com.android.server.telecom.Log.v ( this , "calling startActivity for default dialer: %s" , systemDialerIntent ) ; mContext.startActivityAsUser ( systemDialerIntent , UserHandle.CURRENT ) ; }

Target:
private void launchSystemDialer ( android.net.Uri handle ) { android.content.Intent systemDialerIntent = new android.content.Intent ( ) ; final android.content.res.Resources resources = mContext.getResources ( ) ; systemDialerIntent.setClassName ( resources.getString ( R.string.ui_default_package ) , resources.getString ( R.string.dialer_default_class ) ) ; systemDialerIntent.setAction ( Intent.ACTION_DIAL ) ; systemDialerIntent.setData ( handle ) ; systemDialerIntent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; android.telecom.Log.v ( this , "calling startActivity for default dialer: %s" , systemDialerIntent ) ; mContext.startActivityAsUser ( systemDialerIntent , UserHandle.CURRENT ) ; }
Source:
void foo2 ( int [ ] array , int start , int end , boolean expectInterpreter ) { for ( int i = start ; i <= end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }

Target:
void foo2 ( int [ ] array , int start , int end , boolean expectInterpreter ) { if ( end < 0 ) throw new java.lang.Error ( "" ) ; for ( int i = start ; i <= end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }
Source:
public boolean onKeyMultiple ( final int keyCode , final int repeatCount , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyMultiple ( keyCode , repeatCount , event ) ; } } ) ; return ret ; } com.android.webview.chromium.UnimplementedWebViewApi.invoke ( ) ; return false ; }

Target:
public boolean performAccessibilityAction ( final int action , final android.os.Bundle arguments ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return performAccessibilityAction ( action , arguments ) ; } } ) ; return ret ; } if ( mAwContents.supportsAccessibilityAction ( action ) ) { return mAwContents.performAccessibilityAction ( action , arguments ) ; } return mWebViewPrivate.super_performAccessibilityAction ( action , arguments ) ; }
Source:
public void testDuplicatePermissionsMultiProject ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestOrderDetector.UNIQUE_PERMISSION ) ; java.io.File master = getProjectDir ( "MasterProject" , "duplicate_permissions2.xml=>AndroidManifest.xml" , "multiproject/main-merge.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "duplicate_permissions3.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "LibraryProject/AndroidManifest.xml:9: Error: Permission name SEND_SMS is not unique (appears in both foo.permission.SEND_SMS and bar.permission.SEND_SMS) [UniquePermission]\n" + ( ( " <permission android:name=\"bar.permission.SEND_SMS\"\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }

Target:
public void testDuplicatePermissionsMultiProject ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestDetector.UNIQUE_PERMISSION ) ; java.io.File master = getProjectDir ( "MasterProject" , "duplicate_permissions2.xml=>AndroidManifest.xml" , "multiproject/main-merge.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "duplicate_permissions3.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "LibraryProject/AndroidManifest.xml:9: Error: Permission name SEND_SMS is not unique (appears in both foo.permission.SEND_SMS and bar.permission.SEND_SMS) [UniquePermission]\n" + ( ( " <permission android:name=\"bar.permission.SEND_SMS\"\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }
Source:
public void exit ( ) { if ( ( mPhone ) != null ) { mPhone.mCi.unregisterForDataCallListChanged ( getHandler ( ) ) ; } if ( ( mDcTesterDeactivateAll ) != null ) { mDcTesterDeactivateAll.dispose ( ) ; } }

Target:
public void exit ( ) { if ( ( mPhone ) != null ) { mPhone.mCi.unregisterForRilConnected ( getHandler ( ) ) ; mPhone.mCi.unregisterForDataCallListChanged ( getHandler ( ) ) ; } if ( ( mDcTesterDeactivateAll ) != null ) { mDcTesterDeactivateAll.dispose ( ) ; } }
Source:
public void changeBarringPassword ( java.lang.String facility , java.lang.String oldPwd , java.lang.String newPwd , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CHANGE_BARRING_PASSWORD , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeInt ( 3 ) ; rr.mParcel.writeString ( facility ) ; rr.mParcel.writeString ( oldPwd ) ; rr.mParcel.writeString ( newPwd ) ; send ( rr ) ; }

Target:
public void hangupForegroundResumeBackground ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.hangupForegroundResumeBackground ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "hangupForegroundResumeBackground" , e ) ; } } }
Source:
public void testBooleanOverlay ( ) throws java.lang.Throwable { final int resId = com.android.internal.R.bool.config_automatic_brightness_available ; assertResource ( resId , false , true ) ; }

Target:
private int [ ] getExpected ( int [ ] no , int [ ] so , int [ ] mo ) { switch ( mMode ) { case com.android.overlaytest.OverlayBaseTest.MODE_NO_OVERLAY : return no ; case com.android.overlaytest.OverlayBaseTest.MODE_SINGLE_OVERLAY : return so ; case com.android.overlaytest.OverlayBaseTest.MODE_MULTIPLE_OVERLAYS : return mo ; default : fail ( "Unknown mode!" ) ; return no ; } }
Source:
private android.bluetooth.BluetoothDevice makeBluetoothDevice ( java.lang.String address ) { android.os.Parcel p1 = android.os.Parcel.obtain ( ) ; p1.writeString ( address ) ; p1.setDataPosition ( 0 ) ; android.bluetooth.BluetoothDevice device = BluetoothDevice.CREATOR.createFromParcel ( p1 ) ; p1.recycle ( ) ; return device ; }

Target:
private android.bluetooth.BluetoothDevice makeBluetoothDevice ( java.lang.String address ) { return mAdapter.getRemoteDevice ( address ) ; }
Source:
public static java.io.File createTemporaryDirectory ( java.lang.String prefix ) { while ( true ) { java.lang.String candidateName = prefix + ( libcore.io.IoUtils.TEMPORARY_DIRECTORY_PRNG.nextInt ( ) ) ; java.io.File result = new java.io.File ( java.lang.System.getProperty ( "java.io.tmpdir" ) , candidateName ) ; if ( result.mkdir ( ) ) { return result ; } } }

Target:
public static java.io.File createTemporaryDirectory ( java.lang.String prefix ) { while ( true ) { java.lang.String candidateName = prefix + ( java.lang.Math.randomIntInternal ( ) ) ; java.io.File result = new java.io.File ( java.lang.System.getProperty ( "java.io.tmpdir" ) , candidateName ) ; if ( result.mkdir ( ) ) { return result ; } } }
Source:
protected void setUp ( ) { initialThreadGroup = java.lang.Thread.currentThread ( ) . getThreadGroup ( ) ; rootThreadGroup = initialThreadGroup ; while ( ( rootThreadGroup.getParent ( ) ) != null ) { rootThreadGroup = rootThreadGroup.getParent ( ) ; } }

Target:
protected void setUp ( ) { initialThreadGroup = java.lang.Thread.currentThread ( ) . getThreadGroup ( ) ; rootThreadGroup = initialThreadGroup ; while ( ( rootThreadGroup.getParent ( ) ) != null ) { rootThreadGroup = rootThreadGroup.getParent ( ) ; } originalThreadDefaultUncaughtExceptionHandler = java.lang.Thread.getDefaultUncaughtExceptionHandler ( ) ; testThreadDefaultUncaughtExceptionHandler = new org.apache.harmony.tests.java.lang.ThreadGroupTest.TestThreadDefaultUncaughtExceptionHandler ( ) ; java.lang.Thread.setDefaultUncaughtExceptionHandler ( testThreadDefaultUncaughtExceptionHandler ) ; }
Source:
public void validatePolicyWithRoamingPartnerWithoutCountries ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Policy policy = android.net.wifi.hotspot2.pps.PolicyTest.createPolicy ( ) ; android.net.wifi.hotspot2.pps.Policy.RoamingPartner partner = new android.net.wifi.hotspot2.pps.Policy.RoamingPartner ( ) ; partner.fqdn = "test.com" ; partner.fqdnExactMatch = true ; partner.priority = 12 ; policy.preferredRoamingPartnerList.add ( partner ) ; org.junit.Assert.assertFalse ( policy.validate ( ) ) ; }

Target:
public void validatePolicyWithRoamingPartnerWithoutCountries ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Policy policy = android.net.wifi.hotspot2.pps.PolicyTest.createPolicy ( ) ; android.net.wifi.hotspot2.pps.Policy.RoamingPartner partner = new android.net.wifi.hotspot2.pps.Policy.RoamingPartner ( ) ; partner.setFqdn ( "test.com" ) ; partner.setFqdnExactMatch ( true ) ; partner.setPriority ( 12 ) ; policy.getPreferredRoamingPartnerList ( ) . add ( partner ) ; org.junit.Assert.assertFalse ( policy.validate ( ) ) ; }
Source:
public void validateCertCredentialWithoutCaCert ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.certCredential = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; cred.certCredential.certType = "x509v3" ; cred.certCredential.certSha256FingerPrint = java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ; cred.clientCertificateChain = new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } ; cred.clientPrivateKey = android.net.wifi.FakeKeys.RSA_KEY1 ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateCertCredentialWithoutCaCert ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithCertificateCredential ( ) ; cred.setCaCertificate ( null ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
public void setOverlayImage ( final org.eclipse.swt.graphics.Image overlayImage ) { final org.eclipse.swt.graphics.Image toDispose = this . overlayImage ; org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.this . overlayImage = overlayImage ; } } } ) ; notifyOverlayChanged ( ) ; if ( toDispose != null ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { toDispose.dispose ( ) ; } } ) ; } }

Target:
public void setOverlayImage ( final org.eclipse.swt.graphics.Image overlayImage ) { final org.eclipse.swt.graphics.Image toDispose = this . mOverlayImage ; org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.this . mOverlayImage = overlayImage ; } } } ) ; notifyOverlayChanged ( ) ; if ( toDispose != null ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { toDispose.dispose ( ) ; } } ) ; } }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , float [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 4 ) ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { copy1DRangeFromUnchecked ( off , count , ( ( java.lang.Object ) ( d ) ) , Element.DataType.SIGNED_32 , d.length ) ; }
Source:
public long getExitTime ( com.android.tools.perflib.vmtrace.ClockType clockType ) { return clockType == ( ClockType.THREAD ) ? com.google.common.primitives.UnsignedInts.toLong ( mExitThreadTime ) : com.google.common.primitives.UnsignedInts.toLong ( mExitGlobalTime ) ; }

Target:
public long getExitTime ( com.android.tools.perflib.vmtrace.ClockType clockType , java.util.concurrent.TimeUnit units ) { long exitTime = ( clockType == ( ClockType.THREAD ) ) ? com.google.common.primitives.UnsignedInts.toLong ( mExitThreadTime ) : com.google.common.primitives.UnsignedInts.toLong ( mExitGlobalTime ) ; return units.convert ( exitTime , com.android.tools.perflib.vmtrace.VmTraceData.getDefaultTimeUnits ( ) ) ; }
Source:
private final void decPersistentCountLocked ( com.android.server.am.ProcessRecord app ) { ( app.persistentActivities ) -- ; if ( ( app.persistentActivities ) > 0 ) { return ; } if ( app.persistent ) { return ; } updateOomAdjLocked ( ) ; }

Target:
void grantUriPermissionLocked ( int callingUid , java.lang.String targetPkg , android.net.Uri uri , int modeFlags , com.android.server.am.UriPermissionOwner owner ) { int targetUid = checkGrantUriPermissionLocked ( callingUid , targetPkg , uri , modeFlags ) ; if ( targetUid < 0 ) { return ; } grantUriPermissionUncheckedLocked ( targetUid , targetPkg , uri , modeFlags , owner ) ; }
Source:
public long getDurationMillis ( long maxWaitMillis ) { synchronized ( this ) { if ( ! ( completed ) ) { try { wait ( maxWaitMillis ) ; } catch ( java.lang.InterruptedException ex ) { } if ( ! ( completed ) ) { junit.framework.Assert.fail ( "parker hanging" ) ; } } return ( endMillis ) - ( startMillis ) ; } }

Target:
public long getDurationMillis ( long maxWaitMillis ) { synchronized ( this ) { if ( ! ( completed ) ) { try { wait ( maxWaitMillis ) ; } catch ( java.lang.InterruptedException ignored ) { } if ( ! ( completed ) ) { junit.framework.Assert.fail ( ( ( "parker hung for more than " + maxWaitMillis ) + " ms" ) ) ; } } return ( endMillis ) - ( startMillis ) ; } }
Source:
protected void libToImportStaticLibs ( @ javax.annotation.Nonnull java.util.List < java.lang.String > args , @ javax.annotation.Nonnull java.io.File [ ] in ) throws java.lang.Exception { for ( java.io.File staticlib : in ) { args.add ( "--import" ) ; args.add ( staticlib.getAbsolutePath ( ) ) ; } for ( java.io.File staticLib : staticLibs ) { args.add ( "--import" ) ; args.add ( staticLib.getAbsolutePath ( ) ) ; } }

Target:
protected void libToImportStaticLibs ( @ javax.annotation.Nonnull java.util.List < java.lang.String > commandLine , @ javax.annotation.Nonnull java.io.File [ ] in ) throws java.lang.Exception { for ( java.io.File staticlib : in ) { commandLine.add ( "--import" ) ; commandLine.add ( staticlib.getAbsolutePath ( ) ) ; } for ( java.io.File staticLib : staticLibs ) { commandLine.add ( "--import" ) ; commandLine.add ( staticLib.getAbsolutePath ( ) ) ; } }
Source:
public void setUp ( ) { expected = new java.util.ArrayList < java.lang.String > ( ) ; expected.add ( "ak" ) ; expected.add ( "bk" ) ; ns = new org.xml.sax.helpers.NamespaceSupport ( ) ; ns.pushContext ( ) ; ns.declarePrefix ( "ak" , tests.api.org.xml.sax.helpers.NamespaceSupportTest.marketUri ) ; ns.declarePrefix ( "bk" , tests.api.org.xml.sax.helpers.NamespaceSupportTest.marketUri ) ; ns.declarePrefix ( "" , tests.api.org.xml.sax.helpers.NamespaceSupportTest.defaultUri ) ; }

Target:
public void setUp ( ) { expected = new java.util.ArrayList < java.lang.String > ( ) ; expected.add ( "ak" ) ; expected.add ( "bk" ) ; ns = new org.xml.sax.helpers.NamespaceSupport ( ) ; ns.pushContext ( ) ; ns.declarePrefix ( "ak" , org.apache.harmony.tests.org.xml.sax.helpers.NamespaceSupportTest.marketUri ) ; ns.declarePrefix ( "bk" , org.apache.harmony.tests.org.xml.sax.helpers.NamespaceSupportTest.marketUri ) ; ns.declarePrefix ( "" , org.apache.harmony.tests.org.xml.sax.helpers.NamespaceSupportTest.defaultUri ) ; }
Source:
public abstract void write ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFS outputVDir ) throws com.android.jack.backend.dex.DexWritingException ;

Target:
public void finishMerge ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFS outputVDir ) throws com.android.jack.backend.dex.DexWritingException { for ( int i = 0 ; i < ( mergers.size ( ) ) ; i ++ ) { finishMerge ( mergers.get ( i ) , getOutputDex ( outputVDir , ( i + 1 ) ) ) ; } }
Source:
public java.io.File getOutputFile ( ) { return getVariantData ( ) . getOutputs ( ) . get ( 0 ) . getOutputFile ( ) ; }

Target:
public java.io.File getOutputFile ( ) { if ( ( outputs.size ( ) ) > 1 ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "More than one output on variant '%s', cannot call getOutputFile() on it. Call it on one of its outputs instead." , getName ( ) ) ) ; } plugin.displayDeprecationWarning ( "variant.getOutputFile() is deprecated. Call it on one of variant.getOutputs() instead." ) ; return outputs.get ( 0 ) . getOutputFile ( ) ; }
Source:
public void testReverting ( ) throws java.lang.Exception { createPatch ( ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; preparationResult.patch.getActions ( ) . add ( new com.intellij.updater.PatchFileCreatorTest.MyFailOnApplyPatchAction ( ) ) ; assertNothingHasChanged ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) ) ; }

Target:
public void testReverting ( ) throws java.lang.Exception { com.intellij.updater.Patch patch = createPatch ( ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; preparationResult.patch.getActions ( ) . add ( new com.intellij.updater.PatchFileCreatorTest.MyFailOnApplyPatchAction ( patch ) ) ; assertNothingHasChanged ( patch , preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) ) ; }
Source:
private void test_joinAnySource_multiple_joins ( java.net.InetAddress group , java.net.NetworkInterface networkInterface ) throws java.lang.Exception { if ( ! ( supportsMulticast ) ) { return ; } java.nio.channels.DatagramChannel dc = createReceiverChannel ( ) ; java.nio.channels.MembershipKey membershipKey1 = dc.join ( group , networkInterface ) ; java.nio.channels.MembershipKey membershipKey2 = dc.join ( group , loopbackInterface ) ; assertFalse ( membershipKey1.equals ( membershipKey2 ) ) ; java.nio.channels.MembershipKey membershipKey1_2 = dc.join ( group , networkInterface ) ; assertEquals ( membershipKey1 , membershipKey1_2 ) ; dc.close ( ) ; }

Target:
private void check_joinAnySource_multiple_joins ( java.net.InetAddress group , java.net.NetworkInterface networkInterface ) throws java.lang.Exception { if ( ! ( supportsMulticast ) ) { return ; } java.nio.channels.DatagramChannel dc = createReceiverChannel ( ) ; java.nio.channels.MembershipKey membershipKey1 = dc.join ( group , networkInterface ) ; java.nio.channels.MembershipKey membershipKey2 = dc.join ( group , loopbackInterface ) ; assertFalse ( membershipKey1.equals ( membershipKey2 ) ) ; java.nio.channels.MembershipKey membershipKey1_2 = dc.join ( group , networkInterface ) ; assertEquals ( membershipKey1 , membershipKey1_2 ) ; dc.close ( ) ; }
Source:
public void testAesCbcHmacSha1Udp4UdpEncap ( ) 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_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesCbcHmacSha512Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
public boolean performAccessibilityAction ( final int action , final android.os.Bundle arguments ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return performAccessibilityAction ( action , arguments ) ; } } ) ; return ret ; } if ( mAwContents.supportsAccessibilityAction ( action ) ) { return mAwContents.performAccessibilityAction ( action , arguments ) ; } return mWebViewPrivate.super_performAccessibilityAction ( action , arguments ) ; }

Target:
public boolean onKeyMultiple ( final int keyCode , final int repeatCount , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyMultiple ( keyCode , repeatCount , event ) ; } } ) ; return ret ; } com.android.webview.chromium.UnimplementedWebViewApi.invoke ( ) ; return false ; }
Source:
private static java.net.URL makeURL ( @ javax.annotation.Nonnull java.util.zip.ZipFile file , @ javax.annotation.Nonnull java.util.zip.ZipEntry entry , @ javax.annotation.Nonnull com.android.jack.launcher.ZipLoader.ZipURLStreamHandler handler ) { try { assert ( entry.getName ( ) . indexOf ( com.android.jack.launcher.ZipLoader.BANG ) ) == ( - 1 ) ; return new java.net.URL ( "launcherzip" , "" , ( - 1 ) , ( ( ( file.getName ( ) ) + ( com.android.jack.launcher.ZipLoader.BANG ) ) + ( entry.getName ( ) ) ) , handler ) ; } catch ( java.net.MalformedURLException e ) { throw new java.lang.AssertionError ( ) ; } }

Target:
private static java.net.URL makeURL ( @ javax.annotation.Nonnull java.util.zip.ZipEntry entry , @ javax.annotation.Nonnull com.android.jack.launcher.ZipLoader.ZipURLStreamHandler handler ) { try { assert ( entry.getName ( ) . indexOf ( com.android.jack.launcher.ZipLoader.BANG ) ) == ( - 1 ) ; return new java.net.URL ( "launcherzip" , "" , ( - 1 ) , ( ( ( handler.zip.getName ( ) ) + ( com.android.jack.launcher.ZipLoader.BANG ) ) + ( entry.getName ( ) ) ) , handler ) ; } catch ( java.net.MalformedURLException e ) { throw new java.lang.AssertionError ( ) ; } }
Source:
public void test_totalMemory ( ) { assertTrue ( "totalMemory returned nonsense value" , ( ( r.totalMemory ( ) ) >= ( r.freeMemory ( ) ) ) ) ; }

Target:
public void test_memory ( ) { assertTrue ( "freeMemory <= 0" , ( ( r.freeMemory ( ) ) > 0 ) ) ; assertTrue ( "totalMemory() < freeMemory()" , ( ( r.totalMemory ( ) ) >= ( r.freeMemory ( ) ) ) ) ; assertTrue ( "maxMemory() < totalMemory()" , ( ( r.maxMemory ( ) ) >= ( r.totalMemory ( ) ) ) ) ; }
Source:
private void shutdownAndFreeSslNative ( ) throws java.io.IOException { try { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; org.conscrypt.NativeCrypto.SSL_shutdown ( sslNativePointer , socket.getFileDescriptor$ ( ) , this ) ; } catch ( java.io.IOException ignored ) { } finally { free ( ) ; closeUnderlyingSocket ( ) ; } }

Target:
private void shutdownAndFreeSslNative ( ) throws java.io.IOException { try { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; org.conscrypt.NativeCrypto.SSL_shutdown ( sslNativePointer , org.conscrypt.Platform.getFileDescriptor ( socket ) , this ) ; } catch ( java.io.IOException ignored ) { } finally { free ( ) ; closeUnderlyingSocket ( ) ; } }
Source:
java.lang.reflect.Type parseFieldTypeSignature ( ) { switch ( symbol ) { case 'L' : return parseClassTypeSignature ( ) ; case '[' : scanSymbol ( ) ; return new org.apache.harmony.luni.lang.reflect.ImplForArray ( parseTypeSignature ( ) ) ; case 'T' : return parseTypeVariableSignature ( ) ; default : throw new java.lang.reflect.GenericSignatureFormatError ( ) ; } }

Target:
java.lang.reflect.Type parseFieldTypeSignature ( ) { switch ( symbol ) { case 'L' : return parseClassTypeSignature ( ) ; case '[' : scanSymbol ( ) ; return new libcore.reflect.GenericArrayTypeImpl ( parseTypeSignature ( ) ) ; case 'T' : return parseTypeVariableSignature ( ) ; default : throw new java.lang.reflect.GenericSignatureFormatError ( ) ; } }
Source:
private static java.lang.String toString ( byte [ ] bytes ) { return new java.lang.String ( bytes , java.nio.charset.Charsets.UTF_8 ) ; }

Target:
private static java.lang.String toKeyString ( byte [ ] bytes ) { try { return java.nio.charset.ModifiedUtf8.decode ( bytes , new char [ bytes.length ] , 0 , bytes.length ) ; } catch ( java.io.UTFDataFormatException e ) { throw new java.lang.RuntimeException ( e ) ; } }
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 { assertNull ( org.conscrypt.NativeCrypto.SSL_get_certificate ( s ) ) ; 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 ) ; assertEquals ( 42 , buffer [ 0 ] ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
public static java.lang.String getFileExtension ( java.lang.String fileName ) { com.google.common.base.Preconditions.checkNotNull ( fileName ) ; int dotIndex = fileName.lastIndexOf ( '.' ) ; return dotIndex == ( - 1 ) ? "" : fileName.substring ( ( dotIndex + 1 ) ) ; }

Target:
public static java.lang.String getFileExtension ( java.lang.String fullName ) { com.google.common.base.Preconditions.checkNotNull ( fullName ) ; java.lang.String fileName = new java.io.File ( fullName ) . getName ( ) ; int dotIndex = fileName.lastIndexOf ( '.' ) ; return dotIndex == ( - 1 ) ? "" : fileName.substring ( ( dotIndex + 1 ) ) ; }
Source:
public byte [ ] iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String filePath ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccExchangeSimIO ( fileID , command , p1 , p2 , p3 , filePath ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }

Target:
public java.lang.String iccTransmitApduBasicChannel ( int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data ) { return iccTransmitApduBasicChannel ( getSubId ( ) , cla , instruction , p1 , p2 , p3 , data ) ; }
Source:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo getHorizontalPaddingBottom ( int x ) { int left = ( patchInfo.horizontalPadding.first ) + 1 ; int right = ( ( image.getWidth ( ) ) - ( patchInfo.horizontalPadding.second ) ) - 1 ; return getContainingPadding ( left , right , x , com.android.draw9patch.ui.ImageViewer.UpdateRegion.BOTTOM_PADDING ) ; }

Target:
private void updateHoverRegion ( int x , int y ) { com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo vertical = findVerticalPatch ( x , y ) ; com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo horizontal = findHorizontalPatch ( x , y ) ; computeHoverHighlightRegions ( vertical , horizontal ) ; computeHoverRegionTooltip ( vertical , horizontal ) ; com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo updateRegion = pickUpdateRegion ( x , y , vertical , horizontal ) ; setCursorForRegion ( x , y , updateRegion ) ; }
Source:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.lookupUri ( ) ) ) ; badge.setOverlay ( null ) ; com.android.dialer.glide.GlideRequest < android.graphics.drawable.Drawable > request = buildRequest ( com.android.dialer.glide.GlideApp.with ( badge ) , photoInfo ) ; request.into ( badge ) ; }

Target:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.getLookupUri ( ) ) ) ; badge.setOverlay ( null ) ; com.android.dialer.glide.GlideRequest < android.graphics.drawable.Drawable > request = buildRequest ( com.android.dialer.glide.GlideApp.with ( badge ) , photoInfo ) ; request.into ( badge ) ; }
Source:
java.util.Map.Entry < K , java.util.Collection < V > > transform ( final K key ) { return new com.google.common.collect.AbstractMapEntry < K , java.util.Collection < V > > ( ) { @ java.lang.Override public K getKey ( ) { return key ; } @ java.lang.Override public java.util.Collection < V > getValue ( ) { return com.google.common.collect.LinkedListMultimap.this . get ( key ) ; } } ; }

Target:
java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ( ) { throw new java.lang.AssertionError ( "should never be called" ) ; }
Source:
private void trackNewTetherableInterface ( java.lang.String iface , int interfaceType ) { com.android.server.connectivity.Tethering.TetherState tetherState ; tetherState = new com.android.server.connectivity.Tethering.TetherState ( new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( iface , mLooper , interfaceType , mNMService , mStatsService , this , new com.android.server.connectivity.tethering.IPv6TetheringInterfaceServices ( iface , mNMService ) ) ) ; mTetherStates.put ( iface , tetherState ) ; tetherState.mStateMachine.start ( ) ; }

Target:
private void trackNewTetherableInterface ( java.lang.String iface , int interfaceType ) { com.android.server.connectivity.Tethering.TetherState tetherState ; tetherState = new com.android.server.connectivity.Tethering.TetherState ( new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( iface , mLooper , interfaceType , mNMService , mStatsService , this , new com.android.server.connectivity.tethering.IPv6TetheringInterfaceServices ( iface , mNMService ) ) ) ; mTetherStates.put ( iface , tetherState ) ; tetherState.stateMachine.start ( ) ; }
Source:
public static com.android.dialer.historyitemactions.IntentModule newCallModule ( android.content.Context context , java.lang.String number , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle phoneAccountHandle , com.android.dialer.callintent.CallInitiationType.Type initiationType ) { return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.precall.PreCall.getIntent ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , initiationType ) . setPhoneAccountHandle ( phoneAccountHandle ) ) , R.string.voice_call , R.drawable.quantum_ic_call_white_24 ) ; }

Target:
public static com.android.dialer.historyitemactions.IntentModule newCallModule ( android.content.Context context , com.android.dialer.callintent.CallIntentBuilder callIntentBuilder ) { @ android.support.annotation.StringRes int text ; @ android.support.annotation.DrawableRes int image ; if ( callIntentBuilder.isVideoCall ( ) ) { text = R.string.video_call ; image = R.drawable.quantum_ic_videocam_vd_white_24 ; } else { text = R.string.voice_call ; image = R.drawable.quantum_ic_call_white_24 ; } return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.precall.PreCall.getIntent ( context , callIntentBuilder ) , text , image ) ; }
Source:
private void confirmDeleteDialog ( android.content.DialogInterface.OnClickListener listener , int messageId ) { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder ( this ) ; builder.setTitle ( R.string.confirm_dialog_title ) ; builder.setIcon ( android.R.drawable.ic_dialog_alert ) ; builder.setCancelable ( true ) ; builder.setPositiveButton ( R.string.yes , listener ) ; builder.setNegativeButton ( R.string.no , null ) ; builder.setMessage ( messageId ) ; builder.show ( ) ; }

Target:
private void confirmDeleteDialog ( android.content.DialogInterface.OnClickListener listener , int messageId ) { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder ( this ) ; builder.setTitle ( R.string.confirm_dialog_title ) ; builder.setIconAttribute ( android.R.attr.alertDialogIcon ) ; builder.setCancelable ( true ) ; builder.setPositiveButton ( R.string.yes , listener ) ; builder.setNegativeButton ( R.string.no , null ) ; builder.setMessage ( messageId ) ; builder.show ( ) ; }
Source:
public void testGeographicalRegionMetadataLoadsCorrectly ( ) { java.util.concurrent.ConcurrentHashMap < java.lang.String , com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata > map = new java.util.concurrent.ConcurrentHashMap < java.lang.String , com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata > ( ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = com.google.i18n.phonenumbers.MultiFileMetadataSourceImpl.loadMetadataFromFile ( "CA" , map , "/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting" , PhoneNumberUtil.DEFAULT_METADATA_LOADER ) ; assertEquals ( metadata , map.get ( "CA" ) ) ; }

Target:
public void testGeoPhoneNumberMetadataLoadCorrectly ( ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata uaeMetadata = com.google.i18n.phonenumbers.MultiFileMetadataSourceImplTest.SOURCE.getMetadataForRegion ( "AE" ) ; assertEquals ( uaeMetadata.getCountryCode ( ) , 971 ) ; assertTrue ( uaeMetadata.hasGeneralDesc ( ) ) ; }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { client.setEnabledProtocols ( new java.lang.String [ ] { "SSLv3" } ) ; client.setEnabledCipherSuites ( clientCipherSuites ) ; try { client.startHandshake ( ) ; fail ( "Should receive TLS alert inappropriate fallback" ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } return null ; }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { server.setEnabledProtocols ( new java.lang.String [ ] { "TLSv1" , "SSLv3" } ) ; server.setEnabledCipherSuites ( serverCipherSuites ) ; try { server.startHandshake ( ) ; fail ( "Should result in inappropriate fallback" ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } return null ; }
Source:
public java.text.AttributedCharacterIterator formatToCharacterIterator ( java.lang.Object object ) { if ( object == null ) { throw new java.lang.NullPointerException ( "object == null" ) ; } if ( object instanceof java.util.Date ) { return formatToCharacterIteratorImpl ( ( ( java.util.Date ) ( object ) ) ) ; } if ( object instanceof java.lang.Number ) { return formatToCharacterIteratorImpl ( new java.util.Date ( ( ( java.lang.Number ) ( object ) ) . longValue ( ) ) ) ; } throw new java.lang.IllegalArgumentException ( ) ; }

Target:
public java.text.AttributedCharacterIterator formatToCharacterIterator ( java.lang.Object object ) { if ( object == null ) { throw new java.lang.NullPointerException ( "object == null" ) ; } if ( object instanceof java.util.Date ) { return formatToCharacterIteratorImpl ( ( ( java.util.Date ) ( object ) ) ) ; } if ( object instanceof java.lang.Number ) { return formatToCharacterIteratorImpl ( new java.util.Date ( ( ( java.lang.Number ) ( object ) ) . longValue ( ) ) ) ; } throw new java.lang.IllegalArgumentException ( ( "Bad class: " + ( object.getClass ( ) ) ) ) ; }
Source:
public static boolean isAdtProjectDir ( @ com.android.annotations.Nullable java.io.File file ) { return ( new java.io.File ( file , ANDROID_MANIFEST_XML ) . exists ( ) ) && ( ( com.android.tools.gradle.eclipse.GradleImport.isEclipseProjectDir ( file ) ) || ( ( new java.io.File ( file , FD_RES ) . exists ( ) ) && ( new java.io.File ( file , FD_SOURCES ) . exists ( ) ) ) ) ; }

Target:
public static boolean isAdtProjectDir ( @ com.android.annotations.Nullable java.io.File file ) { return ( new java.io.File ( file , com.android.SdkConstants.ANDROID_MANIFEST_XML ) . exists ( ) ) && ( ( com.android.tools.gradle.eclipse.GradleImport.isEclipseProjectDir ( file ) ) || ( ( new java.io.File ( file , com.android.SdkConstants.FD_RES ) . exists ( ) ) && ( new java.io.File ( file , com.android.SdkConstants.FD_SOURCES ) . exists ( ) ) ) ) ; }
Source:
public com.android.jack.ir.ast.cfg.JControlFlowGraph getCfg ( ) { return this ; }

Target:
public java.util.List < com.android.jack.ir.ast.cfg.JBasicBlock > getBlocksDepthFirst ( boolean forward ) { final java.util.List < com.android.jack.ir.ast.cfg.JBasicBlock > blocks = new java.util.ArrayList < > ( ) ; new com.android.jack.ir.ast.cfg.BasicBlockIterator ( this ) { @ java.lang.Override public boolean process ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JBasicBlock block ) { blocks.add ( block ) ; return true ; } } . iterateDepthFirst ( forward ) ; return blocks ; }
Source:
public boolean isInCall ( java.lang.String callingPackage ) { try { com.android.server.telecom.Log.startSession ( "TSI.iIC" ) ; if ( ! ( canReadPhoneState ( callingPackage , "isInCall" ) ) ) { return false ; } synchronized ( mLock ) { final int callState = mCallsManager.getCallState ( ) ; return ( callState == ( android.telephony.TelephonyManager.CALL_STATE_OFFHOOK ) ) || ( callState == ( android.telephony.TelephonyManager.CALL_STATE_RINGING ) ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public boolean isInCall ( java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.iIC" ) ; if ( ! ( canReadPhoneState ( callingPackage , "isInCall" ) ) ) { return false ; } synchronized ( mLock ) { final int callState = mCallsManager.getCallState ( ) ; return ( callState == ( android.telephony.TelephonyManager.CALL_STATE_OFFHOOK ) ) || ( callState == ( android.telephony.TelephonyManager.CALL_STATE_RINGING ) ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
private void handleUpdatePackageCompatibilityInfo ( android.app.ActivityThread.UpdateCompatibilityData data ) { android.app.LoadedApk apk = peekPackageInfo ( data.pkg , false ) ; if ( apk != null ) { apk.mCompatibilityInfo.set ( data.info ) ; } apk = peekPackageInfo ( data.pkg , true ) ; if ( apk != null ) { apk.mCompatibilityInfo.set ( data.info ) ; } handleConfigurationChanged ( mConfiguration , data.info ) ; android.view.WindowManagerGlobal.getInstance ( ) . reportNewConfiguration ( mConfiguration ) ; }

Target:
private void handleUpdatePackageCompatibilityInfo ( android.app.ActivityThread.UpdateCompatibilityData data ) { android.app.LoadedApk apk = peekPackageInfo ( data.pkg , false ) ; if ( apk != null ) { apk.setCompatibilityInfo ( data.info ) ; } apk = peekPackageInfo ( data.pkg , true ) ; if ( apk != null ) { apk.setCompatibilityInfo ( data.info ) ; } handleConfigurationChanged ( mConfiguration , data.info ) ; android.view.WindowManagerGlobal.getInstance ( ) . reportNewConfiguration ( mConfiguration ) ; }
Source:
public static boolean isVectorGenerationSupported ( @ com.android.annotations.NonNull com.android.builder.model.AndroidProject project ) { java.lang.String modelVersion = project.getModelVersion ( ) ; return ! ( ( ( ( modelVersion.startsWith ( "1.0" ) ) || ( modelVersion.startsWith ( "1.1" ) ) ) || ( modelVersion.startsWith ( "1.2" ) ) ) || ( modelVersion.startsWith ( "1.3" ) ) ) ; }

Target:
public static boolean isVectorGenerationSupported ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Project project ) { com.android.ide.common.repository.GradleVersion modelVersion = project.getGradleModelVersion ( ) ; return ( modelVersion != null ) && ( ( ( modelVersion.getMajor ( ) ) >= 2 ) || ( ( modelVersion.getMinor ( ) ) >= 4 ) ) ; }