auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveGroup , org.ovirt.engine.core.common.action.IdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testAddGroupWithExplicitDirectoryName ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetDomainList , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , setUpDomains ( ) ) ; setUpGetEntityExpectations ( ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ":: name=" ) + ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES_WITH_NO_DOMAIN [ 0 ] ) ) , SearchType.DirectoryGroup , getDirectoryGroup ( 0 ) ) ; org.ovirt.engine.core.common.businessentities.aaa.DbGroup dbGroup = new org.ovirt.engine.core.common.businessentities.aaa.DbGroup ( getDirectoryGroup ( 0 ) ) ; setUpCreationExpectations ( VdcActionType.AddGroup , org.ovirt.engine.core.common.action.AddGroupParameters.class , new java.lang.String [ ] { "GroupToAdd" } , new java.lang.Object [ ] { dbGroup } , true , true , dbGroup.getId ( ) , VdcQueryType.GetDbGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { dbGroup.getId ( ) } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.Domain domain = new org.ovirt.engine.api.model.Domain ( ) ; domain.setName ( org.ovirt.engine.api.restapi.resource.aaa.DOMAIN ) ; domain.setId ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( domain.getName ( ) ) ) ; org.ovirt.engine.api.model.Group model = new org.ovirt.engine.api.model.Group ( ) ; model.setName ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES_WITH_NO_DOMAIN [ 0 ] ) ; model.setDomain ( domain ) ; javax.ws.rs.core.Response response = collection.add ( model ) ; assertEquals ( 201 , response.getStatus ( ) ) ; assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.Group ) ) ; verifyModel ( ( ( org.ovirt.engine.api.model.Group ) ( response.getEntity ( ) ) ) , 0 ) ; }
Source:
protected void lockVmWithCompensationIfNeeded ( ) { log.infoFormat ( "Locking VM(id = {0}) {1} compensation." , org.ovirt.engine.core.bll.VmCommand.getVmId ( ) , ( org.ovirt.engine.core.bll.VmCommand.isInternalExecution ( ) ? "without" : "with" ) ) ; if ( org.ovirt.engine.core.bll.VmCommand.isInternalExecution ( ) ) { org.ovirt.engine.core.bll.VmHandler.checkStatusAndLockVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; } else { org.ovirt.engine.core.bll.VmHandler.checkStatusAndLockVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } }

Target:
protected void lockVmWithCompensationIfNeeded ( ) { log.info ( "Locking VM(id = '{}') compensation." , org.ovirt.engine.core.bll.VmCommand.getVmId ( ) , ( org.ovirt.engine.core.bll.VmCommand.isInternalExecution ( ) ? "without" : "with" ) ) ; if ( org.ovirt.engine.core.bll.VmCommand.isInternalExecution ( ) ) { org.ovirt.engine.core.bll.VmHandler.checkStatusAndLockVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; } else { org.ovirt.engine.core.bll.VmHandler.checkStatusAndLockVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } }
Source:
public void setCustomValuesOverridesDoesNotAffectsOtherKeys ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase underTest = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key1 = "foo" ; final java.lang.String key2 = "bar" ; underTest.appendCustomValue ( key2 , "test value 2" , null ) ; doSetCustomValuesTest ( underTest , key1 ) ; org.junit.Assert.assertThat ( underTest.getCustomValue ( key2 ) , org.hamcrest.Matchers.is ( "test value 2" ) ) ; }

Target:
public void setCustomValuesOverridesDoesNotAffectsOtherKeys ( ) { final java.lang.String key1 = "foo" ; final java.lang.String key2 = "bar" ; b.appendCustomValue ( key2 , "test value 2" , null ) ; doSetCustomValuesTest ( b , key1 ) ; org.junit.Assert.assertThat ( b.getCustomValue ( key2 ) , org.hamcrest.Matchers.is ( "test value 2" ) ) ; }
Source:
public void testGetEntityNameByIdAndTypeForVM ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = vmStaticDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_ID ) ; org.junit.Assert.assertNotNull ( vmStatic ) ; java.lang.String name = vmStatic.getName ( ) ; org.junit.Assert.assertEquals ( name , dao.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_STATIC_GUID , VdcObjectType.VM ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForVM ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = vmStaticDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( vmStatic ) ; java.lang.String name = vmStatic.getName ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( name , dao.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_STATIC_GUID , VdcObjectType.VM ) ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return popupProvider.get ( ) ; } else { 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.configure.scheduling.affinity_groups.list.ClusterAffinityGroupListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { networkEditor.setLabel ( constants.profileNetworkIntefacePopup ( ) ) ; nameEditor.setLabel ( constants.nameNetworkIntefacePopup ( ) ) ; portMirroringEditor.setLabel ( constants.portMirroringNetworkIntefacePopup ( ) ) ; publicUseEditor.setLabel ( constants.profilePublicUseLabel ( ) ) ; }

Target:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { networkEditor.setLabel ( constants.networkProfilePopup ( ) ) ; nameEditor.setLabel ( constants.nameNetworkIntefacePopup ( ) ) ; portMirroringEditor.setLabel ( constants.portMirroringNetworkIntefacePopup ( ) ) ; publicUseEditor.setLabel ( constants.profilePublicUseLabel ( ) ) ; }
Source:
public void AutoLogin ( org.ovirt.engine.core.common.users.VdcUser user ) { loggingInAutomatically = true ; getUserName ( ) . setEntity ( user.getUserName ( ) ) ; getDomain ( ) . setSelectedItem ( user.getDomainControler ( ) ) ; disableLoginScreen ( ) ; setLoggedUser ( user ) ; raiseLoggedInEvent ( ) ; }

Target:
public void autoLogin ( org.ovirt.engine.core.common.users.VdcUser user ) { loggingInAutomatically = true ; getUserName ( ) . setEntity ( user.getUserName ( ) ) ; getDomain ( ) . setSelectedItem ( user.getDomainControler ( ) ) ; disableLoginScreen ( ) ; setLoggedUser ( user ) ; raiseLoggedInEvent ( ) ; }
Source:
public void Rollback ( ) { log.errorFormat ( "Transaction rolled-back for command: {0}." , this . getClass ( ) . getName ( ) ) ; if ( ( this ) instanceof org.ovirt.engine.core.common.Quotable ) { ( ( org.ovirt.engine.core.common.Quotable ) ( this ) ) . rollbackQuota ( ) ; } cancelTasks ( ) ; }

Target:
public void Rollback ( ) { log.errorFormat ( "Transaction rolled-back for command: {0}." , this . getClass ( ) . getName ( ) ) ; try { if ( ( this ) instanceof org.ovirt.engine.core.bll.quota.Quotable ) { ( ( org.ovirt.engine.core.bll.quota.Quotable ) ( this ) ) . rollbackQuota ( ) ; } } catch ( java.lang.NullPointerException e ) { log.debug ( "RollbackQuota: failed (may be because quota is disabled)" , e ) ; } cancelTasks ( ) ; }
Source:
public static void initUniqueOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }

Target:
public static void initUniqueOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( new org.ovirt.engine.core.searchbackend.OsValueAutoCompleter ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dao.DbGroupDAO dao = org.ovirt.engine.core.bll.aaa.AddGroupCommand.getAdGroupDAO ( ) ; org.ovirt.engine.core.common.businessentities.DbGroup groupToAdd = org.ovirt.engine.core.bll.aaa.AddGroupCommand.getParameters ( ) . getGroupToAdd ( ) ; org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = dao.getByExternalId ( groupToAdd.getDomain ( ) , groupToAdd.getExternalId ( ) ) ; if ( dbGroup == null ) { dao.save ( groupToAdd ) ; } else { dao.update ( dbGroup ) ; groupToAdd = dbGroup ; } setActionReturnValue ( groupToAdd.getId ( ) ) ; org.ovirt.engine.core.bll.aaa.AddGroupCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.dao.DbGroupDAO dao = org.ovirt.engine.core.bll.aaa.AddGroupCommand.getAdGroupDAO ( ) ; org.ovirt.engine.core.common.businessentities.aaa.DbGroup groupToAdd = org.ovirt.engine.core.bll.aaa.AddGroupCommand.getParameters ( ) . getGroupToAdd ( ) ; org.ovirt.engine.core.common.businessentities.aaa.DbGroup dbGroup = dao.getByExternalId ( groupToAdd.getDomain ( ) , groupToAdd.getExternalId ( ) ) ; if ( dbGroup == null ) { dao.save ( groupToAdd ) ; } else { dao.update ( dbGroup ) ; groupToAdd = dbGroup ; } setActionReturnValue ( groupToAdd.getId ( ) ) ; org.ovirt.engine.core.bll.aaa.AddGroupCommand.setSucceeded ( true ) ; }
Source:
private static void getAllChildVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces , org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback callback ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; for ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : ifaces ) { queryTypeList.add ( VdcQueryType.GetAllChildVlanInterfaces ) ; parametersList.add ( new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleQueries ( queryTypeList , parametersList , callback ) ; }

Target:
private static void getAllChildVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces , org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback callback ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; for ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : ifaces ) { queryTypeList.add ( VdcQueryType.GetAllChildVlanInterfaces ) ; parametersList.add ( new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleQueries ( queryTypeList , parametersList , callback ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { expandTree ( getDataDisplayWidget ( ) . getRootTreeNode ( ) , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ITEM_LEVEL ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { expandTree ( getDataDisplayWidget ( ) . getRootTreeNode ( ) , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ITEM_LEVEL ) ; } else { expandPathUsingMap ( getDataDisplayWidget ( ) . getRootTreeNode ( ) , nodeStateMap ) ; } }
Source:
protected void ItemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.core.compat.NotifyCollectionChangedEventArgs e ) { super . ItemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.DataCenter ) ) ) { org.ovirt.engine.core.common.businessentities.storage_pool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.FirstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage_pool > Cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.DataCenterPredicate ( dataCenter.getId ( ) ) ) ) ; } }

Target:
protected void ItemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . ItemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.DataCenter ) ) ) { org.ovirt.engine.core.common.businessentities.storage_pool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.FirstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage_pool > Cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.DataCenterPredicate ( dataCenter.getId ( ) ) ) ) ; } }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetTagByTagId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; 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 ( QueryType.GetTagByTagId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Snapshot model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Snapshot model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > findAllVDSByPmEnabled ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS i : items ) { if ( i.getpm_enabled ( ) ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > findAllVDSByPmEnabled ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS i : items ) { if ( i.isPmEnabled ( ) ) { ret.add ( i ) ; } } return ret ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( PropertyChangedEventArgs.PROGRESS.equals ( pcArgs.propertyName ) ) { externalDiskPanel.clear ( ) ; if ( ( sanStorageModel.getProgress ( ) ) != null ) { externalDiskPanel.add ( progressContent ) ; } else { externalDiskPanel.add ( storageView ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( PropertyChangedEventArgs.PROGRESS.equals ( args.propertyName ) ) { externalDiskPanel.clear ( ) ; if ( ( sanStorageModel.getProgress ( ) ) != null ) { externalDiskPanel.add ( progressContent ) ; } else { externalDiskPanel.add ( storageView ) ; } } }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
private void generateEnum ( org.ovirt.api.metamodel.concepts.EnumType type ) { javaBuffer.clear ( ) ; org.ovirt.api.metamodel.tool.JavaClassName enumName = getEnumName ( type ) ; javaBuffer.setClassName ( enumName ) ; generateEnumSource ( type ) ; try { javaBuffer.write ( outDir ) ; } catch ( java.io.IOException exception ) { exception.printStackTrace ( ) ; } }

Target:
private void generateEnum ( org.ovirt.api.metamodel.concepts.EnumType type ) { javaBuffer = new org.ovirt.api.metamodel.tool.JavaClassBuffer ( ) ; org.ovirt.api.metamodel.tool.JavaClassName enumName = getEnumName ( type ) ; javaBuffer.setClassName ( enumName ) ; generateEnumSource ( type ) ; try { javaBuffer.write ( outDir ) ; } catch ( java.io.IOException exception ) { exception.printStackTrace ( ) ; } }
Source:
public void testUpdateBootOrderInBatch ( ) { org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = dao.get ( getExistingEntityId ( ) ) ; int newBootOrderValue = ( vmDevice.getBootOrder ( ) ) + 1 ; org.junit.Assert.assertTrue ( org.apache.commons.lang.StringUtils.isNotBlank ( vmDevice.getAddress ( ) ) ) ; vmDevice.setBootOrder ( newBootOrderValue ) ; dao.updateBootOrderInBatch ( java.util.Arrays.asList ( vmDevice ) ) ; dao.get ( getExistingEntityId ( ) ) ; org.junit.Assert.assertEquals ( vmDevice.getBootOrder ( ) , newBootOrderValue ) ; }

Target:
public void testUpdateBootOrderInBatch ( ) { org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = dao.get ( getExistingEntityId ( ) ) ; int newBootOrderValue = ( vmDevice.getBootOrder ( ) ) + 1 ; org.junit.Assert.assertTrue ( org.apache.commons.lang.StringUtils.isNotBlank ( vmDevice.getAddress ( ) ) ) ; vmDevice.setBootOrder ( newBootOrderValue ) ; dao.updateBootOrderInBatch ( java.util.Collections.singletonList ( vmDevice ) ) ; dao.get ( getExistingEntityId ( ) ) ; org.junit.Assert.assertEquals ( vmDevice.getBootOrder ( ) , newBootOrderValue ) ; }
Source:
public org.ovirt.engine.core.compat.Guid mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { return org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "storage_id" ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage_domains getPermittedStorageDomainsById ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup , org.ovirt.engine.core.compat.Guid storageDomainId ) { return getCallsHandler ( ) . executeRead ( "Getstorage_domain_by_id_with_permitted_action" , org.ovirt.engine.core.dao.StorageDomainDAODbFacadeImpl.StorageDomainRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userId ) . addValue ( "action_group_id" , actionGroup.getId ( ) ) . addValue ( "storage_id" , storageDomainId ) ) ; }
Source:
public void testGetByNameReturnsItemOfThatName ( ) { java.lang.String itemName = "name" ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem item = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , itemName ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Collections.singletonList ( item ) ) ; org.junit.Assert.assertThat ( map.get ( itemName ) , org.hamcrest.CoreMatchers.is ( item ) ) ; }

Target:
public void testGetByNameReturnsItemOfThatName ( ) { java.lang.String itemName = "name" ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem item = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , itemName ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Collections.singletonList ( item ) ) ; org.hamcrest.MatcherAssert.assertThat ( map.get ( itemName ) , org.hamcrest.CoreMatchers.is ( item ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM mockVMFromDAO ( org.ovirt.engine.core.compat.Guid requestedUser ) { org.ovirt.engine.core.common.businessentities.VM expectedVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.dao.VmDAO vmDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDAO.class ) ; org.mockito.Mockito.when ( vmDaoMock.getAllForUserWithGroupsAndUserRoles ( requestedUser ) ) . thenReturn ( java.util.Collections.singletonList ( expectedVM ) ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVmDao ( ) ) . thenReturn ( vmDaoMock ) ; return expectedVM ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM mockVMFromDao ( org.ovirt.engine.core.compat.Guid requestedUser ) { org.ovirt.engine.core.common.businessentities.VM expectedVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.dao.VmDao vmDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDao.class ) ; org.mockito.Mockito.when ( vmDaoMock.getAllForUserWithGroupsAndUserRoles ( requestedUser ) ) . thenReturn ( java.util.Collections.singletonList ( expectedVM ) ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVmDao ( ) ) . thenReturn ( vmDaoMock ) ; return expectedVM ; }
Source:
public void updateCompletedJobAndSteps ( final org.ovirt.engine.core.common.job.Job job ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.job.Step step : job.getSteps ( ) ) { if ( ( step.getStatus ( ) ) == ( org.ovirt.engine.core.common.job.JobExecutionStatus.STARTED ) ) { step.setStatus ( job.getStatus ( ) ) ; step.setEndTime ( job.getEndTime ( ) ) ; } } jobDao.update ( job ) ; return null ; } } ) ; }

Target:
public org.ovirt.engine.core.common.job.Job getJobWithSteps ( final org.ovirt.engine.core.compat.Guid jobId ) { org.ovirt.engine.core.common.job.Job job = jobDao.get ( jobId ) ; if ( job != null ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > jobSubjectEntity = jobSubjectEntityDao.getJobSubjectEntityByJobId ( jobId ) ; job.setJobSubjectEntities ( jobSubjectEntity ) ; loadJobSteps ( job ) ; } return job ; }
Source:
private void ensureFramework ( org.ovirt.engineextensions.aaa.ldap.ExtMap input ) throws java.lang.Exception { if ( ! ( frameworkInitialized ) ) { synchronized ( this ) { if ( ! ( frameworkInitialized ) ) { framework.getGlobals ( ) . put ( ExtensionUtil.VARS_AUTHN_ENABLE , "1" ) ; framework.open ( ) ; frameworkInitialized = true ; } } } }

Target:
private void ensureFramework ( org.ovirt.engineextensions.aaa.ldap.ExtMap input ) throws java.lang.Exception { if ( ! ( frameworkInitialized ) ) { synchronized ( this ) { if ( ! ( frameworkInitialized ) ) { try { framework.getGlobals ( ) . put ( ExtensionUtil.VARS_AUTHN_ENABLE , "1" ) ; framework.open ( ) ; frameworkInitialized = true ; } catch ( java.lang.Exception e ) { org.ovirt.engineextensions.aaa.ldap.AuthnExtension.log.warn ( "{} Cannot initialize LDAP framework, deferring initialization. Error: {}" , logPrefix , e.getMessage ( ) ) ; throw e ; } } } } }
Source:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( java.lang.String violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName , org.ovirt.engine.core.common.errors.EngineMessage message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( referringId != null ) && ( referringName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , referringId , referringName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNameAndIdIncoherent ( referringId , referringName , map ) ) ) ) ; }

Target:
private boolean isNewAttachment ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { return networkAttachmentId == null ; }
Source:
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.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( 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.Cluster > ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > convert ( java.lang.Object source ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = getClusterByServiceList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) , supportsVirtService , supportsGlusterService ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < > ( ) ; }
Source:
protected void revertTasks ( ) { org.ovirt.engine.core.compat.Guid destImageId = org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ; org.ovirt.engine.core.common.action.RemoveImageParameters p = new org.ovirt.engine.core.common.action.RemoveImageParameters ( destImageId ) ; p.setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , destImageId ) ) ; p.setParentParameters ( p ) ; p.setParentCommand ( VdcActionType.RemoveImage ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = checkAndPerformRollbackUsingCommand ( VdcActionType.RemoveImage , p , null ) ; if ( returnValue.getSucceeded ( ) ) { startPollingAsyncTasks ( returnValue.getInternalVdsmTaskIdList ( ) ) ; } }

Target:
protected void revertTasks ( ) { org.ovirt.engine.core.compat.Guid destImageId = org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ; org.ovirt.engine.core.common.action.RemoveImageParameters p = new org.ovirt.engine.core.common.action.RemoveImageParameters ( destImageId ) ; p.setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , destImageId ) ) ; p.setParentParameters ( p ) ; p.setParentCommand ( ActionType.RemoveImage ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = checkAndPerformRollbackUsingCommand ( ActionType.RemoveImage , p , null ) ; if ( returnValue.getSucceeded ( ) ) { startPollingAsyncTasks ( returnValue.getInternalVdsmTaskIdList ( ) ) ; } }
Source:
public void canDisableVirtioScsiSuccess ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( disk.getId ( ) , vm.getId ( ) ) ; dve.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setDiskVmElements ( java.util.Collections.singletonList ( dve ) ) ; org.junit.Assert.assertThat ( validator.canDisableVirtioScsi ( java.util.Collections.singletonList ( disk ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void canDisableVirtioScsiSuccess ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( disk.getId ( ) , vm.getId ( ) ) ; dve.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setDiskVmElements ( java.util.Collections.singletonList ( dve ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.canDisableVirtioScsi ( java.util.Collections.singletonList ( disk ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public static boolean vmDeviceChanged ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , java.lang.String device , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = ( device != null ) ? org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdTypeAndDevice ( vmId , deviceType , device ) : org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdAndType ( vmId , deviceType ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }

Target:
public static boolean vmDeviceChanged ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , org.ovirt.engine.core.common.businessentities.VmDevice device ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceChanged ( vmId , deviceType , null , device ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( masterDomain.getStorageStaticData ( ) ) ; masterDomain.setStorageDomainType ( StorageDomainType.Data ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . update ( masterDomain.getStorageStaticData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( masterDomain.getStorageStaticData ( ) ) ; masterDomain.setStorageDomainType ( StorageDomainType.Data ) ; getDbFacade ( ) . getStorageDomainStaticDao ( ) . update ( masterDomain.getStorageStaticData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigReset ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigReset ( volumeName , slaveHost , slaveVolumeName , configKey ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigReset ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String userName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigReset ( volumeName , slaveHost , slaveVolumeName , configKey , userName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > > aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
public void testGetValue ( ) throws java.lang.Exception { final java.lang.String key = "MaxNumberOfHostsInStoragePool" ; org.ovirt.engine.core.config.EngineConfigLogicTest.log.info ( ( "getValue: Testing fetch of " + key ) ) ; org.ovirt.engine.core.config.entity.ConfigKey configKey = org.ovirt.engine.core.config.EngineConfigLogicTest.engineConfigLogic.fetchConfigKey ( key , null ) ; org.ovirt.engine.core.config.EngineConfigLogicTest.log.info ( ( "getValue: got: " + configKey ) ) ; org.junit.Assert.assertNotNull ( configKey.getValue ( ) ) ; }

Target:
public void testGetValue ( ) throws java.lang.Exception { final java.lang.String key = "MaxNumberOfHostsInStoragePool" ; org.ovirt.engine.core.config.EngineConfigLogicTest.log.info ( "getValue: Testing fetch of {}" , key ) ; org.ovirt.engine.core.config.entity.ConfigKey configKey = org.ovirt.engine.core.config.EngineConfigLogicTest.engineConfigLogic.fetchConfigKey ( key , null ) ; org.ovirt.engine.core.config.EngineConfigLogicTest.log.info ( "getValue: got: {}" , configKey ) ; org.junit.Assert.assertNotNull ( configKey.getValue ( ) ) ; }
Source:
public static void getDataCenterById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public static void decreasePendingVms ( org.ovirt.engine.core.compat.Guid vdsId , int numOfCpus , int minAllocatedMem , java.lang.String vmName ) { org.ovirt.engine.core.bll.VmHandler.getVdsDynamicDao ( ) . updatePartialVdsDynamicCalc ( vdsId , 0 , ( - numOfCpus ) , ( - minAllocatedMem ) , 0 , 0 ) ; org.ovirt.engine.core.bll.VmHandler.log.debugFormat ( "Decreasing vds {0} pending vcpu count by {1} and vmem size by {2} (Vm: {3})" , vdsId , numOfCpus , minAllocatedMem , vmName ) ; }

Target:
private static void decreasePendingResources ( org.ovirt.engine.core.compat.Guid vdsId , int numOfCpus , int minAllocatedMem , java.lang.String vmName ) { org.ovirt.engine.core.bll.VmHandler.getVdsDynamicDao ( ) . updatePartialVdsDynamicCalc ( vdsId , 0 , ( - numOfCpus ) , ( - minAllocatedMem ) , 0 , 0 ) ; org.ovirt.engine.core.bll.VmHandler.log.debug ( "Decreasing vds '{}' pending vcpu count by and vmem size by (Vm '{}')" , vdsId , numOfCpus , minAllocatedMem , vmName ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.equals ( RegistrationResult.RetrievedEventDefinition ) ) { AsyncResult_Retrieved ( ) ; } if ( ev.equals ( ProvideTickEvent.Definition ) ) { SyncSearch ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.equals ( RegistrationResult.RetrievedEventDefinition ) ) { AsyncResult_Retrieved ( ) ; } if ( ev.equals ( ProvideTickEvent.Definition ) ) { SyncSearch ( ) ; } }
Source:
private void validateLockForAcquireAndWait ( org.ovirt.engine.core.utils.lock.EngineLock lock ) { if ( ( ( lock.getSharedLocks ( ) ) != null ) && ( ( lock.getExclusiveLocks ( ) . size ( ) ) > 1 ) ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.errorFormat ( "Trying to acquire or wait on shared or more than one exclussive locks {0}" , lock ) ; throw new java.lang.IllegalArgumentException ( "Trying to acquire or wait on shared or more than one exclussive locks" ) ; } }

Target:
private void validateLockForAcquireAndWait ( org.ovirt.engine.core.utils.lock.EngineLock lock ) { if ( ( ( lock.getSharedLocks ( ) ) != null ) && ( ( lock.getExclusiveLocks ( ) . size ( ) ) > 1 ) ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.error ( "Trying to acquire or wait on shared or more than one exclussive locks '{}'" , lock ) ; throw new java.lang.IllegalArgumentException ( "Trying to acquire or wait on shared or more than one exclussive locks" ) ; } }
Source:
public static void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public void getNextAvailableDiskAliasNameByVMId ( 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.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void tryOtherAgent ( org.ovirt.engine.core.common.businessentities.VDSStatus lastStatus , java.util.concurrent.ExecutorCompletionService < org.ovirt.engine.core.bll.FenceVdsBaseCommand.FenceInvocationResult > ecs ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException { java.util.concurrent.Future < org.ovirt.engine.core.bll.FenceVdsBaseCommand.FenceInvocationResult > f2 ; f2 = ecs.take ( ) ; setResult ( f2 ) ; if ( ( primaryResult.isSucceeded ( ) ) || ( secondaryResult.isSucceeded ( ) ) ) { handleSpecificCommandActions ( ) ; setFenceSucceeded ( true ) ; } else { handleError ( lastStatus , primaryResult.getValue ( ) ) ; handleError ( lastStatus , secondaryResult.getValue ( ) ) ; } }

Target:
private void tryOtherConcurrentAgent ( org.ovirt.engine.core.common.businessentities.VDSStatus lastStatus , java.util.concurrent.ExecutorCompletionService < org.ovirt.engine.core.bll.FenceVdsBaseCommand.FenceInvocationResult > ecs ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException { java.util.concurrent.Future < org.ovirt.engine.core.bll.FenceVdsBaseCommand.FenceInvocationResult > f2 ; f2 = ecs.take ( ) ; setResult ( f2 ) ; if ( ( primaryResult.isSucceeded ( ) ) || ( secondaryResult.isSucceeded ( ) ) ) { handleSpecificCommandActions ( ) ; setFenceSucceeded ( true ) ; } else { handleError ( lastStatus , primaryResult.getValue ( ) , FenceAgentOrder.Primary ) ; handleError ( lastStatus , secondaryResult.getValue ( ) , FenceAgentOrder.Secondary ) ; } }