auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.util.List < org.ovirt.engine.core.common.action.LabelNicParameters > transformToLabelNicParameters ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel.LabelOnNic > labelOnNicInstances ) { java.util.List < org.ovirt.engine.core.common.action.LabelNicParameters > result = new java.util.ArrayList ( labelOnNicInstances.size ( ) ) ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel.LabelOnNic labelOnNic : labelOnNicInstances ) { result.add ( new org.ovirt.engine.core.common.action.LabelNicParameters ( labelOnNic.getNicId ( ) , labelOnNic.getLabel ( ) ) ) ; } return result ; }

Target:
private java.util.List < org.ovirt.engine.core.common.action.LabelNicParameters > transformToLabelNicParameters ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NicLabel > labelOnNicInstances ) { java.util.List < org.ovirt.engine.core.common.action.LabelNicParameters > result = new java.util.ArrayList ( labelOnNicInstances.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NicLabel labelOnNic : labelOnNicInstances ) { result.add ( new org.ovirt.engine.core.common.action.LabelNicParameters ( labelOnNic.getNicId ( ) , labelOnNic.getLabel ( ) ) ) ; } return result ; }
Source:
public static org.ovirt.engine.api.model.DiskAttachment map ( org.ovirt.engine.core.common.businessentities.storage.DiskVmElement entity , org.ovirt.engine.api.model.DiskAttachment template ) { org.ovirt.engine.api.model.DiskAttachment model = ( template != null ) ? template : new org.ovirt.engine.api.model.DiskAttachment ( ) ; model.setId ( entity.getDiskId ( ) . toString ( ) ) ; model.setBootable ( entity.isBoot ( ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.DiskAttachmentMapper.map ( entity.getDiskInterface ( ) , null ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.DiskAttachment map ( org.ovirt.engine.core.common.businessentities.storage.DiskVmElement entity , org.ovirt.engine.api.model.DiskAttachment template ) { org.ovirt.engine.api.model.DiskAttachment model = ( template != null ) ? template : new org.ovirt.engine.api.model.DiskAttachment ( ) ; model.setId ( entity.getDiskId ( ) . toString ( ) ) ; model.setBootable ( entity.isBoot ( ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.DiskMapper.mapInterface ( entity.getDiskInterface ( ) ) ) ; return model ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( "VdsmImageLocationInfo [" + "storageDomainId=" ) + ( storageDomainId ) ) + ", imageGroupId=" ) + ( imageGroupId ) ) + ", imageId=" ) + ( imageId ) ) + ']' ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( "VdsmImageLocationInfo [" + "storageDomainId=" ) + ( storageDomainId ) ) + ", imageGroupId=" ) + ( imageGroupId ) ) + ", imageId=" ) + ( imageId ) ) + ", generation=" ) + ( generation ) ) + ']' ; }
Source:
public void init ( ) { initState ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getRedirectServletReportsPage ( 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 ) { setReportBaseUrl ( ( ( java.lang.String ) ( returnValue ) ) ) ; } } ) ) ; parseReportsXML ( ) ; }

Target:
private void checkReportsWebAppStatus ( ) { try { org.ovirt.engine.ui.uicommonweb.ReportInit.constructServiceRequestBuilder ( org.ovirt.engine.ui.uicommonweb.ReportInit.STATUS_SERVICE ) . sendRequest ( null , new com.google.gwt.http.client.RequestCallback ( ) { @ java.lang.Override public void onError ( com.google.gwt.http.client.Request request , java.lang.Throwable exception ) { } @ java.lang.Override public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { if ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) { reportsWebappDeployed = true ; parseReportsXML ( ) ; } } } ) ; } catch ( com.google.gwt.http.client.RequestException e ) { } }
Source:
private void castEveryonePermissionsToUser ( org.ovirt.engine.core.common.businessentities.Permissions entity ) { if ( ( ( ( entity.getad_element_id ( ) ) != null ) && ( entity.getad_element_id ( ) . equals ( Guid.EVERYONE ) ) ) && ( queryType.equals ( VdcQueryType.GetPermissionsByAdElementId ) ) ) { entity.setad_element_id ( this . targetId ) ; } }

Target:
private void castEveryonePermissionsToUser ( org.ovirt.engine.core.common.businessentities.Permissions entity ) { if ( ( ( ( entity.getAdElementId ( ) ) != null ) && ( entity.getAdElementId ( ) . equals ( Guid.EVERYONE ) ) ) && ( queryType.equals ( VdcQueryType.GetPermissionsByAdElementId ) ) ) { entity.setAdElementId ( this . targetId ) ; } }
Source:
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 ( RegistrationResult.RetrievedEventDefinition ) ) { AsyncResult_Retrieved ( ) ; } if ( ev.matchesDefinition ( ProvideTickEvent.Definition ) ) { syncSearch ( ) ; } }

Target:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; resetIsEmpty ( ) ; updatePagingAvailability ( ) ; }
Source:
public void canDoActionEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStorageServerConnectionLunMapDao ( ) ) ; storageServerConnectionDao = prepareDAO ( dbFacade.getStorageServerConnectionDao ( ) ) ; existingConnection = storageServerConnectionDao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.storage_server_connections ( ) ; newServerConnection.setid ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setconnection ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.EXISTING_DOMAIN_STORAGE_NAME ) ; existingLUNStorageMap = dao.get ( new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map_id ( "1IET_00180001" , existingConnection.getid ( ) ) ) ; newLUNStorageMap = new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.FREE_LUN_ID , existingConnection.getid ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStorageServerConnectionLunMapDao ( ) ) ; storageServerConnectionDao = prepareDAO ( dbFacade.getStorageServerConnectionDao ( ) ) ; existingConnection = storageServerConnectionDao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; newServerConnection.setid ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setconnection ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.EXISTING_DOMAIN_STORAGE_NAME ) ; existingLUNStorageMap = dao.get ( new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map_id ( "1IET_00180001" , existingConnection.getid ( ) ) ) ; newLUNStorageMap = new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.FREE_LUN_ID , existingConnection.getid ( ) ) ; }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.storage.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
public void testAllocateVm ( ) throws java.lang.Exception { setUpGetVmExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.AttachUserToVmFromPoolAndRun , org.ovirt.engine.core.common.action.AttachUserToVmFromPoolAndRunParameters.class , new java.lang.String [ ] { "VmPoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , GUIDS [ 0 ] ) ) ; verifyTestAllocateVmActionResponse ( resource.allocateVm ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }

Target:
public void testAllocateVm ( ) throws java.lang.Exception { setUpGetVmExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.AttachUserToVmFromPoolAndRun , org.ovirt.engine.core.common.action.AttachUserToVmFromPoolAndRunParameters.class , new java.lang.String [ ] { "VmPoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , GUIDS [ 0 ] ) ) ; verifyTestAllocateVmActionResponse ( resource.allocateVm ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }
Source:
public java.util.concurrent.Future < java.lang.Void > close ( ) { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . unsubscribe ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_ID , this . subscribtionId ) . build ( ) ) ; send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . disconnect ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_RECEIPT , java.util.UUID.randomUUID ( ) . toString ( ) ) . build ( ) ) ; return super . close ( ) ; }

Target:
public java.util.concurrent.Future < java.lang.Void > close ( ) { for ( java.lang.String subscribtionId : subscriptionIds ) { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . unsubscribe ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_ID , subscribtionId ) . build ( ) ) ; } send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . disconnect ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_RECEIPT , java.util.UUID.randomUUID ( ) . toString ( ) ) . build ( ) ) ; return super . close ( ) ; }
Source:
protected boolean validateSuffix ( java.lang.String suffix , org.ovirt.engine.ui.uicommonweb.models.EntityModel entityModel ) { for ( java.lang.Object object : objectsToClone ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) . getVm ( ) ; if ( ! ( validateName ( ( ( vm.getName ( ) ) + suffix ) , object , entityModel ) ) ) { return false ; } } return true ; }

Target:
protected boolean validateSuffix ( java.lang.String suffix , org.ovirt.engine.ui.uicommonweb.models.EntityModel entityModel ) { for ( java.lang.Object object : objectsToClone ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) . getVm ( ) ; if ( ! ( validateName ( ( ( vm.getName ( ) ) + suffix ) , entityModel , getClonedAppendedNameValidators ( object ) ) ) ) { return false ; } } return true ; }
Source:
private void initConfigurationProperties ( ) throws org.ovirt.engine.core.notifier.NotificationServiceException { daysToKeepHistory = getNonNegativeIntegerProperty ( NotificationProperties.DAYS_TO_KEEP_HISTORY ) ; daysToSendOnStartup = getNonNegativeIntegerProperty ( NotificationProperties.DAYS_TO_SEND_ON_STARTUP ) ; initMethodMapper ( ) ; }

Target:
private void initConfigurationProperties ( ) throws org.ovirt.engine.core.notifier.NotificationServiceException { daysToKeepHistory = getNonNegativeIntegerProperty ( NotificationProperties.DAYS_TO_KEEP_HISTORY ) ; daysToSendOnStartup = getNonNegativeIntegerProperty ( NotificationProperties.DAYS_TO_SEND_ON_STARTUP ) ; failedQueriesNotificationThreshold = getNonNegativeIntegerProperty ( NotificationProperties.FAILED_QUERIES_NOTIFICATION_THRESHOLD ) ; if ( ( failedQueriesNotificationThreshold ) == 0 ) { failedQueriesNotificationThreshold = 1 ; } initMethodMapper ( ) ; failedQueriesEventSender = methodsMapper.getMethod ( EventNotificationMethods.EMAIL ) ; }
Source:
public boolean performNextOperation ( int completedChildCount ) { if ( ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getNextPhase ( ) ) == ( ImportRepoImageParameters.Phase.DOWNLOAD ) ) { org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setNextPhase ( ImportRepoImageParameters.Phase.END ) ; persistCommand ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getParentCommand ( ) , true ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( ActionType.DownloadImage , createDownloadImageParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getContext ( ) ) ) ; return true ; } return false ; }

Target:
public boolean performNextOperation ( int completedChildCount ) { if ( ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getNextPhase ( ) ) == ( ImportRepoImageParameters.Phase.DOWNLOAD ) ) { org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setNextPhase ( ImportRepoImageParameters.Phase.END ) ; persistCommand ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getParentCommand ( ) , true ) ; backend.runInternalAction ( ActionType.DownloadImage , createDownloadImageParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getContext ( ) ) ) ; return true ; } return false ; }
Source:
public com.google.gwt.editor.client.adapters.TakesValueEditor < java.lang.Object > asEditor ( ) { return org.ovirt.engine.ui.common.widget.editor.TakesConstrainedValueEditor.of ( this , this , this ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.ListModel model , org.ovirt.engine.core.compat.Version dcCompatibilityVersion , org.ovirt.engine.core.compat.Guid dcId , org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel defaultProfile ) { driver.edit ( model ) ; profiles = ( ( java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel > ) ( model.getItems ( ) ) ) ; this . dcCompatibilityVersion = dcCompatibilityVersion ; this . dcId = dcId ; this . defaultProfile = defaultProfile ; init ( model ) ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateStoragePool , org.ovirt.engine.core.common.action.StoragePoolManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendDataCentersResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateStoragePool , org.ovirt.engine.core.common.action.StoragePoolManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendDataCentersResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected boolean verifyAddVM ( ) { final java.util.List < java.lang.String > reasons = org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ; final int nicsCount = ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) * ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmNicDao ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmTemplateId ( ) ) . size ( ) ) ; final int priority = org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getPriority ( ) ; return org.ovirt.engine.core.bll.VmHandler.verifyAddVm ( reasons , nicsCount , priority , macPool ) ; }

Target:
protected org.ovirt.engine.core.bll.network.macpool.MacPool getMacPool ( ) { if ( ( macPool ) == null ) { macPool = poolPerCluster.getMacPoolForCluster ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getClusterId ( ) , org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getContext ( ) ) ; } return macPool ; }
Source:
public void testRemove ( ) { dao.remove ( org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.EXISTING_VOL_DIST_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getByClusterId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.CLUSTER_ID ) ; org.junit.Assert.assertEquals ( 1 , volumes.size ( ) ) ; org.junit.Assert.assertFalse ( volumes.contains ( existingDistVol ) ) ; org.junit.Assert.assertTrue ( volumes.contains ( existingReplVol ) ) ; }

Target:
public void testRemove ( ) { dao.remove ( org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.EXISTING_VOL_DIST_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getByClusterId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.CLUSTER_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , volumes.size ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( volumes.contains ( existingDistVol ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( volumes.contains ( existingReplVol ) ) ; }
Source:
public static void GetVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }

Target:
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.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
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 ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel ) ( ev.getContext ( ) ) ) ; model.StopProgress ( ) ; Cancel ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.String prefix = ( ( java.lang.String ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel ) ( target ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( prefix ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel pathModel = model.getStorage ( ) . getPath ( ) ; pathModel.setEntity ( prefix ) ; pathModel.setIsChangable ( false ) ; } configureLocalStorage3 ( model ) ; }
Source:
private void setCustomDefinedProperties ( org.ovirt.engine.core.common.businessentities.VmStatic vmStaticDataFromParams ) { org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.VMCustomProperties properties = org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.getInstance ( ) . parseProperties ( org.ovirt.engine.core.bll.UpdateVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) , vmStaticDataFromParams.getCustomProperties ( ) ) ; vmStaticDataFromParams.setPredefinedProperties ( properties.getPredefinedProperties ( ) ) ; vmStaticDataFromParams.setUserDefinedProperties ( properties.getUseDefinedProperties ( ) ) ; }

Target:
public boolean isVirtioScsiEnabledForVm ( org.ovirt.engine.core.compat.Guid vmId ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.isVirtioScsiControllerAttached ( vmId ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondaryDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long notEnoughMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; long tooMuchMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) : 0L ; return getNormallyUtilizedMemoryHosts ( candidateHosts , notEnoughMemory , tooMuchMemory ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondaryDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long notEnoughMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.parseLong ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; long tooMuchMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) ? java.lang.Long.parseLong ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) : 0L ; return getNormallyUtilizedMemoryHosts ( candidateHosts , notEnoughMemory , tooMuchMemory ) ; }
Source:
public static void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = getImportChainConfirmationModel ( ( ( java.lang.String ) ( result ) ) ) ; sourceListModel.setConfirmWindow ( confirmationModel ) ; } else { stopProgress ( ) ; setTestResultValue ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { sourceListModel.getSearchCommand ( ) . execute ( ) ; }
Source:
public boolean validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation valueValidation = new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) ; getSelectedKey ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; getValue ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; return ( getSelectedKey ( ) . getIsValid ( ) ) && ( getValue ( ) . getIsValid ( ) ) ; }

Target:
public boolean validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation valueValidation = new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) ; getValue ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; getKeyList ( ) . validateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; return ( getKeyList ( ) . getIsValid ( ) ) && ( getValue ( ) . getIsValid ( ) ) ; }
Source:
protected void executeCommand ( ) { registerRollbackHandler ( new org.ovirt.engine.core.bll.UpdateMacPoolCommand.CustomTransactionCompletionListener ( ) ) ; getMacPoolDao ( ) . update ( getMacPoolEntity ( ) ) ; macPoolPerCluster.modifyPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }

Target:
protected void executeCommand ( ) { registerRollbackHandler ( new org.ovirt.engine.core.bll.UpdateMacPoolCommand.CustomTransactionCompletionListener ( ) ) ; macPoolDao.update ( getMacPoolEntity ( ) ) ; macPoolPerCluster.modifyPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }
Source:
public void validateFailedVMHasNotDisk ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST.toString ( ) ) ) ; }

Target:
public void validateFailedVirtIODisk ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; org.mockito.Mockito.when ( osRepository.getOsName ( 0 ) ) . thenReturn ( "RHEL6" ) ; createNotVirtIODisk ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED ) ; }
Source:
private java.lang.String typeAheadNameTemplateNullSafe ( java.lang.String name ) { if ( ( name != null ) && ( ! ( name.trim ( ) . isEmpty ( ) ) ) ) { return templates.typeAheadName ( name ) . asString ( ) ; } else { return templates.typeAheadEmptyContent ( ) . asString ( ) ; } }

Target:
private java.lang.String typeAheadNameTemplateNullSafe ( java.lang.String name ) { if ( ( name != null ) && ( ! ( name.trim ( ) . isEmpty ( ) ) ) ) { return org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmRunOncePopupWidget.templates.typeAheadName ( name ) . asString ( ) ; } else { return org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmRunOncePopupWidget.templates.typeAheadEmptyContent ( ) . asString ( ) ; } }
Source:
public void testIsNetworkInSyncWhenBootProtocolDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocol ( false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4BootProtocolEqual ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocol ( true ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
public void testAttachedStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; storageDomain.getDataCenter ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storageDomain ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.ATTACHED_STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; }

Target:
public void testAttachedStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; storageDomain.getDataCenter ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storageDomain ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.ATTACHED_STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; }
Source:
public static void getVmTemplatesWithPermittedAction ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.TemplateConverter ( ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesWithPermittedAction , getEntitiesWithPermittedActionParameters , aQuery ) ; }

Target:
public static void getRpmVersion ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( connectAutomatically.readConnectAutomatically ( ) ) && ( model.getCanConnectAutomatically ( ) ) ) && ( ! ( alreadyOpened ) ) ) { try { model.getAutoConnectableConsoles ( ) . get ( 0 ) . connect ( ) ; alreadyOpened = true ; } catch ( org.ovirt.engine.ui.uicommonweb.models.VmConsoles e ) { errorPopupManager.show ( e.getLocalizedErrorMessage ( ) ) ; } } unregisterModels ( ) ; }

Target:
private void connect ( boolean isPasswordDelegationPossible ) { if ( isPasswordDelegationPossible ) { try { model.getAutoConnectableConsoles ( ) . get ( 0 ) . connect ( ) ; alreadyOpened = true ; } catch ( org.ovirt.engine.ui.uicommonweb.models.VmConsoles e ) { errorPopupManager.show ( e.getLocalizedErrorMessage ( ) ) ; } } unregisterModels ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc createVolumeContainer ( java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String size , int volFormat , int diskType , java.lang.String volUUID , java.lang.String descr , java.lang.String srcImgGUID , java.lang.String srcVolUUID ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.createVolumeContainer ( sdUUID , imgGUID , size , volFormat , diskType , volUUID , descr , srcImgGUID , srcVolUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc copyData ( java.lang.String jobId , java.util.Map src , java.util.Map dst ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.copyData ( jobId , src , dst ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( deviceId ) == null ? 0 : deviceId.hashCode ( ) ) ; result = ( prime * result ) + ( ( vmId ) == null ? 0 : vmId.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( deviceId , vmId ) ; }
Source:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { boolean result = executeSshReboot ( org.ovirt.engine.core.bll.SshHostRebootCommand.getVds ( ) . getClusterCompatibilityVersion ( ) . toString ( ) ) ; if ( result ) { if ( ( org.ovirt.engine.core.bll.SshHostRebootCommand.getParameters ( ) . getPrevVdsStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) { setVdsStatus ( VDSStatus.Initializing ) ; } else { setVdsStatus ( VDSStatus.Maintenance ) ; } } org.ovirt.engine.core.bll.SshHostRebootCommand.setSucceeded ( result ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDSStatus getStatusAfterReboot ( ) { return ( org.ovirt.engine.core.bll.SshHostRebootCommand.getParameters ( ) . getPrevVdsStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ? org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance : org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ; }
Source:
public void invokePluginsNow ( java.lang.String functionName , com.google.gwt.core.client.JsArray < ? > functionArgs ) { if ( canInvokePlugins ) { for ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin : getPlugins ( ) ) { if ( plugin.isInState ( PluginState.IN_USE ) ) { invokePlugin ( plugin , functionName , functionArgs ) ; } } } }

Target:
public void invokePluginsNow ( java.lang.String functionName , com.google.gwt.core.client.JsArray < ? > functionArgs , org.ovirt.engine.ui.webadmin.plugin.PluginManager.PluginInvocationCondition condition ) { if ( canInvokePlugins ) { for ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin : getPlugins ( ) ) { if ( ( plugin.isInState ( PluginState.IN_USE ) ) && ( condition.canInvoke ( plugin ) ) ) { invokePlugin ( plugin , functionName , functionArgs ) ; } } } }
Source:
public void setUsePatternFly ( final boolean use ) { this . usePatternFly = use ; if ( use ) { setContentWidgetStyleName ( PatternflyConstants.FORM_CONTROL ) ; addLabelStyleName ( "label col-sm-2 col-md-2 control-label" ) ; addContentWidgetContainerStyleName ( "col-sm-10 col-md-10" ) ; wrapperPanel.getElement ( ) . addClassName ( PatternflyConstants.FORM_GROUP ) ; wrapperPanel.getElement ( ) . removeClassName ( style.wrapper ( ) ) ; contentWidgetContainer.asWidget ( ) . removeStyleName ( style.contentWidget ( ) ) ; } }

Target:
public void setWrapperStyleName ( java.lang.String styleName ) { wrapperPanel.setStyleName ( styleName ) ; }
Source:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > getNodeObjects ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : vm.getDiskMap ( ) . values ( ) ) { disks.add ( disk ) ; } return disks ; }

Target:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > getNodeObjects ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : vm.getDiskMap ( ) . values ( ) ) { disks.add ( disk ) ; } return disks ; }
Source:
private static void setPath ( org.ovirt.engine.core.common.businessentities.StorageServerConnections entity , org.ovirt.engine.api.model.StorageConnection model ) { if ( entity.getconnection ( ) . contains ( ":" ) ) { java.lang.String [ ] parts = entity.getconnection ( ) . split ( ":" ) ; model.setAddress ( parts [ 0 ] ) ; model.setPath ( parts [ 1 ] ) ; } else { model.setPath ( entity.getconnection ( ) ) ; } }

Target:
private static void setPath ( org.ovirt.engine.core.common.businessentities.StorageServerConnections entity , org.ovirt.engine.api.model.StorageConnection model ) { if ( entity.getConnection ( ) . contains ( ":" ) ) { java.lang.String [ ] parts = entity.getConnection ( ) . split ( ":" ) ; model.setAddress ( parts [ 0 ] ) ; model.setPath ( parts [ 1 ] ) ; } else { model.setPath ( entity.getConnection ( ) ) ; } }
Source:
private void verifyAllContent ( org.ovirt.engine.api.model.Snapshot model , org.ovirt.engine.api.model.ConfigurationType type , java.lang.String data ) { assertNotNull ( model.getInitialization ( ) ) ; assertNotNull ( model.getInitialization ( ) . getConfiguration ( ) ) ; assertEquals ( data , model.getInitialization ( ) . getConfiguration ( ) . getData ( ) ) ; assertEquals ( type , model.getInitialization ( ) . getConfiguration ( ) . getType ( ) ) ; }

Target:
private void verifyAllContent ( org.ovirt.engine.api.model.Snapshot model , org.ovirt.engine.api.model.ConfigurationType type , java.lang.String data ) { org.junit.Assert.assertNotNull ( model.getInitialization ( ) ) ; org.junit.Assert.assertNotNull ( model.getInitialization ( ) . getConfiguration ( ) ) ; org.junit.Assert.assertEquals ( data , model.getInitialization ( ) . getConfiguration ( ) . getData ( ) ) ; org.junit.Assert.assertEquals ( type , model.getInitialization ( ) . getConfiguration ( ) . getType ( ) ) ; }
Source:
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 ( propName.equals ( "ProposeDiscoverTargets" ) ) { setProposeDiscover ( object.getProposeDiscoverTargets ( ) ) ; } else if ( propName.equals ( "Message" ) ) { messageLabel.setText ( object.getMessage ( ) ) ; } }

Target:
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 ( propName.equals ( "ProposeDiscoverTargets" ) ) { setProposeDiscover ( object.getProposeDiscoverTargets ( ) ) ; } else if ( propName.equals ( "Message" ) ) { messageLabel.setText ( object.getMessage ( ) ) ; } }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( T object ) { java.lang.Integer progressValue = getProgressValue ( object ) ; int progress = ( progressValue != null ) ? progressValue : 0 ; java.lang.String text = getProgressText ( object ) ; java.lang.String color = getColorByProgress ( progress ) ; return org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getApplicationTemplates ( ) . progressBar ( progress , text , color , getStyle ( ) ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( T object ) { java.lang.Integer progressValue = getProgressValue ( object ) ; int progress = ( progressValue != null ) ? progressValue : 0 ; java.lang.String text = getProgressText ( object ) ; java.lang.String color = getColorByProgress ( progress ) ; return org.ovirt.engine.ui.webadmin.widget.table.column.AbstractProgressBarColumn.templates.progressBar ( progress , text , color , getStyle ( ) ) ; }