auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendVmApplicationResource resource = getNotFoundResource ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendVmApplicationResource resource = getNotFoundResource ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
private void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
public void starting ( org.junit.runners.model.FrameworkMethod method ) { java.lang.String seedProperty = java.lang.System.getProperty ( org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; java.lang.Long seed = org.ovirt.engine.core.compat.LongCompat.tryParse ( seedProperty ) ; if ( seed == null ) { org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.infoFormat ( "Property \"{0}\" was not set, using System.currentTimeMillis() as a seed." , org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; seed = java.lang.System.currentTimeMillis ( ) ; } org.ovirt.engine.core.utils.RandomUtils.instance ( ) . setSeed ( seed ) ; org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.info ( ( "Running test with random seed: " + ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . getSeed ( ) ) ) ) ; }

Target:
public void starting ( org.junit.runner.Description description ) { java.lang.String seedProperty = java.lang.System.getProperty ( org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; java.lang.Long seed = org.ovirt.engine.core.compat.LongCompat.tryParse ( seedProperty ) ; if ( seed == null ) { org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.infoFormat ( "Property \"{0}\" was not set, using System.currentTimeMillis() as a seed." , org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; seed = java.lang.System.currentTimeMillis ( ) ; } org.ovirt.engine.core.utils.RandomUtils.instance ( ) . setSeed ( seed ) ; org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.info ( ( "Running test with random seed: " + ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . getSeed ( ) ) ) ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; return performAction ( VdcActionType.RemoveStoragePool , new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( asGuid ( id ) ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.StoragePoolParametersBase params = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( asGuid ( id ) ) ; boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendDataCenterResource.FORCE , true , false ) ; if ( force ) { params.setForceDelete ( force ) ; } return performAction ( VdcActionType.RemoveStoragePool , params ) ; }
Source:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public org.ovirt.engineextensions.aaa.ldap.LDAPConnectionPool getConnectionPool ( java.lang.String name ) { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "Entry name='{}'" , name ) ; org.ovirt.engineextensions.aaa.ldap.Framework.ConnectionPoolEntry entry = connectionPools.get ( name ) ; if ( entry == null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "No connection pool '%s'" , name ) ) ; } return entry.connectionPool ; }

Target:
public org.ovirt.engineextensions.aaa.ldap.LDAPConnectionPool getConnectionPool ( java.lang.String name ) { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "getConnectionPool Entry name='{}'" , name ) ; org.ovirt.engineextensions.aaa.ldap.Framework.ConnectionPoolEntry entry = connectionPools.get ( name ) ; if ( entry == null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "No connection pool '%s'" , name ) ) ; } return entry.connectionPool ; }
Source:
public void flushToPrivateModel ( ) { if ( spiceRadioButton.asRadioButton ( ) . getValue ( ) ) { setSelectedProtocol ( ConsoleProtocol.SPICE ) ; setSelectedSpiceImpl ( ) ; } else if ( remoteDesktopRadioButton.asRadioButton ( ) . getValue ( ) ) { setSelectedProtocol ( ConsoleProtocol.RDP ) ; } else if ( vncRadioButton.asRadioButton ( ) . getValue ( ) ) { setSelectedProtocol ( ConsoleProtocol.VNC ) ; } flushCheckBoxes ( ctrlAltDel , enableUsbAutoshare , openInFullScreen , enableSpiceProxy , useLocalDrives , wanEnabled , disableSmartcard ) ; }

Target:
public void flushToPrivateModel ( ) { if ( spiceRadioButton.asRadioButton ( ) . getValue ( ) ) { setSelectedProtocol ( ConsoleProtocol.SPICE ) ; setSelectedSpiceImpl ( ) ; } else if ( remoteDesktopRadioButton.asRadioButton ( ) . getValue ( ) ) { setSelectedProtocol ( ConsoleProtocol.RDP ) ; setSelectedRdpImpl ( ) ; } else if ( vncRadioButton.asRadioButton ( ) . getValue ( ) ) { setSelectedProtocol ( ConsoleProtocol.VNC ) ; } flushCheckBoxes ( ctrlAltDel , enableUsbAutoshare , openInFullScreen , enableSpiceProxy , useLocalDrives , wanEnabled , disableSmartcard ) ; }
Source:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc resizeStorageDomainPV ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.resizePV" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "guid" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "size" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturn resizeStorageDomainPV ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.resizePV" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "guid" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "size" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturn ( response ) ; }
Source:
public static void GetDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void GetClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel storageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( model ) ) ; java.lang.Iterable < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; storageModel.PostUpdateHost ( hosts ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel storageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( model ) ) ; java.lang.Iterable < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; storageModel.postUpdateHost ( hosts ) ; }
Source:
public void testRemoveRoleGroupMap ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > before = dao.getAllForRole ( org.ovirt.engine.core.dao.RoleGroupMapDaoTest.EXISTING_ROLE_ID ) ; org.junit.Assert.assertFalse ( before.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : before ) { dao.remove ( map.getActionGroup ( ) , map.getRoleId ( ) ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > after = dao.getAllForRole ( org.ovirt.engine.core.dao.RoleGroupMapDaoTest.EXISTING_ROLE_ID ) ; org.junit.Assert.assertTrue ( after.isEmpty ( ) ) ; }

Target:
public void testRemoveRoleGroupMap ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > before = dao.getAllForRole ( FixturesTool.ROLE_ID ) ; org.junit.Assert.assertFalse ( before.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : before ) { dao.remove ( map.getActionGroup ( ) , map.getRoleId ( ) ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > after = dao.getAllForRole ( FixturesTool.ROLE_ID ) ; org.junit.Assert.assertTrue ( after.isEmpty ( ) ) ; }
Source:
public static java.util.Date getLastWriteTime ( java.lang.Object filename ) { try { java.io.File file = new java.io.File ( filename.toString ( ) ) ; return new java.util.Date ( file.lastModified ( ) ) ; } catch ( java.lang.Exception e ) { throw new org.ovirt.engine.core.compat.CompatException ( e ) ; } }

Target:
public static java.util.Date getLastWriteTime ( java.lang.Object filename ) { try { java.io.File file = new java.io.File ( filename.toString ( ) ) ; return new java.util.Date ( file.lastModified ( ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( ! ( getGlusterTaskUtils ( ) . isTaskOfType ( glusterVolume , GlusterTaskType.REBALANCE ) ) ) || ( ! ( getGlusterTaskUtils ( ) . isTaskStatus ( glusterVolume , JobExecutionStatus.STARTED ) ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REBALANCE_NOT_STARTED ) ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( super . validate ( ) ) ) { return false ; } if ( ( ! ( getGlusterTaskUtils ( ) . isTaskOfType ( glusterVolume , GlusterTaskType.REBALANCE ) ) ) || ( ! ( getGlusterTaskUtils ( ) . isTaskStatus ( glusterVolume , JobExecutionStatus.STARTED ) ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REBALANCE_NOT_STARTED ) ; } return true ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 3 , VMStatus.Down ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { "VmStaticData.IsoPath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH } , true , true ) ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 3 , VMStatus.Down ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { "VmStaticData.IsoPath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH } , true , true ) ) ; org.ovirt.engine.api.model.Cdrom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }
Source:
public void testGetEntityPermissionsByUserAndGroups ( ) { org.junit.Assert.assertNotNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDaoTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.RUN_VM , org.ovirt.engine.core.dao.PermissionDaoTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; org.junit.Assert.assertNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDaoTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.CREATE_TEMPLATE , org.ovirt.engine.core.dao.PermissionDaoTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; }

Target:
public void testGetEntityPermissionsByUserAndGroups ( ) { org.junit.jupiter.api.Assertions.assertNotNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDaoTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.RUN_VM , org.ovirt.engine.core.dao.PermissionDaoTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; org.junit.jupiter.api.Assertions.assertNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDaoTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.CREATE_TEMPLATE , org.ovirt.engine.core.dao.PermissionDaoTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( getNic ( ) ) == null ) { return failCanDoAction ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; } if ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( getNic ( ) ) ) ) || ( ! ( getNic ( ) . getLabels ( ) . contains ( getLabel ( ) ) ) ) ) { return failCanDoAction ( EngineMessage.INTERFACE_NOT_LABELED ) ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.compat.Guid nicId = org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.getParameters ( ) . getNicId ( ) ; org.ovirt.engine.core.bll.validator.HostInterfaceValidator hostInterfaceValidator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( getNic ( ) ) ; return ( validate ( hostInterfaceValidator.interfaceExists ( nicId ) ) ) && ( validate ( hostInterfaceValidator.nicIsNotLabeledWithSpecifiedLabel ( getLabel ( ) ) ) ) ; }
Source:
public java.lang.String toString ( ) { return new java.lang.StringBuilder ( "MergeParameters{" ) . append ( super . toString ( ) ) . append ( ", vmId=" ) . append ( vmId ) . append ( ", imageGroupId=" ) . append ( imageGroupId ) . append ( ", imageList=" ) . append ( imageList ) . append ( ", postZero=" ) . append ( postZero ) . append ( ", force=" ) . append ( force ) . append ( '}' ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { return new java.lang.StringBuilder ( "DestroyImageParameters{" ) . append ( super . toString ( ) ) . append ( ", vmId=" ) . append ( vmId ) . append ( ", imageGroupId=" ) . append ( imageGroupId ) . append ( ", imageList=" ) . append ( imageList ) . append ( ", postZero=" ) . append ( postZero ) . append ( ", force=" ) . append ( force ) . append ( '}' ) . toString ( ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command.equals ( getEnableHookCommand ( ) ) ) { enableHook ( ) ; } }

Target:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command.equals ( getEnableHookCommand ( ) ) ) { enableHook ( ) ; } else if ( command.equals ( getDisableHookCommand ( ) ) ) { disableHook ( ) ; } else if ( command.getName ( ) . equals ( "OnDisableHook" ) ) { onDisableHook ( ) ; } else if ( command.getName ( ) . equals ( "OnCancelConfirmation" ) ) { cancelConfirmation ( ) ; } }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = setUpVDSGroupExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToVdsGroup , org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter.class , new java.lang.String [ ] { "VdsGroup" } , new java.lang.Object [ ] { vdsGroup } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpVDSGroupExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToVdsGroup , org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void setUp ( ) throws java.io.IOException , java.security.GeneralSecurityException { this . provider = new org.ovirt.vdsm.jsonrpc.client.TestManagerProvider ( java.lang.ClassLoader.getSystemResourceAsStream ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.KEYSTORE_NAME ) , java.lang.ClassLoader.getSystemResourceAsStream ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.TRUSTSTORE_NAME ) , org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.PASSWORD ) ; javax.net.ssl.SSLContext context = this . provider.getSSLContext ( ) ; this . listeningReactor = new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompReactor ( context ) ; this . sendingReactor = new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompReactor ( context ) ; }

Target:
public void setUp ( ) throws java.io.IOException , java.security.GeneralSecurityException { this . provider = org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.createProvider ( ) ; javax.net.ssl.SSLContext context = this . provider.getSSLContext ( ) ; this . listeningReactor = new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompReactor ( context ) ; this . sendingReactor = new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompReactor ( context ) ; }
Source:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }

Target:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableHaReservationEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableOptionalReasonEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }
Source:
private boolean validBootProtocolForRoleNetwork ( ) { if ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isRoleNetwork ( getNetworkCluster ( ) ) ) ) { return true ; } org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; if ( ipConfiguration == null ) { return false ; } if ( getNetworkCluster ( ) . isMigration ( ) ) { return hasBootProtocol ( ipConfiguration ) ; } return hasIpv4BootProtocol ( ipConfiguration ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForRoleNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster = getNetworkCluster ( ) ; org.ovirt.engine.core.bll.validator.IsRoleNetworkIpConfigurationValid isRoleNetworkIpConfigurationValid = new org.ovirt.engine.core.bll.validator.IsRoleNetworkIpConfigurationValid ( networkCluster ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . unless ( isRoleNetworkIpConfigurationValid.validate ( attachment ) ) ; }
Source:
void initEditors ( ) { volumeTypeListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) ) ; storageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; sourceStorageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; quotaListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.common.businessentities.Quota ) ( object ) ) . getQuotaName ( ) ; } } ) ; }

Target:
void initEditors ( ) { volumeTypeListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.VolumeType > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.VolumeType > ( ) ) ; storageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.StorageDomain > ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ) ; sourceStorageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.StorageDomain > ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ) ; quotaListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.Quota > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.common.businessentities.Quota > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.Quota quota ) { return quota.getQuotaName ( ) ; } } ) ; }
Source:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public static void GetSANWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volume , java.lang.String brick ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , volume , brick , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
protected void subTabLayoutPanelSelectionChanged ( java.lang.Integer selectedItem ) { if ( ( object ) != null ) { object.setActiveDetailModel ( object.getDetailModels ( ) . get ( selectedItem ) ) ; if ( selectedItem == 0 ) { generalView.setMainTabSelectedItem ( ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( object.getSelectedItem ( ) ) ) ) ; } } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( java.lang.Object object ) { return ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . isExistsInSystem ( ) ? getCommonResources ( ) . logNormalImage ( ) : null ; }
Source:
public void onFailureResetInitialStatus ( ) { try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException exception ) { org.mockito.Mockito.verify ( vdsBrokerFrontend ) . RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters.class ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void onFailureResetInitialStatus ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException exception ) { org.mockito.Mockito.verify ( vdsBrokerFrontend ) . RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters.class ) ) ; return ; } org.junit.Assert.fail ( ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > Get64bitOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmOsType [ ] { org.ovirt.engine.core.common.businessentities.VmOsType.RHEL3x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL4x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL5x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL6x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2003x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008R2x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows7x64 } ) ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; }

Target:
public static java.lang.String getOsName ( int osId ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames.get ( osId ) ; }
Source:
protected java.io.File determineActualFile ( final javax.servlet.http.HttpServletRequest request , java.util.Locale locale ) { java.io.File file = org.ovirt.engine.core.utils.ServletUtils.makeFileFromSanePath ( request.getPathInfo ( ) , base ) ; if ( ( file != null ) && ( ! ( org.ovirt.engine.core.utils.ServletUtils.canReadFile ( file ) ) ) ) { file = org.ovirt.engine.core.utils.ServletUtils.makeFileFromSanePath ( replaceLocaleWithUSLocale ( request.getPathInfo ( ) , locale ) , base ) ; } return file ; }

Target:
protected java.io.File determineActualFile ( final javax.servlet.http.HttpServletRequest request , java.util.Locale locale ) { java.io.File file = org.ovirt.engine.core.utils.servlet.ServletUtils.makeFileFromSanePath ( request.getPathInfo ( ) , base ) ; if ( ( file != null ) && ( ! ( org.ovirt.engine.core.utils.servlet.ServletUtils.canReadFile ( file ) ) ) ) { file = org.ovirt.engine.core.utils.servlet.ServletUtils.makeFileFromSanePath ( replaceLocaleWithUSLocale ( request.getPathInfo ( ) , locale ) , base ) ; } return file ; }
Source:
public java.lang.Void runInTransaction ( ) { saveTaskAndPutInMap ( taskKey , task ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { buildChildCommandInfos ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > > entry : childCommandInfoMap.entrySet ( ) ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getBackendCommandObjectsHandler ( ) . createAction ( entry.getValue ( ) . getFirst ( ) , entry.getValue ( ) . getSecond ( ) ) ; command.insertAsyncTaskPlaceHolders ( ) ; childCommandsMap.put ( entry.getKey ( ) , command ) ; } return null ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( getParameters ( ) . getStoragePoolId ( ) , memoryDisksList ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( getParameters ( ) . getStoragePoolId ( ) , memoryDisksList , getVmDisksDummies ( ) ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }
Source:
public static void failTaskWithoutVdsmId ( final org.ovirt.engine.core.common.businessentities.AsyncTasks task ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.SuppressWarnings ( value = "synthetic-access" ) @ java.lang.Override public void run ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object runInTransaction ( ) { org.ovirt.engine.core.bll.AsyncTaskManager.logAndFailTaskWithoutVdsmId ( task ) ; return null ; } } ) ; } } ) ; }

Target:
private void handleTaskOfCommandWithEmptyVdsmId ( final boolean isPartiallySubmittedCommand , final org.ovirt.engine.core.common.businessentities.AsyncTasks task ) { if ( isPartiallySubmittedCommand ) { if ( org.ovirt.engine.core.bll.AsyncTaskManager.hasEmptyVdsmId ( task ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; return ; } partiallyCompletedCommandTasks.put ( task.getVdsmTaskId ( ) , task ) ; return ; } org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.AsyncTaskManager.logAndFailTaskOfCommandWithEmptyVdsmId ( task ) ; return null ; } } ) ; }
Source:
public void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
protected void onBind ( ) { super . onBind ( ) ; registerHandler ( org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainTabWithDetailsPresenter.getView ( ) . getTable ( ) . getSelectionModel ( ) . addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { modelProvider.setSelectedItems ( getSelectedItems ( ) ) ; fireTableSelectionChangeEvent ( ) ; handlePlaceTransition ( ) ; } } ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.table.ActionTable < T > getTable ( ) { return org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainTabWithDetailsPresenter.getView ( ) . getTable ( ) ; }
Source:
private java.util.List < org.ovirt.engine.api.model.Network > getEntityList ( ) { java.util.List < org.ovirt.engine.api.model.Network > entities = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { entities.add ( getEntity ( i ) ) ; } return entities ; }

Target:
protected void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetNetworksByDataCenterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworksResourceTest.DATA_CENTER_ID } , getEntityList ( ) , failure ) ; } }
Source:
public int compare ( java.lang.String str1 , java.lang.String str2 ) { return str1.toLowerCase ( ) . compareTo ( str2.toLowerCase ( ) ) ; }

Target:
public boolean match ( org.ovirt.engine.core.common.businessentities.DbUser source ) { return ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getDomain ( ) , target.getDomain ( ) ) ) && ( ( ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( target.getLoginName ( ) ) ) || ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( target.getLoginName ( ) , "*" ) ) ) || ( source.getLoginName ( ) . toLowerCase ( ) . startsWith ( target.getLoginName ( ) ) ) ) ; }
Source:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = runInternalQuery ( VdcQueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( getParameters ( ) . getId ( ) ) ) ; java.util.Collection < org.ovirt.engine.core.common.businessentities.VmWatchdog > watchdogs = returnValue.getReturnValue ( ) ; if ( ! ( watchdogs.isEmpty ( ) ) ) { return failValidation ( EngineMessage.WATCHDOG_ALREADY_EXISTS ) ; } if ( ! ( validate ( validateWatchdog ( ) ) ) ) { return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmWatchdogDevices = getVmWatchdogDevices ( ) ; if ( ( vmWatchdogDevices != null ) && ( ! ( vmWatchdogDevices.isEmpty ( ) ) ) ) { return failValidation ( EngineMessage.WATCHDOG_ALREADY_EXISTS ) ; } if ( ! ( validate ( validateWatchdog ( ) ) ) ) { return false ; } return true ; }
Source:
public void testAddLunDiskMissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "HostStorage" , "testAddLunDiskMissingType" , "type" ) ; } }

Target:
public void testAddLunDiskMissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , "HostStorage" , "lambda$testAddLunDiskMissingType$3" , "type" ) ; }