auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > arg0 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > arg1 ) { int compareValue = arg0.getSecond ( ) . getvds_group_name ( ) . compareTo ( arg1.getSecond ( ) . getvds_group_name ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return arg0.getSecond ( ) . getvds_name ( ) . compareTo ( arg1.getSecond ( ) . getvds_name ( ) ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > arg0 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > arg1 ) { int compareValue = arg0.getSecond ( ) . getVdsGroupName ( ) . compareTo ( arg1.getSecond ( ) . getVdsGroupName ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return arg0.getSecond ( ) . getVdsName ( ) . compareTo ( arg1.getSecond ( ) . getVdsName ( ) ) ; }
Source:
private void handleError ( org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result ) { if ( ! ( result.isProxyHostFound ( ) ) ) { org.ovirt.engine.core.bll.GetNewVdsFenceStatusQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.GetNewVdsFenceStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( org.ovirt.engine.core.bll.GetNewVdsFenceStatusQuery.UNKNOWN , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.VDS_ALERT_FENCE_NO_PROXY_HOST ) ) ) ; } else { org.ovirt.engine.core.bll.GetNewVdsFenceStatusQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.GetNewVdsFenceStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( org.ovirt.engine.core.bll.GetNewVdsFenceStatusQuery.UNKNOWN , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.VDS_ALERT_FENCE_STATUS_VERIFICATION_FAILED ) ) ) ; } }

Target:
private void handleError ( org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result ) { if ( ! ( result.isProxyHostFound ( ) ) ) { org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.UNKNOWN , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.VDS_ALERT_FENCE_NO_PROXY_HOST ) ) ) ; } else { org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.UNKNOWN , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.VDS_ALERT_FENCE_STATUS_VERIFICATION_FAILED ) ) ) ; } }
Source:
public void template_SelectedItemChanged ( ) { getModel ( ) . setIsDisksAvailable ( true ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; updateRngDevice ( template.getId ( ) ) ; getModel ( ) . getCustomPropertySheet ( ) . deserialize ( template.getCustomProperties ( ) ) ; }

Target:
public void templateWithVersion_SelectedItemChanged ( ) { super . templateWithVersion_SelectedItemChanged ( ) ; getModel ( ) . setIsDisksAvailable ( true ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplateWithVersion ( ) . getSelectedItem ( ) . getTemplateVersion ( ) ; updateRngDevice ( template.getId ( ) ) ; getModel ( ) . getCustomPropertySheet ( ) . deserialize ( template.getCustomProperties ( ) ) ; }
Source:
private void updateShareableDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isShareableDiskEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.ShareableDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupported ( ) ) ; getIsShareable ( ) . setIsChangable ( isShareableDiskEnabled ) ; }

Target:
private void DiskInterface_SelectedItemChanged ( ) { boolean isInternal = ( ( java.lang.Boolean ) ( getIsInternal ( ) . getEntity ( ) ) ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = ( ( org.ovirt.engine.core.common.businessentities.DiskInterface ) ( getDiskInterface ( ) . getSelectedItem ( ) ) ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; }
Source:
protected void postSaveAction ( org.ovirt.engine.core.compat.Guid networkGuid , boolean succeeded ) { if ( succeeded ) { if ( ( ( java.lang.Boolean ) ( getIsVmNetwork ( ) . getEntity ( ) ) ) ) { performProfilesActions ( networkGuid ) ; stopProgress ( ) ; } else { stopProgress ( ) ; cancel ( ) ; } } }

Target:
protected void toggleProfilesAvailability ( ) { getProfiles ( ) . setIsAvailable ( ( ( java.lang.Boolean ) ( getIsVmNetwork ( ) . getEntity ( ) ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase runCanDoActionOnly ( final int currentCanDoActionId , final int totalSize ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getCommands ( ) . get ( currentCanDoActionId ) ; java.lang.String actionType = command.getActionType ( ) . toString ( ) ; try { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Start running CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; return command.canDoActionOnly ( ) ; } finally { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Finish handling CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; } }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase runCanDoActionOnly ( final int currentCanDoActionId , final int totalSize ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getCommands ( ) . get ( currentCanDoActionId ) ; java.lang.String actionType = command.getActionType ( ) . toString ( ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setCorrelationId ( command.getCorrelationId ( ) ) ; try { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Start running CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; return command.canDoActionOnly ( ) ; } finally { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Finish handling CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; } }
Source:
protected boolean checkPermissions ( final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permSubjects ) { java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.bll.utils.PermissionSubject permSubject : permSubjects ) { messages.clear ( ) ; if ( checkSinglePermission ( permSubject , messages ) ) { return true ; } } org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( messages ) ; return false ; }

Target:
protected boolean checkPermissions ( final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permSubjects ) { return permissionsChecker.checkPermissions ( this , permSubjects ) ; }
Source:
public void testEnoughSpaceToMergeSnapshotsWithOneDisk ( ) { org.mockito.Mockito.when ( diskImageDAO.get ( mockSourceImage ( ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; mockStorageDomainDAOGetForStoragePool ( 10 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; org.junit.Assert.assertTrue ( "Validation should succeed. Free space minus threshold should be bigger then disk size" , cmd.validateStorageDomains ( ) ) ; }

Target:
public void testEnoughSpaceToMergeSnapshotsWithOneDisk ( ) { spySdValidatorForOneDomain ( ) ; org.mockito.Mockito.when ( diskImageDAO.get ( mockSourceImage ( ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; mockStorageDomainDAOGetForStoragePool ( 10 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; org.junit.Assert.assertTrue ( "Validation should succeed. Free space minus threshold should be bigger then disk size" , cmd.validateStorageDomains ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionSubjects = new java.util.ArrayList < > ( ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getDiskImage ( ) . getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.ATTACH_DISK ) ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.ExportRepoImageCommand.getParameters ( ) . getDestinationDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return permissionSubjects ; }

Target:
private boolean validateDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = org.ovirt.engine.core.bll.ExportRepoImageCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.ExportRepoImageCommand.getParameters ( ) . getImageGroupID ( ) ) ; if ( ( disk != null ) && ( ! ( validate ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) . validateDiskIsNotLun ( ) ) ) ) ) { return false ; } if ( ( getDiskImage ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; } return true ; }
Source:
public void testGetStorageDomainWithNoStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getStorageDomains ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , domain.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 0 , domain.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 0 , domain.getActualImagesSize ( ) ) ; }

Target:
public void testGetStorageDomainWithNoStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getStorageDomains ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , domain.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 0 , domain.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 0 , domain.getActualImagesSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong shared status" , StorageDomainSharedStatus.Inactive , domain.getStorageDomainSharedStatus ( ) ) ; }
Source:
public void testNeedToProcessHardwareCapsTrue ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; newVds.setCpuFlags ( "flag2" ) ; org.junit.Assert.assertTrue ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }

Target:
public void testNeedToProcessHardwareCapsTrue ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; newVds.setCpuFlags ( "flag2" ) ; org.junit.Assert.assertTrue ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void IsShareableDiskEnabled ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ShareableDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void GetUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName , java.lang.Integer maxCount ) { org.ovirt.engine.core.common.queries.SearchParameters searchParameters = new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Host: cluster = " + clusterName ) + " and status = up" ) , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) ; if ( maxCount != null ) { searchParameters.setMaxCount ( maxCount ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParameters , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult interfaceExists ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) . when ( ( ( iface ) == null ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult nicIsNotLabeledWithSpecifiedLabel ( java.lang.String label ) { boolean shouldFail = ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( iface ) ) ) || ( ! ( iface.getLabels ( ) . contains ( label ) ) ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.INTERFACE_NOT_LABELED ; java.lang.String nicNameReplacement = org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , iface.getName ( ) ) ; java.lang.String labelReplacement = org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_NIC_LABEL , label ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( engineMessage , nicNameReplacement , labelReplacement ) . when ( shouldFail ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) ; jobProperties.put ( GlusterConstants.CLUSTER , ( vdsGroup == null ? null : vdsGroup.getName ( ) ) ) ; } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getCluster ( ) ; jobProperties.put ( GlusterConstants.CLUSTER , ( cluster == null ? null : cluster.getName ( ) ) ) ; } return jobProperties ; }
Source:
public static 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 getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
public java.lang.String getAdUserName ( ) { if ( ( adUserName ) == null ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . get ( getAdUserId ( ) ) ; if ( user != null ) { adUserName = user.getLoginName ( ) ; } } return adUserName ; }

Target:
public java.lang.String getAdUserName ( ) { if ( ( adUserName ) == null ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.ovirt.engine.core.bll.VmPoolSimpleUserCommandBase.getDbUserDao ( ) . get ( getAdUserId ( ) ) ; if ( user != null ) { adUserName = user.getLoginName ( ) ; } } return adUserName ; }
Source:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getGuestLastLoginTime ( ) ) != null ) && ( ( ( getGuestLastLogoutTime ( ) ) == null ) || ( ( getGuestLastLoginTime ( ) . compareTo ( getGuestLastLogoutTime ( ) ) ) > 0 ) ) ) { setGuestLastLogoutTime ( new java.util.Date ( ) ) ; } }

Target:
public java.lang.String getGuestOsKernelVersion ( ) { return vmDynamic.getGuestOsKernelVersion ( ) ; }
Source:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getguest_last_login_time ( ) ) != null ) && ( ( ( getguest_last_logout_time ( ) ) == null ) || ( ( getguest_last_login_time ( ) . compareTo ( getguest_last_logout_time ( ) ) ) > 0 ) ) ) { setguest_last_logout_time ( new java.util.Date ( ) ) ; } }

Target:
public void setDynamicData ( org.ovirt.engine.core.common.businessentities.VmDynamic value ) { vmDynamic = value ; }
Source:
private org.ovirt.engine.core.compat.Guid getQuotaId ( ) { return org.ovirt.engine.core.bll.AddVmPoolCommand.getParameters ( ) . getVmStaticData ( ) . getQuotaId ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaVdsConsumptionParameters ( ) { org.ovirt.engine.core.compat.Guid quotaId = org.ovirt.engine.core.bll.AddVmPoolCommand.getQuotaManager ( ) . getDefaultQuotaIfNull ( org.ovirt.engine.core.bll.AddVmPoolCommand.getParameters ( ) . getVmStaticData ( ) . getQuotaId ( ) , org.ovirt.engine.core.bll.AddVmPoolCommand.getStoragePoolId ( ) ) ; return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.quota.QuotaSanityParameter ( quotaId , null ) ) ; }
Source:
protected void EndVmCommand ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmCommand.acquireLock ( ) ) { setVm ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) != null ) { updateDisksAfterVmRemoved ( ) ; RemoveVmFromDb ( ) ; } } org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( true ) ; } finally { org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; } }

Target:
protected void endVmCommand ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmCommand.acquireLock ( ) ) { setVm ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . get ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) != null ) { updateDisksAfterVmRemoved ( ) ; removeVmFromDb ( ) ; } } org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( true ) ; } finally { org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc movePV ( java.lang.String jobId , java.lang.String sdUUID , java.lang.String device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.movePV" ) . withParameter ( "jobID" , jobId ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "guid" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.QemuImageInfoReturn getQemuImageInfo ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.getQemuImageInfo" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgUUID ) . withParameter ( "volumeID" , volUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.QemuImageInfoReturn ( response ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DbUser user : asCollection ( org.ovirt.engine.core.common.businessentities.DbUser.class , getEntity ( java.util.List.class , SearchType.DBUser , "users:" ) ) ) { users.put ( user.getuser_id ( ) , user ) ; } return users ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DbUser user : lookupUsers ( ) ) { users.put ( user.getuser_id ( ) , user ) ; } return users ; }
Source:
private void initSoundCard ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isSoundcardEnabled ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( returnValue ) ; } } ) , id ) ; }

Target:
private void initNetworkInterfaces ( ) { if ( networkInterfacesInited ) { return ; } org.ovirt.engine.ui.frontend.AsyncQuery getVmNicsQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getVmNicsQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( result ) ) ; initNetworkInterfaces ( networkBehavior , nics ) ; networkInterfacesInited = true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getVmNicList ( getVmNicsQuery , vm.getId ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > getLUNs ( org.ovirt.engine.core.compat.Guid storageDomainId , java.lang.String vgId ) { org.ovirt.engine.core.common.businessentities.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; lun1.setStorageDomainId ( storageDomainId ) ; lun1.setvolume_group_id ( vgId ) ; lun1.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; org.ovirt.engine.core.common.businessentities.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; lun2.setStorageDomainId ( storageDomainId ) ; lun2.setvolume_group_id ( vgId ) ; lun2.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( lun1 , lun2 ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLUNs ( org.ovirt.engine.core.compat.Guid storageDomainId , java.lang.String vgId ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setStorageDomainId ( storageDomainId ) ; lun1.setvolume_group_id ( vgId ) ; lun1.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setStorageDomainId ( storageDomainId ) ; lun2.setvolume_group_id ( vgId ) ; lun2.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( lun1 , lun2 ) ) ; }
Source:
public void testInValidUpdateOfStatusRestrictedEditableFieldOnRunningVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic src = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; src.setSingleQxlPci ( true ) ; org.ovirt.engine.core.common.businessentities.VmStatic dest = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; dest.setSingleQxlPci ( false ) ; boolean updateIsValid = org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( src , dest , VMStatus.Up , false ) ; org.junit.Assert.assertFalse ( "Update should be invalid for different single QXL PCI statuses on a running VM" , updateIsValid ) ; }

Target:
public void testInValidUpdateOfStatusRestrictedEditableFieldOnRunningVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic src = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; src.setSingleQxlPci ( true ) ; org.ovirt.engine.core.common.businessentities.VmStatic dest = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; dest.setSingleQxlPci ( false ) ; boolean updateIsValid = vmHandler.isUpdateValid ( src , dest , VMStatus.Up , false ) ; org.junit.Assert.assertFalse ( "Update should be invalid for different single QXL PCI statuses on a running VM" , updateIsValid ) ; }
Source:
private void WatchdogModel_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( getWatchdogModel ( ) . getEntity ( ) ) == null ) { getWatchdogAction ( ) . setIsChangable ( false ) ; getWatchdogAction ( ) . setSelectedItem ( null ) ; } else { getWatchdogAction ( ) . setIsChangable ( true ) ; } }

Target:
private void watchdogModelSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( getWatchdogModel ( ) . getSelectedItem ( ) ) == null ) { getWatchdogAction ( ) . setIsChangable ( false ) ; getWatchdogAction ( ) . setSelectedItem ( null ) ; } else { getWatchdogAction ( ) . setIsChangable ( true ) ; } }
Source:
public java.lang.Boolean call ( ) { try { com.woorea.openstack.cinder.model.Volume volume = proxy.getVolumeById ( id.toString ( ) ) ; return volume != null ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { return false ; } throw ex ; } }

Target:
public boolean isDiskExist ( final org.ovirt.engine.core.compat.Guid id ) { return execute ( ( ) -> { try { com.woorea.openstack.cinder.model.Volume volume = proxy.getVolumeById ( id.toString ( ) ) ; return volume != null ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { return false ; } throw ex ; } } ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface map ( org.ovirt.engine.api.model.HostNIC entity , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface template ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = super . map ( entity , template ) ; if ( entity.isSetNetwork ( ) ) { org.ovirt.engine.api.model.Network net = lookupNetwork ( entity.getNetwork ( ) ) ; iface.setNetworkName ( net.getName ( ) ) ; } return iface ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface map ( org.ovirt.engine.api.model.HostNIC entity , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface template ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = super . map ( entity , template ) ; if ( entity.isSetNetwork ( ) ) { if ( ( entity.getNetwork ( ) . isSetId ( ) ) || ( entity.getNetwork ( ) . isSetName ( ) ) ) { org.ovirt.engine.api.model.Network net = lookupNetwork ( entity.getNetwork ( ) ) ; iface.setNetworkName ( net.getName ( ) ) ; } else { iface.setNetworkName ( null ) ; } } return iface ; }
Source:
private org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct generateOptions ( ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct options = new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct ( ) ; options.add ( VdsProperties.connectivityCheck , java.lang.Boolean.toString ( org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . isCheckConnectivity ( ) ) ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . isCheckConnectivity ( ) ) { options.add ( VdsProperties.connectivityTimeout , org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . getConectivityTimeout ( ) ) ; } return options ; }

Target:
private org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct generateOptions ( ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct options = new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct ( ) ; options.add ( VdsProperties.CONNECTIVITY_CHECK , java.lang.Boolean.toString ( org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . isCheckConnectivity ( ) ) ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . isCheckConnectivity ( ) ) { options.add ( VdsProperties.CONNECTIVITY_TIMEOUT , org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . getConectivityTimeout ( ) ) ; } return options ; }
Source:
private java.util.List < org.ovirt.engine.api.model.StorageDomain > getExistingBlockStorageDomain ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > cnxList ) { org.ovirt.engine.core.common.utils.Pair < java.util.List < org.ovirt.engine.api.model.StorageDomain > , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > pair = getEntity ( org.ovirt.engine.core.common.utils.Pair.class , VdcQueryType.GetUnregisteredBlockStorageDomains , new org.ovirt.engine.core.common.queries.GetUnregisteredBlockStorageDomainsParameters ( hostId , storageType , cnxList ) , "GetUnregisteredBlockStorageDomains" , true ) ; java.util.List < org.ovirt.engine.api.model.StorageDomain > existingStorageDomains = pair.getFirst ( ) ; return existingStorageDomains ; }

Target:
private java.util.List < org.ovirt.engine.api.model.StorageDomain > getExistingBlockStorageDomain ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > cnxList ) { org.ovirt.engine.core.common.utils.Pair < java.util.List < org.ovirt.engine.api.model.StorageDomain > , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > pair = getEntity ( org.ovirt.engine.core.common.utils.Pair.class , QueryType.GetUnregisteredBlockStorageDomains , new org.ovirt.engine.core.common.queries.GetUnregisteredBlockStorageDomainsParameters ( hostId , storageType , cnxList ) , "GetUnregisteredBlockStorageDomains" , true ) ; java.util.List < org.ovirt.engine.api.model.StorageDomain > existingStorageDomains = pair.getFirst ( ) ; return existingStorageDomains ; }
Source:
public void testNotificationService ( ) { org.ovirt.engine.core.notifier.EngineMonitorService engineMonitorService = null ; try { engineMonitorService = new org.ovirt.engine.core.notifier.EngineMonitorService ( new org.ovirt.engine.core.notifier.utils.NotificationConfigurator ( "src/test/resources/conf/notifier.conf" ) ) ; } catch ( org.ovirt.engine.core.notifier.NotificationServiceException e ) { e.printStackTrace ( ) ; } org.junit.Assert.assertNotNull ( engineMonitorService ) ; engineMonitorService.run ( ) ; }

Target:
public void testNotificationService ( ) { org.ovirt.engine.core.notifier.EngineMonitorService engineMonitorService = null ; try { java.io.File config = new java.io.File ( "src/test/resources/conf/notifier.conf" ) ; org.ovirt.engine.core.notifier.utils.NotificationProperties.setDefaults ( config.getAbsolutePath ( ) , null ) ; engineMonitorService = new org.ovirt.engine.core.notifier.EngineMonitorService ( new org.ovirt.engine.core.notifier.utils.NotificationConfigurator ( ) ) ; } catch ( org.ovirt.engine.core.notifier.NotificationServiceException e ) { e.printStackTrace ( ) ; } org.junit.Assert.assertNotNull ( engineMonitorService ) ; engineMonitorService.run ( ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 , true ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.EditAffinityGroup , org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( org.ovirt.engine.api.restapi.resource.BackendAffinityGroupResourceTest.getModel ( 0 ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 , true ) ; setUriInfo ( setUpActionExpectations ( ActionType.EditAffinityGroup , org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( org.ovirt.engine.api.restapi.resource.BackendAffinityGroupResourceTest.getModel ( 0 ) ) , 0 ) ; }
Source:
public void testSetStatusForNonRequiredNetworkUpdated ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.NON_OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }

Target:
public void testSetStatusForNonRequiredNetworkUpdated ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.NON_OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.Matchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = getSnapshotDao ( ) . get ( org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getParameters ( ) . isFiltered ( ) ) ; if ( snapshot != null ) { org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getQueryReturnValue ( ) . setReturnValue ( snapshot ) ; } }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = snapshotDao.get ( org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getParameters ( ) . isFiltered ( ) ) ; if ( snapshot != null ) { org.ovirt.engine.core.bll.snapshots.GetSnapshotBySnapshotIdQuery.getQueryReturnValue ( ) . setReturnValue ( snapshot ) ; } }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetDeviceList , org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.HOST_GUID } , setUpLuns ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetDeviceList , org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.HOST_GUID } , setUpLuns ( ) , failure ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( getInterfaceName ( ) ) . append ( " {vmId=" ) . append ( getVmId ( ) ) . append ( ", macAddress=" ) . append ( getMacAddress ( ) ) . append ( ", ipv4=" ) . append ( getIpv4Addresses ( ) ) . append ( ", ipv6=" ) . append ( getIpv6Addresses ( ) ) . append ( "}" ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "vmId" , getVmId ( ) ) . append ( "macAddress" , getMacAddress ( ) ) . append ( "ipv4" , getIpv4Addresses ( ) ) . append ( "ipv6" , getIpv6Addresses ( ) ) . build ( ) ; }
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.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public 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.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
protected boolean shouldPerformOvfUpdate ( ) { return ( ( ! ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getParameters ( ) . isInactive ( ) ) ) && ( ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomain ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ) && ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomain ( ) . getStorageDomainType ( ) . isDataDomain ( ) ) ; }

Target:
protected boolean shouldPerformOvfUpdate ( ) { return ( ( ! ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getParameters ( ) . isInactive ( ) ) ) && ( StorageConstants.monitoredDomainStatuses.contains ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomain ( ) . getStatus ( ) ) ) ) && ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomain ( ) . getStorageDomainType ( ) . isDataDomain ( ) ) ; }