auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static java.lang.String getSuggestedDiskAlias ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , java.lang.String diskPrefix , int count ) { java.lang.String diskAlias ; if ( disk == null ) { diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , org.ovirt.engine.core.bll.ImagesHandler.DefaultDriveName ) ; org.ovirt.engine.core.bll.ImagesHandler.log.warnFormat ( "Disk object is null, the suggested default disk alias to be used is {0}" , diskAlias ) ; } else { diskAlias = disk.getDiskAlias ( ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( diskAlias ) ) { diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , java.lang.String.valueOf ( count ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.infoFormat ( "Disk alias retrieved from the client is null or empty, the suggested default disk alias to be used is {0}" , diskAlias ) ; } } return diskAlias ; }

Target:
public static java.lang.String getSuggestedDiskAlias ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , java.lang.String diskPrefix , int count ) { java.lang.String diskAlias ; if ( disk == null ) { diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , org.ovirt.engine.core.bll.ImagesHandler.DefaultDriveName ) ; org.ovirt.engine.core.bll.ImagesHandler.log.warnFormat ( "Disk object is null, the suggested default disk alias to be used is {0}" , diskAlias ) ; } else { java.lang.String defaultAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , java.lang.String.valueOf ( count ) ) ; diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDiskAliasWithDefault ( disk , defaultAlias ) ; } return diskAlias ; }
Source:
public static void getMinimalVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getDataCenterList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void testRemoveIscsiBond ( ) { org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond = dao.get ( iscsiBondId ) ; junit.framework.Assert.assertNotNull ( iscsiBond ) ; dao.remove ( iscsiBondId ) ; iscsiBond = dao.get ( iscsiBondId ) ; java.util.List < org.ovirt.engine.core.compat.Guid > networks = dao.getNetworkIdsByIscsiBondId ( iscsiBondId ) ; java.util.List < java.lang.String > connections = dao.getStorageConnectionIdsByIscsiBondId ( iscsiBondId ) ; junit.framework.Assert.assertNull ( iscsiBond ) ; junit.framework.Assert.assertTrue ( networks.isEmpty ( ) ) ; junit.framework.Assert.assertTrue ( connections.isEmpty ( ) ) ; }

Target:
public void testRemoveIscsiBond ( ) { org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond = dao.get ( iscsiBondId ) ; org.junit.Assert.assertNotNull ( iscsiBond ) ; dao.remove ( iscsiBondId ) ; iscsiBond = dao.get ( iscsiBondId ) ; java.util.List < org.ovirt.engine.core.compat.Guid > networks = dao.getNetworkIdsByIscsiBondId ( iscsiBondId ) ; java.util.List < java.lang.String > connections = dao.getStorageConnectionIdsByIscsiBondId ( iscsiBondId ) ; org.junit.Assert.assertNull ( iscsiBond ) ; org.junit.Assert.assertTrue ( networks.isEmpty ( ) ) ; org.junit.Assert.assertTrue ( connections.isEmpty ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase convertToVdcReturnValueBase ( final org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; returnValue.setSucceeded ( false ) ; returnValue.setActionReturnValue ( vdsReturnValue.getReturnValue ( ) ) ; returnValue.setExecuteFailedMessages ( new java.util.ArrayList < java.lang.String > ( ) { { add ( vdsReturnValue.getVdsError ( ) . getMessage ( ) ) ; } } ) ; return returnValue ; }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase convertToVdcReturnValueBase ( final org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; returnValue.setSucceeded ( false ) ; returnValue.setActionReturnValue ( vdsReturnValue.getReturnValue ( ) ) ; java.lang.String message = vdsReturnValue.getVdsError ( ) . getMessage ( ) ; returnValue.setExecuteFailedMessages ( new java.util.ArrayList < > ( java.util.Collections.singleton ( message ) ) ) ; return returnValue ; }
Source:
private void doFetchPrincipalRecord ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.api.extensions.ExtMap authRecord = input.< org.ovirt.engine.api.extensions.ExtMap > get ( Authn.InvokeKeys.AUTH_RECORD ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( configuration , null , getDirectoryName ( ) , ( authRecord != null ? authRecord.< java.lang.String > get ( Authn.AuthRecord.PRINCIPAL ) : input.< java.lang.String > get ( Authz.InvokeKeys.PRINCIPAL ) ) ) ) ; output.mput ( Authz.InvokeKeys.PRINCIPAL_RECORD , mapLdapUser ( ( ( org.ovirt.engine.core.common.businessentities.aaa.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ) ) . mput ( Authz.InvokeKeys.STATUS , Authz.Status.SUCCESS ) ; }

Target:
private void doFetchPrincipalRecord ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.api.extensions.ExtMap authRecord = input.< org.ovirt.engine.api.extensions.ExtMap > get ( Authn.InvokeKeys.AUTH_RECORD ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( configuration , null , getDirectoryName ( ) , ( authRecord != null ? authRecord.< java.lang.String > get ( Authn.AuthRecord.PRINCIPAL ) : input.< java.lang.String > get ( Authz.InvokeKeys.PRINCIPAL ) ) ) ) ; output.mput ( Authz.InvokeKeys.PRINCIPAL_RECORD , mapLdapUser ( ( ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ) ) . mput ( Authz.InvokeKeys.STATUS , Authz.Status.SUCCESS ) ; }
Source:
private void parseSecondArgWithKeyValue ( java.lang.String arg , java.lang.String key , java.lang.String value ) { if ( getConfigAction ( ) . equals ( ConfigActionType.ACTION_SET ) ) { engineConfigMap.setKey ( key ) ; engineConfigMap.setValue ( value ) ; } else { org.ovirt.engine.core.config.EngineConfigCLIParser.log.debug ( ( ( "parseArguments error: second argument '" + arg ) + "' has an '=' char but action is not 'set'." ) ) ; throw new java.lang.IllegalArgumentException ( ( ( "Illegal second argument: " + arg ) + "." ) ) ; } }

Target:
private void parseSecondArgWithKeyValue ( java.lang.String arg , java.lang.String key , java.lang.String value ) { if ( isSetOrMergeAction ( ) ) { engineConfigMap.setKey ( key ) ; engineConfigMap.setValue ( value ) ; } else { org.ovirt.engine.core.config.EngineConfigCLIParser.log.debug ( ( ( "parseArguments error: second argument '" + arg ) + "' has an '=' char but action is not 'set'." ) ) ; throw new java.lang.IllegalArgumentException ( ( ( "Illegal second argument: " + arg ) + "." ) ) ; } }
Source:
protected void executeCommand ( ) { if ( ( ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) != null ) && ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.canRemoveVmPoolWithoutReasons ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ; org.ovirt.engine.core.bll.RemoveVmPoolCommand.setSucceeded ( true ) ; } }

Target:
private void setPoolBeingDestroyed ( ) { org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolDao ( ) . setBeingDestroyed ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) , true ) ; }
Source:
protected boolean validate ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.RemoveRoleCommand.getRole ( ) ) == null ) { returnValue = false ; addValidationMessage ( EngineMessage.ERROR_CANNOT_REMOVE_ROLE_INVALID_ROLE_ID ) ; } else { if ( checkIfRoleIsReadOnly ( org.ovirt.engine.core.bll.RemoveRoleCommand.getReturnValue ( ) . getValidationMessages ( ) ) ) { returnValue = false ; } else { if ( ! ( permissionDao.getAllForRole ( org.ovirt.engine.core.bll.RemoveRoleCommand.getParameters ( ) . getRoleId ( ) ) . isEmpty ( ) ) ) { returnValue = false ; addValidationMessage ( EngineMessage.ERROR_CANNOT_REMOVE_ROLE_ATTACHED_TO_PERMISSION ) ; } } } return returnValue ; }

Target:
protected boolean validate ( ) { if ( ( org.ovirt.engine.core.bll.RemoveRoleCommand.getRole ( ) ) == null ) { return failValidation ( EngineMessage.ERROR_CANNOT_REMOVE_ROLE_INVALID_ROLE_ID ) ; } if ( checkIfRoleIsReadOnly ( org.ovirt.engine.core.bll.RemoveRoleCommand.getReturnValue ( ) . getValidationMessages ( ) ) ) { return false ; } if ( ! ( permissionDao.getAllForRole ( org.ovirt.engine.core.bll.RemoveRoleCommand.getParameters ( ) . getRoleId ( ) ) . isEmpty ( ) ) ) { return failValidation ( EngineMessage.ERROR_CANNOT_REMOVE_ROLE_ATTACHED_TO_PERMISSION ) ; } return true ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbUser entity = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setLoginName ( NAMES [ index ] ) ; entity.setGroupNames ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbUser entity = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setLoginName ( NAMES [ index ] ) ; entity.setGroupNames ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS ) ; entity.setNamespace ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.NAMESPACE ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }
Source:
public org.ovirt.engine.core.common.errors.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( isVdsFailedToRunVm ( vds.getId ( ) ) ) { sb.append ( "have failed running this VM in the current selection cycle" ) ; return org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CLUSTER ; } return null ; }

Target:
public org.ovirt.engine.core.common.errors.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate , java.util.List < org.ovirt.engine.core.compat.Guid > vdsBlackList ) { if ( ( vdsBlackList != null ) && ( vdsBlackList.contains ( vds.getId ( ) ) ) ) { sb.append ( "have failed running this VM in the current selection cycle" ) ; return org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CLUSTER ; } return null ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }
Source:
protected void setStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VdsDynamic currentHost = org.ovirt.engine.core.bll.pm.FenceVdsBaseCommand.getDbFacade ( ) . getVdsDynamicDao ( ) . get ( org.ovirt.engine.core.bll.pm.FenceVdsBaseCommand.getVds ( ) . getId ( ) ) ; if ( ( currentHost != null ) && ( ( currentHost.getStatus ( ) ) != status ) ) { setVdsStatus ( status ) ; } }

Target:
protected void setStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VdsDynamic currentHost = vdsDynamicDao.get ( org.ovirt.engine.core.bll.pm.FenceVdsBaseCommand.getVds ( ) . getId ( ) ) ; if ( ( currentHost != null ) && ( ( currentHost.getStatus ( ) ) != status ) ) { setVdsStatus ( status ) ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { return null ; }
Source:
public void Cluster_SelectedItemChanged ( ) { UpdateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; UpdateMinAllocatedMemory ( ) ; UpdateNumOfSockets ( ) ; updateQuotaByCluster ( null , "" ) ; updateCpuPinningVisibility ( ) ; }

Target:
public void Cluster_SelectedItemChanged ( ) { UpdateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; UpdateMinAllocatedMemory ( ) ; UpdateNumOfSockets ( ) ; if ( ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateCpuPinningVisibility ( ) ; }
Source:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = org.ovirt.engine.core.bll.ImportVmCommand.getVmStaticDAO ( ) . get ( getVm ( ) . getId ( ) ) ; if ( duplicateVm != null ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_EXISTS ) ; addCanDoActionMessage ( java.lang.String.format ( "$VmName %1$s" , duplicateVm.getName ( ) ) ) ; return false ; } return true ; }

Target:
protected boolean validateVdsCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > groups = org.ovirt.engine.core.bll.ImportVmCommand.getVdsGroupDAO ( ) . getAllForStoragePool ( getParameters ( ) . getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup group : groups ) { if ( group.getId ( ) . equals ( getParameters ( ) . getVdsGroupId ( ) ) ) { if ( ( group.getArchitecture ( ) ) != ( getVm ( ) . getClusterArch ( ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_CANNOT_IMPORT_VM_ARCHITECTURE_NOT_SUPPORTED_BY_CLUSTER ) ; } return true ; } } return failCanDoAction ( VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID ) ; }
Source:
private boolean resizeDiskImageRequested ( ) { return ( ( ( getNewDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) && ( ( vmDeviceForVm.getSnapshotId ( ) ) == null ) ) && ( ( getNewDisk ( ) . getSize ( ) ) != ( getOldDisk ( ) . getSize ( ) ) ) ; }

Target:
protected boolean updateReadOnlyRequested ( ) { java.lang.Boolean readOnlyNewValue = getNewDisk ( ) . getReadOnly ( ) ; return ( readOnlyNewValue != null ) && ( ! ( getVmDeviceForVm ( ) . getIsReadOnly ( ) . equals ( readOnlyNewValue ) ) ) ; }
Source:
protected void onExportChanged ( ) { if ( getExport ( ) . getEntity ( ) ) { getHasVLanTag ( ) . setIsChangable ( false ) ; getVLanTag ( ) . setIsChangable ( false ) ; getIsVmNetwork ( ) . setIsChangable ( false ) ; getHasMtu ( ) . setIsChangable ( false ) ; getMtu ( ) . setIsChangable ( false ) ; getNetworkLabel ( ) . setIsChangable ( false ) ; } super . onExportChanged ( ) ; }

Target:
protected void initMtu ( ) { boolean isCustomMtu = ( getNetwork ( ) . getMtu ( ) ) != 0 ; getMtuSelector ( ) . setSelectedItem ( ( isCustomMtu ? MtuSelector.customMtu : MtuSelector.defaultMtu ) ) ; getMtu ( ) . setEntity ( ( isCustomMtu ( ) ? getNetwork ( ) . getMtu ( ) : null ) ) ; }
Source:
org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData createVmInternalData ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setId ( id ) ; vmDynamic.setRunOnVds ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs.SRC_HOST_ID ) ; org.ovirt.engine.core.common.businessentities.VmStatistics vmStatistics = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > vmGuestAgentInterfaces = null ; java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsMap = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData vmInternalData = new org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData ( vmDynamic , vmStatistics , null , new java.util.ArrayList < > ( ) , null , vmGuestAgentInterfaces , lunsMap , ( - 1.0 ) ) ; return vmInternalData ; }

Target:
org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData createVmInternalData ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setId ( id ) ; vmDynamic.setRunOnVds ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs.SRC_HOST_ID ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData ( ( - 1.0 ) ) . setVmDynamic ( vmDynamic ) . setVmStatistics ( new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ) . setInterfaceStatistics ( new java.util.ArrayList < > ( ) ) . setLunsMap ( new java.util.HashMap < > ( ) ) ; }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { if ( value != null ) { sb.append ( template.imageContainerWithStyleClass ( id , style , styleClass , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ) ) ; } }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { if ( value != null ) { sb.append ( template.imageContainerWithStyleClass ( id , style , styleClass , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ) ) ; } }
Source:
private void updateDefaultNetworkFilterIfRequired ( ) { if ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getParameters ( ) . isUseDefaultNetworkFiterId ( ) ) { final org.ovirt.engine.core.common.businessentities.network.NetworkFilter networkFilter = resolveVnicProfileDefaultNetworkFilter ( ) ; if ( networkFilter != null ) { final org.ovirt.engine.core.compat.Guid networkFilterId = networkFilter.getId ( ) ; setNetworkFilterId ( networkFilterId ) ; } } }

Target:
private void updateDefaultNetworkFilterIfRequired ( ) { if ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getParameters ( ) . isUseDefaultNetworkFiterId ( ) ) { final org.ovirt.engine.core.common.businessentities.network.NetworkFilter networkFilter = org.ovirt.engine.core.bll.network.cluster.NetworkHelper.resolveVnicProfileDefaultNetworkFilter ( networkFilterDao ) ; if ( networkFilter != null ) { final org.ovirt.engine.core.compat.Guid networkFilterId = networkFilter.getId ( ) ; setNetworkFilterId ( networkFilterId ) ; } } }
Source:
public static void getTemplateNicList ( 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.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { 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.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public static void GetStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { 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.storage_domains > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( vmDevicesSourceId , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) , isBalloonEnabled ( ) , false ) ; }

Target:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( vmDevicesSourceId , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) , isBalloonEnabled ( ) , false ) ; if ( ( instanceTypeId ) != null ) { copyDiskDevicesFromTemplate ( ) ; } }
Source:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return diskImage.getId ( ) . toString ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return diskImage.getId ( ) . toString ( ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; getVmDisks ( ) . clear ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : disks ) { if ( ( disk.getDiskStorageType ( ) ) == ( Disk.DiskStorageType.LUN ) ) { continue ; } org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) ; getVmDisks ( ) . add ( diskImage ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; getVmDisks ( ) . clear ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( ( disk.getDiskStorageType ( ) ) == ( Disk.DiskStorageType.LUN ) ) { continue ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; getVmDisks ( ) . add ( diskImage ) ; } }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_EXIST ) ; } if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL , org.ovirt.engine.core.bll.validator.LocalizedVmStatus.from ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getStatus ( ) ) ) ; } if ( ! ( org.ovirt.engine.core.common.FeatureSupported.vmSlaPolicy ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_SLA_POLICY_NOT_SUPPORTED ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL , org.ovirt.engine.core.bll.validator.LocalizedVmStatus.from ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getStatus ( ) ) ) ; } if ( ! ( org.ovirt.engine.core.common.FeatureSupported.vmSlaPolicy ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_SLA_POLICY_NOT_SUPPORTED ) ; } return true ; }
Source:
protected void initStorageDomainId ( ) { }

Target:
public void setUp ( ) { org.mockito.Mockito.when ( iconDefaultsProvider.getVmIconDefaults ( ) ) . thenReturn ( new java.util.HashMap < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > ( ) { { put ( 0 , new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000a" ) , org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000b" ) ) ) ; } } ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.utils.ovf.OvfVmIconDefaultsProvider.class , iconDefaultsProvider ) ; injectorRule.bind ( org.ovirt.engine.core.dao.ClusterDao.class , clusterDao ) ; }
Source:
org.ovirt.engine.api.model.Storage getModel ( int index ) { org.ovirt.engine.api.model.Storage model = new org.ovirt.engine.api.model.Storage ( ) ; model.setType ( org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionResourceTest.STORAGE_TYPES_MAPPED [ index ] . toString ( ) ) ; model.setAddress ( "1.122.10.125" ) ; org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; host.setId ( GUIDS [ 1 ] . toString ( ) ) ; model.setHost ( host ) ; if ( index == 0 ) { model.setPath ( "/data1" ) ; } if ( index == 3 ) { model.setPort ( 3260 ) ; } return model ; }

Target:
org.ovirt.engine.api.model.StorageConnection getModel ( int index ) { org.ovirt.engine.api.model.StorageConnection model = new org.ovirt.engine.api.model.StorageConnection ( ) ; model.setType ( org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionResourceTest.STORAGE_TYPES_MAPPED [ index ] . toString ( ) ) ; model.setAddress ( "1.122.10.125" ) ; org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; host.setId ( GUIDS [ 1 ] . toString ( ) ) ; model.setHost ( host ) ; if ( index == 0 ) { model.setPath ( "/data1" ) ; } if ( index == 3 ) { model.setPort ( 3260 ) ; } return model ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.StorageForceCreatePopupView.Driver.driver.edit ( object ) ; object.getLatch ( ) . setIsAvailable ( true ) ; object.getItemsChangedEvent ( ) . 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 ) { updateDescription ( object ) ; } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { driver.edit ( object ) ; object.getLatch ( ) . setIsAvailable ( true ) ; object.getItemsChangedEvent ( ) . 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 ) { updateDescription ( object ) ; } } ) ; }
Source:
public void refreshDetails ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterRebalanceStatus ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue vdcValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity rebalanceStatusEntity = vdcValue.getReturnValue ( ) ; if ( rebalanceStatusEntity != null ) { showStatus ( rebalanceStatusEntity ) ; } } } ) , volumeEntity.getClusterId ( ) , volumeEntity.getId ( ) ) ; }

Target:
public void refreshDetails ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterRebalanceStatus ( new org.ovirt.engine.ui.uicommonweb.models.gluster.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity rebalanceStatusEntity = returnValue.getReturnValue ( ) ; if ( rebalanceStatusEntity != null ) { showStatus ( rebalanceStatusEntity ) ; } } } ) , volumeEntity.getClusterId ( ) , volumeEntity.getId ( ) ) ; }
Source:
public void testValidateXmlProtocolForCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( Version.v3_6 ) ; validator = mockHostForProtocol ( VdsProtocol.XML ) ; org.junit.Assert.assertThat ( validator.protocolIsNotXmlrpc ( cluster ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NOT_SUPPORTED_PROTOCOL_FOR_CLUSTER_VERSION ) ) ; }

Target:
public void testValidateXmlProtocolForCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( Version.v3_6 ) ; validator = mockHostForProtocol ( VdsProtocol.XML ) ; org.junit.Assert.assertThat ( validator.protocolIsNotXmlrpc ( cluster ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NOT_SUPPORTED_PROTOCOL_FOR_CLUSTER_VERSION ) ) ; }
Source:
protected void executeQueryCommand ( ) { java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getDomain ( ) ; java.lang.String id = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getId ( ) ; org.ovirt.engine.core.extensions.mgr.ExtensionProxy authz = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getAuthz ( directoryName ) ; if ( authz == null ) { org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { org.ovirt.engine.core.aaa.DirectoryUser user = org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalById ( authz , id ) ; org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setReturnValue ( user ) ; } }

Target:
protected void executeQueryCommand ( ) { java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getDomain ( ) ; java.lang.String id = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getId ( ) ; org.ovirt.engine.core.extensions.mgr.ExtensionProxy authz = org.ovirt.engine.core.utils.extensionsmgr.EngineExtensionsManager.getInstance ( ) . getExtensionByName ( directoryName ) ; if ( authz == null ) { org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { org.ovirt.engine.core.aaa.DirectoryUser user = org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalById ( authz , id ) ; org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setReturnValue ( user ) ; } }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } org.ovirt.engine.ui.uicommonweb.validation.ValidationResult that = ( ( org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ) ( o ) ) ; return ( java.util.Objects.equals ( privateSuccess , that.privateSuccess ) ) && ( java.util.Objects.equals ( privateReasons , that.privateReasons ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ) ) { return false ; } org.ovirt.engine.ui.uicommonweb.validation.ValidationResult other = ( ( org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ) ( obj ) ) ; return ( java.util.Objects.equals ( privateSuccess , other.privateSuccess ) ) && ( java.util.Objects.equals ( privateReasons , other.privateReasons ) ) ; }
Source:
public void testCannotDisableVirtioScsi ( ) { prepareVmToPassCanDoAction ( ) ; command.getParameters ( ) . setVirtioScsiEnabled ( false ) ; org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; disk.setPlugged ( true ) ; mockDiskDaoGetAllForVm ( java.util.Collections.singletonList ( disk ) , true ) ; mockVmValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS ) ; }

Target:
public void testCannotDisableVirtioScsi ( ) { prepareVmToPassValidate ( ) ; command.getParameters ( ) . setVirtioScsiEnabled ( false ) ; org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; disk.setPlugged ( true ) ; mockDiskDaoGetAllForVm ( java.util.Collections.singletonList ( disk ) , true ) ; mockVmValidator ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS ) ; }
Source:
public 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 ) ; }

Target:
public 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.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.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 setEntity ( java.lang.Boolean value ) { super . setEntity ( value ) ; if ( getIsToSync ( ) . getIsChangable ( ) ) { if ( ! value ) { revertChanges ( ) ; } setBootProtocolsAvailable ( value ) ; } }

Target:
public void setEntity ( java.lang.Boolean value ) { super . setEntity ( value ) ; if ( getIsToSync ( ) . getIsChangable ( ) ) { if ( ! value ) { revertChanges ( ) ; } setBootProtocolsAvailable ( value ) ; getQosOverridden ( ) . setIsChangable ( value ) ; getQosModel ( ) . setIsChangable ( value ) ; getCustomPropertiesModel ( ) . setIsChangable ( value ) ; } }
Source:
private java.lang.String getDirectoryGroupSearchPattern ( java.lang.String groupname , java.lang.String domain ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , org.ovirt.engine.core.common.businessentities.DbGroup.class , false ) ; final java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( org.ovirt.engine.api.restapi.resource.BackendGroupsResource.DIRECTORY_GROUP_SEARCH_TEMPLATE , domain ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "allnames=" + groupname : constraint ) ) ; return sb.toString ( ) ; }

Target:
private java.lang.String getDirectoryGroupSearchPattern ( java.lang.String groupname , java.lang.String domain ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , org.ovirt.engine.core.common.businessentities.aaa.DbGroup.class , false ) ; final java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( org.ovirt.engine.api.restapi.resource.BackendGroupsResource.DIRECTORY_GROUP_SEARCH_TEMPLATE , domain ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "allnames=" + groupname : constraint ) ) ; return sb.toString ( ) ; }
Source:
public void testValues ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.searchbackend.Jedi.class ) ; java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( "L" ) ) ; org.junit.Assert.assertTrue ( "luke" , comps.contains ( "luke" ) ) ; org.junit.Assert.assertTrue ( "leia" , comps.contains ( "leia" ) ) ; }

Target:
public void setUp ( ) { comp = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.searchbackend.Jedi.class ) ; }
Source:
private void buildSmartcardDevice ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vm.getId ( ) , VmDeviceGeneralType.SMARTCARD , VmDeviceType.SMARTCARD.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { java.util.Map struct = new java.util.HashMap ( ) ; struct.put ( VdsProperties.Type , vmDevice.getType ( ) . getValue ( ) ) ; struct.put ( VdsProperties.Device , vmDevice.getType ( ) ) ; addDevice ( struct , vmDevice , null ) ; } }

Target:
private void buildSmartcardDevice ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vm.getId ( ) , VmDeviceGeneralType.SMARTCARD , VmDeviceType.SMARTCARD.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { java.util.Map struct = new java.util.HashMap ( ) ; struct.put ( VdsProperties.Type , vmDevice.getType ( ) . getValue ( ) ) ; struct.put ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; addDevice ( struct , vmDevice , null ) ; } }
Source:
private void logNetworkException ( org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException e ) { switch ( cachedVds.getStatus ( ) ) { case Down : break ; case NonResponsive : org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Failed to refresh VDS , cachedVds = '{}' : '{}', VDS Network Error, continuing. '{}'" , cachedVds.getId ( ) , cachedVds.getName ( ) , e.getMessage ( ) ) ; break ; default : org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed to refresh VDS , cachedVds = '{}' : '{}', VDS Network Error, continuing. '{}'" , cachedVds.getId ( ) , cachedVds.getName ( ) , e.getMessage ( ) ) ; } org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; }

Target:
private void logNetworkException ( org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException e ) { switch ( cachedVds.getStatus ( ) ) { case Down : break ; case NonResponsive : org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Failed to refresh VDS, network error, continuing, vds='{}'({}): {}" , cachedVds.getName ( ) , cachedVds.getId ( ) , e.getMessage ( ) ) ; break ; default : org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed to refresh VDS, network error, continuing, vds='{}'({}): {}" , cachedVds.getName ( ) , cachedVds.getId ( ) , e.getMessage ( ) ) ; } org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; }