{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/javarosa/pulls/comments/28272520","id":28272520,"diff_hunk":"@@ -337,18 +442,19 @@ else if (!this.getInstanceName().equals(contextRef.getInstanceName())) {\n         TreeReference newRef = anchor(contextRef);\n         newRef.setContext(contextRef.getContext());\n \n-        //apply multiplicites and fill in wildcards as necessary based on the context ref\n+        // apply multiplicites and fill in wildcards as necessary, based on the\n+        // context ref\n         for (int i = 0; i < contextRef.size() && i < newRef.size(); i++) {\n-\n-            //If the the contextRef can provide a definition for a wildcard, do so\n-            if (TreeReference.NAME_WILDCARD.equals(newRef.getName(i)) && !TreeReference.NAME_WILDCARD.equals(contextRef.getName(i))) {\n+            // If the the contextRef can provide a definition for a wildcard, do so\n+            if (TreeReference.NAME_WILDCARD.equals(newRef.getName(i)) &&\n+                    !TreeReference.NAME_WILDCARD.equals(contextRef.getName(i))) {\n                 newRef.data.setElementAt(newRef.data.elementAt(i).setName(contextRef.getName(i)), i);\n             }\n \n             if (contextRef.getName(i).equals(newRef.getName(i))) {\n-                //We can't actually merge nodes if the newRef has predicates or filters\n-                //on this expression, since those reset any existing resolutions which\n-                //may have been done.\n+                // We can't actually merge nodes if the newRef has predicates\n+                // or filters on this expression, since those reset any\n+                // existing resolutions which may have been done.\n                 if (newRef.getPredicate(i) == null) {","path":"core/src/org/javarosa/core/model/instance/TreeReference.java","position":357,"original_position":357,"commit_id":"9de5433ccf81abe72eca9f055c5368874263bc24","original_commit_id":"9de5433ccf81abe72eca9f055c5368874263bc24","user":{"login":"ctsims","id":155066,"avatar_url":"https://avatars.githubusercontent.com/u/155066?v=3","gravatar_id":"","url":"https://api.github.com/users/ctsims","html_url":"https://github.com/ctsims","followers_url":"https://api.github.com/users/ctsims/followers","following_url":"https://api.github.com/users/ctsims/following{/other_user}","gists_url":"https://api.github.com/users/ctsims/gists{/gist_id}","starred_url":"https://api.github.com/users/ctsims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctsims/subscriptions","organizations_url":"https://api.github.com/users/ctsims/orgs","repos_url":"https://api.github.com/users/ctsims/repos","events_url":"https://api.github.com/users/ctsims/events{/privacy}","received_events_url":"https://api.github.com/users/ctsims/received_events","type":"User","site_admin":false},"body":"The fix is also testing whether newRef has an existing multiplicity for this level, right?","created_at":"2015-04-13T19:53:06Z","updated_at":"2015-04-13T19:53:06Z","html_url":"https://github.com/dimagi/javarosa/pull/71#discussion_r28272520","pull_request_url":"https://api.github.com/repos/dimagi/javarosa/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/dimagi/javarosa/pulls/comments/28272520"},"html":{"href":"https://github.com/dimagi/javarosa/pull/71#discussion_r28272520"},"pull_request":{"href":"https://api.github.com/repos/dimagi/javarosa/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/javarosa/pulls/71","id":33076992,"html_url":"https://github.com/dimagi/javarosa/pull/71","diff_url":"https://github.com/dimagi/javarosa/pull/71.diff","patch_url":"https://github.com/dimagi/javarosa/pull/71.patch","issue_url":"https://api.github.com/repos/dimagi/javarosa/issues/71","number":71,"state":"open","locked":false,"title":"Cursory clean-up of TreeReference code","user":{"login":"phillipm","id":94817,"avatar_url":"https://avatars.githubusercontent.com/u/94817?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipm","html_url":"https://github.com/phillipm","followers_url":"https://api.github.com/users/phillipm/followers","following_url":"https://api.github.com/users/phillipm/following{/other_user}","gists_url":"https://api.github.com/users/phillipm/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipm/subscriptions","organizations_url":"https://api.github.com/users/phillipm/orgs","repos_url":"https://api.github.com/users/phillipm/repos","events_url":"https://api.github.com/users/phillipm/events{/privacy}","received_events_url":"https://api.github.com/users/phillipm/received_events","type":"User","site_admin":false},"body":"In prep for working on some reference related bugs I'm reading through code, cleaning up comments and adding tests\r\n\r\nI've noted changes that are worthy of a 2nd look","created_at":"2015-04-10T19:40:28Z","updated_at":"2015-04-13T19:53:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"626bb82db52beed719a3d1ad53371233b7daeb31","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/javarosa/pulls/71/commits","review_comments_url":"https://api.github.com/repos/dimagi/javarosa/pulls/71/comments","review_comment_url":"https://api.github.com/repos/dimagi/javarosa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/javarosa/issues/71/comments","statuses_url":"https://api.github.com/repos/dimagi/javarosa/statuses/9de5433ccf81abe72eca9f055c5368874263bc24","head":{"label":"dimagi:trigger_propagation_fix","ref":"trigger_propagation_fix","sha":"9de5433ccf81abe72eca9f055c5368874263bc24","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":20938963,"name":"javarosa","full_name":"dimagi/javarosa","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/javarosa","description":"","fork":false,"url":"https://api.github.com/repos/dimagi/javarosa","forks_url":"https://api.github.com/repos/dimagi/javarosa/forks","keys_url":"https://api.github.com/repos/dimagi/javarosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/javarosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/javarosa/teams","hooks_url":"https://api.github.com/repos/dimagi/javarosa/hooks","issue_events_url":"https://api.github.com/repos/dimagi/javarosa/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/javarosa/events","assignees_url":"https://api.github.com/repos/dimagi/javarosa/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/javarosa/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/javarosa/tags","blobs_url":"https://api.github.com/repos/dimagi/javarosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/javarosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/javarosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/javarosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/javarosa/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/javarosa/languages","stargazers_url":"https://api.github.com/repos/dimagi/javarosa/stargazers","contributors_url":"https://api.github.com/repos/dimagi/javarosa/contributors","subscribers_url":"https://api.github.com/repos/dimagi/javarosa/subscribers","subscription_url":"https://api.github.com/repos/dimagi/javarosa/subscription","commits_url":"https://api.github.com/repos/dimagi/javarosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/javarosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/javarosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/javarosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/javarosa/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/javarosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/javarosa/merges","archive_url":"https://api.github.com/repos/dimagi/javarosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/javarosa/downloads","issues_url":"https://api.github.com/repos/dimagi/javarosa/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/javarosa/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/javarosa/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/javarosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/javarosa/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/javarosa/releases{/id}","created_at":"2014-06-17T20:46:39Z","updated_at":"2015-04-08T19:39:42Z","pushed_at":"2015-04-13T18:48:09Z","git_url":"git://github.com/dimagi/javarosa.git","ssh_url":"git@github.com:dimagi/javarosa.git","clone_url":"https://github.com/dimagi/javarosa.git","svn_url":"https://github.com/dimagi/javarosa","homepage":null,"size":30903,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"f4071ca247a277654ef7c3d2630c12f0bb6d6c2c","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":20938963,"name":"javarosa","full_name":"dimagi/javarosa","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/javarosa","description":"","fork":false,"url":"https://api.github.com/repos/dimagi/javarosa","forks_url":"https://api.github.com/repos/dimagi/javarosa/forks","keys_url":"https://api.github.com/repos/dimagi/javarosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/javarosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/javarosa/teams","hooks_url":"https://api.github.com/repos/dimagi/javarosa/hooks","issue_events_url":"https://api.github.com/repos/dimagi/javarosa/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/javarosa/events","assignees_url":"https://api.github.com/repos/dimagi/javarosa/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/javarosa/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/javarosa/tags","blobs_url":"https://api.github.com/repos/dimagi/javarosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/javarosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/javarosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/javarosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/javarosa/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/javarosa/languages","stargazers_url":"https://api.github.com/repos/dimagi/javarosa/stargazers","contributors_url":"https://api.github.com/repos/dimagi/javarosa/contributors","subscribers_url":"https://api.github.com/repos/dimagi/javarosa/subscribers","subscription_url":"https://api.github.com/repos/dimagi/javarosa/subscription","commits_url":"https://api.github.com/repos/dimagi/javarosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/javarosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/javarosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/javarosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/javarosa/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/javarosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/javarosa/merges","archive_url":"https://api.github.com/repos/dimagi/javarosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/javarosa/downloads","issues_url":"https://api.github.com/repos/dimagi/javarosa/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/javarosa/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/javarosa/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/javarosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/javarosa/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/javarosa/releases{/id}","created_at":"2014-06-17T20:46:39Z","updated_at":"2015-04-08T19:39:42Z","pushed_at":"2015-04-13T18:48:09Z","git_url":"git://github.com/dimagi/javarosa.git","ssh_url":"git@github.com:dimagi/javarosa.git","clone_url":"https://github.com/dimagi/javarosa.git","svn_url":"https://github.com/dimagi/javarosa","homepage":null,"size":30903,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/javarosa/pulls/71"},"html":{"href":"https://github.com/dimagi/javarosa/pull/71"},"issue":{"href":"https://api.github.com/repos/dimagi/javarosa/issues/71"},"comments":{"href":"https://api.github.com/repos/dimagi/javarosa/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/javarosa/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/javarosa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/javarosa/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/javarosa/statuses/9de5433ccf81abe72eca9f055c5368874263bc24"}}}}