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

Target:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void testIsNetworkInSyncWhenBootProtocolNotStaticAddressDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolAddress ( NetworkBootProtocol.NONE , false ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4StaticBootProtocolNetmaskDifferent ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocolNetmask ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.RemoveCluster , org.ovirt.engine.core.common.action.ClusterParametersBase.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.RemoveCluster , org.ovirt.engine.core.common.action.ClusterParametersBase.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters parameter = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.getParameters ( ) ; result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.getBroker ( ) . glusterVolumeGeoRepStatusDetail ( parameter.getVolumeName ( ) , parameter.getSlaveHost ( ) , parameter.getSlaveVolume ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.proceedProxyReturnValue ( ) ; if ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( result.getGeoRepSessions ( ) ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters parameter = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.getParameters ( ) ; result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.getBroker ( ) . glusterVolumeGeoRepStatusDetail ( parameter.getVolumeName ( ) , parameter.getSlaveHost ( ) , parameter.getSlaveVolume ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.proceedProxyReturnValue ( ) ; if ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepStatusDetailVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( result.getGeoRepDetails ( ) ) ; } }
Source:
public static void getDefaultTimeZone ( 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 ( ( java.util.Map.Entry < java.lang.String , java.lang.String > ) ( source ) ) . getKey ( ) ; } return "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDefualtTimeZone , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getDefaultTimeZone ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { 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 "" ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDefaultTimeZone , params , aQuery ) ; }
Source:
private void AddVdsStaticToDb ( ) { org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . setServerSslEnabled ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.UseSecureConnectionWithServers ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . save ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.getCompensationContext ( ) . snapshotNewEntity ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; setVdsIdRef ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.setVds ( null ) ; }

Target:
private void AddVdsStaticToDb ( ) { org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . setServerSslEnabled ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.EncryptHostCommunication ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . save ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.getCompensationContext ( ) . snapshotNewEntity ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; setVdsIdRef ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.setVds ( null ) ; }
Source:
public javax.ws.rs.core.Response add ( final org.ovirt.engine.api.model.HostNIC nic ) { validateParameters ( nic , "name" , "network.id|name" , "bonding.slaves.id|name" ) ; validateEnums ( org.ovirt.engine.api.model.HostNIC.class , nic ) ; return performCreate ( VdcActionType.AddBond , new org.ovirt.engine.core.common.action.AddBondParameters ( asGuid ( hostId ) , nic.getName ( ) , lookupNetwork ( nic.getNetwork ( ) ) , lookupSlaves ( nic ) ) { { setBondingOptions ( map ( nic , null ) . getBondOptions ( ) ) ; } } , new org.ovirt.engine.api.restapi.resource.BackendHostNicsResource.HostNicResolver ( nic.getName ( ) ) ) ; }

Target:
public javax.ws.rs.core.Response add ( final org.ovirt.engine.api.model.HostNic nic ) { validateParameters ( nic , "name" , "network.id|name" , "bonding.slaves.id|name" ) ; validateEnums ( org.ovirt.engine.api.model.HostNic.class , nic ) ; return performCreate ( VdcActionType.AddBond , new org.ovirt.engine.core.common.action.AddBondParameters ( asGuid ( hostId ) , nic.getName ( ) , lookupNetwork ( nic.getNetwork ( ) ) , lookupSlaves ( nic ) ) { { setBondingOptions ( map ( nic , null ) . getBondOptions ( ) ) ; } } , new org.ovirt.engine.api.restapi.resource.BackendHostNicsResource.HostNicResolver ( nic.getName ( ) ) ) ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveMacPool , org.ovirt.engine.core.common.action.RemoveMacPoolByIdParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , canDo , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveMacPool , org.ovirt.engine.core.common.action.RemoveMacPoolByIdParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetDeviceList , org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.HOST_GUID } , setUpLuns ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { org.junit.Assert.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetDeviceList , org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.HOST_GUID } , setUpLuns ( ) , failure ) ; }
Source:
public void testGetExtendedHostDevicesByHostId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDeviceView > hostDevices = dao.getExtendedHostDevicesByHostId ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.Assert.assertEquals ( getEntitiesTotalCount ( ) , hostDevices.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.HostDeviceView hostDevice : hostDevices ) { org.junit.Assert.assertEquals ( FixturesTool.VDS_RHEL6_NFS_SPM , hostDevice.getHostId ( ) ) ; } }

Target:
public void testGetExtendedHostDevicesByHostId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDeviceView > hostDevices = dao.getExtendedHostDevicesByHostId ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.jupiter.api.Assertions.assertEquals ( getEntitiesTotalCount ( ) , hostDevices.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.HostDeviceView hostDevice : hostDevices ) { org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.VDS_RHEL6_NFS_SPM , hostDevice.getHostId ( ) ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) && ( ! ( cluster.supportsVirtService ( ) ) ) ) { model.getForce ( ) . setIsAvailable ( true ) ; } model.StopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) && ( ! ( cluster.supportsVirtService ( ) ) ) ) { model.getForce ( ) . setIsAvailable ( true ) ; } model.stopProgress ( ) ; }
Source:
public void validateSufficientSpaceOnDestinationDomains ( ) { setupForStorageTests ( ) ; org.junit.Assert.assertTrue ( command.checkDestDomains ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForNewDisks ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; }

Target:
public void validateSufficientSpaceOnDestinationDomains ( ) { setupForStorageTests ( ) ; command.ensureDestinationImageMap ( ) ; org.junit.Assert.assertTrue ( command.checkDestDomains ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForNewDisks ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( "NetworkAttachment [id=" + ( id ) ) + ", networkId=" ) + ( networkId ) ) + ", nicId=" ) + ( nicId ) ) + ", nicName=" ) + ( nicName ) ) + ", ipConfiguration=" ) + ( ipConfiguration ) ) + ", properties=" ) + ( properties ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "id" , getId ( ) ) . append ( "networkId" , getNetworkId ( ) ) . append ( "networkName" , getNetworkName ( ) ) . append ( "nicId" , getNicId ( ) ) . append ( "nicName" , getNicName ( ) ) . append ( "ipConfiguration" , getIpConfiguration ( ) ) . append ( "properties" , getProperties ( ) ) . append ( "overrideConfiguration" , isOverrideConfiguration ( ) ) . build ( ) ; }
Source:
private void unplugNic ( ) { if ( hotPlugVmNicRequired ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getStatus ( ) ) ) { if ( executePlugOrUnplug ( PlugAction.UNPLUG ) ) { if ( isPassthrough ( ) ) { clearPassthroughData ( vmDevice.getHostDevice ( ) ) ; runInternalAction ( VdcActionType.RefreshHost , new org.ovirt.engine.core.common.action.VdsActionParameters ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) ) ) ; } } } }

Target:
private void unplugNic ( ) { if ( hotPlugVmNicRequired ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getStatus ( ) ) ) { if ( executePlugOrUnplug ( PlugAction.UNPLUG ) ) { if ( isPassthrough ( ) ) { clearPassthroughData ( vmDevice.getHostDevice ( ) ) ; runInternalAction ( ActionType.RefreshHost , new org.ovirt.engine.core.common.action.VdsActionParameters ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) ) ) ; } } } }
Source:
public java.util.function.Predicate < org.ovirt.engine.core.common.businessentities.network.Network > getManagementNetworkCandidatePredicate ( ) { return managementNetworkCandidatePredicate ; }

Target:
protected void executeQueryCommand ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > allDcNetworks = networkDao.getAllForDataCenter ( org.ovirt.engine.core.bll.network.dc.GetManagementNetworkCandidatesQuery.getParameters ( ) . getId ( ) ) ; final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > managementNetworkCandidates = allDcNetworks.stream ( ) . filter ( managementNetworkCandidatePredicate ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.ovirt.engine.core.bll.network.dc.GetManagementNetworkCandidatesQuery.getQueryReturnValue ( ) . setReturnValue ( managementNetworkCandidates ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( int size ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setSizeInGigabytes ( size ) ; diskImage.setActualSize ( size ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 ) ) ) ; return diskImage ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( int size ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setSizeInGigabytes ( size ) ; diskImage.setActualSize ( size ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 ) ) ) ; return diskImage ; }
Source:
public void testResolveUnknownVariable ( ) { final java.lang.String message = "This is my ${Variable}" ; final java.lang.String expectedResolved = java.lang.String.format ( "This is my %1s" , MessageResolver.UNKNOWN_VARIABLE_VALUE ) ; java.util.Map < java.lang.String , java.lang.String > values = java.util.Collections.emptyMap ( ) ; java.lang.String resolvedMessage = org.ovirt.engine.core.dal.dbbroker.auditloghandling.MessageResolver.resolveMessage ( message , values ) ; org.junit.Assert.assertEquals ( expectedResolved , resolvedMessage ) ; }

Target:
public void testResolveUnknownVariable ( ) { final java.lang.String message = "This is my ${Variable}" ; final java.lang.String expectedResolved = java.lang.String.format ( "This is my %1s" , MessageResolver.UNKNOWN_VARIABLE_VALUE ) ; java.util.Map < java.lang.String , java.lang.String > values = java.util.Collections.emptyMap ( ) ; java.lang.String resolvedMessage = org.ovirt.engine.core.dal.dbbroker.auditloghandling.MessageResolver.resolveMessage ( message , values ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectedResolved , resolvedMessage ) ; }
Source:
private void logVmStatusTransionFromUnknown ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogable.setVmId ( dbVm.getId ( ) ) ; auditLogable.addCustomValue ( "VmStatus" , vdsmVm.getVmDynamic ( ) . getStatus ( ) . toString ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( auditLogable , AuditLogType.VM_STATUS_RESTORED ) ; }

Target:
private void logVmStatusTransionFromUnknown ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogable.setVmId ( dbVm.getId ( ) ) ; auditLogable.addCustomValue ( "VmStatus" , vdsmVm.getVmDynamic ( ) . getStatus ( ) . toString ( ) ) ; auditLogDirector.log ( auditLogable , AuditLogType.VM_STATUS_RESTORED ) ; }
Source:
public static org.ovirt.engine.core.aaa.DirectoryUser instantiate ( com.google.gwt.user.client.rpc.SerializationStreamReader reader ) throws com.google.gwt.user.client.rpc.SerializationException { java.lang.String directoryName = reader.readString ( ) ; java.lang.String namespace = reader.readString ( ) ; java.lang.String id = reader.readString ( ) ; java.lang.String name = reader.readString ( ) ; return new org.ovirt.engine.core.aaa.DirectoryUser ( directoryName , namespace , id , name ) ; }

Target:
public static org.ovirt.engine.core.aaa.DirectoryUser instantiate ( com.google.gwt.user.client.rpc.SerializationStreamReader reader ) throws com.google.gwt.user.client.rpc.SerializationException { java.lang.String directoryName = reader.readString ( ) ; java.lang.String namespace = reader.readString ( ) ; java.lang.String id = reader.readString ( ) ; java.lang.String name = reader.readString ( ) ; java.lang.String principal = reader.readString ( ) ; return new org.ovirt.engine.core.aaa.DirectoryUser ( directoryName , namespace , id , name , principal ) ; }
Source:
public java.util.ArrayList < java.lang.String > GetSupportedOptions ( java.lang.String agent ) { java.util.ArrayList < java.lang.String > agentOptions = new java.util.ArrayList < java.lang.String > ( ) ; if ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping.containsKey ( agent ) ) { java.util.HashMap < java.lang.String , java.lang.String > options = org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping.get ( agent ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.String > pair : options.entrySet ( ) ) { agentOptions.add ( pair.getKey ( ) ) ; } } else { org.ovirt.engine.core.utils.pm.VdsFenceOptions.log.errorFormat ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.AGENT_ERROR , agent ) ; } return agentOptions ; }

Target:
public java.util.ArrayList < java.lang.String > GetSupportedOptions ( java.lang.String agent ) { java.util.ArrayList < java.lang.String > agentOptions = new java.util.ArrayList < java.lang.String > ( ) ; if ( fencingOptionMapping.containsKey ( agent ) ) { java.util.HashMap < java.lang.String , java.lang.String > options = fencingOptionMapping.get ( agent ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.String > pair : options.entrySet ( ) ) { agentOptions.add ( pair.getKey ( ) ) ; } } else { org.ovirt.engine.core.utils.pm.VdsFenceOptions.log.errorFormat ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.AGENT_ERROR , agent ) ; } return agentOptions ; }
Source:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { 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.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }

Target:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( org.ovirt.engine.core.compat.Guid violatingEntityId , org.ovirt.engine.core.compat.Guid nicId , java.lang.String nicName , org.ovirt.engine.core.common.errors.VdcBllMessages message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( nicId != null ) && ( nicName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , nicId , nicName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( nameAndIdIsIncoherent ( nicId , nicName , map ) ) ) ) ; }

Target:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( org.ovirt.engine.core.compat.Guid violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName , org.ovirt.engine.core.common.errors.EngineMessage message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( referringId != null ) && ( referringName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , referringId , referringName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNameAndIdIncoherent ( referringId , referringName , map ) ) ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( masterDomain.getStoragePoolIsoMapData ( ) ) ; masterDomain.setStatus ( StorageDomainStatus.Locked ) ; getDbFacade ( ) . getStoragePoolIsoMapDao ( ) . update ( masterDomain.getStoragePoolIsoMapData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( getStoragePool ( ) ) ; getStoragePoolDAO ( ) . remove ( getStoragePool ( ) . getId ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetRoleActionGroupsByRoleId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , org.ovirt.engine.api.restapi.resource.BackendPermitsResourceTest.setUpActionGroups ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetRoleActionGroupsByRoleId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , org.ovirt.engine.api.restapi.resource.BackendPermitsResourceTest.setUpActionGroups ( ) , failure ) ; }
Source:
protected R linkSubResource ( R model , java.lang.String subResource , java.lang.String oid ) { addOrUpdateLink ( model , subResource , org.ovirt.engine.api.common.util.LinkHelper.getUriBuilder ( org.ovirt.engine.api.restapi.resource.AbstractBackendResource.getUriInfo ( ) , model ) . path ( subResource ) . path ( oid ) . build ( ) . toString ( ) ) ; return model ; }

Target:
protected R linkSubResource ( R model , java.lang.String subResource , java.lang.String oid ) { addOrUpdateLink ( model , subResource , org.ovirt.engine.api.utils.LinkHelper.getUriBuilder ( org.ovirt.engine.api.restapi.resource.AbstractBackendResource.getUriInfo ( ) , model ) . path ( subResource ) . path ( oid ) . build ( ) . toString ( ) ) ; return model ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.GlusterVolume volume ) { validateParameters ( volume , "name" , "volumeType" , "bricks" ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getMapper ( org.ovirt.engine.api.model.GlusterVolume.class , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) . map ( volume , null ) ; volumeEntity.setClusterId ( asGuid ( parent.get ( ) . getId ( ) ) ) ; mapBricks ( volume , volumeEntity ) ; return performCreate ( VdcActionType.CreateGlusterVolume , new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( volumeEntity , isForce ( ) ) , new org.ovirt.engine.api.restapi.resource.gluster.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , true ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.GlusterVolume volume ) { validateParameters ( volume , "name" , "volumeType" , "bricks" ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getMapper ( org.ovirt.engine.api.model.GlusterVolume.class , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) . map ( volume , null ) ; volumeEntity.setClusterId ( asGuid ( parent.get ( ) . getId ( ) ) ) ; mapBricks ( volume , volumeEntity ) ; return performCreate ( ActionType.CreateGlusterVolume , new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( volumeEntity , isForce ( ) ) , new org.ovirt.engine.api.restapi.resource.gluster.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , true ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.refresh" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "masterSdUUID" , msdUUID ) . withParameter ( "masterVersion" , masterVersion ) . 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.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc allocateVolume ( java.lang.String spUUID , java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String size ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.allocate" ) . withParameter ( "volumeID" , volUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgGUID ) . withParameter ( "size" , size ) . 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.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
private java.lang.String getRootResourceName ( java.lang.String collectionName ) { java.lang.String resource = org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName ) ; java.lang.String resourceCandidate = getPublicEntity ( org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName ) , false ) ; if ( resourceCandidate != null ) { resource = resourceCandidate ; } return resource ; }

Target:
private java.lang.String getRootResourceName ( java.lang.String collectionName , java.lang.String [ ] periods , int i ) { java.lang.String resource = org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName ) ; java.lang.String resourceCandidate = getPublicEntity ( org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName ) , periods , i , false ) ; if ( resourceCandidate != null ) { resource = resourceCandidate ; } return resource ; }
Source:
public void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
private void assertNotContainsBlankTemplate ( org.ovirt.engine.api.model.SpecialObjects objs ) { for ( org.ovirt.engine.api.model.Link link : objs.getLinks ( ) ) { if ( ( link.getHref ( ) . equals ( org.ovirt.engine.api.restapi.resource.BackendApiResourceTest.BLANK_TEMPLATE_HREF ) ) && ( link.getRel ( ) . equals ( org.ovirt.engine.api.restapi.resource.BackendApiResourceTest.BLANK_TEMPLATE_REL ) ) ) { fail ( ) ; } } }

Target:
public void testGetGlusterOnly ( ) { doTestGlusterOnlyGet ( ) ; }
Source:
protected void verifyModelOnNewCluster ( org.ovirt.engine.api.model.VM model , int index ) { assertNotNull ( model.getCluster ( ) . getId ( ) ) ; assertEquals ( GUIDS [ 1 ] . toString ( ) , model.getCluster ( ) . getId ( ) ) ; verifyModel ( model , index ) ; }

Target:
private void verifyCertificate ( org.ovirt.engine.api.model.Vm model ) { assertNotNull ( model.getDisplay ( ) ) ; assertNotNull ( model.getDisplay ( ) . getCertificate ( ) ) ; assertEquals ( model.getDisplay ( ) . getCertificate ( ) . getSubject ( ) , org.ovirt.engine.api.restapi.resource.BackendVmResourceTest.CERTIFICATE ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.String > getAllVmProperties ( ) { return allVmProperties ; }

Target:
private void getVMProperties ( org.ovirt.engine.core.compat.Version version , java.util.Map < java.lang.String , java.lang.String > propertiesMap , java.lang.String vmPropertiesFieldValue ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vmPropertiesFieldValue ) ) { return ; } propertiesMap.putAll ( convertProperties ( vmPropertiesFieldValue , allVmProperties.get ( version ) ) ) ; }
Source:
public void testInitServletConfig_BaseSet ( ) throws javax.servlet.ServletException { org.mockito.Mockito.when ( mockConfig.getInitParameter ( "file" ) ) . thenReturn ( "/home" ) ; testServlet.init ( mockConfig ) ; org.junit.Assert.assertNull ( "Type should be null" , testServlet.type ) ; org.junit.Assert.assertEquals ( "base should be /home" , new java.io.File ( "/home" ) , testServlet.base ) ; }

Target:
public void testInitServletConfig_BaseSet ( ) throws javax.servlet.ServletException { org.mockito.Mockito.when ( mockConfig.getInitParameter ( "file" ) ) . thenReturn ( file.getParent ( ) ) ; testServlet.init ( mockConfig ) ; org.junit.Assert.assertNull ( "Type should be null" , testServlet.type ) ; org.junit.Assert.assertEquals ( ( "base should be " + ( file.getParent ( ) ) ) , file.getParentFile ( ) , testServlet.base ) ; }
Source:
private void createSnapshot ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; if ( ( vm == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.createNewSnapshotModel ( vm , this ) ; model.setValidateByVmSnapshots ( true ) ; setWindow ( model ) ; }

Target:
private void createSnapshot ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; if ( ( vm == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.createNewSnapshotModel ( this ) ; model.setValidateByVmSnapshots ( true ) ; setWindow ( model ) ; model.setVm ( vm ) ; model.initialize ( ) ; }
Source:
public void setSearchPanel ( com.google.gwt.user.client.ui.IsWidget searchPanel ) { actionPanel.setSearchPanel ( searchPanel ) ; }

Target:
public void setInSlot ( java.lang.Object slot , com.google.gwt.user.client.ui.IsWidget content ) { if ( slot == ( org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainTabWithDetailsPresenter.TYPE_SetSearchPanel ) ) { if ( content != null ) { actionPanel.setSearchPanel ( content ) ; actionPanel.setVisible ( true ) ; } } else { super . setInSlot ( slot , content ) ; } }
Source:
public void rerun ( org.ovirt.engine.core.compat.Guid vmId ) { final org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand command = backend.getResourceManager ( ) . GetAsyncCommandForVm ( vmId ) ; if ( command != null ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { command.rerun ( ) ; } } ) ; } }

Target:
public void processOnVmPoweringUp ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand command = vdsBroker.GetAsyncCommandForVm ( vmId ) ; if ( command != null ) { command.onPowerringUp ( ) ; } }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public void invalidLowMTU ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; nic.setMtu ( 30 ) ; java.util.Set < javax.validation.ConstraintViolation < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > > validate = validate ( nic ) ; junit.framework.Assert.assertTrue ( ( ( validate.size ( ) ) > 0 ) ) ; }

Target:
public void invalidLowMTU ( ) { java.util.Set < javax.validation.ConstraintViolation < org.ovirt.engine.core.common.utils.MTUValidatorTest.MtuContainer > > validate = validate ( new org.ovirt.engine.core.common.utils.MTUValidatorTest.MtuContainer ( 30 ) ) ; junit.framework.Assert.assertTrue ( ( ( validate.size ( ) ) > 0 ) ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( getName ( ) ) . append ( " {id=" ) . append ( getId ( ) ) . append ( ", networkId=" ) . append ( getNetworkId ( ) ) . append ( ", portMirroring=" ) . append ( isPortMirroring ( ) ) . append ( ", customProperties=" ) . append ( getCustomProperties ( ) ) . append ( "}" ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( getName ( ) ) . append ( " {id=" ) . append ( getId ( ) ) . append ( ", networkId=" ) . append ( getNetworkId ( ) ) . append ( ", portMirroring=" ) . append ( isPortMirroring ( ) ) . append ( ", customProperties=" ) . append ( getCustomProperties ( ) ) . append ( ", description=" ) . append ( getDescription ( ) ) . append ( "}" ) ; return builder.toString ( ) ; }
Source:
private void removeOtherImageAndParents ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid lastParent ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.snapshots.RestoreFromSnapshotCommand.getDiskImageDao ( ) . getSnapshotById ( imageId ) ; org.ovirt.engine.core.compat.Guid currentParent = image.getParentId ( ) ; removeSnapshot ( image ) ; while ( ! ( lastParent.equals ( currentParent ) ) ) { image = org.ovirt.engine.core.bll.snapshots.RestoreFromSnapshotCommand.getDiskImageDao ( ) . getSnapshotById ( currentParent ) ; currentParent = image.getParentId ( ) ; removeSnapshot ( image ) ; } }

Target:
private void removeOtherImageAndParents ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid lastParent ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = diskImageDao.getSnapshotById ( imageId ) ; org.ovirt.engine.core.compat.Guid currentParent = image.getParentId ( ) ; removeSnapshot ( image ) ; while ( ! ( lastParent.equals ( currentParent ) ) ) { image = diskImageDao.getSnapshotById ( currentParent ) ; currentParent = image.getParentId ( ) ; removeSnapshot ( image ) ; } }
Source:
public static void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }