Skip to content
This repository
Browse code

moving the library/client side of the connector into its own repo.

  • Loading branch information...
commit e737821cd92379c391cd161c2d5a7b303ac36af6 0 parents
authored February 06, 2012

Showing 53 changed files with 7,508 additions and 0 deletions. Show diff stats Hide diff stats

  1. 9  com.buglabs.bug.swarm.client/.classpath
  2. 28  com.buglabs.bug.swarm.client/.project
  3. 14  com.buglabs.bug.swarm.client/META-INF/MANIFEST.MF
  4. 204  com.buglabs.bug.swarm.client/bin/Example.html
  5. 1  com.buglabs.bug.swarm.client/bin/README
  6. 4  com.buglabs.bug.swarm.client/build.properties
  7. 62  com.buglabs.bug.swarm.client/build.xml
  8. 344  com.buglabs.bug.swarm.client/checkstyle/checkstyle-com.buglabs.bug.swarm.client.xml
  9. 403  com.buglabs.bug.swarm.client/checkstyle/cpd-com.buglabs.bug.swarm.client.xml
  10. 27  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmBinaryUploadClient.java
  11. 119  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmClient.java
  12. 249  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmConfiguration.java
  13. 138  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmInviteClient.java
  14. 22  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmJsonMessageListener.java
  15. 70  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmKeysClient.java
  16. 56  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmMessageListener.java
  17. 91  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmResourcesClient.java
  18. 104  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmSession.java
  19. 20  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmStringMessageListener.java
  20. 89  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/IUserResourceClient.java
  21. 101  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/SwarmClientFactory.java
  22. 120  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/SwarmWSResponse.java
  23. 182  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/AbstractSwarmWSClient.java
  24. 52  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmBinaryUploadWSClient.java
  25. 95  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmInviteWSClient.java
  26. 110  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmKeysWSClient.java
  27. 258  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmParticipationReader.java
  28. 166  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmResourceWSClient.java
  29. 386  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmSessionImp.java
  30. 288  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmWSClient.java
  31. 109  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/UserResourceWSClient.java
  32. 252  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/Configuration.java
  33. 217  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/Invitation.java
  34. 68  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/ModelBase.java
  35. 35  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/ResourcePosition.java
  36. 116  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/SwarmKey.java
  37. 201  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/SwarmModel.java
  38. 103  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/SwarmResourceModel.java
  39. 179  com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/UserResourceModel.java
  40. 204  com.buglabs.bug.swarm.client/test/Example.html
  41. 1  com.buglabs.bug.swarm.client/test/README
  42. 77  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/example/Example.java
  43. 180  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/AccountConfig.java
  44. 92  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/SwarmConfigKeys.java
  45. 170  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/TwoParticipantsOneSwarmTestCase.java
  46. 122  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmAPIKeyWSAPITests.java
  47. 283  ...uglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmInvitationWSAPITests.java
  48. 333  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmResourceWSAPITests.java
  49. 223  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmWSAPITests.java
  50. 126  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/UserResourceWSAPITests.java
  51. 104  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/FeedTests.java
  52. 329  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java
  53. 172  com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/SessionManagementTests.java
9  com.buglabs.bug.swarm.client/.classpath
... ...
@@ -0,0 +1,9 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<classpath>
  3
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
  4
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
  5
+	<classpathentry kind="src" path="src"/>
  6
+	<classpathentry kind="src" path="test"/>
  7
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
  8
+	<classpathentry kind="output" path="bin"/>
  9
+</classpath>
28  com.buglabs.bug.swarm.client/.project
... ...
@@ -0,0 +1,28 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<projectDescription>
  3
+	<name>com.buglabs.bug.swarm.client</name>
  4
+	<comment></comment>
  5
+	<projects>
  6
+	</projects>
  7
+	<buildSpec>
  8
+		<buildCommand>
  9
+			<name>org.eclipse.jdt.core.javabuilder</name>
  10
+			<arguments>
  11
+			</arguments>
  12
+		</buildCommand>
  13
+		<buildCommand>
  14
+			<name>org.eclipse.pde.ManifestBuilder</name>
  15
+			<arguments>
  16
+			</arguments>
  17
+		</buildCommand>
  18
+		<buildCommand>
  19
+			<name>org.eclipse.pde.SchemaBuilder</name>
  20
+			<arguments>
  21
+			</arguments>
  22
+		</buildCommand>
  23
+	</buildSpec>
  24
+	<natures>
  25
+		<nature>org.eclipse.pde.PluginNature</nature>
  26
+		<nature>org.eclipse.jdt.core.javanature</nature>
  27
+	</natures>
  28
+</projectDescription>
14  com.buglabs.bug.swarm.client/META-INF/MANIFEST.MF
... ...
@@ -0,0 +1,14 @@
  1
+Manifest-Version: 1.0
  2
+Bundle-ManifestVersion: 2
  3
+Bundle-Name: BUGswarm ReST Client
  4
+Bundle-SymbolicName: com.buglabs.bug.swarm.client
  5
+Bundle-Version: 1.0.0.qualifier
  6
+Bundle-Vendor: Bug Labs, Inc.
  7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
  8
+Import-Package: 
  9
+ junit.framework;resolution:=optional,
  10
+ org.codehaus.jackson,
  11
+ org.codehaus.jackson.map,
  12
+ org.touge.restclient;version="1.0"
  13
+Export-Package: com.buglabs.bug.swarm.client;version="0.3.0",
  14
+ com.buglabs.bug.swarm.client.model;version="0.3.0"
204  com.buglabs.bug.swarm.client/bin/Example.html
... ...
@@ -0,0 +1,204 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  5
+  <title>Example.java</title>
  6
+  <link rel="stylesheet" href="pycco.css">
  7
+</head>
  8
+<body>
  9
+<div id="background"></div>
  10
+<div id='container'>
  11
+  
  12
+  <div class='section'>
  13
+    <div class='docs'><h1>Example.java</h1></div>
  14
+  </div>
  15
+  <div class='clearall'>
  16
+  <div class='section' id='section-0'>
  17
+    <div class='docs'>
  18
+      <div class='octowrap'>
  19
+        <a class='octothorpe' href='#section-0'>#</a>
  20
+      </div>
  21
+      
  22
+    </div>
  23
+    <div class='code'>
  24
+      <div class="highlight"><pre><span class="n">import</span> <span class="n">java</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">IOException</span><span class="p">;</span>
  25
+<span class="n">import</span> <span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">Random</span><span class="p">;</span>
  26
+
  27
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">ISwarmClient</span><span class="p">;</span>
  28
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">ISwarmInviteClient</span><span class="p">;</span>
  29
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">ISwarmInviteClient</span><span class="p">.</span><span class="n">InvitationResponse</span><span class="p">;</span>
  30
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">ISwarmResourcesClient</span><span class="p">;</span>
  31
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">ISwarmResourcesClient</span><span class="p">.</span><span class="n">MemberType</span><span class="p">;</span>
  32
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">IUserResourceClient</span><span class="p">;</span>
  33
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">SwarmClientFactory</span><span class="p">;</span>
  34
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">model</span><span class="p">.</span><span class="n">Invitation</span><span class="p">;</span>
  35
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">model</span><span class="p">.</span><span class="n">SwarmModel</span><span class="p">;</span>
  36
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">model</span><span class="p">.</span><span class="n">SwarmResourceModel</span><span class="p">;</span>
  37
+<span class="n">import</span> <span class="n">com</span><span class="p">.</span><span class="n">buglabs</span><span class="p">.</span><span class="n">bug</span><span class="p">.</span><span class="n">swarm</span><span class="p">.</span><span class="n">restclient</span><span class="p">.</span><span class="n">model</span><span class="p">.</span><span class="n">UserResourceModel</span><span class="p">;</span></pre></div>
  38
+    </div>
  39
+  </div>
  40
+  <div class='clearall'></div><div class='section' id='section-1'>
  41
+    <div class='docs'>
  42
+      <div class='octowrap'>
  43
+        <a class='octothorpe' href='#section-1'>#</a>
  44
+      </div>
  45
+      <h2>This file illustrates how to use the swarm.restclient library for the configuration side of BUGswarm</h2>
  46
+    </div>
  47
+    <div class='code'>
  48
+      <div class="highlight"><pre><span class="n">public</span> <span class="n">class</span> <span class="n">Example</span> <span class="p">{</span>
  49
+
  50
+	<span class="n">public</span> <span class="k">static</span> <span class="kt">void</span> <span class="n">main</span><span class="p">(</span><span class="n">String</span><span class="p">[]</span> <span class="n">args</span><span class="p">)</span> <span class="n">throws</span> <span class="n">IOException</span> <span class="p">{</span></pre></div>
  51
+    </div>
  52
+  </div>
  53
+  <div class='clearall'></div><div class='section' id='section-2'>
  54
+    <div class='docs'>
  55
+      <div class='octowrap'>
  56
+        <a class='octothorpe' href='#section-2'>#</a>
  57
+      </div>
  58
+      <h2>Get an instance of the root client using the factory:</h2>
  59
+<p>A default error handler is set that will throw IOException on any non-application HTTP error.</p>
  60
+    </div>
  61
+    <div class='code'>
  62
+      <div class="highlight"><pre>		<span class="n">ISwarmClient</span> <span class="n">client</span> <span class="o">=</span> <span class="n">SwarmClientFactory</span><span class="p">.</span><span class="n">getSwarmClient</span><span class="p">(</span><span class="s">&quot;api.test.bugswarm.net&quot;</span><span class="p">,</span> <span class="s">&quot;3077514aa9aa5a5826cfd9d04ee059db1a18057d&quot;</span><span class="p">);</span></pre></div>
  63
+    </div>
  64
+  </div>
  65
+  <div class='clearall'></div><div class='section' id='section-3'>
  66
+    <div class='docs'>
  67
+      <div class='octowrap'>
  68
+        <a class='octothorpe' href='#section-3'>#</a>
  69
+      </div>
  70
+      <h2>Create a new swarm:</h2>
  71
+    </div>
  72
+    <div class='code'>
  73
+      <div class="highlight"><pre>		<span class="n">String</span> <span class="n">id</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="n">create</span><span class="p">(</span><span class="s">&quot;my sweet swarm&quot;</span><span class="p">,</span> <span class="nb">true</span><span class="p">,</span> <span class="s">&quot;my swarm description&quot;</span><span class="p">);</span></pre></div>
  74
+    </div>
  75
+  </div>
  76
+  <div class='clearall'></div><div class='section' id='section-4'>
  77
+    <div class='docs'>
  78
+      <div class='octowrap'>
  79
+        <a class='octothorpe' href='#section-4'>#</a>
  80
+      </div>
  81
+      <h2>Get the details of my new swarm:</h2>
  82
+    </div>
  83
+    <div class='code'>
  84
+      <div class="highlight"><pre>		<span class="n">SwarmModel</span> <span class="n">swarm</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="n">get</span><span class="p">(</span><span class="n">id</span><span class="p">);</span>
  85
+		<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">swarm</span><span class="p">.</span><span class="n">getCreatedAt</span><span class="p">());</span></pre></div>
  86
+    </div>
  87
+  </div>
  88
+  <div class='clearall'></div><div class='section' id='section-5'>
  89
+    <div class='docs'>
  90
+      <div class='octowrap'>
  91
+        <a class='octothorpe' href='#section-5'>#</a>
  92
+      </div>
  93
+      <h2>Get a list of my member swarms:</h2>
  94
+<p>By convention, the client will never return null to list operations but rather empty lists.  So, checking for null is not required.</p>
  95
+    </div>
  96
+    <div class='code'>
  97
+      <div class="highlight"><pre>		<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;I belong to...&quot;</span><span class="p">);</span>
  98
+		<span class="k">for</span> <span class="p">(</span><span class="n">SwarmModel</span> <span class="n">sm</span> <span class="o">:</span> <span class="n">client</span><span class="p">.</span><span class="n">list</span><span class="p">())</span>
  99
+			<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">sm</span><span class="p">.</span><span class="n">getId</span><span class="p">());</span></pre></div>
  100
+    </div>
  101
+  </div>
  102
+  <div class='clearall'></div><div class='section' id='section-6'>
  103
+    <div class='docs'>
  104
+      <div class='octowrap'>
  105
+        <a class='octothorpe' href='#section-6'>#</a>
  106
+      </div>
  107
+      <h2>Create a new resource:</h2>
  108
+<p>Note that the clients are partitioned along the logical separations of the API specification.</p>
  109
+    </div>
  110
+    <div class='code'>
  111
+      <div class="highlight"><pre>		<span class="n">IUserResourceClient</span> <span class="n">resourceClient</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="n">getUserResourceClient</span><span class="p">();</span>
  112
+		<span class="n">UserResourceModel</span> <span class="n">resource</span> <span class="o">=</span> <span class="n">resourceClient</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="s">&quot;my-resource&quot;</span><span class="p">,</span> <span class="s">&quot;a sweet swarm resource.&quot;</span><span class="p">,</span> <span class="s">&quot;pc&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
  113
+		
  114
+		<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;My new resource id is &quot;</span> <span class="o">+</span> <span class="n">resource</span><span class="p">.</span><span class="n">getResourceId</span><span class="p">());</span></pre></div>
  115
+    </div>
  116
+  </div>
  117
+  <div class='clearall'></div><div class='section' id='section-7'>
  118
+    <div class='docs'>
  119
+      <div class='octowrap'>
  120
+        <a class='octothorpe' href='#section-7'>#</a>
  121
+      </div>
  122
+      <h2>List all of my resources</h2>
  123
+    </div>
  124
+    <div class='code'>
  125
+      <div class="highlight"><pre>		<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;I have these resources...&quot;</span><span class="p">);</span>
  126
+		<span class="k">for</span> <span class="p">(</span><span class="n">UserResourceModel</span> <span class="n">urm</span> <span class="o">:</span> <span class="n">resourceClient</span><span class="p">.</span><span class="n">list</span><span class="p">())</span>
  127
+			<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">urm</span><span class="p">.</span><span class="n">getName</span><span class="p">()</span> <span class="o">+</span> <span class="s">&quot; - &quot;</span> <span class="o">+</span> <span class="n">urm</span><span class="p">.</span><span class="n">getDescription</span><span class="p">());</span></pre></div>
  128
+    </div>
  129
+  </div>
  130
+  <div class='clearall'></div><div class='section' id='section-8'>
  131
+    <div class='docs'>
  132
+      <div class='octowrap'>
  133
+        <a class='octothorpe' href='#section-8'>#</a>
  134
+      </div>
  135
+      <h2>Invite someone to my swarm:</h2>
  136
+    </div>
  137
+    <div class='code'>
  138
+      <div class="highlight"><pre>		<span class="n">ISwarmInviteClient</span> <span class="n">inviteClient</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="n">getSwarmInviteClient</span><span class="p">();</span></pre></div>
  139
+    </div>
  140
+  </div>
  141
+  <div class='clearall'></div><div class='section' id='section-9'>
  142
+    <div class='docs'>
  143
+      <div class='octowrap'>
  144
+        <a class='octothorpe' href='#section-9'>#</a>
  145
+      </div>
  146
+      <p>Note this will fail if run since the supplied user and resource are not valid.</p>
  147
+    </div>
  148
+    <div class='code'>
  149
+      <div class="highlight"><pre>		<span class="n">Invitation</span> <span class="n">invite</span> <span class="o">=</span> <span class="n">inviteClient</span><span class="p">.</span><span class="n">send</span><span class="p">(</span><span class="n">swarm</span><span class="p">.</span><span class="n">getId</span><span class="p">(),</span> <span class="s">&quot;some-user&quot;</span><span class="p">,</span> <span class="s">&quot;some-resource&quot;</span><span class="p">,</span> <span class="n">MemberType</span><span class="p">.</span><span class="n">CONSUMER</span><span class="p">,</span> <span class="s">&quot;hey man join my sweet swarm.&quot;</span><span class="p">);</span></pre></div>
  150
+    </div>
  151
+  </div>
  152
+  <div class='clearall'></div><div class='section' id='section-10'>
  153
+    <div class='docs'>
  154
+      <div class='octowrap'>
  155
+        <a class='octothorpe' href='#section-10'>#</a>
  156
+      </div>
  157
+      <h2>List my invitations:</h2>
  158
+    </div>
  159
+    <div class='code'>
  160
+      <div class="highlight"><pre>		<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;I have invited these users...&quot;</span><span class="p">);</span>
  161
+		<span class="k">for</span> <span class="p">(</span><span class="n">Invitation</span> <span class="n">i</span> <span class="o">:</span> <span class="n">inviteClient</span><span class="p">.</span><span class="n">getSentInvitations</span><span class="p">(</span><span class="n">swarm</span><span class="p">.</span><span class="n">getId</span><span class="p">()))</span>
  162
+			<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">i</span><span class="p">.</span><span class="n">getToUser</span><span class="p">());</span></pre></div>
  163
+    </div>
  164
+  </div>
  165
+  <div class='clearall'></div><div class='section' id='section-11'>
  166
+    <div class='docs'>
  167
+      <div class='octowrap'>
  168
+        <a class='octothorpe' href='#section-11'>#</a>
  169
+      </div>
  170
+      <h2>Check to see if anyone wants me in their swarms:</h2>
  171
+    </div>
  172
+    <div class='code'>
  173
+      <div class="highlight"><pre>		<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;I will randomly accept and reject my invites...&quot;</span><span class="p">);</span>
  174
+		<span class="n">Random</span> <span class="n">r</span> <span class="o">=</span> <span class="n">new</span> <span class="n">Random</span><span class="p">();</span>
  175
+		
  176
+		<span class="k">for</span> <span class="p">(</span><span class="n">Invitation</span> <span class="n">i</span> <span class="o">:</span> <span class="n">inviteClient</span><span class="p">.</span><span class="n">getRecievedInvitations</span><span class="p">())</span>
  177
+			<span class="k">if</span> <span class="p">(</span><span class="n">r</span><span class="p">.</span><span class="n">nextBoolean</span><span class="p">())</span>
  178
+				<span class="n">inviteClient</span><span class="p">.</span><span class="n">respond</span><span class="p">(</span><span class="n">i</span><span class="p">.</span><span class="n">getResourceId</span><span class="p">(),</span> <span class="n">i</span><span class="p">.</span><span class="n">getId</span><span class="p">(),</span> <span class="n">InvitationResponse</span><span class="p">.</span><span class="n">ACCEPT</span><span class="p">);</span>
  179
+			<span class="k">else</span>
  180
+				<span class="n">inviteClient</span><span class="p">.</span><span class="n">respond</span><span class="p">(</span><span class="n">i</span><span class="p">.</span><span class="n">getResourceId</span><span class="p">(),</span> <span class="n">i</span><span class="p">.</span><span class="n">getId</span><span class="p">(),</span> <span class="n">InvitationResponse</span><span class="p">.</span><span class="n">REJECT</span><span class="p">);</span></pre></div>
  181
+    </div>
  182
+  </div>
  183
+  <div class='clearall'></div><div class='section' id='section-12'>
  184
+    <div class='docs'>
  185
+      <div class='octowrap'>
  186
+        <a class='octothorpe' href='#section-12'>#</a>
  187
+      </div>
  188
+      <h2>Show what resources are in my swarm:</h2>
  189
+    </div>
  190
+    <div class='code'>
  191
+      <div class="highlight"><pre>		<span class="n">ISwarmResourcesClient</span> <span class="n">swarmResourceClient</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="n">getSwarmResourceClient</span><span class="p">();</span>
  192
+		
  193
+		<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Here is who is in my swarms...&quot;</span><span class="p">);</span>
  194
+		<span class="k">for</span> <span class="p">(</span><span class="n">SwarmResourceModel</span> <span class="n">srm</span> <span class="o">:</span> <span class="n">swarmResourceClient</span><span class="p">.</span><span class="n">list</span><span class="p">(</span><span class="n">swarm</span><span class="p">.</span><span class="n">getId</span><span class="p">(),</span> <span class="n">MemberType</span><span class="p">.</span><span class="n">CONSUMER</span><span class="p">))</span>
  195
+			<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">srm</span><span class="p">.</span><span class="n">getUserId</span><span class="p">()</span> <span class="o">+</span> <span class="s">&quot; - &quot;</span> <span class="o">+</span> <span class="n">srm</span><span class="p">.</span><span class="n">getResourceId</span><span class="p">());</span>
  196
+	<span class="p">}</span>
  197
+<span class="p">}</span>
  198
+
  199
+</pre></div>
  200
+    </div>
  201
+  </div>
  202
+  <div class='clearall'></div>
  203
+</div>
  204
+</body>
1  com.buglabs.bug.swarm.client/bin/README
... ...
@@ -0,0 +1 @@
  1
+The tests for restclient are now in bugswarm-connector project.
4  com.buglabs.bug.swarm.client/build.properties
... ...
@@ -0,0 +1,4 @@
  1
+source.. = src/
  2
+output.. = bin/
  3
+bin.includes = META-INF/,\
  4
+               .
62  com.buglabs.bug.swarm.client/build.xml
... ...
@@ -0,0 +1,62 @@
  1
+<?xml version="1.0"?>
  2
+<project name="com.buglabs.bug.swarm.client" basedir=".">
  3
+	<!-- PROJECT CONSTANTS -->
  4
+	
  5
+	<target name="build.jars" description="Package the java class files into a jar.">
  6
+		<echo message="## PROJECT: ${ant.project.name} ## TARGET: build.jars" />
  7
+			
  8
+		<property name="dist.jar.name" value="${ant.project.name}" />
  9
+		<property name="manifest.location" location="${basedir}/META-INF/MANIFEST.MF"/>
  10
+			
  11
+		<fail unless="distDirectory" message="distDirectory must be defined." />
  12
+		<fail unless="buildDirectory" message="buildDirectory must be defined." />
  13
+
  14
+		<jar destfile="${distDirectory}/${dist.jar.name}.jar" 
  15
+			basedir="${buildDirectory}" 
  16
+			manifest="${manifest.location}">
  17
+			<fileset dir="${buildDirectory}" excludes="**/*.java,build/**,**/.settings/**,**/build.xml/**,**/build.properties/**,**/.classpath,**/.project,src/**,test/**,junit-reports/**,.git/**,**.gitignore,**/.checkstyle,**/README.*,**/build*.sh,checkstyle-reports/**" />
  18
+			<fileset dir="${basedir}" includes="images/**,includes/**,javascripts/**,stylesheets/**,templates/**" />
  19
+		</jar>
  20
+	</target>
  21
+	
  22
+	<!-- target: test   Run JUnit tests -->
  23
+	<target name="test">
  24
+		<echo message="## PROJECT: ${ant.project.name} ## TARGET: test" />
  25
+		<fail unless="report.dir" message="Ant variable report.dir must be defined." />
  26
+		<echo message="Generating test result output in ${report.dir}..." />
  27
+		<junit printsummary="yes">
  28
+			<classpath refid="bin.classpath" />
  29
+			<sysproperty key="report.misc" value="${report.misc}" />
  30
+			<formatter type="xml" />
  31
+			<batchtest todir="${report.dir}">
  32
+				<fileset dir="${report.src}">
  33
+					<include name="**/*Test*.java" />
  34
+					<exclude name="**/*OSGiTest*.java" />
  35
+				</fileset>
  36
+			</batchtest>
  37
+		</junit>
  38
+	</target>
  39
+	
  40
+	<!-- PROJECT IMPORTS -->
  41
+	<exec executable="/usr/bin/wget">
  42
+		<arg line="-P ${base.build.dir}" />
  43
+		<arg line="--no-check-certificate" />
  44
+		<arg line="-nc" />
  45
+		<arg line="https://github.com/downloads/buglabs/bug-osgi/common-osgi.xml" />
  46
+	</exec>
  47
+	<property name="common.ant.file" location="${base.build.dir}/common-osgi.xml" />
  48
+	<import file="${common.ant.file}" />
  49
+	
  50
+	<!-- JUnit tests -->
  51
+	<property environment="env" />
  52
+	<property name="report.misc" value="${env.TEST_HOST}" />
  53
+	<echo message="report.misc is ${report.misc}">
  54
+	</echo>
  55
+	<property name="report.dir" location="junit-reports" />
  56
+	<property name="report.src" location="test/" />
  57
+
  58
+	<!-- Checkstyle -->
  59
+	<property name="checkstyle.config" location="${base.build.dir}/toolbox/checkstyle/buglabs_checks.xml" />
  60
+	<property name="checkstyle.dir" location="checkstyle-reports" />
  61
+	<property name="checkstyle.src" location="src/" />
  62
+</project>
344  com.buglabs.bug.swarm.client/checkstyle/checkstyle-com.buglabs.bug.swarm.client.xml
... ...
@@ -0,0 +1,344 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<checkstyle version="5.3">
  3
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmBinaryUploadClient.java">
  4
+<error line="26" column="106" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  5
+</file>
  6
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmClient.java">
  7
+<error line="22" column="9" severity="warning" message="Redundant &apos;public&apos; modifier." source="com.puppycrawl.tools.checkstyle.checks.modifier.RedundantModifierCheck"/>
  8
+</file>
  9
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmConfiguration.java">
  10
+<error line="33" column="106" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  11
+<error line="92" severity="warning" message="First sentence should end with a period." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck"/>
  12
+<error line="132" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  13
+<error line="161" column="12" severity="warning" message="Unused @param tag for &apos;userId&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  14
+<error line="180" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  15
+<error line="193" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  16
+<error line="206" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  17
+</file>
  18
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmInviteClient.java">
  19
+<error line="9" severity="warning" message="First sentence should end with a period." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck"/>
  20
+<error line="128" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  21
+</file>
  22
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmJsonMessageListener.java">
  23
+</file>
  24
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmKeysClient.java">
  25
+<error line="51" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  26
+</file>
  27
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmMessageListener.java">
  28
+<error line="34" severity="warning" message="First sentence should end with a period." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck"/>
  29
+<error line="55" column="46" severity="warning" message="Expected @param tag for &apos;type&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  30
+<error line="55" column="59" severity="warning" message="Expected @param tag for &apos;message&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  31
+</file>
  32
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmResourcesClient.java">
  33
+<error line="57" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  34
+<error line="64" column="12" severity="warning" message="Unused @param tag for &apos;userId&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  35
+<error line="66" column="12" severity="warning" message="Unused @param tag for &apos;resource&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  36
+<error line="70" column="91" severity="warning" message="Expected @param tag for &apos;resourceId&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  37
+<error line="86" column="12" severity="warning" message="Unused @param tag for &apos;resource&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  38
+<error line="90" column="51" severity="warning" message="Expected @param tag for &apos;resourceiD&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  39
+</file>
  40
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmSession.java">
  41
+<error line="23" column="34" severity="warning" message="Expected @param tag for &apos;payload&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  42
+<error line="23" column="50" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  43
+<error line="31" column="34" severity="warning" message="Expected @param tag for &apos;payload&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  44
+<error line="31" column="54" severity="warning" message="Expected @param tag for &apos;swarmIds&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  45
+<error line="31" column="71" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  46
+<error line="39" column="34" severity="warning" message="Expected @param tag for &apos;payload&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  47
+<error line="39" column="75" severity="warning" message="Expected @param tag for &apos;swarmAndResource&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  48
+<error line="39" column="100" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  49
+<error line="47" column="26" severity="warning" message="Expected @param tag for &apos;swarmId&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  50
+<error line="47" column="42" severity="warning" message="Expected @param tag for &apos;resourceId&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  51
+<error line="47" column="61" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  52
+<error line="54" column="48" severity="warning" message="Expected @param tag for &apos;listener&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  53
+<error line="60" column="51" severity="warning" message="Expected @param tag for &apos;listener&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  54
+<error line="67" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  55
+</file>
  56
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/ISwarmStringMessageListener.java">
  57
+<error line="9" column="75" severity="warning" message="&apos;{&apos; is not preceded with whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck"/>
  58
+</file>
  59
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/IUserResourceClient.java">
  60
+<error line="31" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  61
+<error line="44" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  62
+</file>
  63
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/SwarmClientFactory.java">
  64
+<error line="16" severity="warning" message="Class SwarmClientFactory should be declared as final." source="com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck"/>
  65
+<error line="23" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  66
+<error line="27" severity="warning" message="First sentence should end with a period." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck"/>
  67
+<error line="38" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  68
+<error line="58" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  69
+<error line="58" column="135" severity="warning" message="Redundant throws: &apos;UnknownHostException&apos; is subclass of &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  70
+</file>
  71
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/SwarmWSResponse.java">
  72
+<error line="27" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  73
+<error line="31" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  74
+<error line="41" column="78" severity="warning" message="Name &apos;Deserializer&apos; must match pattern &apos;^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$&apos;." source="com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck"/>
  75
+<error line="95" column="42" severity="warning" message="Expected @param tag for &apos;message&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  76
+</file>
  77
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/AbstractSwarmWSClient.java">
  78
+<error line="33" column="47" severity="warning" message="Variable &apos;swarmHostUrl&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  79
+<error line="34" column="32" severity="warning" message="Variable &apos;apiKey&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  80
+<error line="35" column="36" severity="warning" message="Variable &apos;httpClient&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  81
+<error line="76" column="45" severity="warning" message="&apos;400&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  82
+<error line="76" column="59" severity="warning" message="&apos;600&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  83
+<error line="76" column="74" severity="warning" message="&apos;409&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  84
+<error line="176" column="79" severity="warning" message="Unable to get class information for JsonGenerationException." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  85
+<error line="176" column="104" severity="warning" message="Redundant throws: &apos;JsonMappingException&apos; listed more then one time." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  86
+<error line="176" column="104" severity="warning" message="Unable to get class information for JsonMappingException." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  87
+</file>
  88
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmBinaryUploadWSClient.java">
  89
+<error line="41" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  90
+<error line="45" column="52" severity="warning" message="&apos;(&apos; is followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck"/>
  91
+</file>
  92
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmInviteWSClient.java">
  93
+<error line="15" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck"/>
  94
+<error line="17" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  95
+<error line="22" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  96
+</file>
  97
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmKeysWSClient.java">
  98
+<error line="33" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  99
+<error line="36" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  100
+<error line="37" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  101
+</file>
  102
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmParticipationReader.java">
  103
+<error line="0" severity="warning" message="File does not end with a newline." source="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck"/>
  104
+<error line="42" column="23" severity="warning" message="&apos;static&apos; modifier out of order with the JLS suggestions." source="com.puppycrawl.tools.checkstyle.checks.modifier.ModifierOrderCheck"/>
  105
+<error line="42" column="43" severity="warning" message="Name &apos;mapper&apos; must match pattern &apos;^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$&apos;." source="com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck"/>
  106
+<error line="50" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  107
+<error line="50" column="121" severity="warning" message="Expected @throws tag for &apos;UnsupportedEncodingException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  108
+<error line="75" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  109
+<error line="84" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  110
+<error line="88" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  111
+<error line="90" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  112
+<error line="98" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  113
+<error line="115" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  114
+<error line="117" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  115
+<error line="117" column="109" severity="warning" message="&apos;cast&apos; is not followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck"/>
  116
+<error line="120" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  117
+<error line="121" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  118
+<error line="121" column="101" severity="warning" message="&apos;cast&apos; is not followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck"/>
  119
+<error line="125" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  120
+<error line="125" column="95" severity="warning" message="&apos;cast&apos; is not followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck"/>
  121
+<error line="127" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  122
+<error line="133" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  123
+<error line="137" column="46" severity="warning" message="&apos;100&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  124
+<error line="155" column="45" severity="warning" message="Expected @param tag for &apos;line&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  125
+<error line="169" column="56" severity="warning" message="Expected @param tag for &apos;jmessage&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  126
+<error line="180" column="57" severity="warning" message="Expected @param tag for &apos;jmessage&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  127
+<error line="193" column="36" severity="warning" message="Expected @param tag for &apos;jsonNode&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  128
+<error line="221" column="44" severity="warning" message="&apos;16&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  129
+<error line="223" column="51" severity="warning" message="Must have at least one statement." source="com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck"/>
  130
+<error line="228" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  131
+<error line="229" column="54" severity="warning" message="&apos;4&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  132
+</file>
  133
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmResourceWSClient.java">
  134
+<error line="57" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  135
+<error line="59" column="69" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  136
+<error line="62" column="78" severity="warning" message="&apos;=&apos; is not preceded with whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck"/>
  137
+<error line="91" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  138
+<error line="93" column="69" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  139
+<error line="96" column="78" severity="warning" message="&apos;=&apos; is not preceded with whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck"/>
  140
+</file>
  141
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmSessionImp.java">
  142
+<error line="35" column="23" severity="warning" message="&apos;static&apos; modifier out of order with the JLS suggestions." source="com.puppycrawl.tools.checkstyle.checks.modifier.ModifierOrderCheck"/>
  143
+<error line="35" column="43" severity="warning" message="Name &apos;mapper&apos; must match pattern &apos;^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$&apos;." source="com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck"/>
  144
+<error line="48" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  145
+<error line="48" column="121" severity="warning" message="Redundant throws: &apos;UnknownHostException&apos; is subclass of &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  146
+<error line="57" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  147
+<error line="73" column="42" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  148
+<error line="130" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  149
+<error line="130" column="110" severity="warning" message="Unable to get class information for JsonGenerationException." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  150
+<error line="130" column="135" severity="warning" message="Redundant throws: &apos;JsonMappingException&apos; listed more then one time." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  151
+<error line="130" column="135" severity="warning" message="Unable to get class information for JsonMappingException." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  152
+<error line="180" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  153
+<error line="199" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  154
+<error line="203" column="38" severity="warning" message="Expected @param tag for &apos;message&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  155
+<error line="203" column="55" severity="warning" message="Expected @param tag for &apos;out&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  156
+<error line="204" column="54" severity="warning" message="&apos;4&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  157
+<error line="218" severity="warning" message="Expected an @return tag." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  158
+<error line="218" column="61" severity="warning" message="Expected @param tag for &apos;resourceId&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  159
+<error line="218" column="88" severity="warning" message="Expected @param tag for &apos;payload&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  160
+<error line="219" column="42" severity="warning" message="&apos;=&apos; is not followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck"/>
  161
+<error line="272" column="41" severity="warning" message="Must have at least one statement." source="com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck"/>
  162
+<error line="278" column="41" severity="warning" message="Must have at least one statement." source="com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck"/>
  163
+<error line="290" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  164
+<error line="290" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  165
+</file>
  166
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/SwarmWSClient.java">
  167
+<error line="214" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  168
+<error line="255" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  169
+<error line="260" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  170
+</file>
  171
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/impl/UserResourceWSClient.java">
  172
+<error line="37" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  173
+<error line="40" column="51" severity="warning" message="&apos;(&apos; is followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck"/>
  174
+</file>
  175
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/Invitation.java">
  176
+<error line="54" severity="warning" message="First sentence should end with a period." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck"/>
  177
+<error line="61" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  178
+<error line="71" severity="warning" message="First sentence should end with a period." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck"/>
  179
+<error line="77" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  180
+<error line="78" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  181
+<error line="81" column="46" severity="warning" message="&apos;=&apos; is not preceded with whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck"/>
  182
+<error line="111" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  183
+<error line="111" column="16" severity="warning" message="More than 7 parameters." source="com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck"/>
  184
+<error line="125" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  185
+<error line="150" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  186
+<error line="150" column="16" severity="warning" message="More than 7 parameters." source="com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck"/>
  187
+</file>
  188
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/ModelBase.java">
  189
+<error line="22" column="39" severity="warning" message="Variable &apos;objectMapper&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  190
+<error line="32" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  191
+</file>
  192
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/ResourcePosition.java">
  193
+</file>
  194
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/SwarmKey.java">
  195
+<error line="78" severity="warning" message="First sentence should end with a period." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck"/>
  196
+</file>
  197
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/SwarmModel.java">
  198
+<error line="39" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  199
+<error line="57" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  200
+<error line="89" column="16" severity="warning" message="More than 7 parameters." source="com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck"/>
  201
+<error line="165" column="9" severity="warning" message="Definition of &apos;equals()&apos; without corresponding definition of &apos;hashCode()&apos;." source="com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck"/>
  202
+<error line="177" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  203
+<error line="195" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  204
+</file>
  205
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/SwarmResourceModel.java">
  206
+<error line="88" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  207
+<error line="97" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  208
+</file>
  209
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/src/com/buglabs/bug/swarm/client/model/UserResourceModel.java">
  210
+<error line="31" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  211
+<error line="54" column="45" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  212
+<error line="93" column="16" severity="warning" message="More than 7 parameters." source="com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck"/>
  213
+<error line="161" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  214
+<error line="162" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  215
+<error line="173" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  216
+</file>
  217
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/example/Example.java">
  218
+<error line="18" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck"/>
  219
+<error line="18" column="1" severity="warning" message="Utility classes should not have a public or default constructor." source="com.puppycrawl.tools.checkstyle.checks.design.HideUtilityClassConstructorCheck"/>
  220
+<error line="20" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  221
+<error line="23" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  222
+<error line="33" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  223
+<error line="53" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  224
+</file>
  225
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/AccountConfig.java">
  226
+<error line="27" column="1" severity="warning" message="Utility classes should not have a public or default constructor." source="com.puppycrawl.tools.checkstyle.checks.design.HideUtilityClassConstructorCheck"/>
  227
+<error line="32" column="30" severity="warning" message="Variable &apos;testSwarmId&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  228
+<error line="36" column="41" severity="warning" message="Variable &apos;testUserResource&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  229
+<error line="37" column="41" severity="warning" message="Variable &apos;testUserResource2&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  230
+<error line="38" column="41" severity="warning" message="Variable &apos;testUserResource1&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  231
+<error line="40" column="30" severity="warning" message="Variable &apos;testInviteId&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  232
+<error line="48" severity="warning" message="Expected an @return tag." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  233
+<error line="85" severity="warning" message="Expected an @return tag." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  234
+<error line="119" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  235
+<error line="126" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  236
+<error line="133" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  237
+<error line="143" severity="warning" message="Expected an @return tag." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  238
+<error line="153" severity="warning" message="Expected an @return tag." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  239
+<error line="160" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  240
+<error line="164" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  241
+<error line="170" column="36" severity="warning" message="&apos;10&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  242
+<error line="170" column="42" severity="warning" message="&apos;5&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  243
+</file>
  244
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/Configuration.java">
  245
+<error line="90" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  246
+<error line="98" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  247
+<error line="133" column="59" severity="warning" message="Must have at least one statement." source="com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck"/>
  248
+<error line="147" column="59" severity="warning" message="Must have at least one statement." source="com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck"/>
  249
+<error line="197" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  250
+</file>
  251
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/SwarmConfigKeys.java">
  252
+</file>
  253
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmAPIKeyWSAPITests.java">
  254
+</file>
  255
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmInvitationWSAPITests.java">
  256
+<error line="27" column="37" severity="warning" message="Name &apos;description&apos; must match pattern &apos;^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$&apos;." source="com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck"/>
  257
+<error line="66" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  258
+<error line="96" column="45" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  259
+<error line="130" column="54" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  260
+<error line="143" column="50" severity="warning" message="Expression can be simplified." source="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheck"/>
  261
+<error line="149" column="50" severity="warning" message="Expression can be simplified." source="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheck"/>
  262
+<error line="170" column="58" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  263
+<error line="183" column="54" severity="warning" message="Expression can be simplified." source="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheck"/>
  264
+<error line="205" column="51" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  265
+<error line="215" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  266
+<error line="218" column="54" severity="warning" message="Expression can be simplified." source="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheck"/>
  267
+<error line="235" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  268
+<error line="247" column="51" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  269
+<error line="257" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  270
+<error line="260" column="54" severity="warning" message="Expression can be simplified." source="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheck"/>
  271
+<error line="277" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  272
+</file>
  273
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmResourceWSAPITests.java">
  274
+<error line="39" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  275
+<error line="40" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  276
+<error line="148" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  277
+<error line="149" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  278
+<error line="175" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  279
+<error line="178" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  280
+<error line="194" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  281
+<error line="216" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  282
+<error line="252" column="55" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  283
+<error line="303" severity="warning" message="Comment matches to-do format &apos;TODO:&apos;." source="com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck"/>
  284
+<error line="312" column="23" severity="warning" message="&apos;assert&apos; is not followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck"/>
  285
+</file>
  286
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmWSAPITests.java">
  287
+<error line="25" column="9" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  288
+<error line="197" column="44" severity="warning" message="&apos;200&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  289
+<error line="199" column="55" severity="warning" message="&apos;200&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  290
+<error line="199" column="60" severity="warning" message="&apos;201&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  291
+<error line="199" column="65" severity="warning" message="&apos;400&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  292
+<error line="199" column="70" severity="warning" message="&apos;401&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  293
+<error line="199" column="75" severity="warning" message="&apos;403&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  294
+<error line="199" column="80" severity="warning" message="&apos;404&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  295
+<error line="199" column="85" severity="warning" message="&apos;409&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  296
+<error line="199" column="90" severity="warning" message="&apos;500&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  297
+<error line="206" column="45" severity="warning" message="&apos;200&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  298
+<error line="206" column="68" severity="warning" message="&apos;201&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  299
+</file>
  300
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/UserResourceWSAPITests.java">
  301
+<error line="81" column="53" severity="warning" message="&apos;(&apos; is followed by whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck"/>
  302
+<error line="105" column="50" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  303
+</file>
  304
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java">
  305
+<error line="33" column="37" severity="warning" message="Name &apos;description&apos; must match pattern &apos;^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$&apos;." source="com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck"/>
  306
+<error line="35" column="17" severity="warning" message="Variable &apos;psession1MessageRecieved&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  307
+<error line="36" column="17" severity="warning" message="Variable &apos;psession2MessageRecieved&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  308
+<error line="37" column="17" severity="warning" message="Variable &apos;psession1PresenceMessageRecieved&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  309
+<error line="38" column="17" severity="warning" message="Variable &apos;psession2PresenceMessageRecieved&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  310
+<error line="39" column="17" severity="warning" message="Variable &apos;psession1ExceptionRecieved&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  311
+<error line="40" column="17" severity="warning" message="Variable &apos;psession2ExceptionRecieved&apos; must be private and have accessor methods." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/>
  312
+<error line="79" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  313
+<error line="82" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  314
+<error line="113" column="44" severity="warning" message="Expected @param tag for &apos;type&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  315
+<error line="113" column="57" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  316
+<error line="146" column="56" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  317
+<error line="155" column="124" severity="warning" message="&apos;4&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  318
+<error line="231" column="125" severity="warning" message="&apos;4&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  319
+<error line="271" column="30" severity="warning" message="&apos;5000&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  320
+<error line="284" column="30" severity="warning" message="&apos;2000&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  321
+<error line="293" column="48" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  322
+<error line="303" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  323
+<error line="306" column="54" severity="warning" message="Expression can be simplified." source="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheck"/>
  324
+<error line="323" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  325
+</file>
  326
+<file name="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/SessionManagementTests.java">
  327
+<error line="51" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  328
+<error line="54" severity="warning" message="Line is longer than 140 characters." source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/>
  329
+<error line="65" column="50" severity="warning" message="Expected @throws tag for &apos;UnknownHostException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  330
+<error line="65" column="50" severity="warning" message="Redundant throws: &apos;UnknownHostException&apos; is subclass of &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  331
+<error line="65" column="72" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  332
+<error line="65" column="85" severity="warning" message="Expected @throws tag for &apos;InterruptedException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  333
+<error line="84" column="30" severity="warning" message="&apos;30000&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  334
+<error line="102" column="49" severity="warning" message="Expected @throws tag for &apos;UnknownHostException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  335
+<error line="102" column="49" severity="warning" message="Redundant throws: &apos;UnknownHostException&apos; is subclass of &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck"/>
  336
+<error line="102" column="71" severity="warning" message="Expected @throws tag for &apos;IOException&apos;." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  337
+<error line="121" column="30" severity="warning" message="&apos;60000&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  338
+<error line="121" column="38" severity="warning" message="&apos;3&apos; is a magic number." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
  339
+<error line="142" column="17" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  340
+<error line="162" column="17" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  341
+<error line="165" column="17" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  342
+<error line="168" column="17" severity="warning" message="Missing a Javadoc comment." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
  343
+</file>
  344
+</checkstyle>
403  com.buglabs.bug.swarm.client/checkstyle/cpd-com.buglabs.bug.swarm.client.xml
... ...
@@ -0,0 +1,403 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<pmd-cpd>
  3
+<duplication lines="31" tokens="232">
  4
+<file line="205" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmInvitationWSAPITests.java"/>
  5
+<file line="247" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmInvitationWSAPITests.java"/>
  6
+<codefragment>
  7
+<![CDATA[
  8
+	public void testRejectInvitation() throws IOException {
  9
+		ISwarmClient client2 = SwarmClientFactory.getSwarmClient(
  10
+				AccountConfig.getConfiguration2().getHostname(Protocol.HTTP),
  11
+				AccountConfig.getConfiguration2().getConfingurationAPIKey());
  12
+		assertNotNull(client2);
  13
+		assertNotNull(client2.getSwarmInviteClient());
  14
+		assertNotNull(AccountConfig.testSwarmId);
  15
+		assertNotNull(AccountConfig.testInviteId);
  16
+		
  17
+		testSendInvite();
  18
+		List<Invitation> receivedInvites = client2.getSwarmInviteClient().getRecievedInvitations(AccountConfig.testUserResource2.getResourceId());
  19
+		
  20
+		assertNotNull(receivedInvites);
  21
+		assertTrue(receivedInvites.isEmpty() == false);
  22
+		Invitation invite = null;
  23
+		
  24
+		for (Invitation i : receivedInvites)
  25
+			if (i.getId().equals(AccountConfig.testInviteId))
  26
+				invite = i;
  27
+		
  28
+		assertNotNull(invite);
  29
+		assertNotNull(invite.getId());
  30
+		assertNotNull(invite.getFromUser());
  31
+		assertNotNull(invite.getToUser());
  32
+		assertNotNull(invite.getResourceId());
  33
+		assertNotNull(invite.getStatus());
  34
+		assertTrue(invite.getStatus().equals(InvitationState.NEW));
  35
+		assertNotNull(invite.getDescription());
  36
+		assertTrue(invite.getDescription().equals(description));
  37
+		
  38
+		Invitation acceptInvite = client2.getSwarmInviteClient().respond(invite.getResourceId(), invite.getId(), InvitationResponse.REJECT);
  39
+]]>
  40
+</codefragment>
  41
+</duplication>
  42
+<duplication lines="31" tokens="201">
  43
+<file line="57" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java"/>
  44
+<file line="26" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/SessionManagementTests.java"/>
  45
+<codefragment>
  46
+<![CDATA[
  47
+	@Override
  48
+	protected void setUp() throws Exception {
  49
+		/*
  50
+		 * Create a swarm, a resource, and associate them.
  51
+		 */
  52
+		assertNotNull(AccountConfig.getConfiguration());
  53
+		assertNotNull(AccountConfig.getConfiguration2());
  54
+		
  55
+		
  56
+		ISwarmClient client = SwarmClientFactory.getSwarmClient(
  57
+				AccountConfig.getConfiguration().getHostname(Configuration.Protocol.HTTP),
  58
+				AccountConfig.getConfiguration().getConfingurationAPIKey());
  59
+		
  60
+		//Delete all pre-existing swarms owned by test user.
  61
+		List<SwarmModel> swarms = client.list();
  62
+		
  63
+		for (SwarmModel sm : swarms) {
  64
+			if (sm.getUserId().equals(AccountConfig.getConfiguration().getUsername())) {
  65
+				client.destroy(sm.getId());
  66
+			}
  67
+		}		
  68
+		
  69
+		String id = client.create(AccountConfig.generateRandomSwarmName(), true, AccountConfig.getTestSwarmDescription());
  70
+		AccountConfig.testSwarmId = id;
  71
+		
  72
+		UserResourceModel urc = client.getUserResourceClient().add(AccountConfig.generateRandomResourceName(), "user resource desc", "pc", 0, 0);
  73
+		AccountConfig.testUserResource = urc;
  74
+		
  75
+		SwarmWSResponse response = client.getSwarmResourceClient().add(AccountConfig.testSwarmId, MemberType.PRODUCER, urc.getResourceId());
  76
+		
  77
+		assertTrue(!response.isError());
  78
+]]>
  79
+</codefragment>
  80
+</duplication>
  81
+<duplication lines="27" tokens="201">
  82
+<file line="214" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmInvitationWSAPITests.java"/>
  83
+<file line="302" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java"/>
  84
+<codefragment>
  85
+<![CDATA[
  86
+		sendInvite(MemberType.PRODUCER);
  87
+		List<Invitation> receivedInvites = client2.getSwarmInviteClient().getRecievedInvitations(AccountConfig.testUserResource2.getResourceId());
  88
+		
  89
+		assertNotNull(receivedInvites);
  90
+		assertTrue(receivedInvites.isEmpty() == false);
  91
+		Invitation invite = null;
  92
+		
  93
+		for (Invitation i : receivedInvites)
  94
+			if (i.getId().equals(AccountConfig.testInviteId))
  95
+				invite = i;
  96
+		
  97
+		assertNotNull(invite);
  98
+		assertNotNull(invite.getId());
  99
+		assertNotNull(invite.getFromUser());
  100
+		assertNotNull(invite.getToUser());
  101
+		assertNotNull(invite.getResourceId());
  102
+		assertNotNull(invite.getStatus());
  103
+		assertTrue(invite.getStatus().equals(InvitationState.NEW));
  104
+		assertNotNull(invite.getDescription());
  105
+		assertTrue(invite.getDescription().equals(description));
  106
+		
  107
+		Invitation acceptInvite = client2.getSwarmInviteClient().respond(invite.getResourceId(), invite.getId(), InvitationResponse.ACCEPT);
  108
+		
  109
+		assertNotNull(acceptInvite);
  110
+		assertTrue(acceptInvite.getStatus().equals(InvitationState.ACCEPTED));
  111
+		assertNotNull(acceptInvite.getAcceptedAt());
  112
+	}
  113
+]]>
  114
+</codefragment>
  115
+</duplication>
  116
+<duplication lines="22" tokens="171">
  117
+<file line="256" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmInvitationWSAPITests.java"/>
  118
+<file line="302" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java"/>
  119
+<codefragment>
  120
+<![CDATA[
  121
+		sendInvite(MemberType.PRODUCER);
  122
+		List<Invitation> receivedInvites = client2.getSwarmInviteClient().getRecievedInvitations(AccountConfig.testUserResource2.getResourceId());
  123
+		
  124
+		assertNotNull(receivedInvites);
  125
+		assertTrue(receivedInvites.isEmpty() == false);
  126
+		Invitation invite = null;
  127
+		
  128
+		for (Invitation i : receivedInvites)
  129
+			if (i.getId().equals(AccountConfig.testInviteId))
  130
+				invite = i;
  131
+		
  132
+		assertNotNull(invite);
  133
+		assertNotNull(invite.getId());
  134
+		assertNotNull(invite.getFromUser());
  135
+		assertNotNull(invite.getToUser());
  136
+		assertNotNull(invite.getResourceId());
  137
+		assertNotNull(invite.getStatus());
  138
+		assertTrue(invite.getStatus().equals(InvitationState.NEW));
  139
+		assertNotNull(invite.getDescription());
  140
+		assertTrue(invite.getDescription().equals(description));
  141
+		
  142
+		Invitation acceptInvite = client2.getSwarmInviteClient().respond(invite.getResourceId(), invite.getId(), InvitationResponse.ACCEPT);
  143
+]]>
  144
+</codefragment>
  145
+</duplication>
  146
+<duplication lines="27" tokens="149">
  147
+<file line="172" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java"/>
  148
+<file line="201" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java"/>
  149
+<codefragment>
  150
+<![CDATA[
  151
+			public void messageRecieved(String payload, String fromSwarm, String fromResource, boolean isPublic) {
  152
+				System.out.print(fromSwarm);
  153
+				System.out.print(" ");
  154
+				System.out.print(fromResource);
  155
+				System.out.print(" ");
  156
+				System.out.println(payload);
  157
+				psession1MessageRecieved = true;
  158
+			}
  159
+
  160
+			@Override
  161
+			public void exceptionOccurred(ExceptionType type, String message) {
  162
+				System.err.print(type.toString());
  163
+				System.err.print(" ");
  164
+				System.err.print(message);
  165
+				psession1ExceptionRecieved = true;
  166
+			}
  167
+
  168
+			@Override
  169
+			public void presenceEvent(String fromSwarm, String fromResource, boolean isAvailable) {
  170
+				System.out.print(fromSwarm);
  171
+				System.out.print(" ");
  172
+				System.out.println(fromResource);
  173
+				psession1PresenceMessageRecieved = true;
  174
+			}
  175
+		});
  176
+		
  177
+		psession1.join(AccountConfig.testSwarmId, urc.getResourceId());
  178
+]]>
  179
+</codefragment>
  180
+</duplication>
  181
+<duplication lines="20" tokens="143">
  182
+<file line="65" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/SessionManagementTests.java"/>
  183
+<file line="102" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/SessionManagementTests.java"/>
  184
+<codefragment>
  185
+<![CDATA[
  186
+	public void test3MinuteSession() throws UnknownHostException, IOException, InterruptedException {
  187
+		assertNotNull(AccountConfig.getConfiguration().getHostname(Configuration.Protocol.HTTP));
  188
+		assertNotNull(AccountConfig.getConfiguration().getParticipationAPIKey());
  189
+		assertNotNull(AccountConfig.testUserResource.getResourceId());
  190
+		assertNotNull(AccountConfig.testSwarmId);
  191
+		
  192
+		ISwarmSession session = SwarmClientFactory.createSwarmSession(
  193
+				AccountConfig.getConfiguration().getHostname(Configuration.Protocol.HTTP),
  194
+				AccountConfig.getConfiguration().getParticipationAPIKey(),
  195
+				AccountConfig.testUserResource.getResourceId(), 
  196
+				AccountConfig.testSwarmId);
  197
+		
  198
+		assertNotNull(session);
  199
+		
  200
+		assertTrue(session.isConnected());
  201
+		SessionTestListener tl = new SessionTestListener();
  202
+		session.addListener(tl);
  203
+		session.join(AccountConfig.testSwarmId, AccountConfig.testUserResource.getResourceId());
  204
+		
  205
+		Thread.sleep(60000 * 3);
  206
+]]>
  207
+</codefragment>
  208
+</duplication>
  209
+<duplication lines="19" tokens="134">
  210
+<file line="71" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/configuration/SwarmInvitationWSAPITests.java"/>
  211
+<file line="88" path="/home/jconnolly/buglabs/dev/misc/bugswarm-connector/com.buglabs.bug.swarm.client/test/com/buglabs/bug/swarm/client/test/participation/ParticipationAPITests.java"/>
  212
+<codefragment>
  213
+<![CDATA[
  214
+				AccountConfig.getConfiguration2().getHostname(Configuration.Protocol.HTTP),
  215
+				AccountConfig.getConfiguration2().getConfingurationAPIKey());
  216
+		
  217
+		//Delete all pre-existing swarms owned by test user.	
  218
+		for (SwarmModel sm : client2.list()) {
  219
+			if (sm.getUserId().equals(AccountConfig.getConfiguration2().getUsername())) {
  220
+				client2.destroy(sm.getId());
  221
+			}
  222
+		}
  223
+		
  224
+		for (UserResourceModel ur : client2.getUserResourceClient().list())
  225
+			client2.getUserResourceClient().destroy(ur.getResourceId());
  226
+		
  227
+		urc = client2.getUserResourceClient().add(AccountConfig.generateRandomResourceName(), "user resource desc", "pc", 0, 0);
  228
+		AccountConfig.testUserResource2 = urc;
  229
+		
  230
+		//Confirm that original user still has swarm.
  231
+		assertTrue(client.list().size() == 1);
  232
+	}