auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean match ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion templateWithVersion ) { return id.equals ( templateWithVersion.getTemplateVersion ( ) . getId ( ) ) ; }

Target:
public boolean match ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion templateWithVersion ) { if ( useLatest ) { return ( templateWithVersion.getTemplateVersion ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.templates.LatestVmTemplate ; } else { return ( id.equals ( templateWithVersion.getTemplateVersion ( ) . getId ( ) ) ) && ( ! ( ( templateWithVersion.getTemplateVersion ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.templates.LatestVmTemplate ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.startSpice ( vdsIp , port , ticket ) ; 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.irsbroker.StatusReturnForXmlRpc teardownImage ( java.lang.String sdID , java.lang.String spID , java.lang.String imageID , java.lang.String volumeID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.teardownImage ( sdID , spID , imageID , volumeID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAllForUserAndGroups ( user.getId ( ) , user.getGroupIds ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Role r : userRoles ) { if ( ( r.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { if ( org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debugFormat ( "LoginAdminUser: User logged to admin using role {0}" , r.getname ( ) ) ; } return true ; } } return false ; }

Target:
public static boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAllForUserAndGroups ( user.getId ( ) , org.apache.commons.lang.StringUtils.join ( user.getGroupIds ( ) , "," ) ) ; for ( org.ovirt.engine.core.common.businessentities.Role r : userRoles ) { if ( ( r.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { if ( org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debugFormat ( "LoginAdminUser: User logged to admin using role {0}" , r.getname ( ) ) ; } return true ; } } return false ; }
Source:
public void testExecuteQueryCommand ( ) throws java.io.IOException { backendInternal = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.interfaces.BackendInternal.class ) ; org.mockito.Mockito.doReturn ( backendInternal ) . when ( getQuery ( ) ) . getBackendInstance ( ) ; getQuery ( ) . executeQueryCommand ( ) ; java.util.Map < java.lang.String , java.lang.String > servers = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertNotNull ( servers ) ; org.junit.Assert.assertEquals ( getAddedServers ( ) , servers ) ; }

Target:
public void testExecuteQueryCommand ( ) throws java.io.IOException { org.mockito.Mockito.when ( vdsGroupDaoMock.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getVdsGroup ( Version.v3_3 ) ) ; getQuery ( ) . executeQueryCommand ( ) ; java.util.Map < java.lang.String , java.lang.String > servers = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertNotNull ( servers ) ; org.junit.Assert.assertEquals ( getAddedServers ( ) , servers ) ; }
Source:
private void updateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.ui.uicommonweb.models.EntityModel wipeAfterDeleteModel ) { if ( storageType.isFileDomain ( ) ) { wipeAfterDeleteModel.setIsChangable ( false ) ; } else { wipeAfterDeleteModel.setIsChangable ( true ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetSANWipeAfterDelete ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; diskModel.getWipeAfterDelete ( ) . setEntity ( returnValue ) ; } } ) ) ; } }

Target:
public void setHash ( java.lang.String hash ) { this . hash = hash ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( IVdcQueryable quota ) { boolean quotaExceeded = false ; if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaStorage ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaStorage ) ( quota ) ) ) ; } else if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) ( quota ) ) ) ; } else { return null ; } if ( quotaExceeded ) { setTitle ( org.ovirt.engine.ui.webadmin.widget.table.column.QuotaUtilizationStatusColumn.applicationConstants.quotaExceeded ( ) ) ; } return quotaExceeded ? getResources ( ) . alertImage ( ) : null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( IVdcQueryable quota ) { boolean quotaExceeded = false ; if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaStorage ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaStorage ) ( quota ) ) ) ; } else if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) ( quota ) ) ) ; } if ( quotaExceeded ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.webadmin.widget.table.column.QuotaUtilizationStatusColumn.constants.quotaExceeded ( ) ) ; } return null ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.VDS_INVALID_SERVER_ID ) ; returnValue = false ; } else if ( ( ( hasVMs ( ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Reboot ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_CANNOT_CLEAR_VMS_WRONG_STATUS ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VDS_INVALID_SERVER_ID ) ; } if ( ( ( hasVMs ( ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Reboot ) ) ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_CLEAR_VMS_WRONG_STATUS ) ; } return true ; }
Source:
public boolean match ( org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel source ) { return ( ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getName ( ) , target.getName ( ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getAddress ( ) , target.getAddress ( ) ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getPort ( ) , target.getPort ( ) ) ) ; }

Target:
public boolean match ( org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel source ) { return ( ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( source.getName ( ) , target.getName ( ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( source.getAddress ( ) , target.getAddress ( ) ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( source.getPort ( ) , target.getPort ( ) ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( getStoragePool ( ) ) ; handleDestroyStoragePoolCommand ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { detachStorageDomainWithEntities ( masterDomain ) ; getCompensationContext ( ) . snapshotEntity ( masterDomain.getStorageStaticData ( ) ) ; masterDomain.setStorageDomainType ( StorageDomainType.Data ) ; getDbFacade ( ) . getStorageDomainStaticDao ( ) . update ( masterDomain.getStorageStaticData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public void canDoActionFailedGuestOsIsNotSupported ( ) { initializeCommand ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = mockVmStatusUp ( ) ; vm.setvm_os ( VmOsType.RHEL3x64 ) ; cretaeVirtIODisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED.toString ( ) ) ) ; }

Target:
public void initializeCommand ( ) { command = org.mockito.Mockito.spy ( createCommand ( ) ) ; mockVds ( ) ; org.mockito.Mockito.when ( command.getActionType ( ) ) . thenReturn ( getCommandActionType ( ) ) ; org.mockito.Mockito.doReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAO.class ) ) . when ( command ) . getVmNetworkInterfaceDAO ( ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase attemptRollback ( org.ovirt.engine.core.common.action.VdcActionType commandType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { if ( canPerformRollbackUsingCommand ( commandType , params ) ) { params.setExecutionReason ( CommandExecutionReason.ROLLBACK_FLOW ) ; params.setTransactionScopeOption ( TransactionScopeOption.RequiresNew ) ; return getBackend ( ) . runInternalAction ( commandType , params , context.clone ( ) ) ; } return new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; }

Target:
private void initCommandBase ( ) { initUser ( ) ; org.ovirt.engine.core.bll.job.ExecutionContext executionContext = context.getExecutionContext ( ) ; if ( ( executionContext.getJob ( ) ) != null ) { setJobId ( executionContext.getJob ( ) . getId ( ) ) ; } else if ( ( executionContext.getStep ( ) ) != null ) { setJobId ( executionContext.getStep ( ) . getJobId ( ) ) ; } setCorrelationId ( _parameters.getCorrelationId ( ) ) ; }
Source:
private static java.lang.String getRelativePath ( java.lang.Class < ? > clz ) { for ( java.lang.reflect.Method method : org.ovirt.engine.api.resource.SystemResource.class . getMethods ( ) ) { if ( ( method.getReturnType ( ) ) == clz ) { javax.ws.rs.Path annotation = method.getAnnotation ( javax.ws.rs.Path.class ) ; if ( annotation != null ) { return annotation.value ( ) ; } } } org.ovirt.engine.api.restapi.util.LinkHelper.log.error ( ( ( "Can\'t find relative path for class \"" + ( clz.getName ( ) ) ) + "\", will return null" ) ) ; return null ; }

Target:
private static java.lang.String getRelativePath ( java.lang.Class < ? > service ) { return org.ovirt.engine.api.restapi.util.LinkHelper.getRelativePath ( service , org.ovirt.engine.api.resource.SystemResource.class ) ; }
Source:
private void setupVmDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > expectedVm = java.util.Collections.singletonList ( vm ) ; org.ovirt.engine.core.dao.VmDAO vmDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDAO.class ) ; org.mockito.Mockito.when ( vmDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedVm ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVmDao ( ) ) . thenReturn ( vmDaoMock ) ; }

Target:
public void testExecuteQueryCommand ( ) { setupVmDao ( java.util.Collections.singletonList ( vm ) ) ; setupVmNetworkInterfaceDao ( java.util.Collections.singletonList ( vmNetworkInterface ) ) ; expectAndTestForVmAndInterface ( ) ; }
Source:
public static void GetDataCenterMaxNameLength ( 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 ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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.RunQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
private void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "2" ) ; struct.add ( VdsProperties.Iface , VdsProperties.Ide ) ; struct.add ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; }

Target:
private void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "2" ) ; struct.add ( VdsProperties.Iface , VdsProperties.Ide ) ; struct.add ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; struct.add ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > getStorageQuotaListParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : diskInfoDestinationMap.values ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter ( ( ( disk.getQuotaId ( ) ) != null ? disk.getQuotaId ( ) : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getMasterVm ( ) . getQuotaId ( ) ) , disk.getstorage_ids ( ) . get ( 0 ) , disk.getSizeInGigabytes ( ) ) ) ; } return list ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : diskInfoDestinationMap.values ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( disk.getQuotaId ( ) , null , QuotaStorageConsumptionParameter.QuotaAction.CONSUME , disk.getstorage_ids ( ) . get ( 0 ) , ( ( double ) ( disk.getSizeInGigabytes ( ) ) ) ) ) ; } return list ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; param.setSoundDeviceEnabled ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ; param.setConsoleEnabled ( model.getIsConsoleDeviceEnabled ( ) . getEntity ( ) ) ; param.setApplyChangesLater ( applyCpuChangesLater ) ; setRngDeviceToParams ( model , param ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallback ( model , defaultNetworkCreatingManager , gettempVm ( ) . getId ( ) ) , this ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = getUpdateVmParameters ( applyCpuChangesLater ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallback ( model , defaultNetworkCreatingManager , gettempVm ( ) . getId ( ) ) , this ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { populateRoles ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Role > ) ( result ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel adElementListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel ) ( model ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) ; if ( handleQueryError ( queryReturnValue , adElementListModel ) ) { return ; } setusers ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; addUsersToModel ( queryReturnValue , getExcludeUsers ( ) ) ; onUserAndAdGroupsLoaded ( adElementListModel ) ; }
Source:
private org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters createProcessOvfUpdateForDomainParams ( ) { org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters params = new org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) ) ; params.setParentCommand ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getActionType ( ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getParameters ( ) ) ; params.setSkipDomainChecks ( true ) ; params.setEndProcedure ( EndProcedure.COMMAND_MANAGED ) ; return params ; }

Target:
private org.ovirt.engine.core.common.action.StorageDomainParametersBase createUpdateOvfStoreParams ( ) { org.ovirt.engine.core.common.action.StorageDomainParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainParametersBase ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) ) ; params.setParentCommand ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getActionType ( ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getParameters ( ) ) ; params.setEndProcedure ( EndProcedure.COMMAND_MANAGED ) ; return params ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; setTitle ( ( disk.isBoot ( ) ? constants.bootableDisk ( ) : null ) ) ; return disk.isBoot ( ) ? resources.bootableDiskIcon ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; setTitle ( ( disk.isShareable ( ) ? constants.shareable ( ) : null ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : null ; }
Source:
public void testUpdate ( ) { existingAdGroup.setname ( existingAdGroup.getname ( ) . toUpperCase ( ) ) ; existingAdGroup.setdomain ( existingAdGroup.getdomain ( ) . toUpperCase ( ) ) ; existingAdGroup.setstatus ( LdapRefStatus.Inactive ) ; dao.update ( existingAdGroup ) ; org.ovirt.engine.core.common.businessentities.LdapGroup result = dao.get ( existingAdGroup.getid ( ) ) ; assertNotNull ( result ) ; assertEquals ( existingAdGroup , result ) ; }

Target:
public void testUpdate ( ) { existingAdGroup.setname ( existingAdGroup.getname ( ) . toUpperCase ( ) ) ; existingAdGroup.setdomain ( existingAdGroup.getdomain ( ) . toUpperCase ( ) ) ; existingAdGroup.setstatus ( LdapRefStatus.Inactive ) ; dao.update ( existingAdGroup ) ; org.ovirt.engine.core.common.businessentities.LdapGroup result = dao.get ( existingAdGroup.getid ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingAdGroup , result ) ; }
Source:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetDomainExpectations ( StorageType.NFS , true ) ; setUpGetConnectionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachStorageDomainFromPool , org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters.class , new java.lang.String [ ] { "StorageDomainId" , "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.STORAGE_DOMAIN_ID , org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.DATA_CENTER_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetDomainExpectations ( StorageType.NFS , true ) ; setUpGetConnectionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachStorageDomainFromPool , org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters.class , new java.lang.String [ ] { "StorageDomainId" , "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.STORAGE_DOMAIN_ID , org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.DATA_CENTER_ID } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void saveAsyncTaskToDb ( final org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . save ( asyncTask ) ; persistCommand ( copyToCommandEntity ( asyncTask , commandsCache.get ( asyncTask.getCommandId ( ) ) ) ) ; }

Target:
private void initChildHierarchy ( ) { if ( ! ( childHierarchyInitialized ) ) { synchronized ( LOCK ) { if ( ! ( childHierarchyInitialized ) ) { childHierarchy.clear ( ) ; for ( org.ovirt.engine.core.common.businessentities.CommandEntity cmd : getCommandsWithCallBackEnabled ( ) ) { buildCmdHierarchy ( cmd ) ; } } childHierarchyInitialized = true ; } } }
Source:
protected void updateStorageDomains ( final org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { if ( limitToStorageDomainId == null ) { super . updateStorageDomains ( datacenter ) ; } else { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getStorageDomainById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( returnValue ) ) ; diskModel.getStorageDomain ( ) . setSelectedItem ( storageDomain ) ; } } ) , limitToStorageDomainId ) ; } }

Target:
protected void updateStorageDomains ( final org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { if ( limitToStorageDomainId == null ) { super . updateStorageDomains ( datacenter ) ; } else { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getStorageDomainById ( new org.ovirt.engine.ui.uicommonweb.models.storage.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { getStorageDomain ( ) . setSelectedItem ( storageDomain ) ; } } ) , limitToStorageDomainId ) ; } }
Source:
public void testIgnoresCase ( ) { for ( java.lang.String value : getCaseCombinations ( "true" ) ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) , true ) ; } for ( java.lang.String value : getCaseCombinations ( "false" ) ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) , false ) ; } }

Target:
public void testIgnoresCase ( ) { for ( java.lang.String value : getCaseCombinations ( "true" ) ) { org.junit.Assert.assertTrue ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) ) ; } for ( java.lang.String value : getCaseCombinations ( "false" ) ) { org.junit.Assert.assertFalse ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) ) ; } }
Source:
private void readMemoryItem ( org.ovirt.engine.core.compat.backendcompat.XmlNode node ) { vmBase.setMemSizeMb ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:VirtualQuantity" , _xmlNS ) . innerText ) ) ; }

Target:
private void readCpuItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setNumOfSockets ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:num_of_sockets" , _xmlNS ) . innerText ) ) ; vmBase.setCpuPerSocket ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:cpu_per_socket" , _xmlNS ) . innerText ) ) ; }
Source:
private boolean storageDomainStatusIsValid ( ) { boolean returnValue ; if ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.isInternalExecution ( ) ) { returnValue = checkStorageDomainStatus ( StorageDomainStatus.InActive , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , StorageDomainStatus.Maintenance ) ; } else { returnValue = checkStorageDomainStatus ( StorageDomainStatus.InActive , StorageDomainStatus.Unknown , StorageDomainStatus.Maintenance ) ; } return returnValue ; }

Target:
private boolean storageDomainStatusIsValid ( ) { boolean returnValue ; if ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.isInternalExecution ( ) ) { returnValue = checkStorageDomainStatus ( StorageDomainStatus.InActive , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , StorageDomainStatus.Maintenance , StorageDomainStatus.PreparingForMaintenance ) ; } else { returnValue = checkStorageDomainStatus ( StorageDomainStatus.InActive , StorageDomainStatus.Unknown , StorageDomainStatus.Maintenance , StorageDomainStatus.PreparingForMaintenance ) ; } return returnValue ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getCopyCommand ( ) ) ) { Copy ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } else if ( command == ( getChangeQuotaCommand ( ) ) ) { changeQuota ( ) ; } else if ( command.getName ( ) . equals ( "onChangeQuota" ) ) { onChangeQuota ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getCopyCommand ( ) ) ) { Copy ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } else if ( command == ( getChangeQuotaCommand ( ) ) ) { changeQuota ( ) ; } else if ( command.getName ( ) . equals ( "onChangeQuota" ) ) { onChangeQuota ( ) ; } }
Source:
private void checkIfInitFinished ( ) { if ( ( xmlInitialized ) && ( urlInitialized ) ) { if ( ( ! ( reportBaseUrl.equals ( "" ) ) ) && ( ! ( resourceMap.isEmpty ( ) ) ) ) { setReportsEnabled ( true ) ; } else { setReportsEnabled ( false ) ; } reportsInitEvent.raise ( this , null ) ; } }

Target:
private void checkIfInitFinished ( ) { if ( ( ( xmlInitialized ) && ( urlInitialized ) ) && ( ( ssoToken ) != null ) ) { if ( ( ( ! ( "" . equals ( reportBaseUrl ) ) ) && ( ! ( resourceMap.isEmpty ( ) ) ) ) && ( ! ( "" . equals ( ssoToken ) ) ) ) { setReportsEnabled ( true ) ; } else { setReportsEnabled ( false ) ; } reportsInitEvent.raise ( this , null ) ; } }
Source:
public void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { 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.GlusterGeoRepSession > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }

Target:
public void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GlusterVolumeSnapshotEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public void cancel ( ) { org.ovirt.engine.ui.frontend.Frontend.Unsubscribe ( ) ; cancelConfirmation ( ) ; setGuideContext ( null ) ; setWindow ( null ) ; UpdateActionAvailability ( ) ; }

Target:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { updateConsoleModels ( ) ; } }
Source:
private static boolean isSupported ( org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters.ArchCapabilitiesVerb archCapabilitiesVerb , org.ovirt.engine.core.common.businessentities.ArchitectureType architecture , org.ovirt.engine.core.compat.Version version ) { switch ( archCapabilitiesVerb ) { case GetMigrationSupport : return org.ovirt.engine.core.common.FeatureSupported.isMigrationSupported ( architecture , version ) ; case GetMemorySnapshotSupport : return org.ovirt.engine.core.common.FeatureSupported.isMemorySnapshotSupportedByArchitecture ( architecture , version ) ; case GetSuspendSupport : return org.ovirt.engine.core.common.FeatureSupported.isSuspendSupportedByArchitecture ( architecture , version ) ; } return false ; }

Target:
private static boolean isSupported ( org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters.ArchCapabilitiesVerb archCapabilitiesVerb , org.ovirt.engine.core.common.businessentities.ArchitectureType architecture , org.ovirt.engine.core.compat.Version version ) { switch ( archCapabilitiesVerb ) { case GetMigrationSupport : return org.ovirt.engine.core.common.FeatureSupported.isMigrationSupported ( architecture , version ) ; case GetMemorySnapshotSupport : return org.ovirt.engine.core.common.FeatureSupported.isMemorySnapshotSupportedByArchitecture ( architecture , version ) ; case GetSuspendSupport : return org.ovirt.engine.core.common.FeatureSupported.isSuspendSupportedByArchitecture ( architecture , version ) ; case GetMemoryHotUnplugSupport : return org.ovirt.engine.core.common.FeatureSupported.hotUnplugMemory ( version , architecture ) ; } return false ; }
Source:
public void FilterUnSelectableModels ( ) { java.util.ArrayList < java.lang.Object > filterredItems = new java.util.ArrayList < java.lang.Object > ( ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > items = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > Cast ( getModel ( ) . getItems ( ) ) ; for ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model : items ) { if ( ( ( org.ovirt.engine.ui.uicommonweb.models.Model ) ( model ) ) . getIsSelectable ( ) ) { filterredItems.add ( model ) ; } } getModel ( ) . getAvailableStorageItems ( ) . setItems ( filterredItems ) ; }

Target:
public void FilterUnSelectableModels ( ) { java.util.ArrayList < java.lang.Object > filterredItems = new java.util.ArrayList < java.lang.Object > ( ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > items = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > cast ( getModel ( ) . getItems ( ) ) ; for ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model : items ) { if ( ( ( org.ovirt.engine.ui.uicommonweb.models.Model ) ( model ) ) . getIsSelectable ( ) ) { filterredItems.add ( model ) ; } } getModel ( ) . getAvailableStorageItems ( ) . setItems ( filterredItems ) ; }
Source:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
protected void ExecuteIrsBrokerCommand ( ) { final P params = org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.getParameters ( ) ; final java.lang.String storagePoolId = params.getStoragePoolId ( ) . toString ( ) ; final java.lang.String targetVersion = params.getCompatibilityVersion ( ) ; org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.log.infoFormat ( "Upgrading storage pool {0} to version {1}" , storagePoolId , targetVersion ) ; status = org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.getIrsProxy ( ) . upgradeStoragePool ( storagePoolId , targetVersion ) ; org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeIrsBrokerCommand ( ) { final P params = org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.getParameters ( ) ; final java.lang.String storagePoolId = params.getStoragePoolId ( ) . toString ( ) ; final java.lang.String targetVersion = params.getCompatibilityVersion ( ) ; org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.log.infoFormat ( "Upgrading storage pool {0} to version {1}" , storagePoolId , targetVersion ) ; status = org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.getIrsProxy ( ) . upgradeStoragePool ( storagePoolId , targetVersion ) ; org.ovirt.engine.core.vdsbroker.irsbroker.UpgradeStoragePoolVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
private static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > mockSnapshots ( ) { org.ovirt.engine.core.compat.Guid snapshotGuid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage expectedSnapshot = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; expectedSnapshot.setImageId ( snapshotGuid ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > snapshots = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( 1 ) ; snapshots.add ( expectedSnapshot ) ; return snapshots ; }

Target:
private static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > mockSnapshots ( ) { org.ovirt.engine.core.compat.Guid snapshotGuid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage expectedSnapshot = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; expectedSnapshot.setImageId ( snapshotGuid ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > snapshots = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( 1 ) ; snapshots.add ( expectedSnapshot ) ; return snapshots ; }
Source:
private boolean runNetworkClusterCommands ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > networkClusters , org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.utils.linq.Function < org.ovirt.engine.core.common.businessentities.network.NetworkCluster , ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > networkClusterToParameterTransformer ) { final java.util.List < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = org.ovirt.engine.core.utils.linq.LinqUtils.transformToList ( networkClusters , networkClusterToParameterTransformer ) ; return runMultipleInternalCommandsSynchronously ( actionType , parameters ) ; }

Target:
private boolean runNetworkClusterCommands ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > networkClusters , org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.function.Function < org.ovirt.engine.core.common.businessentities.network.NetworkCluster , ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > networkClusterToParameterTransformer ) { final java.util.List < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = networkClusters.stream ( ) . map ( networkClusterToParameterTransformer ) . collect ( java.util.stream.Collectors.toList ( ) ) ; return runMultipleInternalCommandsSynchronously ( actionType , parameters ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( model ) ) ; java.lang.String address = ( ( java.lang.String ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; spiceConsoleModel.getspice ( ) . setHost ( address ) ; spiceConsoleModel.spiceConnect ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( model ) ) ; java.lang.String address = ( ( java.lang.String ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; spiceConsoleModel.getspice ( ) . getOptions ( ) . setHost ( address ) ; spiceConsoleModel.spiceConnect ( ) ; }
Source:
protected org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters getActionParameters ( org.ovirt.engine.api.model.Network network , org.ovirt.engine.api.model.Network entity ) { if ( namedDataCenter ( network ) ) { entity.setDataCenterId ( getDataCenterId ( network ) ) ; } org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( entity.getDataCenterId ( ) , entity ) ; if ( ( network != null ) && ( network.isSetProfileRequired ( ) ) ) { parameters.setVnicProfileRequired ( network.isProfileRequired ( ) ) ; } return parameters ; }

Target:
protected org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters getAddParameters ( org.ovirt.engine.api.model.Network network , org.ovirt.engine.api.model.Network entity ) { if ( namedDataCenter ( network ) ) { entity.setDataCenterId ( getDataCenterId ( network ) ) ; } org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( entity.getDataCenterId ( ) , entity ) ; if ( ( network != null ) && ( network.isSetProfileRequired ( ) ) ) { parameters.setVnicProfileRequired ( network.isProfileRequired ( ) ) ; } return parameters ; }
Source:
private void removeStorage ( ) { org.ovirt.engine.core.compat.Guid id = storage.getId ( ) ; org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getStorageDomainDynamicDAO ( ) . remove ( id ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshots = org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getDiskImageDao ( ) . getAllSnapshotsForStorageDomain ( id ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage i : snapshots ) { org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getImageDao ( ) . remove ( i.getImageId ( ) ) ; } org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getStorageDomainStaticDAO ( ) . remove ( id ) ; java.lang.System.out.println ( ( ( "-- removed storage " + ( storage.getstorage_name ( ) ) ) + " and its snapshots -- " ) ) ; }

Target:
private void removeStorage ( ) { org.ovirt.engine.core.compat.Guid id = storage.getId ( ) ; org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getStorageDomainDynamicDao ( ) . remove ( id ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshots = org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getDiskImageDao ( ) . getAllSnapshotsForStorageDomain ( id ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage i : snapshots ) { org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getImageDao ( ) . remove ( i.getImageId ( ) ) ; } org.ovirt.engine.core.itests.BasicTestSetup.DB_FACADE.getStorageDomainStaticDao ( ) . remove ( id ) ; java.lang.System.out.println ( ( ( "-- removed storage " + ( storage.getstorage_name ( ) ) ) + " and its snapshots -- " ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepStatus ( volumeName ) ; 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 ) { 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 ) ; } }