auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void InitVersion ( ) { if ( ! ( isVersionInit ) ) { isVersionInit = true ; for ( java.lang.Object a : getVersion ( ) . getItems ( ) ) { org.ovirt.engine.core.compat.Version item = ( ( org.ovirt.engine.core.compat.Version ) ( a ) ) ; if ( org.ovirt.engine.core.compat.Version.OpEquality ( item , getEntity ( ) . getcompatibility_version ( ) ) ) { getVersion ( ) . setSelectedItem ( item ) ; break ; } } } }

Target:
private void initVersion ( ) { if ( ! ( isVersionInit ) ) { isVersionInit = true ; for ( java.lang.Object a : getVersion ( ) . getItems ( ) ) { org.ovirt.engine.core.compat.Version item = ( ( org.ovirt.engine.core.compat.Version ) ( a ) ) ; if ( org.ovirt.engine.core.compat.Version.OpEquality ( item , getEntity ( ) . getcompatibility_version ( ) ) ) { getVersion ( ) . setSelectedItem ( item ) ; break ; } } } }
Source:
public void testImagesIllegal ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getNonEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISKS_ILLEGAL ) ) . when ( diskImagesValidator ) . diskImagesNotIllegal ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISKS_ILLEGAL.name ( ) ) ) ; }

Target:
public void testImagesIllegal ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getNonEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISKS_ILLEGAL ) ) . when ( diskImagesValidator ) . diskImagesNotIllegal ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISKS_ILLEGAL.name ( ) ) ) ; }
Source:
public void setCustomCommaSeparatedValues ( ) { final java.lang.String key = "foo" ; final java.lang.String s1 = ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) + 1 ; final java.lang.String s2 = ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) + 2 ; final java.util.List < java.lang.String > values = java.util.Arrays.asList ( s1 , s2 ) ; final java.lang.String sep = ", " ; b.setCustomCommaSeparatedValues ( key , values ) ; final java.lang.String actual = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( java.lang.String.format ( "%s%s%s" , s1 , sep , s2 ) , actual ) ; }

Target:
public void setCustomCommaSeparatedValues ( ) { final java.lang.String key = "foo" ; final java.lang.String s1 = ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) + 1 ; final java.lang.String s2 = ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) + 2 ; final java.util.List < java.lang.String > values = java.util.Arrays.asList ( s1 , s2 ) ; final java.lang.String sep = ", " ; b.setCustomCommaSeparatedValues ( key , values ) ; final java.lang.String actual = b.getCustomValue ( key ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.lang.String.format ( "%s%s%s" , s1 , sep , s2 ) , actual ) ; }
Source:
public void postOnSave ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { getWindow ( ) . stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; } privateItemSavedEvent.raise ( this , EventArgs.EMPTY ) ; }

Target:
public void postOnSave ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { getWindow ( ) . stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; getSearchCommand ( ) . execute ( ) ; } privateItemSavedEvent.raise ( this , EventArgs.EMPTY ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepSessionList ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepSessionList ( volumeName , slaveHost , slaveVolumeName , userName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public java.lang.String getQualifiedName ( ) { return ( ( serverName ) + ":" ) + ( brickDirectory ) ; }

Target:
public java.lang.String getQualifiedName ( ) { if ( ( ( ( networkId ) != null ) && ( ( networkAddress ) != null ) ) && ( ! ( networkAddress.isEmpty ( ) ) ) ) { return ( ( networkAddress ) + ":" ) + ( brickDirectory ) ; } return ( ( serverName ) + ":" ) + ( brickDirectory ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid ConcreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , new org.ovirt.engine.core.common.businessentities.async_tasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getTaskID ( ) , getParametersForTask ( parentCommand , org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) ) , asyncTaskCreationInfo.getStepId ( ) , org.ovirt.engine.core.bll.RemoveImageCommand.getCommandId ( ) ) ) ; p.setEntityId ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getEntityId ( ) ) ; org.ovirt.engine.core.compat.Guid ret = org.ovirt.engine.core.bll.AsyncTaskManager.getInstance ( ) . CreateTask ( AsyncTaskType.deleteImage , p ) ; return ret ; }

Target:
protected org.ovirt.engine.core.bll.SPMAsyncTask ConcreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , new org.ovirt.engine.core.common.businessentities.async_tasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getTaskID ( ) , getParametersForTask ( parentCommand , org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) ) , asyncTaskCreationInfo.getStepId ( ) , org.ovirt.engine.core.bll.RemoveImageCommand.getCommandId ( ) ) ) ; p.setEntityId ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getEntityId ( ) ) ; return org.ovirt.engine.core.bll.AsyncTaskManager.getInstance ( ) . CreateTask ( AsyncTaskType.deleteImage , p ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid poolId , org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain dom = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; dom.setId ( id ) ; dom.setstorage_pool_id ( poolId ) ; dom.setstorage_domain_type ( type ) ; dom.setstorage_type ( storageType ) ; dom.setstorage_domain_shared_status ( StorageDomainSharedStatus.Unattached ) ; return dom ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid poolId , org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain dom = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; dom.setId ( id ) ; dom.setStoragePoolId ( poolId ) ; dom.setStorageDomainType ( type ) ; dom.setStorageType ( storageType ) ; dom.setStorageDomainSharedStatus ( StorageDomainSharedStatus.Unattached ) ; return dom ; }
Source:
private void mockDaos ( ) { org.mockito.Mockito.doReturn ( clusterDao ) . when ( hookSyncJob ) . getClusterDao ( ) ; org.mockito.Mockito.doReturn ( hooksDao ) . when ( hookSyncJob ) . getHooksDao ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( createCluster ( ) ) ) . when ( clusterDao ) . getAll ( ) ; }

Target:
private void mockDaos ( ) { org.mockito.Mockito.doReturn ( clusterDao ) . when ( hookSyncJob ) . getClusterDao ( ) ; org.mockito.Mockito.doReturn ( hooksDao ) . when ( hookSyncJob ) . getHooksDao ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( createCluster ( 0 ) ) ; clusters.add ( createCluster ( 1 ) ) ; org.mockito.Mockito.doReturn ( clusters ) . when ( clusterDao ) . getAll ( ) ; }
Source:
protected void onCommonModelChange ( ) { super . onCommonModelChange ( ) ; getModel ( ) . getResetRequestedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.util.Iterator < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > iterator = getModel ( ) . getItems ( ) . iterator ( ) ; if ( iterator.hasNext ( ) ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagModel root = getModel ( ) . CloneTagModel ( iterator.next ( ) ) ; updateDataProvider ( java.util.Arrays.asList ( root ) ) ; } } } ) ; }

Target:
protected void onCommonModelChange ( ) { super . onCommonModelChange ( ) ; getModel ( ) . getResetRequestedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.util.Iterator < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > iterator = getModel ( ) . getItems ( ) . iterator ( ) ; if ( iterator.hasNext ( ) ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagModel root = getModel ( ) . CloneTagModel ( iterator.next ( ) ) ; updateDataProvider ( java.util.Arrays.asList ( root ) ) ; } } } ) ; }
Source:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.VDS > findAllVDSByPmEnabled ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > items ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ret = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS i : items ) { if ( i.isPmEnabled ( ) ) { ret.add ( i ) ; } } return ret ; }

Target:
public boolean match ( org.ovirt.engine.core.common.businessentities.VDS i ) { return i.isPmEnabled ( ) ; }
Source:
public void testInsert ( ) { org.ovirt.engine.core.compat.Guid newId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension newssce = new org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension ( ) ; newssce.setId ( newId ) ; fillWithRandomData ( newssce ) ; dao.save ( newssce ) ; org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension ssceFromDb = dao.get ( newId ) ; assertStorageServerConnectionExtensionEquality ( newssce , ssceFromDb ) ; }

Target:
public void testInsert ( ) { org.ovirt.engine.core.compat.Guid newId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension newssce = new org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension ( ) ; newssce.setId ( newId ) ; fillWithRandomData ( newssce ) ; dao.save ( newssce ) ; org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension ssceFromDb = dao.get ( newId ) ; org.junit.Assert.assertEquals ( newssce , ssceFromDb ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getAdGroupDao ( ) ) ; newAdGroup = new org.ovirt.engine.core.common.businessentities.ad_groups ( ) ; newAdGroup.setid ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newAdGroup.setdomain ( "domain" ) ; newAdGroup.setname ( "name" ) ; newAdGroup.setstatus ( AdRefStatus.Active ) ; existingAdGroup = dao.get ( new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getAdGroupDao ( ) ) ; newAdGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; newAdGroup.setid ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newAdGroup.setdomain ( "domain" ) ; newAdGroup.setname ( "name" ) ; newAdGroup.setstatus ( AdRefStatus.Active ) ; existingAdGroup = dao.get ( new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ) ; }
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 getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getClusterById ( 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.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public org.ovirt.engine.api.model.Groups list ( ) { return mapDbGroupsCollection ( getGroupsCollection ( SearchType.DBUser , getSearchPattern ( ) ) ) ; }

Target:
private java.lang.String getDirectoryGroupSearchPattern ( java.lang.String groupname , java.lang.String domain ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , org.ovirt.engine.core.common.businessentities.DbGroup.class , false ) ; final java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( org.ovirt.engine.api.restapi.resource.BackendGroupsResource.DIRECTORY_GROUP_SEARCH_TEMPLATE , domain ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "allnames=" + groupname : constraint ) ) ; return sb.toString ( ) ; }
Source:
protected boolean isMemorySnapshotSupported ( ) { if ( ( getEntity ( ) ) == null ) { return false ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MemorySnapshotSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) ; }

Target:
private void updateIsMemorySnapshotSupported ( java.lang.Object entity ) { if ( entity == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( entity ) ) ; setMemorySnapshotSupported ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isMemorySnapshotSupported ( vm ) ) ; }
Source:
protected void storageType_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.storage.StorageType storageType = getAvailableStorageTypeItems ( ) . getSelectedItem ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomainType storageDomainType = getAvailableStorageDomainTypeItems ( ) . getSelectedItem ( ) ; updateStorageSelectedItem ( storageType , storageDomainType ) ; if ( ( getCurrentStorageItem ( ) ) != null ) { updateFormat ( ) ; updateHost ( ) ; } updateWipeAfterDelete ( ) ; }

Target:
protected void storageType_SelectedItemChanged ( ) { updateCurrentStorageItem ( ) ; if ( ( getCurrentStorageItem ( ) ) != null ) { updateFormat ( ) ; updateHost ( ) ; } updateWipeAfterDelete ( ) ; }
Source:
private boolean isConsoleCommandsExecutionAllowed ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > list = getSelectedItems ( ) ; if ( list == null ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VM vm : list ) { if ( consoleModelsCache.getVmConsolesForVm ( vm ) . canConnectToConsole ( ) ) { return true ; } } return false ; }

Target:
private void onClone ( ) { ( ( org.ovirt.engine.ui.uicommonweb.models.vms.CloneVmModel ) ( getWindow ( ) ) ) . onClone ( this , false ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getCopyCommand ( ) ) ) { return copyPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getChangeQuotaCommand ( ) ) ) { return changeQutoaPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateInterfaceListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc stopImageTransferSession ( java.lang.String ticketId , java.lang.String spId , java.lang.String sdId , java.lang.String imgId , java.lang.String volId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.stopImageTransferSession ( ticketId , spId , sdId , imgId , volId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc remove_image_ticket ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.remove_image_ticket ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void isVmNameUnique ( 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 ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { 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.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }
Source:
public void RequestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; }

Target:
public void RequestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList < T > ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; }
Source:
public void removeLun ( org.ovirt.engine.core.common.businessentities.LUNs lun ) { java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > lunsList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getLunDAO ( ) . getAllForVolumeGroup ( lun.getvolume_group_id ( ) ) ; if ( ( lunsList.size ( ) ) == 1 ) { for ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection : filterConnectionsUsedByOthers ( lun.getLunConnections ( ) , "" , lun.getLUN_id ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDAO ( ) . remove ( connection.getid ( ) ) ; } } }

Target:
public void removeLun ( org.ovirt.engine.core.common.businessentities.LUNs lun ) { java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > lunsList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getLunDao ( ) . getAllForVolumeGroup ( lun.getvolume_group_id ( ) ) ; if ( ( lunsList.size ( ) ) == 1 ) { for ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection : filterConnectionsUsedByOthers ( lun.getLunConnections ( ) , "" , lun.getLUN_id ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } }
Source:
com.google.gwt.safehtml.shared.SafeHtml getRenderedValue ( com.google.gwt.safehtml.shared.SafeHtml value ) { java.lang.String result = value.asString ( ) ; if ( ( ( maxTextLength ) > 0 ) && ( ( result.length ( ) ) > ( maxTextLength ) ) ) { result = result.substring ( 0 , java.lang.Math.max ( ( ( maxTextLength ) - ( org.ovirt.engine.ui.common.widget.table.cell.TextCellWithTooltip.TOO_LONG_TEXT_POSTFIX.length ( ) ) ) , 0 ) ) ; result = result + ( org.ovirt.engine.ui.common.widget.table.cell.TextCellWithTooltip.TOO_LONG_TEXT_POSTFIX ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( result ) ; }

Target:
com.google.gwt.safehtml.shared.SafeHtml getRenderedValue ( com.google.gwt.safehtml.shared.SafeHtml value ) { java.lang.String result = value.asString ( ) ; if ( ( ( maxTextLength ) > 0 ) && ( ( result.length ( ) ) > ( maxTextLength ) ) ) { result = result.substring ( 0 , java.lang.Math.max ( ( ( maxTextLength ) - ( org.ovirt.engine.ui.common.widget.table.cell.TextCell.TOO_LONG_TEXT_POSTFIX.length ( ) ) ) , 0 ) ) ; result = result + ( org.ovirt.engine.ui.common.widget.table.cell.TextCell.TOO_LONG_TEXT_POSTFIX ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( result ) ; }
Source:
private org.ovirt.engine.core.bll.context.CommandContext createContextForStatelessSnapshotCreation ( ) { java.util.Map < java.lang.String , java.lang.String > values = getVmValuesForMsgResolving ( ) ; org.ovirt.engine.core.common.job.Step createSnapshotsStep = addSubStep ( StepEnum.EXECUTING , StepEnum.CREATING_SNAPSHOTS , values ) ; org.ovirt.engine.core.bll.job.ExecutionContext createSnapshotsCtx = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; createSnapshotsCtx.setMonitored ( true ) ; createSnapshotsCtx.setStep ( createSnapshotsStep ) ; return new org.ovirt.engine.core.bll.context.CommandContext ( createSnapshotsCtx , org.ovirt.engine.core.bll.RunVmCommand.getCompensationContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ; }

Target:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.IdParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }
Source:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.AddTag ( tag ) ; tag.settag_name ( "booboo" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags rootTag = tagsDirector.GetRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.gettag_name ( ) ) ; }

Target:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "booboo" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags rootTag = tagsDirector.getRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.gettag_name ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { if ( returnValue != null ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( ( cluster.getEmulatedMachine ( ) ) != null ) { getEmulatedMachine ( ) . setSelectedItem ( cluster.getEmulatedMachine ( ) ) ; } } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { if ( returnValue != null ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = ( ( org.ovirt.engine.core.common.businessentities.Cluster ) ( returnValue ) ) ; if ( ( cluster.getEmulatedMachine ( ) ) != null ) { getEmulatedMachine ( ) . setSelectedItem ( cluster.getEmulatedMachine ( ) ) ; } } }
Source:
private java.lang.String createSpiceInvocationInfo ( ) { return new org.ovirt.engine.ui.common.view.popup.ConsolePopupView.KeyValueHtmlRowMaker ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.auto ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceInvokeAuto ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.nativeClient ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.consoleInvokeNative ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.browserPlugin ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceInvokePlugin ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceHtml5 ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceInvokeHtml5 ( ) ) . toString ( ) ; }

Target:
private java.lang.String createSpiceInvocationInfo ( ) { org.ovirt.engine.ui.common.view.popup.ConsolePopupView.KeyValueHtmlRowMaker rowMaker = new org.ovirt.engine.ui.common.view.popup.ConsolePopupView.KeyValueHtmlRowMaker ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.auto ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceInvokeAuto ( ) ) ; rowMaker.append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.nativeClient ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.consoleInvokeNative ( ) ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isEnableDeprecatedClientModeSpicePlugin ( ) ) { rowMaker.append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.browserPlugin ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceInvokePlugin ( ) ) ; } rowMaker.append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceHtml5 ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.spiceInvokeHtml5 ( ) ) ; return rowMaker.toString ( ) ; }
Source:
private void setUpGetEntityExpectations ( boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetDbGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : getEntity ( 0 ) ) ) ; }

Target:
private void setUpGetEntityExpectations ( boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetDbGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : getEntity ( 0 ) ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDS activate ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = null ; try { vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getVdsId ( ) ) ; refreshHost ( vds ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Failed to activate VDS = {0} with error: {1}." , getVdsId ( ) , e.getMessage ( ) ) ; } return vds ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsToMoveToUnknown ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllRunningForVds ( getVdsId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > migratingVms = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllMigratingToHost ( getVdsId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM incomingVm : migratingVms ) { if ( ( incomingVm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) { vmList.add ( incomingVm ) ; } } return vmList ; }
Source:
public void setDetailModels ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.HasEntity < D > > value ) { if ( ( detailModels ) != value ) { detailModels = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "DetailModels" ) ) ; } }

Target:
public void setActiveDetailModel ( org.ovirt.engine.ui.uicommonweb.models.HasEntity < D > value ) { if ( ! ( activeDetailModels.contains ( value ) ) ) { activeDetailModelChanging ( value , true ) ; activeDetailModels.clear ( ) ; activeDetailModels.add ( value ) ; activeDetailModelChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( org.ovirt.engine.ui.uicommonweb.models.ListWithDetailsModel.ACTIVE_DETAIL_MODELS ) ) ; } }
Source:
protected < T > void render ( com.google.gwt.cell.client.Cell.Context context , org.ovirt.engine.core.common.businessentities.VM value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , com.google.gwt.cell.client.HasCell < org.ovirt.engine.core.common.businessentities.VM , T > hasCell ) { com.google.gwt.cell.client.Cell < T > cell = hasCell.getCell ( ) ; if ( cell instanceof org.ovirt.engine.ui.common.widget.table.column.HasStyleClass ) { ( ( org.ovirt.engine.ui.common.widget.table.column.HasStyleClass ) ( cell ) ) . setStyleClass ( style.divInlineBlock ( ) ) ; } cell.render ( context , hasCell.getValue ( value ) , sb ) ; }

Target:
protected < T > void render ( com.google.gwt.cell.client.Cell.Context context , org.ovirt.engine.core.common.businessentities.VM value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , com.google.gwt.cell.client.HasCell < org.ovirt.engine.core.common.businessentities.VM , T > hasCell ) { com.google.gwt.cell.client.Cell < T > cell = hasCell.getCell ( ) ; if ( cell instanceof org.ovirt.engine.ui.common.widget.table.HasStyleClass ) { ( ( org.ovirt.engine.ui.common.widget.table.HasStyleClass ) ( cell ) ) . setStyleClass ( style.divInlineBlock ( ) ) ; } cell.render ( context , hasCell.getValue ( value ) , sb ) ; }
Source:
public static void addLdapConfigValues ( java.util.Hashtable < java.lang.String , java.lang.String > env ) { env.put ( "com.sun.jndi.ldap.read.timeout" , java.lang.Long.toString ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.LDAPQueryTimeout ) ) * 1000 ) ) ) ; env.put ( "com.sun.jndi.ldap.connect.timeout" , java.lang.Long.toString ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.LDAPConnectTimeout ) ) * 1000 ) ) ) ; }

Target:
public static void addLdapConfigValues ( java.util.Properties config , java.util.Hashtable < java.lang.String , java.lang.String > env ) { env.put ( "com.sun.jndi.ldap.read.timeout" , java.lang.Long.toString ( ( ( java.lang.Long.parseLong ( config.getProperty ( "config.LDAPQueryTimeout" ) ) ) * 1000 ) ) ) ; env.put ( "com.sun.jndi.ldap.connect.timeout" , java.lang.Long.toString ( ( ( java.lang.Long.parseLong ( config.getProperty ( "config.LDAPConnectTimeout" ) ) ) * 1000 ) ) ) ; }
Source:
protected void executeQueryCommand ( ) { java.lang.String version = org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getParameters ( ) . getVersion ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions options = new org.ovirt.engine.core.utils.pm.VdsFenceOptions ( version ) ; java.util.HashMap < java.lang.String , java.util.HashMap < java.lang.String , java.lang.String > > map = options.getFencingOptionMappingMap ( ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setReturnValue ( map ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setSucceeded ( ( ( map.size ( ) ) > 0 ) ) ; }

Target:
protected void executeQueryCommand ( ) { java.lang.String version = org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getParameters ( ) . getVersion ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions options = new org.ovirt.engine.core.utils.pm.VdsFenceOptions ( version ) ; java.util.HashMap < java.lang.String , java.util.HashMap < java.lang.String , java.lang.String > > map = options.getFenceOptionMappingMap ( ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setReturnValue ( map ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setSucceeded ( ( ( map.size ( ) ) > 0 ) ) ; }
Source:
public void onSearchableModelActivation ( org.ovirt.engine.ui.userportal.section.main.presenter.SearchableModelActivationEvent event ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel currentModel = modelProvider.getModel ( ) ; if ( ( event.getListModel ( ) ) == currentModel ) { currentModel.getSearchCommand ( ) . execute ( ) ; } else { currentModel.setItems ( null ) ; currentModel.stopRefresh ( ) ; } }

Target:
protected void onHide ( ) { super . onHide ( ) ; org.ovirt.engine.ui.uicommonweb.models.SearchableListModel currentModel = modelProvider.getModel ( ) ; currentModel.setItems ( null ) ; currentModel.stopRefresh ( ) ; }
Source:
public void successfulFence ( ) { mockProxyHost ( ) ; mockFenceSuccess ( ) ; org.ovirt.engine.core.common.businessentities.FenceAgent agent = createAgent ( ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.fence ( FenceActionType.Start , agent ) ; org.junit.Assert.assertTrue ( result.getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( result.getFenceAgentUsed ( ) , agent ) ; }

Target:
public void successfulFence ( ) { mockProxyHost ( ) ; mockFenceSuccess ( ) ; org.ovirt.engine.core.common.businessentities.FenceAgent agent = createAgent ( ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.fence ( FenceActionType.START , agent ) ; org.junit.Assert.assertTrue ( result.getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( result.getFenceAgentUsed ( ) , agent ) ; }
Source:
protected void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getRestModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getRestModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void logServerMessage ( final org.ovirt.engine.core.common.businessentities.VDS server , final org.ovirt.engine.core.common.AuditLogType logType ) { logAuditMessage ( null , null , server , logType , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; }

Target:
public void logServerMessage ( final org.ovirt.engine.core.common.businessentities.VDS server , final org.ovirt.engine.core.common.AuditLogType logType ) { logAuditMessage ( ( server == null ? org.ovirt.engine.core.compat.Guid.Empty : server.getVdsGroupId ( ) ) , null , server , logType , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMemoryDiskForVm ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.generateMemoryDiskAlias ( vm.getName ( ) ) ) ; image.setDescription ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_MEMORY_DISK_DESCRIPTION ) ; image.setSize ( vm.getTotalMemorySizeInBytes ( ) ) ; image.setVolumeType ( org.ovirt.engine.core.bll.memory.MemoryUtils.storageTypeToMemoryVolumeType ( storageType ) ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; image.setDiskInterface ( DiskInterface.VirtIO ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createHibernationMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryDisk ( vm , storageType ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.generateHibernationMemoryDiskAlias ( vm.getName ( ) ) ) ; image.setDescription ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_HIBERNATION_MEMORY_DISK_DESCRIPTION ) ; return image ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filterStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > availableStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomainItem : storageDomains ) { if ( ( storageDomainItem.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.GLANCE ) ) { availableStorageDomains.add ( storageDomainItem ) ; } } java.util.Collections.sort ( availableStorageDomains , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return availableStorageDomains ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filterStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > availableStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomainItem : storageDomains ) { if ( ( storageDomainItem.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.StorageType.GLANCE ) ) { availableStorageDomains.add ( storageDomainItem ) ; } } java.util.Collections.sort ( availableStorageDomains , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return availableStorageDomains ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.Network mockExternalNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.network.Network.class ) ; org.ovirt.engine.core.common.businessentities.network.ProviderNetwork providerNetwork = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.network.ProviderNetwork.class ) ; org.mockito.Mockito.when ( network.getProvidedBy ( ) ) . thenReturn ( providerNetwork ) ; org.mockito.Mockito.when ( externalNetwork.getProvidedBy ( ) ) . thenReturn ( providerNetwork ) ; return externalNetwork ; }

Target:
public void externalNetworkNameChanged ( ) { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = createExternalNetwork ( ) ; externalNetwork.setName ( "aaa" ) ; network.setName ( "bbb" ) ; org.junit.Assert.assertThat ( validator.externalNetworkDetailsUnchanged ( externalNetwork ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }