auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static java.lang.Class < ? > findExpectedType ( java.lang.Class < ? > fromClass ) { for ( java.lang.Class < ? > c = fromClass ; c != ( java.lang.Object.class ) ; c = c.getSuperclass ( ) ) { for ( java.lang.reflect.Method method : org.junit.internal.MethodSorter.getDeclaredMethods ( c ) ) { if ( org.junit.internal.matchers.TypeSafeMatcher.isMatchesSafelyMethod ( method ) ) { return method.getParameterTypes ( ) [ 0 ] ; } } } throw new java.lang.Error ( "Cannot determine correct type for matchesSafely() method." ) ; }

Target:
private static java.lang.Class < ? > findExpectedType ( java.lang.Class < ? > fromClass ) { for ( java.lang.Class < ? > c = fromClass ; c != ( java.lang.Object.class ) ; c = c.getSuperclass ( ) ) { for ( java.lang.reflect.Method method : c.getDeclaredMethods ( ) ) { if ( org.junit.internal.matchers.TypeSafeMatcher.isMatchesSafelyMethod ( method ) ) { return method.getParameterTypes ( ) [ 0 ] ; } } } throw new java.lang.Error ( "Cannot determine correct type for matchesSafely() method." ) ; }
Source:
public void compileFrameworks ( ) throws java.lang.Exception { java.io.File outDexFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) ; toolchain.addProperty ( DexFileWriter.DEX_WRITING_POLICY.getName ( ) , "multidex" ) ; toolchain.addToClasspath ( com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.BOOTCLASSPATH ) . addToClasspath ( com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.CLASSPATH ) . srcToExe ( outDexFolder , false , com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.SOURCELIST ) ; }

Target:
public void compileFrameworks ( ) throws java.lang.Exception { java.io.File outDexFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) ; toolchain.addProperty ( DexFileWriter.DEX_WRITING_POLICY.getName ( ) , "multidex" ) ; toolchain.addToClasspath ( com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.CLASSPATH ) . srcToExe ( outDexFolder , false , com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.SOURCELIST ) ; }
Source:
protected void engineInitSign ( java.security.PrivateKey privateKey ) throws java.security.InvalidKeyException { org.bouncycastle.crypto.CipherParameters param ; param = org.bouncycastle.jcajce.provider.asymmetric.dsa.DSAUtil.generatePrivateKeyParameter ( privateKey ) ; org.bouncycastle.crypto.params.DSAParameters dsaParam = ( ( org.bouncycastle.crypto.params.DSAKeyParameters ) ( param ) ) . getParameters ( ) ; checkKey ( dsaParam ) ; if ( ( random ) != null ) { param = new org.bouncycastle.crypto.params.ParametersWithRandom ( param , random ) ; } digest.reset ( ) ; signer.init ( true , param ) ; }

Target:
protected void engineInitSign ( java.security.PrivateKey privateKey ) throws java.security.InvalidKeyException { org.bouncycastle.crypto.CipherParameters param = org.bouncycastle.jcajce.provider.asymmetric.dsa.DSAUtil.generatePrivateKeyParameter ( privateKey ) ; org.bouncycastle.crypto.params.DSAParameters dsaParam = ( ( org.bouncycastle.crypto.params.DSAKeyParameters ) ( param ) ) . getParameters ( ) ; checkKey ( dsaParam ) ; if ( ( random ) != null ) { param = new org.bouncycastle.crypto.params.ParametersWithRandom ( param , random ) ; } digest.reset ( ) ; signer.init ( true , param ) ; }
Source:
private static void onPublishTerminated ( int publishId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onPublishTerminated: publishId=" + publishId ) + ", status=" ) + status ) ) ; com.android.server.wifi.aware.WifiAwareNative.sWifiAwareStateManager.onSessionTerminatedNotification ( publishId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.DiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.DiscoverySessionCallback.TERMINATE_REASON_FAIL ) , true ) ; }

Target:
private static void onPublishTerminated ( int publishId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onPublishTerminated: publishId=" + publishId ) + ", status=" ) + status ) ) ; com.android.server.wifi.aware.WifiAwareNative.sWifiAwareStateManager.onSessionTerminatedNotification ( publishId , status , true ) ; }
Source:
public void testKernelDomain ( ) throws com.android.tradefed.device.DeviceNotAvailableException { java.lang.String domain = "u:r:kernel:s0" ; java.util.List < android.cts.security.SELinuxHostTest.ProcessDetails > procs = android.cts.security.SELinuxHostTest.ProcessDetails.getProcMap ( mDevice ) . get ( domain ) ; assertNotNull ( procs ) ; for ( android.cts.security.SELinuxHostTest.ProcessDetails p : procs ) { assertTrue ( ( ( "Non Kernel thread \"" + p ) + "\" found!" ) , p.isKernel ( ) ) ; } }

Target:
public void testKernelDomain ( ) throws com.android.tradefed.device.DeviceNotAvailableException { java.lang.String domain = "u:r:kernel:s0" ; java.util.List < android.cts.security.SELinuxHostTest.ProcessDetails > procs = android.cts.security.SELinuxHostTest.ProcessDetails.getProcMap ( mDevice ) . get ( domain ) ; for ( android.cts.security.SELinuxHostTest.ProcessDetails p : procs ) { assertTrue ( ( ( "Non Kernel thread \"" + p ) + "\" found!" ) , p.isKernel ( ) ) ; } }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , byte [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , data.length ) ; }

Target:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , long [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 8 ) ) ; }
Source:
public void test_get_put ( ) throws java.lang.Exception { libcore.java.net.OldCookieHandlerTest.MockCookieHandler mch = new libcore.java.net.OldCookieHandlerTest.MockCookieHandler ( ) ; java.net.CookieHandler defaultHandler = java.net.CookieHandler.getDefault ( ) ; try { java.net.CookieHandler.setDefault ( mch ) ; com.google.mockwebserver.MockWebServer server = new com.google.mockwebserver.MockWebServer ( ) ; server.play ( ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . addHeader ( ( ( ( ( ( ( ( ( ( ( "Set-Cookie2: a=\"android\"; " + ( ( ( "Comment=\"this cookie is delicious\"; " + "CommentURL=\"http://google.com/\"; " ) + "Discard; " ) + "Domain=\"" ) ) + ( server.getCookieDomain ( ) ) ) + "\"; " ) + "Max-Age=\"60\"; " ) + "Path=\"/path\"; " ) + "Port=\"80,443," ) + ( server.getPort ( ) ) ) + "\"; " ) + "Secure; " ) + "Version=\"1\"" ) ) ) ; java.net.URLConnection connection = server.getUrl ( "/path/foo" ) . openConnection ( ) ; connection.getContent ( ) ; assertTrue ( mch.wasGetCalled ( ) ) ; assertTrue ( mch.wasPutCalled ( ) ) ; } finally { java.net.CookieHandler.setDefault ( defaultHandler ) ; } }

Target:
public void test_get_put ( ) throws java.lang.Exception { libcore.java.net.OldCookieHandlerTest.MockCookieHandler mch = new libcore.java.net.OldCookieHandlerTest.MockCookieHandler ( ) ; java.net.CookieHandler defaultHandler = java.net.CookieHandler.getDefault ( ) ; try { java.net.CookieHandler.setDefault ( mch ) ; server.play ( ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . addHeader ( ( ( ( ( ( ( ( ( ( ( "Set-Cookie2: a=\"android\"; " + ( ( ( "Comment=\"this cookie is delicious\"; " + "CommentURL=\"http://google.com/\"; " ) + "Discard; " ) + "Domain=\"" ) ) + ( server.getCookieDomain ( ) ) ) + "\"; " ) + "Max-Age=\"60\"; " ) + "Path=\"/path\"; " ) + "Port=\"80,443," ) + ( server.getPort ( ) ) ) + "\"; " ) + "Secure; " ) + "Version=\"1\"" ) ) ) ; java.net.URLConnection connection = server.getUrl ( "/path/foo" ) . openConnection ( ) ; connection.getContent ( ) ; assertTrue ( mch.wasGetCalled ( ) ) ; assertTrue ( mch.wasPutCalled ( ) ) ; } finally { java.net.CookieHandler.setDefault ( defaultHandler ) ; } }
Source:
protected int startServer ( java.lang.String name ) { int portNumber = tests.support.Support_PortManager.getNextPort ( ) ; try { ss = new java.net.ServerSocket ( portNumber ) ; } catch ( java.io.IOException e ) { fail ( ( ( name + ": " ) + e ) ) ; } return ss.getLocalPort ( ) ; }

Target:
protected int startServer ( java.lang.String name ) { try { ss = new java.net.ServerSocket ( 0 ) ; } catch ( java.io.IOException e ) { fail ( ( ( name + ": " ) + e ) ) ; } return ss.getLocalPort ( ) ; }
Source:
private javax.net.ssl.SSLEngine getEngine ( java.lang.String host , int port ) { javax.net.ssl.SSLContext context = null ; try { context = javax.net.ssl.SSLContext.getInstance ( "TLS" ) ; context.init ( null , null , null ) ; } catch ( java.security.KeyManagementException e ) { fail ( ( "Could not get SSLEngine: key management exception " + ( e.getMessage ( ) ) ) ) ; } catch ( java.security.NoSuchAlgorithmException e ) { fail ( ( "Could not get SSLEngine: no such algorithm " + ( e.getMessage ( ) ) ) ) ; } return context.createSSLEngine ( host , port ) ; }

Target:
private javax.net.ssl.SSLEngine getEngine ( ) throws java.lang.Exception { javax.net.ssl.SSLContext context = javax.net.ssl.SSLContext.getInstance ( "TLS" ) ; context.init ( null , null , null ) ; return context.createSSLEngine ( ) ; }
Source:
private java.lang.String joinWithCommaAndCapitalize ( java.lang.String reformatNotification , java.lang.String rearrangeNotification ) { java.lang.String firstNotificationLine = ( reformatNotification != null ) ? reformatNotification : rearrangeNotification ; if ( ( reformatNotification != null ) && ( rearrangeNotification != null ) ) { firstNotificationLine += ", " + rearrangeNotification ; } firstNotificationLine = com.intellij.openapi.util.text.StringUtil.capitalize ( firstNotificationLine ) ; return firstNotificationLine ; }

Target:
private static java.lang.String joinWithCommaAndCapitalize ( java.lang.String reformatNotification , java.lang.String rearrangeNotification ) { java.lang.String firstNotificationLine = ( reformatNotification != null ) ? reformatNotification : rearrangeNotification ; if ( ( reformatNotification != null ) && ( rearrangeNotification != null ) ) { firstNotificationLine += ", " + rearrangeNotification ; } firstNotificationLine = com.intellij.openapi.util.text.StringUtil.capitalize ( firstNotificationLine ) ; return firstNotificationLine ; }
Source:
static java.lang.String getResourceArg ( org.w3c.dom.Node method , org.w3c.dom.Node call , int argIndex ) { assert ( call instanceof lombok.ast.MethodInvocation ) || ( call instanceof lombok.ast.ConstructorInvocation ) ; com.android.tools.lint.checks.StringFormatDetector.StringTracker tracker = new com.android.tools.lint.checks.StringFormatDetector.StringTracker ( null , method , call , argIndex ) ; method.accept ( tracker ) ; java.lang.String name = tracker.getFormatStringName ( ) ; return name ; }

Target:
public static java.lang.String getResourceArg ( @ com.android.annotations.NonNull org.w3c.dom.Node method , @ com.android.annotations.NonNull org.w3c.dom.Node call , int argIndex ) { assert ( call instanceof lombok.ast.MethodInvocation ) || ( call instanceof lombok.ast.ConstructorInvocation ) ; com.android.tools.lint.checks.StringFormatDetector.StringTracker tracker = new com.android.tools.lint.checks.StringFormatDetector.StringTracker ( null , method , call , argIndex ) ; method.accept ( tracker ) ; return tracker.getFormatStringName ( ) ; }
Source:
public org.w3c.dom.Document getProjectDocument ( ) throws java.io.IOException { if ( ( mProjectDoc ) == null ) { java.io.File file = new java.io.File ( mDir , com.android.tools.gradle.eclipse.GradleImport.ECLIPSE_DOT_PROJECT ) ; if ( file.exists ( ) ) { mProjectDoc = com.android.tools.gradle.eclipse.GradleImport.getXmlDocument ( file , false ) ; } else { mImporter.reportError ( this , mDir , ( "No Eclipse .project file found in " + ( mDir.getPath ( ) ) ) ) ; return null ; } } return mProjectDoc ; }

Target:
public org.w3c.dom.Document getProjectDocument ( ) throws java.io.IOException { if ( ( mProjectDoc ) == null ) { java.io.File file = new java.io.File ( mDir , com.android.tools.gradle.eclipse.GradleImport.ECLIPSE_DOT_PROJECT ) ; if ( file.exists ( ) ) { mProjectDoc = mImporter.getXmlDocument ( file , false ) ; } else { mImporter.reportError ( this , mDir , ( "No Eclipse .project file found in " + ( mDir.getPath ( ) ) ) ) ; return null ; } } return mProjectDoc ; }
Source:
public void setDefaults ( org.eclipse.debug.core.ILaunchConfigurationWorkingCopy configuration ) { configuration.setAttribute ( LaunchConfigDelegate.ATTR_TARGET_MODE , LaunchConfigDelegate.DEFAULT_TARGET_MODE.getValue ( ) ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_SPEED , LaunchConfigDelegate.DEFAULT_SPEED ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_DELAY , LaunchConfigDelegate.DEFAULT_DELAY ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_WIPE_DATA , LaunchConfigDelegate.DEFAULT_WIPE_DATA ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_NO_BOOT_ANIM , LaunchConfigDelegate.DEFAULT_NO_BOOT_ANIM ) ; org.eclipse.jface.preference.IPreferenceStore store = com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . getPreferenceStore ( ) ; java.lang.String emuOptions = store.getString ( AdtPrefs.PREFS_EMU_OPTIONS ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_COMMANDLINE , emuOptions ) ; }

Target:
public void setDefaults ( org.eclipse.debug.core.ILaunchConfigurationWorkingCopy configuration ) { configuration.setAttribute ( LaunchConfigDelegate.ATTR_TARGET_MODE , LaunchConfigDelegate.DEFAULT_TARGET_MODE.toString ( ) ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_SPEED , LaunchConfigDelegate.DEFAULT_SPEED ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_DELAY , LaunchConfigDelegate.DEFAULT_DELAY ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_WIPE_DATA , LaunchConfigDelegate.DEFAULT_WIPE_DATA ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_NO_BOOT_ANIM , LaunchConfigDelegate.DEFAULT_NO_BOOT_ANIM ) ; org.eclipse.jface.preference.IPreferenceStore store = com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . getPreferenceStore ( ) ; java.lang.String emuOptions = store.getString ( AdtPrefs.PREFS_EMU_OPTIONS ) ; configuration.setAttribute ( LaunchConfigDelegate.ATTR_COMMANDLINE , emuOptions ) ; }
Source:
public void propertyChange ( org.eclipse.core.runtime.Preferences.PropertyChangeEvent event ) { com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.getPrefs ( ) . loadValues ( event ) ; if ( AdtPrefs.PREFS_SDK_DIR.equals ( event.getProperty ( ) ) ) { com.android.ide.eclipse.ddms.DdmsPlugin.setAdb ( com.android.ide.eclipse.adt.AdtPlugin.getOsAbsoluteAdb ( ) , true ) ; com.android.ide.eclipse.hierarchyviewer.HierarchyViewerPlugin.setAdb ( com.android.ide.eclipse.adt.AdtPlugin.getOsAbsoluteAdb ( ) , true ) ; if ( checkSdkLocationAndId ( ) ) { reparseSdk ( ) ; } } }

Target:
public void propertyChange ( org.eclipse.core.runtime.Preferences.PropertyChangeEvent event ) { com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.getPrefs ( ) . loadValues ( event ) ; if ( AdtPrefs.PREFS_SDK_DIR.equals ( event.getProperty ( ) ) ) { com.android.ide.eclipse.ddms.DdmsPlugin.setAdb ( com.android.ide.eclipse.adt.AdtPlugin.getOsAbsoluteAdb ( ) , true ) ; if ( checkSdkLocationAndId ( ) ) { reparseSdk ( ) ; } } }
Source:
static com.android.server.IpSecService create ( android.content.Context context , java.lang.String socket ) throws java.lang.InterruptedException { final com.android.server.IpSecService service = new com.android.server.IpSecService ( context , socket ) ; final java.util.concurrent.CountDownLatch connectedSignal = service.mConnectedSignal ; if ( com.android.server.IpSecService.DBG ) android.util.Log.d ( com.android.server.IpSecService.TAG , "Creating IpSecService" ) ; service.mThread.start ( ) ; if ( com.android.server.IpSecService.DBG ) android.util.Log.d ( com.android.server.IpSecService.TAG , "Awaiting socket connection" ) ; connectedSignal.await ( ) ; if ( com.android.server.IpSecService.DBG ) android.util.Log.d ( com.android.server.IpSecService.TAG , "Connected" ) ; service.connectNativeNetdService ( ) ; return service ; }

Target:
static com.android.server.IpSecService create ( android.content.Context context ) throws java.lang.InterruptedException { final com.android.server.IpSecService service = new com.android.server.IpSecService ( context ) ; service.connectNativeNetdService ( ) ; return service ; }
Source:
protected boolean notifySignalStrength ( ) { boolean notified = false ; if ( ! ( mSignalStrength.equals ( mLastSignalStrength ) ) ) { try { mPhone.notifySignalStrength ( ) ; notified = true ; } catch ( java.lang.NullPointerException ex ) { loge ( ( ( "updateSignalStrength() Phone already destroyed: " + ex ) + "SignalStrength not notified" ) ) ; } } return notified ; }

Target:
protected boolean notifySignalStrength ( ) { boolean notified = false ; if ( ! ( mSignalStrength.equals ( mLastSignalStrength ) ) ) { try { mPhone.notifySignalStrength ( ) ; notified = true ; mLastSignalStrength = mSignalStrength ; } catch ( java.lang.NullPointerException ex ) { loge ( ( ( "updateSignalStrength() Phone already destroyed: " + ex ) + "SignalStrength not notified" ) ) ; } } return notified ; }
Source:
private void handleGroupCreationFailure ( ) { resetWifiP2pInfo ( ) ; mNetworkInfo.setDetailedState ( NetworkInfo.DetailedState.FAILED , null , null ) ; sendP2pConnectionChangedBroadcast ( ) ; boolean peersChanged = mPeers.remove ( mPeersLostDuringConnection ) ; if ( ( ( android.text.TextUtils.isEmpty ( mSavedPeerConfig.deviceAddress ) ) == false ) && ( ( mPeers.remove ( mSavedPeerConfig.deviceAddress ) ) != null ) ) { peersChanged = true ; } if ( peersChanged ) { sendPeersChangedBroadcast ( ) ; } mPeersLostDuringConnection.clear ( ) ; mServiceDiscReqId = null ; sendMessage ( WifiP2pManager.DISCOVER_PEERS ) ; }

Target:
private void handleGroupCreationFailure ( ) { resetWifiP2pInfo ( ) ; mNetworkInfo.setDetailedState ( NetworkInfo.DetailedState.FAILED , null , null ) ; sendP2pConnectionChangedBroadcast ( ) ; boolean peersChanged = mPeers.remove ( mPeersLostDuringConnection ) ; if ( ( ! ( android.text.TextUtils.isEmpty ( mSavedPeerConfig.deviceAddress ) ) ) && ( ( mPeers.remove ( mSavedPeerConfig.deviceAddress ) ) != null ) ) { peersChanged = true ; } if ( peersChanged ) { sendPeersChangedBroadcast ( ) ; } mPeersLostDuringConnection.clear ( ) ; mServiceDiscReqId = null ; sendMessage ( WifiP2pManager.DISCOVER_PEERS ) ; }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction withIndex ( int newFirstIndex , int newSecondIndex ) { assert ( getSecondIndexType ( ) ) == ( com.android.jack.dx.io.IndexType.NONE ) ; return new com.android.jack.dx.io.instructions.ThreeRegisterDecodedInstruction ( getFormat ( ) , getOpcode ( ) , newFirstIndex , getFirstIndexType ( ) , getTarget ( ) , getLiteral ( ) , a , b , c ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction withIndex ( int newFirstIndex , int newSecondIndex ) { return new com.android.jack.dx.io.instructions.ThreeRegisterDecodedInstruction ( getFormat ( ) , getOpcode ( ) , newFirstIndex , getFirstIndexType ( ) , getTarget ( ) , getLiteral ( ) , a , b , c , newSecondIndex , getSecondIndexType ( ) ) ; }
Source:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String protectionLevel = attribute.getValue ( ) ; if ( ( protectionLevel != null ) && ( protectionLevel.equals ( com.android.tools.lint.checks.SignatureOrSystemDetector.SIGNATURE_OR_SYSTEM ) ) ) { java.lang.String message = "`protectionLevel` should probably not be set to `signatureOrSystem`" ; context.report ( com.android.tools.lint.checks.SignatureOrSystemDetector.ISSUE , attribute , context.getLocation ( attribute ) , message , null ) ; } }

Target:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String protectionLevel = attribute.getValue ( ) ; if ( ( protectionLevel != null ) && ( protectionLevel.equals ( com.android.tools.lint.checks.SignatureOrSystemDetector.SIGNATURE_OR_SYSTEM ) ) ) { java.lang.String message = "`protectionLevel` should probably not be set to `signatureOrSystem`" ; context.report ( com.android.tools.lint.checks.SignatureOrSystemDetector.ISSUE , attribute , context.getLocation ( attribute ) , message ) ; } }
Source:
private static java.util.Properties loadLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vfs ) throws com.android.jack.library.NotJackLibraryException { java.util.Properties libraryProperties = new java.util.Properties ( ) ; try { com.android.sched.vfs.InputVFile libProp = vfs.getRootInputVDir ( ) . getInputVFile ( JackLibrary.LIBRARY_PROPERTIES_VPATH ) ; libraryProperties.load ( libProp.openRead ( ) ) ; } catch ( java.io.IOException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Fails to read " + ( JackLibrary.LIBRARY_PROPERTIES_VPATH.getPathAsString ( '/' ) ) ) + " from " ) + vfs ) , e ) ; throw new com.android.jack.library.NotJackLibraryException ( vfs.getLocation ( ) ) ; } return libraryProperties ; }

Target:
private static java.util.Properties loadLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vfs ) throws com.android.jack.library.NotJackLibraryException { java.util.Properties libraryProperties = new java.util.Properties ( ) ; try { com.android.sched.vfs.InputVFile libProp = vfs.getRootInputVDir ( ) . getInputVFile ( JackLibrary.LIBRARY_PROPERTIES_VPATH ) ; libraryProperties.load ( libProp.openRead ( ) ) ; } catch ( java.io.IOException e ) { throw new com.android.jack.library.NotJackLibraryException ( vfs.getLocation ( ) ) ; } return libraryProperties ; }
Source:
public static void create ( @ javax.annotation.Nonnull java.io.File file , @ javax.annotation.Nonnull com.android.sched.util.location.Location location ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.FileAlreadyExistsException { assert file != null ; if ( file.exists ( ) ) { throw new com.android.sched.util.file.FileAlreadyExistsException ( location ) ; } if ( file.mkdir ( ) ) { com.android.sched.util.file.Directory.logger.log ( java.util.logging.Level.FINE , "Create {0} (''{1}'')" , new java.lang.Object [ ] { location.getDescription ( ) , file.getAbsoluteFile ( ) } ) ; } else { throw new com.android.sched.util.file.CannotCreateFileException ( location ) ; } }

Target:
public static void create ( @ javax.annotation.Nonnull java.io.File file , @ javax.annotation.Nonnull com.android.sched.util.location.Location location ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.FileAlreadyExistsException { assert file != null ; if ( file.exists ( ) ) { throw new com.android.sched.util.file.FileAlreadyExistsException ( location ) ; } if ( file.mkdir ( ) ) { com.android.sched.util.file.Directory.logger.log ( java.util.logging.Level.FINE , "Create {0} (''{1}'')" , new java.lang.Object [ ] { location.getDescription ( ) , file.getAbsoluteFile ( ) } ) ; } else { if ( ! ( file.exists ( ) ) ) { throw new com.android.sched.util.file.CannotCreateFileException ( location ) ; } } }
Source:
public java.net.Socket createSocket ( java.net.InetAddress address , int port , java.net.InetAddress localAddress , int localPort ) throws java.io.IOException { javax.net.ssl.SSLSocket socket = ( ( javax.net.ssl.SSLSocket ) ( mDelegate.createSocket ( address , port , localAddress , localPort ) ) ) ; configureSocket ( socket ) ; return socket ; }

Target:
public java.net.Socket createSocket ( java.net.InetAddress address , int port , java.net.InetAddress localAddress , int localPort ) throws java.io.IOException { javax.net.ssl.SSLSocket socket = ( ( javax.net.ssl.SSLSocket ) ( mDelegate.createSocket ( address , port , localAddress , localPort ) ) ) ; return configureSocket ( socket ) ; }
Source:
public void execute ( ) throws org.apache.tools.ant.BuildException { if ( ( mProjectPath ) == null ) { throw new org.apache.tools.ant.BuildException ( "Missing attribute projectPath" ) ; } com.android.sdklib.internal.project.ProjectProperties props = com.android.ant.TaskHelper.getProperties ( mProjectPath ) ; if ( ( mBinName ) != null ) { handleProp ( props , "out.dir" , mBinName , SdkConstants.FD_OUTPUT ) ; } if ( ( mSrcName ) != null ) { handleProp ( props , "source.dir" , mSrcName , SdkConstants.FD_SOURCES ) ; } }

Target:
public void execute ( ) throws org.apache.tools.ant.BuildException { if ( ( mProjectPath ) == null ) { throw new org.apache.tools.ant.BuildException ( "Missing attribute projectPath" ) ; } com.android.sdklib.internal.project.ProjectProperties props = com.android.ant.TaskHelper.getProperties ( mProjectPath ) ; if ( ( mBinName ) != null ) { handleProp ( props , "out.dir" , mBinName ) ; } if ( ( mSrcName ) != null ) { handleProp ( props , "source.dir" , mSrcName ) ; } }
Source:
private static void report ( com.android.tools.lint.detector.api.Context context , com.android.tools.lint.detector.api.Issue issue , com.android.tools.lint.detector.api.Location.Handle handle , java.lang.String message ) { com.android.tools.lint.detector.api.Location location = handle.resolve ( ) ; java.lang.Object clientData = handle.getClientData ( ) ; if ( clientData instanceof org.w3c.dom.Node ) { if ( context.getDriver ( ) . isSuppressed ( null , issue , ( ( org.w3c.dom.Node ) ( clientData ) ) ) ) { return ; } } context.report ( issue , location , message , null ) ; }

Target:
private static void report ( com.android.tools.lint.detector.api.Context context , com.android.tools.lint.detector.api.Issue issue , com.android.tools.lint.detector.api.Location.Handle handle , java.lang.String message ) { com.android.tools.lint.detector.api.Location location = handle.resolve ( ) ; java.lang.Object clientData = handle.getClientData ( ) ; if ( clientData instanceof org.w3c.dom.Node ) { if ( context.getDriver ( ) . isSuppressed ( null , issue , ( ( org.w3c.dom.Node ) ( clientData ) ) ) ) { return ; } } context.report ( issue , location , message ) ; }
Source:
public boolean hasClipboardText ( java.lang.String callingPackage ) { synchronized ( this ) { if ( ( ! ( clipboardAccessAllowed ( AppOpsManager.OP_READ_CLIPBOARD , callingPackage , android.os.Binder.getCallingUid ( ) ) ) ) || ( isDeviceLocked ( ) ) ) { return false ; } com.android.server.clipboard.ClipboardService.PerUserClipboard clipboard = getClipboard ( ) ; if ( ( clipboard.primaryClip ) != null ) { java.lang.CharSequence text = clipboard.primaryClip.getItemAt ( 0 ) . getText ( ) ; return ( text != null ) && ( ( text.length ( ) ) > 0 ) ; } return false ; } }

Target:
public boolean hasClipboardText ( java.lang.String callingPackage ) { synchronized ( this ) { if ( ! ( clipboardAccessAllowed ( AppOpsManager.OP_READ_CLIPBOARD , callingPackage , android.os.Binder.getCallingUid ( ) ) ) ) { return false ; } com.android.server.clipboard.ClipboardService.PerUserClipboard clipboard = getClipboard ( ) ; if ( ( clipboard.primaryClip ) != null ) { java.lang.CharSequence text = clipboard.primaryClip.getItemAt ( 0 ) . getText ( ) ; return ( text != null ) && ( ( text.length ( ) ) > 0 ) ; } return false ; } }
Source:
private void init ( com.android.ide.common.xml.ManifestData manifestData ) { com.android.ide.common.xml.ManifestData.Instrumentation [ ] instrumentations = manifestData.getInstrumentations ( ) ; mInstrumentationNames = new java.lang.String [ instrumentations.length ] ; for ( int i = 0 ; i < ( instrumentations.length ) ; i ++ ) { mInstrumentationNames [ i ] = instrumentations [ i ] . getName ( ) ; } mHasRunnerLibrary = hasTestRunnerLibrary ( manifestData ) ; }

Target:
private void init ( com.android.ide.common.xml.ManifestData manifestData ) { if ( manifestData == null ) { mInstrumentationNames = new java.lang.String [ 0 ] ; mHasRunnerLibrary = false ; return ; } com.android.ide.common.xml.ManifestData.Instrumentation [ ] instrumentations = manifestData.getInstrumentations ( ) ; mInstrumentationNames = new java.lang.String [ instrumentations.length ] ; for ( int i = 0 ; i < ( instrumentations.length ) ; i ++ ) { mInstrumentationNames [ i ] = instrumentations [ i ] . getName ( ) ; } mHasRunnerLibrary = hasTestRunnerLibrary ( manifestData ) ; }
Source:
private com.android.sdkuilib.internal.repository.core.PkgCategory findCategoryForItem ( com.android.sdklib.internal.repository.updater.PkgItem item ) { java.util.List < com.android.sdkuilib.internal.repository.core.PkgCategory > cats = mDiffLogic.getCategories ( isSortByApi ( ) ) ; for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : cats ) { for ( com.android.sdklib.internal.repository.updater.PkgItem i : cat.getItems ( ) ) { if ( i == item ) { return cat ; } } } return null ; }

Target:
private com.android.sdkuilib.internal.repository.core.PkgCategory findCategoryForItem ( com.android.sdklib.internal.repository.updater.PkgItem item ) { java.util.List < com.android.sdkuilib.internal.repository.core.PkgCategory > cats = mDiffLogic.getCategories ( ) ; for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : cats ) { for ( com.android.sdklib.internal.repository.updater.PkgItem i : cat.getItems ( ) ) { if ( i == item ) { return cat ; } } } return null ; }
Source:
public boolean hasSourceUrl ( com.android.sdklib.internal.repository.SdkSource source ) { for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { for ( com.android.sdklib.internal.repository.SdkSource s : list ) { if ( s.equals ( source ) ) { return true ; } } } return false ; }

Target:
public boolean hasSourceUrl ( com.android.sdklib.internal.repository.SdkSource source ) { synchronized ( mSources ) { for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { for ( com.android.sdklib.internal.repository.SdkSource s : list ) { if ( s.equals ( source ) ) { return true ; } } } return false ; } }
Source:
private static java.lang.String concatClasspathStrings ( @ javax.annotation.CheckForNull java.lang.String bootclasspath , @ javax.annotation.CheckForNull java.lang.String classpath ) { if ( ( bootclasspath == null ) || ( bootclasspath.isEmpty ( ) ) ) { return classpath ; } else if ( ( classpath == null ) || ( classpath.isEmpty ( ) ) ) { return bootclasspath ; } else { java.lang.StringBuilder classpathStr = new java.lang.StringBuilder ( bootclasspath ) ; classpathStr.append ( java.io.File.pathSeparatorChar ) ; classpathStr.append ( classpath ) ; return classpathStr.toString ( ) ; } }

Target:
private static java.lang.String concatClasspathStrings ( @ javax.annotation.Nonnull java.lang.String bootclasspath , @ javax.annotation.Nonnull java.lang.String classpath ) { if ( ( bootclasspath == null ) || ( bootclasspath.isEmpty ( ) ) ) { return classpath ; } else if ( classpath.isEmpty ( ) ) { return bootclasspath ; } else { java.lang.StringBuilder classpathStr = new java.lang.StringBuilder ( bootclasspath ) ; classpathStr.append ( java.io.File.pathSeparatorChar ) ; classpathStr.append ( classpath ) ; return classpathStr.toString ( ) ; } }
Source:
public void test_EVP_CIPHER_iv_length ( ) throws java.lang.Exception { int aes128ecb = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_cipherbyname ( "aes-128-ecb" ) ; assertEquals ( 0 , org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CIPHER_iv_length ( aes128ecb ) ) ; int aes128cbc = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_cipherbyname ( "aes-128-cbc" ) ; assertEquals ( 16 , org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CIPHER_iv_length ( aes128cbc ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.assertNoErrors ( ) ; }

Target:
public void test_EVP_CIPHER_iv_length ( ) throws java.lang.Exception { int aes128ecb = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_cipherbyname ( "aes-128-ecb" ) ; assertEquals ( 0 , org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CIPHER_iv_length ( aes128ecb ) ) ; int aes128cbc = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_cipherbyname ( "aes-128-cbc" ) ; assertEquals ( 16 , org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CIPHER_iv_length ( aes128cbc ) ) ; }
Source:
public void installAppAndLaunch ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "HelloCompute.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "RsHelloCompute" ) ; assertTrue ( testFramework.getDevice ( ) . findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( Res.APP_IMAGE_VIEW_ID ) ) . exists ( ) ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( instrumentation , "RsHelloCompute" , null ) ; }

Target:
public void installAppAndLaunch ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "RsHelloCompute" ) ; assertTrue ( testFramework.getDevice ( ) . findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( Res.APP_IMAGE_VIEW_ID ) ) . exists ( ) ) ; }
Source:
private void startAccept ( ) { if ( com.android.bluetooth.ObexServerSockets.D ) android.util.Log.d ( TAG , "startAccept()" ) ; prepareForNewConnect ( ) ; if ( ( mRfcommSocket ) != null ) { mRfcommThread = new com.android.bluetooth.ObexServerSockets.SocketAcceptThread ( mRfcommSocket ) ; mRfcommThread.start ( ) ; } if ( ( mL2capSocket ) != null ) { mL2capThread = new com.android.bluetooth.ObexServerSockets.SocketAcceptThread ( mL2capSocket ) ; mL2capThread.start ( ) ; } }

Target:
private void startAccept ( ) { if ( com.android.bluetooth.ObexServerSockets.D ) android.util.Log.d ( TAG , "startAccept()" ) ; prepareForNewConnect ( ) ; mRfcommThread = new com.android.bluetooth.ObexServerSockets.SocketAcceptThread ( mRfcommSocket ) ; mRfcommThread.start ( ) ; mL2capThread = new com.android.bluetooth.ObexServerSockets.SocketAcceptThread ( mL2capSocket ) ; mL2capThread.start ( ) ; }
Source:
public void onClick ( android.view.View view ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.speakerButtonListener" , "speaker request for voicemailUri: %s" , voicemailUri.toString ( ) ) ; android.media.AudioManager audioManager = ( ( android.media.AudioManager ) ( getContext ( ) . getSystemService ( android.media.AudioManager.class ) ) ) ; audioManager.setMode ( AudioManager.STREAM_MUSIC ) ; if ( audioManager.isSpeakerphoneOn ( ) ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.phoneButtonListener" , "speaker was on, turning it off" ) ; audioManager.setSpeakerphoneOn ( false ) ; } else { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.phoneButtonListener" , "speaker was off, turning it on" ) ; audioManager.setSpeakerphoneOn ( true ) ; } }

Target:
public void onClick ( android.view.View view ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.speakerButtonListener" , "speaker request for voicemailUri: %s" , voicemailUri.toString ( ) ) ; android.media.AudioManager audioManager = ( ( android.media.AudioManager ) ( getContext ( ) . getSystemService ( android.media.AudioManager.class ) ) ) ; audioManager.setMode ( AudioManager.STREAM_MUSIC ) ; if ( audioManager.isSpeakerphoneOn ( ) ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.speakerButtonListener" , "speaker was on, turning it off" ) ; audioManager.setSpeakerphoneOn ( false ) ; } else { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.speakerButtonListener" , "speaker was off, turning it on" ) ; audioManager.setSpeakerphoneOn ( true ) ; } }
Source:
private void recordBrowserProcessHistogram ( android.content.Context context ) { if ( org.chromium.base.library_loader.Linker.getInstance ( ) . isUsed ( ) ) { nativeRecordChromiumAndroidLinkerBrowserHistogram ( mIsUsingBrowserSharedRelros , mLoadAtFixedAddressFailed , getLibraryLoadFromApkStatus ( context ) , mLibraryLoadTimeMs ) ; } if ( ( org.chromium.base.library_loader.LibraryLoader.sLibraryPreloader ) != null ) { nativeRecordLibraryPreloaderBrowserHistogram ( mLibraryPreloaderStatus ) ; } }

Target:
private void recordBrowserProcessHistogram ( ) { if ( org.chromium.base.library_loader.Linker.getInstance ( ) . isUsed ( ) ) { nativeRecordChromiumAndroidLinkerBrowserHistogram ( mIsUsingBrowserSharedRelros , mLoadAtFixedAddressFailed , getLibraryLoadFromApkStatus ( ) , mLibraryLoadTimeMs ) ; } if ( ( org.chromium.base.library_loader.LibraryLoader.sLibraryPreloader ) != null ) { nativeRecordLibraryPreloaderBrowserHistogram ( mLibraryPreloaderStatus ) ; } }
Source:
public void update ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.externalSystem.action.DetachExternalProjectAction.MyInfo info = com.intellij.openapi.externalSystem.action.DetachExternalProjectAction.getProcessingInfo ( e.getDataContext ( ) ) ; java.lang.String place = e.getPlace ( ) ; if ( ExternalSystemConstants.TOOL_WINDOW_PLACE.equals ( place ) ) { e.getPresentation ( ) . setEnabled ( ( ( info.externalProject ) != null ) ) ; } else if ( ExternalSystemConstants.TREE_CONTEXT_MENU_PLACE.equals ( place ) ) { e.getPresentation ( ) . setVisible ( ( ( info.externalProject ) != null ) ) ; } }

Target:
public void update ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.externalSystem.action.DetachExternalProjectAction.MyInfo info = com.intellij.openapi.externalSystem.action.DetachExternalProjectAction.getProcessingInfo ( e.getDataContext ( ) ) ; e.getPresentation ( ) . setEnabled ( ( ( info.externalProject ) != null ) ) ; }
Source:
public static void main ( ) throws java.io.IOException { java.nio.file.Path dir = test.java.nio.file.TestUtil.createTemporaryDirectory ( ) ; try { if ( ! ( java.nio.file.Files.getFileStore ( dir ) . supportsFileAttributeView ( "posix" ) ) ) { java.lang.System.out.println ( "PosixFileAttributeView not supported" ) ; return ; } test.java.nio.file.attribute.PosixFileAttributeViewTest.permissionTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.createTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.ownerTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.lookupPrincipalTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.exceptionsTests ( dir ) ; } finally { test.java.nio.file.TestUtil.removeAll ( dir ) ; } }

Target:
public static void main ( ) throws java.io.IOException { java.nio.file.Path dir = test.java.nio.file.TestUtil.createTemporaryDirectory ( ) ; try { test.java.nio.file.attribute.PosixFileAttributeViewTest.permissionTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.createTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.ownerTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.lookupPrincipalTests ( dir ) ; test.java.nio.file.attribute.PosixFileAttributeViewTest.exceptionsTests ( dir ) ; } finally { test.java.nio.file.TestUtil.removeAll ( dir ) ; } }
Source:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setReceivedLength ( byteCount ) ; packet.setAddress ( srcAddress.getAddress ( ) ) ; packet.setPort ( srcAddress.getPort ( ) ) ; } return byteCount ; }

Target:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setReceivedLength ( byteCount ) ; packet.setPort ( srcAddress.getPort ( ) ) ; if ( ! ( srcAddress.getAddress ( ) . equals ( packet.getAddress ( ) ) ) ) { packet.setAddress ( srcAddress.getAddress ( ) ) ; } } return byteCount ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JIfStatement ifStmt ) { com.android.jack.ir.ast.JStatement thenStmt = ifStmt.getThenStmt ( ) ; if ( ( thenStmt != null ) && ( ! ( thenStmt instanceof com.android.jack.ir.ast.JBlock ) ) ) { moveIntoBLock ( thenStmt ) ; } com.android.jack.ir.ast.JStatement elseStmt = ifStmt.getElseStmt ( ) ; if ( ( elseStmt != null ) && ( ! ( elseStmt instanceof com.android.jack.ir.ast.JBlock ) ) ) { moveIntoBLock ( elseStmt ) ; } return super . visit ( ifStmt ) ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JIfStatement ifStmt ) { com.android.jack.ir.ast.JStatement thenStmt = ifStmt.getThenStmt ( ) ; if ( ! ( thenStmt instanceof com.android.jack.ir.ast.JBlock ) ) { moveIntoBLock ( thenStmt ) ; } com.android.jack.ir.ast.JStatement elseStmt = ifStmt.getElseStmt ( ) ; if ( ( elseStmt != null ) && ( ! ( elseStmt instanceof com.android.jack.ir.ast.JBlock ) ) ) { moveIntoBLock ( elseStmt ) ; } return super . visit ( ifStmt ) ; }
Source:
public java.util.List < java.io.File > getRenderscriptSourceList ( ) { java.util.List < java.io.File > sourceList = com.google.common.collect.Lists.newArrayList ( ) ; sourceList.addAll ( mDefaultSourceProvider.getRenderscriptDirectories ( ) ) ; if ( ( mType ) != ( com.android.builder.VariantConfiguration.Type.TEST ) ) { sourceList.addAll ( mBuildTypeSourceProvider.getRenderscriptDirectories ( ) ) ; } if ( hasFlavors ( ) ) { for ( com.android.builder.model.SourceProvider flavorSourceSet : mFlavorSourceProviders ) { sourceList.addAll ( flavorSourceSet.getRenderscriptDirectories ( ) ) ; } } return sourceList ; }

Target:
public java.util.List < java.io.File > getRenderscriptSourceList ( ) { java.util.List < java.io.File > sourceList = com.google.common.collect.Lists.newArrayList ( ) ; sourceList.addAll ( mDefaultSourceProvider.getRenderscriptDirectories ( ) ) ; if ( ( ( mType ) != ( com.android.builder.VariantConfiguration.Type.TEST ) ) && ( ( mBuildTypeSourceProvider ) != null ) ) { sourceList.addAll ( mBuildTypeSourceProvider.getRenderscriptDirectories ( ) ) ; } if ( hasFlavors ( ) ) { for ( com.android.builder.model.SourceProvider flavorSourceSet : mFlavorSourceProviders ) { sourceList.addAll ( flavorSourceSet.getRenderscriptDirectories ( ) ) ; } } return sourceList ; }
Source:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( ( ( ( com.android.jack.java8.EcjLambdaTest.testWithApiUsage.contains ( description.getMethodName ( ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testWithOtherErrorMsg.contains ( description.getMethodName ( ) ) ) ) || ( com.android.jack.java8.EcjLambdaTest.knownBugs.contains ( description.getMethodName ( ) ) ) ) || ( com.android.jack.java8.EcjLambdaTest.intersectionTypes.contains ( description.getMethodName ( ) ) ) ) { return false ; } return true ; }

Target:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( ( ( com.android.jack.java8.EcjLambdaTest.testWithApiUsage.contains ( description.getMethodName ( ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testWithOtherErrorMsg.contains ( description.getMethodName ( ) ) ) ) || ( com.android.jack.java8.EcjLambdaTest.knownBugs.contains ( description.getMethodName ( ) ) ) ) { return false ; } return true ; }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.reflect.InvocationHandler handler = new Clash3InvocationHandler ( ) ; try { java.lang.reflect.Proxy.newProxyInstance ( Clash.class . getClassLoader ( ) , new java.lang.Class < ? > [ ] { Interface3a.class , Interface3base.class , Interface3aa.class , Interface3b.class } , handler ) ; java.lang.System.err.println ( "Clash3 did not throw expected exception" ) ; } catch ( java.lang.IllegalArgumentException iae ) { java.lang.System.out.println ( "Clash3 threw expected exception" ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { java.lang.reflect.InvocationHandler handler = new Clash3InvocationHandler ( ) ; try { java.lang.reflect.Proxy.newProxyInstance ( Clash.class . getClassLoader ( ) , new java.lang.Class < ? > [ ] { Interface3a.class , Interface3base.class , Interface3aa.class , Interface3b.class } , handler ) ; java.lang.System.out.println ( "Clash3 did not throw expected exception" ) ; } catch ( java.lang.IllegalArgumentException iae ) { java.lang.System.out.println ( "Clash3 threw expected exception" ) ; } }
Source:
public void testConnectFailureDueToNetworkSaveFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( true ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ) . thenReturn ( false ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; org.mockito.Mockito.verify ( mISupplicantStaIfaceMock , org.mockito.Mockito.times ( 2 ) ) . removeNetwork ( org.mockito.Matchers.anyInt ( ) ) ; }

Target:
public void testConnectFailureDueToNetworkSaveFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( true ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ) . thenReturn ( false ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) ) ) ; org.mockito.Mockito.verify ( mISupplicantStaIfaceMock , org.mockito.Mockito.times ( 2 ) ) . removeNetwork ( org.mockito.Matchers.anyInt ( ) ) ; }
Source:
public boolean put ( java.lang.String key , byte [ ] value ) { try { return ( mBinder.insert ( key , value ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean put ( java.lang.String key , byte [ ] value ) { try { return ( mBinder.insert ( key , value , ( - 1 ) ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public boolean setPasskey ( android.bluetooth.BluetoothDevice device , boolean accept , int len , byte [ ] passkey ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setPasskey() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.setPasskey ( device , accept , len , passkey ) ; }

Target:
public boolean setPasskey ( android.bluetooth.BluetoothDevice device , boolean accept , int len , byte [ ] passkey ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setPasskey() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.setPasskey ( device , accept , len , passkey ) ; }