auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void keyguardGoingAway ( boolean disableWindowAnimations , boolean keyguardGoingToNotificationShade ) { if ( ( mContext.checkCallingOrSelfPermission ( android.Manifest.permission.DISABLE_KEYGUARD ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { throw new java.lang.SecurityException ( "Requires DISABLE_KEYGUARD permission" ) ; } synchronized ( mWindowMap ) { mAnimator.mKeyguardGoingAway = true ; mAnimator.mKeyguardGoingAwayToNotificationShade = keyguardGoingToNotificationShade ; mAnimator.mKeyguardGoingAwayDisableWindowAnimations = disableWindowAnimations ; requestTraversalLocked ( ) ; } }

Target:
public void keyguardGoingAway ( boolean disableWindowAnimations , boolean keyguardGoingToNotificationShade ) { if ( ( mContext.checkCallingOrSelfPermission ( android.Manifest.permission.DISABLE_KEYGUARD ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { throw new java.lang.SecurityException ( "Requires DISABLE_KEYGUARD permission" ) ; } if ( com.android.server.wm.WindowManagerService.DEBUG_KEYGUARD ) android.util.Slog.d ( com.android.server.wm.WindowManagerService.TAG , ( ( ( "keyguardGoingAway: disableWinAnim=" + disableWindowAnimations ) + " kgToNotifShade=" ) + keyguardGoingToNotificationShade ) ) ; synchronized ( mWindowMap ) { mAnimator.mKeyguardGoingAway = true ; mAnimator.mKeyguardGoingAwayToNotificationShade = keyguardGoingToNotificationShade ; mAnimator.mKeyguardGoingAwayDisableWindowAnimations = disableWindowAnimations ; requestTraversalLocked ( ) ; } }
Source:
public void testSpecials ( ) { final com.ibm.icu.util.LocaleMatcher matcher = newLocaleMatcher ( "en, fil, ro, nn" ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "fil" ) , matcher.getBestMatch ( "tl" ) ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "ro" ) , matcher.getBestMatch ( "mo" ) ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "nn" ) , matcher.getBestMatch ( "no" ) ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "en" ) , matcher.getBestMatch ( "ja" ) ) ; }

Target:
public void testSpecials ( ) { final com.ibm.icu.util.LocaleMatcher matcher = newLocaleMatcher ( "en, fil, ro, nn" ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "fil" ) , matcher.getBestMatch ( "tl" ) ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "ro" ) , matcher.getBestMatch ( "mo" ) ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "nn" ) , matcher.getBestMatch ( "nb" ) ) ; assertEquals ( new com.ibm.icu.util.ULocale ( "en" ) , matcher.getBestMatch ( "ja" ) ) ; }
Source:
public void testConstructor2 ( ) { try { new java.util.concurrent.ConcurrentHashMap ( 1 , 0 , ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IllegalArgumentException success ) { } }

Target:
public void testConstructor2 ( ) { try { new java.util.concurrent.ConcurrentHashMap ( ( - 1 ) , 0.75F ) ; shouldThrow ( ) ; } catch ( java.lang.IllegalArgumentException success ) { } try { new java.util.concurrent.ConcurrentHashMap ( 16 , ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IllegalArgumentException success ) { } }
Source:
public void requestAudioFocusForCall ( int streamType , int durationHint ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.requestAudioFocus ( new android.media.AudioAttributes.Builder ( ) . setInternalLegacyStreamType ( streamType ) . build ( ) , durationHint , mICallBack , null , MediaFocusControl.IN_VOICE_COMM_FOCUS_ID , getContext ( ) . getOpPackageName ( ) , android.media.AudioManager.AUDIOFOCUS_FLAG_LOCK , null ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Can't call requestAudioFocusForCall() on AudioService:" , e ) ; } }

Target:
public void requestAudioFocusForCall ( int streamType , int durationHint ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.requestAudioFocus ( new android.media.AudioAttributes.Builder ( ) . setInternalLegacyStreamType ( streamType ) . build ( ) , durationHint , mICallBack , null , MediaFocusControl.IN_VOICE_COMM_FOCUS_ID , mApplicationContext.getOpPackageName ( ) , android.media.AudioManager.AUDIOFOCUS_FLAG_LOCK , null ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Can't call requestAudioFocusForCall() on AudioService:" , e ) ; } }
Source:
public java.lang.String toString ( ) { return ( ( "IccIoResponse sw1:0x" + ( java.lang.Integer.toHexString ( sw1 ) ) ) + " sw2:0x" ) + ( java.lang.Integer.toHexString ( sw2 ) ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( "IccIoResult sw1:0x" + ( java.lang.Integer.toHexString ( sw1 ) ) ) + " sw2:0x" ) + ( java.lang.Integer.toHexString ( sw2 ) ) ) + ( ! ( success ( ) ) ? " Error: " + ( getErrorString ( ) ) : "" ) ; }
Source:
private org.eclipse.core.runtime.IStatus validateLocationInWorkspace ( ) { if ( ( mValues.projectName ) != null ) { java.io.File dest = org.eclipse.core.runtime.Platform.getLocation ( ) . append ( mValues.projectName ) . toFile ( ) ; if ( dest.exists ( ) ) { return new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.ERROR , com.android.ide.eclipse.adt.AdtPlugin.PLUGIN_ID , java.lang.String.format ( "There is already a file or directory named \"%1$s\" in the selected location." , mValues.projectName ) ) ; } } return null ; }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { if ( mIgnore ) { return ; } java.lang.Object source = e.getSource ( ) ; validatePage ( ) ; }
Source:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 12 ; float floor = ( ( float ) ( java.lang.StrictMath.floor ( args.inV ) ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.min ( ( ( args.inV ) - floor ) , 0.99999994F ) ) ) ; }

Target:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloatFloat args ) { float floor = android.renderscript.cts.CoreMathVerifier.floor ( args.inV ) ; args.outFloor = new android.renderscript.cts.Floaty ( floor ) ; args.out = new android.renderscript.cts.Floaty ( java.lang.Math.min ( ( ( args.inV ) - floor ) , 0.99999994F ) , 0 , 1 ) ; }
Source:
public void test2 ( ) throws java.lang.Exception { assertEquals ( ( "drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png\n" + ( "drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png\n" + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }

Target:
public void test2 ( ) throws java.lang.Exception { assertEquals ( ( "res/drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png [IconDuplicates]\n" + ( ( ( ( ( " res/drawable-hdpi/appwidget_bg.9.png: <No location-specific message\n" + "res/drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png [IconDuplicates]\n" ) + " res/drawable-hdpi/ic_launcher.png: <No location-specific message\n" ) + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }
Source:
public java.util.List < android.telephony.ClientRequestStats > getClientRequestStats ( java.lang.String callingPackage , int subId ) { if ( ! ( canReadPhoneState ( callingPackage , "getClientRequestStats" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getClientRequestStats ( ) ; } return null ; }

Target:
public java.util.List < android.telephony.ClientRequestStats > getClientRequestStats ( java.lang.String callingPackage , int subId ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getClientRequestStats" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getClientRequestStats ( ) ; } return null ; }
Source:
private void onDoubleClick ( org.eclipse.swt.events.MouseEvent e ) { int x = mHScale.inverseTranslate ( e.x ) ; int y = mVScale.inverseTranslate ( e.y ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = findViewInfoAt ( x , y ) ; if ( vi == null ) { return ; } org.w3c.dom.Node xmlNode = vi.getXmlNode ( ) ; if ( xmlNode != null ) { boolean found = mLayoutEditor.show ( xmlNode ) ; if ( ! found ) { getDisplay ( ) . beep ( ) ; } } }

Target:
public void showXml ( org.eclipse.swt.events.MouseEvent e ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutPoint p = com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( this , e ) . toLayout ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = mViewHierarchy.findViewInfoAt ( p ) ; if ( ( vi == null ) || ( vi.isRoot ( ) ) ) { return ; } org.w3c.dom.Node xmlNode = vi.getXmlNode ( ) ; if ( xmlNode != null ) { boolean found = mLayoutEditor.show ( xmlNode ) ; if ( ! found ) { getDisplay ( ) . beep ( ) ; } } }
Source:
public void acceptRingingCall ( ) { try { com.android.server.telecom.Log.startSession ( "TSI.aRC" ) ; synchronized ( mLock ) { enforceModifyPermission ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { acceptRingingCallInternal ( com.android.server.telecom.TelecomServiceImpl.DEFAULT_VIDEO_STATE ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void acceptRingingCall ( ) { try { android.telecom.Log.startSession ( "TSI.aRC" ) ; synchronized ( mLock ) { enforceModifyPermission ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { acceptRingingCallInternal ( com.android.server.telecom.TelecomServiceImpl.DEFAULT_VIDEO_STATE ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void setSelectedDisplay ( java.lang.String id ) { if ( ! ( com.android.internal.util.Objects.equal ( mSelectedDisplayId , id ) ) ) { if ( ( mConnectionReady ) && ( ( mSelectedDisplayId ) != null ) ) { mActiveConnection.disconnect ( mSelectedDisplayId ) ; } mSelectedDisplayId = id ; if ( ( mConnectionReady ) && ( id != null ) ) { mActiveConnection.connect ( id ) ; } updateBinding ( ) ; } }

Target:
public void setSelectedDisplay ( java.lang.String id ) { if ( ! ( java.util.Objects.equals ( mSelectedDisplayId , id ) ) ) { if ( ( mConnectionReady ) && ( ( mSelectedDisplayId ) != null ) ) { mActiveConnection.disconnect ( mSelectedDisplayId ) ; } mSelectedDisplayId = id ; if ( ( mConnectionReady ) && ( id != null ) ) { mActiveConnection.connect ( id ) ; } updateBinding ( ) ; } }
Source:
public static android.nfc.NdefRecord createApplicationRecord ( java.lang.String packageName ) { if ( packageName == null ) throw new java.lang.NullPointerException ( "packageName is null" ) ; if ( ( packageName.length ( ) ) == 0 ) throw new java.lang.IllegalArgumentException ( "packageName is empty" ) ; return new android.nfc.NdefRecord ( android.nfc.NdefRecord.TNF_EXTERNAL_TYPE , android.nfc.NdefRecord.RTD_ANDROID_APP , null , packageName.getBytes ( Charsets.UTF_8 ) ) ; }

Target:
public static android.nfc.NdefRecord createApplicationRecord ( java.lang.String packageName ) { if ( packageName == null ) throw new java.lang.NullPointerException ( "packageName is null" ) ; if ( ( packageName.length ( ) ) == 0 ) throw new java.lang.IllegalArgumentException ( "packageName is empty" ) ; return new android.nfc.NdefRecord ( android.nfc.NdefRecord.TNF_EXTERNAL_TYPE , android.nfc.NdefRecord.RTD_ANDROID_APP , null , packageName.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nScriptSetVarVE ( long id , int slot , byte [ ] val , long e , int [ ] dims , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetVarVE ( curCon , id , slot , val , e , dims , mUseInc ) ; }
Source:
private void doTest ( ) { com.intellij.codeInspection.LocalInspectionTool localInspectionTool = new com.google.gct.intellij.endpoints.validation.ApiNamespaceInspection ( ) ; java.lang.String testName = getTestName ( true ) ; final java.lang.String testDataPath = getTestDataPath ( ) ; myFixture.setTestDataPath ( testDataPath ) ; myFixture.testInspection ( ( "inspections/apiNamespaceInspection/" + testName ) , new com.intellij.codeInspection.ex.LocalInspectionToolWrapper ( localInspectionTool ) ) ; }

Target:
private void doTest ( ) { com.intellij.codeInspection.LocalInspectionTool localInspectionTool = new com.google.gct.idea.appengine.validation.ApiNamespaceInspection ( ) ; java.lang.String testName = getTestName ( true ) ; final java.lang.String testDataPath = getTestDataPath ( ) ; myFixture.setTestDataPath ( testDataPath ) ; myFixture.testInspection ( ( "inspections/apiNamespaceInspection/" + testName ) , new com.intellij.codeInspection.ex.LocalInspectionToolWrapper ( localInspectionTool ) ) ; }
Source:
public java.text.AttributedCharacterIterator formatToCharacterIterator ( java.lang.Object object ) { if ( object == null ) { throw new java.lang.NullPointerException ( "object == null" ) ; } return ndf.formatToCharacterIterator ( object ) ; }

Target:
public java.text.AttributedCharacterIterator formatToCharacterIterator ( java.lang.Object object ) { if ( object == null ) { throw new java.lang.NullPointerException ( "object == null" ) ; } if ( ( ( roundingMode ) == ( java.math.RoundingMode.UNNECESSARY ) ) && ( ( object instanceof java.lang.Float ) || ( object instanceof java.lang.Double ) ) ) { checkRoundingUnnecessary ( ( ( java.lang.Number ) ( object ) ) . doubleValue ( ) ) ; } return ndf.formatToCharacterIterator ( object ) ; }
Source:
public com.android.ide.common.resources.configuration.FolderConfiguration getConfiguration ( ) { assert ( getSource ( ) ) != null : this ; java.lang.String qualifier = getSource ( ) . getQualifiers ( ) ; if ( qualifier.isEmpty ( ) ) { return new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; } return com.android.ide.common.resources.configuration.FolderConfiguration.getConfigFromQualifiers ( com.google.common.base.Splitter.on ( '-' ) . split ( qualifier ) ) ; }

Target:
public DataFile.FileType getSourceType ( ) { com.android.ide.common.res2.ResourceFile resourceFile = getSource ( ) ; if ( resourceFile == null ) { throw new java.lang.RuntimeException ( ( "Cannot call getSourceType on " + ( toString ( ) ) ) ) ; } return resourceFile.getType ( ) ; }
Source:
public static org.conscrypt.OpenSSLX509CRL fromX509DerInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is ) ; try { final long crlCtx = org.conscrypt.NativeCrypto.d2i_X509_CRL_bio ( bis.getBioContext ( ) ) ; if ( crlCtx == 0 ) { return null ; } return new org.conscrypt.OpenSSLX509CRL ( crlCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { org.conscrypt.NativeCrypto.BIO_free ( bis.getBioContext ( ) ) ; } }

Target:
public static org.conscrypt.OpenSSLX509CRL fromX509DerInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is ) ; try { final long crlCtx = org.conscrypt.NativeCrypto.d2i_X509_CRL_bio ( bis.getBioContext ( ) ) ; if ( crlCtx == 0 ) { return null ; } return new org.conscrypt.OpenSSLX509CRL ( crlCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { bis.release ( ) ; } }
Source:
public void destroy ( ) { if ( ( mCallerInfo ) != null ) { mCallerInfo.cachedPhotoIcon = null ; mCallerInfo.cachedPhoto = null ; } android.telecom.Log.addEvent ( this , LogUtils.Events.DESTROYED ) ; }

Target:
public void destroy ( ) { if ( ( mCallerInfo ) != null ) { mCallerInfo.cachedPhotoIcon = null ; mCallerInfo.cachedPhoto = null ; } for ( android.os.ParcelFileDescriptor fd : mDiscardedRttFds ) { if ( fd != null ) { try { fd.close ( ) ; } catch ( java.io.IOException e ) { } } } android.telecom.Log.addEvent ( this , LogUtils.Events.DESTROYED ) ; }
Source:
private void writeBackupState ( long fileSize , long crc , android.os.ParcelFileDescriptor stateFile ) throws java.io.IOException { java.io.DataOutputStream out = new java.io.DataOutputStream ( new java.io.FileOutputStream ( stateFile.getFileDescriptor ( ) ) ) ; out.writeLong ( fileSize ) ; out.writeLong ( crc ) ; out.writeInt ( com.android.browser.BrowserBackupAgent.BACKUP_AGENT_VERSION ) ; }

Target:
private void writeBackupState ( long fileSize , long crc , android.os.ParcelFileDescriptor stateFile ) throws java.io.IOException { java.io.DataOutputStream out = new java.io.DataOutputStream ( new java.io.FileOutputStream ( stateFile.getFileDescriptor ( ) ) ) ; try { out.writeLong ( fileSize ) ; out.writeLong ( crc ) ; out.writeInt ( com.android.browser.BrowserBackupAgent.BACKUP_AGENT_VERSION ) ; } finally { if ( out != null ) { out.close ( ) ; } } }
Source:
public final com.android.server.am.WaitResult startActivityAndWait ( android.app.IApplicationThread caller , android.content.Intent intent , java.lang.String resolvedType , android.net.Uri [ ] grantedUriPermissions , int grantedMode , android.os.IBinder resultTo , java.lang.String resultWho , int requestCode , boolean onlyIfNeeded , boolean debug ) { com.android.server.am.WaitResult res = new com.android.server.am.WaitResult ( ) ; startActivityMayWait ( caller , intent , resolvedType , grantedUriPermissions , grantedMode , resultTo , resultWho , requestCode , onlyIfNeeded , debug , res , null ) ; return res ; }

Target:
public final com.android.server.am.WaitResult startActivityAndWait ( android.app.IApplicationThread caller , android.content.Intent intent , java.lang.String resolvedType , android.net.Uri [ ] grantedUriPermissions , int grantedMode , android.os.IBinder resultTo , java.lang.String resultWho , int requestCode , boolean onlyIfNeeded , boolean debug , java.lang.String profileFile , android.os.ParcelFileDescriptor profileFd , boolean autoStopProfiler ) { com.android.server.am.WaitResult res = new com.android.server.am.WaitResult ( ) ; mMainStack.startActivityMayWait ( caller , ( - 1 ) , intent , resolvedType , grantedUriPermissions , grantedMode , resultTo , resultWho , requestCode , onlyIfNeeded , debug , profileFile , profileFd , autoStopProfiler , res , null ) ; return res ; }
Source:
public void testDensityOnlyWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 2 ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 0 , result.size ( ) ) ; }

Target:
public void testDensityOnlyWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 2 ) ) ; java.util.List < com.android.build.OutputFile > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 0 , result.size ( ) ) ; }
Source:
private void handleConnectionServiceDeath ( ) { if ( ! ( mPendingResponses.isEmpty ( ) ) ) { com.android.server.telecom.CreateConnectionResponse [ ] responses = mPendingResponses.values ( ) . toArray ( new com.android.server.telecom.CreateConnectionResponse [ mPendingResponses.values ( ) . size ( ) ] ) ; mPendingResponses.clear ( ) ; for ( int i = 0 ; i < ( responses.length ) ; i ++ ) { responses [ i ] . handleCreateConnectionFailure ( new android.telecom.DisconnectCause ( android.telecom.DisconnectCause.ERROR ) ) ; } } mCallIdMapper.clear ( ) ; }

Target:
private void handleConnectionServiceDeath ( ) { if ( ! ( mPendingResponses.isEmpty ( ) ) ) { com.android.server.telecom.CreateConnectionResponse [ ] responses = mPendingResponses.values ( ) . toArray ( new com.android.server.telecom.CreateConnectionResponse [ mPendingResponses.values ( ) . size ( ) ] ) ; mPendingResponses.clear ( ) ; for ( int i = 0 ; i < ( responses.length ) ; i ++ ) { responses [ i ] . handleCreateConnectionFailure ( new android.telecom.DisconnectCause ( android.telecom.DisconnectCause.ERROR , "CS_DEATH" ) ) ; } } mCallIdMapper.clear ( ) ; }
Source:
static boolean read ( java.nio.channels.SocketChannel chan , byte [ ] data ) { try { com.android.ddmlib.AdbHelper.read ( chan , data , ( - 1 ) , com.android.ddmlib.DdmPreferences.getTimeOut ( ) ) ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.d ( "ddms" , ( "readAll: IOException: " + ( e.getMessage ( ) ) ) ) ; return false ; } return true ; }

Target:
static void read ( java.nio.channels.SocketChannel chan , byte [ ] data ) throws com.android.ddmlib.TimeoutException , java.io.IOException { com.android.ddmlib.AdbHelper.read ( chan , data , ( - 1 ) , com.android.ddmlib.DdmPreferences.getTimeOut ( ) ) ; }
Source:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeString ( fileServiceId ) ; out.writeParcelable ( sourceUri , flags ) ; out.writeInt ( subscriptionId ) ; out.writeString ( serializedResultIntentForApp ) ; out.writeInt ( version ) ; }

Target:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeString ( fileServiceId ) ; out.writeParcelable ( sourceUri , flags ) ; out.writeParcelable ( destinationUri , flags ) ; out.writeInt ( subscriptionId ) ; out.writeString ( serializedResultIntentForApp ) ; out.writeInt ( version ) ; }
Source:
private void markConnectionFailed ( java.net.Socket s ) { try { s.close ( ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , "TCP socket close error" ) ; } mSessionHandler.obtainMessage ( com.android.bluetooth.opp.BluetoothOppTransfer.RFCOMM_ERROR ) . sendToTarget ( ) ; }

Target:
public void interrupt ( ) { if ( com.android.bluetooth.opp.BluetoothOppTransfer.D ) android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , ( "start interrupt :" + ( btSocket ) ) ) ; isInterrupted = true ; if ( ( btSocket ) != null ) { try { btSocket.close ( ) ; } catch ( java.io.IOException e ) { android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , "Error when close socket" ) ; } } }
Source:
public void run ( ) { switch ( mAction ) { case com.android.ide.eclipse.adt.internal.editors.layout.gle2.PaletteControl.ToggleViewOptionAction.TOGGLE_CATEGORY : mCategories = ! ( mCategories ) ; refreshPalette ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.PaletteControl.ToggleViewOptionAction.TOGGLE_ALPHABETICAL : mAlphabetical = ! ( mAlphabetical ) ; refreshPalette ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.PaletteControl.ToggleViewOptionAction.TOGGLE_AUTO_CLOSE : mAutoClose = ! ( mAutoClose ) ; mAccordion.setAutoClose ( mAutoClose ) ; break ; } savePaletteMode ( ) ; }

Target:
public void run ( ) { switch ( mAction ) { case com.android.ide.eclipse.adt.internal.editors.layout.gle2.PaletteControl.ToggleViewOptionAction.TOGGLE_CATEGORY : mCategories = ! ( mCategories ) ; refreshPalette ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.PaletteControl.ToggleViewOptionAction.TOGGLE_ALPHABETICAL : mAlphabetical = ! ( mAlphabetical ) ; refreshPalette ( ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.PaletteControl.ToggleViewOptionAction.TOGGLE_AUTO_CLOSE : mAutoClose = ! ( mAutoClose ) ; mAccordion.setAutoClose ( mAutoClose ) ; break ; case com.android.ide.eclipse.adt.internal.editors.layout.gle2.PaletteControl.ToggleViewOptionAction.REFRESH : mPreviewIconFactory.refresh ( ) ; refreshPalette ( ) ; break ; } savePaletteMode ( ) ; }
Source:
public void testInstall_withNewerBundleVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_FORMAT_VERSION , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withNewerDistroVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_DISTRO_FORMAT_VERSION , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public void testNoCallbackAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testNoCallbackAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( android.net.NetworkCapabilities.TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public void dump ( java.io.PrintWriter out ) { out.println ( ( ( "Last sweep " + ( com.android.server.wifi.hotspot2.Utils.toHMS ( ( ( mClock.getWallClockMillis ( ) ) - ( mLastSweep ) ) ) ) ) + " ago." ) ) ; for ( com.android.server.wifi.hotspot2.ANQPData anqpData : mANQPCache.values ( ) ) { out.println ( anqpData.toString ( false ) ) ; } }

Target:
public void dump ( java.io.PrintWriter out ) { out.println ( ( ( "Last sweep " + ( com.android.server.wifi.hotspot2.Utils.toHMS ( ( ( mClock.getElapsedSinceBootMillis ( ) ) - ( mLastSweep ) ) ) ) ) + " ago." ) ) ; for ( com.android.server.wifi.hotspot2.ANQPData anqpData : mANQPCache.values ( ) ) { out.println ( anqpData ) ; } }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ( productFlavorFromJni ( ) . equals ( "free" ) ? "Free as in beer!\n" : "Show me the money!\n" ) ) ; sb.append ( "(" ) ; sb.append ( buildTypeFromJni ( ) ) ; sb.append ( ")" ) ; android.widget.TextView tv = new android.widget.TextView ( this ) ; tv.setText ( sb.toString ( ) ) ; setContentView ( tv ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( ( ( "productFlavor: " + ( productFlavorFromJni ( ) ) ) + "\n" ) ) ; sb.append ( ( ( "buildType: " + ( buildTypeFromJni ( ) ) ) + "\n" ) ) ; sb.append ( ( ( "variant: " + ( variantFromJni ( ) ) ) + "\n" ) ) ; android.widget.TextView tv = new android.widget.TextView ( this ) ; tv.setText ( sb.toString ( ) ) ; setContentView ( tv ) ; }
Source:
public void sendSMS ( java.lang.String smscPDU , java.lang.String pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_SMS , result ) ; rr.mParcel.writeInt ( 2 ) ; rr.mParcel.writeString ( smscPDU ) ; rr.mParcel.writeString ( pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void sendSMS ( java.lang.String smscPDU , java.lang.String pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_SMS , result ) ; constructGsmSendSmsRilRequest ( rr , smscPDU , pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public boolean addOrUpdatePasspointConfiguration ( android.net.wifi.hotspot2.PasspointConfiguration config ) { enforceChangePermission ( ) ; mLog.trace ( "addorUpdatePasspointConfiguration uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; return mWifiStateMachine.syncAddOrUpdatePasspointConfig ( mWifiStateMachineChannel , config ) ; }

Target:
public boolean addOrUpdatePasspointConfiguration ( android.net.wifi.hotspot2.PasspointConfiguration config ) { enforceChangePermission ( ) ; mLog.trace ( "addorUpdatePasspointConfiguration uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ! ( mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.config_wifi_hotspot2_enabled ) ) ) { throw new java.lang.UnsupportedOperationException ( "Passpoint not enabled" ) ; } return mWifiStateMachine.syncAddOrUpdatePasspointConfig ( mWifiStateMachineChannel , config ) ; }
Source:
public static void loadOptimizeLists ( java.lang.String optimizeListFile , java.lang.String dontOptimizeListFile ) { if ( com.android.dx.dex.cf.OptimizerOptions.optimizeListsLoaded ) { return ; } if ( ( optimizeListFile != null ) && ( dontOptimizeListFile != null ) ) { throw new java.lang.RuntimeException ( ( "optimize and don't optimize lists " + " are mutually exclusive." ) ) ; } if ( optimizeListFile != null ) { com.android.dx.dex.cf.OptimizerOptions.optimizeList = com.android.dx.dex.cf.OptimizerOptions.loadStringsFromFile ( optimizeListFile ) ; } if ( dontOptimizeListFile != null ) { com.android.dx.dex.cf.OptimizerOptions.dontOptimizeList = com.android.dx.dex.cf.OptimizerOptions.loadStringsFromFile ( dontOptimizeListFile ) ; } com.android.dx.dex.cf.OptimizerOptions.optimizeListsLoaded = true ; }

Target:
public void loadOptimizeLists ( java.lang.String optimizeListFile , java.lang.String dontOptimizeListFile ) { if ( optimizeListsLoaded ) { return ; } if ( ( optimizeListFile != null ) && ( dontOptimizeListFile != null ) ) { throw new java.lang.RuntimeException ( ( "optimize and don't optimize lists " + " are mutually exclusive." ) ) ; } if ( optimizeListFile != null ) { optimizeList = com.android.dx.dex.cf.OptimizerOptions.loadStringsFromFile ( optimizeListFile ) ; } if ( dontOptimizeListFile != null ) { dontOptimizeList = com.android.dx.dex.cf.OptimizerOptions.loadStringsFromFile ( dontOptimizeListFile ) ; } optimizeListsLoaded = true ; }
Source:
void handle3GAuthRequest ( com.android.server.wifi.util.TelephonyUtil.SimAuthRequestData requestData ) { if ( ( ( targetWificonfiguration ) == null ) || ( ( targetWificonfiguration.networkId ) == ( requestData.networkId ) ) ) { logd ( "id matches targetWifiConfiguration" ) ; } else { logd ( "id does not match targetWifiConfiguration" ) ; return ; } com.android.server.wifi.util.TelephonyUtil.SimAuthResponseData response = com.android.server.wifi.util.TelephonyUtil.get3GAuthResponse ( requestData , getTelephonyManager ( ) ) ; if ( response != null ) { mWifiNative.simAuthResponse ( requestData.networkId , response.type , response.response ) ; } else { mWifiNative.umtsAuthFailedResponse ( requestData.networkId ) ; } }

Target:
void handle3GAuthRequest ( com.android.server.wifi.util.TelephonyUtil.SimAuthRequestData requestData ) { if ( ( ( targetWificonfiguration ) == null ) || ( ( targetWificonfiguration.networkId ) == ( lookupFrameworkNetworkId ( requestData.networkId ) ) ) ) { logd ( "id matches targetWifiConfiguration" ) ; } else { logd ( "id does not match targetWifiConfiguration" ) ; return ; } com.android.server.wifi.util.TelephonyUtil.SimAuthResponseData response = com.android.server.wifi.util.TelephonyUtil.get3GAuthResponse ( requestData , getTelephonyManager ( ) ) ; if ( response != null ) { mWifiNative.simAuthResponse ( requestData.networkId , response.type , response.response ) ; } else { mWifiNative.umtsAuthFailedResponse ( requestData.networkId ) ; } }
Source:
private void createServerSession ( javax.obex.ObexTransport transport ) { mServerSession = new com.android.bluetooth.opp.BluetoothOppObexServerSession ( this , transport ) ; mServerSession.preStart ( ) ; if ( com.android.bluetooth.opp.BluetoothOppService.D ) android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppService.TAG , ( ( ( "Get ServerSession " + ( mServerSession.toString ( ) ) ) + " for incoming connection" ) + ( transport.toString ( ) ) ) ) ; }

Target:
private void createServerSession ( javax.obex.ObexTransport transport ) { mServerSession = new com.android.bluetooth.opp.BluetoothOppObexServerSession ( this , transport , mServerSocket ) ; mServerSession.preStart ( ) ; if ( com.android.bluetooth.opp.BluetoothOppService.D ) { android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppService.TAG , ( ( ( "Get ServerSession " + ( mServerSession.toString ( ) ) ) + " for incoming connection" ) + ( transport.toString ( ) ) ) ) ; } }
Source:
public void testImportEmptyLibrary ( ) throws java.lang.Exception { java.io.File lib = createEmptyLibrary ( ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; options.addJayceImport ( lib ) ; com.android.jack.TestTools.compileSourceToDex ( options , com.android.jack.TestTools.getJackTestsWithJackFolder ( "library/test001" ) , com.android.jack.TestTools.getDefaultClasspathString ( ) , com.android.jack.TestTools.createTempFile ( "library001" , ".zip" ) , true ) ; }

Target:
public void testImportEmptyLibrary ( ) throws java.lang.Exception { java.io.File lib = createEmptyLibrary ( ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; options.addImportedLibrary ( lib ) ; com.android.jack.TestTools.compileSourceToDex ( options , com.android.jack.TestTools.getJackTestsWithJackFolder ( "library/test001" ) , com.android.jack.TestTools.getDefaultClasspathString ( ) , com.android.jack.TestTools.createTempFile ( "library001" , ".zip" ) , true ) ; }
Source:
public boolean isMinifyEnabled ( ) { com.android.build.gradle.internal.core.Type type = getType ( ) ; return ( getBuildType ( ) . isMinifyEnabled ( ) ) && ( ( ! ( type.isForTesting ( ) ) ) || ( ( getTestedConfig ( ) . getType ( ) ) != ( Type.LIBRARY ) ) ) ; }

Target:
public boolean isMinifyEnabled ( ) { com.android.builder.core.VariantType type = getType ( ) ; return ( getBuildType ( ) . isMinifyEnabled ( ) ) && ( ( ! ( type.isForTesting ( ) ) ) || ( ( getTestedConfig ( ) . getType ( ) ) != ( com.android.builder.core.VariantType.LIBRARY ) ) ) ; }
Source:
private boolean runCorrectnessPatterns ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s ) { boolean pass = true ; pass &= patternDuplicateAnonymousResult ( RS , s ) ; pass &= patternFindMinAndMaxInf ( RS , s ) ; pass &= patternInterleavedReduce ( RS , s ) ; pass &= patternRedundantGet ( RS , s ) ; return pass ; }

Target:
private boolean runCorrectnessPatterns ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_reduce s ) { boolean pass = true ; pass &= patternDuplicateAnonymousResult ( RS , s ) ; pass &= patternFindMinAndMaxInf ( RS , s ) ; pass &= patternInterleavedReduce ( RS , s ) ; pass &= patternRedundantGet ( RS , s ) ; return pass ; }
Source:
public void TestAlias ( ) { logln ( "Testing %%ALIAS" ) ; android.icu.util.UResourceBundle rb = ( ( android.icu.util.UResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , "iw_IL" ) ) ) ; android.icu.util.UResourceBundle b = rb.get ( "NumberElements" ) ; if ( b != null ) { if ( ( b.getSize ( ) ) > 0 ) { logln ( "%%ALIAS mechanism works" ) ; } else { errln ( "%%ALIAS mechanism failed for iw_IL NumberElements" ) ; } } else { errln ( "%%ALIAS mechanism failed for iw_IL" ) ; } }

Target:
public void TestAlias ( ) { logln ( "Testing %%ALIAS" ) ; android.icu.util.UResourceBundle rb = android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , "iw_IL" ) ; android.icu.util.UResourceBundle b = rb.get ( "NumberElements" ) ; if ( b != null ) { if ( ( b.getSize ( ) ) > 0 ) { logln ( "%%ALIAS mechanism works" ) ; } else { errln ( "%%ALIAS mechanism failed for iw_IL NumberElements" ) ; } } else { errln ( "%%ALIAS mechanism failed for iw_IL" ) ; } }
Source:
public void testDeviceAdmin ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestOrderDetector.DEVICE_ADMIN ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "AndroidManifest.xml:31: Warning: You must have an intent filter for action android.app.action.DEVICE_ADMIN_ENABLED [DeviceAdmin]\n" + " <meta-data android:name=\"android.app.device_admin\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "AndroidManifest.xml:44: Warning: You must have an intent filter for action android.app.action.DEVICE_ADMIN_ENABLED [DeviceAdmin]\n" ) + " <meta-data android:name=\"android.app.device_admin\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "AndroidManifest.xml:56: Warning: You must have an intent filter for action android.app.action.DEVICE_ADMIN_ENABLED [DeviceAdmin]\n" ) + " <meta-data android:name=\"android.app.device_admin\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "deviceadmin.xml=>AndroidManifest.xml" ) ) ; }

Target:
public void testDeviceAdmin ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestDetector.DEVICE_ADMIN ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "AndroidManifest.xml:31: Warning: You must have an intent filter for action android.app.action.DEVICE_ADMIN_ENABLED [DeviceAdmin]\n" + " <meta-data android:name=\"android.app.device_admin\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "AndroidManifest.xml:44: Warning: You must have an intent filter for action android.app.action.DEVICE_ADMIN_ENABLED [DeviceAdmin]\n" ) + " <meta-data android:name=\"android.app.device_admin\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "AndroidManifest.xml:56: Warning: You must have an intent filter for action android.app.action.DEVICE_ADMIN_ENABLED [DeviceAdmin]\n" ) + " <meta-data android:name=\"android.app.device_admin\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "deviceadmin.xml=>AndroidManifest.xml" ) ) ; }
Source:
public void test_close ( ) throws java.io.IOException { oos.writeBytes ( "HelloWorld" ) ; oos.close ( ) ; ois = new java.io.ObjectInputStream ( new java.io.ByteArrayInputStream ( bao.toByteArray ( ) ) ) ; ois.close ( ) ; }

Target:
public void test_close ( ) throws java.lang.Exception { oos.writeObject ( testString ) ; oos.close ( ) ; tests.support.Support_ASimpleInputStream sis = new tests.support.Support_ASimpleInputStream ( bao.toByteArray ( ) ) ; ois = new java.io.ObjectInputStream ( sis ) ; sis.throwExceptionOnNextUse = true ; try { ois.close ( ) ; fail ( "Test 1: IOException expected." ) ; } catch ( java.io.IOException e ) { } sis.throwExceptionOnNextUse = false ; ois.close ( ) ; }
Source:
protected void resetRecords ( ) { mImsi = null ; msisdn = null ; voiceMailNum = null ; countVoiceMessages = 0 ; mncLength = UNINITIALIZED ; iccid = null ; spnDisplayCondition = - 1 ; efMWIS = null ; efCPHS_MWI = null ; spdiNetworks = null ; pnnHomeName = null ; adnCache.reset ( ) ; log ( "SIMRecords: onRadioOffOrNotAvailable set 'gsm.sim.operator.numeric' to operator=null" ) ; android.os.SystemProperties.set ( com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC , null ) ; android.os.SystemProperties.set ( com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA , null ) ; android.os.SystemProperties.set ( com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY , null ) ; recordsRequested = false ; }

Target:
protected void resetRecords ( ) { mImsi = null ; msisdn = null ; voiceMailNum = null ; countVoiceMessages = 0 ; mncLength = UNINITIALIZED ; iccid = null ; spnDisplayCondition = - 1 ; efMWIS = null ; efCPHS_MWI = null ; spdiNetworks = null ; pnnHomeName = null ; gid1 = null ; adnCache.reset ( ) ; log ( "SIMRecords: onRadioOffOrNotAvailable set 'gsm.sim.operator.numeric' to operator=null" ) ; android.os.SystemProperties.set ( com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC , null ) ; android.os.SystemProperties.set ( com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA , null ) ; android.os.SystemProperties.set ( com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY , null ) ; recordsRequested = false ; }
Source:
void extractFrom ( com.ibm.icu.text.DateTimePatternGenerator.DateTimeMatcher source , int fieldMask ) { for ( int i = 0 ; i < ( type.length ) ; ++ i ) { if ( ( fieldMask & ( 1 << i ) ) != 0 ) { type [ i ] = source.type [ i ] ; original [ i ] = source.original [ i ] ; } else { type [ i ] = com.ibm.icu.text.DateTimePatternGenerator.NONE ; original [ i ] = "" ; } } }

Target:
void extractFrom ( com.ibm.icu.text.DateTimePatternGenerator.DateTimeMatcher source , int fieldMask ) { for ( int i = 0 ; i < ( type.length ) ; ++ i ) { if ( ( fieldMask & ( 1 << i ) ) != 0 ) { type [ i ] = source.type [ i ] ; original.copyFieldFrom ( source.original , i ) ; } else { type [ i ] = com.ibm.icu.text.DateTimePatternGenerator.NONE ; original.clearField ( i ) ; } } }
Source:
private boolean isActionBarIcon ( com.android.tools.lint.detector.api.Context context , java.lang.String name , java.io.File file ) { if ( isActionBarIcon ( name ) ) { return true ; } if ( ( ( file != null ) && ( name.startsWith ( "ic_menu_" ) ) ) && ( isAndroid30 ( context , com.android.tools.lint.detector.api.Context.getFolderVersion ( file ) ) ) ) { return true ; } return false ; }

Target:
private boolean isActionBarIcon ( com.android.tools.lint.detector.api.Context context , java.lang.String name , java.io.File file ) { if ( isActionBarIcon ( name ) ) { return true ; } if ( ( ( file != null ) && ( name.startsWith ( "ic_menu_" ) ) ) && ( com.android.tools.lint.checks.IconDetector.isAndroid30 ( context , com.android.tools.lint.detector.api.Context.getFolderVersion ( file ) ) ) ) { return true ; } return false ; }
Source:
public boolean getDataEnabled ( int subId ) { boolean retVal = false ; try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) retVal = telephony.getDataEnabled ( subId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getDataEnabled" , e ) ; } catch ( java.lang.NullPointerException e ) { } return retVal ; }

Target:
public boolean isMobileDataEnabled ( ) { boolean retVal = false ; try { int subId = getSubId ( android.telephony.SubscriptionManager.getDefaultDataSubscriptionId ( ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) retVal = telephony.isDataEnabled ( subId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isDataEnabled" , e ) ; } catch ( java.lang.NullPointerException e ) { } return retVal ; }
Source:
private static boolean isUnsupported ( java.lang.String algorithm ) { if ( algorithm.equals ( "PBEWITHMD5ANDRC2" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHSHA1ANDRC2" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHSHAAND40BITRC2-CBC" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHSHAAND128BITRC2-CBC" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHSHAANDTWOFISH-CBC" ) ) { return true ; } return false ; }

Target:
private static boolean isUnsupported ( java.lang.String algorithm ) { if ( algorithm.equals ( "RC2" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHMD5ANDRC2" ) ) { return true ; } if ( algorithm.startsWith ( "PBEWITHSHA1ANDRC2" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHSHAAND40BITRC2-CBC" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHSHAAND128BITRC2-CBC" ) ) { return true ; } if ( algorithm.equals ( "PBEWITHSHAANDTWOFISH-CBC" ) ) { return true ; } return false ; }
Source:
protected void readSourceFolder ( java.io.File sourceFolder ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { java.io.File [ ] folders = sourceFolder.listFiles ( ) ; if ( folders != null ) { for ( java.io.File folder : folders ) { if ( ( folder.isDirectory ( ) ) && ( com.android.builder.internal.packaging.PackagingUtils.checkFolderForPackaging ( folder.getName ( ) ) ) ) { com.android.builder.resources.ResourceSet.FolderData folderData = com.android.builder.resources.ResourceSet.getFolderData ( folder ) ; if ( ( folderData.folderType ) != null ) { parseFolder ( sourceFolder , folder , folderData ) ; } } } } }

Target:
protected void readSourceFolder ( java.io.File sourceFolder , com.android.utils.ILogger logger ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { java.io.File [ ] folders = sourceFolder.listFiles ( ) ; if ( folders != null ) { for ( java.io.File folder : folders ) { if ( ( folder.isDirectory ( ) ) && ( com.android.builder.internal.packaging.PackagingUtils.checkFolderForPackaging ( folder.getName ( ) ) ) ) { com.android.builder.resources.ResourceSet.FolderData folderData = com.android.builder.resources.ResourceSet.getFolderData ( folder ) ; if ( ( folderData.folderType ) != null ) { parseFolder ( sourceFolder , folder , folderData , logger ) ; } } } } }
Source:
public void test_tryLock ( ) throws java.lang.Exception { org.apache.harmony.tests.java.nio.channels.FileChannelTest.MockFileChannel mockFileChannel = new org.apache.harmony.tests.java.nio.channels.FileChannelTest.MockFileChannel ( ) ; mockFileChannel.tryLock ( ) ; assertTrue ( mockFileChannel.isTryLockCalled ) ; }

Target:
public void test_tryLock_After_Release ( ) throws java.lang.Exception { fileLock = writeOnlyFileChannel.tryLock ( ) ; fileLock.release ( ) ; fileLock = writeOnlyFileChannel.tryLock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; fileLock.release ( ) ; fileLock = writeOnlyFileChannel.tryLock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; fileLock.release ( ) ; fileLock = writeOnlyFileChannel2.tryLock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; }