{"action":"opened","issue":{"url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2299","repository_url":"https://api.github.com/repos/zaproxy/zaproxy","labels_url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2299/labels{/name}","comments_url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2299/comments","events_url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2299/events","html_url":"https://github.com/zaproxy/zaproxy/issues/2299","id":138524622,"number":2299,"title":"Zest - Statement lost after drag and drop","user":{"login":"thc202","id":4639210,"avatar_url":"https://avatars.githubusercontent.com/u/4639210?v=3","gravatar_id":"","url":"https://api.github.com/users/thc202","html_url":"https://github.com/thc202","followers_url":"https://api.github.com/users/thc202/followers","following_url":"https://api.github.com/users/thc202/following{/other_user}","gists_url":"https://api.github.com/users/thc202/gists{/gist_id}","starred_url":"https://api.github.com/users/thc202/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thc202/subscriptions","organizations_url":"https://api.github.com/users/thc202/orgs","repos_url":"https://api.github.com/users/thc202/repos","events_url":"https://api.github.com/users/thc202/events{/privacy}","received_events_url":"https://api.github.com/users/thc202/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zaproxy/zaproxy/labels/add-on","name":"add-on","color":"006b75"},{"url":"https://api.github.com/repos/zaproxy/zaproxy/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"psiinon","id":1081115,"avatar_url":"https://avatars.githubusercontent.com/u/1081115?v=3","gravatar_id":"","url":"https://api.github.com/users/psiinon","html_url":"https://github.com/psiinon","followers_url":"https://api.github.com/users/psiinon/followers","following_url":"https://api.github.com/users/psiinon/following{/other_user}","gists_url":"https://api.github.com/users/psiinon/gists{/gist_id}","starred_url":"https://api.github.com/users/psiinon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psiinon/subscriptions","organizations_url":"https://api.github.com/users/psiinon/orgs","repos_url":"https://api.github.com/users/psiinon/repos","events_url":"https://api.github.com/users/psiinon/events{/privacy}","received_events_url":"https://api.github.com/users/psiinon/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-03-04T16:54:53Z","updated_at":"2016-03-04T16:54:53Z","closed_at":null,"body":"Steps to reproduce the issue:\r\n1. Run ZAP with Zest add-on installed;\r\n2. Create a Zest Proxy script, with \"Proxy default template.zst\";\r\n3. Drag  the IF statement and drop it between itself and the above comment and note that it disappears (instead of staying in the same place);\r\n4. Check the log file, there should be an exception, most likely a side effect of being lost:\r\n```\r\n46411 [AWT-EventQueue-0] ERROR org.zaproxy.zap.ZAP$UncaughtExceptionLogger  - Exception in thread \"AWT-EventQueue-0\"\r\njava.lang.ArrayIndexOutOfBoundsException: 1 >= 1\r\n\tat java.util.Vector.elementAt(Vector.java:474)\r\n\tat javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:245)\r\n\tat javax.swing.tree.DefaultTreeModel.getChild(DefaultTreeModel.java:174)\r\n\tat javax.swing.plaf.basic.BasicTreeUI.getDropLineRect(BasicTreeUI.java:1324)\r\n\tat javax.swing.plaf.basic.BasicTreeUI$Handler.repaintDropLocation(BasicTreeUI.java:3472)\r\n\tat javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3458)\r\n\tat java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)\r\n\tat java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)\r\n\tat java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)\r\n\tat java.awt.Component.firePropertyChange(Component.java:8430)\r\n\tat javax.swing.JTree.setDropLocation(JTree.java:1456)\r\n\tat javax.swing.TransferHandler$DropHandler.setComponentDropLocation(TransferHandler.java:1452)\r\n\tat javax.swing.TransferHandler$DropHandler.cleanup(TransferHandler.java:1570)\r\n\tat javax.swing.TransferHandler$DropHandler.drop(TransferHandler.java:1550)\r\n\tat java.awt.dnd.DropTarget.drop(DropTarget.java:455)\r\n```\r\n\r\nReproduced with:\r\n - ZAP 2.4.3;\r\n - \"Zest - Graphical Security Scripting Language\" version 19, older versions might also be affected."}}