auphong2707/dl4se-code-review-dataset huggingface dataset:
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 ( org.ovirt.engine.ui.uicommonweb.models.EntityModel.EntityChangedEventDefinition ) ) { OnEntityChanged ( ) ; } else if ( ev.equals ( ProvidePropertyChangedEvent.Definition ) ) { EntityPropertyChanged ( sender , ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) ) ; } }

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 ( org.ovirt.engine.ui.uicommonweb.models.EntityModel.EntityChangedEventDefinition ) ) { OnEntityChanged ( ) ; } else if ( ev.matchesDefinition ( ProvidePropertyChangedEvent.Definition ) ) { EntityPropertyChanged ( sender , ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ) ; } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.NIC model = new org.ovirt.engine.api.model.NIC ( ) ; model.setName ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "NIC" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Nic model = new org.ovirt.engine.api.model.Nic ( ) ; model.setName ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Nic" , "add" , "name" ) ; } }
Source:
public static void getMaximalVmMemSize32OS ( 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 ( ) : 20480 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
private boolean changesAreClusterCompatible ( ) { if ( ! ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; return false ; } } return true ; }

Target:
private boolean logicalNetworkExists ( ) { if ( ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getPersistedNetwork ( ) ) != null ) { return true ; } addCanDoActionMessage ( EngineMessage.NETWORK_NOT_EXISTS ) ; return false ; }
Source:
public void testCleanNotExpiredUsersSessionsWithUsers ( ) { org.ovirt.engine.core.dao.DbUserDAO dbUserDAOMcok = initDataForClearTest ( "VdcUser" ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNotNull ( "Get should return the value since the session was not removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , "VdcUser" ) ) ; org.junit.Assert.assertNotNull ( "Get should return the value since the session was not removed" , container.getUser ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ) ; org.mockito.Mockito.verifyZeroInteractions ( dbUserDAOMcok ) ; }

Target:
public void testCleanExpiredUsersSessionsNoUsers ( ) { org.ovirt.engine.core.dao.DbUserDAO dbUserDAOMcok = initDataForClearTest ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNull ( "Get should return null since the session was removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.mockito.Mockito.verifyZeroInteractions ( dbUserDAOMcok ) ; }
Source:
public static void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.WatchDog model , org.ovirt.engine.core.common.businessentities.VmWatchdog entity ) { org.ovirt.engine.core.common.action.WatchdogParameters params = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; params.setModel ( org.ovirt.engine.core.common.businessentities.VmWatchdogType.getByName ( model.getModel ( ) ) ) ; params.setAction ( org.ovirt.engine.core.common.businessentities.VmWatchdogAction.getByName ( model.getAction ( ) ) ) ; params.setId ( GUIDS [ 1 ] ) ; params.setVm ( true ) ; return params ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.WatchDog model , org.ovirt.engine.core.common.businessentities.VmWatchdog entity ) { org.ovirt.engine.core.common.action.WatchdogParameters params = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; params.setModel ( org.ovirt.engine.core.common.businessentities.VmWatchdogType.getByName ( model.getModel ( ) ) ) ; params.setAction ( org.ovirt.engine.core.common.businessentities.VmWatchdogAction.getByName ( model.getAction ( ) ) ) ; params.setId ( org.ovirt.engine.api.restapi.resource.BackendWatchdogResourceTest.VM_ID ) ; params.setVm ( true ) ; return params ; }
Source:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getId ( ) ) ; UpdateVmTemplate ( ) ; updateWatchdog ( ) ; checkTrustedService ( ) ; org.ovirt.engine.core.bll.UpdateVmTemplateCommand.setSucceeded ( true ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VmHandler.warnMemorySizeLegal ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; if ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getId ( ) ) ; UpdateVmTemplate ( ) ; updateWatchdog ( ) ; checkTrustedService ( ) ; org.ovirt.engine.core.bll.UpdateVmTemplateCommand.setSucceeded ( true ) ; } }
Source:
private void start ( ) { if ( ( getSelectedItems ( ) ) == null ) { return ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeActionParameters ( volume.getId ( ) , false ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartGlusterVolume , list ) ; }

Target:
private void onStartVolume ( java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartGlusterVolume , parameters , null , true , true ) ; }
Source:
private static void setSnapshotForShareableDisk ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshots ) { if ( ( ! ( snapshots.isEmpty ( ) ) ) && ( snapshots.get ( 0 ) . isShareable ( ) ) ) { org.ovirt.engine.core.common.businessentities.DiskImage sharedDisk = snapshots.get ( 0 ) ; snapshots.clear ( ) ; snapshots.add ( sharedDisk ) ; } }

Target:
private static void setSnapshotForShareableDisk ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > snapshots ) { if ( ( ! ( snapshots.isEmpty ( ) ) ) && ( snapshots.get ( 0 ) . isShareable ( ) ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage sharedDisk = snapshots.get ( 0 ) ; snapshots.clear ( ) ; snapshots.add ( sharedDisk ) ; } }
Source:
public void onLogout ( ) { org.ovirt.engine.ui.frontend.AsyncQuery query = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; query.setHandleFailure ( true ) ; query.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { Window.Location.reload ( ) ; } } ; frontend.logoffAsync ( frontend.getLoggedInUser ( ) , query ) ; }

Target:
public void onLogout ( ) { org.ovirt.engine.ui.frontend.AsyncQuery query = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; query.setHandleFailure ( true ) ; query.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { Window.Location.assign ( ( ( com.google.gwt.core.client.GWT.getModuleBaseURL ( ) ) + "sso/logout" ) ) ; } } ; frontend.logoffAsync ( query ) ; }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; setItems ( glusterVolumeEntity.getBricks ( ) ) ; }

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:
protected void revertTask ( ) { org.ovirt.engine.core.compat.Guid targetStorageDomainId = getEnclosingCommand ( ) . getParameters ( ) . getTargetStorageDomainId ( ) ; org.ovirt.engine.core.compat.Guid destinationImageId = getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = org.ovirt.engine.core.bll.lsm.VmReplicateDiskFinishTaskHandler.getDiskImageDao ( ) . get ( destinationImageId ) ; if ( ( diskImage != null ) && ( targetStorageDomainId.equals ( diskImage.getStorageIds ( ) . get ( 0 ) ) ) ) { getEnclosingCommand ( ) . getParameters ( ) . setExecutionIndex ( 0 ) ; } }

Target:
private boolean isMoveDiskInDbSucceded ( org.ovirt.engine.core.compat.Guid targetStorageDomainId ) { org.ovirt.engine.core.compat.Guid destinationImageId = getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = org.ovirt.engine.core.bll.lsm.VmReplicateDiskFinishTaskHandler.getDiskImageDao ( ) . get ( destinationImageId ) ; return ( diskImage != null ) && ( targetStorageDomainId.equals ( diskImage.getStorageIds ( ) . get ( 0 ) ) ) ; }
Source:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid taskID ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , taskID ) ; _tasks.get ( taskID ) . StopTask ( ) ; _tasks.get ( taskID ) . ConcreteStartPollingTask ( ) ; } }

Target:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid taskID ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , taskID ) ; _tasks.get ( taskID ) . stopTask ( ) ; _tasks.get ( taskID ) . ConcreteStartPollingTask ( ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterService mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterService entity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterService ( ) ; entity.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "id" ) ) ) ; entity.setServiceType ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.valueOf ( rs.getString ( "service_type" ) ) ) ; entity.setServiceName ( rs.getString ( "service_name" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterService mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterService entity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterService ( ) ; entity.setId ( getGuidDefaultEmpty ( rs , "id" ) ) ; entity.setServiceType ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.valueOf ( rs.getString ( "service_type" ) ) ) ; entity.setServiceName ( rs.getString ( "service_name" ) ) ; return entity ; }
Source:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > createActionTable ( ) { return new org.ovirt.engine.ui.userportal.widget.table.column.UserPortalSimpleActionTable < T > ( modelProvider , getTableResources ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getClientStorage ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > createActionTable ( ) { return new org.ovirt.engine.ui.userportal.widget.table.column.UserPortalSimpleActionTable < T > ( modelProvider , getTableResources ( ) , getTableHeaderResources ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getClientStorage ( ) ) { @ java.lang.Override protected java.lang.String getTableContainerStyleName ( ) { return ( org.ovirt.engine.ui.userportal.section.main.view.AbstractSideTabWithDetailsView.this . getTableContainerStyleName ( ) ) == null ? super . getTableContainerStyleName ( ) : org.ovirt.engine.ui.userportal.section.main.view.AbstractSideTabWithDetailsView.this . getTableContainerStyleName ( ) ; } } ; }
Source:
public void setIsSelectedNullable ( java.lang.Boolean value ) { if ( ( ( isSelectedNullable ) == null ) && ( value == null ) ) { return ; } if ( ( ( isSelectedNullable ) == null ) || ( ! ( isSelectedNullable.equals ( value ) ) ) ) { isSelectedNullable = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "IsSelectedNullable" ) ) ; if ( ! ( getIsSelectedNotificationPrevent ( ) ) ) { IsSelectedChanged ( ) ; } } }

Target:
public void setIsSelectedNullable ( java.lang.Boolean value ) { if ( ( ( isSelectedNullable ) == null ) && ( value == null ) ) { return ; } if ( ( ( isSelectedNullable ) == null ) || ( ! ( isSelectedNullable.equals ( value ) ) ) ) { isSelectedNullable = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "IsSelectedNullable" ) ) ; if ( ! ( getIsSelectedNotificationPrevent ( ) ) ) { IsSelectedChanged ( ) ; } } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; this . allNics = allNics ; queryFreeBonds ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ) ( returnValue ) ) ; allNetworks = networks ; initNetworkModels ( ) ; initDcNetworkParams ( ) ; queryInterfaces ( ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.List < java.lang.String > results = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.aaa.ProfileEntry profileEntry : ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) ) { results.add ( profileEntry.getProfile ( ) ) ; } return results ; }
Source:
private static org.ovirt.engine.core.compat.Guid ensureIconInDatabaseUnchecked ( java.nio.file.Path dir , java.lang.String osName ) { final org.ovirt.engine.core.bll.IconLoader.ResolvedIcon resolvedIcon = org.ovirt.engine.core.bll.IconLoader.resolveIconName ( dir , osName ) ; final java.lang.String dataUrl = org.ovirt.engine.core.bll.IconLoader.loadIcon ( resolvedIcon ) ; return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmIconDao ( ) . ensureIconInDatabase ( dataUrl ) ; }

Target:
private org.ovirt.engine.core.compat.Guid ensureIconInDatabaseUnchecked ( java.nio.file.Path dir , java.lang.String osName ) { final org.ovirt.engine.core.bll.IconLoader.ResolvedIcon resolvedIcon = org.ovirt.engine.core.bll.IconLoader.resolveIconName ( dir , osName ) ; final java.lang.String dataUrl = org.ovirt.engine.core.bll.IconLoader.loadIcon ( resolvedIcon ) ; return vmIconDao.ensureIconInDatabase ( dataUrl ) ; }
Source:
private java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > searchDirectoryUsers ( ) { org.ovirt.engine.core.bll.QueryData data = initQueryData ( true ) ; if ( data == null ) { return java.util.Collections.emptyList ( ) ; } java.lang.String directoryName = data.getDomain ( ) ; org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getDirectory ( directoryName ) ; if ( directory == null ) { return java.util.Collections.emptyList ( ) ; } java.lang.String query = data.getQuery ( ) ; return directory.queryUsers ( query ) ; }

Target:
private java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > searchDirectoryUsers ( ) { org.ovirt.engine.core.bll.QueryData data = initQueryData ( true ) ; if ( data == null ) { return java.util.Collections.emptyList ( ) ; } java.lang.String directoryName = data.getDomain ( ) ; org.ovirt.engine.core.extensions.mgr.ExtensionProxy authz = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getAuthz ( directoryName ) ; if ( authz == null ) { return java.util.Collections.emptyList ( ) ; } return org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalsByQuery ( authz , data.getQuery ( ) ) ; }
Source:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , false ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , false ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getImages ( ) { if ( ( images ) == null ) { images = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid imageId : org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . getImageIds ( ) ) { if ( imageId == null ) { continue ; } org.ovirt.engine.core.common.businessentities.DiskImage image = getDiskImageDao ( ) . getSnapshotById ( imageId ) ; if ( image != null ) { images.add ( image ) ; } } } return images ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getImages ( ) { if ( ( images ) == null ) { images = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid imageId : org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . getImageIds ( ) ) { if ( imageId == null ) { continue ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage image = getDiskImageDao ( ) . getSnapshotById ( imageId ) ; if ( image != null ) { images.add ( image ) ; } } } return images ; }
Source:
private void setLangPageShown ( javax.servlet.http.HttpServletResponse response , boolean value ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.DocsServlet.LANG_PAGE_SHOWN , java.lang.Boolean.toString ( value ) ) ; response.addCookie ( cookie ) ; }

Target:
private void setLangPageShown ( javax.servlet.http.HttpServletResponse response , boolean value ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.DocsServlet.LANG_PAGE_SHOWN , java.lang.Boolean.toString ( value ) ) ; cookie.setPath ( ( "/" + ( getServletContext ( ) . getContextPath ( ) ) ) ) ; response.addCookie ( cookie ) ; }
Source:
public void run ( ) { processVmPoolOnStopVm ( ) ; }

Target:
protected void runningFailed ( ) { try { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RemoveAsyncRunningCommand ( org.ovirt.engine.core.bll.RunVmCommandBase.getVmId ( ) ) ; _isRerun = false ; org.ovirt.engine.core.bll.RunVmCommandBase.setSucceeded ( false ) ; org.ovirt.engine.core.bll.RunVmCommandBase.log ( ) ; processVmPoolOnStopVm ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; } finally { org.ovirt.engine.core.bll.RunVmCommandBase.freeLock ( ) ; } }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateVirtioScsiAvailability ( ) ; updateMigrationForLocalSD ( ) ; updateOSValues ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateVirtioScsiAvailability ( ) ; updateMigrationForLocalSD ( ) ; updateOSValues ( ) ; if ( ( getModel ( ) . getSelectedCluster ( ) ) != null ) { updateCpuProfile ( getModel ( ) . getSelectedCluster ( ) . getId ( ) , getClusterCompatibilityVersion ( ) , template.getCpuProfileId ( ) ) ; } }
Source:
public void verifyListOfRunningVmsIsSameWithSuccessFromVdsmResponse ( ) { prepareForRefreshVmStatsCall ( ) ; mockGetVmStatsCommand ( true ) ; updater.fetchRunningVms ( ) ; java.util.List < org.ovirt.engine.core.compat.Guid > staleRunningVms = updater.checkVmsStatusChanged ( ) ; org.junit.Assert.assertTrue ( updater.getRunningVms ( ) . containsKey ( org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfoTest.VM_1 ) ) ; org.junit.Assert.assertFalse ( staleRunningVms.contains ( org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfoTest.VM_1 ) ) ; }

Target:
public void verifyListOfRunningVmsIsSameWithSuccessFromVdsmResponse ( ) { prepareForRefreshVmStatsCall ( ) ; mockGetVmStatsCommand ( true ) ; updater.fetchRunningVms ( ) ; java.util.List < org.ovirt.engine.core.compat.Guid > staleRunningVms = updater.checkVmsStatusChanged ( ) ; org.junit.Assert.assertTrue ( updater.getRunningVms ( ) . containsKey ( org.ovirt.engine.core.vdsbroker.HostMonitoringTest.VM_1 ) ) ; org.junit.Assert.assertFalse ( staleRunningVms.contains ( org.ovirt.engine.core.vdsbroker.HostMonitoringTest.VM_1 ) ) ; }
Source:
private void commitLabelChanges ( org.ovirt.engine.ui.uicommonweb.models.hosts.PfNicLabelModel labelModel , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > potentialNetworks ) { labelModel.commit ( iface ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ifaceModel = nicMap.get ( iface.getName ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.clearNetworks ( ifaceModel , allNics ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.attachNetworks ( ifaceModel , new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > ( potentialNetworks ) , allNics ) ; }

Target:
private void commitNetworksAndLabelChanges ( org.ovirt.engine.ui.uicommonweb.models.hosts.PfNicLabelModel labelModel , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > potentialNetworks ) { labelModel.commit ( iface ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ifaceModel = nicMap.get ( iface.getName ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.clearNetworks ( ifaceModel , allNics ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.attachNetworks ( ifaceModel , new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > ( potentialNetworks ) , allNics ) ; }
Source:
public void isConnWithSameDetailsExistNoConnections ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = java.util.Collections.emptyList ( ) ; org.mockito.Mockito.when ( storageConnDao.getAllForStorage ( newNFSConnection.getConnection ( ) ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newNFSConnection , null ) ; org.junit.Assert.assertFalse ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistNoConnections ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = java.util.Collections.emptyList ( ) ; org.mockito.Mockito.when ( storageConnDao.getAllForStorage ( newNFSConnection.getConnection ( ) ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newNFSConnection , null ) ; org.junit.jupiter.api.Assertions.assertFalse ( isExists ) ; }
Source:
public static void setGatewayIfNecessary ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.lang.String gateway ) { iface.setIpv4Gateway ( gateway ) ; }

Target:
private static void setGateway ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , org.ovirt.engine.core.vdsbroker.vdsbroker.IpInfoFetcher ipInfoFetcher , java.util.function.Consumer < java.lang.String > gatewaySetter ) { if ( bootProtocol == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) { java.lang.String gateway = ipInfoFetcher.fetchGateway ( ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( gateway ) ) { gatewaySetter.accept ( gateway ) ; } } }
Source:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AuditLogDAOTest.EXISTING_COUNT , result.size ( ) ) ; }

Target:
public void testGetAllAfterDate ( ) throws java.lang.Exception { java.util.Date cutoff = org.ovirt.engine.core.dao.AuditLogDAOTest.EXPECTED_DATE_FORMAT.parse ( "2010-12-20 13:00:00" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAllAfterDate ( cutoff ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AuditLogDAOTest.FILTERED_COUNT , result.size ( ) ) ; cutoff = org.ovirt.engine.core.dao.AuditLogDAOTest.EXPECTED_DATE_FORMAT.parse ( "2010-12-20 14:00:00" ) ; result = dao.getAllAfterDate ( cutoff ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 0 , result.size ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.getInstance ( ) . removeClusterPolicy ( getParameters ( ) . getClusterPolicyId ( ) ) ; setSucceeded ( true ) ; }

Target:
private java.lang.String clustersListIntoTokenizedString ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > attachedClustersList = getVdsGroupDao ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) ; java.util.List < java.lang.String > clusterNamesList = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup : attachedClustersList ) clusterNamesList.add ( vdsGroup.getName ( ) ) ; return org.apache.commons.lang.StringUtils.join ( clusterNamesList , ',' ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getRngDevices ( ) { return getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getParameters ( ) . getRngDevice ( ) . getVmId ( ) , VmDeviceGeneralType.RNG ) ; }

Target:
protected boolean isRngSupportedByCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getVdsGroup ( ) ; org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source = org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getParameters ( ) . getRngDevice ( ) . getSource ( ) ; return ( ( cluster != null ) && ( isFeatureSupported ( cluster.getcompatibility_version ( ) ) ) ) && ( cluster.getRequiredRngSources ( ) . contains ( source ) ) ; }
Source:
public static < R extends org.ovirt.engine.api.model.ActionableResource > void addActions ( javax.ws.rs.core.UriInfo uriInfo , R model , java.lang.Object collection ) { if ( uriInfo != null ) { org.ovirt.engine.api.restapi.util.ActionsBuilder actionsBuilder = new org.ovirt.engine.api.restapi.util.ActionsBuilder ( uriInfo , model.getClass ( ) , collection.getClass ( ) ) ; model.setActions ( actionsBuilder.build ( ) ) ; } }

Target:
public static < R extends org.ovirt.engine.api.model.ActionableResource > void addActions ( R model , java.lang.Object collection ) { org.ovirt.engine.api.restapi.invocation.Current current = org.ovirt.engine.api.restapi.invocation.CurrentManager.get ( ) ; java.lang.String base = ( current.getPrefix ( ) ) + ( current.getPath ( ) ) ; if ( base != null ) { org.ovirt.engine.api.restapi.util.ActionsBuilder actionsBuilder = new org.ovirt.engine.api.restapi.util.ActionsBuilder ( base , model.getClass ( ) , collection.getClass ( ) ) ; model.setActions ( actionsBuilder.build ( ) ) ; } }
Source:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksToCheck = org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.filterImageDisks ( diskDao.getAllForVm ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_NOT_SHAREABLE , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_ACTIVE ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( disksToCheck ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesHaveNotExceededMaxNumberOfVolumesInImageChain ( ) ) ) ; }

Target:
protected boolean validateCreateAllSnapshotsFromVmCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.tasks.CommandHelper.validate ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) . clone ( ) ) ; if ( ! ( returnValue.isValid ( ) ) ) { org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getReturnValue ( ) . setValidationMessages ( returnValue.getValidationMessages ( ) ) ; return false ; } return true ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveNetwork , org.ovirt.engine.core.common.action.RemoveNetworkParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) 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.BackendNetworkResourceTest.NETWORK_ID } , getEntity ( 0 ) ) ; setUpActionExpectations ( VdcActionType.RemoveNetwork , org.ovirt.engine.core.common.action.RemoveNetworkParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkResourceTest.NETWORK_ID } , true , true ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( VdcActionType.HostSetupNetworks , createHostSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( ActionType.HostSetupNetworks , createHostSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isPosixSupportedInDC ( ) { if ( ( ! ( storagePool.isLocal ( ) ) ) && ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.PosixStorageEnabled , storagePool.getcompatibility_version ( ) . toString ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.dao.StoragePoolIsoMapDAO getStoragePoolIsoMapDao ( ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) ; }
Source:
protected boolean canAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( EngineMessage.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } if ( isLunsAlreadyInUse ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) ) { return false ; } return true ; }

Target:
protected boolean canAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failValidation ( EngineMessage.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } if ( isLunsAlreadyInUse ( org.ovirt.engine.core.bll.storage.domain.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) ) { return false ; } return true ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; UpdatePagingAvailability ( ) ; } else if ( command == ( getDetailsCommand ( ) ) ) { details ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; updatePagingAvailability ( ) ; } else if ( command == ( getDetailsCommand ( ) ) ) { details ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }