auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
private void waitForConnect ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { this . connected.await ( policy.getRetryTimeOut ( ) , policy.getTimeUnit ( ) ) ; } catch ( java.lang.InterruptedException e ) { log.error ( e.getMessage ( ) , e ) ; disconnect ( "Waiting for connect interrupted" ) ; throw new java.lang.IllegalStateException ( "Communication interrupted" ) ; } }

Target:
private void waitForConnect ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { org.ovirt.vdsm.jsonrpc.client.utils.retry.AwaitRetry.retry ( new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) throws java.lang.Exception { connected.await ( policy.getRetryTimeOut ( ) , policy.getTimeUnit ( ) ) ; return null ; } } ) ; } catch ( java.lang.Exception e ) { log.error ( e.getMessage ( ) , e ) ; disconnect ( "Waiting for connect failed" ) ; throw new java.lang.IllegalStateException ( "Communication failed" ) ; } }
Source:
private void clearAsyncTasksWithOutVdsmId ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = org.ovirt.engine.core.bll.CommandBase.getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( NGuid.Empty.equals ( task.getVdsmTaskId ( ) ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.failTaskWithoutVdsmId ( task ) ; } } }

Target:
private void clearAsyncTasksWithOutVdsmId ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = org.ovirt.engine.core.bll.CommandBase.getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.failTaskWithoutVdsmId ( task ) ; } } }
Source:
private void updateReportsAvailability ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { if ( org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . isReportsEnabled ( ) ) { java.util.List < org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < org.ovirt.engine.core.common.businessentities.VM > > resourceSubActions = org.ovirt.engine.ui.webadmin.uicommon.ReportActionsHelper.getInstance ( ) . getResourceSubActions ( "VM" , getModelProvider ( ) ) ; if ( ( resourceSubActions != null ) && ( ( resourceSubActions.size ( ) ) > 0 ) ) { getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminMenuBarButtonDefinition < org.ovirt.engine.core.common.businessentities.VM > ( constants.showReportVm ( ) , resourceSubActions ) ) ; } } }

Target:
private void updateReportsAvailability ( ) { if ( org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . isReportsEnabled ( ) ) { java.util.List < org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < org.ovirt.engine.core.common.businessentities.VM > > resourceSubActions = org.ovirt.engine.ui.webadmin.uicommon.ReportActionsHelper.getInstance ( ) . getResourceSubActions ( "VM" , getModelProvider ( ) ) ; if ( ( resourceSubActions != null ) && ( ( resourceSubActions.size ( ) ) > 0 ) ) { getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminMenuBarButtonDefinition < org.ovirt.engine.core.common.businessentities.VM > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.MainTabVirtualMachineView.constants.showReportVm ( ) , resourceSubActions ) ) ; } } }
Source:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setTop ( ( - 3 ) , Unit.PX ) ; getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; } }

Target:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; removeContentWidgetStyleName ( Styles.FORM_CONTROL ) ; } }
Source:
protected boolean isStorageDomainNotInPool ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { boolean returnValue = false ; if ( storageDomain != null ) { returnValue = getDbFacade ( ) . getStoragePoolIsoMapDao ( ) . getAllForStorage ( storageDomain.getId ( ) ) . isEmpty ( ) ; if ( ! returnValue ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ; } } return returnValue ; }

Target:
protected org.ovirt.engine.core.dao.StoragePoolIsoMapDAO getStoragePoolIsoMapDAO ( ) { return getDbFacade ( ) . getStoragePoolIsoMapDao ( ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections createISCSIConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type , java.lang.String iqn , java.lang.String port , java.lang.String user , java.lang.String password ) { org.ovirt.engine.core.compat.Guid id = getConnectionId ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setport ( port ) ; connectionDetails.setuser_name ( user ) ; connectionDetails.setpassword ( password ) ; return connectionDetails ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections createISCSIConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type , java.lang.String iqn , java.lang.String port , java.lang.String user , java.lang.String password ) { org.ovirt.engine.core.compat.Guid id = getConnectionId ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setIqn ( iqn ) ; connectionDetails.setPort ( port ) ; connectionDetails.setUserName ( user ) ; connectionDetails.setPassword ( password ) ; return connectionDetails ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.GraphicsDevice dev = getParameters ( ) . getDev ( ) ; if ( ( ( dev.getDeviceId ( ) ) == null ) || ( ( dev.getVmId ( ) ) == null ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_REMOVE_GRAPHICS_DEV_INVALID_PARAMS ) ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.common.businessentities.GraphicsDevice dev = getParameters ( ) . getDev ( ) ; if ( ( ( dev.getDeviceId ( ) ) == null ) || ( ( dev.getVmId ( ) ) == null ) ) { return failValidation ( EngineMessage.ACTION_TYPE_REMOVE_GRAPHICS_DEV_INVALID_PARAMS ) ; } return true ; }
Source:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > o1 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > o2 ) { boolean syncStatus1 = ( ( o1.getFirst ( ) ) == null ) ? false : o1.getFirst ( ) . getNetworkImplementationDetails ( ) . isInSync ( ) ; boolean syncStatus2 = ( ( o2.getFirst ( ) ) == null ) ? false : o2.getFirst ( ) . getNetworkImplementationDetails ( ) . isInSync ( ) ; return java.lang.Boolean.compare ( syncStatus1 , syncStatus2 ) ; }

Target:
private boolean extractSyncStatus ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { return ( iface != null ) && ( iface.getNetworkImplementationDetails ( ) . isInSync ( ) ) ; }
Source:
protected boolean canDoAction ( ) { Q validator = getProfileValidator ( ) ; return ( ( validate ( validator.profileIsSet ( ) ) ) && ( validate ( validator.profileExists ( ) ) ) ) && ( validate ( validator.isLastProfileInParentEntity ( ) ) ) ; }

Target:
protected boolean validate ( ) { Q validator = getProfileValidator ( ) ; return ( ( ( validate ( validator.profileIsSet ( ) ) ) && ( validate ( validator.profileExists ( ) ) ) ) && ( validate ( validator.isLastProfileInParentEntity ( ) ) ) ) && ( validate ( validator.profileNotUsed ( ) ) ) ; }
Source:
public static void getTemplateListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.TemplateConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesByStoragePoolId , new org.ovirt.engine.core.common.queries.GetVmTemplatesByStoragePoolIdParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getStorageDomainList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getVdsGroupId ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_VM ) ) ; return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getClusterId ( ) , org.ovirt.engine.core.common.VdcObjectType.Cluster , org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_VM ) ) ; return permissionList ; }
Source:
public void canDoActionShareableDiskVolumeFormatSucceeds ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createShareableDiskImage ( ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( image ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , Version.v3_1 ) ; mockStoragePoolIsoMap ( ) ; runAndAssertCanDoActionSuccess ( ) ; }

Target:
public void canDoActionShareableDiskVolumeFormatSucceeds ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createShareableDiskImage ( ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( image ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , Version.v3_1 ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; runAndAssertCanDoActionSuccess ( ) ; }
Source:
protected void service ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { java.lang.String scope = java.lang.String.format ( "ovirt-app-admin ovirt-app-portal ovirt-ext=auth:sequence-priority=%s" , org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getProperty ( authSequencePriorityPropertyName ) ) ; request.getSession ( true ) . setAttribute ( "app_url" , request.getParameter ( "app_url" ) ) ; java.lang.String redirectUri = java.lang.String.format ( "%s://%s:%s%s" , request.getScheme ( ) , org.ovirt.engine.core.aaa.filters.FiltersHelper.getRedirectUriServerName ( request.getServerName ( ) ) , request.getServerPort ( ) , postActionUrl ) ; response.sendRedirect ( new org.ovirt.engine.core.uutils.net.URLBuilder ( org.ovirt.engine.core.aaa.filters.FiltersHelper.getEngineSsoUrl ( request ) , "/oauth/authorize" ) . addParameter ( "client_id" , org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getProperty ( "ENGINE_SSO_CLIENT_ID" ) ) . addParameter ( "response_type" , "code" ) . addParameter ( "engine_url" , org.ovirt.engine.core.aaa.filters.FiltersHelper.getEngineUrl ( request ) ) . addParameter ( "redirect_uri" , redirectUri ) . addParameter ( "scope" , scope ) . build ( ) ) ; }

Target:
protected void service ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { org.ovirt.engine.core.aaa.servlet.SsoLoginServlet.log.debug ( "Entered SsoLoginServlet" ) ; java.lang.String scope = java.lang.String.format ( "ovirt-app-admin ovirt-app-portal ovirt-ext=auth:sequence-priority=%s" , org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getProperty ( authSequencePriorityPropertyName ) ) ; java.lang.String redirectUri = java.lang.String.format ( "%s://%s:%s%s" , request.getScheme ( ) , org.ovirt.engine.core.aaa.filters.FiltersHelper.getRedirectUriServerName ( request.getServerName ( ) ) , request.getServerPort ( ) , postActionUrl ) ; java.lang.String url = new org.ovirt.engine.core.uutils.net.URLBuilder ( org.ovirt.engine.core.aaa.filters.FiltersHelper.getEngineSsoUrl ( request ) , "/oauth/authorize" ) . addParameter ( "client_id" , org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getProperty ( "ENGINE_SSO_CLIENT_ID" ) ) . addParameter ( "response_type" , "code" ) . addParameter ( "app_url" , request.getParameter ( "app_url" ) ) . addParameter ( "engine_url" , org.ovirt.engine.core.aaa.filters.FiltersHelper.getEngineUrl ( request ) ) . addParameter ( "redirect_uri" , redirectUri ) . addParameter ( "scope" , scope ) . build ( ) ; org.ovirt.engine.core.aaa.servlet.SsoLoginServlet.log.debug ( "Redirecting to '{}'" , url ) ; response.sendRedirect ( url ) ; }
Source:
public boolean isProxyHostAvailable ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.bll.pm.FenceProxyLocator proxyHostLocator = getProxyLocator ( vds ) ; if ( ! ( proxyHostLocator.isProxyHostAvailable ( ) ) ) { messages.add ( VdcBllMessages.VDS_NO_VDS_PROXY_FOUND.name ( ) ) ; return false ; } else { return true ; } }

Target:
public boolean isProxyHostAvailable ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.bll.pm.FenceProxyLocator proxyHostLocator = getProxyLocator ( vds ) ; if ( ! ( proxyHostLocator.isProxyHostAvailable ( ) ) ) { messages.add ( EngineMessage.VDS_NO_VDS_PROXY_FOUND.name ( ) ) ; return false ; } else { return true ; } }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > snapshotsList = org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getDbFacade ( ) . getSnapshotDao ( ) . getAll ( org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getQueryReturnValue ( ) . setReturnValue ( snapshotsList ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > snapshotsList = snapshotDao.getAll ( org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsByVmIdQuery.getQueryReturnValue ( ) . setReturnValue ( snapshotsList ) ; }
Source:
protected void AsyncSearch ( ) { super . AsyncSearch ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getEntity ( ) ) ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.GetStorageDomainsByVmTemplateIdQueryParameters ( template.getId ( ) ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }

Target:
protected void asyncSearch ( ) { super . asyncSearch ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getEntity ( ) ) ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.GetStorageDomainsByVmTemplateIdQueryParameters ( template.getId ( ) ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getHostPublicKey ( 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.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 , true ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 , true ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
private static void mockStorageDomainStatic ( org.ovirt.engine.core.bll.ImportVmTemplateCommand command , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { final org.ovirt.engine.core.dao.StorageDomainStaticDAO dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainStaticDAO.class ) ; final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setStorageType ( storageType ) ; org.mockito.Mockito.when ( dao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; org.mockito.Mockito.doReturn ( dao ) . when ( command ) . getStorageDomainStaticDAO ( ) ; }

Target:
private static void mockStorageDomainStatic ( org.ovirt.engine.core.bll.ImportVmTemplateCommand command , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { final org.ovirt.engine.core.dao.StorageDomainStaticDao dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainStaticDao.class ) ; final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setStorageType ( storageType ) ; org.mockito.Mockito.when ( dao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; org.mockito.Mockito.doReturn ( dao ) . when ( command ) . getStorageDomainStaticDao ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ! ( newModel.getName ( ) . getEntity ( ) . equals ( getName ( ) . getEntity ( ) ) ) ) { getName ( ) . getEntityChangedEvent ( ) . removeListener ( networkNameListener ) ; newModel.getName ( ) . getEntityChangedEvent ( ) . removeListener ( this ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { defaultProfile.getName ( ) . setEntity ( getName ( ) . getEntity ( ) ) ; }
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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public 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 ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.StorageDomain incoming , org.ovirt.engine.core.common.businessentities.storage_domains entity ) { org.ovirt.engine.core.common.businessentities.storage_domain_static updated = getMapper ( modelType , org.ovirt.engine.core.common.businessentities.storage_domain_static.class ) . map ( incoming , entity.getStorageStaticData ( ) ) ; return new org.ovirt.engine.core.common.action.StorageDomainManagementParameter ( updated ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.StorageDomain incoming , org.ovirt.engine.core.common.businessentities.storage_domains entity ) { org.ovirt.engine.api.model.StorageDomainType existingType = ( ( entity.getStorageStaticData ( ) ) == null ) ? null : entity.getStorageStaticData ( ) . getstorage_domain_type ( ) ; org.ovirt.engine.core.common.businessentities.storage_domain_static updated = getMapper ( modelType , org.ovirt.engine.core.common.businessentities.storage_domain_static.class ) . map ( incoming , entity.getStorageStaticData ( ) ) ; updated.setstorage_domain_type ( existingType ) ; return new org.ovirt.engine.core.common.action.StorageDomainManagementParameter ( updated ) ; }
Source:
public void send ( java.lang.String content , java.lang.String channel ) { java.util.Map < java.lang.String , java.lang.String > headers = new java.util.HashMap < > ( ) ; if ( ! ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.isEmpty ( this . transactionId ) ) ) { headers.put ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_TRANSACTION , this . transactionId ) ; } headers.put ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , channel ) ; this . transport.send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withContent ( content ) . withHeaders ( headers ) . build ( ) , key ) ; }

Target:
public void send ( java.lang.String content , java.lang.String channel ) { java.util.Map < java.lang.String , java.lang.String > headers = new java.util.HashMap < > ( ) ; if ( ! ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.isEmpty ( this . transactionId ) ) ) { headers.put ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_TRANSACTION , this . transactionId ) ; } headers.put ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , channel ) ; this . transport.send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withContent ( content.getBytes ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.UTF8 ) ) . withHeaders ( headers ) . build ( ) , key ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase runAction ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getEngineSessionId ( ) ) ; if ( ( params.getCorrelationId ( ) ) == null ) { params.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runAction ( actionType , params ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase runAction ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.ActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getEngineSessionId ( ) ) ; if ( ( params.getCorrelationId ( ) ) == null ) { params.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runAction ( actionType , params ) ; }
Source:
public static void getMaximalVmMemSize64OS ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : - 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getVmById ( 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.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setname ( "test-template" ) ; template.setorigin ( OriginType.OVIRT ) ; template.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; template.setdescription ( "test-description" ) ; template.setDbGeneration ( 2L ) ; return template ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setname ( "test-template" ) ; template.setOrigin ( OriginType.OVIRT ) ; template.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; template.setDescription ( "test-description" ) ; template.setDbGeneration ( 2L ) ; return template ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.DeleteGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { updateVolumeStatusInDb ( getParameters ( ) . getVolumeId ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_DELETE_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.DeleteGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters ( upServer.getId ( ) , getGlusterVolumeName ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { updateVolumeStatusInDb ( getParameters ( ) . getVolumeId ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_DELETE_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersByClusterService ( boolean supportsVirtService , boolean supportsGlusterService ) { final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; parameterSource.addValue ( "supports_virt_service" , supportsVirtService ) . addValue ( "supports_gluster_service" , supportsGlusterService ) ; final org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper mapper = new org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper ( ) ; return getCallsHandler ( ) . executeReadList ( "GetStoragePoolsByClusterService" , mapper , parameterSource ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage_pool getByName ( java.lang.String name ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "name" , name ) ; return getCallsHandler ( ) . executeRead ( "Getstorage_poolByName" , org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.mapper , parameterSource ) ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolNetmaskDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolNetmask ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , 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 testIsNetworkInSyncWhenIpv4GatewayBothBlank ( ) { java.util.List < java.lang.String > blankValues = java.util.Arrays.asList ( null , "" ) ; initIpv4ConfigurationStaticBootProtocol ( Ipv4BootProtocol.STATIC_IP ) ; int blankIndex = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( 2 ) ; ipv4Address.setGateway ( blankValues.get ( blankIndex ) ) ; iface.setIpv4Gateway ( blankValues.get ( ( blankIndex ^ 1 ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
private void updateCommandResult ( final org.ovirt.engine.core.compat.Guid commandId , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = commandsRepository.getCommandEntity ( commandId ) ; cmdEntity.setReturnValue ( result ) ; if ( ! ( result.isValid ( ) ) ) { cmdEntity.setCommandStatus ( CommandStatus.FAILED ) ; } commandsRepository.persistCommand ( cmdEntity ) ; }

Target:
private void updateCommandResult ( final org.ovirt.engine.core.compat.Guid commandId , final org.ovirt.engine.core.common.action.ActionReturnValue result ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = commandsRepository.getCommandEntity ( commandId ) ; cmdEntity.setReturnValue ( result ) ; if ( ! ( result.isValid ( ) ) ) { cmdEntity.setCommandStatus ( CommandStatus.FAILED ) ; } commandsRepository.persistCommand ( cmdEntity ) ; }
Source:
public static void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static 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.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.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters params = new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( ) ; params.setFilterOutExistingHosts ( filterOutExistingHosts ) ; params.setProviderId ( providerId ) ; params.setSearchFilter ( searchFilter ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , params , aQuery ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VM v ) { return ( v.getMigrationSupport ( ) ) == ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getPrimarySources ( 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 ) { final int highUtilization = tryParseWithDefault ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.EvenDistributionBalancePolicyUnit.HIGH_UTILIZATION ) , getHighUtilizationDefaultValue ( ) ) ; final int cpuOverCommitDurationMinutes = tryParseWithDefault ( parameters.get ( "CpuOverCommitDurationMinutes" ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.CpuOverCommitDurationMinutes ) ) ; return getOverUtilizedCPUHosts ( candidateHosts , highUtilization , cpuOverCommitDurationMinutes ) ; }
Source:
public void refreshDetails ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterRemoveBricksStatus ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue vdcValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity statusEntity = vdcValue.getReturnValue ( ) ; if ( statusEntity != null ) { showStatus ( statusEntity ) ; } } } ) , volumeEntity.getClusterId ( ) , volumeEntity.getId ( ) , getBricks ( ) ) ; }

Target:
public void refreshDetails ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterRemoveBricksStatus ( new org.ovirt.engine.ui.uicommonweb.models.gluster.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity statusEntity = returnValue.getReturnValue ( ) ; if ( statusEntity != null ) { showStatus ( statusEntity ) ; } } } ) , volumeEntity.getClusterId ( ) , volumeEntity.getId ( ) , getBricks ( ) ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterVolumeSnapshotListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getCreateSnapshotCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditSnapshotScheduleCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddParameterCommand ( ) ) ) { return addParameterPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditParameterCommand ( ) ) ) { return editParameterPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
private void removeAllLabelsByVfsConfigId ( org.ovirt.engine.core.compat.Guid vfsConfigId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = createVfsConfigIdParameter ( vfsConfigId ) ; getCallsHandler ( ) . executeModification ( "DeleteAllvfsConfigLabels" , parameterSource ) ; }

Target:
private void massLabelsUpdate ( org.ovirt.engine.core.compat.Guid vfsConfigId , java.util.Set < java.lang.String > labels ) { java.util.List < org.springframework.jdbc.core.namedparam.MapSqlParameterSource > executions = new java.util.ArrayList < > ( labels.size ( ) ) ; for ( java.lang.String label : labels ) { executions.add ( createLabelParametersMapper ( vfsConfigId , label ) ) ; } getCallsHandler ( ) . executeStoredProcAsBatch ( "InsertVfsConfigLabel" , executions ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getResetCommand ( ) ) ) { Reset ( ) ; } else if ( command == ( getExpandAllCommand ( ) ) ) { ExpandAll ( ) ; } else if ( command == ( getCollapseAllCommand ( ) ) ) { CollapseAll ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getResetCommand ( ) ) ) { reset ( ) ; } else if ( command == ( getExpandAllCommand ( ) ) ) { expandAll ( ) ; } else if ( command == ( getCollapseAllCommand ( ) ) ) { collapseAll ( ) ; } }
Source:
public static void doTar ( java.io.OutputStream os , java.io.File base ) throws java.io.IOException , java.lang.SecurityException { if ( ! ( base.exists ( ) ) ) { throw new java.io.FileNotFoundException ( java.lang.String.format ( "File or directory %1$s not found" , base ) ) ; } try ( org.apache.commons.compress.archivers.tar.TarArchiveOutputStream archive = new org.apache.commons.compress.archivers.tar.TarArchiveOutputStream ( os ) ) { archive.setLongFileMode ( TarArchiveOutputStream.LONGFILE_GNU ) ; org.ovirt.engine.core.utils.archivers.tar.Tar._recurse ( archive , base , "./" ) ; } }

Target:
public static void doTar ( java.io.OutputStream os , java.io.File base ) throws java.io.IOException , java.lang.SecurityException { if ( ! ( base.exists ( ) ) ) { throw new java.io.FileNotFoundException ( java.lang.String.format ( "File or directory %1$s not found" , base ) ) ; } try ( org.apache.commons.compress.archivers.tar.TarArchiveOutputStream archive = new org.apache.commons.compress.archivers.tar.TarArchiveOutputStream ( os ) ) { archive.setLongFileMode ( TarArchiveOutputStream.LONGFILE_GNU ) ; org.ovirt.engine.core.utils.archivers.tar.Tar.recurse ( archive , base , "./" ) ; } }