auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.bll.ValidationResult isLunDiskVisible ( final org.ovirt.engine.core.common.businessentities.LUNs lun , org.ovirt.engine.core.common.businessentities.VDS vds ) { java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > luns = executeGetDeviceList ( vds.getId ( ) , lun.getLunType ( ) ) ; boolean lunExists = org.apache.commons.collections.CollectionUtils.exists ( luns , new org.apache.commons.collections.Predicate ( ) { @ java.lang.Override public boolean evaluate ( java.lang.Object o ) { return ( ( org.ovirt.engine.core.common.businessentities.LUNs ) ( o ) ) . getId ( ) . equals ( lun.getId ( ) ) ; } } ) ; return lunExists ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_INVALID ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isLunDiskVisible ( final org.ovirt.engine.core.common.businessentities.storage.LUNs lun , org.ovirt.engine.core.common.businessentities.VDS vds ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = executeGetDeviceList ( vds.getId ( ) , lun.getLunType ( ) ) ; boolean lunExists = org.apache.commons.collections.CollectionUtils.exists ( luns , new org.apache.commons.collections.Predicate ( ) { @ java.lang.Override public boolean evaluate ( java.lang.Object o ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.LUNs ) ( o ) ) . getId ( ) . equals ( lun.getId ( ) ) ; } } ) ; return lunExists ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_INVALID ) ; }
Source:
private void UpdateHasSelectedTags ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > selectedTags = ( ( getTagList ( ) . getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > cast ( getTagList ( ) . getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( ) ; setHasSelectedTags ( ( ( ( getSelectedItem ( ) ) != null ) && ( ( selectedTags.size ( ) ) > 0 ) ) ) ; }

Target:
private void updateHasSelectedTags ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > selectedTags = ( ( getTagList ( ) . getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > cast ( getTagList ( ) . getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( ) ; setHasSelectedTags ( ( ( ( getSelectedItem ( ) ) != null ) && ( ( selectedTags.size ( ) ) > 0 ) ) ) ; }
Source:
public boolean isApplicable ( org.ovirt.engine.core.common.businessentities.VDSGroup oldCluster , org.ovirt.engine.core.common.businessentities.VDSGroup newCluster ) { newCpuName = newCluster.getCpuName ( ) ; final java.lang.String oldCpuName = oldCluster.getCpuName ( ) ; return ( ( newCpuName ) != null ) && ( ! ( newCpuName.equals ( oldCpuName ) ) ) ; }

Target:
public boolean isApplicable ( org.ovirt.engine.core.common.businessentities.Cluster oldCluster , org.ovirt.engine.core.common.businessentities.Cluster newCluster ) { newCpuName = newCluster.getCpuName ( ) ; final java.lang.String oldCpuName = oldCluster.getCpuName ( ) ; return ( ( newCpuName ) != null ) && ( ! ( newCpuName.equals ( oldCpuName ) ) ) ; }
Source:
public org.ovirt.engine.api.model.Disks list ( ) { boolean unregistered = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendStorageDomainDisksResource.UNREGISTERED_CONSTRAINT_PARAMETER , true , false ) ; if ( unregistered ) { return mapCollection ( getBackendCollection ( VdcQueryType.GetUnregisteredDisks , new org.ovirt.engine.core.common.queries.GetUnregisteredDisksQueryParameters ( storageDomainId , getStoragePoolIdForDomain ( storageDomainId ) ) ) ) ; } else { return mapCollection ( getBackendCollection ( VdcQueryType.GetAllDisksByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( this . storageDomainId ) ) ) ; } }

Target:
public org.ovirt.engine.api.model.Disks list ( ) { boolean unregistered = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendStorageDomainDisksResource.UNREGISTERED_CONSTRAINT_PARAMETER , true , false ) ; if ( unregistered ) { return mapCollection ( getBackendCollection ( VdcQueryType.GetUnregisteredDisks , new org.ovirt.engine.core.common.queries.GetUnregisteredDisksQueryParameters ( storageDomainId , getStoragePoolIdForDomain ( storageDomainId ) ) ) ) ; } else { return mapCollection ( getBackendCollection ( VdcQueryType.GetAllDisksByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( this . storageDomainId ) ) ) ; } }
Source:
private void mockOsRepository ( ) { org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; org.mockito.Mockito.when ( osRepository.get64bitOss ( ) ) . thenReturn ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS ) ) ; final java.util.Map < java.lang.Integer , org.ovirt.engine.core.common.businessentities.ArchitectureType > osArchitectures = new java.util.HashMap < java.lang.Integer , org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { { put ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS , ArchitectureType.x86_64 ) ; } } ; org.mockito.Mockito.when ( osRepository.getOsArchitectures ( ) ) . thenReturn ( java.util.Collections.unmodifiableMap ( osArchitectures ) ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; }

Target:
private void mockOsRepository ( ) { org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; org.mockito.Mockito.when ( osRepository.get64bitOss ( ) ) . thenReturn ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS ) ) ; final java.util.Map < java.lang.Integer , org.ovirt.engine.core.common.businessentities.ArchitectureType > osArchitectures = java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS , ArchitectureType.x86_64 ) ; org.mockito.Mockito.when ( osRepository.getOsArchitectures ( ) ) . thenReturn ( java.util.Collections.unmodifiableMap ( osArchitectures ) ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; }
Source:
private void initInfoIcons ( org.ovirt.engine.ui.webadmin.ApplicationResources resources , org.ovirt.engine.ui.webadmin.ApplicationConstants constants , org.ovirt.engine.ui.webadmin.ApplicationTemplates templates ) { memoryOptimizationInfo = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicFixedWidth ( "465px" , constants.clusterPopupMemoryOptimizationInfo ( ) ) , resources ) ; cpuThreadsInfo = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicFixedWidth ( "600px" , constants.clusterPopupCpuThreadsInfo ( ) ) , resources ) ; }

Target:
private void initInfoIcons ( org.ovirt.engine.ui.webadmin.ApplicationResources resources , org.ovirt.engine.ui.webadmin.ApplicationConstants constants , org.ovirt.engine.ui.webadmin.ApplicationTemplates templates ) { memoryOptimizationInfo = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicFixedWidth ( "465px" , constants.clusterPopupMemoryOptimizationInfo ( ) ) , resources ) ; cpuThreadsInfo = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicFixedWidth ( "600px" , constants.clusterPopupCpuThreadsInfo ( ) ) , resources ) ; schedulerOptimizationInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( com.google.gwt.safehtml.shared.SafeHtmlUtils.EMPTY_SAFE_HTML , resources ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.equals ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getDataCenter ( ) ) ) ) { DataCenter_SelectedItemChanged ( ) ; } else if ( ( ev.equals ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getCluster ( ) ) ) ) { Cluster_SelectedItemChanged ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getDataCenter ( ) ) ) ) { DataCenter_SelectedItemChanged ( ) ; } else if ( ( ev.matchesDefinition ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getCluster ( ) ) ) ) { Cluster_SelectedItemChanged ( ) ; } else if ( sender == ( getConsoleAddressEnabled ( ) ) ) { consoleAddressChanged ( ) ; } }
Source:
private void doTestValidateModifiedBondSlaves ( org.ovirt.engine.core.common.businessentities.network.Bond bond , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > networkBusinessEntityMap , org.ovirt.engine.core.bll.ValidationResult interfaceExistValidationResult , org.ovirt.engine.core.bll.ValidationResult interfaceIsValidSlaveValidationResult , boolean expectedValidationResult , org.ovirt.engine.core.common.errors.VdcBllMessages expectedViolation ) { doTestValidateModifiedBondSlaves ( bond , new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) , networkBusinessEntityMap , existingInterfaces , interfaceExistValidationResult , interfaceIsValidSlaveValidationResult , expectedValidationResult , expectedViolation ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder setExistingInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces ) { this . existingInterfaces = existingInterfaces ; return this ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVlanNic ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , java.lang.String nicName , java.lang.Integer vlanId ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingNic = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; existingNic.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; existingNic.setName ( nicName ) ; existingNic.setVlanId ( vlanId ) ; existingNic.setBaseInterface ( baseNic.getName ( ) ) ; return existingNic ; }

Target:
private org.ovirt.engine.core.common.action.CreateOrUpdateBond createNewCreateOrUpdateBondWithNameAndId ( ) { return createNewCreateOrUpdateBond ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "bond1" ) ; }
Source:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( null ) ) ) ; setUpMocksForRemove ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( null ) ) ) ; setUpMocksForRemove ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }
Source:
private static boolean isDiskProfilePermitted ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile diskProfile , java.util.Set < org.ovirt.engine.core.compat.Guid > permittedDiskProfilesIds , org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { return ( ( user == null ) || ( permittedDiskProfilesIds.contains ( diskProfile.getId ( ) ) ) ) || ( ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.getPermissionDao ( ) . getEntityPermissions ( user.getId ( ) , ActionGroup.ATTACH_DISK_PROFILE , diskProfile.getId ( ) , VdcObjectType.DiskProfile ) ) != null ) ; }

Target:
private boolean isDiskProfilePermitted ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile diskProfile , java.util.Set < org.ovirt.engine.core.compat.Guid > permittedDiskProfilesIds , org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { return ( ( user == null ) || ( permittedDiskProfilesIds.contains ( diskProfile.getId ( ) ) ) ) || ( ( permissionDao.getEntityPermissions ( user.getId ( ) , ActionGroup.ATTACH_DISK_PROFILE , diskProfile.getId ( ) , VdcObjectType.DiskProfile ) ) != null ) ; }
Source:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.SearchParameters params = new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , ( doRefresh ? params : params.withoutRefresh ( ) ) , aQuery ) ; }
Source:
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 ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.VAR_NETWORK_ATTACHMENT_NOT_EXISTS_ENTITY , networkAttachmentId.toString ( ) ) ) ; }

Target:
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 ) ; }
Source:
public void poll ( ) { if ( vdsManager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = getVmsFetcher ( ) ; long fetchTime = java.lang.System.nanoTime ( ) ; if ( fetcher.fetch ( ) ) { getVmsMonitoring ( fetcher , fetchTime ) . perform ( ) ; } else { org.ovirt.engine.core.vdsbroker.PollVmStatsRefresher.log.info ( "Failed to fetch vms info for host '{}' - skipping VMs monitoring." , vdsManager.getVdsName ( ) ) ; } } }

Target:
public void poll ( ) { if ( vdsManager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = getVmsFetcher ( ) ; long fetchTime = java.lang.System.nanoTime ( ) ; if ( fetcher.fetch ( ) ) { getVmsMonitoring ( fetcher , fetchTime ) . perform ( ) ; processDevices ( fetcher.getVdsmVms ( ) . stream ( ) . map ( VmInternalData :: getVmDynamic ) , fetchTime ) ; } else { org.ovirt.engine.core.vdsbroker.PollVmStatsRefresher.log.info ( "Failed to fetch vms info for host '{}' - skipping VMs monitoring." , vdsManager.getVdsName ( ) ) ; } } }
Source:
private void updateOptions ( ) { getCompulsoryActions ( ) . clear ( ) ; getOptionalActions ( ) . clear ( ) ; if ( ( getEntity ( ) ) != null ) { startProgress ( null ) ; if ( ( getEntity ( ) . getStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) { updateOptionsNonLocalFSData ( ) ; } else { updateOptionsLocalFSData ( ) ; } } }

Target:
private void updateOptions ( ) { getCompulsoryActions ( ) . clear ( ) ; getOptionalActions ( ) . clear ( ) ; if ( ( getEntity ( ) ) != null ) { startProgress ( null ) ; if ( ! ( getEntity ( ) . isLocal ( ) ) ) { updateOptionsNonLocalFSData ( ) ; } else { updateOptionsLocalFSData ( ) ; } } }
Source:
public void testGetAllStorageDomainsByImageId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllStorageDomainsByImageId ( FixturesTool.TEMPLATE_IMAGE_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOAMIN_SCALE_SD5 , result.get ( 0 ) . getId ( ) ) ; }

Target:
public void testGetAllStorageDomainsByImageId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllStorageDomainsByImageId ( FixturesTool.TEMPLATE_IMAGE_ID ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOAMIN_SCALE_SD5 , domain.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 8 , domain.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 4 , domain.getActualImagesSize ( ) ) ; }
Source:
public static void flatGroups ( org.ovirt.engine.api.extensions.ExtMap principal ) { principal.put ( PrincipalRecord.GROUPS , org.ovirt.engine.core.bll.aaa.DirectoryUtils.flatGroups ( principal , PrincipalRecord.GROUPS , new java.util.ArrayList < org.ovirt.engine.api.extensions.ExtMap > ( ) ) ) ; }

Target:
public static void flatGroups ( org.ovirt.engine.api.extensions.ExtMap principal ) { java.util.Map < java.lang.String , org.ovirt.engine.api.extensions.ExtMap > accumulator = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.bll.aaa.DirectoryUtils.flatGroups ( principal , PrincipalRecord.GROUPS , accumulator ) ; principal.put ( PrincipalRecord.GROUPS , new java.util.ArrayList ( accumulator.values ( ) ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , "name" ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( dataCenterId , entity ) ; if ( network.isSetProfileRequired ( ) ) { parameters.setVnicProfileRequired ( network.isProfileRequired ( ) ) ; } return performCreate ( VdcActionType.AddNetwork , parameters , new org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworksResource.AddedNetworkResolver ( ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; org.ovirt.engine.api.model.DataCenter dataCenter = new org.ovirt.engine.api.model.DataCenter ( ) ; dataCenter.setId ( dataCenterId.toString ( ) ) ; network.setDataCenter ( dataCenter ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getAddParameters ( network , entity ) ; return performCreate ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel object ) { setPanel ( object ) ; object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { setPanel ( object ) ; } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel object ) { setPanel ( object ) ; if ( ( object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . getListeners ( ) . size ( ) ) == 0 ) { object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { setPanel ( object ) ; } } ) ; } }
Source:
public void testRemoveStorageDomainNull ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( uriInfo ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveStorageDomainNull ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( uriInfo ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public static void GetVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }

Target:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
private void runQueryByIdParameter ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.AsIsAsyncConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( queryType , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void stats ( ) { long now = new java.util.Date ( ) . getTime ( ) ; if ( now > ( nextStats ) ) { nextStats = now + ( statsTTL ) ; for ( org.ovirt.engineextensions.aaa.ldap.Framework.ConnectionPoolEntry entry : connectionPools.values ( ) ) { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "Stats: {}" , entry.name , entry.connectionPool.getConnectionPoolStatistics ( ) ) ; } } }

Target:
public void stats ( ) { if ( org.ovirt.engineextensions.aaa.ldap.Framework.log.isDebugEnabled ( ) ) { long now = new java.util.Date ( ) . getTime ( ) ; if ( now > ( nextStats ) ) { nextStats = now + ( statsTTL ) ; for ( org.ovirt.engineextensions.aaa.ldap.Framework.ConnectionPoolEntry entry : connectionPools.values ( ) ) { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "Stats: {}" , entry.name , entry.connectionPool.getConnectionPoolStatistics ( ) ) ; } } } }
Source:
public void toByteArrayAllNoll ( ) { final byte [ ] allNullArray = org.ovirt.engine.core.utils.GuidUtils.ToByteArray ( java.util.UUID.fromString ( "00000000-0000-0000-0000-000000000000" ) ) ; org.junit.Assert.assertNotNull ( allNullArray ) ; for ( int i = 0 ; i < 16 ; i ++ ) { org.junit.Assert.assertEquals ( 0 , allNullArray [ i ] ) ; } }

Target:
public void toByteArrayAllNoll ( ) { final byte [ ] allNullArray = org.ovirt.engine.core.utils.GuidUtils.toByteArray ( java.util.UUID.fromString ( "00000000-0000-0000-0000-000000000000" ) ) ; org.junit.Assert.assertNotNull ( allNullArray ) ; for ( int i = 0 ; i < 16 ; i ++ ) { org.junit.Assert.assertEquals ( 0 , allNullArray [ i ] ) ; } }
Source:
protected void executeCommand ( ) { completeGenerationInfo ( ) ; org.ovirt.engine.core.bll.storage.utils.VdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.CopyVolumeData , new org.ovirt.engine.core.common.vdscommands.CopyVolumeDataVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getSrcInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . isCollapse ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { completeGenerationInfo ( ) ; vdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.CopyVolumeData , new org.ovirt.engine.core.common.vdscommands.CopyVolumeDataVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getSrcInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . isCollapse ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.setSucceeded ( true ) ; }
Source:
public void testChangeDiskProfileForDisk ( ) { org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.junit.Assert.assertThat ( "Same source and dest disk profile id, cannot perform test" , image_storage_domain_map.getDiskProfileId ( ) , org.hamcrest.CoreMatchers.not ( org.hamcrest.CoreMatchers.equalTo ( FixturesTool.DISK_PROFILE_2 ) ) ) ; dao.updateDiskProfileByImageGroupIdAndStorageDomainId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DISK_ID , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID , FixturesTool.DISK_PROFILE_2 ) ; image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "disk profile wasn't changed" , image_storage_domain_map.getDiskProfileId ( ) , FixturesTool.DISK_PROFILE_2 ) ; }

Target:
public void testChangeDiskProfileForDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.junit.Assert.assertThat ( "Same source and dest disk profile id, cannot perform test" , image_storage_domain_map.getDiskProfileId ( ) , org.hamcrest.CoreMatchers.not ( org.hamcrest.CoreMatchers.equalTo ( FixturesTool.DISK_PROFILE_2 ) ) ) ; dao.updateDiskProfileByImageGroupIdAndStorageDomainId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DISK_ID , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID , FixturesTool.DISK_PROFILE_2 ) ; image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "disk profile wasn't changed" , image_storage_domain_map.getDiskProfileId ( ) , FixturesTool.DISK_PROFILE_2 ) ; }
Source:
public void prepareConnectHostToStoragePoolServers ( org.ovirt.engine.core.common.action.ConnectHostToStoragePoolServersParameters parameters , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > res = org.ovirt.engine.core.bll.storage.ISCSIStorageHelper.updateIfaces ( connections , parameters.getVds ( ) . getId ( ) ) ; connections.clear ( ) ; connections.addAll ( res ) ; }

Target:
private void prepareStorageServer ( org.ovirt.engine.core.common.action.HostStoragePoolParametersBase parameters , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > res = org.ovirt.engine.core.bll.storage.ISCSIStorageHelper.updateIfaces ( connections , parameters.getVds ( ) . getId ( ) ) ; connections.clear ( ) ; connections.addAll ( res ) ; }
Source:
public static void getStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getVmChangedFieldsForNextRun ( org.ovirt.engine.core.common.businessentities.VM original , org.ovirt.engine.core.common.businessentities.VM updated , org.ovirt.engine.core.common.action.VmManagementParametersBase updateVmParameters , org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmChangedFieldsForNextRun , new org.ovirt.engine.core.common.queries.GetVmChangedFieldsForNextRunParameters ( original , updated , updateVmParameters ) , aQuery ) ; }
Source:
private org.ovirt.engine.api.model.Network getNetworkById ( java.lang.String networkId , java.lang.String clusterId ) { for ( org.ovirt.engine.api.model.Network network : getNetworks ( clusterId ) ) { if ( network.getId ( ) . toString ( ) . equals ( networkId ) ) { return network ; } } return null ; }

Target:
private org.ovirt.engine.api.model.Network getNetworkById ( java.lang.String networkId , java.util.List < org.ovirt.engine.api.model.Network > networks ) { for ( org.ovirt.engine.api.model.Network network : networks ) { if ( network.getId ( ) . toString ( ) . equals ( networkId ) ) { return network ; } } return null ; }
Source:
protected void initUser ( ) { org.ovirt.engine.core.common.businessentities.DbUser user = org.ovirt.engine.core.bll.VmPoolUserCommandBase.getDbUser ( ) ; if ( ( user != null ) && ( ( user.getId ( ) ) == null ) ) { user.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.VmPoolUserCommandBase.getDbUserDAO ( ) . save ( user ) ; } }

Target:
protected void initUser ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.ovirt.engine.core.bll.VmPoolUserCommandBase.getDbUser ( ) ; if ( ( user != null ) && ( ( user.getId ( ) ) == null ) ) { user.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.VmPoolUserCommandBase.getDbUserDAO ( ) . save ( user ) ; } }
Source:
public void getoVirtISOsList ( 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 < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getDefaultSpmPriority ( 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 ) ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }
Source:
public void saveOrUpdate ( org.ovirt.engine.core.common.businessentities.AsyncTasks task ) { org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.AsyncTaskParameterSource parameterSource = getTaskParameterSource ( task ) ; parameterSource.addValue ( "started_at" , task.getStartTime ( ) ) ; parameterSource.addValue ( "storage_pool_id" , task.getStoragePoolId ( ) ) ; parameterSource.addValue ( "async_task_type" , task.getTaskType ( ) ) ; getCallsHandler ( ) . executeModification ( "InsertOrUpdateAsyncTasks" , parameterSource ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.AsyncTask task ) { org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.AsyncTaskParameterSource parameterSource = getTaskParameterSource ( task ) ; parameterSource.addValue ( "started_at" , task.getStartTime ( ) ) ; parameterSource.addValue ( "storage_pool_id" , task.getStoragePoolId ( ) ) ; parameterSource.addValue ( "async_task_type" , task.getTaskType ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertasync_tasks" , parameterSource ) ; }
Source:
private void saveOriginalNetworkParameters ( ) { if ( ( originalNetParams ) == null ) { originalNetParams = new org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkParameters ( ) ; } originalNetParams.setBootProtocol ( getBootProtocol ( ) ) ; originalNetParams.setAddress ( ( ( java.lang.String ) ( getAddress ( ) . getEntity ( ) ) ) ) ; originalNetParams.setSubnet ( ( ( java.lang.String ) ( getSubnet ( ) . getEntity ( ) ) ) ) ; originalNetParams.setGateway ( ( ( java.lang.String ) ( getGateway ( ) . getEntity ( ) ) ) ) ; }

Target:
public void setOriginalNetParams ( org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkParameters originalNetParams ) { this . originalNetParams = originalNetParams ; }
Source:
private boolean setUpPasswordlessSSHAndCreateSession ( ) { java.util.List < java.lang.String > pubKeys = readPubKey ( ) ; boolean canProceed = ( pubKeys != null ) && ( ( pubKeys.size ( ) ) > 0 ) ; if ( canProceed ) { canProceed = updatePubKeysToRemoteHosts ( pubKeys ) ; if ( canProceed ) { canProceed = createGeoRepSession ( ) ; } } return canProceed ; }

Target:
protected boolean setUpPasswordlessSSH ( org.ovirt.engine.core.compat.Guid masterUpServerId , java.util.Set < org.ovirt.engine.core.compat.Guid > remoteServerSet , java.lang.String userName ) { java.util.List < java.lang.String > pubKeys = readPubKey ( masterUpServerId ) ; boolean canProceed = ( pubKeys != null ) && ( ( pubKeys.size ( ) ) > 0 ) ; if ( canProceed ) { canProceed = updatePubKeysToRemoteHosts ( pubKeys , remoteServerSet , userName ) ; } return canProceed ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StartRebalanceGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeRebalanceVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isFixLayoutOnly ( ) , getParameters ( ) . isForceAction ( ) ) ) ; if ( getSucceeded ( ) ) { setSucceeded ( returnValue.getSucceeded ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_REBALANCE_START_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StartRebalanceGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeRebalanceVDSParameters ( upServer.getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isFixLayoutOnly ( ) , getParameters ( ) . isForceAction ( ) ) ) ; if ( getSucceeded ( ) ) { setSucceeded ( returnValue.getSucceeded ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_REBALANCE_START_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }
Source:
protected void executeCommand ( ) { getNetwork ( ) . setLabel ( null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.network.dc.UnlabelNetworkCommand.getBackend ( ) . runAction ( VdcActionType.UpdateNetwork , new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( getNetwork ( ) . getDataCenterId ( ) , getNetwork ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { getNetwork ( ) . setLabel ( null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( VdcActionType.UpdateNetwork , new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( getNetwork ( ) . getDataCenterId ( ) , getNetwork ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
public void upgrade ( ) { final org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItem ( ) ; if ( ( host.getVdsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) ) { upgradeOvirtNode ( host ) ; } else { upgradeHost ( host ) ; } }

Target:
public void upgrade ( ) { final org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItem ( ) ; org.ovirt.engine.ui.uicommonweb.models.Model model = org.ovirt.engine.ui.uicommonweb.models.hosts.HostGeneralModel.createUpgradeModel ( host ) ; setWindow ( model ) ; model.initialize ( ) ; model.getCommands ( ) . add ( org.ovirt.engine.ui.uicommonweb.UICommand.createCancelUiCommand ( "Cancel" , this ) ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > parseLUNList ( java.util.Map < java.lang.String , java.lang.Object > [ ] lunList ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( lunList.length ) ; for ( java.util.Map < java.lang.String , java.lang.Object > xlun : lunList ) { result.add ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun ) ) ; } return result ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > parseLUNList ( java.util.Map < java.lang.String , java.lang.Object > [ ] lunList ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( lunList.length ) ; for ( java.util.Map < java.lang.String , java.lang.Object > xlun : lunList ) { result.add ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun ) ) ; } return result ; }
Source:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.AddTag ( tag ) ; tag.settag_name ( "new name" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.tags fromDirector = tagsDirector.GetTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( tag.gettag_name ( ) , fromDirector.gettag_name ( ) ) ; }

Target:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.AddTag ( tag ) ; tag.settag_name ( "new name" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags fromDirector = tagsDirector.GetTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( tag.gettag_name ( ) , fromDirector.gettag_name ( ) ) ; }
Source:
protected boolean isQuotaDependant ( ) { return ( getActionType ( ) . getQuotaDependency ( ) ) != ( VdcActionType.QuotaDependency.NONE ) ; }

Target:
protected boolean isQuotaDependant ( ) { boolean result ; if ( ( getActionType ( ) . getQuotaDependency ( ) ) == ( VdcActionType.QuotaDependency.NONE ) ) result = false ; else if ( ! ( org.ovirt.engine.core.bll.CommandBase.isInternalExecution ( ) ) ) result = true ; else if ( getActionType ( ) . isQuotaDependentAsInternalCommand ( ) ) result = true ; else result = false ; return result ; }
Source:
public org.ovirt.engine.core.common.businessentities.tags_vm_map mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.tags_vm_map entity = new org.ovirt.engine.core.common.businessentities.tags_vm_map ( ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "tag_id" ) ) ) ; entity.setvm_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "vm_id" ) ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "tag_id" ) ) ) ; entity.setvm_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "vm_id" ) ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }
Source:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }