auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected com.intellij.ide.util.MemberChooser < com.intellij.codeInsight.generation.ClassMember > createMembersChooser ( com.intellij.codeInsight.generation.ClassMember [ ] members , boolean allowEmptySelection , boolean copyJavadocCheckbox , com.intellij.openapi.project.Project project ) { com.intellij.ide.util.MemberChooser < com.intellij.codeInsight.generation.ClassMember > chooser = new com.intellij.ide.util.MemberChooser < com.intellij.codeInsight.generation.ClassMember > ( members , allowEmptySelection , true , project , false , getHeaderPanel ( project ) ) ; chooser.setTitle ( myChooserTitle ) ; chooser.setCopyJavadocVisible ( copyJavadocCheckbox ) ; return chooser ; }

Target:
protected com.intellij.ide.util.MemberChooser < com.intellij.codeInsight.generation.ClassMember > createMembersChooser ( com.intellij.codeInsight.generation.ClassMember [ ] members , boolean allowEmptySelection , boolean copyJavadocCheckbox , com.intellij.openapi.project.Project project ) { com.intellij.ide.util.MemberChooser < com.intellij.codeInsight.generation.ClassMember > chooser = new com.intellij.ide.util.MemberChooser < com.intellij.codeInsight.generation.ClassMember > ( members , allowEmptySelection , true , project , false , getHeaderPanel ( project ) ) { @ org.jetbrains.annotations.Nullable @ java.lang.Override protected java.lang.String getHelpId ( ) { return com.intellij.codeInsight.generation.GenerateMembersHandlerBase.this . getHelpId ( ) ; } } ; chooser.setTitle ( myChooserTitle ) ; chooser.setCopyJavadocVisible ( copyJavadocCheckbox ) ; return chooser ; }
Source:
public void testHeadsetServiceDisconnect ( ) { receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device1 ) ) ; receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device2 ) ) ; serviceListenerUnderTest.onServiceDisconnected ( 0 ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device1 ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device2 ) ; assertNull ( mBluetoothDeviceManager.getHeadsetService ( ) ) ; assertEquals ( 0 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; }

Target:
public void testHeadsetServiceDisconnect ( ) { receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device1 ) ) ; receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device2 ) ) ; serviceListenerUnderTest.onServiceDisconnected ( 0 ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device1.getAddress ( ) ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device2.getAddress ( ) ) ; assertNull ( mBluetoothDeviceManager.getHeadsetService ( ) ) ; assertEquals ( 0 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof java.lang.reflect.AbstractMethod ) ) { return false ; } return ( this . artMethod ) == ( ( ( java.lang.reflect.AbstractMethod ) ( other ) ) . artMethod ) ; }

Target:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof java.lang.reflect.AbstractMethod ) ) { return false ; } java.lang.reflect.AbstractMethod otherMethod = ( ( java.lang.reflect.AbstractMethod ) ( other ) ) ; return ( ( this . declaringClass ) == ( otherMethod.declaringClass ) ) && ( ( this . dexMethodIndex ) == ( otherMethod.dexMethodIndex ) ) ; }
Source:
private static com.android.ide.common.layout.Pair < com.android.ide.eclipse.adt.internal.resources.ResourceType , java.lang.String > parseResource ( java.lang.String url ) { if ( ! ( url.startsWith ( "@" ) ) ) { return null ; } int typeEnd = url.indexOf ( '/' , 1 ) ; if ( typeEnd == ( - 1 ) ) { return null ; } int nameBegin = typeEnd + 1 ; int typeBegin = ( url.startsWith ( "@+" ) ) ? 2 : 1 ; int colon = url.lastIndexOf ( ':' , typeEnd ) ; if ( colon != ( - 1 ) ) { typeBegin = colon + 1 ; } java.lang.String typeName = url.substring ( typeBegin , typeEnd ) ; com.android.ide.eclipse.adt.internal.resources.ResourceType type = com.android.ide.eclipse.adt.internal.resources.ResourceType.getEnum ( typeName ) ; if ( type == null ) { return null ; } java.lang.String name = url.substring ( nameBegin ) ; return com.android.ide.common.layout.Pair.of ( type , name ) ; }

Target:
private static com.android.sdklib.util.Pair < com.android.ide.eclipse.adt.internal.resources.ResourceType , java.lang.String > parseResource ( java.lang.String url ) { if ( ! ( url.startsWith ( "@" ) ) ) { return null ; } int typeEnd = url.indexOf ( '/' , 1 ) ; if ( typeEnd == ( - 1 ) ) { return null ; } int nameBegin = typeEnd + 1 ; int typeBegin = ( url.startsWith ( "@+" ) ) ? 2 : 1 ; int colon = url.lastIndexOf ( ':' , typeEnd ) ; if ( colon != ( - 1 ) ) { typeBegin = colon + 1 ; } java.lang.String typeName = url.substring ( typeBegin , typeEnd ) ; com.android.ide.eclipse.adt.internal.resources.ResourceType type = com.android.ide.eclipse.adt.internal.resources.ResourceType.getEnum ( typeName ) ; if ( type == null ) { return null ; } java.lang.String name = url.substring ( nameBegin ) ; return com.android.sdklib.util.Pair.of ( type , name ) ; }
Source:
public void onStart ( ) { com.android.incallui.InCallPresenter.getInstance ( ) . setActivity ( inCallActivity ) ; enableInCallOrientationEventListener ( ( ( inCallActivity.getRequestedOrientation ( ) ) == ( InCallOrientationEventListener.ACTIVITY_PREFERENCE_ALLOW_ROTATION ) ) ) ; com.android.incallui.InCallPresenter.getInstance ( ) . onActivityStarted ( ) ; }

Target:
public void onStart ( ) { com.android.incallui.InCallPresenter.getInstance ( ) . setActivity ( inCallActivity ) ; enableInCallOrientationEventListener ( ( ( inCallActivity.getRequestedOrientation ( ) ) == ( InCallOrientationEventListener.ACTIVITY_PREFERENCE_ALLOW_ROTATION ) ) ) ; com.android.incallui.InCallPresenter.getInstance ( ) . onActivityStarted ( ) ; if ( ! ( isRecreating ) ) { com.android.incallui.InCallPresenter.getInstance ( ) . onUiShowing ( true ) ; } }
Source:
public boolean cleanup ( ) { mService = null ; return true ; }

Target:
public boolean onConnect ( android.bluetooth.BluetoothDevice remoteDevice , android.bluetooth.BluetoothSocket socket ) { if ( ( remoteDevice == null ) || ( socket == null ) ) { android.util.Log.e ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( ( ( "onConnect(): Unexpected null. remoteDevice=" + remoteDevice ) + " socket=" ) + socket ) ) ; return false ; } mPbapStateMachine = com.android.bluetooth.pbap.PbapStateMachine.make ( this , mHandlerThread.getLooper ( ) , remoteDevice , socket , this , mSessionStatusHandler ) ; return true ; }
Source:
protected void doBuildPatchFile ( java.io.File toFile , com.intellij.updater.MultiZipFile.OutputStream patchOutput ) throws java.io.IOException { Runner.logger.info ( "building PatchFile" ) ; patchOutput.putNextEntry ( myPath ) ; if ( ! ( toFile.isDirectory ( ) ) ) { writeExecutableFlag ( patchOutput , toFile ) ; com.intellij.updater.Utils.copyFileToStream ( toFile , patchOutput ) ; } patchOutput.closeEntry ( ) ; }

Target:
protected void doBuildPatchFile ( java.io.File olderFile , java.io.File newerFile , java.util.zip.ZipOutputStream patchOutput ) throws java.io.IOException { Runner.logger.info ( "building PatchFile" ) ; patchOutput.putNextEntry ( new java.util.zip.ZipEntry ( myPath ) ) ; if ( ! ( newerFile.isDirectory ( ) ) ) { writeExecutableFlag ( patchOutput , newerFile ) ; com.intellij.updater.Utils.copyFileToStream ( newerFile , patchOutput ) ; } patchOutput.closeEntry ( ) ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.lang.String msg ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; doLog ( lr ) ; }
Source:
public java.lang.String getType ( android.net.Uri uri ) { final int match = com.android.bookmarkprovider.BookmarkProvider.URI_MATCHER.match ( uri ) ; switch ( match ) { case com.android.bookmarkprovider.BookmarkProvider.LEGACY : case com.android.bookmarkprovider.BookmarkProvider.BOOKMARKS : return android.provider.BrowserContract.Bookmarks.CONTENT_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.LEGACY_ID : case com.android.bookmarkprovider.BookmarkProvider.BOOKMARKS_ID : return android.provider.BrowserContract.Bookmarks.CONTENT_ITEM_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.HISTORY : return android.provider.BrowserContract.History.CONTENT_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.HISTORY_ID : return android.provider.BrowserContract.History.CONTENT_ITEM_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.SEARCHES : return android.provider.BrowserContract.Searches.CONTENT_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.SEARCHES_ID : return android.provider.BrowserContract.Searches.CONTENT_ITEM_TYPE ; } return null ; }

Target:
public java.lang.String getType ( android.net.Uri uri ) { return BrowserContract.Bookmarks.CONTENT_TYPE ; }
Source:
public static org.eclipse.core.resources.IResource loadResourceProperty ( org.eclipse.core.resources.IResource resource , java.lang.String propertyName ) { java.lang.String value = com.android.ide.eclipse.adt.internal.project.ProjectHelper.loadStringProperty ( resource , propertyName ) ; if ( ( value != null ) && ( ( value.length ( ) ) > 0 ) ) { return resource.getProject ( ) . findMember ( value ) ; } return null ; }

Target:
public static org.eclipse.core.resources.IResource loadResourceProperty ( org.eclipse.core.resources.IResource resource , java.lang.String propertyName ) { java.lang.String value = com.android.ide.eclipse.adt.internal.project.ProjectHelper.loadStringProperty ( resource , propertyName ) ; if ( ( value != null ) && ( ( value.length ( ) ) > 0 ) ) { return org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) . getRoot ( ) . findMember ( new org.eclipse.core.runtime.Path ( value ) ) ; } return null ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , short [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; validateIsInt16 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , array , ( arrayLen * ( dt.mSize ) ) , dt ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public com.android.ims.internal.IImsMMTelFeature getEmergencyMMTelFeature ( int slotId ) { synchronized ( mLock ) { com.android.internal.telephony.ims.ImsServiceController.ImsFeatureContainer f = getImsFeatureContainer ( slotId , ImsFeature.EMERGENCY_MMTEL ) ; if ( f == null ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( "Requested null Emergency MMTelFeature on slot " + slotId ) ) ; return null ; } return f.resolve ( com.android.ims.internal.IImsMMTelFeature.class ) ; } }

Target:
public android.telephony.ims.aidl.IImsConfig getConfig ( int slotId ) throws android.os.RemoteException { synchronized ( mLock ) { return mIImsServiceController.getConfig ( slotId ) ; } }
Source:
private void applyLidSwitchState ( ) { if ( ( ( mLidState ) == ( android.view.WindowManagerPolicy.WindowManagerFuncs.LID_CLOSED ) ) && ( mLidControlsSleep ) ) { mPowerManager.goToSleep ( android.os.SystemClock.uptimeMillis ( ) ) ; } }

Target:
public int interceptMotionBeforeQueueingNonInteractive ( long whenNanos , int policyFlags ) { if ( ( policyFlags & ( FLAG_WAKE ) ) != 0 ) { mPowerManager.wakeUp ( ( whenNanos / 1000000 ) ) ; return 0 ; } if ( shouldDispatchInputWhenNonInteractive ( ) ) { return ACTION_PASS_TO_USER ; } return 0 ; }
Source:
protected java.security.AlgorithmParameters engineGetParameters ( ) { if ( ( engineParams ) == null ) { if ( ( paramSpec ) != null ) { try { engineParams = java.security.AlgorithmParameters.getInstance ( "OAEP" , BouncyCastleProvider.PROVIDER_NAME ) ; engineParams.init ( paramSpec ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e.toString ( ) ) ; } } } return engineParams ; }

Target:
protected java.security.AlgorithmParameters engineGetParameters ( ) { if ( ( engineParams ) == null ) { if ( ( paramSpec ) != null ) { try { engineParams = createParametersInstance ( "OAEP" ) ; engineParams.init ( paramSpec ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e.toString ( ) ) ; } } } return engineParams ; }
Source:
private synchronized boolean setAndSaveAlwaysOnPackage ( java.lang.String packageName , boolean lockdown ) { if ( setAlwaysOnPackage ( packageName , lockdown ) ) { saveAlwaysOnPackage ( ) ; return true ; } else { return false ; } }

Target:
private void saveAlwaysOnPackage ( ) { final long token = android.os.Binder.clearCallingIdentity ( ) ; try { mSystemServices.settingsSecurePutStringForUser ( Settings.Secure.ALWAYS_ON_VPN_APP , getAlwaysOnPackage ( ) , mUserHandle ) ; mSystemServices.settingsSecurePutIntForUser ( Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN , ( mLockdown ? 1 : 0 ) , mUserHandle ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }
Source:
private static sun.security.x509.AlgorithmId getSignerInfoDigestAlgorithm ( com.android.apksig.internal.apk.v1.DigestAlgorithm digestAlgorithm ) { switch ( digestAlgorithm ) { case SHA1 : return com.android.apksig.internal.apk.v1.V1SchemeSigner.OID_DIGEST_SHA1 ; case SHA256 : return com.android.apksig.internal.apk.v1.V1SchemeSigner.OID_DIGEST_SHA256 ; default : throw new java.lang.RuntimeException ( ( "Unsupported digest algorithm: " + digestAlgorithm ) ) ; } }

Target:
private static com.android.apksig.internal.pkcs7.AlgorithmIdentifier getSignerInfoDigestAlgorithmOid ( com.android.apksig.internal.apk.v1.DigestAlgorithm digestAlgorithm ) { switch ( digestAlgorithm ) { case SHA1 : return new com.android.apksig.internal.pkcs7.AlgorithmIdentifier ( V1SchemeVerifier.Signer.OID_DIGEST_SHA1 , com.android.apksig.internal.apk.v1.V1SchemeSigner.ASN1_DER_NULL ) ; case SHA256 : return new com.android.apksig.internal.pkcs7.AlgorithmIdentifier ( V1SchemeVerifier.Signer.OID_DIGEST_SHA256 , com.android.apksig.internal.apk.v1.V1SchemeSigner.ASN1_DER_NULL ) ; default : throw new java.lang.RuntimeException ( ( "Unsupported digest algorithm: " + digestAlgorithm ) ) ; } }
Source:
public static java.net.URI uri ( java.lang.String format , java.lang.Object ... args ) { java.lang.String uriString = java.lang.String.format ( format , args ) ; try { return new java.net.URI ( uriString ) ; } catch ( java.net.URISyntaxException e ) { throw new java.lang.IllegalStateException ( ( "Known good uri has syntax error: " + uriString ) , e ) ; } }

Target:
public static java.net.URI formattedUri ( java.lang.String format , java.lang.Object ... args ) { return com.android.ahat.DocString.uri ( java.lang.String.format ( format , args ) ) ; }
Source:
public byte [ ] getIssuerKeyIdentifier ( ) { byte [ ] issuerKeyId = null ; sun.security.x509.AuthorityKeyIdentifierExtension aki = getAuthorityKeyIdentifierExtension ( ) ; if ( aki != null ) { try { sun.security.x509.KeyIdentifier ki = ( ( sun.security.x509.KeyIdentifier ) ( aki.get ( sun.security.x509.AuthorityKeyIdentifierExtension.KEY_ID ) ) ) ; if ( ki != null ) { issuerKeyId = ki.getIdentifier ( ) ; } } catch ( java.io.IOException e ) { } } return issuerKeyId ; }

Target:
public sun.security.x509.KeyIdentifier getSubjectKeyId ( ) { sun.security.x509.SubjectKeyIdentifierExtension ski = getSubjectKeyIdentifierExtension ( ) ; if ( ski != null ) { try { return ( ( sun.security.x509.KeyIdentifier ) ( ski.get ( sun.security.x509.SubjectKeyIdentifierExtension.KEY_ID ) ) ) ; } catch ( java.io.IOException ioe ) { } } return null ; }
Source:
private void assertSocketActionBeforeConnect ( java.net.DatagramSocket s ) throws java.io.IOException { s.connect ( datagramSocket2Address ) ; assertTrue ( this . channel1.isConnected ( ) ) ; assertTrue ( s.isConnected ( ) ) ; s.disconnect ( ) ; assertFalse ( this . channel1.isConnected ( ) ) ; assertFalse ( s.isConnected ( ) ) ; s.close ( ) ; assertTrue ( s.isClosed ( ) ) ; assertFalse ( this . channel1.isOpen ( ) ) ; }

Target:
public void test_bind_null ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; try { assertNull ( dc.getLocalAddress ( ) ) ; dc.bind ( null ) ; java.net.InetSocketAddress localAddress = ( ( java.net.InetSocketAddress ) ( dc.getLocalAddress ( ) ) ) ; assertTrue ( localAddress.getAddress ( ) . isAnyLocalAddress ( ) ) ; assertTrue ( ( ( localAddress.getPort ( ) ) > 0 ) ) ; } finally { dc.close ( ) ; } }
Source:
public boolean retainAll ( final java.util.Collection < ? > c ) { com.google.common.base.Preconditions.checkNotNull ( c ) ; com.google.common.base.Predicate < java.util.Map.Entry < R , V > > predicate = new com.google.common.base.Predicate < java.util.Map.Entry < R , V > > ( ) { @ java.lang.Override public boolean apply ( java.util.Map.Entry < R , V > entry ) { return ! ( c.contains ( entry.getValue ( ) ) ) ; } } ; return removePredicate ( predicate ) ; }

Target:
public boolean removeAll ( java.util.Collection < ? > c ) { com.google.common.base.Preconditions.checkNotNull ( c ) ; return com.google.common.collect.Sets.removeAllImpl ( this , c.iterator ( ) ) ; }
Source:
public void buildString ( java.lang.StringBuilder builder ) { if ( builder == null ) { return ; } builder.append ( getTypeString ( ) ) . append ( "[" ) . append ( type ) . append ( "]" ) . append ( ", valInt=" ) . append ( valueInt ) . append ( ", valInt2=" ) . append ( valueInt2 ) . append ( ", valString=" ) . append ( valueString ) . append ( ", device=" ) . append ( device ) ; }

Target:
public void buildString ( java.lang.StringBuilder builder ) { if ( builder == null ) { return ; } builder.append ( getTypeString ( ) ) . append ( "[" ) . append ( type ) . append ( "]" ) . append ( ", valInt=" ) . append ( valueInt ) . append ( ", valInt2=" ) . append ( valueInt2 ) . append ( ", valString=" ) . append ( valueString ) . append ( ", valObject=" ) . append ( valueObject ) . append ( ", device=" ) . append ( device ) ; }
Source:
protected void finalize ( ) throws java.lang.Throwable { if ( ( mappedFile ) != null ) { mappedFile.close ( ) ; } super . finalize ( ) ; }

Target:
public void close ( ) { if ( ! ( closed ) ) { closed = true ; ids = null ; byteOffsets = null ; rawUtcOffsetsCache = null ; mappedFile = null ; cache.evictAll ( ) ; if ( ( mappedFile ) != null ) { try { mappedFile.close ( ) ; } catch ( android.system.ErrnoException ignored ) { } } } }
Source:
public android.net.Uri scanSingleFile ( java.lang.String path , java.lang.String volumeName , java.lang.String mimeType ) { try { initialize ( volumeName ) ; prescan ( path ) ; java.io.File file = new java.io.File ( path ) ; return mClient.doScanFile ( path , mimeType , file.lastModified ( ) , file.length ( ) , true ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.MediaScanner.TAG , "RemoteException in MediaScanner.scanFile()" , e ) ; return null ; } }

Target:
public android.net.Uri scanSingleFile ( java.lang.String path , java.lang.String volumeName , java.lang.String mimeType ) { try { initialize ( volumeName ) ; prescan ( path ) ; java.io.File file = new java.io.File ( path ) ; long lastModifiedSeconds = ( file.lastModified ( ) ) / 1000 ; return mClient.doScanFile ( path , mimeType , lastModifiedSeconds , file.length ( ) , true ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.MediaScanner.TAG , "RemoteException in MediaScanner.scanFile()" , e ) ; return null ; } }
Source:
public void stop ( ) throws java.io.IOException { if ( ( server ) != null ) { try { server.stop ( ) ; } catch ( java.lang.Exception e ) { com.google.api.client.repackaged.com.google.common.base.Throwables.propagateIfPossible ( e ) ; throw new java.io.IOException ( e ) ; } lock.lock ( ) ; try { error = "Request cancelled." ; code = null ; gotAuthorizationResponse.signal ( ) ; } finally { lock.unlock ( ) ; } server = null ; } }

Target:
public void stop ( ) throws java.io.IOException { if ( ( server ) != null ) { try { server.stop ( ) ; } catch ( java.lang.Exception e ) { com.google.api.client.repackaged.com.google.common.base.Throwables.propagateIfPossible ( e ) ; throw new java.io.IOException ( e ) ; } lock.lock ( ) ; try { error = com.google.gct.login.CancellableServerReceiver.REQUEST_CANCELLED_STRING ; code = null ; gotAuthorizationResponse.signal ( ) ; } finally { lock.unlock ( ) ; } server = null ; } }
Source:
public static com.intellij.execution.ui.ConsoleView createConsole ( @ org.jetbrains.annotations.NotNull final java.lang.String testFrameworkName , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.CommandLineState commandLineState , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.ModuleRunConfiguration config , @ org.jetbrains.annotations.NotNull final com.intellij.execution.Executor executor ) throws com.intellij.execution.ExecutionException { final com.intellij.execution.testframework.TestConsoleProperties consoleProperties = new com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties ( config , testFrameworkName , executor ) ; return com.google.gct.testing.results.GoogleCloudTestResultsConnectionUtil.createConsole ( testFrameworkName , consoleProperties , commandLineState.getEnvironment ( ) ) ; }

Target:
public static com.intellij.execution.ui.ConsoleView createAndAttachConsole ( @ org.jetbrains.annotations.NotNull final java.lang.String testFrameworkName , @ org.jetbrains.annotations.NotNull final com.intellij.execution.process.ProcessHandler processHandler , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.CommandLineState commandLineState , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.ModuleRunConfiguration config , @ org.jetbrains.annotations.NotNull final com.intellij.execution.Executor executor , @ org.jetbrains.annotations.NotNull final com.google.gct.testing.CloudMatrixExecutionCancellator matrixExecutionCancellator ) throws com.intellij.execution.ExecutionException { final com.intellij.execution.testframework.TestConsoleProperties consoleProperties = new com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties ( config , testFrameworkName , executor ) ; return com.google.gct.testing.results.GoogleCloudTestResultsConnectionUtil.createAndAttachConsole ( testFrameworkName , processHandler , consoleProperties , commandLineState.getEnvironment ( ) , matrixExecutionCancellator ) ; }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ; } return service.getState ( ) ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getConnectedDevices" ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return new java.util.ArrayList < > ( 0 ) ; } return service.getConnectedDevices ( ) ; }
Source:
public static < K , V1 , V2 > com.google.common.collect.Multimap < K , V2 > transformValues ( com.google.common.collect.Multimap < K , V1 > fromMultimap , final com.google.common.base.Function < ? super V1 , V2 > function ) { com.google.common.base.Preconditions.checkNotNull ( function ) ; com.google.common.collect.Maps.EntryTransformer < K , V1 , V2 > transformer = new com.google.common.collect.Maps.EntryTransformer < K , V1 , V2 > ( ) { @ java.lang.Override public V2 transformEntry ( K key , V1 value ) { return function.apply ( value ) ; } } ; return com.google.common.collect.Multimaps.transformEntries ( fromMultimap , transformer ) ; }

Target:
public java.util.Map < K , java.util.Collection < V > > asMap ( ) { java.util.Map < K , java.util.Collection < V > > result = map ; if ( result == null ) { result = map = java.util.Collections.unmodifiableMap ( com.google.common.collect.Maps.transformValues ( delegate.asMap ( ) , new com.google.common.base.Function < java.util.Collection < V > , java.util.Collection < V > > ( ) { @ java.lang.Override public java.util.Collection < V > apply ( java.util.Collection < V > collection ) { return com.google.common.collect.Multimaps.unmodifiableValueCollection ( collection ) ; } } ) ) ; } return result ; }
Source:
void reconfigureAgentAsDisconnected ( ) { if ( com.android.server.wifi.nan.WifiNanDataPathStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.nan.WifiNanDataPathStateManager.TAG , ( ( ( "WifiNanNetworkAgent.reconfigureAgentAsDisconnected: networkSpecifier=" + ( mNetworkSpecifier ) ) + ", ndpId=" ) + ( mNdpId ) ) ) ; } mNetworkInfo.setDetailedState ( NetworkInfo.DetailedState.DISCONNECTED , null , "" ) ; sendNetworkInfo ( mNetworkInfo ) ; }

Target:
void reconfigureAgentAsDisconnected ( ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( ( ( "WifiAwareNetworkAgent.reconfigureAgentAsDisconnected: networkSpecifier=" + ( mNetworkSpecifier ) ) + ", ndpId=" ) + ( mNdpId ) ) ) ; } mNetworkInfo.setDetailedState ( NetworkInfo.DetailedState.DISCONNECTED , null , "" ) ; sendNetworkInfo ( mNetworkInfo ) ; }
Source:
public void testGettersAndHandleUserSwitch ( ) { for ( android.net.wifi.WifiConfiguration config : com.android.server.wifi.ConfigurationMapTest.CONFIGS ) { org.junit.Assert.assertNull ( mConfigs.put ( config ) ) ; } verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; switchUser ( 10 ) ; verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; switchUser ( 11 ) ; verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; }

Target:
public void testGettersAndHandleUserSwitch ( ) { addNetworks ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; switchUser ( 10 ) ; addNetworks ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; switchUser ( 11 ) ; addNetworks ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; }
Source:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedPackage pkg , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findPackage ( pkg ) ; if ( c == null ) { return null ; } if ( ( c.annotations ) != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : c.annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }

Target:
public java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > getAnnotations ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedClass cls ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findClass ( cls ) ; if ( c == null ) { return null ; } return c.getAnnotations ( ) ; }
Source:
public boolean clearScores ( ) { if ( ( mNetworkScorerAppManager.isCallerActiveScorer ( getCallingUid ( ) ) ) || ( ( mContext.checkCallingOrSelfPermission ( permission.BROADCAST_NETWORK_PRIVILEGED ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { final long token = android.os.Binder.clearCallingIdentity ( ) ; try { clearInternal ( ) ; return true ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } else { throw new java.lang.SecurityException ( "Caller is neither the active scorer nor the scorer manager." ) ; } }

Target:
private boolean isCallerSystemUid ( ) { return ( mContext.checkCallingOrSelfPermission ( permission.REQUEST_NETWORK_SCORES ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; }
Source:
private static org.eclipse.core.runtime.IPath determineCommonRoot ( java.util.Collection < org.eclipse.jdt.core.IJavaProject > projects ) { org.eclipse.core.runtime.IPath commonRoot = null ; for ( org.eclipse.jdt.core.IJavaProject javaProject : projects ) { if ( commonRoot == null ) { commonRoot = javaProject.getProject ( ) . getLocation ( ) ; } else { commonRoot = com.android.ide.eclipse.adt.internal.wizards.exportgradle.BuildFileCreator.findCommonRoot ( commonRoot , javaProject.getProject ( ) . getLocation ( ) ) ; } } return commonRoot ; }

Target:
private static void appendBuildScript ( java.lang.StringBuilder builder ) { builder.append ( "buildscript {\n" ) ; builder.append ( " repositories {\n" ) ; builder.append ( ( ( " " + ( com.android.ide.eclipse.adt.internal.wizards.exportgradle.BuildFileCreator.MAVEN_REPOSITORY ) ) + "\n" ) ) ; builder.append ( " }\n" ) ; builder.append ( " dependencies {\n" ) ; builder.append ( ( ( " " + ( com.android.ide.eclipse.adt.internal.wizards.exportgradle.BuildFileCreator.PLUGIN_CLASSPATH ) ) + "\n" ) ) ; builder.append ( " }\n" ) ; builder.append ( "}\n" ) ; }
Source:
public void test_minus_Duration ( ) { java.time.Duration dur = java.time.Duration.ofSeconds ( 62 , 3 ) ; java.time.OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus ( dur ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2008 , 6 , 30 , 11 , 29 , 57 , 497 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }

Target:
public void test_minus_Duration ( ) { java.time.Duration dur = java.time.Duration.ofSeconds ( 62 , 3 ) ; java.time.OffsetDateTime t = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.minus ( dur ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2008 , 6 , 30 , 11 , 29 , 57 , 497 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }
Source:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Throwable thrown ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr , bundleName ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Object [ ] params ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }
Source:
protected void close ( ) { if ( ( ( mSources ) != null ) && ( ( mSourcesChangeListener ) != null ) ) { mSources.removeChangeListener ( mSourcesChangeListener ) ; } super . close ( ) ; }

Target:
protected void close ( ) { if ( ( ( mSources ) != null ) && ( ( mSourcesChangeListener ) != null ) ) { mSources.removeChangeListener ( mSourcesChangeListener ) ; } com.android.sdklib.internal.repository.SdkSourceProperties p = new com.android.sdklib.internal.repository.SdkSourceProperties ( ) ; p.save ( ) ; super . close ( ) ; }
Source:
public void run ( ) { android.widget.ImageView imageView = ( ( android.widget.ImageView ) ( activity.findViewById ( R.id.imageview ) ) ) ; imageView.setBackgroundResource ( R.drawable.animationdrawable ) ; mAnimationDrawable = ( ( android.graphics.drawable.AnimationDrawable ) ( imageView.getBackground ( ) ) ) ; }

Target:
public void run ( ) { android.widget.ImageView imageView = ( ( android.widget.ImageView ) ( activity.findViewById ( R.id.imageview ) ) ) ; imageView.setBackgroundResource ( R.drawable.animationdrawable ) ; mAnimationDrawable = ( ( android.graphics.drawable.AnimationDrawable ) ( imageView.getBackground ( ) ) ) ; mInitialOneShotValue = mAnimationDrawable.isOneShot ( ) ; }
Source:
public void schedule ( java.util.TimerTask task , java.util.Date when ) { if ( ( when.getTime ( ) ) < 0 ) { throw new java.lang.IllegalArgumentException ( ) ; } long delay = ( when.getTime ( ) ) - ( java.lang.System.currentTimeMillis ( ) ) ; scheduleImpl ( task , ( delay < 0 ? 0 : delay ) , ( - 1 ) , false ) ; }

Target:
public void schedule ( java.util.TimerTask task , java.util.Date when ) { if ( ( when.getTime ( ) ) < 0 ) { throw new java.lang.IllegalArgumentException ( ( "when < 0: " + ( when.getTime ( ) ) ) ) ; } long delay = ( when.getTime ( ) ) - ( java.lang.System.currentTimeMillis ( ) ) ; scheduleImpl ( task , ( delay < 0 ? 0 : delay ) , ( - 1 ) , false ) ; }
Source:
private void disposeLibraryProject ( java.lang.String libName ) { org.eclipse.core.resources.IPathVariableManager pathVarMgr = org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) . getPathVariableManager ( ) ; final java.lang.String varName = getLibraryVariableName ( libName ) ; try { pathVarMgr.setValue ( varName , null ) ; } catch ( org.eclipse.core.runtime.CoreException e ) { java.lang.String message = java.lang.String.format ( "Unable to remove linked path var '%1$s'" , varName ) ; com.android.ide.eclipse.adt.AdtPlugin.log ( e , message ) ; } }

Target:
private void disposeLibraryProject ( java.lang.String projectName ) { org.eclipse.core.resources.IPathVariableManager pathVarMgr = org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) . getPathVariableManager ( ) ; final java.lang.String varName = getLibraryVariableName ( projectName ) ; try { pathVarMgr.setValue ( varName , null ) ; } catch ( org.eclipse.core.runtime.CoreException e ) { java.lang.String message = java.lang.String.format ( "Unable to remove linked path var '%1$s'" , varName ) ; com.android.ide.eclipse.adt.AdtPlugin.log ( e , message ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { mContentResolver = android.support.test.InstrumentationRegistry.getContext ( ) . getContentResolver ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mContentResolver = android.support.test.InstrumentationRegistry.getContext ( ) . getContentResolver ( ) ; mPackageManager = android.support.test.InstrumentationRegistry.getContext ( ) . getPackageManager ( ) ; mHasCellular = mPackageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ; if ( ! ( mHasCellular ) ) { android.util.Log.e ( android.carrierapi.cts.ApnDatabaseTest.TAG , "No cellular support, all tests will be skipped." ) ; } }
Source:
public void testDebugContextI ( ) { setupDebugContext ( ) ; Soob.invoke_write_i ( 7 , 1 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Soob.invoke_write_i ( 9 , 0 ) ; mRS.finish ( ) ; } Soob.destroy ( ) ; assertTrue ( mRanErrorHandler ) ; checkForErrors ( ) ; }

Target:
public void testDebugContextI ( ) { setupDebugContext ( ) ; Soob.invoke_write_i ( 7 , 1 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Soob.invoke_write_i ( 9 , 0 ) ; mRS.finish ( ) ; } Soob.invoke_send_msg ( ) ; waitForMessage ( ) ; Soob.destroy ( ) ; assertTrue ( mRanErrorHandler ) ; checkForErrors ( ) ; }
Source:
public void exiting ( java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.Object result ) { if ( ( java.util.logging.Level.FINER.intValue ( ) ) < ( levelValue ) ) { return ; } java.lang.Object [ ] params = new java.lang.Object [ ] { result } ; logp ( java.util.logging.Level.FINER , sourceClass , sourceMethod , "RETURN {0}" , result ) ; }

Target:
public void warning ( java.util.function.Supplier < java.lang.String > msgSupplier ) { log ( java.util.logging.Level.WARNING , msgSupplier ) ; }
Source:
public final void addClass ( long id , com.android.tools.perflib.heap.ClassObj theClass ) { mClassesById.put ( id , theClass ) ; mClassesByName.put ( theClass.mClassName , theClass ) ; }

Target:
public final void dumpSizes ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int size = 0 ; for ( com.android.tools.perflib.heap.Instance instance : theClass.mInstances ) { size += instance.getCompositeSize ( ) ; } if ( size > 0 ) { java.lang.System.out.println ( ( ( ( ( theClass + ": base " ) + ( theClass.getSize ( ) ) ) + ", composite " ) + size ) ) ; } } }
Source:
public final byte [ ] getIV ( ) { return spiImpl.engineGetIV ( ) ; }

Target:
private javax.crypto.CipherSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( spiImpl ) != null ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.Cipher.tryCombinations ( key , provider , transformParts ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( transformation ) ) ) ; } spiImpl = ( ( javax.crypto.CipherSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; try { serverSocket.close ( ) ; } catch ( java.lang.Exception e ) { } try { client.close ( ) ; } catch ( java.lang.Exception e ) { } try { server.close ( ) ; } catch ( java.lang.Exception e ) { } }

Target:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; try { serverSocket.close ( ) ; } catch ( java.lang.Exception ignored ) { } try { client.close ( ) ; } catch ( java.lang.Exception ignored ) { } try { server.close ( ) ; } catch ( java.lang.Exception ignored ) { } }
Source:
public static void checkStructure ( @ javax.annotation.CheckForNull java.io.File [ ] bootclasspath , @ javax.annotation.CheckForNull java.io.File [ ] classpath , @ javax.annotation.Nonnull java.io.File fileOrSourceList , boolean withDebugInfo ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( bootclasspath , classpath , fileOrSourceList , withDebugInfo , false , 0.0F , ( ( com.android.jack.JarJarRules ) ( null ) ) , ( ( com.android.jack.ProguardFlags [ ] ) ( null ) ) ) ; }

Target:
public static com.android.jack.Options buildCommandLineArgs ( @ javax.annotation.CheckForNull java.io.File [ ] classpath , @ javax.annotation.Nonnull java.io.File fileOrSourcelist ) throws java.io.IOException { return com.android.jack.TestTools.buildCommandLineArgs ( classpath , new java.io.File [ ] { fileOrSourcelist } ) ; }
Source:
public void onResume ( ) { super . onResume ( ) ; loadInstalledServices ( ) ; updateAllPreferences ( ) ; if ( ( mServicesCategory.getPreference ( 0 ) ) == ( mNoServicesMessagePreference ) ) { offerInstallAccessibilitySerivceOnce ( ) ; } mSettingsPackageMonitor.register ( getActivity ( ) , false ) ; }

Target:
public void onPause ( ) { mSettingsPackageMonitor.unregister ( ) ; com.android.internal.view.RotationPolicy.unregisterRotationPolicyListener ( getActivity ( ) , mRotationPolicyListener ) ; super . onPause ( ) ; }
Source:
public void enableSaveConfig ( ) { doBooleanCommand ( "SET update_config 1" ) ; }

Target:
public boolean stopFilteringMulticastV4Packets ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.addRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V4_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) ; } else { return ( ( doBooleanCommand ( "DRIVER RXFILTER-STOP" ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-ADD 2" ) ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-START" ) ) ; } }
Source:
private int pixelFormatForCameraFormat ( java.lang.String format ) { if ( format == null ) return android.graphics.ImageFormat.UNKNOWN ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422SP ) ) return android.graphics.ImageFormat.NV16 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV420SP ) ) return android.graphics.ImageFormat.NV21 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422I ) ) return android.graphics.ImageFormat.YUY2 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_RGB565 ) ) return android.graphics.ImageFormat.RGB_565 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_JPEG ) ) return android.graphics.ImageFormat.JPEG ; return android.graphics.ImageFormat.UNKNOWN ; }

Target:
private int pixelFormatForCameraFormat ( java.lang.String format ) { if ( format == null ) return android.graphics.ImageFormat.UNKNOWN ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422SP ) ) return android.graphics.ImageFormat.NV16 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV420SP ) ) return android.graphics.ImageFormat.NV21 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422I ) ) return android.graphics.ImageFormat.YUY2 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV420P ) ) return android.graphics.ImageFormat.YV12 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_RGB565 ) ) return android.graphics.ImageFormat.RGB_565 ; if ( format.equals ( android.hardware.Camera.Parameters.PIXEL_FORMAT_JPEG ) ) return android.graphics.ImageFormat.JPEG ; return android.graphics.ImageFormat.UNKNOWN ; }
Source:
public void run ( ) { selectDropped ( nodes ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage outlinePage = mCanvas.getOutlinePage ( ) ; org.eclipse.ui.IWorkbenchPartSite site = outlinePage.getEditor ( ) . getSite ( ) ; org.eclipse.jface.viewers.ISelectionProvider selectionProvider = site.getSelectionProvider ( ) ; org.eclipse.jface.viewers.ISelection selection = selectionProvider.getSelection ( ) ; if ( selection != null ) { outlinePage.setSelection ( selection ) ; } }

Target:
public void run ( ) { selectDropped ( nodes ) ; syncOutlineSelection ( ) ; }
Source:
public static com.google.common.base.CharMatcher inRange ( final char startInclusive , final char endInclusive ) { com.google.common.base.Preconditions.checkArgument ( ( endInclusive >= startInclusive ) ) ; java.lang.String description = new java.lang.StringBuilder ( "CharMatcher.inRange(" ) . append ( java.lang.Integer.toHexString ( startInclusive ) ) . append ( ", " ) . append ( java.lang.Integer.toHexString ( endInclusive ) ) . append ( ")" ) . toString ( ) ; return com.google.common.base.CharMatcher.inRange ( startInclusive , endInclusive , description ) ; }

Target:
public static com.google.common.base.CharMatcher inRange ( final char startInclusive , final char endInclusive ) { com.google.common.base.Preconditions.checkArgument ( ( endInclusive >= startInclusive ) ) ; java.lang.String description = ( ( ( "CharMatcher.inRange('" + ( com.google.common.base.CharMatcher.showCharacter ( startInclusive ) ) ) + "', '" ) + ( com.google.common.base.CharMatcher.showCharacter ( endInclusive ) ) ) + "')" ; return com.google.common.base.CharMatcher.inRange ( startInclusive , endInclusive , description ) ; }
Source:
private static void appendServiceLocked ( java.lang.String key , java.security.Provider.Service service ) { java.util.ArrayList < java.security.Provider.Service > serviceList = org.apache.harmony.security.fortress.Services.services.get ( key ) ; if ( serviceList == null ) { serviceList = new java.util.ArrayList < java.security.Provider.Service > ( 1 ) ; org.apache.harmony.security.fortress.Services.services.put ( key , serviceList ) ; } serviceList.add ( service ) ; }

Target:
public static synchronized java.util.ArrayList < java.security.Provider.Service > getServices ( java.lang.String type , java.lang.String algorithm ) { java.util.ArrayList < java.security.Provider.Service > services = null ; for ( java.security.Provider p : org.apache.harmony.security.fortress.Services.providers ) { java.security.Provider.Service s = p.getService ( type , algorithm ) ; if ( s != null ) { if ( services == null ) { services = new java.util.ArrayList < > ( org.apache.harmony.security.fortress.Services.providers.size ( ) ) ; } services.add ( s ) ; } } return services ; }
Source:
private static com.android.tools.lint.client.api.JavaParser.ResolvedClass createClass ( java.lang.String name ) { com.android.tools.lint.client.api.JavaParser.ResolvedClass mock = org.easymock.EasyMock.createMock ( com.android.tools.lint.client.api.JavaParser.ResolvedClass.class ) ; org.easymock.EasyMock.expect ( mock.getName ( ) ) . andReturn ( name ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( mock.getSignature ( ) ) . andReturn ( name ) . anyTimes ( ) ; org.easymock.EasyMock.replay ( mock ) ; return mock ; }

Target:
private static com.android.tools.lint.client.api.JavaParser.ResolvedClass createClass ( java.lang.String name ) { com.android.tools.lint.client.api.JavaParser.ResolvedClass mock = org.mockito.Mockito.mock ( com.android.tools.lint.client.api.JavaParser.ResolvedClass.class ) ; org.mockito.Mockito.when ( mock.getName ( ) ) . thenReturn ( name ) ; org.mockito.Mockito.when ( mock.getSignature ( ) ) . thenReturn ( name ) ; return mock ; }
Source:
boolean isNumberPossibleForDesc ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc ) { java.util.regex.Matcher possibleNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.getPossibleNumberPattern ( ) ) . matcher ( nationalNumber ) ; return possibleNumberPatternMatcher.matches ( ) ; }

Target:
boolean isNumberMatchingDesc ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc ) { int actualLength = nationalNumber.length ( ) ; java.util.List < java.lang.Integer > possibleLengths = numberDesc.getPossibleLengthList ( ) ; if ( ( ( possibleLengths.size ( ) ) > 0 ) && ( ! ( possibleLengths.contains ( actualLength ) ) ) ) { return false ; } java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.getNationalNumberPattern ( ) ) . matcher ( nationalNumber ) ; return nationalNumberPatternMatcher.matches ( ) ; }
Source:
private static com.android.jack.ir.ast.JClass getClassOrReportFailure ( com.android.jack.lookup.JNodeLookup lookup , java.lang.String name , com.android.sched.util.config.id.PropertyId < java.lang.String > prop ) { try { return lookup.getClass ( name ) ; } catch ( java.lang.Throwable e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , new com.android.jack.transformations.ast.BoostLockedRegionPriority.BadBoostLockedRegionPriorityConfigurationException ( prop , e ) ) ; com.android.jack.Jack.getSession ( ) . abortEventually ( ) ; return null ; } }

Target:
private static com.android.jack.ir.ast.JClass getClassOrReportFailure ( com.android.jack.lookup.JNodeLookup lookup , java.lang.String name , com.android.sched.util.config.id.PropertyId < java.lang.String > prop ) { try { return lookup.getClass ( name ) ; } catch ( java.lang.Throwable e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , new com.android.jack.transformations.ast.BoostLockedRegionPriority.BadBoostLockedRegionPriorityConfigurationException ( prop , e ) ) ; com.android.jack.Jack.getSession ( ) . setAbortEventually ( true ) ; return null ; } }