auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Disk > getSortedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > diskImages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( vm.getDiskMap ( ) . values ( ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.dal.comparators.DiskImageByDiskAliasComparator ( ) ) ; java.util.Collections.sort ( diskImages , java.util.Collections.reverseOrder ( new org.ovirt.engine.core.dal.comparators.DiskImageByBootComparator ( ) ) ) ; return diskImages ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Disk > getSortedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > diskImages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( vm.getDiskMap ( ) . values ( ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.common.businessentities.comparators.DiskImageByDiskAliasComparator ( ) ) ; java.util.Collections.sort ( diskImages , java.util.Collections.reverseOrder ( new org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase.DiskImageByBootComparator ( ) ) ) ; return diskImages ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , ( cmdContext != null ? cmdContext.getExecutionContext ( ) : null ) ) ; updateCommandResult ( command.getCommandId ( ) , result ) ; return result ; }

Target:
private org.ovirt.engine.core.common.action.ActionReturnValue executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.common.action.ActionReturnValue result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , ( cmdContext != null ? cmdContext.getExecutionContext ( ) : null ) ) ; updateCommandResult ( command.getCommandId ( ) , result ) ; return result ; }
Source:
public void decrease ( T key ) { org.ovirt.engine.core.bll.network.macpoolmanager.ObjectCounter.Counter counter = map.get ( key ) ; if ( counter == null ) { return ; } int count = counter.decrease ( ) ; if ( count == 0 ) { map.remove ( key ) ; } else if ( count < 0 ) { throw new java.lang.IllegalStateException ( "count underflow." ) ; } }

Target:
public void decrease ( T key ) { org.ovirt.engine.core.bll.network.macpool.ObjectCounter.Counter counter = map.get ( key ) ; if ( counter == null ) { return ; } int count = counter.decrease ( ) ; if ( count == 0 ) { map.remove ( key ) ; } else if ( count < 0 ) { throw new java.lang.IllegalStateException ( "count underflow." ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; snapshotModel.showWarningForNonExportableDisks ( disks ) ; snapshotModel.getCommands ( ) . add ( getOnSaveCommand ( ) ) ; snapshotModel.getCommands ( ) . add ( getCancelCommand ( ) ) ; snapshotModel.StopProgress ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( snapshotModel , disks , VmModelHelper.WarningType.VM_SNAPSHOT ) ; snapshotModel.getCommands ( ) . add ( getOnSaveCommand ( ) ) ; snapshotModel.getCommands ( ) . add ( getCancelCommand ( ) ) ; snapshotModel.StopProgress ( ) ; }
Source:
protected void executeCommand ( ) { super . executeCommand ( ) ; if ( org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getSucceeded ( ) ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( ActionType.AttachStorageDomainToPool , new org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters ( org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getStoragePool ( ) . getId ( ) ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getReturnValue ( ) . setFault ( returnValue.getFault ( ) ) ; } } }

Target:
protected void executeCommand ( ) { super . executeCommand ( ) ; if ( org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getSucceeded ( ) ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = backend.runInternalAction ( ActionType.AttachStorageDomainToPool , new org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters ( org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getStoragePool ( ) . getId ( ) ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.storage.domain.AddLocalStorageDomainCommand.getReturnValue ( ) . setFault ( returnValue.getFault ( ) ) ; } } }
Source:
public org.ovirt.engine.ui.uicommonweb.models.GridTimer getTimer ( ) { if ( ( gettimer ( ) ) == null ) { settimer ( new org.ovirt.engine.ui.uicommonweb.models.GridTimer ( getListName ( ) ) { @ java.lang.Override public void execute ( ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.logger.fine ( ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.this . getClass ( ) . getName ( ) ) + ": Executing search" ) ) ; syncSearch ( ) ; } } ) ; gettimer ( ) . setRefreshRate ( getConfigurator ( ) . getPollingTimerInterval ( ) ) ; } return gettimer ( ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.GridTimer getTimer ( ) { if ( ( gettimer ( ) ) == null ) { settimer ( new org.ovirt.engine.ui.uicommonweb.models.GridTimer ( getListName ( ) ) { @ java.lang.Override public void execute ( ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.logger.fine ( ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.this . getClass ( ) . getName ( ) ) + ": Executing search" ) ) ; syncSearch ( ) ; } } ) ; gettimer ( ) . setRefreshRate ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.getConfigurator ( ) . getPollingTimerInterval ( ) ) ; } return gettimer ( ) ; }
Source:
protected org.ovirt.engine.core.utils.lock.EngineLock acquireEngineLock ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.locks.LockingGroup group ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( java.util.Collections.singletonMap ( id.toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( group , EngineMessage.ACTION_TYPE_FAILED_VOLUME_OPERATION_IN_PROGRESS ) ) , null ) ; org.ovirt.engine.core.bll.gluster.GlusterSnapshotCommandBase.getLockManager ( ) . acquireLockWait ( lock ) ; return lock ; }

Target:
protected org.ovirt.engine.core.utils.lock.EngineLock acquireEngineLock ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.locks.LockingGroup group ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( java.util.Collections.singletonMap ( id.toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( group , EngineMessage.ACTION_TYPE_FAILED_VOLUME_OPERATION_IN_PROGRESS ) ) , null ) ; lockManager.acquireLockWait ( lock ) ; return lock ; }
Source:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByStoragePoolAndDomainId ( org.ovirt.engine.core.compat.Guid isoStoragePoolId , org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.FileTypeExtension fileTypeExtension ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( ( ( isoStorageDomainId != null ) && ( isoStoragePoolId != null ) ) && ( ( org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . findActiveISODomain ( isoStoragePoolId ) ) != null ) ) { fileListMD = repoStorageDom.getRepoListForStorageDomainAndStoragePool ( isoStoragePoolId , isoStorageDomainId , fileTypeExtension ) ; } return fileListMD ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByStoragePoolAndDomainId ( org.ovirt.engine.core.compat.Guid isoStoragePoolId , org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( ( ( isoStorageDomainId != null ) && ( isoStoragePoolId != null ) ) && ( ( org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . findActiveISODomain ( isoStoragePoolId ) ) != null ) ) { fileListMD = repoStorageDom.getRepoListForStorageDomainAndStoragePool ( isoStoragePoolId , isoStorageDomainId , imageType ) ; } return fileListMD ; }
Source:
private void updateKeyTitle ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { java.lang.String selectedKey = ( ( java.lang.String ) ( object.getKeys ( ) . getSelectedItem ( ) ) ) ; if ( selectedKey != null ) { org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( selectedKey ) , keyField.getElement ( ) ) ; } }

Target:
private void updateKeyTitle ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { java.lang.String selectedKey = ( ( java.lang.String ) ( object.getKeys ( ) . getSelectedItem ( ) ) ) ; if ( selectedKey != null ) { org.ovirt.engine.ui.common.widget.tooltip.ElementTooltipUtils.setTooltipOnElement ( selectedKey , keyField.getElement ( ) ) ; } }
Source:
void localize ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { nameEditor.setLabel ( constants.makeTemplatePopupNameLabel ( ) ) ; descriptionEditor.setLabel ( constants.makeTemplatePopupDescriptionLabel ( ) ) ; clusterEditor.setLabel ( constants.makeTemplateClusterLabel ( ) ) ; quotaEditor.setLabel ( constants.makeTemplateQuotaLabel ( ) ) ; isTemplatePublicEditor.setLabel ( constants.makeTemplateIsTemplatePublicEditorLabel ( ) ) ; copyVmPermissions.setLabel ( constants.copyVmPermissions ( ) ) ; disksAllocationLabel.setText ( constants.disksAllocation ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { nameEditor.setLabel ( constants.makeTemplatePopupNameLabel ( ) ) ; descriptionEditor.setLabel ( constants.makeTemplatePopupDescriptionLabel ( ) ) ; commentEditor.setLabel ( constants.commentLabel ( ) ) ; clusterEditor.setLabel ( constants.makeTemplateClusterLabel ( ) ) ; quotaEditor.setLabel ( constants.makeTemplateQuotaLabel ( ) ) ; isTemplatePublicEditor.setLabel ( constants.makeTemplateIsTemplatePublicEditorLabel ( ) ) ; copyVmPermissions.setLabel ( constants.copyVmPermissions ( ) ) ; disksAllocationLabel.setText ( constants.disksAllocation ( ) ) ; }
Source:
public org.ovirt.engine.sdk.entities.Response delete ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; return getProxy ( ) . delete ( url , org.ovirt.engine.sdk.entities.Response.class ) ; }

Target:
public org.ovirt.engine.sdk.entities.Response delete ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; 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 ( ) . delete ( url , org.ovirt.engine.sdk.entities.Response.class , headers ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void postUpdateItemsAvailability ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel item , boolean isNoExportOrIsoStorageAttached ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getModel ( ) . getDataCenter ( ) . getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.Model model = ( ( org.ovirt.engine.ui.uicommonweb.models.Model ) ( item ) ) ; boolean isItemSelectable = isItemSelectable ( item , dataCenter , isNoExportOrIsoStorageAttached ) ; model.setIsSelectable ( isItemSelectable ) ; onStorageModelUpdated ( item ) ; }

Target:
private void updateItemSelectability ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel item , boolean isSelectable ) { org.ovirt.engine.ui.uicommonweb.models.Model model = ( ( org.ovirt.engine.ui.uicommonweb.models.Model ) ( item ) ) ; model.setIsSelectable ( isSelectable ) ; onStorageModelUpdated ( item ) ; }
Source:
public void isConnWithSameDetailsExistBlockDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; org.mockito.Mockito.when ( command.findConnectionWithSameDetails ( newISCSIConnection ) ) . thenReturn ( connection1 ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertTrue ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistBlockDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; org.mockito.Mockito.when ( iscsiStorageHelper.findConnectionWithSameDetails ( newISCSIConnection ) ) . thenReturn ( connection1 ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertTrue ( isExists ) ; }
Source:
public void testStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setStorage ( new org.ovirt.engine.api.model.Storage ( ) ) ; storageDomain.getStorage ( ) . setPath ( "foo" ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , storageDomain ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; assertNull ( storageDomain.getStorage ( ) . getHref ( ) ) ; }

Target:
public void testStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; storageDomain.getStorage ( ) . setPath ( "foo" ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , storageDomain ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; assertNull ( storageDomain.getStorage ( ) . getHref ( ) ) ; }
Source:
private static void mockStorageDomainStatic ( org.ovirt.engine.core.bll.ImportVmTemplateCommand command , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { final org.ovirt.engine.core.dao.StorageDomainStaticDAO dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainStaticDAO.class ) ; final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setstorage_type ( storageType ) ; org.mockito.Mockito.when ( dao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; org.mockito.Mockito.doReturn ( dao ) . when ( command ) . getStorageDomainStaticDAO ( ) ; }

Target:
private static void mockStorageDomainStatic ( org.ovirt.engine.core.bll.ImportVmTemplateCommand command , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { final org.ovirt.engine.core.dao.StorageDomainStaticDAO dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainStaticDAO.class ) ; final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setStorageType ( storageType ) ; org.mockito.Mockito.when ( dao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; org.mockito.Mockito.doReturn ( dao ) . when ( command ) . getStorageDomainStaticDAO ( ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . update ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : _clusters ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; } org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . update ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : _clusters ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; } org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.setSucceeded ( true ) ; }
Source:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.StorageDomain model = new org.ovirt.engine.api.model.StorageDomain ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "StorageDomain" , "add" , "id|name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.StorageDomain model = new org.ovirt.engine.api.model.StorageDomain ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "StorageDomain" , "add" , "id|name" ) ; } }
Source:
protected boolean validateQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { if ( ( quotaId == null ) || ( Guid.Empty.equals ( quotaId ) ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Quota quota = getQuotaDao ( ) . getById ( quotaId ) ; if ( quota == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; } if ( ! ( java.util.Objects.equals ( quota.getStoragePoolId ( ) , getStoragePoolId ( ) ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; } return true ; }

Target:
protected boolean validateQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { if ( ( quotaId == null ) || ( Guid.Empty.equals ( quotaId ) ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Quota quota = quotaDao.getById ( quotaId ) ; if ( quota == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; } if ( ! ( java.util.Objects.equals ( quota.getStoragePoolId ( ) , getStoragePoolId ( ) ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; } return true ; }
Source:
public static void GetSearchResultsLimit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 100 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getSearchResultsLimit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 100 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void generateWriter ( org.ovirt.api.metamodel.concepts.StructType type ) { javaBuffer = new org.ovirt.api.metamodel.tool.JavaClassBuffer ( ) ; org.ovirt.api.metamodel.tool.JavaClassName writerName = javaTypes.getJsonWriterName ( type ) ; javaBuffer.setClassName ( writerName ) ; generateWriterSource ( type ) ; try { javaBuffer.write ( outDir ) ; } catch ( java.io.IOException exception ) { throw new java.lang.RuntimeException ( ( ( "Can\'t write file for JSON writer \"" + writerName ) + "\"" ) , exception ) ; } }

Target:
private void generateEnumReaderSource ( org.ovirt.api.metamodel.concepts.EnumType type ) { org.ovirt.api.metamodel.tool.JavaClassName readerName = javaTypes.getJsonReaderName ( type ) ; javaBuffer.addLine ( "public class %1$s {" , readerName.getSimpleName ( ) ) ; javaBuffer.addLine ( ) ; generateEnumReadOne ( type ) ; generateEnumReadMany ( type ) ; javaBuffer.addLine ( "}" ) ; javaBuffer.addLine ( ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel object ) { super . edit ( object ) ; labelsWidget.edit ( object.getLabelsModel ( ) ) ; bondSuggestEditor.setVisible ( true ) ; bondEditor.setVisible ( false ) ; labelsWidget.setVisible ( true ) ; info.setVisible ( false ) ; message.setVisible ( false ) ; layoutPanel.remove ( infoPanel ) ; asPopupPanel ( ) . setPixelSize ( 400 , 400 ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel object ) { super . edit ( object ) ; labelsWidget.edit ( object.getLabelsModel ( ) ) ; bondSuggestEditor.setVisible ( true ) ; bondEditor.setVisible ( false ) ; labelsWidget.setVisible ( true ) ; info.setVisible ( false ) ; message.setVisible ( false ) ; layoutPanel.remove ( infoPanel ) ; layoutPanel.getElement ( ) . getStyle ( ) . setOverflow ( Overflow.HIDDEN ) ; asPopupPanel ( ) . setPixelSize ( 400 , 275 ) ; }
Source:
public org.ovirt.engine.sdk.decorators.HostNIC add ( org.ovirt.engine.sdk.decorators.HostNIC hostnic ) 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 , hostnic , org.ovirt.engine.sdk.entities.HostNIC.class , org.ovirt.engine.sdk.decorators.HostNIC.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.HostNIC add ( org.ovirt.engine.sdk.decorators.HostNIC hostnic ) 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 , hostnic , org.ovirt.engine.sdk.entities.HostNIC.class , org.ovirt.engine.sdk.decorators.HostNIC.class , headers ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { hostsModel.stopProgress ( ) ; boolean isAllCanDoPassed = true ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { isAllCanDoPassed = isAllCanDoPassed && ( returnValueBase.getCanDoAction ( ) ) ; if ( ! isAllCanDoPassed ) { break ; } } if ( isAllCanDoPassed ) { cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { hostsModel.stopProgress ( ) ; boolean isAllValidatePassed = true ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { isAllValidatePassed = isAllValidatePassed && ( returnValueBase.isValid ( ) ) ; if ( ! isAllValidatePassed ) { break ; } } if ( isAllValidatePassed ) { cancel ( ) ; } }
Source:
public void testExecuteQueryCommandWithEmptyList ( ) { org.ovirt.engine.core.compat.Guid imageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( imageId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > expected = java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ) ; org.mockito.Mockito.when ( storageDomainDaoMock.getAllStorageDomainsByImageId ( imageId ) ) . thenReturn ( expected ) ; org.ovirt.engine.core.bll.storage.domain.GetStorageDomainsByImageIdQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = getQuery ( ) ; query.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( "Wrong result returned" , expected , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testExecuteQueryCommandWithEmptyList ( ) { org.ovirt.engine.core.compat.Guid imageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( imageId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > expected = java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ) ; org.mockito.Mockito.when ( storageDomainDaoMock.getAllStorageDomainsByImageId ( imageId ) ) . thenReturn ( expected ) ; org.ovirt.engine.core.bll.storage.domain.GetStorageDomainsByImageIdQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = getQuery ( ) ; query.executeQueryCommand ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( expected , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) , "Wrong result returned" ) ; }
Source:
protected void executeCommand ( ) { getMacPoolDao ( ) . update ( getMacPoolEntity ( ) ) ; org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDcSingleton.getInstance ( ) . modifyPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }

Target:
protected void executeCommand ( ) { registerRollbackHandler ( new org.ovirt.engine.core.bll.UpdateMacPoolCommand.CustomTransactionCompletionListener ( ) ) ; getMacPoolDao ( ) . update ( getMacPoolEntity ( ) ) ; poolPerDc.modifyPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }
Source:
public void testUpdateSetAndUploadIconFailure ( ) { final org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 0 ) ; model.setSmallIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIcon ( GUIDS [ 2 ] ) ) ; model.setLargeIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIconWithData ( ) ) ; try { verifyModel ( resource.update ( model ) , 0 ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BAD_REQUEST ) ; } }

Target:
public void testUpdateSetAndUploadIconFailure ( ) { final org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 0 ) ; model.setSmallIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIcon ( GUIDS [ 2 ] ) ) ; model.setLargeIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIconWithData ( ) ) ; try { verifyModel ( resource.update ( model ) , 0 ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BAD_REQUEST ) ; } }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createDefaultVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setCpuName ( "Intel Conroe" ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.Cluster createDefaultCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DEFAULT_CLUSTER_ID ) ; group.setCpuName ( "Intel Conroe" ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; return group ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > vlanInterfacesForInterface ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingInterface : existingInterfaces ) { if ( nic.getName ( ) . equals ( existingInterface.getBaseInterface ( ) ) ) { result.add ( existingInterface ) ; } } return result ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult nicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { boolean nicActuallyExistsOrReferencesNewBond = isNicActuallyExistsOrReferencesNewBond ( attachment.getNicName ( ) , attachment.getNicId ( ) ) ; if ( nicActuallyExistsOrReferencesNewBond ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getSnapshotDescriptionColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getVmSnapshotDescription ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getSnapshotDescriptionColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getVmSnapshotDescription ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
public static void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; dataCenterGuideModel.clusters = clusters ; dataCenterGuideModel.UpdateOptionsLocalFS ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; dataCenterGuideModel.clusters = clusters ; dataCenterGuideModel.updateOptionsLocalFS ( ) ; }
Source:
public void getMaxNumOfVmSockets ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmSockets ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getMaxNumOfCPUsPerSocket ( 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 ) ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfCpuPerSocket ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; }

Target:
public void postOnSave ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel ) ( getWindow ( ) ) ) ; model.stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; getSearchCommand ( ) . execute ( ) ; } }
Source:
private void VolumeType_SelectedItemChanged ( ) { if ( ( ( getVolumeType ( ) . getSelectedItem ( ) ) == null ) || ( ( getDataCenter ( ) . getSelectedItem ( ) ) == null ) ) { return ; } org.ovirt.engine.core.common.businessentities.VolumeType volumeType = ( ( org.ovirt.engine.core.common.businessentities.VolumeType ) ( getVolumeType ( ) . getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) . getstorage_pool_type ( ) ; updateVolumeFormat ( volumeType , storageType ) ; updateShareable ( volumeType , storageType ) ; }

Target:
private void volumeType_SelectedItemChanged ( ) { if ( ( ( getVolumeType ( ) . getSelectedItem ( ) ) == null ) || ( ( getDataCenter ( ) . getSelectedItem ( ) ) == null ) ) { return ; } org.ovirt.engine.core.common.businessentities.VolumeType volumeType = ( ( org.ovirt.engine.core.common.businessentities.VolumeType ) ( getVolumeType ( ) . getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) . getstorage_pool_type ( ) ; updateVolumeFormat ( volumeType , storageType ) ; updateShareable ( volumeType , storageType ) ; }
Source:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchString , value ) ) ) ) { searchString = value ; SearchStringChanged ( ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }

Target:
public void setLoggedInUser ( org.ovirt.engine.core.common.users.VdcUser value ) { if ( ( loggedInUser ) != value ) { loggedInUser = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "LoggedInUser" ) ) ; } }
Source:
public void testQuotaVdsGroupByQuotaGuidWithGeneralDefaultNoDefault ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaVdsGroup > quotaVdsGroupList = dao.getQuotaVdsGroupByQuotaGuidWithGeneralDefault ( FixturesTool.QUOTA_SPECIFIC ) ; org.junit.Assert.assertNotNull ( quotaVdsGroupList ) ; org.junit.Assert.assertEquals ( "wrong number of quotas returned" , 2 , quotaVdsGroupList.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup group : quotaVdsGroupList ) { org.junit.Assert.assertNotNull ( "VDS ID should not be null in specific mode" , group.getVdsGroupId ( ) ) ; org.junit.Assert.assertNotNull ( "VDS name should not be null in specific mode" , group.getVdsGroupName ( ) ) ; } }

Target:
public void testQuotaClusterByQuotaGuidWithGeneralDefaultNoDefault ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByQuotaGuidWithGeneralDefault ( FixturesTool.QUOTA_SPECIFIC ) ; org.junit.Assert.assertNotNull ( quotaClusterList ) ; org.junit.Assert.assertEquals ( "wrong number of quotas returned" , 2 , quotaClusterList.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.QuotaCluster group : quotaClusterList ) { org.junit.Assert.assertNotNull ( "VDS ID should not be null in specific mode" , group.getClusterId ( ) ) ; org.junit.Assert.assertNotNull ( "VDS name should not be null in specific mode" , group.getClusterName ( ) ) ; } }
Source:
protected void setAppListModel ( org.ovirt.engine.ui.uicommonweb.models.vms.VmAppListModel value ) { }

Target:
protected boolean validateName ( java.lang.String newVmName , org.ovirt.engine.ui.uicommonweb.models.EntityModel entity , org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] validators ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel temp = new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( ) ; temp.setIsValid ( true ) ; temp.setEntity ( newVmName ) ; temp.validateEntity ( validators ) ; if ( ! ( temp.getIsValid ( ) ) ) { entity.setInvalidityReasons ( temp.getInvalidityReasons ( ) ) ; entity.setIsValid ( false ) ; } return temp.getIsValid ( ) ; }
Source:
protected boolean isOsSupportingHotPlug ( ) { java.lang.String vmOs = org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getos ( ) . name ( ) ; java.lang.String [ ] unsupportedOSs = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.HotPlugUnsupportedOsList ) . split ( "," ) ; for ( java.lang.String os : unsupportedOSs ) { if ( os.equalsIgnoreCase ( vmOs ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; return false ; } } return true ; }

Target:
protected void unlockVm ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { org.ovirt.engine.core.bll.VmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing EndAction on Vm" ) ; } }