auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
protected boolean desiredImage ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { return true ; }
Source:
protected void executeQueryCommand ( ) { if ( ( org.ovirt.engine.core.bll.GetVmsInitQuery.getParameters ( ) . getIds ( ) ) != null ) { org.ovirt.engine.core.bll.GetVmsInitQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.VmHandler.getVmInitByIds ( org.ovirt.engine.core.bll.GetVmsInitQuery.getParameters ( ) . getIds ( ) , true ) ) ; } }

Target:
protected void executeQueryCommand ( ) { if ( ( org.ovirt.engine.core.bll.GetVmsInitQuery.getParameters ( ) . getIds ( ) ) != null ) { org.ovirt.engine.core.bll.GetVmsInitQuery.getQueryReturnValue ( ) . setReturnValue ( vmHandler.getVmInitByIds ( org.ovirt.engine.core.bll.GetVmsInitQuery.getParameters ( ) . getIds ( ) , true ) ) ; } }
Source:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addRemovedNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( emptyParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getRemovedNetworkAttachments ( ) ) == null ) { parameters.setRemovedNetworkAttachments ( new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ) ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment : networkAttachments ) { parameters.getRemovedNetworkAttachments ( ) . add ( networkAttachment.getId ( ) ) ; } return this ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addBonds ( org.ovirt.engine.core.common.businessentities.network.Bond ... bonds ) { if ( nullParameters ( bonds ) ) { return this ; } if ( ( parameters.getBonds ( ) ) == null ) { parameters.setBonds ( new java.util.ArrayList < > ( ) ) ; } parameters.getBonds ( ) . addAll ( java.util.Arrays.asList ( bonds ) ) ; return this ; }
Source:
public static void GetHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.GetAllVdsByStoragePoolParameters ( spId ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response remove ( org.ovirt.engine.api.model.Action action ) { get ( ) ; boolean force = false ; if ( ( action != null ) && ( action.isSetForce ( ) ) ) { force = action.isForce ( ) ; } return performAction ( VdcActionType.RemoveVds , new org.ovirt.engine.core.common.action.RemoveVdsParameters ( guid , force ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendHostResource.FORCE , true , false ) ; return performAction ( VdcActionType.RemoveVds , new org.ovirt.engine.core.common.action.RemoveVdsParameters ( guid , force ) ) ; }
Source:
public static void GetSANWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetSANWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void getClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void 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 ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.VDS > hostNameListModel = getExternalHostName ( ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; setEnableSearchHost ( true ) ; getProviders ( ) . setIsChangable ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.VDS > hostNameListModel = getExternalHostName ( ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangeable ( true ) ; setEnableSearchHost ( true ) ; getProviders ( ) . setIsChangeable ( true ) ; }
Source:
private static boolean isDiskProfilePermitted ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile diskProfile , java.util.Set < org.ovirt.engine.core.compat.Guid > permittedDiskProfilesIds , org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { return ( ( user == null ) || ( permittedDiskProfilesIds.contains ( diskProfile.getId ( ) ) ) ) || ( ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.getPermissionDAO ( ) . getEntityPermissions ( user.getId ( ) , ActionGroup.ATTACH_DISK_PROFILE , diskProfile.getId ( ) , VdcObjectType.DiskProfile ) ) != null ) ; }

Target:
private static boolean isDiskProfilePermitted ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile diskProfile , java.util.Set < org.ovirt.engine.core.compat.Guid > permittedDiskProfilesIds , org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { return ( ( user == null ) || ( permittedDiskProfilesIds.contains ( diskProfile.getId ( ) ) ) ) || ( ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.getPermissionDao ( ) . getEntityPermissions ( user.getId ( ) , ActionGroup.ATTACH_DISK_PROFILE , diskProfile.getId ( ) , VdcObjectType.DiskProfile ) ) != null ) ; }
Source:
public void generate ( org.ovirt.api.metamodel.concepts.Model model , java.io.File file ) { this . model = model ; try ( java.io.OutputStream out = new java.io.FileOutputStream ( file ) ) { javax.xml.stream.XMLOutputFactory factory = javax.xml.stream.XMLOutputFactory.newFactory ( ) ; writer = factory.createXMLStreamWriter ( out , "UTF-8" ) ; com.sun.xml.txw2.output.IndentingXMLStreamWriter indenter = new com.sun.xml.txw2.output.IndentingXMLStreamWriter ( writer ) ; indenter.setIndentStep ( " " ) ; writer = indenter ; writeModel ( ) ; writer.close ( ) ; } catch ( java.io.IOException | javax.xml.stream.XMLStreamException exception ) { throw new java.lang.IllegalStateException ( "Can't generate XML representation" , exception ) ; } }

Target:
public void generate ( org.ovirt.api.metamodel.concepts.Model model , java.io.File file ) { this . model = model ; try ( org.ovirt.api.metamodel.tool.XmlWriter tmp = new org.ovirt.api.metamodel.tool.XmlWriter ( file ) ) { writer = tmp ; writeModel ( ) ; } }
Source:
public < P extends org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase > org.ovirt.engine.core.common.interfaces.FutureVDSCall < org.ovirt.engine.core.common.vdscommands.VDSReturnValue > runFutureVdsCommand ( final org.ovirt.engine.core.common.vdscommands.FutureVDSCommandType commandType , final P parameters ) { org.ovirt.engine.core.vdsbroker.vdsbroker.FutureVDSCommand < P > command = createFutureCommand ( commandType , parameters ) ; if ( command != null ) { command.Execute ( ) ; return command ; } return null ; }

Target:
public < P extends org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase > org.ovirt.engine.core.common.interfaces.FutureVDSCall < org.ovirt.engine.core.common.vdscommands.VDSReturnValue > runFutureVdsCommand ( final org.ovirt.engine.core.common.vdscommands.FutureVDSCommandType commandType , final P parameters ) { org.ovirt.engine.core.vdsbroker.vdsbroker.FutureVDSCommand < P > command = createFutureCommand ( commandType , parameters ) ; if ( command != null ) { command.execute ( ) ; return command ; } return null ; }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { return getBackend ( ) . runInternalAction ( VdcActionType.SetupGlusterGeoRepMountBrokerInternal , new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( currentSlaveServerId , getParameters ( ) . getSlaveVolumeName ( ) , getParameters ( ) . getUserName ( ) , getParameters ( ) . getUserGroup ( ) , true ) ) . getSucceeded ( ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase call ( ) throws java.lang.Exception { return getBackend ( ) . runInternalAction ( VdcActionType.SetupGlusterGeoRepMountBrokerInternal , new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( currentSlaveServerId , getParameters ( ) . getSlaveVolumeName ( ) , getParameters ( ) . getUserName ( ) , getParameters ( ) . getUserGroup ( ) , true ) ) ; }
Source:
public void testGlobalSpiceProxy ( ) { org.ovirt.engine.api.restapi.types.VM entity = new org.ovirt.engine.api.restapi.types.VM ( ) ; mcr.mockConfigValue ( ConfigValues.SpiceProxyDefault , org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY ) ; org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY , model.getDisplay ( ) . getProxy ( ) ) ; }

Target:
public void testGlobalSpiceProxy ( ) { org.ovirt.engine.api.restapi.types.VM entity = new org.ovirt.engine.api.restapi.types.VM ( ) ; mcr.mockConfigValue ( ConfigValues.SpiceProxyDefault , org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY ) ; org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY , model.getDisplay ( ) . getProxy ( ) ) ; }
Source:
private void setQcowCompatForQcowImage ( ) { org.ovirt.engine.core.common.businessentities.storage.Image image = imageDao.get ( getDiskImage ( ) . getImageId ( ) ) ; if ( ( ( getDiskImage ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) && ( getDiskImage ( ) . getVolumeFormat ( ) . equals ( VolumeFormat.COW ) ) ) { image.setQcowCompat ( getDiskImage ( ) . getQcowCompat ( ) ) ; imageDao.update ( image ) ; } }

Target:
private void setQcowCompatForQcowImage ( ) { org.ovirt.engine.core.common.businessentities.storage.Image image = imageDao.get ( getDiskImage ( ) . getImageId ( ) ) ; if ( ( ( getDiskImage ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) && ( ( getDiskImage ( ) . getVolumeFormat ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ) ) ) { image.setQcowCompat ( getDiskImage ( ) . getQcowCompat ( ) ) ; imageDao.update ( image ) ; } }
Source:
public static java.lang.Integer getEffectiveCpuCores ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDao ( ) . get ( vds.getVdsGroupId ( ) ) ; if ( ( ( ( vds.getCpuThreads ( ) ) != null ) && ( vdsGroup != null ) ) && ( java.lang.Boolean.TRUE.equals ( vdsGroup.getCountThreadsAsCores ( ) ) ) ) { return vds.getCpuThreads ( ) ; } else { return vds.getCpuCores ( ) ; } }

Target:
public static java.lang.Integer getEffectiveCpuCores ( org.ovirt.engine.core.common.businessentities.VDS vds , boolean countThreadsAsCores ) { if ( ( ( vds.getCpuThreads ( ) ) != null ) && countThreadsAsCores ) { return vds.getCpuThreads ( ) ; } else { return vds.getCpuCores ( ) ; } }
Source:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
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 ) ; }
Source:
protected void executeVmCommand ( ) { if ( hotPlugVmNicRequired ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getStatus ( ) ) ) { runVdsCommand ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getAction ( ) . getCommandType ( ) , new org.ovirt.engine.core.common.vdscommands.VmNicDeviceVDSParameters ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVmNetworkInterfaceDao ( ) . get ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNicId ( ) ) , vmDevice ) ) ; } org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( updateDevice ( ) ) ; org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.setSucceeded ( true ) ; }

Target:
protected void executeVmCommand ( ) { if ( hotPlugVmNicRequired ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getStatus ( ) ) ) { runVdsCommand ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getAction ( ) . getCommandType ( ) , new org.ovirt.engine.core.common.vdscommands.VmNicDeviceVDSParameters ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) , vmDevice ) ) ; } org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( updateDevice ( ) ) ; org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.setSucceeded ( true ) ; }
Source:
public void initHandlers ( com.google.gwt.event.shared.EventBus eventBus ) { if ( ( ssoTokenHandlerRegistration ) != null ) { ssoTokenHandlerRegistration.removeHandler ( ) ; } ssoTokenHandlerRegistration = eventBus.addHandler ( org.ovirt.engine.ui.frontend.communication.SSOTokenChangeEvent.getType ( ) , new org.ovirt.engine.ui.frontend.communication.SSOTokenChangeEvent.SSOTokenChangeHandler ( ) { @ java.lang.Override public void onSSOTokenChange ( org.ovirt.engine.ui.frontend.communication.SSOTokenChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.ReportInit.this . ssoToken = event.getToken ( ) ; if ( ( org.ovirt.engine.ui.uicommonweb.ReportInit.this . ssoToken ) == null ) { org.ovirt.engine.ui.uicommonweb.ReportInit.this . ssoToken = "" ; } checkIfInitFinished ( ) ; } } ) ; }

Target:
public void initHandlers ( com.google.gwt.event.shared.EventBus eventBus ) { if ( ( ssoTokenHandlerRegistration ) != null ) { ssoTokenHandlerRegistration.removeHandler ( ) ; } ssoTokenHandlerRegistration = eventBus.addHandler ( org.ovirt.engine.ui.frontend.communication.SsoTokenChangeEvent.getType ( ) , new org.ovirt.engine.ui.frontend.communication.SsoTokenChangeEvent.SsoTokenChangeHandler ( ) { @ java.lang.Override public void onSsoTokenChange ( org.ovirt.engine.ui.frontend.communication.SsoTokenChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.ReportInit.this . ssoToken = event.getToken ( ) ; if ( ( org.ovirt.engine.ui.uicommonweb.ReportInit.this . ssoToken ) == null ) { org.ovirt.engine.ui.uicommonweb.ReportInit.this . ssoToken = "" ; } checkIfInitFinished ( ) ; } } ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > executeGetDeviceList ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String lunId ) { org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters parameters = new org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters ( vdsId , storageType , false , java.util.Arrays.asList ( lunId ) ) ; return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > ) ( runVdsCommand ( VDSCommandType.GetDeviceList , parameters ) . getReturnValue ( ) ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > executeGetDeviceList ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String lunId ) { org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters parameters = new org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters ( vdsId , storageType , false , java.util.Collections.singletonList ( lunId ) ) ; return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > ) ( runVdsCommand ( VDSCommandType.GetDeviceList , parameters ) . getReturnValue ( ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > executeGetDeviceList ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters parameters = new org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters ( vdsId , storageType ) ; return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > ) ( getVdsBroker ( ) . RunVdsCommand ( VDSCommandType.GetDeviceList , parameters ) . getReturnValue ( ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validRemovableHostedEngineDisks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( isHostedEngineDirectLunDisk ( ) ) || ( ! ( vm.isHostedEngine ( ) ) ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_HOSTED_ENGINE_DISK ) ; }
Source:
private void UseAlternateCredentials_EntityChanged ( ) { boolean useAlternateCredentials = ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ; getSysPrepUserName ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ) ; getSysPrepPassword ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ) ; getSysPrepUserName ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; getSysPrepPassword ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; }

Target:
private void useAlternateCredentials_EntityChanged ( ) { boolean useAlternateCredentials = ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ; getSysPrepUserName ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ) ; getSysPrepPassword ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ) ; getSysPrepUserName ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; getSysPrepPassword ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; }
Source:
protected org.ovirt.engine.core.bll.context.DefaultCompensationContext createDefaultCompensationContext ( org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.bll.context.DefaultCompensationContext defaultContext = new org.ovirt.engine.core.bll.context.DefaultCompensationContext ( ) ; defaultContext.setCommandId ( commandId ) ; defaultContext.setCommandType ( getClass ( ) . getName ( ) ) ; defaultContext.setBusinessEntitySnapshotDAO ( getBusinessEntitySnapshotDAO ( ) ) ; defaultContext.setSnapshotSerializer ( org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) ) ; return defaultContext ; }

Target:
protected org.ovirt.engine.core.bll.context.DefaultCompensationContext createDefaultCompensationContext ( org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.bll.context.DefaultCompensationContext defaultContext = new org.ovirt.engine.core.bll.context.DefaultCompensationContext ( ) ; defaultContext.setCommandId ( commandId ) ; defaultContext.setCommandType ( getClass ( ) . getName ( ) ) ; defaultContext.setBusinessEntitySnapshotDao ( getBusinessEntitySnapshotDao ( ) ) ; defaultContext.setSnapshotSerializer ( org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) ) ; return defaultContext ; }
Source:
private void handleNonResponsiveHosts ( java.util.List < java.lang.String > hostNotRespondingList ) { if ( ! ( hostNotRespondingList.isEmpty ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_CANNOT_MAINTENANCE_VDS_IS_NOT_RESPONDING_WITH_VMS ) ; org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getReturnValue ( ) . getCanDoActionMessages ( ) . add ( java.lang.String.format ( "$HostNotResponding %1$s" , org.apache.commons.lang.StringUtils.join ( hostNotRespondingList , "," ) ) ) ; } }

Target:
private void handleNonResponsiveHosts ( java.util.List < java.lang.String > hostNotRespondingList ) { if ( ! ( hostNotRespondingList.isEmpty ( ) ) ) { addCanDoActionMessage ( EngineMessage.VDS_CANNOT_MAINTENANCE_VDS_IS_NOT_RESPONDING_WITH_VMS ) ; org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getReturnValue ( ) . getCanDoActionMessages ( ) . add ( java.lang.String.format ( "$HostNotResponding %1$s" , org.apache.commons.lang.StringUtils.join ( hostNotRespondingList , "," ) ) ) ; } }
Source:
public void forValue ( ) { for ( java.lang.String val : new java.lang.String [ ] { "0" , "2" , "3" } ) { junit.framework.Assert.assertNotNull ( org.ovirt.engine.core.common.businessentities.StorageFormatType.forValue ( val ) ) ; } junit.framework.Assert.assertNull ( org.ovirt.engine.core.common.businessentities.StorageFormatType.forValue ( null ) ) ; junit.framework.Assert.assertNull ( org.ovirt.engine.core.common.businessentities.StorageFormatType.forValue ( "intentionally_notexisting" ) ) ; }

Target:
public void forValue ( ) { for ( java.lang.String val : new java.lang.String [ ] { "0" , "2" , "3" } ) { org.junit.Assert.assertNotNull ( org.ovirt.engine.core.common.businessentities.StorageFormatType.forValue ( val ) ) ; } org.junit.Assert.assertNull ( org.ovirt.engine.core.common.businessentities.StorageFormatType.forValue ( null ) ) ; org.junit.Assert.assertNull ( org.ovirt.engine.core.common.businessentities.StorageFormatType.forValue ( "intentionally_notexisting" ) ) ; }
Source:
public org.ovirt.engine.core.compat.NGuid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { long sizeNeeded = ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) ) + ( getMetaDataSizeInBytes ( ) ) ) / ( BYTES_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , sizeNeeded ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }

Target:
public org.ovirt.engine.core.compat.Guid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { long sizeNeeded = ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) ) + ( org.ovirt.engine.core.bll.HibernateVmCommand.META_DATA_SIZE_IN_BYTES ) ) / ( BYTES_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , sizeNeeded ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }
Source:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > listPermissionSubjects ; if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) == null ) || ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) { listPermissionSubjects = new java.util.ArrayList < org.ovirt.engine.core.common.PermissionSubject > ( ) ; } else { listPermissionSubjects = super . getPermissionCheckSubjects ( ) ; } listPermissionSubjects.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return listPermissionSubjects ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > listPermissionSubjects ; if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) == null ) || ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) { listPermissionSubjects = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; } else { listPermissionSubjects = super . getPermissionCheckSubjects ( ) ; } listPermissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return listPermissionSubjects ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { org.ovirt.engine.core.common.businessentities.AuditLog event = org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getAuditLogDao ( ) . get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; if ( AuditLogSeverity.ALERT.equals ( event.getseverity ( ) ) ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.compat.Guid.SYSTEM , org.ovirt.engine.core.common.VdcObjectType.System , org.ovirt.engine.core.common.businessentities.ActionGroup.AUDIT_LOG_MANAGEMENT ) ) ; } return getPermissionList ( event ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { org.ovirt.engine.core.common.businessentities.AuditLog event = org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getAuditLogDao ( ) . get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; if ( AuditLogSeverity.ALERT.equals ( event.getSeverity ( ) ) ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.compat.Guid.SYSTEM , org.ovirt.engine.core.common.VdcObjectType.System , org.ovirt.engine.core.common.businessentities.ActionGroup.AUDIT_LOG_MANAGEMENT ) ) ; } return getPermissionList ( event ) ; }
Source:
private org.ovirt.engine.core.utils.lock.EngineLock retrieveVdsExecutionLock ( ) { if ( ( lock ) == null ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > exsluciveLock = java.util.Collections.singletonMap ( org.ovirt.engine.core.vdsbroker.vdsbroker.SpmStopVDSCommand.getParameters ( ) . getVdsId ( ) . toString ( ) , new org.ovirt.engine.core.common.utils.Pair ( LockingGroup.VDS_EXECUTION.toString ( ) , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED.toString ( ) ) ) ; lock = new org.ovirt.engine.core.utils.lock.EngineLock ( exsluciveLock , null ) ; } return lock ; }

Target:
private org.ovirt.engine.core.utils.lock.EngineLock retrieveVdsExecutionLock ( ) { if ( ( lock ) == null ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > exsluciveLock = java.util.Collections.singletonMap ( org.ovirt.engine.core.vdsbroker.vdsbroker.SpmStopVDSCommand.getParameters ( ) . getVdsId ( ) . toString ( ) , new org.ovirt.engine.core.common.utils.Pair ( LockingGroup.VDS_EXECUTION.toString ( ) , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED.toString ( ) ) ) ; lock = new org.ovirt.engine.core.utils.lock.EngineLock ( exsluciveLock , null ) ; } return lock ; }
Source:
public int hashCode ( ) { return vmId.hashCode ( ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.bll.AutoStartVmsRunner.AutoStartVmToRestart ) ) { return false ; } org.ovirt.engine.core.bll.AutoStartVmsRunner.AutoStartVmToRestart other = ( ( org.ovirt.engine.core.bll.AutoStartVmsRunner.AutoStartVmToRestart ) ( obj ) ) ; return java.util.Objects.equals ( vmId , other.vmId ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getSucceeded ( ) ) { if ( ( oldIface.isLinked ( ) ) != ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . isLinked ( ) ) ) { org.ovirt.engine.core.common.AuditLogType customValue = ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . isLinked ( ) ) ? org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE_LINK_UP : org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE_LINK_DOWN ; addCustomValue ( "LinkState" , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( customValue ) ) ; } else { org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.addCustomValue ( "LinkState" , " " ) ; } return org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE ; } return org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getSucceeded ( ) ) { if ( ( oldIface.isLinked ( ) ) != ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . isLinked ( ) ) ) { org.ovirt.engine.core.common.AuditLogType customValue = ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . isLinked ( ) ) ? org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE_LINK_UP : org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE_LINK_DOWN ; addCustomValue ( "LinkState" , auditLogDirector.getMessage ( customValue ) ) ; } else { org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.addCustomValue ( "LinkState" , " " ) ; } return org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE ; } return org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_VM_INTERFACE_FAILED ; }
Source:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_USER_ID , ActionGroup.CONFIGURE_VM_STORAGE , org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getId ( ) , existingDomain.getId ( ) ) ; }

Target:
public void testGetAllForStoragePoolWithPermissionsDisabledUnprivilegedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllForStoragePool ( org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ID , false ) ; org.ovirt.engine.core.dao.StorageDomainDAOTest.assertGetAllForStoragePoolResult ( result , org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase removeCinderDisk ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > future = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RemoveCinderDisk , buildChildCommandParameters ( cinderDisk ) , org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.cloneContextAndDetachFromParent ( ) ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error removing Cinder disk" , e ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.ActionReturnValue removeCinderDisk ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { java.util.concurrent.Future < org.ovirt.engine.core.common.action.ActionReturnValue > future = commandCoordinatorUtil.executeAsyncCommand ( ActionType.RemoveCinderDisk , buildChildCommandParameters ( cinderDisk ) , org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.cloneContextAndDetachFromParent ( ) ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error removing Cinder disk" , e ) ; } return null ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
private void updateCommandStatus ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { if ( ! ( result.getCanDoAction ( ) ) ) { command.setCommandStatus ( CommandStatus.FAILED ) ; return ; } if ( CommandStatus.ACTIVE_SYNC.equals ( coco.getCommandStatus ( command.getCommandId ( ) ) ) ) { command.setCommandStatus ( ( result.getSucceeded ( ) ? org.ovirt.engine.core.compat.CommandStatus.SUCCEEDED : org.ovirt.engine.core.compat.CommandStatus.FAILED ) ) ; } }

Target:
private void updateCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = coco.getCommandEntity ( command.getCommandId ( ) ) ; cmdEntity.setReturnValue ( result ) ; if ( ! ( result.getCanDoAction ( ) ) ) { cmdEntity.setCommandStatus ( CommandStatus.FAILED ) ; } else if ( CommandStatus.ACTIVE_SYNC.equals ( cmdEntity.getCommandStatus ( ) ) ) { cmdEntity.setCommandStatus ( ( result.getSucceeded ( ) ? org.ovirt.engine.core.compat.CommandStatus.SUCCEEDED : org.ovirt.engine.core.compat.CommandStatus.FAILED ) ) ; } coco.persistCommand ( cmdEntity ) ; }
Source:
public static < T extends java.lang.Enum > java.lang.String [ ] GetNames ( java.lang.Class < T > clazz ) { java.util.ArrayList < java.lang.String > returnValues = new java.util.ArrayList < java.lang.String > ( ) ; if ( ! ( clazz.isEnum ( ) ) ) { throw new org.ovirt.engine.core.compat.CompatException ( ( "Class is not an Enum: " + ( clazz.getName ( ) ) ) ) ; } for ( java.lang.Enum e : clazz.getEnumConstants ( ) ) { returnValues.add ( e.name ( ) ) ; } return returnValues.toArray ( new java.lang.String [ 0 ] ) ; }

Target:
public static < T extends java.lang.Enum > java.lang.String [ ] GetNames ( java.lang.Class < T > clazz ) { java.util.ArrayList < java.lang.String > returnValues = new java.util.ArrayList < java.lang.String > ( ) ; if ( ! ( clazz.isEnum ( ) ) ) { throw new java.lang.RuntimeException ( ( "Class is not an Enum: " + ( clazz.getName ( ) ) ) ) ; } for ( java.lang.Enum e : clazz.getEnumConstants ( ) ) { returnValues.add ( e.name ( ) ) ; } return returnValues.toArray ( new java.lang.String [ 0 ] ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( getReturnStatus ( ) ) ; if ( returnStatus != ( org.ovirt.engine.core.common.errors.VdcBllErrors.Done ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.log.error ( "IrsBroker::getImageInfo::Failed getting image info imageId='{}' does not exist on domainName='{}', domainId='{}', error code: '{}', message: {}" , org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) . getStorageName ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) , returnStatus , imageInfoReturn.mStatus.mMessage ) ; throw new org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException ( returnStatus.toString ( ) ) ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( getReturnStatus ( ) ) ; if ( returnStatus != ( org.ovirt.engine.core.common.errors.VdcBllErrors.Done ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.log.error ( "IrsBroker::getImageInfo::Failed getting image info imageId='{}' does not exist on domainName='{}', domainId='{}', error code: '{}', message: {}" , org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) . getStorageName ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) , returnStatus , imageInfoReturn.getXmlRpcStatus ( ) . mMessage ) ; throw new org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException ( returnStatus.toString ( ) ) ; } }
Source:
private static org.ovirt.engine.core.common.businessentities.RepoImage getNewIsoRepoFile ( ) { org.ovirt.engine.core.common.businessentities.RepoImage newRepoFileMap = new org.ovirt.engine.core.common.businessentities.RepoImage ( ) ; newRepoFileMap.setFileType ( ImageFileType.ISO ) ; newRepoFileMap.setRepoImageId ( "isoDomain.iso" ) ; newRepoFileMap.setLastRefreshed ( java.lang.System.currentTimeMillis ( ) ) ; newRepoFileMap.setSize ( 0 ) ; newRepoFileMap.setDateCreated ( null ) ; newRepoFileMap.setRepoDomainId ( FixturesTool.STORAGE_DOAMIN_NFS_ISO ) ; return newRepoFileMap ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.RepoImage getNewIsoRepoFile ( ) { org.ovirt.engine.core.common.businessentities.storage.RepoImage newRepoFileMap = new org.ovirt.engine.core.common.businessentities.storage.RepoImage ( ) ; newRepoFileMap.setFileType ( ImageFileType.ISO ) ; newRepoFileMap.setRepoImageId ( "isoDomain.iso" ) ; newRepoFileMap.setLastRefreshed ( java.lang.System.currentTimeMillis ( ) ) ; newRepoFileMap.setSize ( 0 ) ; newRepoFileMap.setDateCreated ( null ) ; newRepoFileMap.setRepoDomainId ( FixturesTool.STORAGE_DOAMIN_NFS_ISO ) ; return newRepoFileMap ; }
Source:
public void testGetByIdOrNameWhenIdIsSpecified ( ) { org.ovirt.engine.core.compat.Guid itemId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , "name" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > testItems = java.util.Collections.singletonList ( testItem ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( testItems ) ; org.junit.Assert.assertThat ( map.get ( itemId , "different name" ) , org.hamcrest.CoreMatchers.is ( testItem ) ) ; }

Target:
public void testGetByIdOrNameWhenIdIsSpecified ( ) { org.ovirt.engine.core.compat.Guid itemId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , "name" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > testItems = java.util.Collections.singletonList ( testItem ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( testItems ) ; org.hamcrest.MatcherAssert.assertThat ( map.get ( itemId , "different name" ) , org.hamcrest.CoreMatchers.is ( testItem ) ) ; }