auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String execute ( org.apache.http.client.methods.HttpUriRequest request , java.util.List < org.apache.http.Header > headers , java.lang.Boolean last ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { injectHeaders ( request , headers ) ; org.apache.http.HttpResponse response = this . pool.execute ( request , new org.apache.http.protocol.BasicHttpContext ( ) ) ; if ( ( response.getStatusLine ( ) . getStatusCode ( ) ) < ( org.ovirt.engine.sdk.web.HttpProxy.BAD_REQUEST ) ) { return org.ovirt.engine.sdk.utils.HttpResponseHelper.getEntity ( response.getEntity ( ) ) ; } throw new org.ovirt.engine.sdk.exceptions.ServerException ( response ) ; }

Target:
public java.lang.String execute ( org.apache.http.client.methods.HttpUriRequest request , java.util.List < org.apache.http.Header > headers , java.lang.Boolean last ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { injectHeaders ( request , headers ) ; org.apache.http.HttpResponse response = this . pool.execute ( request , getContext ( ) ) ; if ( ( response.getStatusLine ( ) . getStatusCode ( ) ) < ( org.ovirt.engine.sdk.web.HttpProxy.BAD_REQUEST ) ) { return org.ovirt.engine.sdk.utils.HttpResponseHelper.getEntity ( response.getEntity ( ) ) ; } throw new org.ovirt.engine.sdk.exceptions.ServerException ( response ) ; }
Source:
private boolean isRemovingVmPool ( ) { org.ovirt.engine.core.compat.Guid poolId = org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getVmPoolId ( ) ; if ( poolId == null ) { return false ; } org.ovirt.engine.core.common.businessentities.VmPool vmPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . get ( poolId ) ; return vmPool.isBeingDestroyed ( ) ; }

Target:
private boolean isRemovingVmPool ( ) { org.ovirt.engine.core.common.businessentities.VmPool vmPool = getVmPoolCached ( ) ; return vmPool != null ? vmPool.isBeingDestroyed ( ) : false ; }
Source:
public void testIsNetworkInSyncWhenGatewayEqual ( ) { initIpConfigurationBootProtocolGateway ( Ipv4BootProtocol.STATIC_IP , true ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4GatewayBothBlank ( ) { java.util.List < java.lang.String > blankValues = java.util.Arrays.asList ( null , "" ) ; initIpv4ConfigurationStaticBootProtocol ( Ipv4BootProtocol.STATIC_IP ) ; int blankIndex = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( 2 ) ; ipv4Address.setGateway ( blankValues.get ( blankIndex ) ) ; iface.setIpv4Gateway ( blankValues.get ( ( blankIndex ^ 1 ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StoragePool setUpStoragePool ( int index ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = control.createMock ( org.ovirt.engine.core.common.businessentities.StoragePool.class ) ; org.ovirt.engine.api.model.Version version = new org.ovirt.engine.api.model.Version ( 2 , 2 ) ; if ( index != ( - 1 ) ) { org.easymock.EasyMock.expect ( pool.getId ( ) ) . andReturn ( GUIDS [ index ] ) . anyTimes ( ) ; } org.easymock.EasyMock.expect ( pool.getcompatibility_version ( ) ) . andReturn ( version ) . anyTimes ( ) ; return pool ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StoragePool setUpStoragePool ( int index ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = control.createMock ( org.ovirt.engine.core.common.businessentities.StoragePool.class ) ; org.ovirt.engine.api.model.Version version = new org.ovirt.engine.api.model.Version ( 2 , 2 ) ; if ( index != ( - 1 ) ) { org.easymock.EasyMock.expect ( pool.getId ( ) ) . andReturn ( GUIDS [ index ] ) . anyTimes ( ) ; } org.easymock.EasyMock.expect ( pool.getCompatibilityVersion ( ) ) . andReturn ( version ) . anyTimes ( ) ; return pool ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj.getClass ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.EngineSession other = ( ( org.ovirt.engine.core.common.businessentities.EngineSession ) ( obj ) ) ; return ( java.util.Objects.equals ( engineSessionId , other.engineSessionId ) ) && ( java.util.Objects.equals ( userId , other.userId ) ) ; }

Target:
public java.lang.String getSourceIp ( ) { return sourceIp ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { onGetClusterList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( ReturnValue ) ) ) ; }

Target:
public void syncWithBackend ( ) { final org.ovirt.engine.core.common.businessentities.storage_pool dc = getSelectedDc ( ) ; if ( dc == null ) { return ; } boolean isSupportBridgesReportByVDSM = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.SupportBridgesReportByVDSM , dc.getcompatibility_version ( ) . toString ( ) ) ) ) ; setSupportBridgesReportByVDSM ( isSupportBridgesReportByVDSM ) ; boolean isMTUOverrideSupported = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.MTUOverrideSupported , dc.getcompatibility_version ( ) . toString ( ) ) ) ) ; setMTUOverrideSupported ( isMTUOverrideSupported ) ; }
Source:
protected void setUpEntityQueryExpectations ( int times , org.ovirt.engine.core.common.businessentities.VMStatus status ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.PARENT_ID } , getEntityList ( status ) ) ; } }

Target:
protected void setUpEntityQueryExpectations ( int times , org.ovirt.engine.core.common.businessentities.VMStatus status ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.PARENT_ID } , getEntityList ( status ) ) ; } }
Source:
private void mockDiskImageDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskImageList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ) ; diskImageList.add ( diskImage ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( spyCommand ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.getAllForVm ( vmId ) ) . thenReturn ( diskImageList ) ; }

Target:
private void mockDiskImageDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskImageList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ) ; diskImageList.add ( diskImage ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( spyCommand ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.getAllForVm ( vmId ) ) . thenReturn ( diskImageList ) ; }
Source:
protected void executeNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics , java.lang.Object ... params ) { }

Target:
public boolean isDisplayNetworkAffected ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 ) { if ( ( op1 != null ) && ( op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel ) ) { for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel network : ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel ) ( op1 ) ) . getNetworks ( ) ) { if ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.ATTACH_NETWORK.isDisplayNetworkAffected ( network , null ) ) { return true ; } } } return false ; }
Source:
protected org.ovirt.engine.core.dao.SnapshotDao getSnapshotDao ( ) { return snapshotDao ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.snapshots.SnapshotVmConfigurationHelper snapshotVmConfigurationHelper = getSnapshotVmConfigurationHelper ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > snapshots = snapshotDao.getAllWithConfiguration ( org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsFromConfigurationByVmIdQuery.getParameters ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : snapshots ) { org.ovirt.engine.core.common.businessentities.VM vm = snapshotVmConfigurationHelper.getVmFromConfiguration ( snapshot.getVmConfiguration ( ) , snapshot.getVmId ( ) , snapshot.getId ( ) ) ; if ( vm != null ) { snapshot.setDiskImages ( vm.getImages ( ) ) ; } } org.ovirt.engine.core.bll.snapshots.GetAllVmSnapshotsFromConfigurationByVmIdQuery.getQueryReturnValue ( ) . setReturnValue ( snapshots ) ; }
Source:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase getCinderDiskSnapshotParameter ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase removeCinderSnapshotParams = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( cinderDisk.getImageId ( ) ) ; removeCinderSnapshotParams.setDestinationImageId ( cinderDisk.getImageId ( ) ) ; removeCinderSnapshotParams.setStorageDomainId ( cinderDisk.getStorageIds ( ) . get ( 0 ) ) ; removeCinderSnapshotParams.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllCinderSnapshotDisksCommand.getActionType ( ) ) ; removeCinderSnapshotParams.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) ) ; return removeCinderSnapshotParams ; }

Target:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase getCinderDiskSnapshotParameter ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase removeCinderSnapshotParams = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( cinderDisk.getImageId ( ) ) ; removeCinderSnapshotParams.setDestinationImageId ( cinderDisk.getImageId ( ) ) ; removeCinderSnapshotParams.setStorageDomainId ( cinderDisk.getStorageIds ( ) . get ( 0 ) ) ; removeCinderSnapshotParams.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllCinderSnapshotDisksCommand.getActionType ( ) ) ; removeCinderSnapshotParams.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) ) ; removeCinderSnapshotParams.setShouldBeEndedByParent ( false ) ; return removeCinderSnapshotParams ; }
Source:
protected boolean buildAndCheckDestStorageDomains ( ) { boolean retValue = true ; if ( diskInfoDestinationMap.isEmpty ( ) ) { retValue = fillDestMap ( ) ; } else { retValue = validateProvidedDestinations ( ) ; } if ( retValue && ( ( getImagesToCheckDestinationStorageDomains ( ) . size ( ) ) != ( diskInfoDestinationMap.size ( ) ) ) ) { log.error ( "Can not find any default active domain for one of the disks of template with id '{}'" , vmDisksSource.getId ( ) ) ; addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_MISSED_STORAGES_FOR_SOME_DISKS ) ; retValue = false ; } return retValue && ( validateIsImagesOnDomains ( ) ) ; }

Target:
protected boolean buildAndCheckDestStorageDomains ( ) { boolean retValue = true ; if ( diskInfoDestinationMap.isEmpty ( ) ) { retValue = fillDestMap ( ) ; } else { retValue = validateProvidedDestinations ( ) ; } if ( retValue && ( ( getImagesToCheckDestinationStorageDomains ( ) . size ( ) ) != ( diskInfoDestinationMap.size ( ) ) ) ) { log.error ( "Can not find any default active domain for one of the disks of template with id '{}'" , vmDisksSource.getId ( ) ) ; addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_MISSED_STORAGES_FOR_SOME_DISKS ) ; retValue = false ; } return retValue && ( validateIsImagesOnDomains ( ) ) ; }
Source:
private java.lang.String getMemoryVolumeFromActiveSnapshotInExportDomain ( ) { for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( ( snapshot.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType.ACTIVE ) ) return snapshot.getMemoryVolume ( ) ; } org.ovirt.engine.core.bll.ImportVmCommand.log.warnFormat ( "VM {0} doesn't have active snapshot in export domain" , getVmId ( ) ) ; return org.apache.commons.lang.StringUtils.EMPTY ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Snapshot getActiveSnapshot ( ) { for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( ( snapshot.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType.ACTIVE ) ) return snapshot ; } org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "VM '{}' doesn't have active snapshot in export domain" , getVmId ( ) ) ; return null ; }
Source:
void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; tempVar.setstatus ( VMStatus.Down ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setdisplay_type ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getDefaultDisplayType ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = tempVar ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . save ( vmDynamic ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( vmDynamic ) ; }

Target:
void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; tempVar.setStatus ( VMStatus.Down ) ; tempVar.setVmHost ( "" ) ; tempVar.setVmIp ( "" ) ; tempVar.setDisplayType ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getDefaultDisplayType ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = tempVar ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . save ( vmDynamic ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( vmDynamic ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( operationType ) == null ? 0 : operationType.hashCode ( ) ) ; result = ( prime * result ) + ( ( parameter ) == null ? 0 : parameter.hashCode ( ) ) ; result = ( prime * result ) + ( ( source ) == null ? 0 : source.hashCode ( ) ) ; return result ; }

Target:
public boolean isAction ( ) { return isAction ; }
Source:
public void testRetryWithDifferentException ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy = new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy ( 5 , 3 , java.lang.IllegalArgumentException.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; org.mockito.Mockito.stub ( callable.call ( ) ) . toThrow ( new java.io.IOException ( ) ) ; retryable.call ( ) ; }

Target:
public void testRetryWithDifferentException ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy = new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy ( 5 , 3 , 10 , java.lang.IllegalArgumentException.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; org.mockito.Mockito.stub ( callable.call ( ) ) . toThrow ( new java.io.IOException ( ) ) ; retryable.call ( ) ; }
Source:
private javax.ws.rs.core.Response cloneVmFromSnapshot ( org.ovirt.engine.core.common.businessentities.VmStatic staticVm , java.lang.String snapshotId , java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.compat.Guid sourceSnapshotId = asGuid ( snapshotId ) ; org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters params = new org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters ( staticVm , sourceSnapshotId ) ; params.setDiskInfoDestinationMap ( images ) ; params.setMakeCreatorExplicitOwner ( shouldMakeCreatorExplicitOwner ( ) ) ; return performCreate ( VdcActionType.AddVmFromSnapshot , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class ) ) ; }

Target:
private javax.ws.rs.core.Response cloneVmFromSnapshot ( org.ovirt.engine.core.common.businessentities.VmStatic staticVm , java.lang.String snapshotId , java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.compat.Guid sourceSnapshotId = asGuid ( snapshotId ) ; org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters params = new org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters ( staticVm , sourceSnapshotId ) ; params.setDiskInfoDestinationMap ( images ) ; params.setMakeCreatorExplicitOwner ( shouldMakeCreatorExplicitOwner ( ) ) ; return performCreate ( VdcActionType.AddVmFromSnapshot , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
private org.ovirt.engine.core.common.users.VdcUser getLoggedInUser ( javax.servlet.http.HttpServletRequest request ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = backend.RunQuery ( VdcQueryType.GetUserBySessionId , createQueryParams ( request.getSession ( ) . getId ( ) , filterQueries ( ) ) ) ; if ( returnValue.getSucceeded ( ) ) { return ( ( org.ovirt.engine.core.common.users.VdcUser ) ( returnValue.getReturnValue ( ) ) ) ; } else { return null ; } }

Target:
protected void writeAdditionalJsData ( javax.servlet.http.HttpServletRequest request , java.io.PrintWriter writer ) { org.ovirt.engine.core.common.users.VdcUser loggedUser = getLoggedInUser ( request ) ; if ( loggedUser != null ) { java.util.Map < java.lang.String , java.lang.String > userInfoData = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; userInfoData.put ( "id" , loggedUser.getUserId ( ) . toString ( ) ) ; userInfoData.put ( "userName" , loggedUser.getUserName ( ) ) ; userInfoData.put ( "domain" , loggedUser.getDomainControler ( ) ) ; writeJsObject ( writer , "userInfo" , userInfoData ) ; } }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity snapshot ) { if ( snapshot == null ) { return null ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotStatus status = snapshot.getStatus ( ) ; java.lang.String tooltip ; switch ( status ) { case ACTIVATED : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.up ( ) ; break ; case DEACTIVATED : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.down ( ) ; break ; case UNKNOWN : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.unknown ( ) ; break ; default : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.down ( ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( tooltip ) ; }

Target:
public java.lang.String getTooltip ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity snapshot ) { if ( snapshot == null ) { return "" ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotStatus status = snapshot.getStatus ( ) ; java.lang.String tooltip ; switch ( status ) { case ACTIVATED : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.up ( ) ; break ; case DEACTIVATED : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.down ( ) ; break ; case UNKNOWN : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.unknown ( ) ; break ; default : tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn.constants.down ( ) ; } return tooltip ; }
Source:
private java.lang.String GetLocalStoragesFormattedString ( ) { java.lang.String localStorages = "" ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > cast ( getSelectedItems ( ) ) ) { if ( ( a.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) { localStorages += ( a.getStorageName ( ) ) + ", " ; } } return localStorages.substring ( 0 , ( ( localStorages.length ( ) ) - 2 ) ) ; }

Target:
private java.lang.String getLocalStoragesFormattedString ( ) { java.lang.StringBuilder localStorages = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > cast ( getSelectedItems ( ) ) ) { if ( ( a.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) { localStorages.append ( a.getStorageName ( ) ) . append ( ", " ) ; } } return localStorages.substring ( 0 , ( ( localStorages.length ( ) ) - 2 ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.cancel ( ) ; } }
Source:
public void testGetStorageDomainWithCorrectStatus ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , StorageDomainStatus.Inactive ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , result.getId ( ) ) ; }

Target:
public void testGetStorageDomainWithCorrectStatus ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , StorageDomainStatus.Inactive ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , result.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 0 , result.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 0 , result.getActualImagesSize ( ) ) ; }
Source:
protected void executeCommand ( ) { try { addVmToDb ( ) ; processImages ( ) ; if ( getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { try { addVmToDb ( ) ; processImages ( ) ; if ( getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } org.ovirt.engine.core.bll.VmHandler.addVmInitToDB ( getVm ( ) . getStaticData ( ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
private void removeMemoryVolumes ( ) { java.util.Set < java.lang.String > memoryStates = org.ovirt.engine.core.bll.memory.MemoryUtils.getMemoryVolumesFromSnapshots ( org.ovirt.engine.core.bll.RemoveVmCommand.getDbFacade ( ) . getSnapshotDao ( ) . getAll ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; for ( java.lang.String memoryState : memoryStates ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = runInternalAction ( VdcActionType.RemoveMemoryVolumes , new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( memoryState , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.RemoveVmCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { log.errorFormat ( "Failed to remove memory volumes whie removing vm {0} (volumes: {1})" , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) , memoryState ) ; } } }

Target:
private void removeMemoryVolumes ( ) { java.util.Set < java.lang.String > memoryStates = org.ovirt.engine.core.bll.memory.MemoryUtils.getMemoryVolumesFromSnapshots ( org.ovirt.engine.core.bll.RemoveVmCommand.getDbFacade ( ) . getSnapshotDao ( ) . getAll ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; for ( java.lang.String memoryState : memoryStates ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = runInternalAction ( VdcActionType.RemoveMemoryVolumes , buildRemoveMemoryVolumesParameters ( memoryState , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.RemoveVmCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { log.errorFormat ( "Failed to remove memory volumes whie removing vm {0} (volumes: {1})" , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) , memoryState ) ; } } }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage getDiskForVolumeInfo ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage ancestor = org.ovirt.engine.core.bll.ExportVmCommand.getDiskImageDao ( ) . getAncestor ( disk.getImageId ( ) ) ; if ( ancestor == null ) { log.warn ( "Can't find ancestor of Disk with ID '{}', using original disk for volume info." , disk.getImageId ( ) ) ; ancestor = disk ; } return ancestor ; } else { return disk ; } }

Target:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage getDiskForVolumeInfo ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage ancestor = org.ovirt.engine.core.bll.ExportVmCommand.getDiskImageDao ( ) . getAncestor ( disk.getImageId ( ) ) ; if ( ancestor == null ) { log.warn ( "Can't find ancestor of Disk with ID '{}', using original disk for volume info." , disk.getImageId ( ) ) ; ancestor = disk ; } return ancestor ; } else { return disk ; } }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { super . onValueChange ( event ) ; if ( "firefox" . equalsIgnoreCase ( clientAgentType.getBrowser ( ) ) ) { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } } }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { super . onValueChange ( event ) ; if ( "firefox" . equalsIgnoreCase ( clientAgentType.getBrowser ( ) ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } } } ) ; } }
Source:
public void vdspysGroupWithVirtGlusterNotSupported ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; validateFailedWithReason ( EngineMessage.GLUSTER_NOT_SUPPORTED ) ; }

Target:
public void vdspysGroupWithVirtGlusterNotSupported ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( clusterDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; validateFailedWithReason ( EngineMessage.GLUSTER_NOT_SUPPORTED ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; if ( ( entity ) != null ) { jobProperties.put ( GlusterConstants.HOOK_NAME , entity.getName ( ) ) ; } } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; if ( ( getGlusterHook ( ) ) != null ) { jobProperties.put ( GlusterConstants.HOOK_NAME , getGlusterHook ( ) . getName ( ) ) ; } } return jobProperties ; }
Source:
protected void updateMigrateOnError ( ) { if ( ( ( getVdsGroup ( ) ) != null ) && ( ( getVdsGroup ( ) . getMigrateOnError ( ) ) == null ) ) { boolean isMigrationSupported = org.ovirt.engine.core.common.FeatureSupported.isMigrationSupported ( getArchitecture ( ) , getVdsGroup ( ) . getcompatibility_version ( ) ) ; org.ovirt.engine.core.common.businessentities.MigrateOnErrorOptions migrateOnError = ( isMigrationSupported ) ? org.ovirt.engine.core.common.businessentities.MigrateOnErrorOptions.YES : org.ovirt.engine.core.common.businessentities.MigrateOnErrorOptions.NO ; getVdsGroup ( ) . setMigrateOnError ( migrateOnError ) ; } }

Target:
protected void updateMigrateOnError ( ) { if ( ( ( getVdsGroup ( ) ) != null ) && ( ( getVdsGroup ( ) . getMigrateOnError ( ) ) == null ) ) { boolean isMigrationSupported = org.ovirt.engine.core.common.FeatureSupported.isMigrationSupported ( getArchitecture ( ) , getVdsGroup ( ) . getCompatibilityVersion ( ) ) ; org.ovirt.engine.core.common.businessentities.MigrateOnErrorOptions migrateOnError = ( isMigrationSupported ) ? org.ovirt.engine.core.common.businessentities.MigrateOnErrorOptions.YES : org.ovirt.engine.core.common.businessentities.MigrateOnErrorOptions.NO ; getVdsGroup ( ) . setMigrateOnError ( migrateOnError ) ; } }
Source:
public void testHotsetUpdateableWhenHotsetNotRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.AddField ( VMStatus.Down , "name" ) ; oic.AddHotsetFields ( "name" ) ; org.junit.Assert.assertTrue ( "hot set not requested field should be updateable according to status" , oic.IsFieldUpdatable ( VMStatus.Down , "name" , null , false ) ) ; }

Target:
public void testHotsetUpdateableWhenHotsetNotRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addField ( VMStatus.Down , "name" ) ; oic.addHotsetFields ( "name" ) ; org.junit.Assert.assertTrue ( "hot set not requested field should be updateable according to status" , oic.isFieldUpdatable ( VMStatus.Down , "name" , null , false ) ) ; }
Source:
public void getAllErrata ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Erratum > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetErrataForSystem , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getExternalProviderComputeResourceList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionSubjects = new java.util.ArrayList < > ( ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getDiskImage ( ) . getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.ATTACH_DISK ) ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.ExportRepoImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return permissionSubjects ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionSubjects = new java.util.ArrayList < > ( ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getDiskImage ( ) . getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.ATTACH_DISK ) ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.ExportRepoImageCommand.getParameters ( ) . getDestinationDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return permissionSubjects ; }
Source:
public void getPlaceHolderListTest2 ( ) { java.lang.String testMessage = "This is a test if {0} can actually work out {1}, {0}, {1}, {1}" ; java.util.List < java.lang.Integer > result = testMessages.getPlaceHolderList ( testMessage ) ; org.junit.Assert.assertEquals ( "Result should have 2 items" , 2 , result.size ( ) ) ; org.junit.Assert.assertEquals ( "index 0 should be 0" , ( ( java.lang.Integer ) ( 0 ) ) , result.get ( 0 ) ) ; org.junit.Assert.assertEquals ( "index 1 should be 1" , ( ( java.lang.Integer ) ( 1 ) ) , result.get ( 1 ) ) ; }

Target:
public void getPlaceHolderListTest3OutofOrder ( ) { java.lang.String testMessage = "This is {3} a {4} test {1} if {0} can actually work out {2}" ; java.util.List < java.lang.Integer > result = testMessages.getPlaceHolderList ( testMessage ) ; org.ovirt.engine.ui.common.utils.BaseDynamicMessagesTest.assertIndexes ( result , 5 ) ; }
Source:
protected void ItemsChanged ( ) { super . ItemsChanged ( ) ; if ( ( getItems ( ) ) != null ) { for ( java.lang.Object item : getItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( item ) ) ; model.setContainer ( this ) ; if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) { org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) ( item ) ) ; nfsModel.getPathChangedEvent ( ) . addListener ( this ) ; } } } }

Target:
protected void itemsChanged ( ) { super . itemsChanged ( ) ; if ( ( getItems ( ) ) != null ) { for ( java.lang.Object item : getItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( item ) ) ; model.setContainer ( this ) ; if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) { org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) ( item ) ) ; nfsModel.getPathChangedEvent ( ) . addListener ( this ) ; } } } }
Source:
protected void executeQueryCommand ( ) { P params = org.ovirt.engine.core.bll.GetDataCentersWithPermittedActionOnClustersQuery.getParameters ( ) ; setReturnValue ( org.ovirt.engine.core.bll.GetDataCentersWithPermittedActionOnClustersQuery.getDbFacade ( ) . getStoragePoolDao ( ) . getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.core.bll.GetDataCentersWithPermittedActionOnClustersQuery.getUserID ( ) , params.getActionGroup ( ) , params.isSupportsVirtService ( ) , params.isSupportsGlusterService ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { P params = org.ovirt.engine.core.bll.GetDataCentersWithPermittedActionOnClustersQuery.getParameters ( ) ; setReturnValue ( storagePoolDao.getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.core.bll.GetDataCentersWithPermittedActionOnClustersQuery.getUserID ( ) , params.getActionGroup ( ) , params.isSupportsVirtService ( ) , params.isSupportsGlusterService ( ) ) ) ; }
Source:
public void executeCommandFailedWhenServerIdPresent ( ) { setUpMocksForUpdate ( ) ; mockForReadContent ( false , EngineError.GlusterHookNotFound ) ; try { cmd.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.junit.Assert.assertEquals ( EngineError.GlusterHookNotFound , e.getErrorCode ( ) ) ; } org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; }

Target:
public void executeCommandFailedWhenServerIdPresent ( ) { setUpMocksForUpdate ( ) ; mockForReadContent ( false , EngineError.GlusterHookNotFound ) ; try { cmd.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.junit.Assert.assertEquals ( EngineError.GlusterHookNotFound , e.getErrorCode ( ) ) ; } org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . updateGlusterHook ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; }
Source:
private void CleanUp ( ) { if ( ( ( ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceAgentInstanceOptions ) != null ) && ( ( fenceOptionMapping ) != null ) ) && ( ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceOptionTypes ) != null ) ) { org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceAgentInstanceOptions.clear ( ) ; fenceOptionMapping.clear ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceOptionTypes.clear ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceSpecialParams.clear ( ) ; } Init ( ) ; }

Target:
private void cleanUp ( ) { if ( ( ( ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceAgentInstanceOptions ) != null ) && ( ( fenceOptionMapping ) != null ) ) && ( ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceOptionTypes ) != null ) ) { org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceAgentInstanceOptions.clear ( ) ; fenceOptionMapping.clear ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceOptionTypes.clear ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fenceSpecialParams.clear ( ) ; } init ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.Bookmark mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.Bookmark entity = new org.ovirt.engine.core.common.businessentities.Bookmark ( ) ; entity.setbookmark_id ( getGuid ( rs , "bookmark_id" ) ) ; entity.setbookmark_name ( rs.getString ( "bookmark_name" ) ) ; entity.setbookmark_value ( rs.getString ( "bookmark_value" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.Bookmark mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.Bookmark entity = new org.ovirt.engine.core.common.businessentities.Bookmark ( ) ; entity.setId ( getGuid ( rs , "bookmark_id" ) ) ; entity.setName ( rs.getString ( "bookmark_name" ) ) ; entity.setValue ( rs.getString ( "bookmark_value" ) ) ; return entity ; }
Source:
private void SendVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , 120 ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.PostSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }

Target:
private void setVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , 120 ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.PostSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }