auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void unloadAllContainers ( java.util.Set < com.android.server.pm.PackageManagerService.SdInstallArgs > cidArgs ) { for ( com.android.server.pm.PackageManagerService.SdInstallArgs arg : cidArgs ) { synchronized ( mInstallLock ) { arg.doPostDeleteLI ( false ) ; } } }

Target:
public void run ( ) { mHandler.removeCallbacks ( this ) ; final boolean succeded ; synchronized ( mInstallLock ) { succeded = deleteApplicationCacheFilesLI ( packageName , userId ) ; } clearExternalStorageDataSync ( packageName , false ) ; if ( observer != null ) { try { observer.onRemoveCompleted ( packageName , succeded ) ; } catch ( android.os.RemoteException e ) { android.util.Log.i ( com.android.server.pm.PackageManagerService.TAG , "Observer no longer exists." ) ; } } }
Source:
public android.os.Bundle sendWallpaperCommand ( android.os.IBinder window , java.lang.String action , int x , int y , int z , android.os.Bundle extras , boolean sync ) { synchronized ( mWindowMap ) { long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return sendWindowWallpaperCommandLocked ( windowForClientLocked ( this , window ) , action , x , y , z , extras , sync ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }

Target:
public int relayout ( android.view.IWindow window , android.view.WindowManager.LayoutParams attrs , int requestedWidth , int requestedHeight , int viewFlags , boolean insetsPending , android.graphics.Rect outFrame , android.graphics.Rect outContentInsets , android.graphics.Rect outVisibleInsets , android.content.res.Configuration outConfig , android.view.Surface outSurface ) { return relayoutWindow ( this , window , attrs , requestedWidth , requestedHeight , viewFlags , insetsPending , outFrame , outContentInsets , outVisibleInsets , outConfig , outSurface ) ; }
Source:
public void onSelected ( boolean newState ) { if ( rescaleToReal ( newState ) ) { mZoomOutButton.setEnabled ( ( ! newState ) ) ; mZoomResetButton.setEnabled ( ( ! newState ) ) ; mZoomInButton.setEnabled ( ( ! newState ) ) ; } else { mZoomRealSizeButton.setSelection ( ( ! newState ) ) ; } }

Target:
public void onSelected ( boolean newState ) { if ( rescaleToReal ( newState ) ) { mZoomOutButton.setEnabled ( ( ! newState ) ) ; mZoomResetButton.setEnabled ( ( ! newState ) ) ; mZoomInButton.setEnabled ( ( ! newState ) ) ; mZoomFitButton.setEnabled ( ( ! newState ) ) ; } else { mZoomRealSizeButton.setSelection ( ( ! newState ) ) ; } }
Source:
public void onViewHolderCollapsed ( com.android.dialer.voicemail.listui.NewVoicemailViewHolder collapseViewHolder ) { if ( ( collapseViewHolder.getViewHolderId ( ) ) == ( currentlyExpandedViewHolderId ) ) { currentlyExpandedViewHolderId = - 1 ; } }

Target:
private com.android.dialer.voicemail.listui.NewVoicemailViewHolder getCurrentlyExpandedViewHolder ( ) { if ( newVoicemailViewHolderArrayMap.containsKey ( currentlyExpandedViewHolderId ) ) { com.android.dialer.common.Assert.checkArgument ( ( ( newVoicemailViewHolderArrayMap.get ( currentlyExpandedViewHolderId ) . getViewHolderId ( ) ) == ( currentlyExpandedViewHolderId ) ) ) ; return newVoicemailViewHolderArrayMap.get ( currentlyExpandedViewHolderId ) ; } else { com.android.dialer.common.LogUtil.i ( "NewVoicemailAdapter.getCurrentlyExpandedViewHolder" , "no view holder found in newVoicemailViewHolderArrayMap size:%d for %d" , newVoicemailViewHolderArrayMap.size ( ) , currentlyExpandedViewHolderId ) ; return null ; } }
Source:
public void testQuickFix_noAnnotation ( ) { com.intellij.openapi.project.Project myProject = myFixture.getProject ( ) ; com.intellij.psi.PsiParameter parameter = com.intellij.psi.JavaPsiFacade.getInstance ( myProject ) . getElementFactory ( ) . createParameter ( "param" , PsiType.BOOLEAN ) ; com.intellij.codeInspection.ex.ProblemDescriptorImpl problemDescriptorMock = org.mockito.Mockito.mock ( com.intellij.codeInspection.ex.ProblemDescriptorImpl.class ) ; org.mockito.Mockito.when ( problemDescriptorMock.getPsiElement ( ) ) . thenReturn ( parameter ) ; com.google.gct.intellij.endpoints.validation.InvalidParameterAnnotationsInspection.MyQuickFix myQuickFix = new com.google.gct.intellij.endpoints.validation.InvalidParameterAnnotationsInspection ( ) . new com.google.gct.intellij.endpoints.validation.MyQuickFix ( ) ; myQuickFix.applyFix ( myProject , problemDescriptorMock ) ; junit.framework.Assert.assertEquals ( "boolean param" , parameter.getText ( ) ) ; }

Target:
private void runQuickFixTest ( com.intellij.psi.PsiParameter parameter , java.lang.String expectedString ) { com.google.gct.intellij.endpoints.validation.InvalidParameterAnnotationsInspection.MyQuickFix myQuickFix = new com.google.gct.intellij.endpoints.validation.InvalidParameterAnnotationsInspection ( ) . new com.google.gct.intellij.endpoints.validation.MyQuickFix ( ) ; com.intellij.testFramework.MockProblemDescriptor problemDescriptor = new com.intellij.testFramework.MockProblemDescriptor ( parameter , "" , com.intellij.codeInspection.ProblemHighlightType.ERROR , null ) ; myQuickFix.applyFix ( myFixture.getProject ( ) , problemDescriptor ) ; junit.framework.Assert.assertEquals ( expectedString , parameter.getText ( ) ) ; }
Source:
private static float getWeight ( com.android.ide.common.api.INode linearLayoutChild ) { java.lang.String weight = linearLayoutChild.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WEIGHT ) ; if ( ( weight != null ) && ( ( weight.length ( ) ) > 0 ) ) { try { return java.lang.Float.parseFloat ( weight ) ; } catch ( java.lang.NumberFormatException nfe ) { com.android.ide.eclipse.adt.AdtPlugin.log ( nfe , "Invalid weight %1$s" , weight ) ; } } return 0.0F ; }

Target:
private static float getWeight ( com.android.ide.common.api.INode linearLayoutChild ) { java.lang.String weight = linearLayoutChild.getStringAttr ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WEIGHT ) ; if ( ( weight != null ) && ( ( weight.length ( ) ) > 0 ) ) { try { return java.lang.Float.parseFloat ( weight ) ; } catch ( java.lang.NumberFormatException nfe ) { com.android.ide.eclipse.adt.AdtPlugin.log ( nfe , "Invalid weight %1$s" , weight ) ; } } return 0.0F ; }
Source:
public void testListensForDunNetworks ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( mCM.listening.isEmpty ( ) ) ; mUNM.start ( ) ; org.junit.Assert.assertFalse ( mCM.listening.isEmpty ( ) ) ; org.junit.Assert.assertTrue ( mCM.isListeningForDun ( ) ) ; mUNM.stop ( ) ; org.junit.Assert.assertTrue ( mCM.hasNoCallbacks ( ) ) ; }

Target:
public void testListensForAllNetworks ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( mCM.listening.isEmpty ( ) ) ; mUNM.start ( ) ; org.junit.Assert.assertFalse ( mCM.listening.isEmpty ( ) ) ; org.junit.Assert.assertTrue ( mCM.isListeningForAll ( ) ) ; mUNM.stop ( ) ; org.junit.Assert.assertTrue ( mCM.hasNoCallbacks ( ) ) ; }
Source:
private org.w3c.dom.Document parse ( @ com.android.annotations.NonNull java.lang.String xml , @ com.android.annotations.NonNull org.xml.sax.InputSource input , boolean checkBom ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { try { javax.xml.parsers.SAXParserFactory factory = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; factory.setFeature ( com.android.utils.PositionXmlParser.NAMESPACE_FEATURE , true ) ; factory.setFeature ( com.android.utils.PositionXmlParser.NAMESPACE_PREFIX_FEATURE , true ) ; javax.xml.parsers.SAXParser parser = factory.newSAXParser ( ) ; com.android.utils.PositionXmlParser.DomBuilder handler = new com.android.utils.PositionXmlParser.DomBuilder ( xml ) ; org.xml.sax.XMLReader xmlReader = parser.getXMLReader ( ) ; xmlReader.setProperty ( "http://xml.org/sax/properties/lexical-handler" , handler ) ; parser.parse ( input , handler ) ; return handler.getDocument ( ) ; } catch ( org.xml.sax.SAXException e ) { if ( checkBom && ( e.getMessage ( ) . contains ( "Content is not allowed in prolog" ) ) ) { xml = xml.replaceFirst ( "^([\\W]+)<" , "<" ) ; return parse ( xml , new org.xml.sax.InputSource ( new java.io.StringReader ( xml ) ) , false ) ; } throw e ; } }

Target:
private org.w3c.dom.Document parse ( @ com.android.annotations.NonNull java.lang.String xml , @ com.android.annotations.NonNull org.xml.sax.InputSource input , boolean checkBom ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { try { javax.xml.parsers.SAXParserFactory factory = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; factory.setFeature ( com.android.utils.PositionXmlParser.NAMESPACE_FEATURE , true ) ; factory.setFeature ( com.android.utils.PositionXmlParser.NAMESPACE_PREFIX_FEATURE , true ) ; factory.setFeature ( com.android.utils.PositionXmlParser.PROVIDE_XMLNS_URIS , true ) ; javax.xml.parsers.SAXParser parser = factory.newSAXParser ( ) ; com.android.utils.PositionXmlParser.DomBuilder handler = new com.android.utils.PositionXmlParser.DomBuilder ( xml ) ; org.xml.sax.XMLReader xmlReader = parser.getXMLReader ( ) ; xmlReader.setProperty ( "http://xml.org/sax/properties/lexical-handler" , handler ) ; parser.parse ( input , handler ) ; return handler.getDocument ( ) ; } catch ( org.xml.sax.SAXException e ) { if ( checkBom && ( e.getMessage ( ) . contains ( "Content is not allowed in prolog" ) ) ) { xml = xml.replaceFirst ( "^([\\W]+)<" , "<" ) ; return parse ( xml , new org.xml.sax.InputSource ( new java.io.StringReader ( xml ) ) , false ) ; } throw e ; } }
Source:
public static void send ( android.content.Context context , java.io.File file ) { final android.net.Uri bugreportUri = com.google.android.traceur.FileSender.getUriForFile ( context , file ) ; android.content.Intent sendIntent = com.google.android.traceur.FileSender.buildSendIntent ( context , bugreportUri ) ; sendIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; context.startActivity ( sendIntent ) ; }

Target:
public static void send ( android.content.Context context , java.io.File file ) { final android.net.Uri bugreportUri = com.android.traceur.FileSender.getUriForFile ( context , file ) ; android.content.Intent sendIntent = com.android.traceur.FileSender.buildSendIntent ( context , bugreportUri ) ; sendIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; context.startActivity ( sendIntent ) ; }
Source:
private int getCurrentUserId ( ) { final long ident = android.os.Binder.clearCallingIdentity ( ) ; try { android.content.pm.UserInfo currentUser = android.app.ActivityManagerNative.getDefault ( ) . getCurrentUser ( ) ; return currentUser.id ; } catch ( android.os.RemoteException e ) { } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } return android.os.UserHandle.USER_OWNER ; }

Target:
private int getCurrentUserId ( ) { final long ident = android.os.Binder.clearCallingIdentity ( ) ; try { android.content.pm.UserInfo currentUser = android.app.ActivityManager.getService ( ) . getCurrentUser ( ) ; return currentUser.id ; } catch ( android.os.RemoteException e ) { } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } return android.os.UserHandle.USER_OWNER ; }
Source:
public final double double_literal ( ) throws org.jf.smali.RecognitionException { double value = 0.0 ; org.antlr.runtime.tree.CommonTree DOUBLE_LITERAL196 = null ; try { { DOUBLE_LITERAL196 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.DOUBLE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_DOUBLE_LITERAL_in_double_literal3322 ) ) ) ; value = org.jf.smali.LiteralTools.parseDouble ( ( DOUBLE_LITERAL196 != null ? DOUBLE_LITERAL196.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final double double_literal ( ) throws org.jf.smali.RecognitionException { double value = 0.0 ; org.antlr.runtime.tree.CommonTree DOUBLE_LITERAL196 = null ; try { { DOUBLE_LITERAL196 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.DOUBLE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_DOUBLE_LITERAL_in_double_literal3324 ) ) ) ; value = org.jf.smali.LiteralTools.parseDouble ( ( DOUBLE_LITERAL196 != null ? DOUBLE_LITERAL196.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , int [ ] 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 , java.lang.Object array ) { copy1DRangeFromUnchecked ( off , count , array , validateObjectIsPrimitiveArray ( array , false ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public void test_getInstanceLjava_lang_StringLjava_security_Provider01 ( ) throws java.security.NoSuchAlgorithmException { if ( ! ( tests.api.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) { fail ( tests.api.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; return ; } java.security.Provider provider = null ; for ( int i = 0 ; i < ( tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues.length ) ; i ++ ) { try { javax.net.ssl.KeyManagerFactory.getInstance ( tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] , provider ) ; fail ( "Expected IllegalArgumentException was not thrown when provider is null" ) ; } catch ( java.lang.IllegalArgumentException e ) { } } }

Target:
public void test_getInstanceLjava_lang_StringLjava_security_Provider01 ( ) throws java.security.NoSuchAlgorithmException { if ( ! ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) { fail ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; return ; } java.security.Provider provider = null ; for ( int i = 0 ; i < ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues.length ) ; i ++ ) { try { javax.net.ssl.KeyManagerFactory.getInstance ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] , provider ) ; fail ( "Expected IllegalArgumentException was not thrown when provider is null" ) ; } catch ( java.lang.IllegalArgumentException e ) { } } }
Source:
private void showAllFilterMenuOptions ( android.view.Menu menu ) { menu.findItem ( R.id.show_all_calls ) . setVisible ( true ) ; menu.findItem ( R.id.show_incoming_only ) . setVisible ( true ) ; menu.findItem ( R.id.show_outgoing_only ) . setVisible ( true ) ; menu.findItem ( R.id.show_missed_only ) . setVisible ( true ) ; menu.findItem ( R.id.show_voicemails_only ) . setVisible ( true ) ; }

Target:
private void updateCallList ( int filterType ) { mCallLogQueryHandler.fetchCalls ( filterType ) ; }
Source:
private android.os.IInterface createImsFeature ( int slotId , int featureType , com.android.ims.internal.IImsFeatureStatusCallback c ) throws android.os.RemoteException { switch ( featureType ) { case android.telephony.ims.feature.ImsFeature.EMERGENCY_MMTEL : { return mIImsServiceController.createEmergencyMMTelFeature ( slotId , c ) ; } case android.telephony.ims.feature.ImsFeature.MMTEL : { return mIImsServiceController.createMMTelFeature ( slotId , c ) ; } case android.telephony.ims.feature.ImsFeature.RCS : { return mIImsServiceController.createRcsFeature ( slotId , c ) ; } default : return null ; } }

Target:
protected void removeImsFeature ( int slotId , int featureType , com.android.ims.internal.IImsFeatureStatusCallback c ) throws android.os.RemoteException { mIImsServiceController.removeImsFeature ( slotId , featureType , c ) ; }
Source:
protected boolean generateSourceProperties ( com.android.sdklib.internal.repository.archives.Archive archive , java.io.File unzipDestFolder ) { java.util.Properties props = new java.util.Properties ( ) ; archive.saveProperties ( props ) ; java.lang.Package pkg = archive.getParentPackage ( ) ; if ( pkg != null ) { pkg.saveProperties ( props ) ; } try { mFileOp.saveProperties ( new java.io.File ( unzipDestFolder , com.android.SdkConstants.FN_SOURCE_PROP ) , props , "## Android Tool: Source of this archive." ) ; return true ; } catch ( java.io.IOException ignore ) { return false ; } }

Target:
public java.lang.Object nextElement ( ) { return it.next ( ) ; }
Source:
public static final java.util.ArrayList readListXml ( java.io.InputStream in ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { org.xmlpull.v1.XmlPullParser parser = android.util.Xml.newPullParser ( ) ; parser.setInput ( in , null ) ; return ( ( java.util.ArrayList ) ( com.android.internal.util.XmlUtils.readValueXml ( parser , new java.lang.String [ 1 ] ) ) ) ; }

Target:
public static final java.util.ArrayList readListXml ( java.io.InputStream in ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { org.xmlpull.v1.XmlPullParser parser = android.util.Xml.newPullParser ( ) ; parser.setInput ( in , java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ; return ( ( java.util.ArrayList ) ( com.android.internal.util.XmlUtils.readValueXml ( parser , new java.lang.String [ 1 ] ) ) ) ; }
Source:
public static org.hamcrest.Matcher < android.view.View > isOpen ( ) { return new android.support.test.espresso.matcher.BoundedMatcher < android.view.View , android.support.v4.widget.DrawerLayout > ( android.support.v4.widget.DrawerLayout.class ) { @ java.lang.Override public void describeTo ( org.hamcrest.Description description ) { description.appendText ( "is drawer open" ) ; } @ java.lang.Override public boolean matchesSafely ( android.support.v4.widget.DrawerLayout drawer ) { return drawer.isDrawerOpen ( GravityCompat.START ) ; } } ; }

Target:
public static org.hamcrest.Matcher < android.view.View > isOpen ( final int gravity ) { return new android.support.test.espresso.matcher.BoundedMatcher < android.view.View , android.support.v4.widget.DrawerLayout > ( android.support.v4.widget.DrawerLayout.class ) { @ java.lang.Override public void describeTo ( org.hamcrest.Description description ) { description.appendText ( "is drawer open" ) ; } @ java.lang.Override public boolean matchesSafely ( android.support.v4.widget.DrawerLayout drawer ) { return drawer.isDrawerOpen ( gravity ) ; } } ; }
Source:
public void testRequestAllocInvalidSpi ( ) throws java.lang.Exception { try { mIpSecManager.allocateSecurityParameterIndex ( IpSecTransform.DIRECTION_OUT , android.net.IpSecManagerTest.GOOGLE_DNS_4 , 0 ) ; org.junit.Assert.fail ( "Able to allocate invalid spi" ) ; } catch ( java.lang.IllegalArgumentException e ) { } }

Target:
public void testAllocSpiSpiUnavailableException ( ) throws java.lang.Exception { android.net.IpSecSpiResponse spiResp = new android.net.IpSecSpiResponse ( IpSecManager.Status.SPI_UNAVAILABLE , 0 , 0 ) ; org.mockito.Mockito.when ( mMockIpSecService.allocateSecurityParameterIndex ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyObject ( ) ) ) . thenReturn ( spiResp ) ; try { mIpSecManager.allocateSecurityParameterIndex ( android.net.IpSecManagerTest.GOOGLE_DNS_4 ) ; org.junit.Assert.fail ( "ResourceUnavailableException was not thrown" ) ; } catch ( android.net.IpSecManager e ) { } }
Source:
public void testOnUnmappableCharacter ( ) { assertSame ( java.nio.charset.CodingErrorAction.REPORT , tests.api.java.nio.charset.CharsetDecoderTest.decoder.unmappableCharacterAction ( ) ) ; try { tests.api.java.nio.charset.CharsetDecoderTest.decoder.onUnmappableCharacter ( null ) ; fail ( "should throw null pointer exception" ) ; } catch ( java.lang.IllegalArgumentException e ) { } tests.api.java.nio.charset.CharsetDecoderTest.decoder.onUnmappableCharacter ( java.nio.charset.CodingErrorAction.IGNORE ) ; assertSame ( java.nio.charset.CodingErrorAction.IGNORE , tests.api.java.nio.charset.CharsetDecoderTest.decoder.unmappableCharacterAction ( ) ) ; }

Target:
public void testOnUnmappableCharacter ( ) { assertSame ( java.nio.charset.CodingErrorAction.REPORT , org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.unmappableCharacterAction ( ) ) ; try { org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.onUnmappableCharacter ( null ) ; fail ( "should throw null pointer exception" ) ; } catch ( java.lang.IllegalArgumentException e ) { } org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.onUnmappableCharacter ( java.nio.charset.CodingErrorAction.IGNORE ) ; assertSame ( java.nio.charset.CodingErrorAction.IGNORE , org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.unmappableCharacterAction ( ) ) ; }
Source:
public final void requestPermissions ( @ android.annotation.NonNull java.lang.String [ ] permissions , int requestCode ) { if ( requestCode < 0 ) { throw new java.lang.IllegalArgumentException ( "requestCode should be >= 0" ) ; } if ( mHasCurrentPermissionsRequest ) { android.util.Log.w ( android.app.Activity.TAG , "Can reqeust only one set of permissions at a time" ) ; onRequestPermissionsResult ( requestCode , new java.lang.String [ 0 ] , new int [ 0 ] ) ; return ; } android.content.Intent intent = getPackageManager ( ) . buildRequestPermissionsIntent ( permissions ) ; startActivityForResult ( android.app.Activity.REQUEST_PERMISSIONS_WHO_PREFIX , intent , requestCode , null ) ; mHasCurrentPermissionsRequest = true ; }

Target:
public final void requestPermissions ( @ android.annotation.NonNull java.lang.String [ ] permissions , int requestCode ) { if ( requestCode < 0 ) { throw new java.lang.IllegalArgumentException ( "requestCode should be >= 0" ) ; } if ( mHasCurrentPermissionsRequest ) { android.util.Log.w ( android.app.Activity.TAG , "Can request only one set of permissions at a time" ) ; onRequestPermissionsResult ( requestCode , new java.lang.String [ 0 ] , new int [ 0 ] ) ; return ; } android.content.Intent intent = getPackageManager ( ) . buildRequestPermissionsIntent ( permissions ) ; startActivityForResult ( android.app.Activity.REQUEST_PERMISSIONS_WHO_PREFIX , intent , requestCode , null ) ; mHasCurrentPermissionsRequest = true ; }
Source:
public boolean checkPattern ( java.lang.String pattern , int userId ) throws android.os.RemoteException { checkPasswordReadPermission ( userId ) ; byte [ ] hash = com.android.internal.widget.LockPatternUtils.patternToHash ( com.android.internal.widget.LockPatternUtils.stringToPattern ( pattern ) ) ; byte [ ] storedHash = mStorage.readPatternHash ( userId ) ; if ( storedHash == null ) { return true ; } boolean matched = java.util.Arrays.equals ( hash , storedHash ) ; if ( matched && ( ! ( android.text.TextUtils.isEmpty ( pattern ) ) ) ) { maybeUpdateKeystore ( pattern , userId ) ; } return matched ; }

Target:
public boolean checkPattern ( java.lang.String pattern , int userId ) throws android.os.RemoteException { checkPasswordReadPermission ( userId ) ; byte [ ] hash = com.android.internal.widget.LockPatternUtils.patternToHash ( com.android.internal.widget.LockPatternUtils.stringToPattern ( pattern ) ) ; byte [ ] storedHash = mStorage.readPatternHash ( userId ) ; if ( storedHash == null ) { return true ; } boolean matched = java.util.Arrays.equals ( hash , storedHash ) ; if ( matched && ( ! ( android.text.TextUtils.isEmpty ( pattern ) ) ) ) { unlockKeystore ( pattern , userId ) ; } return matched ; }
Source:
public void onPause ( ) { super . onPause ( ) ; com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onPause" ) ; com.android.dialer.common.concurrent.ThreadUtil.getUiThreadHandler ( ) . removeCallbacks ( setShouldMarkCallsReadTrue ) ; unregisterRefreshAnnotatedCallLogReceiver ( ) ; if ( shouldMarkCallsRead ) { com.google.common.util.concurrent.Futures.addCallback ( com.android.dialer.calllog.CallLogComponent.get ( getContext ( ) ) . getClearMissedCalls ( ) . clearAll ( ) , new com.android.dialer.common.concurrent.DefaultFutureCallback ( ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; } }

Target:
public void onPause ( ) { super . onPause ( ) ; com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onPause" ) ; onFragmentHidden ( ) ; }
Source:
public java.nio.ByteBuffer putChar ( char value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , ( ( short ) ( value ) ) , order ) ; position = newPosition ; return this ; }

Target:
public java.nio.ByteBuffer putChar ( char value ) { checkIsAccessible ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , ( ( short ) ( value ) ) , order ) ; position = newPosition ; return this ; }
Source:
private com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor getRootDescriptor ( ) { if ( ( mRootDescriptor ) == null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = mEditor.getTargetData ( ) ; if ( data != null ) { com.android.ide.eclipse.adt.internal.editors.descriptors.IDescriptorProvider descriptorProvider = data.getDescriptorProvider ( mDescriptorId ) ; if ( descriptorProvider != null ) { mRootDescriptor = new com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor ( "" , descriptorProvider.getRootElementDescriptors ( ) ) ; } } } return mRootDescriptor ; }

Target:
protected int getRootDescriptorId ( ) { return mDescriptorId ; }
Source:
public void setNickname ( java.lang.String iccid , java.lang.String nickname , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . setNickname ( mContext.getOpPackageName ( ) , iccid , nickname , new com.android.internal.telephony.euicc.ISetNicknameCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling setNickname" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void setNickname ( java.lang.String cardId , java.lang.String iccid , java.lang.String nickname , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . setNickname ( mContext.getOpPackageName ( ) , cardId , iccid , nickname , new com.android.internal.telephony.euicc.ISetNicknameCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling setNickname" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public static java.lang.String clearProperty ( java.lang.String key ) { if ( key == null ) { throw new java.lang.NullPointerException ( "key == null" ) ; } if ( key.isEmpty ( ) ) { throw new java.lang.IllegalArgumentException ( ) ; } return ( ( java.lang.String ) ( java.lang.System.getProperties ( ) . remove ( key ) ) ) ; }

Target:
public static java.lang.String clearProperty ( java.lang.String name ) { java.lang.System.checkPropertyName ( name ) ; return ( ( java.lang.String ) ( java.lang.System.getProperties ( ) . remove ( name ) ) ) ; }
Source:
private void sendAck ( ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_RESPONSE_ACKNOWLEDGEMENT , null ) ; acquireWakeLock ( rr , com.android.internal.telephony.RIL.FOR_ACK_WAKELOCK ) ; android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( ) ; if ( radioProxy != null ) { try { radioProxy.responseAcknowledgement ( ) ; } catch ( java.lang.Exception e ) { riljLoge ( ( "sendAck: exception : " + e ) ) ; } } else { android.telephony.Rlog.e ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , "Error trying to send ack, radioProxy = null" ) ; } rr.release ( ) ; }

Target:
private void sendAck ( ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_RESPONSE_ACKNOWLEDGEMENT , null ) ; acquireWakeLock ( rr , com.android.internal.telephony.RIL.FOR_ACK_WAKELOCK ) ; android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( ) ; if ( radioProxy != null ) { try { radioProxy.responseAcknowledgement ( ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { resetProxyAndRequestList ( ) ; riljLoge ( "sendAck" , e ) ; } } else { android.telephony.Rlog.e ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , "Error trying to send ack, radioProxy = null" ) ; } rr.release ( ) ; }
Source:
public static boolean isInGivenDay ( long dayToMatchInMillis , long subjectTimeInMillis ) { final long DAY_IN_MS = java.util.concurrent.TimeUnit.DAYS.toMillis ( 1 ) ; java.util.TimeZone timeZone = java.util.Calendar.getInstance ( ) . getTimeZone ( ) ; long offset = timeZone.getRawOffset ( ) ; if ( timeZone.inDaylightTime ( new java.util.Date ( dayToMatchInMillis ) ) ) { offset += timeZone.getDSTSavings ( ) ; } return ( com.android.tv.util.Utils.floorTime ( ( dayToMatchInMillis + offset ) , DAY_IN_MS ) ) == ( com.android.tv.util.Utils.floorTime ( ( subjectTimeInMillis + offset ) , DAY_IN_MS ) ) ; }

Target:
public static boolean isInGivenDay ( long dayToMatchInMillis , long subjectTimeInMillis ) { java.util.TimeZone timeZone = java.util.Calendar.getInstance ( ) . getTimeZone ( ) ; long offset = timeZone.getRawOffset ( ) ; if ( timeZone.inDaylightTime ( new java.util.Date ( dayToMatchInMillis ) ) ) { offset += timeZone.getDSTSavings ( ) ; } return ( com.android.tv.util.Utils.floorTime ( ( dayToMatchInMillis + offset ) , com.android.tv.util.Utils.ONE_DAY_MS ) ) == ( com.android.tv.util.Utils.floorTime ( ( subjectTimeInMillis + offset ) , com.android.tv.util.Utils.ONE_DAY_MS ) ) ; }
Source:
private void updateConfigurationCountLabel ( ) { int numberOfConfigurations = configuration.count ( ) ; double coverage = ( computeCoverage ( configuration.countCombinationsCollapsingOrientation ( ) ) ) * 100.0 ; myConfigurationCountLabel.setText ( ( ( "<html>Tests will run on <b>" + numberOfConfigurations ) + " configurations</b>.</html>" ) ) ; if ( numberOfConfigurations < 1 ) { myConfigurationCountLabel.setForeground ( JBColor.RED ) ; } else { myConfigurationCountLabel.setForeground ( com.intellij.util.ui.UIUtil.getActiveTextColor ( ) ) ; } }

Target:
private void updateConfigurationCountLabel ( ) { int numberOfConfigurations = configuration.getDeviceConfigurationCount ( ) ; double coverage = ( computeCoverage ( configuration.countCombinationsCollapsingOrientation ( ) ) ) * 100.0 ; myConfigurationCountLabel.setText ( ( ( "<html>Tests will run on <b>" + numberOfConfigurations ) + " configurations</b>.</html>" ) ) ; if ( numberOfConfigurations < 1 ) { myConfigurationCountLabel.setForeground ( JBColor.RED ) ; } else { myConfigurationCountLabel.setForeground ( com.intellij.util.ui.UIUtil.getActiveTextColor ( ) ) ; } }
Source:
private void operationComplete ( ) { ( pendingOperations ) -- ; if ( com.android.internal.telephony.gsm.GsmCallTracker.DBG_POLL ) log ( ( ( ( "operationComplete: pendingOperations=" + ( pendingOperations ) ) + ", needsPoll=" ) + ( needsPoll ) ) ) ; if ( ( ( pendingOperations ) == 0 ) && ( needsPoll ) ) { lastRelevantPoll = obtainMessage ( com.android.internal.telephony.gsm.EVENT_POLL_CALLS_RESULT ) ; cm.getCurrentCalls ( lastRelevantPoll ) ; } else if ( ( pendingOperations ) < 0 ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.GsmCallTracker.LOG_TAG , "GsmCallTracker.pendingOperations < 0" ) ; pendingOperations = 0 ; } }

Target:
private void operationComplete ( ) { ( mPendingOperations ) -- ; if ( com.android.internal.telephony.gsm.GsmCallTracker.DBG_POLL ) log ( ( ( ( "operationComplete: pendingOperations=" + ( mPendingOperations ) ) + ", needsPoll=" ) + ( mNeedsPoll ) ) ) ; if ( ( ( mPendingOperations ) == 0 ) && ( mNeedsPoll ) ) { mLastRelevantPoll = obtainMessage ( com.android.internal.telephony.gsm.EVENT_POLL_CALLS_RESULT ) ; mCi.getCurrentCalls ( mLastRelevantPoll ) ; } else if ( ( mPendingOperations ) < 0 ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.GsmCallTracker.LOG_TAG , "GsmCallTracker.pendingOperations < 0" ) ; mPendingOperations = 0 ; } }
Source:
private void processSupportsScreensNode ( org.xml.sax.Attributes attributes ) { mManifestData.mSupportsScreens = new com.android.sdklib.xml.ManifestData.SupportsScreens ( ) ; mManifestData.mSupportsScreens.mResizeable = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_RESIZABLE , true ) ) ; mManifestData.mSupportsScreens.mAnyDensity = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_ANYDENSITY , true ) ) ; mManifestData.mSupportsScreens.mSmallScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_SMALLSCREENS , true ) ) ; mManifestData.mSupportsScreens.mNormalScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_NORMALSCREENS , true ) ) ; mManifestData.mSupportsScreens.mLargeScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_LARGESCREENS , true ) ) ; }

Target:
private void processSupportsScreensNode ( org.xml.sax.Attributes attributes ) { mManifestData.mSupportsScreens = new com.android.sdklib.xml.ManifestData.SupportsScreens ( ) ; mManifestData.mSupportsScreens.mResizeable = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_RESIZEABLE , true ) ) ; mManifestData.mSupportsScreens.mAnyDensity = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_ANYDENSITY , true ) ) ; mManifestData.mSupportsScreens.mSmallScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_SMALLSCREENS , true ) ) ; mManifestData.mSupportsScreens.mNormalScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_NORMALSCREENS , true ) ) ; mManifestData.mSupportsScreens.mLargeScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_LARGESCREENS , true ) ) ; }
Source:
void onSearchCompleted ( int connId , int status ) throws android.os.RemoteException { if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( ( ( "onSearchCompleted() - connId=" + connId ) + ", status=" ) + status ) ) ; gattClientGetGattDbNative ( connId ) ; }

Target:
void onSearchCompleted ( int connId , int status ) throws android.os.RemoteException { if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( ( ( "onSearchCompleted() - connId=" + connId ) + ", status=" ) + status ) ) ; java.lang.Thread t = new java.lang.Thread ( new java.lang.Runnable ( ) { public void run ( ) { gattClientGetGattDbNative ( connId ) ; } } ) ; t.start ( ) ; }
Source:
public boolean connect ( ) { try { mService.clientConnect ( mClientIf , mDevice.getAddress ( ) , false , mTransport , mPhy ) ; return true ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothGatt.TAG , "" , e ) ; return false ; } }

Target:
public boolean connect ( ) { try { mService.clientConnect ( mClientIf , mDevice.getAddress ( ) , false , mTransport , mOpportunistic , mPhy ) ; return true ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothGatt.TAG , "" , e ) ; return false ; } }
Source:
public final byte get ( ) { checkNotFreed ( ) ; if ( ( position ) == ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } return this . block.peekByte ( ( ( offset ) + ( ( position ) ++ ) ) ) ; }

Target:
public final byte get ( ) { checkIsAccessible ( ) ; if ( ( position ) == ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } return this . block.peekByte ( ( ( offset ) + ( ( position ) ++ ) ) ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , int [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
native void rsnAllocationRead1D ( long con , long id , int off , int mip , int count , java.lang.Object d , int sizeBytes , int dt , int mSize , boolean usePadding ) ;
Source:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newExtra ( @ com.android.annotations.NonNull java.lang.String vendorId , @ com.android.annotations.NonNull java.lang.String path , @ com.android.annotations.Nullable java.lang.String [ ] oldPaths , @ com.android.annotations.NonNull com.android.sdklib.repository.NoPreviewRevision revision ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_EXTRAS ) ; p.mFullRevision = revision ; p.mVendorId = vendorId ; p.mPath = path ; p.mOldPaths = oldPaths ; return p ; }

Target:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newExtra ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IdDisplay vendor , @ com.android.annotations.NonNull java.lang.String path , @ com.android.annotations.NonNull java.lang.String displayName , @ com.android.annotations.Nullable java.lang.String [ ] oldPaths , @ com.android.annotations.NonNull com.android.sdklib.repository.NoPreviewRevision revision ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_EXTRAS ) ; p.mFullRevision = revision ; p.mVendor = vendor ; p.mPath = path ; p.mNameDisplay = displayName ; p.mOldPaths = oldPaths ; return p ; }
Source:
public void testAltWithFlags ( ) { boolean isCompiled = false ; try { java.util.regex.Pattern pat = java.util.regex.Pattern.compile ( "|(?i-xi)|()" ) ; isCompiled = true ; } catch ( java.util.regex.PatternSyntaxException e ) { java.lang.System.out.println ( e ) ; } assertTrue ( isCompiled ) ; }

Target:
public void testFindBoundaryCases6 ( ) { java.lang.String [ ] res = new java.lang.String [ ] { "" , "a" , "" , "" } ; java.util.regex.Pattern pat = java.util.regex.Pattern.compile ( ".*" ) ; java.util.regex.Matcher mat = pat.matcher ( "\na\n" ) ; int k = 0 ; for ( ; mat.find ( ) ; k ++ ) { assertEquals ( res [ k ] , mat.group ( ) ) ; } assertEquals ( 4 , k ) ; }
Source:
public void testAesCbcHmacSha1Udp6 ( ) 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 ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacMd5Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public void testPartialFileIsIgnored ( ) throws java.lang.Exception { java.io.File file = org.conscrypt.TrustedCertificateStoreTest.file ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; java.io.OutputStream os = new java.io.FileOutputStream ( file ) ; os.write ( 0 ) ; os.close ( ) ; assertTrue ( file.exists ( ) ) ; assertEmpty ( ) ; assertTrue ( file.exists ( ) ) ; }

Target:
public void testPartialFileIsIgnored ( ) throws java.lang.Exception { java.io.File file = file ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; file.getParentFile ( ) . mkdirs ( ) ; java.io.OutputStream os = new java.io.FileOutputStream ( file ) ; os.write ( 0 ) ; os.close ( ) ; assertTrue ( file.exists ( ) ) ; assertEmpty ( ) ; assertTrue ( file.exists ( ) ) ; }
Source:
public synchronized android.database.sqlite.SQLiteDatabase getWritableDatabase ( ) { android.database.sqlite.SQLiteDatabase result = null ; mUpgradeAttempted = false ; try { result = super . getWritableDatabase ( ) ; } catch ( java.lang.Exception e ) { if ( ! ( mUpgradeAttempted ) ) { android.util.Log.e ( com.android.providers.media.MediaProvider.TAG , ( "failed to open database " + ( mName ) ) , e ) ; return null ; } } if ( ( result == null ) && ( mUpgradeAttempted ) ) { mContext.getDatabasePath ( mName ) . delete ( ) ; result = super . getWritableDatabase ( ) ; } return result ; }

Target:
public synchronized android.database.sqlite.SQLiteDatabase getWritableDatabase ( ) { android.database.sqlite.SQLiteDatabase result = null ; mUpgradeAttempted = false ; try { result = super . getWritableDatabase ( ) ; } catch ( java.lang.Exception e ) { if ( ! ( mUpgradeAttempted ) ) { android.util.Log.e ( com.android.providers.media.MediaProvider.TAG , ( "failed to open database " + ( mName ) ) , e ) ; return null ; } } if ( ( result == null ) && ( mUpgradeAttempted ) ) { mContext.deleteDatabase ( mName ) ; result = super . getWritableDatabase ( ) ; } return result ; }
Source:
public void test_getReuseAddress ( ) throws java.lang.Exception { java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( ) ; theSocket.setReuseAddress ( true ) ; assertTrue ( "getReuseAddress false when it should be true" , theSocket.getReuseAddress ( ) ) ; theSocket.setReuseAddress ( false ) ; assertFalse ( "getReuseAddress true when it should be False" , theSocket.getReuseAddress ( ) ) ; }

Target:
public void test_getReuseAddress ( ) throws java.lang.Exception { java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( ) ; theSocket.setReuseAddress ( true ) ; assertTrue ( "getReuseAddress false when it should be true" , theSocket.getReuseAddress ( ) ) ; theSocket.setReuseAddress ( false ) ; assertFalse ( "getReuseAddress true when it should be False" , theSocket.getReuseAddress ( ) ) ; theSocket.close ( ) ; try { theSocket.getReuseAddress ( ) ; fail ( "SocketException was not thrown." ) ; } catch ( java.net.SocketException se ) { } }
Source:
private void getItemAttrRequestFromNative ( byte [ ] address , byte scope , byte [ ] itemUid , int uidCounter , byte numAttr , int [ ] attrs ) { com.android.bluetooth.avrcp.AvrcpCmd avrcpCmdobj = new com.android.bluetooth.avrcp.AvrcpCmd ( ) ; com.android.bluetooth.avrcp.AvrcpCmd.ItemAttrCmd itemAttr = avrcpCmdobj.new com.android.bluetooth.avrcp.ItemAttrCmd ( address , scope , itemUid , uidCounter , numAttr , attrs ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_GET_ITEM_ATTR ) ; msg.obj = itemAttr ; mHandler.sendMessage ( msg ) ; }

Target:
public void setA2dpAudioState ( int state ) { final com.android.bluetooth.avrcp.Avrcp.AvrcpMessageHandler handler = mHandler ; if ( handler == null ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "setA2dpAudioState: mHandler is already null" ) ; return ; } android.os.Message msg = handler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_SET_A2DP_AUDIO_STATE , state , 0 ) ; handler.sendMessage ( msg ) ; }
Source:
protected byte [ ] engineDoFinal ( ) { if ( ( mChunkedStreamer ) == null ) { throw new java.lang.IllegalStateException ( "Not initialized" ) ; } byte [ ] result ; try { result = mChunkedStreamer.doFinal ( null , 0 , 0 ) ; } catch ( android.security.KeymasterException e ) { throw android.security.KeymasterUtils.getCryptoOperationException ( e ) ; } engineReset ( ) ; return result ; }

Target:
protected byte [ ] engineDoFinal ( ) { ensureKeystoreOperationInitialized ( ) ; byte [ ] result ; try { result = mChunkedStreamer.doFinal ( null , 0 , 0 ) ; } catch ( android.security.KeymasterException e ) { throw android.security.KeymasterUtils.getCryptoOperationException ( e ) ; } engineReset ( ) ; return result ; }
Source:
public boolean dispatchBroadcast ( android.content.Intent intent ) { if ( ( mFilter.match ( getContentResolver ( ) , intent , false , com.android.server.BroadcastInterceptingContext.TAG ) ) > 0 ) { if ( ( mReceiver ) != null ) { final android.content.Context context = this ; mReceiver.onReceive ( context , intent ) ; return false ; } else { set ( intent ) ; return true ; } } else { return false ; } }

Target:
public boolean dispatchBroadcast ( android.content.Intent intent ) { if ( ( mFilter.match ( getContentResolver ( ) , intent , false , com.android.internal.util.test.BroadcastInterceptingContext.TAG ) ) > 0 ) { if ( ( mReceiver ) != null ) { final android.content.Context context = this ; mReceiver.onReceive ( context , intent ) ; return false ; } else { set ( intent ) ; return true ; } } else { return false ; } }
Source:
public void preloadAndroidView ( ) { loadRule ( SdkConstants.CLASS_VIEW , SdkConstants.CLASS_VIEW ) ; }

Target:
public java.util.List < com.android.ide.common.api.MenuAction > callGetContextMenu ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy selectedNode ) { com.android.ide.common.api.IViewRule rule = loadRule ( selectedNode.getNode ( ) ) ; if ( rule != null ) { try { mInsertType = com.android.ide.common.api.InsertType.CREATE ; return rule.getContextMenu ( selectedNode ) ; } catch ( java.lang.Exception e ) { logError ( "%s.getContextMenu() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }
Source:
public void run ( ) { for ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) { groovy.lang.Closure c = ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getClosure ( ) ; if ( c != null ) { gre.callClosure ( ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getClosure ( ) , a2 , null , ( ! isChecked ) ) ; } } } }

Target:
public void run ( ) { for ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IMenuCallback c = ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getCallback ( ) ; if ( c != null ) { try { c.action ( a2 , null , ( ! isChecked ) ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine gre = mCanvas.getRulesEngine ( ) ; gre.logError ( "XML edit operation failed: %s" , e.toString ( ) ) ; } } } } }