{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments/43995228","id":43995228,"diff_hunk":"@@ -287,6 +289,15 @@ private void visit(Tree tree, Tree terminator) {\n           programState = ProgramState.put(programState, variableTree.symbol(), unstack.b.get(0));\n         }\n         break;\n+      case TYPE_CAST:\n+        TypeCastTree typeCast = (TypeCastTree) tree;\n+        Type type = typeCast.type().symbolType();\n+        if (type.isPrimitive()) {\n+          Pair<ProgramState, List<SymbolicValue>> unstack = ProgramState.unstack(programState, 1);\n+          programState = unstack.a;\n+          programState = ProgramState.stackValue(programState, constraintManager.createSymbolicValue(typeCast.expression()));","path":"java-squid/src/main/java/org/sonar/java/se/ExplodedGraphWalker.java","position":26,"original_position":26,"commit_id":"09b0c726da9076a154c7728975a28757558876d0","original_commit_id":"09b0c726da9076a154c7728975a28757558876d0","user":{"login":"benzonico","id":1199708,"avatar_url":"https://avatars.githubusercontent.com/u/1199708?v=3","gravatar_id":"","url":"https://api.github.com/users/benzonico","html_url":"https://github.com/benzonico","followers_url":"https://api.github.com/users/benzonico/followers","following_url":"https://api.github.com/users/benzonico/following{/other_user}","gists_url":"https://api.github.com/users/benzonico/gists{/gist_id}","starred_url":"https://api.github.com/users/benzonico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benzonico/subscriptions","organizations_url":"https://api.github.com/users/benzonico/orgs","repos_url":"https://api.github.com/users/benzonico/repos","events_url":"https://api.github.com/users/benzonico/events{/privacy}","received_events_url":"https://api.github.com/users/benzonico/received_events","type":"User","site_admin":false},"body":"I tend to think that we shoud create the new symbolic value based on the type cast tree and not the expression.","created_at":"2015-11-05T10:13:02Z","updated_at":"2015-11-05T10:13:02Z","html_url":"https://github.com/SonarSource/sonar-java/pull/473#discussion_r43995228","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments/43995228"},"html":{"href":"https://github.com/SonarSource/sonar-java/pull/473#discussion_r43995228"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473","id":49797633,"html_url":"https://github.com/SonarSource/sonar-java/pull/473","diff_url":"https://github.com/SonarSource/sonar-java/pull/473.diff","patch_url":"https://github.com/SonarSource/sonar-java/pull/473.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/473","number":473,"state":"open","locked":false,"title":"SONARJAVA-1366 - handling of primitive type cast","user":{"login":"DidierBesset","id":14869932,"avatar_url":"https://avatars.githubusercontent.com/u/14869932?v=3","gravatar_id":"","url":"https://api.github.com/users/DidierBesset","html_url":"https://github.com/DidierBesset","followers_url":"https://api.github.com/users/DidierBesset/followers","following_url":"https://api.github.com/users/DidierBesset/following{/other_user}","gists_url":"https://api.github.com/users/DidierBesset/gists{/gist_id}","starred_url":"https://api.github.com/users/DidierBesset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DidierBesset/subscriptions","organizations_url":"https://api.github.com/users/DidierBesset/orgs","repos_url":"https://api.github.com/users/DidierBesset/repos","events_url":"https://api.github.com/users/DidierBesset/events{/privacy}","received_events_url":"https://api.github.com/users/DidierBesset/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-05T09:05:30Z","updated_at":"2015-11-05T10:13:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05dc63e4a7e5a79c83b0756a3b2826b93d140eea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/473/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-java/statuses/09b0c726da9076a154c7728975a28757558876d0","head":{"label":"SonarSource:SONARJAVA-1366","ref":"SONARJAVA-1366","sha":"09b0c726da9076a154c7728975a28757558876d0","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":5674787,"name":"sonar-java","full_name":"SonarSource/sonar-java","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-java","description":"","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-java","forks_url":"https://api.github.com/repos/SonarSource/sonar-java/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-java/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-java/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-java/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-java/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-java/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-java/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-java/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-java/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-java/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-java/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-java/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-java/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-java/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-java/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-java/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-java/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-java/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-java/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-java/releases{/id}","created_at":"2012-09-04T15:53:13Z","updated_at":"2015-10-07T15:01:34Z","pushed_at":"2015-11-05T09:05:30Z","git_url":"git://github.com/SonarSource/sonar-java.git","ssh_url":"git@github.com:SonarSource/sonar-java.git","clone_url":"https://github.com/SonarSource/sonar-java.git","svn_url":"https://github.com/SonarSource/sonar-java","homepage":"","size":46481,"stargazers_count":68,"watchers_count":68,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":10,"forks":101,"open_issues":10,"watchers":68,"default_branch":"master"}},"base":{"label":"SonarSource:SONARJAVA-1311","ref":"SONARJAVA-1311","sha":"320f5678919064f0b8a608aa8cdb9222fb435212","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":5674787,"name":"sonar-java","full_name":"SonarSource/sonar-java","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-java","description":"","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-java","forks_url":"https://api.github.com/repos/SonarSource/sonar-java/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-java/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-java/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-java/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-java/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-java/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-java/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-java/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-java/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-java/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-java/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-java/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-java/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-java/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-java/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-java/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-java/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-java/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-java/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-java/releases{/id}","created_at":"2012-09-04T15:53:13Z","updated_at":"2015-10-07T15:01:34Z","pushed_at":"2015-11-05T09:05:30Z","git_url":"git://github.com/SonarSource/sonar-java.git","ssh_url":"git@github.com:SonarSource/sonar-java.git","clone_url":"https://github.com/SonarSource/sonar-java.git","svn_url":"https://github.com/SonarSource/sonar-java","homepage":"","size":46481,"stargazers_count":68,"watchers_count":68,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":10,"forks":101,"open_issues":10,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473"},"html":{"href":"https://github.com/SonarSource/sonar-java/pull/473"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-java/issues/473"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-java/issues/473/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/473/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-java/statuses/09b0c726da9076a154c7728975a28757558876d0"}}}}