auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.DiskImage image ) { org.ovirt.engine.core.bll.ImagesHandler.addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }

Target:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { org.ovirt.engine.core.bll.ImagesHandler.addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreation ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.MultilevelAdministrationByPermissionIdParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreate ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.MultilevelAdministrationByPermissionIdParameters.class ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult referencedNetworkAttachmentActuallyExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS ; java.lang.String id = networkAttachmentId.toString ( ) ; java.lang.String replacement = org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , id ) ; return new org.ovirt.engine.core.bll.ValidationResult ( engineMessage , replacement ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { if ( isNewAttachment ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.MODIFIED_NETWORK_ATTACHMENT_DOES_NOT_EXISTS ; java.lang.String replacement = org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , networkAttachmentId.toString ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( engineMessage , replacement ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.StoragePoolParametersBase params = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( asGuid ( id ) ) ; boolean force = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendDataCenterResource.FORCE , true , false ) ; if ( force ) { params.setForceDelete ( force ) ; } return performAction ( VdcActionType.RemoveStoragePool , params ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.StoragePoolParametersBase params = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( asGuid ( id ) ) ; boolean force = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendDataCenterResource.FORCE , true , false ) ; if ( force ) { params.setForceDelete ( force ) ; } return performAction ( ActionType.RemoveStoragePool , params ) ; }
Source:
public static boolean isAdminUser ( org.ovirt.engine.core.common.interfaces.IVdcUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAllForUserAndGroups ( user.getUserId ( ) , user.getGroupIds ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Role r : userRoles ) { if ( ( r.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { if ( org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debugFormat ( "LoginAdminUser: User logged to admin using role {0}" , r.getname ( ) ) ; } return true ; } } return false ; }

Target:
public static boolean isAdminUser ( org.ovirt.engine.core.common.users.VdcUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAllForUserAndGroups ( user.getUserId ( ) , user.getGroupIds ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Role r : userRoles ) { if ( ( r.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { if ( org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debugFormat ( "LoginAdminUser: User logged to admin using role {0}" , r.getname ( ) ) ; } return true ; } } return false ; }
Source:
private void resetData ( ) { storageDomain = null ; storageModel = null ; storageId = null ; connection = null ; removeConnection = false ; path = null ; hostId = new org.ovirt.engine.core.compat.Guid ( ) ; clusters = null ; allStorageDomains = null ; attachedStorageDomains = null ; isoStorageDomains = null ; allHosts = null ; localStorageHost = null ; noLocalStorageHost = false ; }

Target:
private void resetData ( ) { storageDomain = null ; storageModel = null ; storageId = null ; connection = null ; removeConnection = false ; path = null ; hostId = org.ovirt.engine.core.compat.Guid.Empty ; clusters = null ; allStorageDomains = null ; attachedStorageDomains = null ; isoStorageDomains = null ; allHosts = null ; localStorageHost = null ; noLocalStorageHost = false ; }
Source:
protected void executeCommand ( ) { super . executeCommand ( ) ; getParameters ( ) . getLibvirtSecret ( ) . setCreationDate ( new java.util.Date ( ) ) ; getLibvirtSecretDAO ( ) . save ( getParameters ( ) . getLibvirtSecret ( ) ) ; registerLibvirtSecret ( ) ; setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { super . executeCommand ( ) ; getParameters ( ) . getLibvirtSecret ( ) . setCreationDate ( new java.util.Date ( ) ) ; getLibvirtSecretDao ( ) . save ( getParameters ( ) . getLibvirtSecret ( ) ) ; registerLibvirtSecret ( ) ; setSucceeded ( true ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate template ) { com.google.gwt.safehtml.shared.SafeHtmlBuilder builder = new com.google.gwt.safehtml.shared.SafeHtmlBuilder ( ) ; builder.append ( templates.vmNameCellItem ( template.getname ( ) ) ) ; if ( ( template.getdescription ( ) ) != null ) { builder.append ( templates.vmDescriptionCellItem ( template.getdescription ( ) ) ) ; } return builder.toSafeHtml ( ) ; }

Target:
public void render ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.Context context , org.ovirt.engine.core.common.businessentities.VmTemplate template , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.append ( templates.vmNameCellItem ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , "name" , context ) , template.getname ( ) ) ) ; java.lang.String description = template.getdescription ( ) ; if ( ( description != null ) && ( ! ( description.isEmpty ( ) ) ) ) { sb.append ( templates.vmDescriptionCellItem ( description ) ) ; } }
Source:
public void testCanDoSuccessOnAddFloatingDiskWithPlugUnset ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( false ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void testCanDoSuccessOnAddFloatingDiskWithPlugUnset ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( false ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public static void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) , null ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) , null ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageFileType ) { getIrsImageList ( aQuery , storagePoolId , forceRefresh , imageFileType , new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.RepoImageToImageFileNameAsyncConverter ( ) ) ; }
Source:
private void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromsResourceTest.VM_ID } , getVm ( ) , failure ) ; } }

Target:
private void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromsResourceTest.VM_ID } , getVm ( ) , failure ) ; } }
Source:
protected static void removeSessionUser ( ) { if ( ( org.ovirt.engine.core.itests.AbstractBackendTest.getUser ( ) ) != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.permissions > perms = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDAO ( ) . getAllForAdElement ( org.ovirt.engine.core.itests.AbstractBackendTest.getUser ( ) . getUserId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.permissions perm : perms ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDAO ( ) . remove ( perm.getId ( ) ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . remove ( org.ovirt.engine.core.itests.AbstractBackendTest.getUser ( ) . getUserId ( ) ) ; } }

Target:
protected static void removeSessionUser ( ) { if ( ( org.ovirt.engine.core.itests.AbstractBackendTest.getUser ( ) ) != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.permissions > perms = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDao ( ) . getAllForAdElement ( org.ovirt.engine.core.itests.AbstractBackendTest.getUser ( ) . getUserId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.permissions perm : perms ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDao ( ) . remove ( perm.getId ( ) ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . remove ( org.ovirt.engine.core.itests.AbstractBackendTest.getUser ( ) . getUserId ( ) ) ; } }
Source:
public static void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
private java.lang.String getVmBeingRemovedFromPoolMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_BEING_REMOVED_FROM_POOL.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . getName ( ) ) ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPool ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmPoolName %1$s" , org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPool ( ) . getName ( ) ) ) ; } return builder.toString ( ) ; }

Target:
private org.ovirt.engine.core.bll.LockMessage getVmBeingRemovedFromPoolMessage ( ) { return new org.ovirt.engine.core.bll.LockMessage ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_BEING_REMOVED_FROM_POOL ) . withOptional ( "VmName" , ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) ) != null ? org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . getName ( ) : null ) ) . withOptional ( "VmPoolName" , ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPool ( ) ) != null ? org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPool ( ) . getName ( ) : null ) ) ; }
Source:
public static void getMaximalVmMemSize64OS ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : - 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void isManagementNetwork ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { runQueryByIdParameter ( VdcQueryType.IsManagementNetwork , aQuery , networkId ) ; }
Source:
public java.lang.String getRelatedTableName ( java.lang.String obj , java.lang.String fieldName ) { return getRelatedTableName ( obj , ( ( ( fieldName == null ) || ( ( fieldName.length ( ) ) == 0 ) ) || ( fieldName.toLowerCase ( ) . equalsIgnoreCase ( "tag" ) ) ) ) ; }

Target:
public java.lang.String getRelatedTableName ( java.lang.String obj , java.lang.String fieldName , boolean useTagsInFrom ) { return getRelatedTableName ( obj , ( ( ( ( fieldName == null ) || ( ( fieldName.length ( ) ) == 0 ) ) || ( fieldName.toLowerCase ( ) . equalsIgnoreCase ( "tag" ) ) ) || ( requiresTagsForField ( obj , fieldName , useTagsInFrom ) ) ) ) ; }
Source:
private static void addBootProtocol ( java.util.Map < java.lang.String , java.lang.Object > entry , org.ovirt.engine.core.common.businessentities.VDS host , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { org.ovirt.engine.core.vdsbroker.vdsbroker.BootProtocolResolver resolver = ( org.ovirt.engine.core.common.FeatureSupported.cfgEntriesDeprecated ( host.getClusterCompatibilityVersion ( ) ) ) ? new org.ovirt.engine.core.vdsbroker.vdsbroker.NoCfgBootProtocolResolver ( entry , iface ) : new org.ovirt.engine.core.vdsbroker.vdsbroker.CfgBootProtocolResolver ( entry , iface ) ; resolver.resolve ( ) ; }

Target:
private static void addBootProtocol ( java.util.Map < java.lang.String , java.lang.Object > nicProperties , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { if ( nicProperties == null ) { return ; } final org.ovirt.engine.core.vdsbroker.vdsbroker.BootProtocolResolver resolver = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.getBootProtocolResolver ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.setBootProtocolAndGateway ( resolver , new org.ovirt.engine.core.vdsbroker.vdsbroker.NoCfgIpv4InfoFetcher ( nicProperties , iface.getIpv4Address ( ) ) , iface :: setIpv4BootProtocol , iface :: setIpv4Gateway ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.setBootProtocolAndGateway ( resolver , new org.ovirt.engine.core.vdsbroker.vdsbroker.NoCfgIpv6InfoFetcher ( nicProperties , iface.getIpv6Address ( ) ) , iface :: setIpv6BootProtocol , iface :: setIpv6Gateway ) ; }
Source:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel ) { java.lang.Boolean migrationNetworkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.MigrationNetworkEnabled , clusterNetworkModel.getCluster ( ) . getcompatibility_version ( ) . toString ( ) ) ) ) ; return ( migrationNetworkEnabled && ( clusterNetworkModel.isAttached ( ) ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ; }

Target:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel ) { java.lang.Boolean migrationNetworkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.MigrationNetworkEnabled , clusterNetworkModel.getCluster ( ) . getCompatibilityVersion ( ) . toString ( ) ) ) ) ; return ( migrationNetworkEnabled && ( clusterNetworkModel.isAttached ( ) ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } }

Target:
private void spice_Disconnected ( java.lang.Object sender , org.ovirt.engine.ui.uicommonweb.models.vms.ErrorCodeEventArgs e ) { getspice ( ) . getDisconnectedEvent ( ) . removeListener ( this ) ; getspice ( ) . getMenuItemSelectedEvent ( ) . removeListener ( this ) ; setIsConnected ( false ) ; updateActionAvailability ( ) ; if ( ( e.getErrorCode ( ) ) > 100 ) { getErrorEvent ( ) . raise ( this , e ) ; } }
Source:
protected boolean canDoAction ( ) { M qosValidator = getQosValidator ( org.ovirt.engine.core.bll.qos.UpdateQosCommandBase.getQos ( ) ) ; return ( ( super . canDoAction ( ) ) && ( validate ( qosValidator.qosExists ( ) ) ) ) && ( validate ( qosValidator.consistentDataCenter ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { M qosValidator = getQosValidator ( org.ovirt.engine.core.bll.qos.UpdateQosCommandBase.getQos ( ) ) ; return ( ( ( super . canDoAction ( ) ) && ( validate ( qosValidator.qosExists ( ) ) ) ) && ( validate ( qosValidator.consistentDataCenter ( ) ) ) ) && ( validate ( qosValidator.nameNotChangedOrNotTaken ( ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.Bond bond ) { org.ovirt.engine.core.compat.Guid nicId = bond.getId ( ) ; java.lang.String nicName = bond.getName ( ) ; org.ovirt.engine.core.common.errors.VdcBllMessages message = org.ovirt.engine.core.common.errors.VdcBllMessages.BOND_REFERENCES_NICS_INCOHERENTLY ; return validateCoherentNicIdentification ( bond.getId ( ) , nicId , nicName , message ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.Bond bond ) { org.ovirt.engine.core.compat.Guid nicId = bond.getId ( ) ; java.lang.String nicName = bond.getName ( ) ; org.ovirt.engine.core.common.errors.EngineMessage message = org.ovirt.engine.core.common.errors.EngineMessage.BOND_REFERENCES_NICS_INCOHERENTLY ; return validateCoherentNicIdentification ( bond.getId ( ) , nicId , nicName , message ) ; }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { boolean enabled = ( ( _vds.getpm_enabled ( ) ) && ( _vds.isPmKdumpDetection ( ) ) ) && ( fenceKdumpSupported ) ; if ( ! enabled ) { _messages.post ( InstallerMessages.Severity.INFO , "Disabling Kdump integration" ) ; } _parser.cliEnvironmentSet ( KdumpEnv.ENABLE , enabled ) ; return true ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { boolean enabled = ( ( _vds.isPmEnabled ( ) ) && ( _vds.isPmKdumpDetection ( ) ) ) && ( fenceKdumpSupported ) ; if ( ! enabled ) { _messages.post ( InstallerMessages.Severity.INFO , "Disabling Kdump integration" ) ; } _parser.cliEnvironmentSet ( KdumpEnv.ENABLE , enabled ) ; return true ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain memoryImageRemover = new org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getVmId ( ) , this ) ; setSucceeded ( memoryImageRemover.remove ( java.util.Collections.singleton ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getMemoryVolumes ( ) ) ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain memoryImageRemover = new org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getVmId ( ) , this , org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . isForceRemove ( ) ) ; setSucceeded ( memoryImageRemover.remove ( java.util.Collections.singleton ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getMemoryVolumes ( ) ) ) ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( skipFencingIfSDActive ? 1231 : 1237 ) ; return result ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( fencingEnabled ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfSDActive ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfConnectivityBroken ? 1231 : 1237 ) ; result = ( prime * result ) + ( hostsWithBrokenConnectivityThreshold ) ; return result ; }
Source:
public org.ovirt.engine.sdk.decorators.ClusterNetwork add ( org.ovirt.engine.sdk.decorators.Network network ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; return getProxy ( ) . add ( url , network , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.ClusterNetwork.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.ClusterNetwork add ( org.ovirt.engine.sdk.decorators.Network network ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , network , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.ClusterNetwork.class , headers ) ; }
Source:
public void onBootstrap ( ) { super . onBootstrap ( ) ; com.google.gwt.user.client.Window.setTitle ( dynamicMessages.applicationTitle ( ) ) ; org.ovirt.engine.ui.webadmin.uimode.UiModeData uiModeData = org.ovirt.engine.ui.webadmin.uimode.UiModeData.instance ( ) ; if ( uiModeData != null ) { handleUiMode ( uiModeData ) ; } placeManager.revealCurrentPlace ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { commonModelProvider.get ( ) . updateReportsAvailability ( ) ; }
Source:
public void getDbGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDbGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getAuthzGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAuthzGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
public void getExternalProviderHostGroupList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalHostGroup > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostGroupsFromExternalProvider , params , aQuery ) ; }

Target:
public void getClusterEditWarnings ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.ClusterEditWarnings > aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.businessentities.Cluster cluster ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterEditWarnings , new org.ovirt.engine.core.common.queries.ClusterEditParameters ( cluster ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { getClusterPolicy ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.getInstance ( ) . addClusterPolicy ( getClusterPolicy ( ) ) ; getReturnValue ( ) . setActionReturnValue ( getClusterPolicy ( ) . getId ( ) ) ; setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { getClusterPolicy ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; schedulingManager.addClusterPolicy ( getClusterPolicy ( ) ) ; getReturnValue ( ) . setActionReturnValue ( getClusterPolicy ( ) . getId ( ) ) ; setSucceeded ( true ) ; }
Source:
protected com.google.gwt.resources.client.ImageResource getStatusImage ( ) { switch ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) . getStatus ( ) ) { case Operational : return resources.upImage ( ) ; case NonOperational : return resources.downImage ( ) ; default : return resources.questionMarkImage ( ) ; } }

Target:
protected com.google.gwt.resources.client.ImageResource getStatusImage ( ) { org.ovirt.engine.core.common.businessentities.NetworkStatus netStatus = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) . getStatus ( ) ; if ( netStatus == ( org.ovirt.engine.core.common.businessentities.NetworkStatus.Operational ) ) { return resources.upImage ( ) ; } else if ( netStatus == ( org.ovirt.engine.core.common.businessentities.NetworkStatus.NonOperational ) ) { return resources.downImage ( ) ; } else { return resources.questionMarkImage ( ) ; } }
Source:
public int getAvailableMacsCount ( ) { lockObj.readLock ( ) . lock ( ) ; try { checkIfInitialized ( ) ; int availableMacsSize = macsStorage.getAvailableMacsCount ( ) ; org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerRanges.log.debugFormat ( "Number of available Mac addresses = {1}" , availableMacsSize ) ; return availableMacsSize ; } finally { lockObj.readLock ( ) . unlock ( ) ; } }

Target:
public int getAvailableMacsCount ( ) { try ( org.ovirt.engine.core.utils.lock.AutoCloseableLock l = new org.ovirt.engine.core.utils.lock.AutoCloseableLock ( lockObj.readLock ( ) ) ) { checkIfInitialized ( ) ; int availableMacsSize = macsStorage.getAvailableMacsCount ( ) ; org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerRanges.log.debug ( "Number of available Mac addresses = {}" , availableMacsSize ) ; return availableMacsSize ; } }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , C value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { sb.append ( getTemplate ( ) . id ( id ) ) ; for ( com.google.gwt.cell.client.HasCell < C , ? > hasCell : hasCells ) { render ( context , value , sb , hasCell ) ; } sb.appendHtmlConstant ( "</div>" ) ; }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Cell.Context context , C value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { sb.append ( getTemplate ( ) . id ( id ) ) ; for ( com.google.gwt.cell.client.HasCell < C , ? > hasCell : hasCells ) { render ( context , value , sb , hasCell , id ) ; } sb.appendHtmlConstant ( "</div>" ) ; }
Source:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }

Target:
public static void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }
Source:
private void cancelTasks ( ) { if ( hasTasks ( ) ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , org.ovirt.engine.core.bll.CommandBase.this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , org.ovirt.engine.core.bll.CommandBase.this . getClass ( ) . getName ( ) ) ; } } } ) ; } }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { persistCommand ( parentCommand , getContext ( ) , enableCallBack ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand.equals ( getModel ( ) . getRemoveQuotaCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand.equals ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public void testNotEnoughForMultipleDiskAndDomainsAllDomainsFail ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesDisks = org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.mockMultipleSourceImagesForDomain ( 4 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ; imagesDisks.addAll ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.mockMultipleSourceImagesForDomain ( 4 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID2 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ) ; org.mockito.Mockito.doReturn ( imagesDisks ) . when ( cmd ) . getSourceImages ( ) ; mockStorageDomainDAOGetForStoragePool ( 10 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; mockStorageDomainDAOGetForStoragePool ( 10 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID2 ) ; org.junit.Assert.assertFalse ( "Validation should fail. Second domain should not have enough free space for request." , cmd.validateStorageDomains ( ) ) ; }

Target:
private org.ovirt.engine.core.compat.Guid mockSourceImageAndGetId ( ) { return mockSourceImage ( ) . getImageId ( ) ; }
Source:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
protected void initLoginModel ( ) { super . initLoginModel ( ) ; final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalLoginModel loginModel = getLoginModel ( ) ; loginModel.getIsENGINEUser ( ) . getPropertyChangedEvent ( ) . 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 ) { java.lang.Boolean isEngineUser = loginModel.getIsENGINEUser ( ) . getEntity ( ) ; if ( isEngineUser != null ) { userRole.setEngineUser ( isEngineUser ) ; performLogin ( loginModel ) ; } } } ) ; }

Target:
protected void initLoginModel ( ) { super . initLoginModel ( ) ; final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalLoginModel loginModel = getLoginModel ( ) ; loginModel.getIsENGINEUser ( ) . getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.Boolean isEngineUser = loginModel.getIsENGINEUser ( ) . getEntity ( ) ; if ( isEngineUser != null ) { userRole.setEngineUser ( isEngineUser ) ; performLogin ( loginModel ) ; } } } ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( result ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setIsFingerprintVerified ( false ) ; if ( ( ( getGlusterHostAddress ( ) . getEntity ( ) ) == null ) || ( ( getGlusterHostAddress ( ) . getEntity ( ) . trim ( ) . length ( ) ) == 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( "" ) ; return ; } fetchFingerprint ( getGlusterHostAddress ( ) . getEntity ( ) ) ; }