{"id":385023,"date":"2024-06-29T05:51:49","date_gmt":"2024-06-29T05:51:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=385023"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=385023","title":{"rendered":"<span>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 JavaScript-\u0434\u0432\u0438\u0436\u043a\u0430 Rhino, \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438\u0441\u044c \u0435\u0434\u0438\u043d\u043e\u0440\u043e\u0433 \u0441 \u043d\u043e\u0441\u043e\u0440\u043e\u0433\u043e\u043c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0448\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0445\u043e\u0442\u044f\u0442, \u0447\u0442\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043b \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u2013  Javascript. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 JavaScript, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0438\u0436\u043e\u043a Rhino. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Rhino \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 PVS-Studio.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4b4\/680\/57b\/4b468057bcbaf4ba0ff23ea89f032e2c.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4b4\/680\/57b\/4b468057bcbaf4ba0ff23ea89f032e2c.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044f\u0441\u044c, \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c (\u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0421 \u0438 \u0421++) \u0441\u0442\u0430\u043b C#, \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438 Java. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442\u0441\u044f: \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043b\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432 PVS-Studio \u043d\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0430 \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f, \u0442\u043e \u043a\u0430\u043a\u043e\u0439?<\/p>\n<p>\u042f \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0435\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0437\u0443\u0447\u0430\u044e\u0442 \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0442\u0435\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u0430 JavaScript.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0451 \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, Kotlin. \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a. \u0422\u0430\u043a \u043a\u0430\u043a \u044f \u0437\u043d\u0430\u043a\u043e\u043c \u0441 Java \u0438 C#, \u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Kotlin, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0447\u0435\u0440\u0442\u044b \u043e\u0431\u043e\u0438\u0445 \u044d\u0442\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Kotlin \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Java, \u043d\u043e \u0438 \u0432 JavaScript.<\/p>\n<blockquote>\n<p>\u0422\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u2013 \u044d\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u043c\u0435\u043d\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044f \u043f\u043e\u043b\u0435\u0437 \u043d\u0430 GitHub \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Kotlin \u0432 JavaScript. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/terms\/0004\/\">AST (\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430)<\/a>, \u0430 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u0434 \u0438\u0437 \u0434\u0432\u0438\u0436\u043a\u0430 Rhino. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d.<\/p>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a Rhino \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Java;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 1997 \u0433\u043e\u0434\u0443 (25 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434), \u043a\u043e\u0433\u0434\u0430 \u0432 Java \u0434\u0430\u0436\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u043e\u0432 (\u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Java 5.0 \u0432 2004 \u0433\u043e\u0434\u0443);<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a, \u043a\u0440\u043e\u043c\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. &#171;\u041a\u0430\u043a \u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c JavaScript?&#187; \u2013 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0432\u044b. \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043a\u043e\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 JavaScript, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 Java \u0431\u0430\u0439\u0442 \u043a\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 Rhino \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0447\u0430\u0441\u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 C-\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JavaScript;<\/p>\n<\/li>\n<li>\n<p>Rhino \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 Rhino \u2013 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435 JavaScript \u0432\u043c\u0435\u0441\u0442\u043e Java. \u042d\u0442\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u0430\u0436\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c, \u0441\u043b\u0430\u0431\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 <a href=\"https:\/\/github.com\/mozilla\/rhino\">Rhino<\/a> \u044f \u0441\u043a\u0430\u0447\u0430\u043b \u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/12263-pvs-studio-for-idea-and-android-studio\">\u043f\u043b\u0430\u0433\u0438\u043d\u0430 PVS-Studio \u0434\u043b\u044f IntelliJ IDEA<\/a>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0430\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 25-\u043b\u0435\u0442\u043d\u0435\u0439 \u0434\u0430\u0432\u043d\u043e\u0441\u0442\u0438 (\u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439):<\/p>\n<ul>\n<li>\n<p>High: 79<\/p>\n<\/li>\n<li>\n<p>Medium: 158<\/p>\n<\/li>\n<li>\n<p>Low: 208<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0431\u0435\u0433\u043b\u043e\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/terms\/6461\/\">\u043b\u043e\u0436\u043d\u044b\u043c\u0438<\/a>. \u0412\u043e\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044f\u0440\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p>\u0412\u0441\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6022\/\">V6022<\/a>, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043b\u043e\u0436\u043d\u044b\u043c\u0438. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c API \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432. <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6022\/\">V6022<\/a> \u0438\u0449\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0443 \u043d\u0438\u0445 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\/\u043c\u0435\u0442\u043e\u0434\u044b, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0438 \u0432 \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434\/\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u043d\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\/\u043f\u043e\u043b\u044f\u043c;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6008\/\">V6008<\/a> (\u044d\u0442\u0430 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0438\u0449\u0435\u0442 \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435) \u043d\u0438\u0437\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 (Low). \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <em>XMLList.getXML<\/em> \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c <em>null<\/em>, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u043f\u043e\u043b\u044f <em>_annos<\/em>, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <em>XMLList.getXML<\/em> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <em>XMLList.length,<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a \u0436\u0435 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u043f\u043e\u043b\u0435\u043c <em>_annos<\/em>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u0435\u0440\u043d\u0451\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">class XMLList extends XMLObjectImpl implements Function {   ....   private XmlNode.InternalList _annos;   ....   XMLList(XMLLibImpl lib, Scriptable scope, XMLObject prototype) {     super(lib, scope, prototype);     _annos = new XmlNode.InternalList();   }   ....   private XML getXML(XmlNode.InternalList _annos, int index) {     if (index >= 0 &amp;&amp; index &lt; length()) {       return xmlFromNode(_annos.item(index));     } else {       return null;     }   }   ....   @Override   int length() {     int result = 0;      if (_annos != null) {       result = _annos.length();     }      return result;   }   ....   private XML getXmlFromAnnotation(int index) {     return getXML(_annos, index);               \/\/&lt;=   }   .... }<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0448\u0451\u043b \u0432\u0441\u0435 \u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043c\u0435\u0442\u0438\u043b \u0438\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0443 \u0441\u043a\u0440\u044b\u0442\u044c \u0438\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0438 \u043c\u043d\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c:<\/p>\n<ul>\n<li>\n<p>High: 79 (\u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c)<\/p>\n<\/li>\n<li>\n<p>Medium: 47 (\u0431\u044b\u043b\u043e 158)<\/p>\n<\/li>\n<li>\n<p>Low: 154 (\u0431\u044b\u043b\u043e 208)<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0437\u0443\u0447\u0438\u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u044f \u043e\u0442\u043e\u0431\u0440\u0430\u043b \u0441\u0430\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u044f\u043d\u0443\u0442\u044c \u0437\u0430 \u0440\u043e\u0433 \u043d\u043e\u0441\u043e\u0440\u043e\u0433\u0430 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Rhino.<\/p>\n<h3>\u0417\u0430\u0431\u044b\u0442\u043e\u0435 \u043f\u043e\u043b\u0435 + \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6001\/\">V6001<\/a> There are identical sub-expressions &#8216;t2Docked&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. SwingGui.java(2718), SwingGui.java(2718)<\/p>\n<pre><code class=\"java\">class ContextWindow extends JPanel implements ActionListener {   ....   public ContextWindow(final SwingGui debugGui) {     ....     ComponentListener clistener =       new ComponentListener() {           boolean t2Docked = true;            void check(Component comp) {               ....               if (leftDocked &amp;&amp; t2Docked &amp;&amp; rightDocked &amp;&amp; t2Docked) { \/\/ &lt;=                   \/\/ no change                   return;               }                              t2Docked = rightDocked;                              \/\/ Further t2Docked is not used               ....           }           ....           };     ....   }   .... }<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 <em>ContextWindow<\/em> \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <em>ComponentListener<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <em>check<\/em>. \u0412\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0442\u044b\u043a\u043e\u0432\u0430\u043d \u043b\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043a \u043b\u0435\u0432\u043e\u0439 \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043e\u043a\u043d\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u043e\u043a\u043d\u0430 \u0432 <em>JSplitPane<\/em>.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0435 <em>t2Docked<\/em> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>clistener<\/em> (\u0434\u0430-\u0434\u0430, \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u043e\u043d\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430) \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 <em>if<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b:<\/p>\n<pre><code class=\"java\">if (leftDocked &amp;&amp;      t2Docked &amp;&amp;     \/\/ &lt;=     rightDocked &amp;&amp;      t2Docked) {     \/\/ &lt;=   \/\/ no change   return; }<\/code><\/pre>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>check<\/em> \u043f\u0440\u0438\u0441\u0442\u044b\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043b\u0435\u0432\u043e\u0439 \u0438 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d \u0443 \u043c\u0435\u043d\u044f \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>clistener<\/em> \u0431\u044b\u043b\u043e \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 <em>t1Docked<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u043b\u0438. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 <em>if<\/em> \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0431\u043e\u043b\u0435\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c, \u0445\u043e\u0442\u044f \u0438 \u0438\u043c\u0435\u043b\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0438\u0437-\u0437\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 <em>if<\/em> \u0441\u0442\u0430\u043b\u043e \u0431\u044b \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"java\">leftDocked &amp;&amp; t1Docked &amp;&amp; rightDocked &amp;&amp; t2Docked<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u044f \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u0434\u043d\u043e \u0438\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0439 <em>t2Docked<\/em>.\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"java\">t2Docked &amp;&amp; leftDocked &amp;&amp; rightDocked<\/code><\/pre>\n<h3>\u041a\u043e\u043f\u0438\u043f\u0430\u0441\u0442, \u043d\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6007\/\">V6007<\/a> Expression &#8216;power &lt; 2&#8217; is always false. UintMap.java(39)<\/p>\n<pre><code class=\"java\">public class UintMap implements Serializable {   ....   \/\/ If true, enables consitency checks   private static final boolean check = false;   ....   public UintMap(int initialCapacity) {     if (initialCapacity &lt; 0) Kit.codeBug();     \/\/ Table grow when number of stored keys >= 3\/4 of max capacity     int minimalCapacity = initialCapacity * 4 \/ 3;     int i;     for (i = 2; (1 &lt;&lt; i) &lt; minimalCapacity; ++i) {}     power = i;     if (check &amp;&amp; power &lt; 2) Kit.codeBug();      \/\/ &lt;=   }   .... }<\/code><\/pre>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6007\/\">V6007<\/a> Expression &#8216;power &lt; 2&#8217; is always false. ObjToIntMap.java(102)<\/p>\n<pre><code class=\"java\">public class ObjToIntMap implements Serializable {   ....   \/\/ If true, enables consitency checks   private static final boolean check = false;   ....   public ObjToIntMap(int initialCapacity) {     if (initialCapacity &lt; 0) Kit.codeBug();     \/\/ Table grow when number of stored keys >= 3\/4 of max capacity     int minimalCapacity = initialCapacity * 4 \/ 3;     int i;     for (i = 2; (1 &lt;&lt; i) &lt; minimalCapacity; ++i) {}     power = i;     if (check &amp;&amp; power &lt; 2) Kit.codeBug();      \/\/ &lt;=   }   .... }<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 <em>UintMap<\/em> \u0438 <em>ObjToIntMap<\/em> \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d, \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0438\u043c\u0435\u043d\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u0434\u0430 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430:<\/p>\n<pre><code class=\"java\">if (check &amp;&amp; power &lt; 2) Kit.codeBug();<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0439, \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <em>Kit.codeBug,<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0438\u0434\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"java\">public static RuntimeException codeBug() throws RuntimeException {   RuntimeException ex = new IllegalStateException(\"FAILED ASSERTION\");   \/\/ Print stack trace ASAP   ex.printStackTrace(System.err);   throw ex; }<\/code><\/pre>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f <em>check<\/em>. \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e <em>false<\/em>, \u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <em>power &lt; 2<\/em>. \u042d\u0442\u043e \u043f\u043e\u043b\u0435, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>true<\/em>, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u043e\u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f <em>power<\/em> \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 2. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 <em>power<\/em> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>i<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a \u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u043e\u043c \u0432 \u0446\u0438\u043a\u043b\u0435 <em>for<\/em>. \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c 2, \u0430 \u0434\u0430\u043b\u0435\u0435 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0440\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>i<\/em> \u2013 \u044d\u0442\u043e 31, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e 1 &lt;&lt; 31 = <em>Integer.MIN_VALUE<\/em> (-2147483648). \u0415\u0441\u043b\u0438 \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>minimalCapacity<\/em>, \u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>i<\/em> \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u043e\u0439 2.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434 <em>Kit.codeBug<\/em> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u043c\u043e\u0433 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0439 \u043a\u043e\u0434. \u042f \u043d\u0435 \u0437\u043d\u0430\u044e \u043a\u0430\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0437\u0430\u0447\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<h3>\u041f\u0430\u043c\u044f\u0442\u044c \u043e \u0431\u0430\u0433\u0435, \u043f\u0440\u043e\u043d\u0435\u0441\u0451\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 \u0433\u043e\u0434\u0430<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6007\/\">V6007<\/a> Expression &#8216;!BUG_369394_IS_VALID&#8217; is always true. XmlProcessor.java(288)<\/p>\n<pre><code class=\"java\">class XmlProcessor implements Serializable {   ....   private void addTextNodesToRemoveAndTrim(List&lt;Node> toRemove, Node node) {     if (node instanceof Text) {       Text text = (Text) node;       boolean BUG_369394_IS_VALID = false;       if (!BUG_369394_IS_VALID) {                 \/\/ &lt;=         text.setData(text.getData().trim());       } else {         if (text.getData().trim().length() == 0) {           text.setData(\"\");         }       }       if (text.getData().length() == 0) {         toRemove.add(node);       }     }     ....   }   .... }<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0441\u043e\u0437\u0434\u0430\u043b \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>addTextNodesToRemoveAndTrim<\/em> \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0435\u0435 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0443\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>BUG_369394_IS_VALID<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <em>false<\/em> \u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0445\u043e\u0434\u0443 \u043c\u0435\u0442\u043e\u0434\u0430. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0436\u0435 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u0438 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>\u042d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0434\u043b\u044f \u0444\u0438\u043a\u0441\u0430 <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=369394\">\u0431\u0430\u0433\u0430 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 369394 \u0441 \u0441\u0430\u0439\u0442\u0430 Bugzilla<\/a>. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>BUG_369394_IS_VALID<\/em> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>false<\/em>, \u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e\u0442 \u0431\u0430\u0433 \u0443\u0436\u0435 \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0435\u0435 \u043e\u0442 \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0415\u0441\u043b\u0438 \u0436\u0435 \u044d\u0442\u043e\u0442 \u0431\u0430\u0433 \u0435\u0449\u0451 \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d, \u0442\u043e\u0433\u0434\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>false<\/em>, \u0430 \u043d\u0435 <em>true<\/em>.<\/p>\n<h3>\u041a\u043e\u0433\u0434\u0430 pretty \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0443\u0436 pretty<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6007\/\">V6007<\/a> Expression &#8216;i &lt; indentLevel&#8217; is always false. XmlProcessor.java(454)<\/p>\n<pre><code class=\"java\">class XmlProcessor implements Serializable {   ....   private boolean prettyPrint;   ....   private int prettyIndent;     ....   final String ecmaToXmlString(Node node) {     \/\/ See ECMA 357 Section 10.2.1     StringBuilder s = new StringBuilder();     int indentLevel = 0;     if (prettyPrint) {       for (int i = 0; i &lt; indentLevel; i++) { \/\/ &lt;=         s.append(' ');       }     }     ....   }   .... }<\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <em>i &lt; indentLevel<\/em> \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0436\u0435 \u0446\u0438\u043a\u043b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <em>i<\/em> \u0438 <em>indentLevel<\/em> \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0432\u043d\u044b 0, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 <em>for<\/em> \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 <em>StringBuilder<\/em> \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432, \u0435\u0441\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d \u0440\u0435\u0436\u0438\u043c <em>prettyPrint<\/em>. \u042d\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0443\u0445\u0443\u0434\u0448\u0438\u0442 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0430, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432 <em>StringBuilder<\/em>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0443\u0434\u0438\u0442\u044c \u043f\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430, \u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.ecma-international.org\/wp-content\/uploads\/ECMA-357_2nd_edition_december_2005.pdf\">\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 ECMA, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 10.2.1<\/a> (\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 41). \u0418\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <em>indentLevel<\/em>. \u041f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u044f \u043c\u043e\u0433\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043b\u0438\u0431\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0431\u044b\u043b, \u043d\u043e \u0437\u0430\u0442\u0435\u043c \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u043b\u0438, \u043b\u0438\u0431\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u0435\u043d \u0438 \u0437\u0430\u0431\u044b\u043b \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u041f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6008\/\">V6008<\/a> Potential null dereference of &#8216;generatorState&#8217; in function &#8216;freezeGenerator&#8217;. Interpreter.java(1244), Interpreter.java(3188)<\/p>\n<pre><code class=\"java\">public final class Interpreter extends Icode implements Evaluator {   ....   private static Object interpretLoop(Context cx,                                        CallFrame frame,                                        Object throwable) {        GeneratorState generatorState = null;     if (throwable != null) {       if (throwable instanceof GeneratorState) {         generatorState = (GeneratorState) throwable;         ....       } else if (!(throwable instanceof ContinuationJump)) {         Kit.codeBug();       }     }     ....     StateLoop:     for (; ; ) {       ....       if (throwable != null) {         ....       } else {         if (generatorState == null &amp;&amp; frame.frozen) Kit.codeBug();       }            for (; ; ) {         ....         int op = iCode[frame.pc++];         jumplessRun:         {           switch (op) {             ....             case ....:               {                 if (!frame.frozen) {                   return freezeGenerator(....,                                           generatorState, \/\/ &lt;=                                          ....);                 }                                   ....               }             \/\/ many more cases             ....           }         }         ....       }                      ....     }     ....   }   .... }<\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <em>freezeGenerator<\/em> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 <em>generatorState<\/em>, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <em>null<\/em>. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <em>interpretLoop<\/em> \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u043b\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 1500 \u0441\u0442\u0440\u043e\u043a, \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043b\u043e\u0436\u043d\u043e (\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e) \u043f\u043e\u043d\u044f\u0442\u044c \u0431\u0435\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u0430\u0432. \u0414\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043d\u0430\u0447\u043d\u0451\u043c \u043e\u0442 \u043c\u0435\u0441\u0442\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <em>freezeGenerator<\/em>.<\/p>\n<p><strong>\u041f\u0435\u0440\u0432\u043e\u0435<\/strong>. \u041f\u043e\u043b\u0435 <em>frame.frozen<\/em> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 <em>false<\/em> \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443 \u0432\u0441\u0435\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <em>CallFrame<\/em> \u043f\u0440\u0438 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438:<\/p>\n<pre><code class=\"java\">CallFrame cloneFrozen() {   ....   copy.frozen = false;        \/\/ &lt;=   return copy; }<\/code><\/pre>\n<p><strong>\u0412\u0442\u043e\u0440\u043e\u0435<\/strong>. \u0412\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <em>freezeGenerator<\/em> \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 <em>frame.frozen<\/em> \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0436\u043d\u043e:<\/p>\n<pre><code class=\"java\">  ....   if (!frame.frozen) {     return freezeGenerator(       cx,       frame,       stackTop,       generatorState,                \/\/ &lt;=       op == Icode_YIELD_STAR);   }   ....<\/code><\/pre>\n<p><strong>\u0422\u0440\u0435\u0442\u044c\u0435<\/strong>. \u0412\u044b\u0448\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 <em>null<\/em> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>generatorState<\/em>:<\/p>\n<pre><code class=\"java\">if (generatorState == null &amp;&amp; frame.frozen) Kit.codeBug();<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 <em>if<\/em> \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <em>Kit.codeBug<\/em> \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"java\">public static RuntimeException codeBug() throws RuntimeException {   RuntimeException ex = new IllegalStateException(\"FAILED ASSERTION\");   \/\/ Print stack trace ASAP   ex.printStackTrace(System.err);   throw ex; }<\/code><\/pre>\n<p><strong>\u0427\u0435\u0442\u0432\u0451\u0440\u0442\u043e\u0435<\/strong>. \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <em>throwable<\/em> \u043c\u0435\u0442\u043e\u0434\u0430 <em>interpretLoop<\/em> \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d <em>null<\/em>:<\/p>\n<pre><code class=\"java\">  if (throwable != null) { \/\/ &lt;=     ....   } else {     if (generatorState == null &amp;&amp; frame.frozen) Kit.codeBug(); \/\/ &lt;=   }<\/code><\/pre>\n<p><strong>\u041f\u044f\u0442\u043e\u0435.<\/strong> \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0449\u0451 \u0432\u044b\u0448\u0435, \u0442\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>generatorState<\/em> \u0440\u0430\u0432\u043d\u043e <em>null<\/em>, \u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 <em>throwable<\/em> \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0440\u0430\u0432\u0435\u043d <em>null<\/em> \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430 <em>GeneratorState<\/em>:<\/p>\n<pre><code class=\"java\">  ....   GeneratorState generatorState = null; \/\/ &lt;=   if (throwable != null) {     if (throwable instanceof GeneratorState) {       generatorState = (GeneratorState) throwable; \/\/ &lt;=        \/\/ reestablish this call frame       enterFrame(cx, frame, ScriptRuntime.emptyArgs, true);       throwable = null;     } else if (!(throwable instanceof ContinuationJump)) {       \/\/ It should be continuation       Kit.codeBug();     }   }   ....<\/code><\/pre>\n<p><strong>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435.<\/strong> \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0441\u0451 \u0432\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 <em>throwable<\/em> \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d <em>null<\/em> \u0438\u043b\u0438 \u043d\u0435 <em>GeneratorState<\/em>, \u0442\u043e \u0438 <em>generatorState<\/em> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <em>null<\/em>. \u0410 \u0435\u0441\u043b\u0438 \u0443\u0436 \u0438 <em>frame.frozen<\/em> \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0436\u043d\u043e, \u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <em>freezeGenerator<\/em> \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <em>NullPointerException<\/em> \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043f\u043e\u043b\u044e <em>operation<\/em>:<\/p>\n<pre><code class=\"java\">private static Object freezeGenerator(....,                                        GeneratorState generatorState,                                        ....) {   if (generatorState.operation == NativeGenerator.GENERATOR_CLOSE){     \/\/ &lt;=       \/\/ Error: no yields when generator is closing       throw ScriptRuntime.typeErrorById(\"msg.yield.closing\");   }   .... }<\/code><\/pre>\n<h3>\u041d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043a\u0438<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6019\/\">V6019<\/a> Unreachable code detected. It is possible that an error is present. Parser.java(3138)<\/p>\n<pre><code class=\"java\">public class Token {   ....   public static final int ERROR = -1, ....    .... }  public class Parser {    static final int CLEAR_TI_MASK = 0xFFFF, ....;       private AstNode primaryExpr() throws IOException {     int ttFlagged = peekFlaggedToken();     int tt = ttFlagged &amp; CLEAR_TI_MASK;       switch (tt) {       ....       case Token.ERROR:             consumeToken();                                               \/\/ &lt;=             \/\/ the scanner or one of its subroutines reported the error.             break;       ....     }     ....   }   .... }<\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 <em>peekFlaggedToken<\/em> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>int<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0442\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 &#171;&amp;&#187; (\u0438). \u041f\u0440\u0438\u0447\u0435\u043c \u043f\u0440\u0430\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u2013 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 0xFFFF (65535). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e &#171;\u0438&#187; \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e >= 0. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u043a\u043e\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e &#171;\u0438&#187; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <em>switch<\/em>, \u0433\u0434\u0435 \u043e\u0434\u043d\u043e \u0438\u0437 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 <em>switch<\/em> \u0440\u0430\u0432\u043d\u043e <em>Token.ERROR<\/em>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e -1.  \u042d\u0442\u0430 \u0432\u0435\u0442\u0432\u044c \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430, \u043e \u0447\u0451\u043c \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<h3>\u041a\u043e\u043f\u0438\u043f\u0430\u0441\u0442 \u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6021\/\">V6021<\/a> The value is assigned to the &#8216;localMax&#8217; variable but is not used. NativeRegExp.java(568)<\/p>\n<pre><code class=\"java\">public class NativeRegExp extends IdScriptableObject {   ....   private static boolean calculateBitmapSize(....) {     ....                                  switch (src[index]) {       case '\\\\':         ....         switch (c) {           ....           case 'c':             if ((index &lt; end) &amp;&amp; isControlLetter(src[index]))               localMax = (char) (src[index++] &amp; 0x1F);         \/\/ &lt;=             else --index;             localMax = '\\\\';             break;           ....         }       ....     }     \/\/ use localMax     ....   }   .... }<\/code><\/pre>\n<p>\u0412 \u0432\u0435\u0442\u043a\u0435 <em>if<\/em> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"java\">(char) (src[index++] &amp; 0x1F)<\/code><\/pre>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>localMax<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f &#8216;\\\\&#8217; \u0432 <em>localMax<\/em>. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 <em>switch<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>localMax<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <em>if<\/em> \u0443\u0441\u043b\u043e\u0432\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0447\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u0432\u0435\u0442\u0432\u0435\u0439 <em>if&#8230;else<\/em> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e. \u0412 \u044d\u0442\u043e\u043c \u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <em>processCharSetImpl<\/em>, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <em>switch<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043d\u0451\u043c \u0432 \u0432\u0435\u0442\u0432\u0438 \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0430 &#8216;c&#8217; \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0435\u043b\u043e <em>else<\/em> \u043e\u0431\u0451\u0440\u043d\u0443\u0442\u043e \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438:<\/p>\n<pre><code class=\"java\">.... case 'c':   if ((src &lt; end) &amp;&amp; isControlLetter(gData.regexp.source[src]))     thisCh = (char) (gData.regexp.source[src++] &amp; 0x1F);   else {     --src;     thisCh = '\\\\';   }   break; ....<\/code><\/pre>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443, \u043d\u0430\u0434\u043e \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 <em>else<\/em> \u0438 \u0434\u043e <em>break<\/em> \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>NativeRegExp<\/em>.<em>calculateBitmapSize<\/em>:<\/p>\n<pre><code class=\"java\">case 'c':   if ((index &lt; end) &amp;&amp; isControlLetter(src[index]))     localMax = (char) (src[index++] &amp; 0x1F);            else { \/\/ &lt;=     --index;     localMax = '\\\\';   }      \/\/ &lt;=   break; ....<\/code><\/pre>\n<h3>\u0417\u0430\u0431\u044b\u0442\u043e\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6021\/\">V6021<\/a> The value is assigned to the &#8216;nameString&#8217; variable but is not used. QName.java(293)<\/p>\n<pre><code class=\"java\">final class QName extends IdScriptableObject {   ....   QName constructQName(XMLLibImpl lib,                         Context cx,                         Object namespace,                         Object name) {     String nameString = null;     if (name instanceof QName) {       if (namespace == Undefined.instance) {         return (QName) name;       } else {         nameString = ((QName) name).localName();          \/\/ &lt;=       }     }     if (name == Undefined.instance) {       nameString = \"\";     } else {       nameString = ScriptRuntime.toString(name);     }     ....     return newQName(lib, q_uri, q_localName, q_prefix);   }   .... }<\/code><\/pre>\n<p>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6021\/\">V6021<\/a> \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0430, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>nameString<\/em> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"java\">((QName) name).localName()<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u043b\u0435\u0435 \u0432 \u043e\u0431\u043e\u0438\u0445 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f\u0445 <em>if&#8230;else<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>nameString<\/em> \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"java\">if (name == Undefined.instance) {   nameString = \"\"; } else {   nameString = ScriptRuntime.toString(name); }<\/code><\/pre>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0434\u0430\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0438\u043b\u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 <em>nameString<\/em> \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0435\u0433\u043e \u0432 <em>if&#8230;else<\/em> \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e. \u0422\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u0432 <em>if&#8230;else<\/em> \u0437\u0430\u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0432\u0435\u0442\u0432\u044c, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c (\u0438\u043b\u0438 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>nameString<\/em>.<\/p>\n<h3>\u041f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6025\/\">V6025<\/a> Index &#8216;sig1.length &#8212; 1&#8217; is out of bounds. NativeJavaMethod.java(461)<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6025\/\">V6025<\/a> Index &#8216;sig2.length &#8212; 1&#8217; is out of bounds. NativeJavaMethod.java(462)<\/p>\n<pre><code class=\"java\">public class NativeJavaMethod extends BaseFunction {    private static int preferSignature(Object[] args,                                       Class&lt;?>[] sig1,                                       boolean vararg1,                                       Class&lt;?>[] sig2,                                       boolean vararg2) {     int totalPreference = 0;     for (int j = 0; j &lt; args.length; j++) {       Class&lt;?> type1 = vararg1 &amp;&amp;                         j >= sig1.length ? sig1[sig1.length - 1] \/\/ &lt;=                                         : sig1[j];                    Class&lt;?> type2 = vararg2 &amp;&amp;                         j >= sig2.length ? sig2[sig2.length - 1] \/\/ &lt;=                                         : sig2[j];                    ....     }     return totalPreference;   } }<\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 <em>sig1[sig1.length &#8212; 1]<\/em> <em>\u0438 sig2[sig2.length &#8212; 1]<\/em> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f <em>ArrayIndexOutOfBoundsException<\/em>. \u041e\u0431\u0430 \u044d\u0442\u0438\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b <em>sig1<\/em> \u0438\u043b\u0438 <em>sig2<\/em> \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 -1 (0-1 = -1). \u0414\u0430\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <em>j >= sig1.length<\/em> \u0438 <em>j >= sig2.length<\/em> \u043d\u0435 \u0437\u0430\u0449\u0438\u0449\u0430\u044e\u0442 \u043e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 -1 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 <em>for<\/em>.<\/p>\n<p>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0437\u043e\u0432\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043d\u0435\u0433\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 <em>vararg1<\/em> \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u0442\u043e \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 <em>sig1<\/em> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0438 \u043c\u0435\u0436\u0434\u0443 <em>vararg2<\/em> \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c <em>sig2<\/em>.  \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439 Java, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <em>isVararg<\/em> \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <em>java.lang.reflect.Method<\/em> \u0438\u043b\u0438 <em>java.lang.reflect.Constructor<\/em> \u0432\u0435\u0440\u043d\u0451\u0442 <em>true<\/em>, \u0442\u043e \u0438 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <em>getParameterTypes<\/em> \u0432\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 (\u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f vararg-\u043e\u043c). \u041e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <em>preferSignature<\/em>. \u0422\u0430\u043a \u0447\u0442\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442. \u0418 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 -1.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <em>preferSignature<\/em> \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0441\u0440\u0430\u0437\u0443 \u0432\u0435\u0440\u043d\u0443\u0442\u044c -1, \u0435\u0441\u043b\u0438 <em>vararg1<\/em> \u0438\u0441\u0442\u0438\u043d\u0430 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 <em>sig1<\/em> \u043f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 <em>vararg2<\/em> \u0438\u0441\u0442\u0438\u043d\u0430 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 <em>sig2<\/em> \u043f\u0443\u0441\u0442\u043e\u0439:<\/p>\n<pre><code class=\"java\">private static int preferSignature(Object[] args,                                       Class&lt;?>[] sig1,                                       boolean vararg1,                                       Class&lt;?>[] sig2,                                       boolean vararg2) {     if (vararg1 &amp;&amp; sig1.length == 0 || vararg2 &amp;&amp; sig2.length == 0){       return -1;     }                                                                          int totalPreference = 0;     for (int j = 0; j &lt; args.length; j++) {       Class&lt;?> type1 = vararg1 &amp;&amp;                         j >= sig1.length ? sig1[sig1.length - 1]                                         : sig1[j];                    Class&lt;?> type2 = vararg2 &amp;&amp;                         j >= sig2.length ? sig2[sig2.length - 1]                                         : sig2[j];                    ....     }     return totalPreference;   } }<\/code><\/pre>\n<h3>\u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6025\/\">V6025<\/a> Possibly index &#8216;last &#8212; 1&#8217; is out of bounds. SuperBlock.java(50)<\/p>\n<pre><code class=\"java\">final class SuperBlock {   ....   int[] getTrimmedLocals() {     int last = locals.length - 1;     while (last >= 0         &amp;&amp; locals[last] == TypeInfo.TOP         &amp;&amp; !TypeInfo.isTwoWords(locals[last - 1])) {         \/\/ &lt;=       last--;     }     ....   }   .... }<\/code><\/pre>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <em>getTrimmedLocals<\/em> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u043f\u043e\u043b\u044f <em>locals<\/em> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0446\u0438\u043a\u043b\u0430 <em>while<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0446\u0438\u043a\u043b\u0430 <em>while<\/em> \u0437\u0430\u043a\u0440\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>locals<\/em> \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 -1, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f <em>ArrayIndexOutOfBoundsException<\/em>.<\/p>\n<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0435\u0441\u043b\u0438 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0446\u0438\u043a\u043b\u0430 <em>last<\/em> \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d 0, \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 (\u0438\u043d\u0434\u0435\u043a\u0441 0) \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e <em>TypeInfo.TOP<\/em> (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0). \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0446\u0438\u043a\u043b\u0430 <em>while<\/em> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u0438 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430 <em>TypeInfo.isTwoWords<\/em> \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>locals<\/em> \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 0 &#8212; 1 = -1.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f <em>ArrayIndexOutOfBoundsException<\/em> \u043c\u043e\u0433\u043b\u043e \u0435\u0449\u0451 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 <em>locals<\/em> \u043f\u0435\u0440\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u0435 \u0440\u0430\u0432\u043d\u043e\u0435 <em>TypeInfo.TOP<\/em> (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0). \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043d\u0430 1 \u0432\u043c\u0435\u0441\u0442\u043e 0 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 <em>while<\/em>:<\/p>\n<pre><code class=\"java\">while (last >= 1                          \/\/ &lt;=     &amp;&amp; locals[last] == TypeInfo.TOP     &amp;&amp; !TypeInfo.isTwoWords(locals[last - 1])) {            last--; }<\/code><\/pre>\n<p>\u041b\u0438\u0431\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 >= (\u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 > (\u0431\u043e\u043b\u044c\u0448\u0435):<\/p>\n<pre><code class=\"java\">while (last > 0                                  \/\/ &lt;=     &amp;&amp; locals[last] == TypeInfo.TOP     &amp;&amp; !TypeInfo.isTwoWords(locals[last - 1])) {            last--; }<\/code><\/pre>\n<h3>\u0412\u0437\u0430\u0438\u043c\u043e\u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u044b<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6028\/\">V6028<\/a> Identical expression &#8216;end&#8217; to the left and to the right of compound assignment. FastDtoaBuilder.java(74)<\/p>\n<pre><code class=\"java\">public class FastDtoaBuilder {   ....   private void toFixedFormat(int firstDigit, int decPoint) {     if (point &lt; end) {       ....     } else if (point > end) {       \/\/ large integer, add trailing zeroes       Arrays.fill(chars, end, point, '0');       end += point - end;                        \/\/\/ &lt;=     }   }   .... }<\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 <em>else if<\/em>. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u043d\u0451\u043c \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434, \u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u043e \u0447\u0451\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440:<\/p>\n<pre><code class=\"java\">end = end + point \u2013 end  => end = end \u2013 end + point  => end = + point  => end = point<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432\u0441\u0451 \u0447\u0442\u043e \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0442\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>end<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>point<\/em>.<\/p>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0442, \u0430 \u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f \u0431\u044b \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <em>+=<\/em> \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>point<\/em> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>end<\/em>.<\/p>\n<h3>\u0417\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6032\/\">V6032<\/a> It is odd that the body of method &#8216;endCheckSwitch&#8217; is fully equivalent to the body of another method &#8216;endCheckTry&#8217;. Node.java(681), Node.java(717)<\/p>\n<pre><code class=\"java\">public class Node implements Iterable&lt;Node> {   ....   private int endCheckSwitch() {     int rv = END_UNREACHED;      \/\/ examine the cases     \/\/         for (n = first.next; n != null; n = n.next)     \/\/         {     \/\/             if (n.type == Token.CASE) {     \/\/                 rv |= ((Jump)n).target.endCheck();     \/\/             } else     \/\/                 break;     \/\/         }      \/\/         \/\/ we don't care how the cases drop into each other     \/\/         rv &amp;= ~END_DROPS_OFF;      \/\/         \/\/ examine the default     \/\/         n = ((Jump)this).getDefault();     \/\/         if (n != null)     \/\/             rv |= n.endCheck();     \/\/         else     \/\/             rv |= END_DROPS_OFF;      \/\/         \/\/ remove the switch block     \/\/         rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);      return rv;   }   ....   private int endCheckTry() {     int rv = END_UNREACHED;      \/\/ a TryStatement isn't a jump - needs rewriting      \/\/ check the finally if it exists     \/\/         n = ((Jump)this).getFinally();     \/\/         if(n != null) {     \/\/             rv = n.next.first.endCheck();     \/\/         } else {     \/\/             rv = END_DROPS_OFF;     \/\/         }      \/\/         \/\/ if the finally block always returns, then none of the returns     \/\/         \/\/ in the try or catch blocks matter     \/\/         if ((rv &amp; END_DROPS_OFF) != 0) {     \/\/             rv &amp;= ~END_DROPS_OFF;      \/\/             \/\/ examine the try block     \/\/             rv |= first.endCheck();      \/\/             \/\/ check each catch block     \/\/             n = ((Jump)this).target;     \/\/             if (n != null)     \/\/             {     \/\/                 \/\/ point to the first catch_scope     \/\/                 for (n = n.next.first; n != null; n = n.next.next)     \/\/                 {     \/\/                     \/\/ check the block of user code in the catch_scope     \/\/                     rv |= n.next.first.next.first.endCheck();     \/\/                 }     \/\/             }     \/\/         }      return rv;   } }<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u043e\u0434\u043d\u0430\u043a\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6032\/\">V6032<\/a> \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u044d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0431\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0431\u044b\u0442\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c. \u041e\u0431 \u044d\u0442\u043e\u043c \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u043c\u043e\u0433 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0411\u0435\u0437 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043c\u043e\u0433 \u0431\u044b \u0438 \u0437\u0430\u0431\u044b\u0442\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0432\u0435\u0434\u044c \u0442\u0443\u0442 \u0434\u0430\u0436\u0435 \u043d\u0435\u0442 TODO-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f.<\/p>\n<h3>\u041a\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e \u0436\u0438\u0442\u044c Java-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u0431\u0435\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6048\/\">V6048<\/a> This expression can be simplified. Operand &#8216;lParenIndex&#8217; in the operation equals 0. ClassFileWriter.java(2658)<\/p>\n<pre><code class=\"java\">public class ClassFileWriter {   ....   private int[] createInitialLocals() {     int[] initialLocals = new int[itsMaxLocals];     ....     \/\/ No error checking should be necessary, sizeOfParameters does this     String type = itsCurrentMethod.getType();     int lParenIndex = type.indexOf('(');     int rParenIndex = type.indexOf(')');     if (lParenIndex != 0 || rParenIndex &lt; 0) {       throw new IllegalArgumentException(\"bad method type\");     }     int start = lParenIndex + 1;                                  \/\/ &lt;=     StringBuilder paramType = new StringBuilder();     while (start &lt; rParenIndex) {       switch (type.charAt(start)) {       ....       }       ....     }     return initialLocals;     }   .... }<\/code><\/pre>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0430\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <em>itsCurrentMethod.getType<\/em>, \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0439, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0441\u043a\u043e\u0431\u043a\u0438 &#171;(&#187; \u0438 \u0438\u043c\u0435\u0442\u044c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0441\u043a\u043e\u0431\u043a\u0443 &#171;)&#187;. \u042d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0442\u043e-\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b <em>if<\/em> \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 <em>lParenIndex<\/em> \u0438 <em>rParenIndex<\/em>, \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0439. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043f\u043e\u0441\u043b\u0435 <em>if<\/em> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>lParenIndex<\/em> \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0. \u042d\u0442\u0443 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<p>\u0418\u0437\u0443\u0447\u0438\u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0432\u0441\u0435 \u043c\u0435\u0441\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 <em>ClassFileMethod<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 <em>itsCurrentMethod<\/em>, \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <em>lParenIndex != 0 || rParenIndex &lt; 0<\/em> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u0442\u0440\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 <em>itsCurrentMethod<\/em> <em>.type<\/em>, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0441\u043a\u043e\u0431\u043a\u0438 &#8216;(&#8216; \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u0441\u0438\u043c\u0432\u043e\u043b \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u0438 &#8216;)&#8217;.<\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u044f \u0431\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>start<\/em> \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439:<\/p>\n<pre><code class=\"java\">private int[] createInitialLocals() {   int[] initialLocals = new int[itsMaxLocals];   ....   \/\/ No error checking should be necessary, sizeOfParameters does this   String type = itsCurrentMethod.getType();   int lParenIndex = type.indexOf('(');   int rParenIndex = type.indexOf(')');   if (lParenIndex != 0 || rParenIndex &lt; 0) {       throw new IllegalArgumentException(\"bad method type\");   }   int start = 1; \/\/ &lt;=   StringBuilder paramType = new StringBuilder();   while (start &lt; rParenIndex) {     switch (type.charAt(start)) {     ....     }     ....   }   return initialLocals;   }<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0431\u0443\u043b\u0435\u0432\u043e \u043f\u043e\u043b\u0435 <em>DEBUG<\/em>, \u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430\u0434 \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u0442\u044c, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d\u043e \u043d\u0443\u0436\u043d\u043e. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u0436\u0435 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u043b\u0438, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u043b \u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u043e\u043c \u043a\u043e\u0434\u0435 (<a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6019\/\">V6019<\/a>). \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>type<\/em>, \u043f\u043e\u043b\u0435 <em>DEBUG<\/em> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 <em>true<\/em>, \u0430 \u043f\u0440\u0438 \u0440\u0435\u043b\u0438\u0437\u0435 \u2013 \u0432 <em>false<\/em>:<\/p>\n<pre><code class=\"java\">\/\/ set the true value if you need to check  \/\/ currentMethodType in the createInitialLocals method private static final boolean DEBUG = false; .... private int[] createInitialLocals() {   int[] initialLocals = new int[itsMaxLocals];   ....   \/\/ No error checking should be necessary, sizeOfParameters does this   String type = itsCurrentMethod.getType();   int lParenIndex = type.indexOf('(');   int rParenIndex = type.indexOf(')');      if (DEBUG &amp;&amp;                             \/\/ &lt;=      (lParenIndex != 0 || rParenIndex &lt; 0)   ) {     throw new IllegalArgumentException(\"bad method type\");   }    int start = 1;    StringBuilder paramType = new StringBuilder();   while (start &lt; rParenIndex) {     switch (type.charAt(start)) {     ....     }     ....   }   return initialLocals;   }<\/code><\/pre>\n<h3>\u0412\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u043b\u0438\u0446\u0435<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6100\/\">V6100<\/a> An object is used as an argument to its own method. Consider checking the first actual argument of the &#8216;setParentScope&#8217; method. Scope.java(123)<\/p>\n<pre><code class=\"java\">public class Scope extends Jump {   ....   public static Scope splitScope(Scope scope) {     Scope result = new Scope(scope.getType());     result.symbolTable = scope.symbolTable;     scope.symbolTable = null;     result.parent = scope.parent;     result.setParentScope(scope.getParentScope());     result.setParentScope(result);                   \/\/ &lt;=      scope.parent = result;     result.top = scope.top;     return result;   }   .... }<\/code><\/pre>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <em>splitScope<\/em> \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <em>result.setParentScope(result)<\/em> \u043c\u0435\u0442\u043e\u0434\u0443 <em>setParentScope<\/em> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 <em>result<\/em>. \u042d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438 \u0442\u0430\u043a \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443 \u0447\u0435\u0440\u0435\u0437 <em>this<\/em>. \u041f\u0440\u0438\u0447\u0451\u043c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f: \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0443 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043e\u0434\u043d\u0430\u043a\u043e, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <em>scope.getParentScope()<\/em>. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u0435\u0442\u043e\u0434 <em>setParentScope<\/em> \u0431\u044b\u043b \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c-\u0441\u0435\u0442\u0442\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044f <em>parentScope<\/em>, \u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <em>setParentScope<\/em> \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0431\u044b \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e 100% \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0451 \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0438\u0437\u0443\u0447\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <em>setParentScope<\/em>:<\/p>\n<pre><code class=\"java\">public void setParentScope(Scope parentScope) {   this.parentScope = parentScope;   this.top = parentScope == null ? (ScriptNode) this                                   : parentScope.top; }<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u043a\u0440\u043e\u043c\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043f\u043e\u043b\u0435 <em>parentScope<\/em>, \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442. \u0417\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043d \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d <em>null<\/em>, \u0442\u043e \u0432 \u043f\u043e\u043b\u0435 <em>top<\/em> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u2013 <em>this<\/em>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u0440\u0430\u0432\u0435\u043d <em>null<\/em>, \u0442\u043e \u0432 \u043f\u043e\u043b\u0435 <em>top<\/em> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437 \u043f\u043e\u043b\u044f <em>top<\/em> \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0442 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <em>setParentScope<\/em> \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>splitScope<\/em> \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u043e\u0432 <em>scope.getParentScope()<\/em> \u0432\u0435\u0440\u043d\u0451\u0442 null \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c36\/294\/451\/c362944519573d9f2292a1cbf996cded.png\" width=\"768\" height=\"117\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c36\/294\/451\/c362944519573d9f2292a1cbf996cded.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b\u0437\u043e\u0432 <em>scope.getParentScope()<\/em> \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u0435 null, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cd7\/370\/451\/cd737045165d94f5bc245d480e85f8a7.png\" width=\"770\" height=\"117\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd7\/370\/451\/cd737045165d94f5bc245d480e85f8a7.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0435 \u043c\u043e\u0433\u0443 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c \u043d\u0430 100%, \u0447\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <em>result.setParentScope(result)<\/em> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e. \u0422\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u0443\u0436\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e.<\/p>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043b\u043e\u0436\u043d\u043e-\u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6106\/\">V6106<\/a> Casting expression to short type before implicitly casting it to other type may be excessive or incorrect. ClassFileWriter.java(796)<\/p>\n<pre><code class=\"java\">public class ClassFileWriter {   ....   public void addInvoke(int theOpCode,                          String className,                          String methodName,                          String methodType) {     if (DEBUGCODE) {         System.out.println(\"Add \"                         + bytecodeStr(theOpCode)                         + \", \"                         + className                         + \", \"                         + methodName                         + \", \"                         + methodType);     }     int parameterInfo = sizeOfParameters(methodType);     int parameterCount = parameterInfo >>> 16;  \/\/ &lt;= not commented     int stackDiff = (short) parameterInfo;      \/\/ &lt;= analyzer warning      ....   }   .... }<\/code><\/pre>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6106\/\">V6106<\/a> Casting expression to short type before implicitly casting it to other type may be excessive or incorrect. ClassFileWriter.java(847)<\/p>\n<pre><code class=\"java\">public class ClassFileWriter {   ....   public void addInvokeDynamic(String methodName,                                 String methodType,                                 MHandle bsm,                                 Object... bsmArgs) {     if (DEBUGCODE) {       System.out.println(\"Add invokedynamic, \" +                          methodName +                          \", \" +                          methodType);     }     \/\/ JDK 1.7 major class file version is required for invokedynamic     if (MajorVersion &lt; 51) {         throw new RuntimeException(           \"Please build and run with JDK 1.7 for invokedynamic support\");     }      int parameterInfo = sizeOfParameters(methodType);     \/\/ int parameterCount = parameterInfo >>> 16;  \/\/ &lt;= commented     int stackDiff = (short) parameterInfo;         \/\/ &lt;= analyzer warning     ....   }   .... }<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043f\u0430\u0440\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u043d\u0430\u0448\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438. \u041e\u0431\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u043e\u0436\u043d\u044b\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0438\u0445, \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443. \u0417\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u0434 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <em>addInvoke<\/em> \u0438 <em>addInvokeDynamic<\/em> \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <em>addInvokeDynamic<\/em> \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u043c \u0441\u0434\u0432\u0438\u0433\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>parameterInfo<\/em>, \u0430 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>addInvoke<\/em> \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>addInvokeDynamic<\/em> \u0437\u0430\u0431\u044b\u043b\u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <em>addInvokeDynamic<\/em> \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u044b.<\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0435\u0431\u044f \u0435\u0449\u0451 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <em>addInvokeDynamic<\/em> \u043d\u0438\u0433\u0434\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <em>addInvokeDynamic<\/em>, \u0442\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"java\">public class ClassFileWriter {   ....   public void addInvokeDynamic(....) {     ....          int parameterInfo = sizeOfParameters(methodType);     int parameterCount = parameterInfo >>> 16;    \/\/ &lt;= comment removed     int stackDiff = (short) parameterInfo;               ....   }   .... }<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0434\u0430\u0436\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0443\u0436\u0435 25 \u043b\u0435\u0442, \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0445, \u0432\u0441\u0451 \u0435\u0449\u0451 \u043c\u043e\u0433\u0443\u0442 \u0442\u0430\u0438\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438. \u0427\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u0436\u0438\u0432\u0451\u0442 \u043e\u0448\u0438\u0431\u043a\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0435\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u0435\u0449\u0451 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432 \u0440\u0430\u0437\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0442 \u043d\u0435\u0451.  \u041f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u043b\u0435\u0433\u043a\u043e\u043c \u0434\u0435\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u043e\u0434\u0430 (\u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u043e\u0434\u043d\u043e\u0433\u043e, \u0430 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445) \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, PVS-Studio.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/pvs-studio.com\/ru\/pvs-studio\/try-free\/\">\u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432<\/a> \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<p>P.S. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Java, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 JavaScript \u043a\u043e\u0434, \u0442\u0430\u043a \u0447\u0442\u043e \u0436\u0434\u0438\u0442\u0435 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b JavaScript \u0434\u0432\u0438\u0436\u043a\u0430\u043c \u044f \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e <a href=\"https:\/\/github.com\/microsoft\/TypeScript\/wiki\/Using-the-Compiler-API\">TypeScript Compiler API<\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f JavaScript. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e TypeScript \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u044f\u0437\u044b\u043a\u0430 JavaScript. \u0422\u0430\u043a\u0436\u0435 \u043c\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u0430\u043a\u0438\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f JavaScript \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Valery Komarov. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/java\/0990\/\">The check of the Rhino JavaScript engine or how the unicorn met the rhino.<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/688422\/\"> https:\/\/habr.com\/ru\/articles\/688422\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0448\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0445\u043e\u0442\u044f\u0442, \u0447\u0442\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043b \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u2013  Javascript. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 JavaScript, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0438\u0436\u043e\u043a Rhino. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Rhino \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 PVS-Studio.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044f\u0441\u044c, \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c (\u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0421 \u0438 \u0421++) \u0441\u0442\u0430\u043b C#, \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438 Java. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442\u0441\u044f: \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043b\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432 PVS-Studio \u043d\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0430 \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f, \u0442\u043e \u043a\u0430\u043a\u043e\u0439?<\/p>\n<p>\u042f \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0435\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0437\u0443\u0447\u0430\u044e\u0442 \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0442\u0435\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u0430 JavaScript.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0451 \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, Kotlin. \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a. \u0422\u0430\u043a \u043a\u0430\u043a \u044f \u0437\u043d\u0430\u043a\u043e\u043c \u0441 Java \u0438 C#, \u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Kotlin, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0447\u0435\u0440\u0442\u044b \u043e\u0431\u043e\u0438\u0445 \u044d\u0442\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Kotlin \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Java, \u043d\u043e \u0438 \u0432 JavaScript.<\/p>\n<blockquote>\n<p>\u0422\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u2013 \u044d\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u043c\u0435\u043d\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044f \u043f\u043e\u043b\u0435\u0437 \u043d\u0430 GitHub \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Kotlin \u0432 JavaScript. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/terms\/0004\/\">AST (\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430)<\/a>, \u0430 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u0434 \u0438\u0437 \u0434\u0432\u0438\u0436\u043a\u0430 Rhino. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d.<\/p>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a Rhino \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Java;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 1997 \u0433\u043e\u0434\u0443 (25 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434), \u043a\u043e\u0433\u0434\u0430 \u0432 Java \u0434\u0430\u0436\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u043e\u0432 (\u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Java 5.0 \u0432 2004 \u0433\u043e\u0434\u0443);<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a, \u043a\u0440\u043e\u043c\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. &#171;\u041a\u0430\u043a \u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c JavaScript?&#187; \u2013 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0432\u044b. \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043a\u043e\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 JavaScript, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 Java \u0431\u0430\u0439\u0442 \u043a\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 Rhino \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0447\u0430\u0441\u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 C-\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JavaScript;<\/p>\n<\/li>\n<li>\n<p>Rhino \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 Rhino \u2013 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435 JavaScript \u0432\u043c\u0435\u0441\u0442\u043e Java. \u042d\u0442\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u0430\u0436\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c, \u0441\u043b\u0430\u0431\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 <a href=\"https:\/\/github.com\/mozilla\/rhino\">Rhino<\/a> \u044f \u0441\u043a\u0430\u0447\u0430\u043b \u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/12263-pvs-studio-for-idea-and-android-studio\">\u043f\u043b\u0430\u0433\u0438\u043d\u0430 PVS-Studio \u0434\u043b\u044f IntelliJ IDEA<\/a>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0430\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 25-\u043b\u0435\u0442\u043d\u0435\u0439 \u0434\u0430\u0432\u043d\u043e\u0441\u0442\u0438 (\u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439):<\/p>\n<ul>\n<li>\n<p>High: 79<\/p>\n<\/li>\n<li>\n<p>Medium: 158<\/p>\n<\/li>\n<li>\n<p>Low: 208<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0431\u0435\u0433\u043b\u043e\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/terms\/6461\/\">\u043b\u043e\u0436\u043d\u044b\u043c\u0438<\/a>. \u0412\u043e\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044f\u0440\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p>\u0412\u0441\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6022\/\">V6022<\/a>, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043b\u043e\u0436\u043d\u044b\u043c\u0438. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c API \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432. <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6022\/\">V6022<\/a> \u0438\u0449\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0443 \u043d\u0438\u0445 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\/\u043c\u0435\u0442\u043e\u0434\u044b, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0438 \u0432 \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434\/\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u043d\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\/\u043f\u043e\u043b\u044f\u043c;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6008\/\">V6008<\/a> (\u044d\u0442\u0430 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0438\u0449\u0435\u0442 \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435) \u043d\u0438\u0437\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 (Low). \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <em>XMLList.getXML<\/em> \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c <em>null<\/em>, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u043f\u043e\u043b\u044f <em>_annos<\/em>, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <em>XMLList.getXML<\/em> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <em>XMLList.length,<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a \u0436\u0435 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u043f\u043e\u043b\u0435\u043c <em>_annos<\/em>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u0435\u0440\u043d\u0451\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">class XMLList extends XMLObjectImpl implements Function {   ....   private XmlNode.InternalList _annos;   ....   XMLList(XMLLibImpl lib, Scriptable scope, XMLObject prototype) {     super(lib, scope, prototype);     _annos = new XmlNode.InternalList();   }   ....   private XML getXML(XmlNode.InternalList _annos, int index) {     if (index >= 0 &amp;&amp; index &lt; length()) {       return xmlFromNode(_annos.item(index));     } else {       return null;     }   }   ....   @Override   int length() {     int result = 0;      if (_annos != null) {       result = _annos.length();     }      return result;   }   ....   private XML getXmlFromAnnotation(int index) {     return getXML(_annos, index);               \/\/&lt;=   }   .... }<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0448\u0451\u043b \u0432\u0441\u0435 \u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043c\u0435\u0442\u0438\u043b \u0438\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0443 \u0441\u043a\u0440\u044b\u0442\u044c \u0438\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0438 \u043c\u043d\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c:<\/p>\n<ul>\n<li>\n<p>High: 79 (\u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c)<\/p>\n<\/li>\n<li>\n<p>Medium: 47 (\u0431\u044b\u043b\u043e 158)<\/p>\n<\/li>\n<li>\n<p>Low: 154 (\u0431\u044b\u043b\u043e 208)<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0437\u0443\u0447\u0438\u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u044f \u043e\u0442\u043e\u0431\u0440\u0430\u043b \u0441\u0430\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u044f\u043d\u0443\u0442\u044c \u0437\u0430 \u0440\u043e\u0433 \u043d\u043e\u0441\u043e\u0440\u043e\u0433\u0430 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Rhino.<\/p>\n<h3>\u0417\u0430\u0431\u044b\u0442\u043e\u0435 \u043f\u043e\u043b\u0435 + \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6001\/\">V6001<\/a> There are identical sub-expressions &#8216;t2Docked&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. SwingGui.java(2718), SwingGui.java(2718)<\/p>\n<pre><code class=\"java\">class ContextWindow extends JPanel implements ActionListener {   ....   public ContextWindow(final SwingGui debugGui) {     ....     ComponentListener clistener =       new ComponentListener() {           boolean t2Docked = true;            void check(Component comp) {               ....               if (leftDocked &amp;&amp; t2Docked &amp;&amp; rightDocked &amp;&amp; t2Docked) { \/\/ &lt;=                   \/\/ no change                   return;               }                              t2Docked = rightDocked;                              \/\/ Further t2Docked is not used               ....           }           ....           };     ....   }   .... }<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 <em>ContextWindow<\/em> \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <em>ComponentListener<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <em>check<\/em>. \u0412\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0442\u044b\u043a\u043e\u0432\u0430\u043d \u043b\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043a \u043b\u0435\u0432\u043e\u0439 \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043e\u043a\u043d\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u043e\u043a\u043d\u0430 \u0432 <em>JSplitPane<\/em>.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0435 <em>t2Docked<\/em> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>clistener<\/em> (\u0434\u0430-\u0434\u0430, \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u043e\u043d\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430) \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 <em>if<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b:<\/p>\n<pre><code class=\"java\">if (leftDocked &amp;&amp;      t2Docked &amp;&amp;     \/\/ &lt;=     rightDocked &amp;&amp;      t2Docked) {     \/\/ &lt;=   \/\/ no change   return; }<\/code><\/pre>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>check<\/em> \u043f\u0440\u0438\u0441\u0442\u044b\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043b\u0435\u0432\u043e\u0439 \u0438 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d \u0443 \u043c\u0435\u043d\u044f \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>clistener<\/em> \u0431\u044b\u043b\u043e \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 <em>t1Docked<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u043b\u0438. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 <em>if<\/em> \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0431\u043e\u043b\u0435\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c, \u0445\u043e\u0442\u044f \u0438 \u0438\u043c\u0435\u043b\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0438\u0437-\u0437\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 <em>if<\/em> \u0441\u0442\u0430\u043b\u043e \u0431\u044b \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"java\">leftDocked &amp;&amp; t1Docked &amp;&amp; rightDocked &amp;&amp; t2Docked<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u044f \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u0434\u043d\u043e \u0438\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0439 <em>t2Docked<\/em>.\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"java\">t2Docked &amp;&amp; leftDocked &amp;&amp; rightDocked<\/code><\/pre>\n<h3>\u041a\u043e\u043f\u0438\u043f\u0430\u0441\u0442, \u043d\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6007\/\">V6007<\/a> Expression &#8216;power &lt; 2&#8217; is always false. UintMap.java(39)<\/p>\n<pre><code class=\"java\">public class UintMap implements Serializable {   ....   \/\/ If true, enables consitency checks   private static final boolean check = false;   ....   public UintMap(int initialCapacity) {     if (initialCapacity &lt; 0) Kit.codeBug();     \/\/ Table grow when number of stored keys >= 3\/4 of max capacity     int minimalCapacity = initialCapacity * 4 \/ 3;     int i;     for (i = 2; (1 &lt;&lt; i) &lt; minimalCapacity; ++i) {}     power = i;     if (check &amp;&amp; power &lt; 2) Kit.codeBug();      \/\/ &lt;=   }   .... }<\/code><\/pre>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v6007\/\">V6007<\/a> Expression &#8216;power &lt; 2&#8217; is always false. ObjToIntMap.java(102)<\/p>\n<pre><code class=\"java\">public class ObjToIntMap implements Serializable {   ....   \/\/ If true, enables consitency checks   private static final boolean check = false;   ....   public ObjToIntMap(int initialCapacity) {     if (initialCapacity &lt; 0) Kit.codeBug();     \/\/ Table grow when number of stored keys >= 3\/4 of max capacity     int minimalCapacity = initialCapacity * 4 \/ 3;     int i;     for (i = 2; (1 &lt;&lt; i) &lt; minimalCapacity; ++i) {}     power = i;     if (check &amp;&amp; power &lt; 2) Kit.codeBug();      \/\/ &lt;=   }   .... }<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 <em>UintMap<\/em> \u0438 <em>ObjToIntMap<\/em> \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d, \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0438\u043c\u0435\u043d\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u0434\u0430 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430:<\/p>\n<pre><code class=\"java\">if (check &amp;&amp; power &lt; 2) Kit.codeBug();<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0439, \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <em>Kit.codeBug,<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0438\u0434\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"java\">public static RuntimeException codeBug() throws RuntimeException {   RuntimeException ex = new IllegalStateException(\"FAILED ASSERTION\");   \/\/ Print stack trace ASAP   ex.printStackTrace(System.err);   throw ex; }<\/code><\/pre>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f <em>check<\/em>. \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e <em>false<\/em>, \u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <em>power &lt; 2<\/em>. \u042d\u0442\u043e \u043f\u043e\u043b\u0435, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>true<\/em>, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u043e\u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f <em>power<\/em> \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 2. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 <em>power<\/em> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>i<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a \u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u043e\u043c \u0432 \u0446\u0438\u043a\u043b\u0435 <em>for<\/em>. \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-385023","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=385023"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385023\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}