{
<BUG>boolean runMethodAsClient = testMethod.isAnnotationPresent(RunAsClient.class);
boolean runClassAsClient = testClass.isAnnotationPresent(RunAsClient.class);</BUG>
boolean runAsClient = true;
<BUG>if(deployment != null)
</BUG>
{
<BUG>runAsClient =  deployment.getDescription().testable() ? false:true;

runAsClient =  deployment.isDeployed() ? runAsClient:true;

if(runMethodAsClient)
{</BUG>
runAsClient = true;

{
private static Logger log = Logger.getLogger(RunModeUtils.class.getName());
private RunModeUtils() { }
public static boolean isRunAsClient(Deployment deployment, TestClass testClass, Method testMethod)
{
boolean runAsClient = true;
if (deployment != null)
{
runAsClient = deployment.getDescription().testable() ? false : true;
runAsClient = deployment.isDeployed() ? runAsClient : true;
if (testMethod.isAnnotationPresent(RunAsClient.class))
{
runAsClient = true;
