auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void initNetworks ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > allClusterNetworks ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworksMap = createClusterNetworksMap ( allClusterNetworks ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.network.Network > vfsConfigNetworks = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.compat.Guid networkGuid : getEntity ( ) . getNetworks ( ) ) { vfsConfigNetworks.add ( clusterNetworksMap.get ( networkGuid ) ) ; } networks.setItems ( vfsConfigNetworks ) ; }

Target:
private void initNetworks ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > allClusterNetworks ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.VfsConfigNetwork > vfsConfigNetworks = new java.util.ArrayList < > ( ) ; java.util.Set < org.ovirt.engine.core.compat.Guid > attachedNetworks = getEntity ( ) . getNetworks ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : allClusterNetworks ) { boolean isAttached = attachedNetworks.contains ( network.getId ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.VfsConfigNetwork vfsConfigNetwork = new org.ovirt.engine.ui.uicommonweb.models.hosts.VfsConfigNetwork ( isAttached , ( isAttached ? getAttachedViaLabel ( network ) : null ) , network ) ; vfsConfigNetworks.add ( vfsConfigNetwork ) ; } networks.setItems ( vfsConfigNetworks ) ; }
Source:
protected void initQuery ( Q query ) { }

Target:
protected void initQuery ( Q query ) { sessionDataContainer.setUser ( query.getParameters ( ) . getSessionId ( ) , dbUserMock ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacadeMock = org.ovirt.engine.core.bll.AbstractQueryTest.mock ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; org.mockito.Mockito.doReturn ( dbFacadeMock ) . when ( query ) . getDbFacade ( ) ; query.postConstruct ( ) ; }
Source:
public void canDoActionVmInPreview ( ) { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }

Target:
public void canDoActionVmInPreview ( ) { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }
Source:
protected void asyncSearch ( ) { super . asyncSearch ( ) ; syncSearch ( ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { onRemove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRestore" ) ) { onRestore ( ) ; } else { super . executeCommand ( command ) ; } }
Source:
public static void getRpmVersion ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters params = new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( ) ; params.setFilterOutExistingHosts ( filterOutExistingHosts ) ; params.setProviderId ( providerId ) ; params.setSearchFilter ( searchFilter ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , params , aQuery ) ; }

Target:
public static void getExternalProviderDiscoveredHostList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.EngineBackupLog getLastSuccessfulEngineBackup ( java.lang.String scope ) { javax.persistence.TypedQuery < org.ovirt.engine.core.common.businessentities.EngineBackupLog > query = getEntityManager ( ) . createNamedQuery ( "EngineBackupLog.getLatest" , org.ovirt.engine.core.common.businessentities.EngineBackupLog.class ) . setParameter ( "scope" , scope ) . setMaxResults ( 1 ) ; return singleResult ( query ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.EngineBackupLog engineBackupLog ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "scope" , engineBackupLog.getScope ( ) ) . addValue ( "done_at" , engineBackupLog.getDoneAt ( ) ) . addValue ( "status" , ( engineBackupLog.isPassed ( ) ? 1 : - 1 ) ) . addValue ( "fqdn" , engineBackupLog.getFqdn ( ) ) . addValue ( "output_message" , engineBackupLog.getOutputMessage ( ) ) . addValue ( "log_path" , engineBackupLog.getLogPath ( ) ) ; getCallsHandler ( ) . executeModification ( "LogEngineBackupEvent" , parameterSource ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , ipv4Address , ipv6Address , bondName , bondOptions , bondType , bonded , ipv4BootProtocol , ipv6BootProtocol , networkName , bridged , ipv4Gateway , ipv6Gateway , mtu , ipv4Subnet , ipv6Prefix , vdsId , baseInterface , vlanId , qos , labels , adPartnerMac ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , ipv4Address , ipv6Address , bondName , bondOptions , bondType , bonded , ipv4BootProtocol , ipv6BootProtocol , reportedSwitchType , networkName , bridged , ipv4Gateway , ipv6Gateway , mtu , ipv4Subnet , ipv6Prefix , vdsId , baseInterface , vlanId , qos , labels , adPartnerMac ) ; }
Source:
protected void EndVmCommand ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmCommand.acquireLock ( ) ) { setVm ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) ; RemoveVmFromDb ( ) ; } } org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( true ) ; } finally { org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; } }

Target:
protected void EndVmCommand ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmCommand.acquireLock ( ) ) { setVm ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) != null ) { updateDisksAfterVmRemoved ( ) ; RemoveVmFromDb ( ) ; } } org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( true ) ; } finally { org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTask task = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.getAsyncTaskFromDb ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }
Source:
public void testRemove ( ) { dao.remove ( existingVds.getId ( ) ) ; dynamicDao.remove ( existingVds.getId ( ) ) ; staticDao.remove ( existingVds.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsStatic resultStatic = staticDao.get ( existingVds.getId ( ) ) ; assertNull ( resultStatic ) ; org.ovirt.engine.core.common.businessentities.VdsStatistics resultStatistics = dao.get ( existingVds.getId ( ) ) ; assertNull ( resultStatistics ) ; }

Target:
public void testRemove ( ) { dao.remove ( existingVds.getId ( ) ) ; dynamicDao.remove ( existingVds.getId ( ) ) ; staticDao.remove ( existingVds.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsStatic resultStatic = staticDao.get ( existingVds.getId ( ) ) ; org.junit.Assert.assertNull ( resultStatic ) ; org.ovirt.engine.core.common.businessentities.VdsStatistics resultStatistics = dao.get ( existingVds.getId ( ) ) ; org.junit.Assert.assertNull ( resultStatistics ) ; }
Source:
void registerSelectionChangeHandler ( final org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { final org.ovirt.engine.ui.uicompat.IEventListener itemSelectionChangeHandler = new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.common.widget.action.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { buttonDef.update ( ) ; } } ; addSelectionChangeListener ( itemSelectionChangeHandler ) ; }

Target:
void registerSelectionChangeHandler ( final org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { final org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > itemSelectionChangeHandler = new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { buttonDef.update ( ) ; } } ; addSelectionChangeListener ( itemSelectionChangeHandler ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( skipFencingIfSDActive ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfConnectivityBroken ? 1231 : 1237 ) ; result = ( prime * result ) + ( hostsWithBrokenConnectivityThreshold ) ; return result ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( fencingEnabled ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfSDActive ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfConnectivityBroken ? 1231 : 1237 ) ; result = ( prime * result ) + ( hostsWithBrokenConnectivityThreshold ) ; return result ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDAO ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newVmTemplate.setname ( "NewVmTemplate" ) ; newVmTemplate.setvds_group_id ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDao ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newVmTemplate.setname ( "NewVmTemplate" ) ; newVmTemplate.setvds_group_id ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; }
Source:
private void PrepareSanStorageForEdit ( final org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel model ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel storageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; boolean isStorageActive = storageModel.isStorageActive ( ) ; if ( isStorageActive ) { storageModel.getHost ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { PostPrepareSanStorageForEdit ( model , true ) ; } } ) ; } else { PostPrepareSanStorageForEdit ( model , false ) ; } }

Target:
private org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel prepareIscsiStorageForEdit ( org.ovirt.engine.core.common.businessentities.StorageDomain storage ) { org.ovirt.engine.ui.uicommonweb.models.storage.IscsiStorageModel model = new org.ovirt.engine.ui.uicommonweb.models.storage.IscsiStorageModel ( ) ; model.setRole ( storage.getStorageDomainType ( ) ) ; prepareSanStorageForEdit ( model ) ; return model ; }
Source:
public void testCheckGroupsCanBeAttachedAlreadyExists ( ) { org.ovirt.engine.core.common.businessentities.RoleGroupMap map = new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( getParams ( ) . getActionGroups ( ) . get ( 0 ) , getParams ( ) . getRoleId ( ) ) ; mockGetAllForRole ( java.util.Collections.singletonList ( map ) ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( 1 ) ; org.junit.Assert.assertTrue ( "validate should fail" , getCommand ( ) . checkIfGroupsCanBeAttached ( messages ) ) ; org.junit.Assert.assertEquals ( "wrong messages" , EngineMessage.ERROR_CANNOT_ATTACH_ACTION_GROUP_TO_ROLE_ATTACHED.toString ( ) , messages.get ( 0 ) ) ; }

Target:
public void testCheckGroupsCanBeAttachedAlreadyExists ( ) { org.ovirt.engine.core.common.businessentities.RoleGroupMap map = new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( getParams ( ) . getActionGroups ( ) . get ( 0 ) , getParams ( ) . getRoleId ( ) ) ; mockGetAllForRole ( java.util.Collections.singletonList ( map ) ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( 1 ) ; org.junit.jupiter.api.Assertions.assertTrue ( getCommand ( ) . checkIfGroupsCanBeAttached ( messages ) , "validate should fail" ) ; org.junit.jupiter.api.Assertions.assertEquals ( EngineMessage.ERROR_CANNOT_ATTACH_ACTION_GROUP_TO_ROLE_ATTACHED.toString ( ) , messages.get ( 0 ) , "wrong messages" ) ; }
Source:
public org.ovirt.engine.sdk.decorators.DataCenterClusterNetwork update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.DataCenterClusterNetwork.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.DataCenterClusterNetwork update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.DataCenterClusterNetwork.class , headers ) ; }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { 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.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { return null ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc thaw ( java.lang.String vmId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.thaw" ) . withParameter ( "vmID" , vmId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; }
Source:
public java.lang.String getItemsCountString ( ) { if ( ( getItems ( ) ) == null ) { return "" ; } int fromItemCount = ( ( getSearchPageSize ( ) ) * ( ( getSearchPageNumber ( ) ) - 1 ) ) + 1 ; int toItemCount = ( fromItemCount - 1 ) + ( ( ( java.util.Collection ) ( getItems ( ) ) ) . size ( ) ) ; if ( ( toItemCount == 0 ) || ( fromItemCount > toItemCount ) ) { return "" ; } return ( fromItemCount + "-" ) + toItemCount ; }

Target:
public boolean isCaseSensitiveSearch ( ) { return caseSensitiveSearch ; }
Source:
public org.ovirt.engine.core.dao.StorageDomainDAO getStorageDomainDAO ( ) { final org.ovirt.engine.core.dao.StorageDomainDAO d = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainDAO.class ) ; org.mockito.Mockito.when ( d.getForStoragePool ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( STORAGE_DOMAIN ) ; org.mockito.Mockito.when ( d.getAllForStorageDomain ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ) . thenReturn ( getStorageDomainList ( ) ) ; return d ; }

Target:
public org.ovirt.engine.core.dao.StorageDomainDao getStorageDomainDao ( ) { final org.ovirt.engine.core.dao.StorageDomainDao d = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainDao.class ) ; org.mockito.Mockito.when ( d.getForStoragePool ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( STORAGE_DOMAIN ) ; org.mockito.Mockito.when ( d.getAllForStorageDomain ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ) . thenReturn ( getStorageDomainList ( ) ) ; return d ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getPluggedManagedInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( ( ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isHostDevInterface ( device ) ) || ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) ) && ( device.getIsPlugged ( ) ) ) && ( device.getIsManaged ( ) ) ) { result.add ( device ) ; } } return result ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getPluggedManagedInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( ( ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isHostDevInterface ( device ) ) || ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) ) && ( device.isPlugged ( ) ) ) && ( device.isManaged ( ) ) ) { result.add ( device ) ; } } return result ; }
Source:
private org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; return new org.ovirt.engine.core.common.businessentities.AsyncTasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getVdsmTaskId ( ) , parentParameters , getParameters ( ) , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) , parentParameters.getCommandId ( ) , asyncTaskCreationInfo.getStoragePoolID ( ) , asyncTaskCreationInfo.getTaskType ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.AsyncTask createAsyncTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.createAsyncTask ( this , asyncTaskCreationInfo , parentCommand ) ; }
Source:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( getNetwork ( ) . getSelectedItem ( ) ) ) ; boolean portMirroringAllowed = ( network == null ) || ( ! ( network.isExternal ( ) ) ) ; if ( ! portMirroringAllowed ) { getPortMirroring ( ) . setEntity ( false ) ; getPortMirroring ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . portMirroringNotSupportedExternalNetworks ( ) ) ; } getPortMirroring ( ) . setIsChangable ( portMirroringAllowed ) ; }
Source:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getstorage_ids ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; return false ; } return true ; }

Target:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; return false ; } return true ; }
Source:
public static < T > T retrieveFromSet ( java.util.Set < T > set , final T object ) { return org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( set , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < T > ( ) { @ java.lang.Override public boolean match ( T entry ) { return object.equals ( entry ) ; } } ) ; }

Target:
public static < T > T retrieveFromSet ( java.util.Set < T > set , final T object ) { return org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( set , new org.ovirt.engine.ui.uicommonweb.Linq.EqualsPredicate ( object ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { if ( ! ( model.equals ( getViewFilterType ( ) ) ) ) { return ; } attachedByLabelInterfaces = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) . getReturnValue ( ) ; setItems ( items ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValueObj ) { if ( ! ( filter.equals ( getViewFilterType ( ) ) ) ) { return ; } attachedByLabelInterfaces = returnValueObj.getReturnValue ( ) ; setItems ( items ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > Cast ( ( ( java.lang.Iterable ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.lang.Iterable ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }
Source:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.ValidationResult slavesValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE_ENTITY , "slaveA" ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_NAME , "networkName" ) ) ; org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , slavesValidationResult , slavesValidationResult ) ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveIsNotValid ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setBonds ( java.util.Collections.singletonList ( bond ) ) ; doTestValidateModifiedBondSlaves ( params , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) ) ; }
Source:
protected void initHeader ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.aliasTemplate ( ) ) ; table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.disksTemplate ( ) , "110px" ) ; table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.actualSizeTemplate ( ) , "110px" ) ; table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.creationDateTemplate ( ) , "170px" ) ; }

Target:
protected void initHeader ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.aliasTemplate ( ) ) ; table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.disksTemplate ( ) , "110px" ) ; table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.provisionedSizeTemplate ( ) , "110px" ) ; table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.actualSizeTemplate ( ) , "110px" ) ; table.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn ( ) , constants.creationDateTemplate ( ) , "170px" ) ; }
Source:
protected void unlockVm ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { org.ovirt.engine.core.bll.VmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing EndAction on Vm" ) ; } }

Target:
protected void setLoggingForCommand ( ) { org.ovirt.engine.core.bll.VmCommand.setCommandShouldBeLogged ( false ) ; }
Source:
public void processOnVmStop ( final java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , final org.ovirt.engine.core.compat.Guid hostId ) { if ( vmIds.isEmpty ( ) ) { return ; } org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( vmId , true ) ) ; } org.ovirt.engine.core.bll.hostdev.HostDeviceManager hostDeviceManager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.hostdev.HostDeviceManager.class ) ; hostDeviceManager.refreshHostIfAnyVmHasHostDevices ( vmIds , hostId ) ; } } ) ; }

Target:
private void processOnVmStopInternal ( final java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , final org.ovirt.engine.core.compat.Guid hostId ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { backend.runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( vmId , true ) ) ; } org.ovirt.engine.core.bll.hostdev.HostDeviceManager hostDeviceManager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.hostdev.HostDeviceManager.class ) ; hostDeviceManager.refreshHostIfAnyVmHasHostDevices ( vmIds , hostId ) ; }
Source:
public static void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }

Target:
public static void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }
Source:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel ) { return ( ( clusterNetworkModel.isAttached ( ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ) && ( ( ! ( isMultipleSelectionAllowed ( ) ) ) || ( ! ( clusterNetworkModel.isManagement ( ) ) ) ) ; }

Target:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel ) { return ( ( clusterNetworkModel.isAttached ( ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ) && ( ( ( ! ( isMultipleSelectionAllowed ( ) ) ) || ( ! ( clusterNetworkModel.isManagement ( ) ) ) ) || ( ! ( clusterNetworkModel.getOriginalNetworkCluster ( ) . isDefaultRoute ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.adbroker.LdapReturnValueBase execute ( ) { try { ExecuteQuery ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.adbroker.InternalBrokerCommandBase.log.errorFormat ( "Error in executing Internal broker command. Exception is {0} " , e.getMessage ( ) ) ; _ldapReturnValue.setSucceeded ( false ) ; _ldapReturnValue.setReturnValue ( null ) ; } return _ldapReturnValue ; }

Target:
public org.ovirt.engine.core.bll.adbroker.LdapReturnValueBase execute ( ) { try { executeQuery ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.adbroker.InternalBrokerCommandBase.log.errorFormat ( "Error in executing Internal broker command. Exception is {0} " , e.getMessage ( ) ) ; _ldapReturnValue.setSucceeded ( false ) ; _ldapReturnValue.setReturnValue ( null ) ; } return _ldapReturnValue ; }
Source:
private boolean isVmInterfacesConfigured ( ) { for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic : org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getInterfaces ( ) ) { if ( ( nic.getVnicProfileId ( ) ) == null ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_NETWORK_NOT_CONFIGURED ) ; return false ; } else { return true ; } } } return true ; }

Target:
protected boolean acquireLockInternal ( ) { final boolean acquireLock = super . acquireLockInternal ( ) ; if ( ( ( ! acquireLock ) && ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) != null ) ) && ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . isAutoStartup ( ) ) ) { org.ovirt.engine.core.bll.AutoStartVmsRunner.getInstance ( ) . addVmToRun ( org.ovirt.engine.core.bll.RunVmCommand.getParameters ( ) . getVmId ( ) ) ; } return acquireLock ; }
Source:
public void getClusterServerMemoryOverCommit ( 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.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClusterServerMemoryOverCommit ( 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 ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void initializeVds ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.RemoveVds , new org.ovirt.engine.core.common.vdscommands.RemoveVdsVDSCommandParameters ( org.ovirt.engine.core.bll.VdsCommand.getVdsId ( ) ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.AddVds , new org.ovirt.engine.core.common.vdscommands.AddVdsVDSCommandParameters ( org.ovirt.engine.core.bll.VdsCommand.getVdsId ( ) ) ) ; }

Target:
protected void initializeVds ( boolean newHost ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.RemoveVds , new org.ovirt.engine.core.common.vdscommands.RemoveVdsVDSCommandParameters ( org.ovirt.engine.core.bll.VdsCommand.getVdsId ( ) , newHost ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.AddVds , new org.ovirt.engine.core.common.vdscommands.AddVdsVDSCommandParameters ( org.ovirt.engine.core.bll.VdsCommand.getVdsId ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachment ( org.ovirt.engine.core.common.businessentities.network.Network networkA , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachment ( networkA , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; attachment.setNicId ( nic.getId ( ) ) ; attachment.setNicName ( nic.getName ( ) ) ; return attachment ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.CreateOrUpdateBond createOrUpdateBond = createNewCreateOrUpdateBond ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "bond1" , "slaveA" , "slaveB" ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( createOrUpdateBond ) ) . build ( ) ; doTestValidateModifiedBondSlaves ( org.mockito.Mockito.spy ( validator ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }
Source:
public java.lang.String getInnerJoin ( java.lang.String searchObj , java.lang.String crossRefObj ) { java.lang.String [ ] JoinKey = mJoinDictionary.get ( org.ovirt.engine.core.compat.StringFormat.format ( "%1$s.%2$s" , searchObj , crossRefObj ) ) ; java.lang.String crossRefTable = getRelatedTableName ( crossRefObj ) ; java.lang.String searchObjTable = getRelatedTableName ( searchObj ) ; return org.ovirt.engine.core.compat.StringFormat.format ( " LEFT OUTER JOIN %3$s ON %1$s.%2$s=%3$s.%4$s " , searchObjTable , JoinKey [ 0 ] , crossRefTable , JoinKey [ 1 ] ) ; }

Target:
public java.lang.String getInnerJoin ( java.lang.String searchObj , java.lang.String crossRefObj ) { final java.lang.String [ ] joinKey = mJoinDictionary.get ( org.ovirt.engine.core.compat.StringFormat.format ( "%1$s.%2$s" , searchObj , crossRefObj ) ) ; final java.lang.String crossRefTable = getRelatedTableName ( crossRefObj ) ; final java.lang.String searchObjTable = getRelatedTableName ( searchObj ) ; return org.ovirt.engine.core.compat.StringFormat.format ( " LEFT OUTER JOIN %3$s ON %1$s.%2$s=%3$s.%4$s " , searchObjTable , joinKey [ 0 ] , crossRefTable , joinKey [ 1 ] ) ; }
Source:
public void testGetAllWithPermissionsPrivilegedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StoragePoolDaoTest.NUMBER_OF_POOLS_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingEntity ) ; }

Target:
public void testGetAllWithPermissionsPrivilegedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.StoragePoolDaoTest.NUMBER_OF_POOLS_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( result.iterator ( ) . next ( ) , existingEntity ) ; }