auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void setAllowChangeHostPlacementPropertiesWhenNotInMaintenance ( ) { org.ovirt.engine.ui.uicompat.UIConstants constants = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) ; getDataCenter ( ) . setChangeProhibitionReason ( constants.dcCanOnlyBeChangedWhenHostInMaintMode ( ) ) ; getDataCenter ( ) . setIsChangable ( false ) ; getCluster ( ) . setChangeProhibitionReason ( constants.clusterCanOnlyBeChangedWhenHostInMaintMode ( ) ) ; getCluster ( ) . setIsChangable ( false ) ; }

Target:
protected void setAllowChangeHostPlacementPropertiesWhenNotInMaintenance ( ) { org.ovirt.engine.ui.uicompat.UIConstants constants = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) ; getDataCenter ( ) . setChangeProhibitionReason ( constants.dcCanOnlyBeChangedWhenHostInMaintMode ( ) ) ; getDataCenter ( ) . setIsChangeable ( false ) ; getCluster ( ) . setChangeProhibitionReason ( constants.clusterCanOnlyBeChangedWhenHostInMaintMode ( ) ) ; getCluster ( ) . setIsChangeable ( false ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { lvNameEditor.setLabel ( constants.logicalVolume ( ) ) ; mountPointEditor.setLabel ( constants.mountPoint ( ) ) ; sizeEditor.setLabel ( constants.lvSize ( ) ) ; raidTypeEditor.setLabel ( constants.raidType ( ) ) ; noOfPhysicalDisksEditor.setLabel ( constants.noOfPhysicalDisksInRaidVolume ( ) ) ; stripeSizeEditor.setLabel ( constants.stripeSize ( ) ) ; deviceHeader.setText ( constants.storageDevices ( ) ) ; deviceSelectionInfo.setText ( constants.getStorageDeviceSelectionInfo ( ) ) ; }

Target:
private void localize ( ) { lvNameEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.logicalVolume ( ) ) ; mountPointEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.mountPoint ( ) ) ; sizeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.lvSize ( ) ) ; raidTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.raidType ( ) ) ; noOfPhysicalDisksEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.noOfPhysicalDisksInRaidVolume ( ) ) ; stripeSizeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.stripeSize ( ) ) ; deviceHeader.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.storageDevices ( ) ) ; deviceSelectionInfo.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.getStorageDeviceSelectionInfo ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVdsStaticDao ( ) ) ; dynamicDao = prepareDAO ( dbFacade.getVdsDynamicDao ( ) ) ; statisticsDao = prepareDAO ( dbFacade.getVdsStatisticsDao ( ) ) ; existingVds = dao.get ( org.ovirt.engine.core.dao.VdsStaticDAOTest.EXISTING_VDS_ID ) ; newStaticVds = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; newStaticVds.sethost_name ( "farkle.redhat.com" ) ; newStaticVds.setvds_group_id ( existingVds.getvds_group_id ( ) ) ; newStaticVds.setSSHKeyFingerprint ( "b5:ad:16:19:06:9f:b3:41:69:eb:1c:42:1d:12:b5:31" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVdsStaticDao ( ) ) ; dynamicDao = prepareDAO ( dbFacade.getVdsDynamicDao ( ) ) ; statisticsDao = prepareDAO ( dbFacade.getVdsStatisticsDao ( ) ) ; existingVds = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; newStaticVds = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; newStaticVds.sethost_name ( "farkle.redhat.com" ) ; newStaticVds.setvds_group_id ( existingVds.getvds_group_id ( ) ) ; newStaticVds.setSSHKeyFingerprint ( "b5:ad:16:19:06:9f:b3:41:69:eb:1c:42:1d:12:b5:31" ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > findGroupsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.util.List < java.lang.String > ids ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( java.util.List < java.lang.String > batch : org.ovirt.engine.core.aaa.SearchQueryParsingUtils.getIdsBatches ( extension , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryGroups ( extension , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , QueryEntity.GROUP ) ) ) ; } return results ; }

Target:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > findGroupsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.util.List < java.lang.String > ids ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( java.util.List < java.lang.String > batch : org.ovirt.engine.core.aaa.SearchQueryParsingUtils.getIdsBatches ( extension.getContext ( ) , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryGroups ( extension , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , QueryEntity.GROUP ) ) ) ; } return results ; }
Source:
private void fillConnectionDetailsIfNeeded ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( ( connection.getid ( ) ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > dbConnections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForConnection ( connection ) ; if ( ! ( dbConnections.isEmpty ( ) ) ) { connection.setid ( dbConnections.get ( 0 ) . getid ( ) ) ; } } }

Target:
private void fillConnectionDetailsIfNeeded ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( ( connection.getid ( ) ) == null ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections dbConnection = org.ovirt.engine.core.bll.storage.ISCSIStorageHelper.findConnectionWithSameDetails ( connection ) ; if ( dbConnection != null ) { connection.setid ( dbConnection.getid ( ) ) ; } } }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; getSearchCommand ( ) . execute ( ) ; }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; setItems ( glusterVolumeEntity.getBricks ( ) ) ; } else { setItems ( null ) ; } updateRemoveBrickActionsAvailability ( ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.common.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.VdsGroupCommandBase.getParameters ( ) . getVdsGroupId ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.bll.VdsGroupCommandBase.getActionType ( ) . getActionGroup ( ) ) ) ; return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.VdsGroupCommandBase.getParameters ( ) . getVdsGroupId ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.bll.VdsGroupCommandBase.getActionType ( ) . getActionGroup ( ) ) ) ; return permissionList ; }
Source:
private void verifyModelSpecific ( org.ovirt.engine.api.model.NetworkFilterParameter model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( NAMES [ index ] , model.getName ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VALUES [ index ] , model.getValue ( ) ) ; assertTrue ( model.isSetNic ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VM_NIC_ID.toString ( ) , model.getNic ( ) . getId ( ) ) ; }

Target:
private void verifyModelSpecific ( org.ovirt.engine.api.model.NetworkFilterParameter model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( NAMES [ index ] , model.getName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VALUES [ index ] , model.getValue ( ) ) ; org.junit.Assert.assertTrue ( model.isSetNic ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VM_NIC_ID.toString ( ) , model.getNic ( ) . getId ( ) ) ; }
Source:
public void testAddHostedEngineStorageFails ( ) { parameters.getStorageDomain ( ) . setStorageName ( StorageConstants.HOSTED_ENGINE_STORAGE_DOMAIN_NAME ) ; org.mockito.Mockito.when ( command.getStorageDomainStaticDAO ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_HOSTED_ENGINE_STORAGE ) ; }

Target:
public void testAddHostedEngineStorageSucceeds ( ) { parameters.getStorageDomain ( ) . setStorageName ( StorageConstants.HOSTED_ENGINE_STORAGE_DOMAIN_NAME ) ; org.mockito.Mockito.when ( command.getStorageDomainStaticDao ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > watchdogs = getWatchdogs ( ) ; if ( watchdogs.isEmpty ( ) ) { return failCanDoAction ( VdcBllMessages.WATCHDOG_NOT_FOUND ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > watchdogs = getWatchdogs ( ) ; if ( watchdogs.isEmpty ( ) ) { return failCanDoAction ( VdcBllMessages.WATCHDOG_NOT_FOUND ) ; } if ( ! ( validate ( getVmWatchdogValidator ( ) . isModelCompatibleWithOs ( ) ) ) ) { return false ; } return true ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.LunDisk disk = ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; setTitle ( ( disk.isShareable ( ) ? constants.shareable ( ) : null ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : null ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session : georepSessions ) { if ( ( ( session.getSlaveVolumeId ( ) ) == null ) || ( ( session.getSlaveNodeUuid ( ) ) == null ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_REMOTE_CLUSTER_NOT_MAINTAINED_BY_ENGINE ) ; } } if ( ( ( snapshots ) == null ) || ( snapshots.isEmpty ( ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NO_SNAPSHOTS_EXIST , getGlusterVolumeName ( ) ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session : georepSessions ) { if ( ( ( session.getSlaveVolumeId ( ) ) == null ) || ( ( session.getSlaveNodeUuid ( ) ) == null ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_REMOTE_CLUSTER_NOT_MAINTAINED_BY_ENGINE ) ; } } if ( ( ( snapshots ) == null ) || ( snapshots.isEmpty ( ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NO_SNAPSHOTS_EXIST , getGlusterVolumeName ( ) ) ; } return true ; }
Source:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.EngineException e ) { log.warn ( ( "Could not perform live snapshot due to error, VM will still be configured to the new created" + " snapshot: {}" ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; updateCallStackFromThrowable ( e ) ; auditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }

Target:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.EngineException e ) { handleVmFailure ( e , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE , ( "Could not perform live snapshot due to error, VM will still be configured to the new created" + " snapshot: {}" ) ) ; }
Source:
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 > ( ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > > aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; 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:
private void addPowerManagementListener ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model ) { model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( ! ( "IsPowerManagementTabSelected" . equals ( propName ) ) ) { return ; } if ( model.getIsPowerManagementTabSelected ( ) ) { getView ( ) . showPowerManagement ( ) ; } } } ) ; }

Target:
private void addPowerManagementListener ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model ) { model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.String propName = args.propertyName ; if ( ! ( "IsPowerManagementTabSelected" . equals ( propName ) ) ) { return ; } if ( model.getIsPowerManagementTabSelected ( ) ) { getView ( ) . showPowerManagement ( ) ; } } } ) ; }
Source:
public void DefaultHost_SelectedItemChanged ( ) { UpdateCdImage ( ) ; }

Target:
public void cluster_SelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; if ( ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateCpuPinningVisibility ( ) ; }
Source:
public void storageDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.HandleFailedStorageDomain , new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( storageDomainId , storagePoolId ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
public void storageDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase parameters = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( storageDomainId , storagePoolId ) ; parameters.setIsInternal ( true ) ; parameters.setInactive ( true ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.DeactivateStorageDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToCluster , org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemoveNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetNetworkById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworkResourceTest.NETWORK_ID } , null , null ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void testCanDoActionVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveMergeSupported ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateStorageDomainAvailableSpace ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( cmd ) ; }

Target:
public void testValidateVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveMergeSupported ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateStorageDomainAvailableSpace ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
public void testNeedToProcessHardwareCapsFalse ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; org.junit.Assert.assertFalse ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }

Target:
public void testNeedToProcessHardwareCapsFalse ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; org.junit.jupiter.api.Assertions.assertFalse ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }
Source:
public void init ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { setDiskImages ( diskImages ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.MoveDiskModel moveDiskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.MoveDiskModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > diskImages = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; moveDiskModel.onInitAllDisks ( diskImages ) ; moveDiskModel.onInitDisks ( ) ; } } ) ) ; }

Target:
public void init ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { setDiskImages ( diskImages ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDiskList ( new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) { @ java.lang.Override public void onSuccess ( java.util.List diskImages ) { onInitAllDisks ( diskImages ) ; onInitDisks ( ) ; } } ) ) ; }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static 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 ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }
Source:
public void canDoActionThinProvisioningSpaceCheckSucceeds ( ) throws java.lang.Exception { final int availableSize = 6 ; final int usedSize = 4 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSpaceValidationSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
private static java.lang.String addSessionToContext ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { java.lang.String sessionId = parameters.getHttpSessionId ( ) ; boolean isAddToContext = true ; if ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) { sessionId = parameters.getSessionId ( ) ; } if ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) { sessionId = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) ; isAddToContext = false ; } if ( ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) ) && isAddToContext ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } return sessionId ; }

Target:
private void initVmPropertiesUtils ( ) { org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils vmPropertiesUtils = org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.getInstance ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.class , vmPropertiesUtils ) ; }
Source:
public boolean add ( T key , boolean allowDuplicate ) { org.ovirt.engine.core.bll.network.macpoolmanager.ObjectCounter.Counter counter = map.get ( key ) ; if ( counter == null ) { map.put ( key , new org.ovirt.engine.core.bll.network.macpoolmanager.ObjectCounter.Counter ( ) ) ; return true ; } else if ( allowDuplicate ) { counter.increment ( ) ; return true ; } else { return false ; } }

Target:
public boolean increase ( T key , boolean allowDuplicate ) { org.ovirt.engine.core.bll.network.macpoolmanager.ObjectCounter.Counter counter = map.get ( key ) ; if ( counter == null ) { map.put ( key , new org.ovirt.engine.core.bll.network.macpoolmanager.ObjectCounter.Counter ( ) ) ; return true ; } else if ( allowDuplicate ) { counter.increase ( ) ; return true ; } else { return false ; } }
Source:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.NetworkView > result = dao.getAllWithQuery ( java.lang.String.format ( "SELECT * FROM network_view where id = '%s'" , FixturesTool.EXISTING_NETWORK_ID ) ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.EXISTING_NETWORK_ID , result.get ( 0 ) . getNetwork ( ) . getId ( ) ) ; }

Target:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.NetworkView > result = dao.getAllWithQuery ( java.lang.String.format ( "SELECT * FROM network_view where id = '%s'" , FixturesTool.NETWORK_ENGINE ) ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.NETWORK_ENGINE , result.get ( 0 ) . getNetwork ( ) . getId ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( getDisk ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST ) ; } buildSharedLockMap ( ) ; return ( ( org.ovirt.engine.core.bll.RemoveDiskCommand.acquireLockInternal ( ) ) && ( validateAllVmsForDiskAreDown ( ) ) ) && ( canRemoveDiskBasedOnStorageTypeCheck ( ) ) ; }

Target:
private java.lang.String getDiskIsBeingRemovedLockMessage ( ) { if ( ( cachedDiskIsBeingRemovedLockMessage ) == null ) { cachedDiskIsBeingRemovedLockMessage = new java.lang.StringBuilder ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_IS_BEING_REMOVED.name ( ) ) . append ( java.lang.String.format ( "$DiskName %1$s" , getDiskAlias ( ) ) ) . toString ( ) ; } return cachedDiskIsBeingRemovedLockMessage ; }
Source:
public org.ovirt.engine.core.common.businessentities.VM getVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = super . getVm ( ) ; if ( vm == null ) { vm = org.ovirt.engine.core.bll.lsm.LiveMigrateDiskCommand.getVmDAO ( ) . getVmsListForDisk ( org.ovirt.engine.core.bll.lsm.LiveMigrateDiskCommand.getImageGroupId ( ) , false ) . get ( 0 ) ; setVm ( vm ) ; setVmId ( vm.getId ( ) ) ; } return vm ; }

Target:
public org.ovirt.engine.core.common.businessentities.VM getVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = super . getVm ( ) ; if ( vm == null ) { vm = org.ovirt.engine.core.bll.lsm.LiveMigrateDiskCommand.getVmDao ( ) . getVmsListForDisk ( org.ovirt.engine.core.bll.lsm.LiveMigrateDiskCommand.getImageGroupId ( ) , false ) . get ( 0 ) ; setVm ( vm ) ; setVmId ( vm.getId ( ) ) ; } return vm ; }
Source:
public void testMoveBySdId ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID } , getEntity ( 1 ) ) ; setUriInfo ( setUpActionExpectations ( ActionType.MoveDisks , org.ovirt.engine.core.common.action.MoveDisksParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } ) ) ; verifyActionResponse ( resource.move ( setUpMoveParams ( false ) ) ) ; }

Target:
public void testMoveBySdId ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID } , getEntity ( 1 ) ) ; setUriInfo ( setUpActionExpectations ( ActionType.MoveDisk , org.ovirt.engine.core.common.action.MoveDisksParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } ) ) ; verifyActionResponse ( resource.move ( setUpMoveParams ( false ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.RemoveQuotaCommand createCommand ( org.ovirt.engine.core.compat.Guid guid ) { org.ovirt.engine.core.common.action.IdParameters param = new org.ovirt.engine.core.common.action.IdParameters ( guid ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveQuotaCommand ( param , null ) ) ; org.mockito.Mockito.doReturn ( quotaDao ) . when ( command ) . getQuotaDao ( ) ; org.mockito.Mockito.doReturn ( quotaManager ) . when ( command ) . getQuotaManager ( ) ; return command ; }

Target:
public void testFailToRemoveDefaultQuota ( ) { quota.setDefault ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_QUOTA_DEFAULT_CANNOT_BE_CHANGED ) ; }
Source:
private void registerIconDefaultsProvider ( ) { final org.ovirt.engine.core.utils.ovf.OvfVmIconDefaultsProvider ovfVmIconDefaultsProvider = new org.ovirt.engine.core.utils.ovf.OvfVmIconDefaultsProvider ( ) { @ java.lang.Override public java.util.Map < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > getVmIconDefaults ( ) { final org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = runInternalQuery ( VdcQueryType.GetVmIconDefaults , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; return queryReturnValue.getReturnValue ( ) ; } } ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.utils.ovf.OvfVmIconDefaultsProvider.class , ovfVmIconDefaultsProvider ) ; }

Target:
private void registerIconDefaultsProvider ( ) { final org.ovirt.engine.core.utils.ovf.OvfVmIconDefaultsProvider ovfVmIconDefaultsProvider = new org.ovirt.engine.core.utils.ovf.OvfVmIconDefaultsProvider ( ) { @ java.lang.Override public java.util.Map < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > getVmIconDefaults ( ) { final org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = runInternalQuery ( VdcQueryType.GetVmIconDefaults , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; return queryReturnValue.getReturnValue ( ) ; } } ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.utils.ovf.OvfVmIconDefaultsProvider.class , ovfVmIconDefaultsProvider ) ; }
Source:
public void put ( org.ovirt.engine.core.compat.Guid stepId , org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.compat.Guid parentCommandId , org.ovirt.engine.core.bll.tasks.SPMAsyncTask task ) { commandMap.put ( stepId , buildGetCommandEntity ( commandId , parentCommandId , task ) ) ; }

Target:
public void put ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.compat.Guid rootCommandId , org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params , org.ovirt.engine.core.compat.CommandStatus status ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = buildCommandEntity ( commandId , rootCommandId , actionType , params , status ) ; commandMap.put ( commandId , cmdEntity ) ; cmdEntityDao.saveOrUpdate ( cmdEntity ) ; }
Source:
public void setspm_status ( org.ovirt.engine.core.common.businessentities.VdsSpmStatus value ) { _spm_status = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "spm_status" ) ) ; }

Target:
public void calculateFreeVirtualMemory ( ) { if ( ( ( ( getmem_commited ( ) ) != null ) && ( ( getphysical_mem_mb ( ) ) != null ) ) && ( ( getreserved_mem ( ) ) != null ) ) { maxSchedulingMemory = ( ( ( getmax_vds_memory_over_commit ( ) ) * ( getphysical_mem_mb ( ) ) ) / 100.0F ) - ( ( getmem_commited ( ) ) + ( getreserved_mem ( ) ) ) ; maxSchedulingMemory = ( ( maxSchedulingMemory ) > 0 ) ? maxSchedulingMemory : 0 ; } }
Source:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.column.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( ! ( isVisible ( value ) ) ) { return ; } com.google.gwt.resources.client.ImageResource image = resources.expanderDownImage ( ) ; com.google.gwt.safehtml.shared.SafeHtml imageHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( image ) . getHTML ( ) ) ; sb.append ( templates.volumeActivityMenu ( imageHtml ) ) ; }

Target:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.cell.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( ! ( isVisible ( value ) ) ) { return ; } com.google.gwt.resources.client.ImageResource image = resources.expanderDownImage ( ) ; com.google.gwt.safehtml.shared.SafeHtml imageHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( image ) . getHTML ( ) ) ; sb.append ( templates.volumeActivityMenu ( imageHtml ) ) ; }
Source:
public void testEmptyListResponse ( ) { java.util.List < org.ovirt.engine.sdk4.types.StorageDomain > storageDomains = storageDomainsService.list ( ) . send ( ) . storageDomain ( ) ; org.junit.Assert.assertNotNull ( storageDomains ) ; org.junit.Assert.assertEquals ( new java.util.ArrayList < org.ovirt.engine.sdk4.types.StorageDomain > ( ) , storageDomains ) ; }

Target:
public void testEmptyListResponse ( ) { java.util.List < org.ovirt.engine.sdk4.types.StorageDomain > storageDomains = storageDomainsService.list ( ) . send ( ) . storageDomains ( ) ; org.junit.Assert.assertNotNull ( storageDomains ) ; org.junit.Assert.assertEquals ( new java.util.ArrayList < org.ovirt.engine.sdk4.types.StorageDomain > ( ) , storageDomains ) ; }
Source:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ; }

Target:
protected boolean validateSnapshotType ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = getSnapshotDao ( ) . get ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getSnapshotId ( ) ) ; return validate ( createSnapshotValidator ( ) . snapshotTypeSupported ( snapshot , java.util.Collections.singletonList ( Snapshot.SnapshotType.REGULAR ) ) ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface otherIface ) { if ( ( iface ) == otherIface ) { return true ; } if ( otherIface == null ) { return false ; } org.apache.commons.lang.builder.EqualsBuilder eb = new org.apache.commons.lang.builder.EqualsBuilder ( ) ; eb.append ( iface.getName ( ) , otherIface.getName ( ) ) ; eb.append ( iface.getAddress ( ) , otherIface.getAddress ( ) ) ; return eb.isEquals ( ) ; }

Target:
public boolean test ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface otherIface ) { if ( ( iface ) == otherIface ) { return true ; } if ( otherIface == null ) { return false ; } org.apache.commons.lang.builder.EqualsBuilder eb = new org.apache.commons.lang.builder.EqualsBuilder ( ) ; eb.append ( iface.getName ( ) , otherIface.getName ( ) ) ; eb.append ( iface.getAddress ( ) , otherIface.getAddress ( ) ) ; return eb.isEquals ( ) ; }
Source:
public java.util.concurrent.Future < java.lang.Void > close ( ) { final java.util.concurrent.FutureTask < java.lang.Void > t = new java.util.concurrent.FutureTask < > ( new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) { closeChannel ( ) ; return null ; } } ) ; reactor.queueFuture ( t ) ; return t ; }

Target:
public java.util.concurrent.Future < java.lang.Void > close ( ) { final java.util.concurrent.Callable < java.lang.Void > callable = new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) { closeChannel ( ) ; return null ; } } ; return scheduleTask ( callable ) ; }
Source:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; }

Target:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDisplayTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initNicHotplugSupportMap ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDiskHotpluggableInterfacesMap ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setMaxHosts ( int maxHosts ) { return null ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc resizeStorageDomainPV ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.resizePV" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "guid" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "size" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc ( response ) ; }
Source:
protected boolean isVmInUpPausedDownStatus ( ) { if ( ( ( ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) && ( ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ) && ( ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL , org.ovirt.engine.core.bll.validator.LocalizedVmStatus.from ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getStatus ( ) ) ) ; } return true ; }

Target:
protected boolean isVmInUpPausedDownStatus ( ) { if ( ( ( ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) && ( ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ) && ( ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { return org.ovirt.engine.core.bll.AbstractDiskVmCommand.failVmStatusIllegal ( ) ; } return true ; }
Source:
public void validateSucceedsWhenGlusterServerHasPeersThatExistInDB ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }

Target:
public void validateSucceedsWhenGlusterServerHasPeersThatExistInDB ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setEnumTitle ( object.getVmEntityType ( ) ) ; if ( ( object.getVmEntityType ( ) ) == null ) { setTitle ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.constants.unattachedDisk ( ) ) ; return null ; } return object.getVmEntityType ( ) . isVmType ( ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.vmsImage ( ) : object.getVmEntityType ( ) . isTemplateType ( ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.templatesImage ( ) : null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( ( object.getVmEntityType ( ) ) == null ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.constants.unattachedDisk ( ) ) ; } else { java.lang.String status = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) . translate ( object.getVmEntityType ( ) ) ; return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( status ) ; } }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaModel object ) { this . model = object ; if ( ! ( firstTime ) ) { registerHandlers ( ) ; firstTime = true ; } quotaClusterTable.edit ( object.getQuotaClusters ( ) ) ; quotaStorageTable.edit ( object.getQuotaStorages ( ) ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.quota.QuotaPopupView.Driver.driver.edit ( object ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaModel object ) { this . model = object ; if ( ! ( firstTime ) ) { registerHandlers ( ) ; firstTime = true ; updateSliders ( ) ; } quotaClusterTable.edit ( object.getQuotaClusters ( ) ) ; quotaStorageTable.edit ( object.getQuotaStorages ( ) ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.quota.QuotaPopupView.Driver.driver.edit ( object ) ; }