{"action":"created","comment":{"url":"https://api.github.com/repos/s-match/s-match-spsm/pulls/comments/90519370","pull_request_review_id":11038745,"id":90519370,"diff_hunk":"@@ -236,39 +351,88 @@ protected void swapINodes(List<INode> listOfNodes, int source, int target) {\n \n \n     /**\n+     * Swaps the INodes in listOfNodes in the positions source and target,\n+     * where listOfNodes is an unmodifiableList.\n+     *\n+     * @param listOfNodes List of INodes of which the elements should be swapped.\n+     * @param source      index of the source child to be swapped.\n+     * @param target      index of the target child to be swapped.\n+     *\n+     * @since 2.0.0\n+     */\n+    protected void swapUnmodifiableINodes(List<INode> listOfNodes, int source, int target) {\n+\n+        int lowerIndex;\n+        int higherIndex;\n+        \n+        INode parentNode = listOfNodes.get(0).getParent();\n+        if (source < target) {\n+            lowerIndex = source;\n+            higherIndex = target;\n+        } else {\n+            lowerIndex = target;\n+            higherIndex = source;\n+        }\n+        INode lowerNode = parentNode.getChildAt(lowerIndex);\n+        INode higherNode = parentNode.getChildAt(higherIndex);\n+        parentNode.removeChild(higherNode);\n+        parentNode.removeChild(lowerNode);\n+        parentNode.addChild(lowerIndex, higherNode);\n+        parentNode.addChild(higherIndex, lowerNode);\n+    }\n+    \n+    \n+    /**\n      * Looks for the related index for the source list at the position sourceIndex\n      * in the target list beginning at the targetIndex position for the defined relation.\n      *\n-     * @param source      source list of siblings.\n-     * @param target      target list of siblings.\n+     * @param source      source list of siblings\n+     * @param target      target list of siblings\n+     * @param rscList     source list of reordered siblings","path":"src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java","position":362,"original_position":362,"commit_id":"0677a1c0b3e83f4c20ae9f2d7266b0b3b1a649d0","original_commit_id":"0677a1c0b3e83f4c20ae9f2d7266b0b3b1a649d0","user":{"login":"autayeu","id":495207,"avatar_url":"https://avatars.githubusercontent.com/u/495207?v=3","gravatar_id":"","url":"https://api.github.com/users/autayeu","html_url":"https://github.com/autayeu","followers_url":"https://api.github.com/users/autayeu/followers","following_url":"https://api.github.com/users/autayeu/following{/other_user}","gists_url":"https://api.github.com/users/autayeu/gists{/gist_id}","starred_url":"https://api.github.com/users/autayeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autayeu/subscriptions","organizations_url":"https://api.github.com/users/autayeu/orgs","repos_url":"https://api.github.com/users/autayeu/repos","events_url":"https://api.github.com/users/autayeu/events{/privacy}","received_events_url":"https://api.github.com/users/autayeu/received_events","type":"User","site_admin":false},"body":"same problem with names as above","created_at":"2016-12-01T19:31:16Z","updated_at":"2016-12-01T19:31:16Z","html_url":"https://github.com/s-match/s-match-spsm/pull/3#discussion_r90519370","pull_request_url":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/s-match/s-match-spsm/pulls/comments/90519370"},"html":{"href":"https://github.com/s-match/s-match-spsm/pull/3#discussion_r90519370"},"pull_request":{"href":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3","id":96067232,"html_url":"https://github.com/s-match/s-match-spsm/pull/3","diff_url":"https://github.com/s-match/s-match-spsm/pull/3.diff","patch_url":"https://github.com/s-match/s-match-spsm/pull/3.patch","issue_url":"https://api.github.com/repos/s-match/s-match-spsm/issues/3","number":3,"state":"open","locked":false,"title":"Compute unordered TED","user":{"login":"DavidLeoni","id":628313,"avatar_url":"https://avatars.githubusercontent.com/u/628313?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidLeoni","html_url":"https://github.com/DavidLeoni","followers_url":"https://api.github.com/users/DavidLeoni/followers","following_url":"https://api.github.com/users/DavidLeoni/following{/other_user}","gists_url":"https://api.github.com/users/DavidLeoni/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidLeoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidLeoni/subscriptions","organizations_url":"https://api.github.com/users/DavidLeoni/orgs","repos_url":"https://api.github.com/users/DavidLeoni/repos","events_url":"https://api.github.com/users/DavidLeoni/events{/privacy}","received_events_url":"https://api.github.com/users/DavidLeoni/received_events","type":"User","site_admin":false},"body":"Fix by @gbella: Modified the tree edit distance algorithm to compute *unordered* TED\r\n\r\nThe previous SPSM version implemented an ordered tree edit distance algorithm which did not consider the two trees A(B,C) and A(C,B) as identical (where B and C are siblings and children of A). As the most typical use case of SPSM is matching of function signatures, unordered TED (where the order of the arguments does not make a difference) is a more suitable solution. The new SPSM version thus implements unordered TED. Note that, while unordered TED in its generality is NP-complete, the implementation within SPSM is still polynomial because of preexisting simplifications in the underlying TED algorithm (substitution operations can only be done on the same level, deletion and insertion are only possible on leaves).","created_at":"2016-12-01T11:01:55Z","updated_at":"2016-12-01T19:31:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46003b6867ba69d72d618357971aee6b9b6f8c41","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3/commits","review_comments_url":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3/comments","review_comment_url":"https://api.github.com/repos/s-match/s-match-spsm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/s-match/s-match-spsm/issues/3/comments","statuses_url":"https://api.github.com/repos/s-match/s-match-spsm/statuses/0677a1c0b3e83f4c20ae9f2d7266b0b3b1a649d0","head":{"label":"DavidLeoni:implement-unordered-ted","ref":"implement-unordered-ted","sha":"0677a1c0b3e83f4c20ae9f2d7266b0b3b1a649d0","user":{"login":"DavidLeoni","id":628313,"avatar_url":"https://avatars.githubusercontent.com/u/628313?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidLeoni","html_url":"https://github.com/DavidLeoni","followers_url":"https://api.github.com/users/DavidLeoni/followers","following_url":"https://api.github.com/users/DavidLeoni/following{/other_user}","gists_url":"https://api.github.com/users/DavidLeoni/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidLeoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidLeoni/subscriptions","organizations_url":"https://api.github.com/users/DavidLeoni/orgs","repos_url":"https://api.github.com/users/DavidLeoni/repos","events_url":"https://api.github.com/users/DavidLeoni/events{/privacy}","received_events_url":"https://api.github.com/users/DavidLeoni/received_events","type":"User","site_admin":false},"repo":{"id":63074027,"name":"s-match-spsm","full_name":"DavidLeoni/s-match-spsm","owner":{"login":"DavidLeoni","id":628313,"avatar_url":"https://avatars.githubusercontent.com/u/628313?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidLeoni","html_url":"https://github.com/DavidLeoni","followers_url":"https://api.github.com/users/DavidLeoni/followers","following_url":"https://api.github.com/users/DavidLeoni/following{/other_user}","gists_url":"https://api.github.com/users/DavidLeoni/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidLeoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidLeoni/subscriptions","organizations_url":"https://api.github.com/users/DavidLeoni/orgs","repos_url":"https://api.github.com/users/DavidLeoni/repos","events_url":"https://api.github.com/users/DavidLeoni/events{/privacy}","received_events_url":"https://api.github.com/users/DavidLeoni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavidLeoni/s-match-spsm","description":"S-Match SPSM contains classes for structure-preserving semantic matching.","fork":true,"url":"https://api.github.com/repos/DavidLeoni/s-match-spsm","forks_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/forks","keys_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/teams","hooks_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/hooks","issue_events_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/issues/events{/number}","events_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/events","assignees_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/assignees{/user}","branches_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/branches{/branch}","tags_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/tags","blobs_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/statuses/{sha}","languages_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/languages","stargazers_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/stargazers","contributors_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/contributors","subscribers_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/subscribers","subscription_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/subscription","commits_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/contents/{+path}","compare_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/merges","archive_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/downloads","issues_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/issues{/number}","pulls_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/pulls{/number}","milestones_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/milestones{/number}","notifications_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/labels{/name}","releases_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/releases{/id}","deployments_url":"https://api.github.com/repos/DavidLeoni/s-match-spsm/deployments","created_at":"2016-07-11T14:17:16Z","updated_at":"2016-07-11T14:17:17Z","pushed_at":"2016-12-01T10:54:23Z","git_url":"git://github.com/DavidLeoni/s-match-spsm.git","ssh_url":"git@github.com:DavidLeoni/s-match-spsm.git","clone_url":"https://github.com/DavidLeoni/s-match-spsm.git","svn_url":"https://github.com/DavidLeoni/s-match-spsm","homepage":null,"size":53,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"s-match:master","ref":"master","sha":"ca7d9e71bd8c2443c1503ff676201b7533956f7b","user":{"login":"s-match","id":2253777,"avatar_url":"https://avatars.githubusercontent.com/u/2253777?v=3","gravatar_id":"","url":"https://api.github.com/users/s-match","html_url":"https://github.com/s-match","followers_url":"https://api.github.com/users/s-match/followers","following_url":"https://api.github.com/users/s-match/following{/other_user}","gists_url":"https://api.github.com/users/s-match/gists{/gist_id}","starred_url":"https://api.github.com/users/s-match/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-match/subscriptions","organizations_url":"https://api.github.com/users/s-match/orgs","repos_url":"https://api.github.com/users/s-match/repos","events_url":"https://api.github.com/users/s-match/events{/privacy}","received_events_url":"https://api.github.com/users/s-match/received_events","type":"Organization","site_admin":false},"repo":{"id":16235860,"name":"s-match-spsm","full_name":"s-match/s-match-spsm","owner":{"login":"s-match","id":2253777,"avatar_url":"https://avatars.githubusercontent.com/u/2253777?v=3","gravatar_id":"","url":"https://api.github.com/users/s-match","html_url":"https://github.com/s-match","followers_url":"https://api.github.com/users/s-match/followers","following_url":"https://api.github.com/users/s-match/following{/other_user}","gists_url":"https://api.github.com/users/s-match/gists{/gist_id}","starred_url":"https://api.github.com/users/s-match/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-match/subscriptions","organizations_url":"https://api.github.com/users/s-match/orgs","repos_url":"https://api.github.com/users/s-match/repos","events_url":"https://api.github.com/users/s-match/events{/privacy}","received_events_url":"https://api.github.com/users/s-match/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/s-match/s-match-spsm","description":"S-Match SPSM contains classes for structure-preserving semantic matching.","fork":false,"url":"https://api.github.com/repos/s-match/s-match-spsm","forks_url":"https://api.github.com/repos/s-match/s-match-spsm/forks","keys_url":"https://api.github.com/repos/s-match/s-match-spsm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s-match/s-match-spsm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s-match/s-match-spsm/teams","hooks_url":"https://api.github.com/repos/s-match/s-match-spsm/hooks","issue_events_url":"https://api.github.com/repos/s-match/s-match-spsm/issues/events{/number}","events_url":"https://api.github.com/repos/s-match/s-match-spsm/events","assignees_url":"https://api.github.com/repos/s-match/s-match-spsm/assignees{/user}","branches_url":"https://api.github.com/repos/s-match/s-match-spsm/branches{/branch}","tags_url":"https://api.github.com/repos/s-match/s-match-spsm/tags","blobs_url":"https://api.github.com/repos/s-match/s-match-spsm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s-match/s-match-spsm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s-match/s-match-spsm/git/refs{/sha}","trees_url":"https://api.github.com/repos/s-match/s-match-spsm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s-match/s-match-spsm/statuses/{sha}","languages_url":"https://api.github.com/repos/s-match/s-match-spsm/languages","stargazers_url":"https://api.github.com/repos/s-match/s-match-spsm/stargazers","contributors_url":"https://api.github.com/repos/s-match/s-match-spsm/contributors","subscribers_url":"https://api.github.com/repos/s-match/s-match-spsm/subscribers","subscription_url":"https://api.github.com/repos/s-match/s-match-spsm/subscription","commits_url":"https://api.github.com/repos/s-match/s-match-spsm/commits{/sha}","git_commits_url":"https://api.github.com/repos/s-match/s-match-spsm/git/commits{/sha}","comments_url":"https://api.github.com/repos/s-match/s-match-spsm/comments{/number}","issue_comment_url":"https://api.github.com/repos/s-match/s-match-spsm/issues/comments{/number}","contents_url":"https://api.github.com/repos/s-match/s-match-spsm/contents/{+path}","compare_url":"https://api.github.com/repos/s-match/s-match-spsm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s-match/s-match-spsm/merges","archive_url":"https://api.github.com/repos/s-match/s-match-spsm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s-match/s-match-spsm/downloads","issues_url":"https://api.github.com/repos/s-match/s-match-spsm/issues{/number}","pulls_url":"https://api.github.com/repos/s-match/s-match-spsm/pulls{/number}","milestones_url":"https://api.github.com/repos/s-match/s-match-spsm/milestones{/number}","notifications_url":"https://api.github.com/repos/s-match/s-match-spsm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s-match/s-match-spsm/labels{/name}","releases_url":"https://api.github.com/repos/s-match/s-match-spsm/releases{/id}","deployments_url":"https://api.github.com/repos/s-match/s-match-spsm/deployments","created_at":"2014-01-25T17:31:55Z","updated_at":"2016-11-14T17:14:09Z","pushed_at":"2016-12-01T11:01:56Z","git_url":"git://github.com/s-match/s-match-spsm.git","ssh_url":"git@github.com:s-match/s-match-spsm.git","clone_url":"https://github.com/s-match/s-match-spsm.git","svn_url":"https://github.com/s-match/s-match-spsm","homepage":null,"size":52,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3"},"html":{"href":"https://github.com/s-match/s-match-spsm/pull/3"},"issue":{"href":"https://api.github.com/repos/s-match/s-match-spsm/issues/3"},"comments":{"href":"https://api.github.com/repos/s-match/s-match-spsm/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/s-match/s-match-spsm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/s-match/s-match-spsm/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/s-match/s-match-spsm/statuses/0677a1c0b3e83f4c20ae9f2d7266b0b3b1a649d0"}}}}
{"actor":{"display_login":"autayeu"}}