{"record":{"id":"a46abf2ec4afff71","repo":"pxb1988/dex2jar","slug":"can-t-get-owner-and-type-from-str","errorCode":null,"errorMessage":"can't get owner and type from '\"+str+\"'","messagePattern":"can't get owner and type from '\"\\+str\\+\"'","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"d2j-jasmin/src/main/antlr3/com/googlecode/d2j/jasmin/Jasmin.g","lineNumber":680,"sourceCode":"                return 74;\r\n            case \"astore_0\":\r\n                return 75;\r\n            case \"astore_1\":\r\n                return 76;\r\n            case \"astore_2\":\r\n                return 77;\r\n            case \"astore_3\":\r\n                return 78;\r\n            }\r\n            return 0;\r\n        }\r\n\r\n    private String[] parseOwnerAndName(String str) {\r\n        int x=str.lastIndexOf('/');\r\n        if(x>0){\r\n        return new String[]{ unEscape0(str,0,x), unEscape0(str,x+1,str.length()) };\r\n        }\r\n        throw new RuntimeException(\"can't get owner and type from '\"+str+\"'\");\r\n    }\r\n\r\n    public Object parseValue(String desc, Object v) {\r\n        switch(desc) {\r\n        case \"Z\": return ((Number)v).intValue()!=0;\r\n        case \"B\": return ((Number)v).byteValue();\r\n        case \"S\": return ((Number)v).shortValue();\r\n        case \"I\": return ((Number)v).intValue();\r\n        case \"F\": return ((Number)v).floatValue();\r\n        case \"D\": return ((Number)v).doubleValue();\r\n        case \"J\": return ((Number)v).longValue();\r\n        case \"C\": return (char)((Number)v).intValue();\r\n        }\r\n        return v;\r\n    }\r\n\r\n    static class AV {\r\n        public AnnotationNode visitAnnotation(final String desc, final boolean visible) {\r","sourceCodeStart":662,"sourceCodeEnd":698,"githubUrl":"https://github.com/pxb1988/dex2jar/blob/b5bda4fb4935ae8b3869b422454ae3b3896c7bc1/d2j-jasmin/src/main/antlr3/com/googlecode/d2j/jasmin/Jasmin.g#L662-L698","documentation":"Jasmin.g's parseOwnerAndName splits a 'owner/name' string at the last '/'. If the string contains no '/' at index > 0, it cannot derive owner and name and throws RuntimeException(\"can't get owner and type from '<str>'\").","triggerScenarios":"Directives expecting a field/method reference like 'owner/name' (e.g. .field or invoke argument tokens) receiving a bare name without a slash, e.g. 'foo' instead of 'com/x/Foo/bar'.","commonSituations":"Hand-written .j files omitting the class prefix; generators that lost the owner part; escaped names whose only slash is at index 0.","solutions":["Write the reference in owner/name form: fully-qualified-class/member-name, e.g. 'java/lang/System/out'","Verify the token generation includes the class owner before the final '/'","Add a guard upstream to reject/repair tokens lacking a slash"],"exampleFix":"// before\n.field foo I\n// after\n.field com/example/Foo/foo I","handlingStrategy":"validation","validationCode":"if (ref == null || ref.lastIndexOf('/') <= 0) throw new IllegalArgumentException(\"expected owner/name: \" + ref);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always emit fully-qualified owner/name tokens in .j files","Validate field/method reference tokens before writing them","Escape '/' inside owner segments correctly and rely on lastIndexOf semantics"],"tags":["jasmin","parser","malformed-reference"],"backgroundTag":"invalid-argument-format","analyzedSha":"b5bda4fb4935ae8b3869b422454ae3b3896c7bc1","analyzedAt":"2026-09-08T00:44:01.258Z","contentChangedAt":"2026-09-08T00:44:01.258Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}