auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void test_SSLEngine_beginHandshake ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; try { c.clientContext.createSSLEngine ( ) . beginHandshake ( ) ; fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } assertConnected ( libcore.javax.net.ssl.TestSSLEnginePair.create ( null ) ) ; c.close ( ) ; }

Target:
public void test_SSLEngine_beginHandshake ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; try { c.clientContext.createSSLEngine ( ) . beginHandshake ( ) ; fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } c.close ( ) ; libcore.javax.net.ssl.TestSSLEnginePair p = libcore.javax.net.ssl.TestSSLEnginePair.create ( null ) ; assertConnected ( p ) ; p.close ( ) ; }
Source:
public static void pullFromHost ( java.io.File src , java.io.File dest ) { try { if ( ( src.listFiles ( ) ) != null ) { com.android.tradefed.util.FileUtil.recursiveCopy ( src , dest ) ; } com.android.tradefed.util.FileUtil.recursiveDelete ( src ) ; } catch ( java.io.IOException e ) { com.android.tradefed.log.LogUtil.CLog.e ( "Caught exception during pull." ) ; com.android.tradefed.log.LogUtil.CLog.e ( e ) ; } }

Target:
public static void pullFromHost ( java.io.File src , java.io.File dest ) { try { com.android.tradefed.util.FileUtil.recursiveCopy ( src , dest ) ; com.android.tradefed.util.FileUtil.recursiveDelete ( src ) ; } catch ( java.io.IOException e ) { com.android.tradefed.log.LogUtil.CLog.e ( "Caught exception during pull." ) ; com.android.tradefed.log.LogUtil.CLog.e ( e ) ; } }
Source:
public static void setStatusBarColor ( android.view.Window window , int statusBarColor ) { if ( ( Build.VERSION.SDK_INT ) >= ( Build.VERSION_CODES.LOLLIPOP ) ) { if ( ( statusBarColor == ( android.graphics.Color.BLACK ) ) && ( ( window.getNavigationBarColor ( ) ) == ( android.graphics.Color.BLACK ) ) ) { window.clearFlags ( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS ) ; } else { window.addFlags ( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS ) ; } window.setStatusBarColor ( statusBarColor ) ; } }

Target:
public static void setStatusBarColor ( android.view.Window window , int statusBarColor ) { if ( ( Build.VERSION.SDK_INT ) >= ( Build.VERSION_CODES.LOLLIPOP ) ) { window.addFlags ( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS ) ; window.setStatusBarColor ( statusBarColor ) ; } }
Source:
public void resetSimNetworks ( ) { if ( mVerboseLoggingEnabled ) localLog ( "resetSimNetworks" ) ; for ( android.net.wifi.WifiConfiguration config : getInternalConfiguredNetworks ( ) ) { if ( com.android.server.wifi.util.TelephonyUtil.isSimConfig ( config ) ) { java.lang.String currentIdentity = com.android.server.wifi.util.TelephonyUtil.getSimIdentity ( mTelephonyManager , config.enterpriseConfig.getEapMethod ( ) ) ; config.enterpriseConfig.setIdentity ( currentIdentity ) ; config.enterpriseConfig.setAnonymousIdentity ( "" ) ; } } }

Target:
public void resetSimNetworks ( ) { if ( mVerboseLoggingEnabled ) localLog ( "resetSimNetworks" ) ; for ( android.net.wifi.WifiConfiguration config : getInternalConfiguredNetworks ( ) ) { if ( com.android.server.wifi.util.TelephonyUtil.isSimConfig ( config ) ) { java.lang.String currentIdentity = com.android.server.wifi.util.TelephonyUtil.getSimIdentity ( mTelephonyManager , config ) ; config.enterpriseConfig.setIdentity ( currentIdentity ) ; config.enterpriseConfig.setAnonymousIdentity ( "" ) ; } } }
Source:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 150 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( android.net.NetworkCapabilities.TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectAvailableCallbacks ( mWiFiNetworkAgent , false , timeoutMs ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 150 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( android.net.NetworkCapabilities.TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectAvailableCallbacks ( mWiFiNetworkAgent , false , false , timeoutMs ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public void sendMessage ( int peerId , @ android.annotation.Nullable byte [ ] message , int messageId , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called post GC on WifiNanManager" ) ; return ; } mgr.sendMessage ( mClientId , mSessionId , peerId , message , messageId , retryCount ) ; } }

Target:
public void sendMessage ( int peerId , int messageId , @ android.annotation.Nullable byte [ ] message , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called post GC on WifiNanManager" ) ; return ; } mgr.sendMessage ( mClientId , mSessionId , peerId , message , messageId , retryCount ) ; } }
Source:
public void testEndCallWithRingingForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.RINGING ) ; org.mockito.Mockito.when ( mFakeCallsManager.getForegroundCall ( ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . reject ( false , null ) ; }

Target:
public void testEndCallWithRingingForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.RINGING ) ; org.mockito.Mockito.when ( mFakeCallsManager.getForegroundCall ( ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( null ) ) ; org.mockito.Mockito.verify ( call ) . reject ( false , null ) ; }
Source:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.system.Int64Ref inOffset , long byteCount ) throws android.system.ErrnoException { if ( inOffset == null ) { return Libcore.os.sendfile ( outFd , inFd , null , byteCount ) ; } else { android.system.MutableLong internalInOffset = new android.system.MutableLong ( inOffset.value ) ; try { return Libcore.os.sendfile ( outFd , inFd , internalInOffset , byteCount ) ; } finally { inOffset.value = internalInOffset.value ; } } }

Target:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.system.Int64Ref offset , long byteCount ) throws android.system.ErrnoException { return Libcore.os.sendfile ( outFd , inFd , offset , byteCount ) ; }
Source:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.pbap.PbapStateMachine.REQUEST_PERMISSION : mService.checkOrGetPhonebookPermission ( this ) ; case com.android.bluetooth.pbap.PbapStateMachine.AUTHORIZED : transitionTo ( mConnected ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.REJECTED : rejectConnection ( ) ; transitionTo ( mFinished ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.DISCONNECT : mServiceHandler.removeMessages ( BluetoothPbapService.USER_TIMEOUT , this ) ; mServiceHandler.obtainMessage ( BluetoothPbapService.USER_TIMEOUT , this ) . sendToTarget ( ) ; transitionTo ( mFinished ) ; break ; } return HANDLED ; }

Target:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.pbap.PbapStateMachine.REQUEST_PERMISSION : mService.checkOrGetPhonebookPermission ( this ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.AUTHORIZED : transitionTo ( mConnected ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.REJECTED : rejectConnection ( ) ; transitionTo ( mFinished ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.DISCONNECT : mServiceHandler.removeMessages ( BluetoothPbapService.USER_TIMEOUT , this ) ; mServiceHandler.obtainMessage ( BluetoothPbapService.USER_TIMEOUT , this ) . sendToTarget ( ) ; transitionTo ( mFinished ) ; break ; } return HANDLED ; }
Source:
private void uninstall ( @ com.android.annotations.NonNull java.io.File apk , @ com.android.annotations.NonNull java.lang.String packageName , @ com.android.annotations.NonNull java.lang.String deviceName ) throws com.android.builder.testing.api.DeviceException { if ( packageName != null ) { logger.info ( "DeviceConnector '%s': uninstalling %s" , deviceName , packageName ) ; device.uninstallPackage ( packageName , timeout ) ; } else { logger.info ( "DeviceConnector '%s': unable to uninstall %s: unable to get package name" , deviceName , apk ) ; } }

Target:
private void uninstall ( @ com.android.annotations.NonNull java.io.File apk , @ com.android.annotations.NonNull java.lang.String packageName , @ com.android.annotations.NonNull java.lang.String deviceName ) throws com.android.builder.testing.api.DeviceException { if ( packageName != null ) { logger.info ( "DeviceConnector '%s': uninstalling %s" , deviceName , packageName ) ; device.uninstallPackage ( packageName , timeout , logger ) ; } else { logger.info ( "DeviceConnector '%s': unable to uninstall %s: unable to get package name" , deviceName , apk ) ; } }
Source:
private int writeNewClass ( java.lang.Class < ? > object , boolean unshared ) throws java.io.IOException { output.writeByte ( java.io.ObjectStreamConstants.TC_CLASS ) ; java.io.ObjectStreamClass clDesc = java.io.ObjectStreamClass.lookupStreamClass ( object ) ; if ( clDesc.isEnum ( ) ) { writeEnumDesc ( object , clDesc , unshared ) ; } else { writeClassDesc ( clDesc , unshared ) ; } int handle = nextHandle ( ) ; if ( ! unshared ) { objectsWritten.put ( object , handle ) ; } return handle ; }

Target:
private int writeNewClass ( java.lang.Class < ? > object , boolean unshared ) throws java.io.IOException { output.writeByte ( java.io.ObjectStreamConstants.TC_CLASS ) ; java.io.ObjectStreamClass clDesc = java.io.ObjectStreamClass.lookupStreamClass ( object ) ; if ( clDesc.isEnum ( ) ) { writeEnumDesc ( clDesc , unshared ) ; } else { writeClassDesc ( clDesc , unshared ) ; } int handle = nextHandle ( ) ; if ( ! unshared ) { objectsWritten.put ( object , handle ) ; } return handle ; }
Source:
public com.android.tools.perflib.heap.Heap getHeap ( int id ) { for ( com.android.tools.perflib.heap.Heap mHeap : mHeaps ) { if ( ( mHeap.getId ( ) ) == id ) { return mHeap ; } } return null ; }

Target:
public com.android.tools.perflib.heap.Heap getHeap ( int id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { if ( ( mHeaps.get ( i ) . getId ( ) ) == id ) { return mHeaps.get ( i ) ; } } return null ; }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.PostfixExpression x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; com.android.jack.ir.ast.JUnaryOperator op ; switch ( x.operator ) { case org.eclipse.jdt.internal.compiler.ast.OperatorIds.MINUS : op = com.android.jack.ir.ast.JUnaryOperator.DEC ; break ; case org.eclipse.jdt.internal.compiler.ast.OperatorIds.PLUS : op = com.android.jack.ir.ast.JUnaryOperator.INC ; break ; default : throw new java.lang.AssertionError ( "Unexpected postfix operator" ) ; } com.android.jack.ir.ast.JExpression lhs = pop ( x.lhs ) ; push ( com.android.jack.ir.ast.JPostfixOperation.create ( info , op , lhs ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.PostfixExpression x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; com.android.jack.ir.ast.JUnaryOperator op ; switch ( x.operator ) { case org.eclipse.jdt.internal.compiler.ast.OperatorIds.MINUS : op = com.android.jack.ir.ast.JUnaryOperator.DEC ; break ; case org.eclipse.jdt.internal.compiler.ast.OperatorIds.PLUS : op = com.android.jack.ir.ast.JUnaryOperator.INC ; break ; default : throw new java.lang.AssertionError ( "Unexpected postfix operator" ) ; } com.android.jack.ir.ast.JExpression lhs = pop ( x.lhs ) ; push ( com.android.jack.ir.ast.JPostfixOperation.create ( info , op , lhs ) ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public TagInfo [ ] deprecatedTags ( ) { TagInfo [ ] result = comment ( ) . deprecatedTags ( ) ; if ( ( result.length ) == 0 ) { if ( ( comment ( ) . undeprecateTags ( ) . length ) == 0 ) { if ( ( superclass ( ) ) != null ) { result = superclass ( ) . deprecatedTags ( ) ; } } } return result ; }

Target:
public TagInfo [ ] deprecatedTags ( ) { return comment ( ) . deprecatedTags ( ) ; }
Source:
public boolean fetchRemoteUuids ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "fetchRemoteUuids() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.fetchRemoteUuids ( device ) ; }

Target:
public boolean fetchRemoteUuids ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "fetchRemoteUuids() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.fetchRemoteUuids ( device ) ; }
Source:
public void testConcurrentServerSocketCloseReliablyThrows ( ) { int numIterations = 200 ; for ( int i = 0 ; i < numIterations ; i ++ ) { checkConnectIterationAndCloseSocket ( ( ( ( "Iteration " + ( i + 1 ) ) + " of " ) + numIterations ) , 50 ) ; } }

Target:
public void testConcurrentServerSocketCloseReliablyThrows ( ) { int numIterations = 100 ; for ( int i = 0 ; i < numIterations ; i ++ ) { checkConnectIterationAndCloseSocket ( ( ( ( "Iteration " + ( i + 1 ) ) + " of " ) + numIterations ) , 50 ) ; } }
Source:
public java.io.InputStream openRead ( ) throws com.android.sched.util.file.WrongPermissionException { try { return new com.android.sched.util.file.InputStreamFile ( file.getPath ( ) , com.android.sched.util.file.FileOrDirectory.ChangePermission.NOCHANGE ) . getInputStream ( ) ; } catch ( com.android.sched.util.file.FileAlreadyExistsException e ) { throw new java.lang.AssertionError ( ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new java.lang.AssertionError ( ) ; } catch ( com.android.sched.util.file.CannotSetPermissionException e ) { throw new java.lang.AssertionError ( ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
public java.io.InputStream openRead ( ) throws com.android.sched.util.file.WrongPermissionException { try { return new com.android.sched.util.file.InputStreamFile ( file.getPath ( ) ) . getInputStream ( ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }
Source:
public byte [ ] iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String filePath ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccExchangeSimIO ( fileID , command , p1 , p2 , p3 , filePath ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }

Target:
public byte [ ] iccExchangeSimIO ( int subId , int fileID , int command , int p1 , int p2 , int p3 , java.lang.String filePath ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccExchangeSimIO ( subId , fileID , command , p1 , p2 , p3 , filePath ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }
Source:
public java.lang.Integer compute ( ) { int n = number ; if ( n <= 1 ) return n ; jsr166.ForkJoinPoolTest.FibTask f1 = new jsr166.ForkJoinPoolTest.FibTask ( ( n - 1 ) ) ; f1.fork ( ) ; return ( new jsr166.ForkJoinPoolTest.FibTask ( ( n - 2 ) ) . compute ( ) ) + ( f1.join ( ) ) ; }

Target:
protected java.lang.Integer compute ( ) { int n = number ; if ( n <= 1 ) return n ; jsr166.ForkJoinPoolTest.FibTask f1 = new jsr166.ForkJoinPoolTest.FibTask ( ( n - 1 ) ) ; f1.fork ( ) ; return ( new jsr166.ForkJoinPoolTest.FibTask ( ( n - 2 ) ) . compute ( ) ) + ( f1.join ( ) ) ; }
Source:
public void fillSelectionAndBorder ( java.awt.Graphics2D g , com.intellij.ui.tabs.impl.JBTabsImpl.ShapeInfo selectedShape , java.awt.Color tabColor , int x , int y , int height ) { g.setColor ( ( tabColor != null ? tabColor : getDefaultTabColor ( ) ) ) ; g.fill ( selectedShape.fillPath.getShape ( ) ) ; g.draw ( selectedShape.fillPath.getShape ( ) ) ; }

Target:
public void fillSelectionAndBorder ( java.awt.Graphics2D g , com.intellij.ui.tabs.impl.JBTabsImpl.ShapeInfo selectedShape , java.awt.Color tabColor , int x , int y , int height ) { g.setColor ( ( tabColor != null ? tabColor : getDefaultTabColor ( ) ) ) ; g.fill ( selectedShape.fillPath.getShape ( ) ) ; }
Source:
public void startTdls ( java.lang.String macAddr , boolean enable ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { if ( enable ) { mSupplicantStaIfaceHal.initiateTdlsDiscover ( macAddr ) ; mSupplicantStaIfaceHal.initiateTdlsSetup ( macAddr ) ; } else { mSupplicantStaIfaceHal.initiateTdlsTeardown ( macAddr ) ; } } else { if ( enable ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { doBooleanCommand ( ( "TDLS_DISCOVER " + macAddr ) ) ; doBooleanCommand ( ( "TDLS_SETUP " + macAddr ) ) ; } } else { doBooleanCommand ( ( "TDLS_TEARDOWN " + macAddr ) ) ; } } }

Target:
public void startTdls ( java.lang.String macAddr , boolean enable ) { if ( enable ) { mSupplicantStaIfaceHal.initiateTdlsDiscover ( macAddr ) ; mSupplicantStaIfaceHal.initiateTdlsSetup ( macAddr ) ; } else { mSupplicantStaIfaceHal.initiateTdlsTeardown ( macAddr ) ; } }
Source:
public boolean processMessage ( android.os.Message message ) { maybeLogMessage ( this , message.what ) ; switch ( message.what ) { case com.android.server.connectivity.tethering.TetherInterfaceStateMachine.CMD_TETHER_REQUESTED : android.util.Log.e ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , "CMD_TETHER_REQUESTED while in local hotspot mode." ) ; break ; case com.android.server.connectivity.tethering.TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED : break ; default : return false ; } return true ; }

Target:
public boolean processMessage ( android.os.Message message ) { if ( super . processMessage ( message ) ) return true ; maybeLogMessage ( this , message.what ) ; switch ( message.what ) { case com.android.server.connectivity.tethering.TetherInterfaceStateMachine.CMD_TETHER_REQUESTED : android.util.Log.e ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , "CMD_TETHER_REQUESTED while in local hotspot mode." ) ; break ; case com.android.server.connectivity.tethering.TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED : break ; default : return false ; } return true ; }
Source:
public void compareExtStructure ( ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( new com.android.jack.Options ( ) , com.android.jack.compile.androidtree.ext.ExtCompilationTest.BOOTCLASSPATH , null , com.android.jack.compile.androidtree.ext.ExtCompilationTest.REF_BOOTCLASSPATH , null , com.android.jack.compile.androidtree.ext.ExtCompilationTest.SOURCELIST , false , true , 0.4F , ( ( com.android.jack.JarJarRules ) ( null ) ) , ( ( com.android.jack.ProguardFlags [ ] ) ( null ) ) ) ; }

Target:
public void compareExtStructure ( ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( new com.android.jack.Options ( ) , null , null , com.android.jack.compile.androidtree.ext.ExtCompilationTest.SOURCELIST , false , true , 0.4F , ( ( com.android.jack.JarJarRules ) ( null ) ) , ( ( com.android.jack.ProguardFlags [ ] ) ( null ) ) ) ; }
Source:
public void visitConstantInstruction ( proguard.optimize.info.Clazz clazz , proguard.optimize.info.Method method , proguard.classfile.attribute.CodeAttribute codeAttribute , int offset , proguard.optimize.info.ConstantInstruction constantInstruction ) { byte opcode = constantInstruction.opcode ; switch ( opcode ) { case InstructionConstants.OP_GETSTATIC : case InstructionConstants.OP_PUTSTATIC : case InstructionConstants.OP_GETFIELD : case InstructionConstants.OP_PUTFIELD : case InstructionConstants.OP_INVOKEVIRTUAL : case InstructionConstants.OP_INVOKESPECIAL : case InstructionConstants.OP_INVOKESTATIC : case InstructionConstants.OP_INVOKEINTERFACE : case InstructionConstants.OP_INVOKEDYNAMIC : case InstructionConstants.OP_NEW : case InstructionConstants.OP_ANEWARRAY : case InstructionConstants.OP_CHECKCAST : case InstructionConstants.OP_INSTANCEOF : case InstructionConstants.OP_MULTIANEWARRAY : mayThrowExceptions = true ; } }

Target:
public void visitConstantInstruction ( proguard.optimize.info.Clazz clazz , proguard.optimize.info.Method method , proguard.classfile.attribute.CodeAttribute codeAttribute , int offset , proguard.optimize.info.ConstantInstruction constantInstruction ) { switch ( constantInstruction.opcode ) { case InstructionConstants.OP_GETSTATIC : case InstructionConstants.OP_PUTSTATIC : case InstructionConstants.OP_GETFIELD : case InstructionConstants.OP_PUTFIELD : case InstructionConstants.OP_INVOKEVIRTUAL : case InstructionConstants.OP_INVOKESPECIAL : case InstructionConstants.OP_INVOKESTATIC : case InstructionConstants.OP_INVOKEINTERFACE : case InstructionConstants.OP_INVOKEDYNAMIC : case InstructionConstants.OP_NEW : case InstructionConstants.OP_ANEWARRAY : case InstructionConstants.OP_CHECKCAST : case InstructionConstants.OP_INSTANCEOF : case InstructionConstants.OP_MULTIANEWARRAY : mayThrowExceptions = true ; } }
Source:
public void testMultiCharMinusSignAndPercentage ( ) { java.text.DecimalFormatSymbols dfs ; dfs = new java.text.DecimalFormatSymbols ( java.util.Locale.forLanguageTag ( "ar" ) ) ; assertEquals ( '%' , dfs.getPercent ( ) ) ; assertEquals ( '-' , dfs.getMinusSign ( ) ) ; dfs = new java.text.DecimalFormatSymbols ( java.util.Locale.forLanguageTag ( "fa" ) ) ; assertEquals ( '٪' , dfs.getPercent ( ) ) ; assertEquals ( '−' , dfs.getMinusSign ( ) ) ; }

Target:
public void testMultiCharMinusSignAndPercentage ( ) { java.text.DecimalFormatSymbols dfs ; dfs = new java.text.DecimalFormatSymbols ( java.util.Locale.forLanguageTag ( "ar" ) ) ; assertEquals ( '٪' , dfs.getPercent ( ) ) ; assertEquals ( '-' , dfs.getMinusSign ( ) ) ; dfs = new java.text.DecimalFormatSymbols ( java.util.Locale.forLanguageTag ( "fa" ) ) ; assertEquals ( '٪' , dfs.getPercent ( ) ) ; assertEquals ( '−' , dfs.getMinusSign ( ) ) ; }
Source:
private com.android.jill.frontend.java.Variable getTempVarFromTopOfStackMinus1 ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame ) { com.android.jill.frontend.java.Variable topOfStackBeforeInst = getStackVariable ( frame , ( ( com.android.jill.frontend.java.MethodBodyWriter.TOP_OF_STACK ) - 1 ) ) ; java.lang.String tmpVarId = "-swap_tmp_" + ( typeToUntypedDesc ( topOfStackBeforeInst.getType ( ) ) ) ; com.android.jill.frontend.java.Variable tmpVariable = getVariable ( tmpVarId , tmpVarId , topOfStackBeforeInst.getType ( ) , null ) ; return tmpVariable ; }

Target:
private com.android.jill.frontend.java.Variable getTempVarFromTopOfStackMinus1 ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame ) { com.android.jill.frontend.java.Variable topOfStackBeforeInst = getStackVariable ( frame , ( ( com.android.jill.frontend.java.MethodBodyWriter.TOP_OF_STACK ) - 1 ) ) ; java.lang.String tmpVarId = "-swap_tmp_" + ( typeToUntypedDesc ( topOfStackBeforeInst.getType ( ) ) ) ; com.android.jill.frontend.java.Variable tmpVariable = getVariable ( tmpVarId , tmpVarId , topOfStackBeforeInst.getType ( ) ) ; return tmpVariable ; }
Source:
static java.util.concurrent.CopyOnWriteArraySet < java.lang.Integer > populatedSet ( int n ) { java.util.concurrent.CopyOnWriteArraySet < java.lang.Integer > a = new java.util.concurrent.CopyOnWriteArraySet < java.lang.Integer > ( ) ; assertTrue ( a.isEmpty ( ) ) ; for ( int i = 0 ; i < n ; i ++ ) a.add ( i ) ; assertFalse ( a.isEmpty ( ) ) ; assertEquals ( n , a.size ( ) ) ; return a ; }

Target:
static java.util.concurrent.CopyOnWriteArraySet < java.lang.Integer > populatedSet ( int n ) { java.util.concurrent.CopyOnWriteArraySet < java.lang.Integer > a = new java.util.concurrent.CopyOnWriteArraySet < java.lang.Integer > ( ) ; assertTrue ( a.isEmpty ( ) ) ; for ( int i = 0 ; i < n ; i ++ ) a.add ( i ) ; assertEquals ( ( n == 0 ) , a.isEmpty ( ) ) ; assertEquals ( n , a.size ( ) ) ; return a ; }
Source:
private void preRenderingTargetChangeCleanUp ( com.android.sdklib.IAndroidTarget oldTarget ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = currentSdk.getTargetData ( oldTarget ) ; if ( data != null ) { com.android.ide.common.rendering.LayoutLibrary layoutLib = data.getLayoutLibrary ( ) ; layoutLib.clearCaches ( mEditedFile.getProject ( ) ) ; } } if ( ( ( mProjectCallback ) != null ) && ( mProjectCallback.isUsed ( ) ) ) { mProjectCallback = null ; } }

Target:
private void preRenderingTargetChangeCleanUp ( com.android.sdklib.IAndroidTarget oldTarget ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = currentSdk.getTargetData ( oldTarget ) ; if ( data != null ) { com.android.ide.common.rendering.LayoutLibrary layoutLib = data.getLayoutLibrary ( ) ; layoutLib.clearCaches ( mEditedFile.getProject ( ) ) ; } } mProjectCallback = null ; }
Source:
public void testPullExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mCapabilities = android.telecom.Connection.CAPABILITY_CAN_PULL_CALL ; mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . pullExternalCall ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.any ( ) ) ; }

Target:
public void testPullExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mCapabilities = android.telecom.Connection.CAPABILITY_CAN_PULL_CALL ; mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.junit.Assert.assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . pullExternalCall ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.any ( ) ) ; }
Source:
public static void verifyGolden ( junit.framework.TestCase test , java.lang.Object object , org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert comparator ) throws java.lang.Exception { assertNotNull ( "Null comparator" , comparator ) ; java.io.Serializable deserialized = org.apache.harmony.testframework.serialization.SerializationTest.getObject ( test , ".golden.ser" ) ; comparator.assertDeserialized ( ( ( java.io.Serializable ) ( object ) ) , deserialized ) ; }

Target:
public static void verifyGolden ( java.lang.Object test , java.lang.Object object , org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert comparator ) throws java.lang.Exception { assertNotNull ( "Null comparator" , comparator ) ; java.io.Serializable deserialized = org.apache.harmony.testframework.serialization.SerializationTest.getObject ( test , ".golden.ser" ) ; comparator.assertDeserialized ( ( ( java.io.Serializable ) ( object ) ) , deserialized ) ; }
Source:
public static final java.util.HashMap readMapXml ( java.io.InputStream in ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { org.xmlpull.v1.XmlPullParser parser = android.util.Xml.newPullParser ( ) ; parser.setInput ( in , null ) ; return ( ( java.util.HashMap ) ( com.android.internal.util.XmlUtils.readValueXml ( parser , new java.lang.String [ 1 ] ) ) ) ; }

Target:
public static final java.util.HashMap < java.lang.String , ? > readMapXml ( java.io.InputStream in ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { org.xmlpull.v1.XmlPullParser parser = android.util.Xml.newPullParser ( ) ; parser.setInput ( in , null ) ; return ( ( java.util.HashMap < java.lang.String , ? > ) ( com.android.internal.util.XmlUtils.readValueXml ( parser , new java.lang.String [ 1 ] ) ) ) ; }
Source:
private boolean sendDeviceListMonitoringRequest ( ) throws com.android.ddmlib.TimeoutException , java.io.IOException { byte [ ] request = com.android.ddmlib.AdbHelper.formAdbRequest ( "host:track-devices" ) ; try { com.android.ddmlib.AdbHelper.write ( mMainAdbConnection , request ) ; com.android.ddmlib.AdbHelper.AdbResponse resp = com.android.ddmlib.AdbHelper.readAdbResponse ( mMainAdbConnection , false ) ; if ( ( resp.okay ) == false ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , ( "adb refused request: " + ( resp.message ) ) ) ; } return resp.okay ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , "Sending Tracking request failed!" ) ; mMainAdbConnection.close ( ) ; throw e ; } }

Target:
private boolean sendDeviceListMonitoringRequest ( ) throws com.android.ddmlib.TimeoutException , java.io.IOException { byte [ ] request = com.android.ddmlib.AdbHelper.formAdbRequest ( "host:track-devices" ) ; try { com.android.ddmlib.AdbHelper.write ( mMainAdbConnection , request ) ; com.android.ddmlib.AdbHelper.AdbResponse resp = com.android.ddmlib.AdbHelper.readAdbResponse ( mMainAdbConnection , false ) ; if ( ! ( resp.okay ) ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , ( "adb refused request: " + ( resp.message ) ) ) ; } return resp.okay ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , "Sending Tracking request failed!" ) ; mMainAdbConnection.close ( ) ; throw e ; } }
Source:
static void setDouble ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , double value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }

Target:
static void setDouble ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , double value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( expectFailure , exceptionThrown ) ; }
Source:
private void addItem ( @ com.android.annotations.NonNull com.android.ide.common.res2.ResourceItem item ) { synchronized ( com.android.ide.common.res2.AbstractResourceRepository.ITEM_MAP_LOCK ) { java.util.Map < com.android.resources.ResourceType , com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > > itemMap = getMap ( ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > map = getMap ( item.getType ( ) ) ; if ( ! ( map.containsValue ( item ) ) ) { map.put ( item.getName ( ) , item ) ; } } }

Target:
private void addItem ( @ com.android.annotations.NonNull com.android.ide.common.res2.ResourceItem item ) { synchronized ( com.android.ide.common.res2.AbstractResourceRepository.ITEM_MAP_LOCK ) { com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > map = getMap ( item.getType ( ) ) ; if ( ! ( map.containsValue ( item ) ) ) { map.put ( item.getName ( ) , item ) ; } } }
Source:
public void testDensityOnlyWithCustomDeviceDensity ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 1 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testDensityOnlyWithCustomDeviceDensity ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 3 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 1 , "foo" ) ; assertEquals ( match , result ) ; }
Source:
public void testGetResourceAsStream1 ( ) throws java.io.IOException { java.lang.Class clazz = getClass ( ) ; java.io.InputStream stream = clazz.getResourceAsStream ( "HelloWorld.txt" ) ; assert stream != null ; byte [ ] buffer = new byte [ 20 ] ; int length = stream.read ( buffer ) ; java.lang.String s = new java.lang.String ( buffer , 0 , length ) ; assert "Hello, World." . equals ( s ) ; stream.close ( ) ; }

Target:
public void testGetResourceAsStream1 ( ) throws java.io.IOException { java.lang.Class clazz = getClass ( ) ; java.io.InputStream stream = clazz.getResourceAsStream ( "HelloWorld.txt" ) ; assertNotNull ( stream ) ; byte [ ] buffer = new byte [ 20 ] ; int length = stream.read ( buffer ) ; java.lang.String s = new java.lang.String ( buffer , 0 , length ) ; assertEquals ( "Hello, World." , s ) ; stream.close ( ) ; }
Source:
public void test_parkFor_3 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }

Target:
public void test_parkFor_3 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 1 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }
Source:
private void cancelToastLocked ( int index ) { com.android.server.NotificationManagerService.ToastRecord record = mToastQueue.get ( index ) ; try { record.callback.hide ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.server.NotificationManagerService.TAG , ( ( ( "Object died trying to hide notification " + ( record.callback ) ) + " in package " ) + ( record.pkg ) ) ) ; } mToastQueue.remove ( index ) ; keepProcessAliveLocked ( record.pid ) ; if ( ( mToastQueue.size ( ) ) > 0 ) { showNextToastLocked ( ) ; } }

Target:
private void cancelToastLocked ( int index ) { com.android.server.NotificationManagerService.ToastRecord record = mToastQueue.get ( index ) ; try { record.callback.hide ( ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.w ( com.android.server.NotificationManagerService.TAG , ( ( ( "Object died trying to hide notification " + ( record.callback ) ) + " in package " ) + ( record.pkg ) ) ) ; } mToastQueue.remove ( index ) ; keepProcessAliveLocked ( record.pid ) ; if ( ( mToastQueue.size ( ) ) > 0 ) { showNextToastLocked ( ) ; } }
Source:
protected java.lang.String getCipherName ( int keySize , org.conscrypt.OpenSSLCipher.Mode mode ) { final java.lang.String baseCipherName ; if ( keySize == 16 ) { baseCipherName = "des-ede" ; } else { baseCipherName = "des-ede3" ; } if ( mode == ( org.conscrypt.OpenSSLCipher.Mode.ECB ) ) { return baseCipherName ; } else { return ( baseCipherName + "-" ) + ( mode.toString ( ) . toLowerCase ( java.util.Locale.US ) ) ; } }

Target:
protected java.lang.String getCipherName ( int keySize , org.conscrypt.OpenSSLCipher.Mode mode ) { final java.lang.String baseCipherName ; if ( keySize == 16 ) { baseCipherName = "des-ede" ; } else { baseCipherName = "des-ede3" ; } return ( baseCipherName + "-" ) + ( mode.toString ( ) . toLowerCase ( java.util.Locale.US ) ) ; }
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 , 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 ; } }
Source:
public void run ( @ javax.annotation.Nonnull final com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { new com.android.jack.ir.ast.cfg.BasicBlockLiveProcessor ( false ) { @ java.lang.Override public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JSimpleBasicBlock block ) { if ( ( ( block.getElementCount ( ) ) == 1 ) && ( ( block.getLastElement ( ) . getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) ) { block.delete ( ) ; } return false ; } @ javax.annotation.Nonnull @ java.lang.Override public com.android.jack.ir.ast.cfg.JControlFlowGraph getCfg ( ) { return cfg ; } } . process ( ) ; }

Target:
public void run ( @ javax.annotation.Nonnull final com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { new com.android.jack.ir.ast.cfg.BasicBlockLiveProcessor ( cfg , false ) { @ java.lang.Override public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JSimpleBasicBlock block ) { if ( ( ( block.getElementCount ( ) ) == 1 ) && ( ( block.getLastElement ( ) . getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) ) { block.delete ( ) ; } return false ; } } . process ( ) ; }
Source:
public static < T extends java.lang.Enum < T > > com.android.sched.util.config.id.EnumPropertyId < T > create ( @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull java.lang.String description , @ javax.annotation.Nonnull T [ ] values ) { return new com.android.sched.util.config.id.EnumPropertyId < T > ( name , description , new com.android.sched.util.codec.EnumCodec < T > ( values ) ) ; }

Target:
public static < T extends java.lang.Enum < T > > com.android.sched.util.config.id.EnumPropertyId < T > create ( @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull java.lang.String description , @ javax.annotation.Nonnull java.lang.Class < T > type , @ javax.annotation.Nonnull T [ ] values ) { return new com.android.sched.util.config.id.EnumPropertyId < T > ( name , description , new com.android.sched.util.codec.EnumCodec < T > ( type , values ) ) ; }
Source:
protected java.util.List < B > get ( int index ) { java.lang.Object [ ] tuple = new java.lang.Object [ axes.size ( ) ] ; for ( int i = 0 ; i < ( tuple.length ) ; i ++ ) { tuple [ i ] = axes.get ( i ) . getForIndex ( index ) ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < B > result = ( ( com.google.common.collect.ImmutableList < B > ) ( com.google.common.collect.ImmutableList.copyOf ( tuple ) ) ) ; return result ; }

Target:
public int size ( ) { return axes.size ( ) ; }
Source:
public static android.telephony.VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings ( android.content.Context context , int subId ) { android.content.ComponentName componentName = com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( context ) ; java.lang.String packageName ; if ( componentName == null ) { packageName = com.android.phone.VisualVoicemailSmsFilterConfig.DEFAULT_PACKAGE ; } else { packageName = componentName.getPackageName ( ) ; } return com.android.phone.VisualVoicemailSmsFilterConfig.getVisualVoicemailSmsFilterSettings ( context , packageName , subId ) ; }

Target:
public static android.telephony.VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings ( android.content.Context context , int subId ) { android.content.ComponentName componentName = com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( context , subId ) ; java.lang.String packageName ; if ( componentName == null ) { packageName = com.android.phone.VisualVoicemailSmsFilterConfig.DEFAULT_PACKAGE ; } else { packageName = componentName.getPackageName ( ) ; } return com.android.phone.VisualVoicemailSmsFilterConfig.getVisualVoicemailSmsFilterSettings ( context , packageName , subId ) ; }
Source:
private static java.lang.String getListViewFqcn ( java.lang.Class < ? > clz ) { java.lang.String fqcn = clz.getName ( ) ; if ( fqcn.endsWith ( com.android.ide.common.layout.LayoutConstants.LIST_VIEW ) ) { return fqcn ; } else if ( fqcn.startsWith ( com.android.ide.common.layout.LayoutConstants.ANDROID_PKG_PREFIX ) ) { return null ; } java.lang.Class < ? > superClass = clz.getSuperclass ( ) ; if ( superClass != null ) { return com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.getListViewFqcn ( superClass ) ; } else { return null ; } }

Target:
public static java.lang.String getListViewFqcn ( java.lang.Class < ? > clz ) { java.lang.String fqcn = clz.getName ( ) ; if ( fqcn.endsWith ( com.android.ide.common.layout.LayoutConstants.LIST_VIEW ) ) { return fqcn ; } else if ( fqcn.startsWith ( com.android.ide.common.layout.LayoutConstants.ANDROID_PKG_PREFIX ) ) { return null ; } java.lang.Class < ? > superClass = clz.getSuperclass ( ) ; if ( superClass != null ) { return com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.getListViewFqcn ( superClass ) ; } else { return null ; } }
Source:
private static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Settings" ) ; android.support.test.uiautomator.UiScrollable itemList = new android.support.test.uiautomator.UiScrollable ( new android.support.test.uiautomator.UiSelector ( ) . resourceIdMatches ( Res.SETTINGS_LIST_CONTAINER_RES ) ) ; itemList.setAsVerticalList ( ) ; android.support.test.uiautomator.UiObject item = itemList.getChildByText ( new android.support.test.uiautomator.UiSelector ( ) . className ( "android.widget.TextView" ) , "Apps" ) ; item.clickAndWaitForNewWindow ( ) ; }

Target:
public static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Settings" ) ; android.support.test.uiautomator.UiScrollable itemList = new android.support.test.uiautomator.UiScrollable ( new android.support.test.uiautomator.UiSelector ( ) . resourceIdMatches ( Res.SETTINGS_LIST_CONTAINER_RES ) ) ; itemList.setAsVerticalList ( ) ; android.support.test.uiautomator.UiObject item = itemList.getChildByText ( new android.support.test.uiautomator.UiSelector ( ) . className ( "android.widget.TextView" ) , "Apps" ) ; item.clickAndWaitForNewWindow ( ) ; }
Source:
private void performPoll ( int flags ) { synchronized ( mStatsLock ) { mWakeLock.acquire ( ) ; if ( ( mTime.getCacheAge ( ) ) > ( mSettings.getTimeCacheMaxAge ( ) ) ) { mTime.forceRefresh ( ) ; } try { performPollLocked ( flags ) ; } finally { mWakeLock.release ( ) ; } } }

Target:
private void performPoll ( int flags ) { if ( ( mTime.getCacheAge ( ) ) > ( mSettings.getTimeCacheMaxAge ( ) ) ) { mTime.forceRefresh ( ) ; } synchronized ( mStatsLock ) { mWakeLock.acquire ( ) ; try { performPollLocked ( flags ) ; } finally { mWakeLock.release ( ) ; } } }