auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > createDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_domain_static > staticParts ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domain_static staticPart : staticParts ) { org.ovirt.engine.core.common.businessentities.storage_domains domain = createDomain ( staticPart ) ; if ( domain != null ) result.add ( domain ) ; } return result ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > createDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomainStatic > staticParts ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic staticPart : staticParts ) { org.ovirt.engine.core.common.businessentities.storage_domains domain = createDomain ( staticPart ) ; if ( domain != null ) result.add ( domain ) ; } return result ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel getImportModel ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel ( ) ; model.setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . importVirtualMachinesTitle ( ) ) ; model.setHashName ( "import_virtual_machine" ) ; model.setEntity ( getEntity ( ) ) ; return model ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel getImportModel ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel ( ) ; model.setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . importVirtualMachinesTitle ( ) ) ; model.setHelpTag ( HelpTag.import_virtual_machine ) ; model.setHashName ( "import_virtual_machine" ) ; model.setEntity ( getEntity ( ) ) ; return model ; }
Source:
private boolean networkMoved ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment updatedNetworkAttachment , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment originalNetworkAttachment ) { return ( originalNetworkAttachment != null ) && ( ( ! ( originalNetworkAttachment.getNicId ( ) . equals ( updatedNetworkAttachment.getNicId ( ) ) ) ) || ( ! ( originalNetworkAttachment.getNetworkId ( ) . equals ( updatedNetworkAttachment.getNetworkId ( ) ) ) ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getRemovedBonds ( ) { if ( ( removedBonds ) == null ) { java.util.Set < org.ovirt.engine.core.compat.Guid > removedBondIds = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedBonds ( ) ; removedBonds = org.ovirt.engine.core.common.businessentities.Entities.filterEntitiesByRequiredIds ( removedBondIds , getExistingNics ( ) ) ; } return removedBonds ; }
Source:
private void doTestBadAddDataCenter ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.AddEmptyStoragePool , org.ovirt.engine.core.common.action.StoragePoolManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; org.ovirt.engine.api.model.DataCenter model = org.ovirt.engine.api.restapi.resource.BackendDataCentersResourceTest.getModel ( 0 ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadAddDataCenter ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.AddEmptyStoragePool , org.ovirt.engine.core.common.action.StoragePoolManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; org.ovirt.engine.api.model.DataCenter model = org.ovirt.engine.api.restapi.resource.BackendDataCentersResourceTest.getModel ( 0 ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void testFetchGlobalQuotaUsageForGlobalCluster ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByClusterGuid ( null , FixturesTool.QUOTA_GENERAL ) ; org.ovirt.engine.core.common.businessentities.QuotaCluster quotaCluster = quotaClusterList.get ( 0 ) ; org.junit.Assert.assertEquals ( true , ( ( quotaClusterList.size ( ) ) == 1 ) ) ; org.junit.Assert.assertNotNull ( quotaCluster ) ; org.junit.Assert.assertEquals ( true , ( ( quotaCluster.getMemSizeMBUsage ( ) ) > 0 ) ) ; org.junit.Assert.assertEquals ( java.lang.Integer.valueOf ( 100 ) , quotaCluster.getVirtualCpu ( ) ) ; }

Target:
public void testFetchGlobalQuotaUsageForGlobalCluster ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByClusterGuid ( null , FixturesTool.QUOTA_GENERAL ) ; org.ovirt.engine.core.common.businessentities.QuotaCluster quotaCluster = quotaClusterList.get ( 0 ) ; org.junit.Assert.assertEquals ( 1 , quotaClusterList.size ( ) ) ; org.junit.Assert.assertNotNull ( quotaCluster ) ; org.junit.Assert.assertTrue ( ( ( quotaCluster.getMemSizeMBUsage ( ) ) > 0 ) ) ; org.junit.Assert.assertEquals ( java.lang.Integer.valueOf ( 100 ) , quotaCluster.getVirtualCpu ( ) ) ; }
Source:
private void setRngDeviceToParams ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.VmManagementParametersBase parameters ) { parameters.setUpdateRngDevice ( true ) ; parameters.setRngDevice ( ( model.getIsRngEnabled ( ) . getEntity ( ) ? model.generateRngDevice ( ) : null ) ) ; }

Target:
protected boolean validateSuffix ( java.lang.String suffix , org.ovirt.engine.ui.uicommonweb.models.EntityModel entityModel ) { for ( java.lang.Object object : objectsToClone ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) . getVm ( ) ; if ( ! ( validateName ( ( ( vm.getName ( ) ) + suffix ) , entityModel , getClonedAppendedNameValidators ( object ) ) ) ) { return false ; } } return true ; }
Source:
private void addRoleColumn ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > roleColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return object.getRoleName ( ) ; } } ; roleColumn.makeSortable ( ) ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( roleColumn , constants.rolePermission ( ) , "300px" ) ; }

Target:
private void addCreationDateColum ( ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > creationDateColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractRenderedTextColumn < org.ovirt.engine.core.common.businessentities.Permission , java.util.Date > ( new org.ovirt.engine.ui.common.widget.renderer.FullDateTimeRenderer ( ) ) { @ java.lang.Override public java.util.Date getRawValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return new java.util.Date ( ( ( object.getCreationDate ( ) ) * 1000 ) ) ; } } ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( creationDateColumn , org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants.permissionsCreationDate ( ) , "300px" ) ; creationDateColumn.makeSortable ( ) ; }
Source:
public void initTable ( ) { org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . enableColumnResizing ( ) ; addTypeColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addUserColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addAuthzColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addNameSpaceColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addRoleColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addCreationDateColum ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addAddPermissionsButton ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addRemovePermissionsButton ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; }

Target:
private void addAddPermissionsButton ( ) { org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addActionButton ( new org.ovirt.engine.ui.common.widget.action.UiCommandButtonDefinition < org.ovirt.engine.core.common.businessentities.Permission > ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getEventBus ( ) , org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants.addPermission ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModel ( ) . getAddCommand ( ) ; } } ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; group.setArchitecture ( ArchitectureType.undefined ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.undefined ) ; return group ; }
Source:
public static boolean isHostedEngineDomain ( final org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { return org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.HostedEngineStorageDomainName ) . equals ( storageDomain.getName ( ) ) ; }

Target:
public boolean isHostedEngineStorageDomain ( final org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = vmDao.getAllForStorageDomain ( storageDomain.getId ( ) ) ; if ( vms == null ) { return false ; } return vms.stream ( ) . filter ( VM :: isHostedEngine ) . findAny ( ) . isPresent ( ) ; }
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.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 > ( ) ; }

Target:
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.ServerCpu > cpuList = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.ServerCpu > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) ) ; return cpuList ; } return null ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc createVG ( java.lang.String sdUUID , java.lang.String [ ] deviceList ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "LVMVolumeGroup.create" ) . withParameter ( "name" , sdUUID ) . withParameter ( "devlist" , new java.util.ArrayList < > ( java.util.Arrays.asList ( deviceList ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc prepareImage ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID , boolean allowIllegal ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Image.prepare" ) . withParameter ( "storagepoolID" , spID ) . withParameter ( "storagedomainID" , sdID ) . withParameter ( "imageID" , imageID ) . withParameter ( "volumeID" , volumeID ) . withParameter ( "allowIllegal" , allowIllegal ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc ( response ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; return new org.ovirt.engine.core.common.businessentities.AsyncTasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getVdsmTaskId ( ) , parentParameters , getParameters ( ) , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) , parentParameters.getCommandId ( ) , asyncTaskCreationInfo.getStoragePoolID ( ) , asyncTaskCreationInfo.getTaskType ( ) ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack , getReturnValue ( ) ) ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }
Source:
public void doParse_duplicateFieldIds ( ) throws com.google.gwt.core.ext.UnableToCompleteException { stubFieldIdAnnotation ( ownerTypeParentFieldTypeSubField1 , "customId" , true ) ; stubFieldIdAnnotation ( ownerTypeParentFieldTypeSubField2 , "customId" , true ) ; tested.doParse ( ownerType , new java.util.ArrayList < com.google.gwt.core.ext.typeinfo.JClassType > ( ) , "." , "IdPrefix" ) ; }

Target:
public void doParse_duplicateFieldIds ( ) { stubFieldIdAnnotation ( ownerTypeParentFieldTypeSubField1 , "customId" , true ) ; stubFieldIdAnnotation ( ownerTypeParentFieldTypeSubField2 , "customId" , true ) ; org.junit.jupiter.api.Assertions.assertThrows ( com.google.gwt.core.ext.UnableToCompleteException.class , ( ) -> tested.doParse ( ownerType , new org.ovirt.engine.ui.common.binding.ArrayList < > ( ) , "." , "IdPrefix" ) ) ; }
Source:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void getClustersHavingHosts ( 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 ) { 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 > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.HostNIC > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( ( ( NAMES.length ) + 2 ) , collection.size ( ) ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { verifyModel ( collection.get ( i ) , i ) ; } verifyMaster ( collection.get ( NAMES.length ) ) ; verifySlave ( collection.get ( ( ( NAMES.length ) + 1 ) ) ) ; }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.HostNic > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( ( ( NAMES.length ) + 2 ) , collection.size ( ) ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { verifyModel ( collection.get ( i ) , i ) ; } verifyMaster ( collection.get ( NAMES.length ) ) ; verifySlave ( collection.get ( ( ( NAMES.length ) + 1 ) ) ) ; }
Source:
public static void getSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , 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:
public void mapBackendAction ( ) { for ( org.ovirt.engine.core.common.businessentities.VmWatchdogAction action : org.ovirt.engine.core.common.businessentities.VmWatchdogAction.values ( ) ) { org.ovirt.engine.api.restapi.types.WatchdogAction apiAction = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( action , null ) ; org.junit.Assert.assertNotNull ( apiAction ) ; org.junit.Assert.assertEquals ( apiAction.name ( ) . toLowerCase ( ) , action.name ( ) . toLowerCase ( ) ) ; } }

Target:
public void mapBackendAction ( ) { for ( org.ovirt.engine.core.common.businessentities.VmWatchdogAction action : org.ovirt.engine.core.common.businessentities.VmWatchdogAction.values ( ) ) { org.ovirt.engine.api.model.WatchdogAction apiAction = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( action , null ) ; org.junit.Assert.assertNotNull ( apiAction ) ; org.junit.Assert.assertEquals ( apiAction.name ( ) . toLowerCase ( ) , action.name ( ) . toLowerCase ( ) ) ; } }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.nameProvider ( ) ) ; descriptionEditor.setLabel ( constants.descriptionProvider ( ) ) ; urlEditor.setLabel ( constants.urlProvider ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.nameProvider ( ) ) ; typeEditor.setLabel ( constants.typeProvider ( ) ) ; descriptionEditor.setLabel ( constants.descriptionProvider ( ) ) ; urlEditor.setLabel ( constants.urlProvider ( ) ) ; }
Source:
protected void unlockVm ( ) { org.ovirt.engine.core.bll.VmCommand.setVm ( null ) ; if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { setLoggingForCommand ( ) ; log.warn ( "VM is null - no unlocking" ) ; } }

Target:
protected void unlockVm ( ) { org.ovirt.engine.core.bll.VmCommand.setVm ( null ) ; if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { vmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { setLoggingForCommand ( ) ; log.warn ( "VM is null - no unlocking" ) ; } }
Source:
public void testIllegalImageReturnedByQuery ( ) { existingVm.getDiskMap ( ) . put ( existingDiskImage.getId ( ) , existingDiskImage ) ; existingVm.getImages ( ) . add ( existingDiskImage ) ; snapshotVmConfigurationHelper.markImagesIllegalIfNotInDb ( existingVm , existingSnapshotId ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk diskImage : existingVm.getDiskMap ( ) . values ( ) ) { org.junit.Assert.assertEquals ( ImageStatus.ILLEGAL , ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( diskImage ) ) . getImageStatus ( ) ) ; } }

Target:
public void testIllegalImageReturnedByQuery ( ) { existingVm.getDiskMap ( ) . put ( existingDiskImage.getId ( ) , existingDiskImage ) ; existingVm.getImages ( ) . add ( existingDiskImage ) ; snapshotVmConfigurationHelper.markImagesIllegalIfNotInDb ( existingVm , existingSnapshotId ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk diskImage : existingVm.getDiskMap ( ) . values ( ) ) { org.junit.jupiter.api.Assertions.assertEquals ( ImageStatus.ILLEGAL , ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( diskImage ) ) . getImageStatus ( ) ) ; } }
Source:
public static void getMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void isVirtioScsiEnabledForVm ( 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 ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }

Target:
public 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 long parseUnsignedInt ( java.lang.String value ) { java.math.BigInteger result = javax.xml.bind.DatatypeConverter.parseInteger ( value ) ; if ( ( result.compareTo ( org.ovirt.engine.api.utils.IntegerParser.MAX_UNSIGNED_INT ) ) > 0 ) { throw new org.ovirt.engine.api.utils.InvalidValueException ( ( ( ( "Value " + value ) + " is greater than maximum unsigned integer " ) + ( org.ovirt.engine.api.utils.IntegerParser.MAX_UNSIGNED_INT ) ) ) ; } return result.longValue ( ) ; }

Target:
public static long parseUnsignedInt ( java.lang.String value ) { if ( value.trim ( ) . equals ( "" ) ) { value = "0" ; } java.math.BigInteger result = javax.xml.bind.DatatypeConverter.parseInteger ( value ) ; if ( ( result.compareTo ( org.ovirt.engine.api.utils.IntegerParser.MAX_UNSIGNED_INT ) ) > 0 ) { throw new org.ovirt.engine.api.utils.InvalidValueException ( ( ( ( "Value " + value ) + " is greater than maximum unsigned integer " ) + ( org.ovirt.engine.api.utils.IntegerParser.MAX_UNSIGNED_INT ) ) ) ; } return result.longValue ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getReplicatedVolume ( org.ovirt.engine.core.compat.Guid volumeId , int brickCount ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getVolume ( volumeId ) ; volume.setStatus ( GlusterVolumeStatus.UP ) ; volume.setBricks ( getBricks ( volumeId , brickCount ) ) ; volume.setVolumeType ( GlusterVolumeType.REPLICATE ) ; volume.setReplicaCount ( brickCount ) ; volume.setClusterId ( CLUSTER_ID ) ; return volume ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getReplicatedVolume ( org.ovirt.engine.core.compat.Guid volumeId , int brickCount ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getVolume ( volumeId ) ; volume.setStatus ( GlusterStatus.UP ) ; volume.setBricks ( getBricks ( volumeId , brickCount ) ) ; volume.setVolumeType ( GlusterVolumeType.REPLICATE ) ; volume.setReplicaCount ( brickCount ) ; volume.setClusterId ( CLUSTER_ID ) ; return volume ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult domainIsValidDestination ( ) { if ( ( ( storageDomain.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) || ( ( storageDomain.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult domainIsValidDestination ( ) { if ( ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) || ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testIgnoresCase ( ) { for ( java.lang.String value : getCaseCombinations ( "true" ) ) { junit.framework.TestCase.assertEquals ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) , true ) ; } for ( java.lang.String value : getCaseCombinations ( "false" ) ) { junit.framework.TestCase.assertEquals ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) , false ) ; } }

Target:
public void testIgnoresCase ( ) { for ( java.lang.String value : getCaseCombinations ( "true" ) ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) , true ) ; } for ( java.lang.String value : getCaseCombinations ( "false" ) ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) , false ) ; } }
Source:
public void testNotManagementNetworkNegative ( ) { org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ; org.mockito.Mockito.when ( managementNetworkUtil.isManagementNetwork ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ) . thenReturn ( false ) ; org.junit.Assert.assertThat ( validator.notManagementNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNotExternalNetworkSucceedsForNonExternalNetwork ( ) { org.mockito.Mockito.when ( network.isExternal ( ) ) . thenReturn ( false ) ; org.hamcrest.MatcherAssert.assertThat ( validator.notExternalNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModelFromBond ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel model = lineModelFromInterface ( nic ) ; model.setInterface ( nic ) ; model.setIsBonded ( true ) ; model.setBondName ( nic.getName ( ) ) ; model.setAddress ( nic.getIpv4Address ( ) ) ; return model ; }

Target:
private org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModelFromBond ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel model = lineModelFromInterface ( nic ) ; model.setInterface ( nic ) ; model.setIsBonded ( true ) ; model.setBondName ( nic.getName ( ) ) ; model.setIpv4Address ( nic.getIpv4Address ( ) ) ; model.setIpv6Address ( nic.getIpv6Address ( ) ) ; return model ; }
Source:
public void edit ( T object ) { org.ovirt.engine.ui.common.editor.AbstractUiCommonModelEditorDriver.doEdit ( object ) ; final org.ovirt.engine.ui.common.editor.UiCommonListenerMap listenerMap = getListenerMap ( ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; listenerMap.callListener ( propName , "PropertyChanged" ) ; } } ) ; org.ovirt.engine.ui.common.editor.AbstractUiCommonModelEditorDriver.accept ( new org.ovirt.engine.ui.common.editor.UiCommonEditorVisitor < T > ( getEventMap ( ) , getOwnerModels ( ) ) ) ; }

Target:
public void edit ( T object ) { org.ovirt.engine.ui.common.editor.AbstractUiCommonModelEditorDriver.doEdit ( object ) ; final org.ovirt.engine.ui.common.editor.UiCommonListenerMap listenerMap = getListenerMap ( ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; listenerMap.callListener ( propName , "PropertyChanged" ) ; } } ) ; org.ovirt.engine.ui.common.editor.AbstractUiCommonModelEditorDriver.accept ( new org.ovirt.engine.ui.common.editor.UiCommonEditorVisitor < T > ( getEventMap ( ) , getOwnerModels ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Cluster getCluster ( org.ovirt.engine.api.model.Vm vm ) { if ( namedCluster ( vm ) ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.Cluster.class , VdcQueryType.GetClusterByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) ; } return lookupCluster ( asGuid ( vm.getCluster ( ) . getId ( ) ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Cluster getCluster ( org.ovirt.engine.api.model.Vm vm ) { if ( namedCluster ( vm ) ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.Cluster.class , QueryType.GetClusterByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) ; } return lookupCluster ( asGuid ( vm.getCluster ( ) . getId ( ) ) ) ; }
Source:
public org.ovirt.engine.api.model.SSHPublicKey addParents ( org.ovirt.engine.api.model.SSHPublicKey pubkey ) { org.ovirt.engine.api.model.User parent = pubkey.getUser ( ) ; if ( parent == null ) { parent = new org.ovirt.engine.api.model.User ( ) ; pubkey.setUser ( parent ) ; } parent.setId ( userId.toString ( ) ) ; return pubkey ; }

Target:
public org.ovirt.engine.api.model.SshPublicKey addParents ( org.ovirt.engine.api.model.SshPublicKey pubkey ) { org.ovirt.engine.api.model.User parent = pubkey.getUser ( ) ; if ( parent == null ) { parent = new org.ovirt.engine.api.model.User ( ) ; pubkey.setUser ( parent ) ; } parent.setId ( userId.toString ( ) ) ; return pubkey ; }
Source:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.storage.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( isEditEnabled ( ) ) ; } }

Target:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.storage.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( isEditEnabled ( ) ) ; } }
Source:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , 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.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }

Target:
public static void GetLocalFSPath ( 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.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RhevhLocalFSPath , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testVerbosityLevelZero ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . verboseLevel ( AnsibleVerbosity.LEVEL0 ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
public void testNotRemovingUsedPoolRecordNotUsed ( ) throws java.lang.Exception { macPool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( macPoolDaoMock.getDcUsageCount ( org.mockito.Matchers.eq ( macPool.getId ( ) ) ) ) . thenReturn ( 0 ) ; final org.ovirt.engine.core.bll.ValidationResult validationResult = new org.ovirt.engine.core.bll.MacPoolValidator ( macPool ) . notRemovingUsedPool ( ) ; org.junit.Assert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNotRemovingUsedPoolRecordIsUsed ( ) throws java.lang.Exception { macPool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; final org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setName ( "storagePool" ) ; org.mockito.Mockito.when ( storagePoolDao.getAllDataCentersByMacPoolId ( macPool.getId ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( storagePool ) ) ; org.junit.Assert.assertThat ( macPoolValidator.notRemovingUsedPool ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_STILL_USED_MAC_POOL ) ) ; }
Source:
public void Rollback ( ) { log.errorFormat ( "Transaction rolled-back for command: {0}." , this . getClass ( ) . getName ( ) ) ; cancelTasks ( ) ; }

Target:
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 ( ) ; }