auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void validateWrongPassword ( android.support.test.uiautomator.UiDevice device , java.lang.String password , java.lang.String errorMessage ) throws java.lang.Exception { android.support.test.uiautomator.UiObject passwordField = device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . className ( "android.widget.EditText" ) ) ; passwordField.setText ( password ) ; android.support.test.uiautomator.UiObject passwordError = device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textContains ( errorMessage ) ) ; passwordError.waitForExists ( 3L ) ; junit.framework.Assert.assertTrue ( passwordError.exists ( ) ) ; pressDeleteKey ( device , password.length ( ) ) ; }

Target:
private void validateWrongPassword ( java.lang.String password , java.lang.String errorMessage ) throws java.lang.Exception { android.support.test.uiautomator.UiObject passwordField = device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . className ( "android.widget.EditText" ) ) ; passwordField.setText ( password ) ; android.support.test.uiautomator.UiObject passwordError = device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textContains ( errorMessage ) ) ; passwordError.waitForExists ( 3L ) ; junit.framework.Assert.assertTrue ( passwordError.exists ( ) ) ; pressDeleteKey ( password.length ( ) ) ; }
Source:
public java.lang.String getBase64Encoding ( int number ) { byte [ ] idByteArray = java.nio.ByteBuffer.allocate ( 4 ) . putInt ( number ) . array ( ) ; idByteArray = java.util.Arrays.copyOfRange ( idByteArray , 2 , 4 ) ; return android.util.Base64.encodeToString ( idByteArray , ( ( android.util.Base64.NO_WRAP ) | ( android.util.Base64.NO_PADDING ) ) ) ; }

Target:
private java.lang.String getBase64Encoding ( int number ) { byte [ ] idByteArray = java.nio.ByteBuffer.allocate ( 4 ) . putInt ( number ) . array ( ) ; idByteArray = java.util.Arrays.copyOfRange ( idByteArray , 2 , 4 ) ; return android.util.Base64.encodeToString ( idByteArray , ( ( android.util.Base64.NO_WRAP ) | ( android.util.Base64.NO_PADDING ) ) ) ; }
Source:
private void verifyRemovePasspointNetworkFromWifiConfigManager ( android.net.wifi.WifiConfiguration configuration ) throws java.lang.Exception { assertTrue ( mWifiConfigManager.removeNetwork ( configuration.networkId , com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ) ) ; verify ( mWifiKeyStore , never ( ) ) . removeKeys ( any ( android.net.wifi.WifiEnterpriseConfig.class ) ) ; verifyNetworkRemoveBroadcast ( configuration ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . write ( anyBoolean ( ) , any ( com.android.server.wifi.WifiConfigStoreData.class ) ) ; }

Target:
private void verifyRemovePasspointNetworkFromWifiConfigManager ( android.net.wifi.WifiConfiguration configuration ) throws java.lang.Exception { assertTrue ( mWifiConfigManager.removeNetwork ( configuration.networkId , com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ) ) ; verify ( mWifiKeyStore , never ( ) ) . removeKeys ( any ( android.net.wifi.WifiEnterpriseConfig.class ) ) ; verifyNetworkRemoveBroadcast ( configuration ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . write ( anyBoolean ( ) ) ; }
Source:
private void registerForNotifications ( ) { mCM.registerForDisconnect ( this , com.android.phone.CallNotifier.PHONE_DISCONNECT , null ) ; mCM.registerForCdmaOtaStatusChange ( this , com.android.phone.CallNotifier.EVENT_OTA_PROVISION_CHANGE , null ) ; mCM.registerForDisplayInfo ( this , com.android.phone.CallNotifier.PHONE_STATE_DISPLAYINFO , null ) ; mCM.registerForSignalInfo ( this , com.android.phone.CallNotifier.PHONE_STATE_SIGNALINFO , null ) ; mCM.registerForInCallVoicePrivacyOn ( this , com.android.phone.CallNotifier.PHONE_ENHANCED_VP_ON , null ) ; mCM.registerForInCallVoicePrivacyOff ( this , com.android.phone.CallNotifier.PHONE_ENHANCED_VP_OFF , null ) ; mCM.registerForSuppServiceFailed ( this , com.android.phone.CallNotifier.PHONE_SUPP_SERVICE_FAILED , null ) ; mCM.registerForTtyModeReceived ( this , com.android.phone.CallNotifier.PHONE_TTY_MODE_RECEIVED , null ) ; }

Target:
private void registerForNotifications ( ) { mCM.registerForDisconnect ( this , com.android.phone.CallNotifier.PHONE_DISCONNECT , null ) ; mCM.registerForDisplayInfo ( this , com.android.phone.CallNotifier.PHONE_STATE_DISPLAYINFO , null ) ; mCM.registerForSignalInfo ( this , com.android.phone.CallNotifier.PHONE_STATE_SIGNALINFO , null ) ; mCM.registerForInCallVoicePrivacyOn ( this , com.android.phone.CallNotifier.PHONE_ENHANCED_VP_ON , null ) ; mCM.registerForInCallVoicePrivacyOff ( this , com.android.phone.CallNotifier.PHONE_ENHANCED_VP_OFF , null ) ; mCM.registerForSuppServiceFailed ( this , com.android.phone.CallNotifier.PHONE_SUPP_SERVICE_FAILED , null ) ; mCM.registerForTtyModeReceived ( this , com.android.phone.CallNotifier.PHONE_TTY_MODE_RECEIVED , null ) ; }
Source:
public java.lang.String getToolTipFor ( int x , int y ) { java.util.Iterator < com.android.tools.perflib.vmtrace.Call > it = mTopCall.getCallHierarchyIterator ( ) ; while ( it.hasNext ( ) ) { com.android.tools.perflib.vmtrace.Call c = it.next ( ) ; fillLayoutBounds ( c , mLayout ) ; if ( mLayout.contains ( x , y ) ) { return formatToolTip ( c ) ; } } return null ; }

Target:
public java.lang.String getToolTipFor ( double x , double y ) { java.util.Iterator < com.android.tools.perflib.vmtrace.Call > it = mTopCall.getCallHierarchyIterator ( ) ; while ( it.hasNext ( ) ) { com.android.tools.perflib.vmtrace.Call c = it.next ( ) ; fillLayoutBounds ( c , mLayout ) ; if ( mLayout.contains ( x , y ) ) { return formatToolTip ( c ) ; } } return null ; }
Source:
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 ; } }

Target:
public boolean put ( java.lang.String key , byte [ ] value ) { return put ( key , value , ( - 1 ) ) ; }
Source:
public static com.android.dx.dex.code.Dop getNextOrNull ( com.android.dx.dex.code.Dop opcode , com.android.dx.dex.DexOptions options ) { boolean suppressExtendedOpcodes = ! ( options.canUseExtendedOpcodes ( ) ) ; for ( ; ; ) { int nextOpcode = opcode.getNextOpcode ( ) ; if ( nextOpcode == ( com.android.dx.io.Opcodes.NO_NEXT ) ) { return null ; } opcode = com.android.dx.dex.code.Dops.get ( nextOpcode ) ; if ( suppressExtendedOpcodes && ( com.android.dx.io.Opcodes.isExtended ( nextOpcode ) ) ) { continue ; } return opcode ; } }

Target:
public static com.android.dx.dex.code.Dop getNextOrNull ( com.android.dx.dex.code.Dop opcode , com.android.dx.dex.DexOptions options ) { int nextOpcode = opcode.getNextOpcode ( ) ; if ( nextOpcode == ( com.android.dx.io.Opcodes.NO_NEXT ) ) { return null ; } opcode = com.android.dx.dex.code.Dops.get ( nextOpcode ) ; return opcode ; }
Source:
public void dragSetData ( org.eclipse.swt.dnd.DragSourceEvent e ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "dragSetData" ) ; if ( org.eclipse.swt.dnd.TextTransfer.getInstance ( ) . isSupportedType ( e.dataType ) ) { e.data = getSelectionAsText ( ) ; return ; } if ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleXmlTransfer.getInstance ( ) . isSupportedType ( e.dataType ) ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "=> SimpleXmlTransfer" ) ; e.data = mDragElements ; return ; } e.detail = org.eclipse.swt.dnd.DND.DROP_NONE ; e.doit = false ; }

Target:
public void dragSetData ( org.eclipse.swt.dnd.DragSourceEvent e ) { if ( org.eclipse.swt.dnd.TextTransfer.getInstance ( ) . isSupportedType ( e.dataType ) ) { e.data = getSelectionAsText ( ) ; return ; } if ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleXmlTransfer.getInstance ( ) . isSupportedType ( e.dataType ) ) { e.data = mDragElements ; return ; } e.detail = org.eclipse.swt.dnd.DND.DROP_NONE ; e.doit = false ; }
Source:
private static java.lang.String adjustLanguageCode ( java.lang.String languageCode ) { java.lang.String adjusted = languageCode.toLowerCase ( java.util.Locale.US ) ; if ( languageCode.equals ( "he" ) ) { adjusted = "iw" ; } else if ( languageCode.equals ( "id" ) ) { adjusted = "in" ; } else if ( languageCode.equals ( "yi" ) ) { adjusted = "ji" ; } return adjusted ; }

Target:
public static java.lang.String adjustLanguageCode ( java.lang.String languageCode ) { java.lang.String adjusted = languageCode.toLowerCase ( java.util.Locale.US ) ; if ( languageCode.equals ( "he" ) ) { adjusted = "iw" ; } else if ( languageCode.equals ( "id" ) ) { adjusted = "in" ; } else if ( languageCode.equals ( "yi" ) ) { adjusted = "ji" ; } return adjusted ; }
Source:
public com.android.bubble.Bubble startBubble ( ) { if ( ! ( com.android.incallui.ReturnToCallController.canShowBubbles ( context ) ) ) { com.android.dialer.common.LogUtil.i ( "ReturnToCallController.startBubble" , "can't show bubble, no permission" ) ; return null ; } com.android.bubble.Bubble returnToCallBubble = com.android.bubble.BubbleComponent.get ( context ) . getBubble ( ) ; returnToCallBubble.setBubbleInfo ( generateBubbleInfo ( ) ) ; returnToCallBubble.show ( ) ; return returnToCallBubble ; }

Target:
private com.android.bubble.Bubble startBubble ( ) { if ( ! ( com.android.incallui.ReturnToCallController.canShowBubbles ( context ) ) ) { com.android.dialer.common.LogUtil.i ( "ReturnToCallController.startBubble" , "can't show bubble, no permission" ) ; return null ; } com.android.bubble.Bubble returnToCallBubble = com.android.bubble.BubbleComponent.get ( context ) . getBubble ( ) ; returnToCallBubble.setBubbleInfo ( generateBubbleInfo ( ) ) ; returnToCallBubble.show ( ) ; return returnToCallBubble ; }
Source:
public void test_verifySignedCertificateTimestamps_withOCSPResponse ( ) throws java.lang.Exception { if ( ! ( org.conscrypt.NativeCrypto.isBoringSSL ) ) { return ; } org.conscrypt.OpenSSLX509Certificate [ ] chain = new org.conscrypt.OpenSSLX509Certificate [ ] { cert , ca } ; byte [ ] ocspResponse = org.conscrypt.TestUtils.readTestFile ( "ocsp-response.der" ) ; org.conscrypt.ct.CTVerificationResult result = ctVerifier.verifySignedCertificateTimestamps ( chain , null , ocspResponse ) ; assertEquals ( 1 , result.getValidSCTs ( ) . size ( ) ) ; assertEquals ( 0 , result.getInvalidSCTs ( ) . size ( ) ) ; }

Target:
public void test_verifySignedCertificateTimestamps_withOCSPResponse ( ) throws java.lang.Exception { org.conscrypt.OpenSSLX509Certificate [ ] chain = new org.conscrypt.OpenSSLX509Certificate [ ] { cert , ca } ; byte [ ] ocspResponse = org.conscrypt.TestUtils.readTestFile ( "ocsp-response.der" ) ; org.conscrypt.ct.CTVerificationResult result = ctVerifier.verifySignedCertificateTimestamps ( chain , null , ocspResponse ) ; assertEquals ( 1 , result.getValidSCTs ( ) . size ( ) ) ; assertEquals ( 0 , result.getInvalidSCTs ( ) . size ( ) ) ; }
Source:
public void testZipFileLargerThan2GiB ( ) throws java.io.IOException { if ( false ) { java.io.File f = libcore.java.util.zip.ZipFileTest.createZipFile ( 1024 , ( ( 3 * 1024 ) * 1024 ) ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { java.util.zip.ZipEntry zipEntry = e.nextElement ( ) ; ++ entryCount ; } assertEquals ( 1024 , entryCount ) ; zipFile.close ( ) ; } }

Target:
public void testZipFileLargerThan2GiB ( ) throws java.io.IOException { if ( false ) { java.io.File f = libcore.java.util.zip.ZipFileTest.createZipFile ( 1024 , ( ( 3 * 1024 ) * 1024 ) ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { e.nextElement ( ) ; ++ entryCount ; } assertEquals ( 1024 , entryCount ) ; zipFile.close ( ) ; } }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ( ( host.length ( ) ) + 7 ) ) ; if ( ( host.indexOf ( ':' ) ) >= 0 ) { builder.append ( '[' ) . append ( host ) . append ( ']' ) ; } else { builder.append ( host ) ; } if ( hasPort ( ) ) { builder.append ( ':' ) . append ( port ) ; } return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ( ( host.length ( ) ) + 8 ) ) ; if ( ( host.indexOf ( ':' ) ) >= 0 ) { builder.append ( '[' ) . append ( host ) . append ( ']' ) ; } else { builder.append ( host ) ; } if ( hasPort ( ) ) { builder.append ( ':' ) . append ( port ) ; } return builder.toString ( ) ; }
Source:
public static boolean checkFolderForPackaging ( java.lang.String folderName ) { return ( ( ( ( ( folderName.equalsIgnoreCase ( "CVS" ) ) == false ) && ( ( folderName.equalsIgnoreCase ( ".svn" ) ) == false ) ) && ( ( folderName.equalsIgnoreCase ( "SCCS" ) ) == false ) ) && ( ( folderName.equalsIgnoreCase ( "META-INF" ) ) == false ) ) && ( ( folderName.startsWith ( "_" ) ) == false ) ; }

Target:
public static boolean checkFolderForPackaging ( java.lang.String folderName ) { return ( ( ( ( ! ( folderName.equalsIgnoreCase ( "CVS" ) ) ) && ( ! ( folderName.equalsIgnoreCase ( ".svn" ) ) ) ) && ( ! ( folderName.equalsIgnoreCase ( "SCCS" ) ) ) ) && ( ! ( folderName.equalsIgnoreCase ( "META-INF" ) ) ) ) && ( ! ( folderName.startsWith ( "_" ) ) ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , float [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }
Source:
public com.android.sdklib.avd.AvdManager.AvdInfo [ ] getBrokenAvds ( ) { synchronized ( mAllAvdList ) { if ( ( mBrokenAvdList ) == null ) { java.util.ArrayList < com.android.sdklib.avd.AvdManager.AvdInfo > list = new java.util.ArrayList < com.android.sdklib.avd.AvdManager.AvdInfo > ( ) ; for ( com.android.sdklib.avd.AvdManager.AvdInfo avd : mBrokenAvdList ) { if ( ( avd.getStatus ( ) ) != ( com.android.sdklib.avd.AvdManager.AvdInfo.AvdStatus.OK ) ) { list.add ( avd ) ; } } mBrokenAvdList = list.toArray ( new com.android.sdklib.avd.AvdManager.AvdInfo [ list.size ( ) ] ) ; } return mBrokenAvdList ; } }

Target:
public com.android.sdklib.avd.AvdManager.AvdInfo [ ] getBrokenAvds ( ) { synchronized ( mAllAvdList ) { if ( ( mBrokenAvdList ) == null ) { java.util.ArrayList < com.android.sdklib.avd.AvdManager.AvdInfo > list = new java.util.ArrayList < com.android.sdklib.avd.AvdManager.AvdInfo > ( ) ; for ( com.android.sdklib.avd.AvdManager.AvdInfo avd : mAllAvdList ) { if ( ( avd.getStatus ( ) ) != ( com.android.sdklib.avd.AvdManager.AvdInfo.AvdStatus.OK ) ) { list.add ( avd ) ; } } mBrokenAvdList = list.toArray ( new com.android.sdklib.avd.AvdManager.AvdInfo [ list.size ( ) ] ) ; } return mBrokenAvdList ; } }
Source:
public void afterHandshake ( int session , int s , int c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] id = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_SESSION_session_id ( session ) ; assertNotNull ( id ) ; assertEquals ( 32 , id.length ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] id = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_SESSION_session_id ( session ) ; assertNotNull ( id ) ; assertEquals ( 32 , id.length ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
public void testAppManager ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "FredVPN.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "HelloCompute.apk" ) ; org.junit.Assert.assertTrue ( "Failed to find FredVPN." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( instrumentation , "TestVPN" , null ) ) ; org.junit.Assert.assertTrue ( "Failed to find RsHelloCompute." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( instrumentation , "RsHelloCompute" , null ) ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( instrumentation , "TestVPN" , null ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( instrumentation , "RsHelloCompute" , null ) ; }

Target:
public void testAppManager ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; org.junit.Assert.assertTrue ( "Failed to find FredVPN." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( instrumentation , "TestVPN" , null ) ) ; org.junit.Assert.assertTrue ( "Failed to find RsHelloCompute." , com.android.devtools.systemimage.uitest.utils.AppManager.isAppInstalled ( instrumentation , "RsHelloCompute" , null ) ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.internal.policy.impl.GlobalActions.MESSAGE_DISMISS : if ( ( mDialog ) != null ) { mDialog.dismiss ( ) ; } break ; case com.android.internal.policy.impl.GlobalActions.MESSAGE_REFRESH : refreshSilentMode ( ) ; mAdapter.notifyDataSetChanged ( ) ; break ; case com.android.internal.policy.impl.GlobalActions.MESSAGE_SHOW : handleShow ( ) ; break ; } }

Target:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.internal.policy.impl.GlobalActions.MESSAGE_DISMISS : if ( ( mDialog ) != null ) { mDialog.dismiss ( ) ; mDialog = null ; } break ; case com.android.internal.policy.impl.GlobalActions.MESSAGE_REFRESH : refreshSilentMode ( ) ; mAdapter.notifyDataSetChanged ( ) ; break ; case com.android.internal.policy.impl.GlobalActions.MESSAGE_SHOW : handleShow ( ) ; break ; } }
Source:
public void run ( ) { final org.eclipse.swt.graphics.Image image = com.android.hierarchyviewerlib.device.DeviceBridge.loadCapture ( viewNode.window , viewNode ) ; if ( image != null ) { viewNode.image = image ; com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . notifySelectionChanged ( ) ; org.eclipse.swt.widgets.Display.getDefault ( ) . asyncExec ( new java.lang.Runnable ( ) { public void run ( ) { com.android.hierarchyviewerlib.ui.CaptureDisplay.show ( shell , viewNode , image ) ; } } ) ; } }

Target:
public void run ( ) { final org.eclipse.swt.graphics.Image image = loadCapture ( viewNode ) ; if ( image != null ) { org.eclipse.swt.widgets.Display.getDefault ( ) . asyncExec ( new java.lang.Runnable ( ) { public void run ( ) { com.android.hierarchyviewerlib.ui.CaptureDisplay.show ( shell , viewNode , image ) ; } } ) ; } }
Source:
public boolean tryEnterIf ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( lock.tryLock ( ) ) ) { return false ; } boolean satisfied = false ; try { satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } return satisfied ; }

Target:
public boolean tryEnterIf ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( lock.tryLock ( ) ) ) { return false ; } boolean satisfied = false ; try { return satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } }
Source:
private boolean isRtt ( ) { return ( ( ( mOriginalConnection ) != null ) && ( ( mOriginalConnection.getPhoneType ( ) ) == ( com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS ) ) ) && ( ( ( com.android.internal.telephony.imsphone.ImsPhoneConnection ) ( mOriginalConnection ) ) . isRttEnabledForCall ( ) ) ; }

Target:
private boolean isRtt ( ) { return ( ( ( ( mOriginalConnection ) != null ) && ( ( mOriginalConnection.getPhoneType ( ) ) == ( com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS ) ) ) && ( ( mOriginalConnection ) instanceof com.android.internal.telephony.imsphone.ImsPhoneConnection ) ) && ( ( ( com.android.internal.telephony.imsphone.ImsPhoneConnection ) ( mOriginalConnection ) ) . isRttEnabledForCall ( ) ) ; }
Source:
public byte [ ] inflate ( byte [ ] bytes ) throws java.io.IOException { java.io.InputStream in = new java.util.zip.InflaterInputStream ( new java.io.ByteArrayInputStream ( bytes ) ) ; java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 1024 ] ; int count ; while ( ( count = in.read ( buffer ) ) != ( - 1 ) ) { out.write ( buffer , 0 , count ) ; } return out.toByteArray ( ) ; }

Target:
public byte [ ] inflate ( byte [ ] bytes ) throws java.io.IOException { try ( java.io.InputStream in = new java.util.zip.InflaterInputStream ( new java.io.ByteArrayInputStream ( bytes ) ) ) { java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 1024 ] ; int count ; while ( ( count = in.read ( buffer ) ) != ( - 1 ) ) { out.write ( buffer , 0 , count ) ; } return out.toByteArray ( ) ; } }
Source:
public static void showTimeEditDialog ( android.app.FragmentManager manager , final com.android.deskclock.Alarm alarm ) { final android.app.FragmentTransaction ft = manager.beginTransaction ( ) ; final android.app.Fragment prev = manager.findFragmentByTag ( "time_dialog" ) ; if ( prev != null ) { ft.remove ( prev ) ; } ft.addToBackStack ( null ) ; final com.android.deskclock.AlarmTimePickerDialogFragment fragment = com.android.deskclock.AlarmTimePickerDialogFragment.newInstance ( alarm ) ; fragment.show ( ft , "time_dialog" ) ; }

Target:
public static void showTimeEditDialog ( android.app.FragmentManager manager , final com.android.deskclock.Alarm alarm ) { final android.app.FragmentTransaction ft = manager.beginTransaction ( ) ; final android.app.Fragment prev = manager.findFragmentByTag ( "time_dialog" ) ; if ( prev != null ) { ft.remove ( prev ) ; } final com.android.deskclock.AlarmTimePickerDialogFragment fragment = com.android.deskclock.AlarmTimePickerDialogFragment.newInstance ( alarm ) ; fragment.show ( ft , "time_dialog" ) ; }
Source:
public static void computeFloor ( android.renderscript.cts.TestFloor.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 0 , 0 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.in ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.floor ( args.in ) , android.renderscript.cts.CoreMathVerifier.floor ( in.min32 ( ) ) , android.renderscript.cts.CoreMathVerifier.floor ( in.max32 ( ) ) ) ; }

Target:
public static void computeFloor ( android.renderscript.cts.TestFloor.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 0 , 0 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inV ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.floor ( args.inV ) , android.renderscript.cts.CoreMathVerifier.floor ( in.min32 ( ) ) , android.renderscript.cts.CoreMathVerifier.floor ( in.max32 ( ) ) ) ; }
Source:
public static < T extends com.google.protobuf.nano.MessageNano > java.lang.String print ( T message ) { if ( message == null ) { return "" ; } java.lang.StringBuffer buf = new java.lang.StringBuffer ( ) ; try { com.google.protobuf.nano.MessageNanoPrinter.print ( null , message.getClass ( ) , message , new java.lang.StringBuffer ( ) , buf ) ; } catch ( java.lang.IllegalAccessException e ) { return "Error printing proto: " + ( e.getMessage ( ) ) ; } return buf.toString ( ) ; }

Target:
public static < T extends com.google.protobuf.nano.MessageNano > java.lang.String print ( T message ) { if ( message == null ) { return "" ; } java.lang.StringBuffer buf = new java.lang.StringBuffer ( ) ; try { com.google.protobuf.nano.MessageNanoPrinter.print ( null , message , new java.lang.StringBuffer ( ) , buf ) ; } catch ( java.lang.IllegalAccessException e ) { return "Error printing proto: " + ( e.getMessage ( ) ) ; } return buf.toString ( ) ; }
Source:
private org.jetbrains.jps.builders.java.dependencyView.TIntHashSet addAllSubclasses ( final int root , final org.jetbrains.jps.builders.java.dependencyView.TIntHashSet acc ) { final org.jetbrains.jps.builders.java.dependencyView.TIntHashSet directSubclasses = myClassToSubclasses.get ( root ) ; acc.add ( root ) ; if ( directSubclasses != null ) { directSubclasses.forEach ( new org.jetbrains.jps.builders.java.dependencyView.TIntProcedure ( ) { @ java.lang.Override public boolean execute ( int s ) { if ( ! ( acc.contains ( s ) ) ) { addAllSubclasses ( s , acc ) ; } return true ; } } ) ; } return acc ; }

Target:
private org.jetbrains.jps.builders.java.dependencyView.TIntHashSet addAllSubclasses ( final int root , final org.jetbrains.jps.builders.java.dependencyView.TIntHashSet acc ) { if ( ! ( acc.add ( root ) ) ) { return acc ; } final org.jetbrains.jps.builders.java.dependencyView.TIntHashSet directSubclasses = myClassToSubclasses.get ( root ) ; if ( directSubclasses != null ) { directSubclasses.forEach ( new org.jetbrains.jps.builders.java.dependencyView.TIntProcedure ( ) { @ java.lang.Override public boolean execute ( int s ) { addAllSubclasses ( s , acc ) ; return true ; } } ) ; } return acc ; }
Source:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet , int dexoptNeeded ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , instructionSet , dexoptNeeded ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet , int dexoptNeeded ) { return dexopt ( apkPath , uid , isPublic , instructionSet , dexoptNeeded , true ) ; }
Source:
protected static final android.os.Parcel obtain ( int obj ) { final android.os.Parcel [ ] pool = android.os.Parcel.sHolderPool ; synchronized ( pool ) { android.os.Parcel p ; for ( int i = 0 ; i < ( android.os.Parcel.POOL_SIZE ) ; i ++ ) { p = pool [ i ] ; if ( p != null ) { pool [ i ] = null ; if ( android.os.Parcel.DEBUG_RECYCLE ) { p.mStack = new java.lang.RuntimeException ( ) ; } p.init ( obj ) ; return p ; } } } return new android.os.Parcel ( obj ) ; }

Target:
protected static final android.os.Parcel obtain ( long obj ) { final android.os.Parcel [ ] pool = android.os.Parcel.sHolderPool ; synchronized ( pool ) { android.os.Parcel p ; for ( int i = 0 ; i < ( android.os.Parcel.POOL_SIZE ) ; i ++ ) { p = pool [ i ] ; if ( p != null ) { pool [ i ] = null ; if ( android.os.Parcel.DEBUG_RECYCLE ) { p.mStack = new java.lang.RuntimeException ( ) ; } p.init ( obj ) ; return p ; } } } return new android.os.Parcel ( obj ) ; }
Source:
public com.android.dialer.assisteddialing.TransformationInfo getAssistedDialingExtras ( ) { if ( isAssistedDialed ( ) ) { return com.android.dialer.assisteddialing.TransformationInfo.newInstanceFromBundle ( getIntentExtras ( ) . getBundle ( TelephonyManagerCompat.ASSISTED_DIALING_EXTRAS ) ) ; } return null ; }

Target:
public com.android.dialer.assisteddialing.TransformationInfo getAssistedDialingExtras ( ) { if ( ( getIntentExtras ( ) ) == null ) { return null ; } if ( ( getIntentExtras ( ) . getBundle ( TelephonyManagerCompat.ASSISTED_DIALING_EXTRAS ) ) == null ) { return null ; } return com.android.dialer.assisteddialing.TransformationInfo.newInstanceFromBundle ( getIntentExtras ( ) . getBundle ( TelephonyManagerCompat.ASSISTED_DIALING_EXTRAS ) ) ; }
Source:
private void loadInternalDataFromUserStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations , java.util.Set < java.lang.String > deletedEphemeralSSIDs ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from user store " + ( configuration.configKey ( ) ) ) ) ; } addMissingPskPassphraseQuotes ( configuration ) ; mConfiguredNetworks.put ( configuration ) ; } for ( java.lang.String ssid : deletedEphemeralSSIDs ) { mDeletedEphemeralSSIDs.add ( ssid ) ; } }

Target:
private void loadInternalDataFromUserStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations , java.util.Set < java.lang.String > deletedEphemeralSSIDs ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from user store " + ( configuration.configKey ( ) ) ) ) ; } mConfiguredNetworks.put ( configuration ) ; } for ( java.lang.String ssid : deletedEphemeralSSIDs ) { mDeletedEphemeralSSIDs.add ( ssid ) ; } }
Source:
public void loggedRun ( ) { synchronized ( mLock ) { if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 0 ) { android.telecom.Log.wtf ( this , "Over-releasing focus for tone player." ) ; } else if ( ( -- ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ) == 0 ) { mCallAudioManager.setIsTonePlaying ( false ) ; } } }

Target:
public void loggedRun ( ) { if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 0 ) { android.telecom.Log.wtf ( this , "Over-releasing focus for tone player." ) ; } else if ( ( -- ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ) == 0 ) { mCallAudioManager.setIsTonePlaying ( false ) ; } }
Source:
public void testProgramsGenresEncode ( ) { if ( ! ( android.media.tv.cts.Utils.hasTvInputFramework ( getContext ( ) ) ) ) { return ; } assertEquals ( android.media.tv.cts.TvContractTest.ENCODED_GENRE_STRING , android.media.tv.TvContract.Programs.Genres.encode ( Genres.ANIMAL_WILDLIFE , Genres.COMEDY , Genres.DRAMA , Genres.EDUCATION , Genres.FAMILY_KIDS , Genres.GAMING , Genres.MOVIES , Genres.NEWS , Genres.SHOPPING , Genres.SPORTS , Genres.TRAVEL ) ) ; BRANCH ( ) ; }

Target:
public void testProgramsGenresEncode ( ) { if ( ! ( android.media.tv.cts.Utils.hasTvInputFramework ( getContext ( ) ) ) ) { return ; } assertEquals ( android.media.tv.cts.TvContractTest.ENCODED_GENRE_STRING , android.media.tv.TvContract.Programs.Genres.encode ( Genres.ANIMAL_WILDLIFE , Genres.COMEDY , Genres.DRAMA , Genres.EDUCATION , Genres.FAMILY_KIDS , Genres.GAMING , Genres.MOVIES , Genres.NEWS , Genres.SHOPPING , Genres.SPORTS , Genres.TRAVEL ) ) ; }
Source:
public void testSaveProperties ( ) { java.util.Properties expected = createExpectedProps ( ) ; com.android.sdklib.internal.repository.packages.MockExtraPackage p = new com.android.sdklib.internal.repository.packages.MockExtraPackage ( null , expected , "vendor" , "the_path" , ( - 1 ) , null , null , null , com.android.sdklib.internal.repository.archives.Archive.Os.ANY , com.android.sdklib.internal.repository.archives.Archive.Arch.ANY , LOCAL_ARCHIVE_PATH ) ; java.util.Properties actual = new java.util.Properties ( ) ; p.saveProperties ( actual ) ; assertEquals ( expected , actual ) ; }

Target:
public void testSaveProperties ( ) { java.util.Properties expected = createExpectedProps ( ) ; com.android.sdklib.internal.repository.packages.MockExtraPackage p = new com.android.sdklib.internal.repository.packages.MockExtraPackage ( null , expected , "vendor" , "the_path" , ( - 1 ) , null , null , null , LOCAL_ARCHIVE_PATH ) ; java.util.Properties actual = new java.util.Properties ( ) ; p.saveProperties ( actual ) ; assertEquals ( expected , actual ) ; }
Source:
private int [ ] readChunkLengths ( java.io.BufferedInputStream bundle ) throws java.io.IOException { int [ ] chunks = new int [ 4 ] ; chunks [ 0 ] = readInt ( bundle ) ; chunks [ 1 ] = readInt ( bundle ) ; chunks [ 2 ] = readInt ( bundle ) ; chunks [ 3 ] = readInt ( bundle ) ; return chunks ; }

Target:
private int [ ] readChunkLengths ( java.io.BufferedInputStream bundle ) throws java.io.IOException { int [ ] chunks = new int [ 6 ] ; chunks [ 0 ] = readInt ( bundle ) ; chunks [ 1 ] = readInt ( bundle ) ; chunks [ 2 ] = readInt ( bundle ) ; chunks [ 3 ] = readInt ( bundle ) ; chunks [ 4 ] = readInt ( bundle ) ; chunks [ 5 ] = readInt ( bundle ) ; return chunks ; }
Source:
private void testTrace ( java.lang.String traceName , java.lang.String threadName , java.lang.String expectedCallSequence ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( traceName ) ; int threadId = findThreadIdFromName ( threadName , traceData.getThreads ( ) ) ; assertTrue ( java.lang.String.format ( "Thread %s was not found in the trace" , threadName ) , ( threadId > 0 ) ) ; com.android.tools.perflib.vmtrace.Call call = traceData.getTopLevelCall ( threadId ) ; java.lang.String actual = call.format ( new com.android.tools.perflib.vmtrace.VmTraceParserTest.CallFormatter ( traceData.getMethods ( ) ) ) ; assertEquals ( expectedCallSequence , actual ) ; }

Target:
private void testTrace ( java.lang.String traceName , java.lang.String threadName , java.lang.String expectedCallSequence ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( traceName ) ; int threadId = findThreadIdFromName ( threadName , traceData.getThreads ( ) ) ; assertTrue ( java.lang.String.format ( "Thread %s was not found in the trace" , threadName ) , ( threadId > 0 ) ) ; com.android.tools.perflib.vmtrace.Call call = traceData.getTopLevelCall ( threadId ) ; assertNotNull ( call ) ; java.lang.String actual = call.format ( new com.android.tools.perflib.vmtrace.VmTraceParserTest.CallFormatter ( traceData.getMethods ( ) ) ) ; assertEquals ( expectedCallSequence , actual ) ; }
Source:
protected int compareTo0 ( com.android.jack.dx.rop.cst.Constant other ) { int cmp = super . compareTo0 ( other ) ; if ( cmp != 0 ) { return cmp ; } com.android.jack.dx.rop.cst.CstFieldRef otherField = ( ( com.android.jack.dx.rop.cst.CstFieldRef ) ( other ) ) ; com.android.jack.dx.rop.cst.CstString thisDescriptor = getDescriptor ( ) ; com.android.jack.dx.rop.cst.CstString otherDescriptor = otherField.getDescriptor ( ) ; return thisDescriptor.compareTo ( otherDescriptor ) ; }

Target:
protected int compareTo0 ( com.android.jack.dx.rop.cst.Constant other ) { int cmp = super . compareTo0 ( other ) ; if ( cmp != 0 ) { return cmp ; } com.android.jack.dx.rop.cst.CstFieldRef otherField = ( ( com.android.jack.dx.rop.cst.CstFieldRef ) ( other ) ) ; return type.compareTo ( otherField.type ) ; }
Source:
public com.android.jack.ir.ast.JArrayLiteral exportAsJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ExportSession exportSession ) throws com.android.jack.ir.ast.JTypeLookupException , com.android.jack.lookup.JMethodLookupException { assert ( sourceInfo ) != null ; java.util.List < com.android.jack.ir.ast.JLiteral > jValues = new java.util.ArrayList < com.android.jack.ir.ast.JLiteral > ( ) ; for ( com.android.jack.jayce.v0002.nodes.NLiteral value : values ) { jValues.add ( value.exportAsJast ( exportSession ) ) ; } com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JArrayLiteral jArrayLiteral = new com.android.jack.ir.ast.JArrayLiteral ( jSourceInfo , jValues ) ; return jArrayLiteral ; }

Target:
public com.android.jack.ir.ast.JArrayLiteral exportAsJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ExportSession exportSession ) throws com.android.jack.ir.ast.JTypeLookupException , com.android.jack.lookup.JMethodLookupException { assert ( sourceInfo ) != null ; java.util.List < com.android.jack.ir.ast.JLiteral > jValues = new java.util.ArrayList < com.android.jack.ir.ast.JLiteral > ( values.size ( ) ) ; for ( com.android.jack.jayce.v0002.nodes.NLiteral value : values ) { jValues.add ( value.exportAsJast ( exportSession ) ) ; } com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JArrayLiteral jArrayLiteral = new com.android.jack.ir.ast.JArrayLiteral ( jSourceInfo , jValues ) ; return jArrayLiteral ; }
Source:
public void testToXml4 ( ) throws java.lang.Exception { java.lang.String xml = "" + ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<!-- ============== -->\n" ) + "<!-- Generic styles -->\n" ) + "<!-- ============== -->\n" ) + "<root/>" ) ; org.w3c.dom.Document doc = com.android.utils.XmlUtilsTest.parse ( xml ) ; xml = com.android.utils.XmlUtils.toXml ( doc , true ) ; assertEquals ( ( "" + ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<!-- ============== --><!-- Generic styles --><!-- ============== --><root/>" ) ) , xml ) ; }

Target:
public void testToXml4 ( ) throws java.lang.Exception { java.lang.String xml = "" + ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<!-- ============== -->\n" ) + "<!-- Generic styles -->\n" ) + "<!-- ============== -->\n" ) + "<root/>" ) ; org.w3c.dom.Document doc = com.android.utils.XmlUtilsTest.parse ( xml ) ; xml = com.android.utils.XmlUtils.toXml ( doc ) ; assertEquals ( ( "" + ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<!-- ============== --><!-- Generic styles --><!-- ============== --><root/>" ) ) , xml ) ; }
Source:
public void testAbiOnlyWithMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testAbiOnlyWithMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 2 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 3 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }
Source:
private void showAvdManagerWindow ( ) { try { com.android.sdkuilib.internal.widgets.MessageBoxLog errorLogger = new com.android.sdkuilib.internal.widgets.MessageBoxLog ( "AVD Manager" , org.eclipse.swt.widgets.Display.getCurrent ( ) , true ) ; com.android.sdkuilib.repository.AvdManagerWindow window = new com.android.sdkuilib.repository.AvdManagerWindow ( null , errorLogger , mOsSdkFolder , com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext.STANDALONE ) ; window.registerPage ( com.android.sdkmanager.internal.repository.SettingsPage.class , UpdaterPage.Purpose.SETTINGS ) ; window.registerPage ( com.android.sdkmanager.internal.repository.AboutPage.class , UpdaterPage.Purpose.ABOUT_BOX ) ; window.open ( ) ; errorLogger.displayResult ( true ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }

Target:
private void showAvdManagerWindow ( ) { try { com.android.sdkuilib.internal.widgets.MessageBoxLog errorLogger = new com.android.sdkuilib.internal.widgets.MessageBoxLog ( "AVD Manager" , org.eclipse.swt.widgets.Display.getCurrent ( ) , true ) ; com.android.sdkuilib.repository.AvdManagerWindow window = new com.android.sdkuilib.repository.AvdManagerWindow ( null , errorLogger , mOsSdkFolder , com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext.STANDALONE ) ; window.open ( ) ; errorLogger.displayResult ( true ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }
Source:
public void test_SSLSocket_getEnabledProtocols ( ) throws java.lang.Exception { javax.net.ssl.SSLSocketFactory sf = ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; javax.net.ssl.SSLSocket ssl = ( ( javax.net.ssl.SSLSocket ) ( sf.createSocket ( ) ) ) ; java.lang.String [ ] protocols = ssl.getEnabledProtocols ( ) ; libcore.java.security.StandardNames.assertValidProtocols ( StandardNames.SSL_SOCKET_PROTOCOLS , protocols ) ; assertNotSame ( protocols , ssl.getEnabledProtocols ( ) ) ; }

Target:
public void test_SSLSocket_getEnabledProtocols ( ) throws java.lang.Exception { javax.net.ssl.SSLSocketFactory sf = ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; javax.net.ssl.SSLSocket ssl = ( ( javax.net.ssl.SSLSocket ) ( sf.createSocket ( ) ) ) ; java.lang.String [ ] protocols = ssl.getEnabledProtocols ( ) ; libcore.java.security.StandardNames.assertValidProtocols ( protocols ) ; assertNotSame ( protocols , ssl.getEnabledProtocols ( ) ) ; }
Source:
private android.telecom.ParcelableConnection parcelable ( com.android.server.telecom.tests.ConnectionServiceFixture.ConnectionInfo c ) { return new android.telecom.ParcelableConnection ( c.request.getAccountHandle ( ) , c.state , c.capabilities , c.properties , c.supportedAudioRoutes , c.request.getAddress ( ) , c.addressPresentation , c.callerDisplayName , c.callerDisplayNamePresentation , c.videoProvider , c.videoState , false , false , 0 , c.statusHints , c.disconnectCause , c.conferenceableConnectionIds , c.extras ) ; }

Target:
private android.telecom.ParcelableConnection parcelable ( com.android.server.telecom.tests.ConnectionServiceFixture.ConnectionInfo c ) { return new android.telecom.ParcelableConnection ( c.request.getAccountHandle ( ) , c.state , c.capabilities , c.properties , c.supportedAudioRoutes , c.request.getAddress ( ) , c.addressPresentation , c.callerDisplayName , c.callerDisplayNamePresentation , c.videoProvider , c.videoState , false , false , 0 , 0 , c.statusHints , c.disconnectCause , c.conferenceableConnectionIds , c.extras ) ; }
Source:
public final java.nio.ByteBuffer putInt ( int x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putInt ( ix ( nextPutIndex ( SizeOf.INT ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putInt ( int x ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } putInt ( ix ( nextPutIndex ( SizeOf.INT ) ) , x ) ; return this ; }
Source:
void test ( ) { java.lang.String listeners = android.provider.Settings.Secure.getString ( getContentResolver ( ) , com.android.cts.verifier.notifications.ENABLED_NOTIFICATION_LISTENERS ) ; if ( ( listeners == null ) || ( ! ( listeners.contains ( com.android.cts.verifier.notifications.LISTENER_PATH ) ) ) ) { status = PASS ; } else { status = WAIT_FOR_USER ; } next ( ) ; }

Target:
void test ( ) { java.lang.String listeners = android.provider.Settings.Secure.getString ( getContentResolver ( ) , com.android.cts.verifier.notifications.ENABLED_NOTIFICATION_LISTENERS ) ; if ( ( listeners == null ) || ( ! ( listeners.contains ( com.android.cts.verifier.notifications.LISTENER_PATH ) ) ) ) { status = PASS ; } else { status = WAIT_FOR_USER ; } }
Source:
public static boolean storeUnknownField ( final java.util.List < com.google.protobuf.nano.UnknownFieldData > data , final com.google.protobuf.nano.CodedInputByteBufferNano input , final int tag ) throws java.io.IOException { int startPos = input.getPosition ( ) ; boolean skip = input.skipField ( tag ) ; int endPos = input.getPosition ( ) ; byte [ ] bytes = input.getData ( startPos , ( endPos - startPos ) ) ; data.add ( new com.google.protobuf.nano.UnknownFieldData ( tag , bytes ) ) ; return skip ; }

Target:
public static boolean storeUnknownField ( final java.util.List < com.google.protobuf.nano.UnknownFieldData > data , final com.google.protobuf.nano.CodedInputByteBufferNano input , final int tag ) throws java.io.IOException { int startPos = input.getPosition ( ) ; if ( ! ( input.skipField ( tag ) ) ) { return false ; } int endPos = input.getPosition ( ) ; byte [ ] bytes = input.getData ( startPos , ( endPos - startPos ) ) ; data.add ( new com.google.protobuf.nano.UnknownFieldData ( tag , bytes ) ) ; return true ; }
Source:
public void testConnectWithConfig ( ) { android.net.wifi.nan.ConfigRequest configRequest = new android.net.wifi.nan.ConfigRequest.Builder ( ) . setMasterPreference ( 55 ) . build ( ) ; java.lang.String callingPackage = "com.google.somePackage" ; mDut.connect ( mBinderMock , callingPackage , mCallbackMock , configRequest ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . connect ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.eq ( callingPackage ) , org.mockito.Matchers.eq ( mCallbackMock ) , org.mockito.Matchers.eq ( configRequest ) ) ; }

Target:
public void testConnectWithConfig ( ) { android.net.wifi.nan.ConfigRequest configRequest = new android.net.wifi.nan.ConfigRequest.Builder ( ) . setMasterPreference ( 55 ) . build ( ) ; java.lang.String callingPackage = "com.google.somePackage" ; mDut.connect ( mBinderMock , callingPackage , mCallbackMock , configRequest , false ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . connect ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.eq ( callingPackage ) , org.mockito.Matchers.eq ( mCallbackMock ) , org.mockito.Matchers.eq ( configRequest ) , org.mockito.Matchers.eq ( false ) ) ; }
Source:
public boolean setCountryCodeHal ( java.lang.String CountryCode ) { try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.setCountryCodeHal ( CountryCode ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } legacyHalWarning ( ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.setCountryCodeHalNative ( com.android.server.wifi.WifiNative.sWlan0Index , CountryCode ) ; } else { return false ; } } }

Target:
public boolean setCountryCodeHal ( java.lang.String CountryCode ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.setCountryCodeHalNative ( com.android.server.wifi.WifiNative.sWlan0Index , CountryCode ) ; } else { return false ; } } }
Source:
private void addRemotePlatform ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , com.android.sdklib.repository.FullRevision minToolsRev ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newPlatform ( version , revision , minToolsRev ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemotePlatform ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , com.android.sdklib.repository.FullRevision minToolsRev ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newPlatform ( version , revision , minToolsRev ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource , 0 ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }