auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public static java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > > getGraphicsDevicesForMultipleEntities ( org.ovirt.engine.api.restapi.resource.BackendResource backendResource , java.util.List < org.ovirt.engine.core.compat.Guid > vmIds ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > > graphicsDevices = backendResource.getEntity ( java.util.Map.class , VdcQueryType.GetGraphicsDevicesMultiple , new org.ovirt.engine.core.common.queries.IdsQueryParameters ( vmIds ) , "GetGraphicsDevicesMultiple" , true ) ; return graphicsDevices ; }

Target:
public static java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > > getGraphicsDevicesForMultipleEntities ( org.ovirt.engine.api.restapi.resource.BackendResource backendResource , java.util.List < org.ovirt.engine.core.compat.Guid > vmIds ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > > graphicsDevices = backendResource.getEntity ( java.util.Map.class , QueryType.GetGraphicsDevicesMultiple , new org.ovirt.engine.core.common.queries.IdsQueryParameters ( vmIds ) , "GetGraphicsDevicesMultiple" , true ) ; return graphicsDevices ; }
Source:
private void mockVmValidator ( ) { org.ovirt.engine.core.bll.validator.VmValidator vmValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.VmValidator ( vm ) ) ; org.mockito.Mockito.doReturn ( vmValidator ) . when ( command ) . createVmValidator ( vm ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( vmValidator ) . getDiskDao ( ) ; org.mockito.Mockito.doReturn ( getNoVirtioScsiDiskElement ( ) ) . when ( diskVmElementDao ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmDeviceId.class ) ) ; org.mockito.Mockito.doReturn ( diskVmElementDao ) . when ( vmValidator ) . getDiskVmElementDao ( ) ; }

Target:
private void mockVmValidator ( ) { org.ovirt.engine.core.bll.validator.VmValidator vmValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.VmValidator ( vm ) ) ; org.mockito.Mockito.doReturn ( vmValidator ) . when ( command ) . createVmValidator ( vm ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( vmValidator ) . getDiskDao ( ) ; org.mockito.Mockito.doReturn ( getNoVirtioScsiDiskElement ( ) ) . when ( diskVmElementDao ) . get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VmDeviceId.class ) ) ; org.mockito.Mockito.doReturn ( diskVmElementDao ) . when ( vmValidator ) . getDiskVmElementDao ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { return null ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc allocateVolume ( java.lang.String spUUID , java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String size ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.allocate" ) . withParameter ( "volumeID" , volUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgGUID ) . withParameter ( "size" , size ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.Disk disk = getDbFacade ( ) . getDiskDao ( ) . get ( getParameters ( ) . getObjectId ( ) ) ; if ( disk == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; return false ; } if ( ( disk.getDiskStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_DISK_OPERATION ) ; return false ; } this . disk = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) ; return super . canDoAction ( ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = getDbFacade ( ) . getDiskDao ( ) . get ( getParameters ( ) . getObjectId ( ) ) ; if ( disk == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; return false ; } if ( ( disk.getDiskStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_DISK_OPERATION ) ; return false ; } this . disk = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; return super . canDoAction ( ) ; }
Source:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice > devs = returnValue.getReturnValue ( ) ; getModel ( ) . getIsRngEnabled ( ) . setEntity ( ( ! ( devs.isEmpty ( ) ) ) ) ; final org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice = ( devs.isEmpty ( ) ) ? new org.ovirt.engine.core.common.businessentities.VmRngDevice ( ) : devs.get ( 0 ) ; rngDevice.updateSourceByVersion ( getModel ( ) . getCompatibilityVersion ( ) ) ; getModel ( ) . setRngDevice ( rngDevice ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.util.List < java.lang.String > consoleDevices = returnValue.getReturnValue ( ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; }
Source:
public void testBootProtocolSetForRoleNetworkWhenIpConfigurationIsNull ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( Ipv4BootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( true , true , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , network.getName ( ) ) ) , network , attachment ) ; }

Target:
public void testBootProtocolSetForRoleNetworkWhenIpConfigurationIsNull ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpv4Configuration ( Ipv4BootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( true , true , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , network.getName ( ) ) ) , network , attachment ) ; }
Source:
public void addFormItem ( org.ovirt.engine.ui.common.widget.form.FormItem item ) { com.google.gwt.user.client.ui.Label itemLabel = new com.google.gwt.user.client.ui.Label ( item.getName ( ) ) ; itemLabel.setStyleName ( "formPanel_detailViewItemName" ) ; com.google.gwt.user.client.ui.Grid view = getDetailView ( item.getColumn ( ) ) ; view.setWidget ( item.getRow ( ) , 0 , itemLabel ) ; updateFormItem ( item ) ; incNextAvailableRow ( item.getColumn ( ) ) ; }

Target:
public void addFormDetailView ( int numOfRows , int numOfColumns ) { container.clear ( ) ; for ( int i = 0 ; i < numOfRows ; i ++ ) { org.gwtbootstrap3.client.ui.Row row = createRow ( numOfColumns ) ; container.add ( row ) ; } }
Source:
public static void GetClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void GetMaxNumOfVmSockets ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmSockets ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }
Source:
private void addPermissionOnNetwork ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.bll.PredefinedRoles role ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( VdcObjectType.Network ) ; perms.setObjectId ( org.ovirt.engine.core.bll.storage.AddNetworkCommand.getParameters ( ) . getNetwork ( ) . getId ( ) ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }

Target:
private void addPermissionOnNetwork ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.bll.PredefinedRoles role ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( VdcObjectType.Network ) ; perms.setObjectId ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getParameters ( ) . getNetwork ( ) . getId ( ) ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }
Source:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void externalNetworkDescriptionChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = mockExternalNetwork ( ) ; org.mockito.Mockito.when ( externalNetwork.getDescription ( ) ) . thenReturn ( "aaa" ) ; org.mockito.Mockito.when ( network.getDescription ( ) ) . thenReturn ( "bbb" ) ; org.junit.Assert.assertThat ( validator.externalNetworkDetailsUnchanged ( externalNetwork ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void externalNetworkMtuChanged ( ) { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = createExternalNetwork ( ) ; externalNetwork.setMtu ( 0 ) ; network.setMtu ( 1 ) ; assertThatExternalNetworkDetailsUnchangedFails ( externalNetwork ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES [ index ] , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; assertEquals ( new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.api.restapi.resource.aaa.DOMAIN.getBytes ( java.nio.charset.Charset.forName ( "UTF-8" ) ) , true ) . toString ( ) , model.getDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { org.ovirt.engine.core.common.businessentities.aaa.DbGroup entity = getEntity ( index ) ; assertEquals ( entity.getId ( ) . toString ( ) , model.getId ( ) ) ; assertEquals ( entity.getName ( ) , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( entity.getDomain ( ) ) , model.getDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }
Source:
protected boolean canDoAction ( ) { if ( validateParameters ( ) ) { org.ovirt.engine.core.common.businessentities.network.NetworkQoS oldNetworkQoS = getNetworkQoSDao ( ) . get ( getNetworkQoS ( ) . getId ( ) ) ; if ( oldNetworkQoS == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_NOT_FOUND ) ; } else if ( ! ( oldNetworkQoS.getStoragePoolId ( ) . equals ( getNetworkQoS ( ) . getStoragePoolId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_INVALID_DC_ID ) ; } } return true ; }

Target:
protected boolean canDoAction ( ) { if ( validateParameters ( ) ) { org.ovirt.engine.core.bll.validator.NetworkQosValidator validator = new org.ovirt.engine.core.bll.validator.NetworkQosValidator ( getNetworkQoS ( ) ) ; return ( validate ( validator.qosExists ( ) ) ) && ( validate ( validator.consistentDataCenter ( ) ) ) ; } return true ; }
Source:
private void DontMigrateVM_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getDontMigrateVM ( ) . getEntity ( ) ) ) == true ) { clearAndDisable ( getRunVMOnSpecificHost ( ) ) ; getHostCpu ( ) . setIsChangable ( true ) ; } else { clearAndDisable ( getHostCpu ( ) ) ; getRunVMOnSpecificHost ( ) . setIsChangable ( true ) ; } behavior.updateCpuPinningVisibility ( ) ; }

Target:
private void initVncKeyboardLayout ( ) { final java.util.List < java.lang.String > layouts = ( ( java.util.List < java.lang.String > ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) ) ; final java.util.ArrayList < java.lang.String > vncKeyboardLayoutItems = new java.util.ArrayList < java.lang.String > ( ) ; vncKeyboardLayoutItems.add ( null ) ; vncKeyboardLayoutItems.addAll ( layouts ) ; getVncKeyboardLayout ( ) . setItems ( vncKeyboardLayoutItems ) ; getVncKeyboardLayout ( ) . setIsAvailable ( isVncSelected ( ) ) ; }
Source:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setStorage ( new org.ovirt.engine.api.model.Storage ( ) ) ; storageDomain.getStorage ( ) . setPath ( "foo" ) ; org.ovirt.engine.api.common.util.LinkHelper.addLinks ( setUpUriExpectations ( ) , storageDomain ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; assertNull ( storageDomain.getStorage ( ) . getHref ( ) ) ; }

Target:
public void testStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setStorage ( new org.ovirt.engine.api.model.Storage ( ) ) ; storageDomain.getStorage ( ) . setPath ( "foo" ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , storageDomain ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; assertNull ( storageDomain.getStorage ( ) . getHref ( ) ) ; }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getVolumeSnapshotSchedule ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.ImageTransfer imageTransfer ) { org.ovirt.engine.core.common.action.TransferDiskImageParameters params = new org.ovirt.engine.core.common.action.TransferDiskImageParameters ( ) ; if ( ( imageTransfer.isSetDirection ( ) ) && ( ( imageTransfer.getDirection ( ) ) == ( org.ovirt.engine.api.model.ImageTransferDirection.DOWNLOAD ) ) ) { params.setTransferType ( TransferType.Download ) ; } params.setImageId ( org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( imageTransfer.getImage ( ) . getId ( ) ) ) ; return performCreate ( ActionType.TransferDiskImage , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetImageTransferById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response addForDisk ( org.ovirt.engine.api.model.ImageTransfer imageTransfer ) { org.ovirt.engine.core.common.action.TransferDiskImageParameters params = new org.ovirt.engine.core.common.action.TransferDiskImageParameters ( ) ; params.setImageGroupID ( org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( imageTransfer.getDisk ( ) . getId ( ) ) ) ; return performCreate ( imageTransfer , params ) ; }
Source:
public void getDataCenterById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
protected java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.String > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( ( ( org.ovirt.engine.core.compat.Guid ) ( org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getEntityId ( ) ) ) , LockingGroup.DISK.name ( ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsForDiskId ( ) { if ( ( listVms ) == null ) { listVms = org.ovirt.engine.core.bll.RemoveDiskCommand.getVmDAO ( ) . getVmsListForDisk ( ( ( org.ovirt.engine.core.compat.Guid ) ( org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getEntityId ( ) ) ) ) ; } return listVms ; }
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.RunQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getWatchdogByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void syncNetworkValues ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.DcNetworkParams dcNetParams = getSetupModel ( ) . getNetDcParams ( getName ( ) ) ; if ( dcNetParams != null ) { getEntity ( ) . setVlanId ( dcNetParams.getVlanId ( ) ) ; getEntity ( ) . setMtu ( dcNetParams.getMtu ( ) ) ; getEntity ( ) . setVmNetwork ( dcNetParams.isVmNetwork ( ) ) ; } }

Target:
private void syncNetworkValues ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.DcNetworkParams dcNetParams = getSetupModel ( ) . getNetDcParams ( getName ( ) ) ; if ( dcNetParams != null ) { getNetwork ( ) . setVlanId ( dcNetParams.getVlanId ( ) ) ; getNetwork ( ) . setMtu ( dcNetParams.getMtu ( ) ) ; getNetwork ( ) . setVmNetwork ( dcNetParams.isVmNetwork ( ) ) ; } }
Source:
protected org.ovirt.engine.api.model.VM getEntity ( ) { if ( ( vm ) != null ) { return vm ; } for ( org.ovirt.engine.api.model.VM entity : parent.getEntitiesFromExportDomain ( ) ) { if ( guid.equals ( entity.getId ( ) ) ) { vm = entity ; return entity ; } } return entityNotFound ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM getEntity ( ) { if ( ( vm ) != null ) { return vm ; } for ( org.ovirt.engine.api.restapi.resource.VM entity : parent.getEntitiesFromExportDomain ( ) ) { if ( guid.equals ( entity.getId ( ) ) ) { vm = entity ; return entity ; } } return entityNotFound ( ) ; }
Source:
public void testGetHostNetworksByCluster ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < java.lang.String > > map = dao.getHostNetworksByCluster ( FixturesTool.CLUSTER ) ; org.junit.Assert.assertNotNull ( map ) ; org.junit.Assert.assertFalse ( map.isEmpty ( ) ) ; org.junit.Assert.assertNotNull ( map.get ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ) ; org.junit.Assert.assertFalse ( map.get ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) . isEmpty ( ) ) ; }

Target:
public void testGetHostNetworksByCluster ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < java.lang.String > > map = dao.getHostNetworksByCluster ( FixturesTool.CLUSTER ) ; org.junit.jupiter.api.Assertions.assertNotNull ( map ) ; org.junit.jupiter.api.Assertions.assertFalse ( map.isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( map.get ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( map.get ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) . isEmpty ( ) ) ; }
Source:
public static void getAAAProfilesList ( 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
private static void convertAAAProfilesResult ( 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 ) { java.util.List < java.lang.String > results = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.aaa.ProfileEntry profileEntry : ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) ) { results.add ( profileEntry.getProfile ( ) ) ; } return results ; } } ; }
Source:
public void testNoStringSubstitutionWithList ( ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( org.ovirt.engine.core.utils.ErrorTranslatorTest.FILENAME ) ; java.util.List < java.lang.String > error = et.translateErrorText ( java.util.Collections.singletonList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) ) ; org.junit.Assert.assertEquals ( "Size" , 1 , error.size ( ) ) ; org.junit.Assert.assertEquals ( "String should equal" , "VM not found" , error.get ( 0 ) ) ; }

Target:
public void testNoStringSubstitutionWithList ( ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( org.ovirt.engine.core.utils.ErrorTranslatorTest.FILENAME ) ; java.util.List < java.lang.String > error = et.translateErrorText ( java.util.Collections.singletonList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , error.size ( ) , "Size" ) ; org.junit.jupiter.api.Assertions.assertEquals ( "VM not found" , error.get ( 0 ) , "String should equal" ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult snapshotTypeSupported ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot , java.util.Collection < org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType > supportedtypes ) { if ( ! ( supportedtypes.contains ( snapshot.getType ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_SNAPSHOT_TYPE_NOT_ALLOWED , java.lang.String.format ( "$supportedSnapshotTypes %s" , org.apache.commons.lang.StringUtils.join ( supportedtypes , ", " ) ) , java.lang.String.format ( "$snapshotType %s" , snapshot.getType ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult snapshotTypeSupported ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot , java.util.Collection < org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType > supportedtypes ) { if ( ! ( supportedtypes.contains ( snapshot.getType ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_SNAPSHOT_TYPE_NOT_ALLOWED , java.lang.String.format ( "$supportedSnapshotTypes %s" , org.apache.commons.lang.StringUtils.join ( supportedtypes , ", " ) ) , java.lang.String.format ( "$snapshotType %s" , snapshot.getType ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void isAnyHostUpInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( ( source != null ) && ( ( ( ( java.util.List ) ( source ) ) . size ( ) ) > 0 ) ) { return true ; } return false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , 1 ) ; }

Target:
public void getHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { getHostListByStatus ( aQuery , null ) ; }
Source:
private void verifyStorageDomain ( org.ovirt.engine.api.model.StorageDomain model ) { assertEquals ( org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.STORAGE_DOMAIN_ID.toString ( ) , model.getId ( ) ) ; assertNotNull ( model.getDataCenter ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.DATA_CENTER_ID.toString ( ) , model.getDataCenter ( ) . getId ( ) ) ; }

Target:
private void verifyStorageDomain ( org.ovirt.engine.api.model.StorageDomain model ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.STORAGE_DOMAIN_ID.toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertNotNull ( model.getDataCenter ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.DATA_CENTER_ID.toString ( ) , model.getDataCenter ( ) . getId ( ) ) ; }
Source:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public static void getDiskList ( 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel.ON_DISK_LOAD ) ) ; }

Target:
protected void postInitDisks ( ) { onDataLoad ( ) ; checkDestFormatCompatibility ( ) ; StopProgress ( ) ; getStorage ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { onDataLoad ( ) ; } } ) ; }
Source:
public void zeroDiskSize ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 0 ; settings.diskSpaceUsed = 0 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = 10 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isBelowThresholds ( domain ) ) ; }

Target:
public void zeroDiskSize ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 0 ; settings.diskSpaceUsed = 0 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = 10 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isWithinThresholds ( domain ) ) ; }
Source:
private java.lang.Object [ ] normalizeLongs ( org.apache.xmlrpc.XmlRpcRequest request ) { java.util.List < java.lang.Object > result = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( request.getParameterCount ( ) ) ; i ++ ) { java.lang.Object object = request.getParameter ( i ) ; if ( java.lang.Long.class . isInstance ( object ) ) { result.add ( object.toString ( ) ) ; continue ; } result.add ( object ) ; } return result.toArray ( ) ; }

Target:
private java.lang.Object [ ] normalizeLongs ( org.apache.xmlrpc.XmlRpcRequest request ) { java.util.List < java.lang.Object > result = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( request.getParameterCount ( ) ) ; i ++ ) { java.lang.Object object = request.getParameter ( i ) ; result.add ( longToString ( object ) ) ; } return result.toArray ( ) ; }
Source:
protected boolean getSucceeded ( ) { return super . getSucceeded ( ) ; }

Target:
private void addStorageServerConnection ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = heStorageDomain.getStorageStaticData ( ) . getConnection ( ) ; connection.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; storageServerConnectionDao.save ( connection ) ; heStorageDomain.setStorage ( connection.getId ( ) ) ; setSucceeded ( true ) ; getCompensationContext ( ) . snapshotEntity ( connection ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getBroker ( ) . glusterVolumeProfileInfo ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getClusterId ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getVolumeName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( result.getGlusterVolumeProfileInfo ( ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getBroker ( ) . glusterVolumeProfileInfo ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getClusterId ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . isNfs ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( result.getGlusterVolumeProfileInfo ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ! ( getNoClone ( ) . getEntity ( ) ) ) { java.lang.Boolean value = getApplyToAll ( ) . getEntity ( ) ; getSuffix ( ) . setIsChangable ( value ) ; getName ( ) . setIsChangable ( ( ! value ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ! ( getNoClone ( ) . getEntity ( ) ) ) { java.lang.Boolean value = getApplyToAll ( ) . getEntity ( ) ; getSuffix ( ) . setIsChangeable ( value ) ; getName ( ) . setIsChangeable ( ( ! value ) ) ; } }
Source:
public static org.ovirt.engine.core.common.queries.ValueObjectMap parseHooks ( java.lang.String hooksStr ) { org.ovirt.engine.core.common.queries.ValueObjectMap result = new org.ovirt.engine.core.common.queries.ValueObjectMap ( ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( hooksStr ) ) ) { char [ ] chars = new char [ hooksStr.length ( ) ] ; hooksStr.getChars ( 0 , hooksStr.length ( ) , chars , 0 ) ; org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.ParsingResult parsingResult = org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.parseMap ( chars , 0 ) ; return org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.convertParsingResultToValueObjectMap ( parsingResult ) ; } return result ; }

Target:
public static org.ovirt.engine.core.common.queries.ValueObjectMap parseHooks ( java.lang.String hooksStr ) { org.ovirt.engine.core.common.queries.ValueObjectMap result = new org.ovirt.engine.core.common.queries.ValueObjectMap ( ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( hooksStr ) ) { char [ ] chars = new char [ hooksStr.length ( ) ] ; hooksStr.getChars ( 0 , hooksStr.length ( ) , chars , 0 ) ; org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.ParsingResult parsingResult = org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.parseMap ( chars , 0 ) ; return org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.convertParsingResultToValueObjectMap ( parsingResult ) ; } return result ; }
Source:
public void canDoActionFailsOnServerNotUp ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) ) ) ; setUpMocksForRemove ( true , getHookEntity ( ) , VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_SERVER_STATUS_NOT_UP.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnServerNotUp ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) ) ) ; setUpMocksForRemove ( true , getHookEntity ( ) , VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SERVER_STATUS_NOT_UP.toString ( ) ) ) ; }
Source:
private boolean devicePluggable ( org.ovirt.engine.core.common.businessentities.VmDevice device ) { return ( ( VmDeviceType.DISK.getName ( ) . equals ( device.getDevice ( ) ) ) && ( ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK ) == ( device.getType ( ) ) ) ) || ( ( VmDeviceType.BRIDGE.getName ( ) . equals ( device.getDevice ( ) ) ) && ( ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) == ( device.getType ( ) ) ) ) ; }

Target:
private boolean devicePluggable ( org.ovirt.engine.core.common.businessentities.VmDevice device ) { return ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isDisk ( device ) ) || ( ( VmDeviceType.BRIDGE.getName ( ) . equals ( device.getDevice ( ) ) ) && ( ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) == ( device.getType ( ) ) ) ) ; }
Source:
public void testOtherFieldsNotValidatedInImport ( ) { org.junit.Assert.assertFalse ( ( ( org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions.GENERAL_DOMAIN_SIZE ) > ( string100.length ( ) ) ) ) ; command.getParameters ( ) . setImportAsNewEntity ( true ) ; java.util.Set < javax.validation.ConstraintViolation < org.ovirt.engine.core.common.action.ImportVmTemplateParameters > > validate = org.ovirt.engine.core.common.utils.ValidationUtils.getValidator ( ) . validate ( command.getParameters ( ) , command.getValidationGroups ( ) . toArray ( new java.lang.Class < ? > [ 0 ] ) ) ; org.junit.Assert.assertTrue ( validate.isEmpty ( ) ) ; }

Target:
public void testOtherFieldsNotValidatedInImport ( ) { org.junit.jupiter.api.Assertions.assertFalse ( ( ( org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions.GENERAL_DOMAIN_SIZE ) > ( string100.length ( ) ) ) ) ; command.getParameters ( ) . setImportAsNewEntity ( true ) ; java.util.Set < javax.validation.ConstraintViolation < org.ovirt.engine.core.common.action.ImportVmTemplateParameters > > validate = org.ovirt.engine.core.common.utils.ValidationUtils.getValidator ( ) . validate ( command.getParameters ( ) , command.getValidationGroups ( ) . toArray ( new java.lang.Class < ? > [ 0 ] ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( validate.isEmpty ( ) ) ; }
Source:
public void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }