Project

General

Profile

FWD Source Code Analytics

Added by Atul Dalvi almost 7 years ago

How can we use FWD only for Source Code Analytics without much complicated setup ?


Replies (155)

RE: FWD Source Code Analytics - Added by Greg Shah over 6 years ago

You should not need to re-run the prepare_template.cmd unless you are setting up the project from scratch. If you are just applying changs to FWD, then rebuilding FWD is sometimes the only step you need to take. In this case, no other steps are needed except to restart the report server.

In other cases where the FWD changes are more extensive, you would need to re-generate the reports after rebuilding FWD. I don't think you need to do that here.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Hi,

I am setting up the project from scratch now.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

HI,

I started from scratch and done the suggested patch changes.

Now it is showing detail reports for summary. But the language is not understandable. Is there any document to understand these diagrams ?

I have attached one screenshot of diagram.

And why it is adding KW_ before every keyword ?

FWDL.jpg (85.8 KB)

RE: FWD Source Code Analytics - Added by Eric Faulhaber over 6 years ago

We currently are working on some documentation. Greg will respond separately to your questions.

As an aside, I've noticed with your screen shots that there are some JavaScript drawing issues. Although it is not a hard requirement, if you happen to have Chrome or Firefox installed, you should get a better experience with those browsers. Unfortunately, the web application does not present as well on Internet Explorer at this time.

RE: FWD Source Code Analytics - Added by Greg Shah over 6 years ago

Now it is showing detail reports for summary. But the language is not understandable. Is there any document to understand these diagrams ?
...
And why it is adding KW_ before every keyword ?

Please read this chapter (which I have just finished):

https://proj.goldencode.com/projects/p2j/wiki/Source_View

Hopefully it will explain everything completely.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

As suggested now I am opening it in chrome and it looks gud.

Now I am parsing one more program having class object references in the program but here it is showing few errors in the log. But there is no issue in the program when I compile or do check syntax from openedge editor.

at com.goldencode.p2j.uast.AstGenerator.processFile(AstGenerator.java:962)
at com.goldencode.p2j.uast.ScanDriver.lambda$scan$0(ScanDriver.java:375)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:410)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:248)
at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)
Caused by: java.lang.IllegalArgumentException: character to be escaped is missing
at java.util.regex.Matcher.appendReplacement(Unknown Source)
at java.util.regex.Matcher.replaceAll(Unknown Source)
at java.lang.String.replaceAll(Unknown Source)
at com.goldencode.p2j.uast.SymbolResolver.convertSeparator(SymbolResolver.java:5754)
at com.goldencode.p2j.uast.SymbolResolver.findFile(SymbolResolver.java:5780)

Not able to understand the issue.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

By looking at the other post, I have downloaded skeleton classes & interfaces and placed under p2j folder. Also created class_map.xml file for class references and added propath in the p2j.cfg file.

Also modified SymbolResolver.java for separator.

Now I have built FWD again and trying to parse the same file but now I am getting different error, something related to the propath missing.

Everything is OK but still showing error while parsing. I already added this propath in p2j.cfg file.

at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)
Caused by: java.lang.RuntimeException: Cannot find class/interface OeFrameWork.System.Logger in PROPATH.
at com.goldencode.p2j.uast.SymbolResolver.loadClass(SymbolResolver.java:2337)

RE: FWD Source Code Analytics - Added by Constantin Asofiei over 6 years ago

Atul Dalvi wrote:

Everything is OK but still showing error while parsing. I already added this propath in p2j.cfg file.

at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)
Caused by: java.lang.RuntimeException: Cannot find class/interface OeFrameWork.System.Logger in PROPATH.
at com.goldencode.p2j.uast.SymbolResolver.loadClass(SymbolResolver.java:2337)

Is OeFrameWork.System.Logger a class which exists in your code or is a from a OpenEdge library? If is from a OpenEdge library, the FWD skeleton classes do not have the OeFrameWork package; in this case, is needed to create skeleton classes for all these... Can you do a search in your code and post what classes you are referencing, from OeFrameWork package?

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Yes, this is custom class in my code OeFrameWork.System.Logger and that is available in the same path.

RE: FWD Source Code Analytics - Added by Constantin Asofiei over 6 years ago

Atul Dalvi wrote:

Yes, this is custom class in my code OeFrameWork.System.Logger and that is available in the same path.

Please post your PROPATH as configured in your current cfg/p2j.cfg.xml.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

cfg/p2j.cfg.xml

<parameter name="propath" value="${P2J_HOME}:./abl/:./abl/DCORP:./abl/DCORP/Talk:./abl/DCORP/Talk/group/:./abl/DCORP/Talk/scripts/:./abl/DCORP/Talk/group/prg/inc/:./abl/DCORP/Talk/group/prg/:./abl/DCORP/Talk/OeFrameWork/:./abl/DCORP/Talk/OeFrameWork/System:./abl/CORP/Talk/appserver/:./abl/CORP/Talk/Baloise/:./abl/CORP/Talk/Config/:./abl/CORP/Talk/pmm/:./abl/CORP/Talk/ul/:./abl/CORP/Talk/lib/:./abl/CORP/Talk/wlfiles/:./abl/CORP/Talk/inc/:./abl/CORP/Talk/prg/:./abl/DCORP/Fly2Pro:./abl/DCORP/Fly2Pro/prg/:./abl/DCORP/Fly2Pro/Trg_cre/:./abl/DCORP/Fly2Pro/Trg_del/:./abl/DCORP/Fly2Pro/Trg_wri/:./abl/DCORP/Fly2Pro/lib/:./abl/DCORP/Fly2Pro/Framework/:./p2j/skeleton/" />

class_map.xml


<map>
<entry key="OeFrameWork/System/Logger" value="./abl/DCORP/Talk/OeFrameWork/System/Logger.cls"/>
<entry key="OeFramework/System/LogFileWriter" value="./abl/DCORP/Talk/OeFrameWork/System/LogFileWriter.cls"/>
<entry key="OeFramework/System/ILogger" value="./abl/DCORP/Talk/OeFrameWork/System/ILogger.cls"/>
</map>

RE: FWD Source Code Analytics - Added by Constantin Asofiei over 6 years ago

Atul, please try a fully lowercase class_map.xml:

<?xml version="1.0"?>
<map>
   <entry key="oeframework/system/logger" value="./abl/dcorp/talk/oeframework/system/logger.cls"/>
   <entry key="oeframework/system/logfilewriter" value="./abl/dcorp/talk/oeframework/system/logfilewriter.cls"/>
   <entry key="oeframework/system/ilogger" value="./abl/dcorp/talk/oeframework/system/ilogger.cls"/>
</map>

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Hi,

Is there any update on this issue. Still I am not able to solve this issue. For me, it looks all OK.

Also I am parsing 1 .w program but its still running almost more that 20 hrs, no information in log

------------------------------------------------------------------------------
Scanning Progress Source (preprocessor, lexer, parser, persist ASTs)
------------------------------------------------------------------------------

.\abl\DCORP\Talk\ul\prg\fo\CFU.w

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Same error for lowercase aswell, not able to parse.

RE: FWD Source Code Analytics - Added by Greg Shah over 6 years ago

Same error for lowercase aswell, not able to parse.

In which directory is your class_map.xml located? Do you have it in the ./cfg/ directory? It must be located there.

Also I am parsing 1 .w program but its still running almost more that 20 hrs, no information in log

This is certainly in an infinite loop. No single program should take more than 30 seconds to parse.

To find out what the code is doing at that location, please run jstack to get a stack trace and post the stack trace here.

jstack Command Line Syntax
How do I generate a Java thread dump on Windows?

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Hi,

class_map.xml file is under ./cfg/ only but still facing the same issue. Don't know why it is throwing that error even though the all class programs and class_map.xml file available.

For few other .w files the parsing is working, specially for 1 file it is not.

I have generated and attached stack trace but not able to understand it.

Pls suggest.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Atul Dalvi wrote:

Hi,

class_map.xml file is under ./cfg/ only but still facing the same issue. Don't know why it is throwing that error even though the all class programs and class_map.xml file available.

For few other .w files the parsing is working, specially for 1 file it is not.

I have generated and attached stack trace but not able to understand it.

Pls suggest.

tmp.txt Magnifier (4.57 KB)

RE: FWD Source Code Analytics - Added by Greg Shah over 6 years ago

In regard to the stack trace, the important part is this:

"main" #1 prio=5 os_prio=0 tid=0x00000000021f0800 nid=0x1628 runnable [0x00000000021ee000]
   java.lang.Thread.State: RUNNABLE
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at antlr.CharScanner.makeToken(CharScanner.java:173)
    at com.goldencode.p2j.preproc.TextLexer.nextToken(TextLexer.java:227)
    at antlr.TokenBuffer.fill(TokenBuffer.java:69)
    at antlr.TokenBuffer.LA(TokenBuffer.java:80)
    at antlr.LLkParser.LA(LLkParser.java:52)
    at com.goldencode.p2j.preproc.TextParser.skipBlock(TextParser.java:1176)
    at com.goldencode.p2j.preproc.TextParser.condtext(TextParser.java:919)
    at com.goldencode.p2j.preproc.TextParser.aif(TextParser.java:627)
    at com.goldencode.p2j.preproc.TextParser.ppstatement(TextParser.java:301)
    at com.goldencode.p2j.preproc.TextParser.textBlock(TextParser.java:197)
    at com.goldencode.p2j.preproc.TextParser.text(TextParser.java:161)
    at com.goldencode.p2j.preproc.Preprocessor.<init>(Preprocessor.java:765)
    at com.goldencode.p2j.uast.AstGenerator.preprocess(AstGenerator.java:1249)
    at com.goldencode.p2j.uast.AstGenerator.prepareDataStream(AstGenerator.java:1025)
    at com.goldencode.p2j.uast.AstGenerator.prepareLexer(AstGenerator.java:1556)
    at com.goldencode.p2j.uast.AstGenerator.parse(AstGenerator.java:1483)
    at com.goldencode.p2j.uast.AstGenerator.processFile(AstGenerator.java:957)
    at com.goldencode.p2j.uast.ScanDriver.lambda$scan$0(ScanDriver.java:375)
    at com.goldencode.p2j.uast.ScanDriver$$Lambda$8/810864083.call(Unknown Source)
    at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:410)
    at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:248)
    at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
    at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
    at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)

This tells us that we are preprocessing (at com.goldencode.p2j.preproc.Preprocessor.<init>(Preprocessor.java:765)) the .\abl\DCORP\Talk\ul\prg\fo\CFU.w file and that somewhere in that file, we are processing an &IF directive (at com.goldencode.p2j.preproc.TextParser.aif(TextParser.java:627)).

The last code in FWD that is processing is at com.goldencode.p2j.preproc.TextParser.skipBlock(TextParser.java:1176) which is code to skip a conditional block. By looking up the stack one level, we see at com.goldencode.p2j.preproc.TextParser.condtext(TextParser.java:919). condtext is the rule that processes the &THEN/&ELSEIF/&ELSE/ENDIF that follows the conditional &IF directive.

By looking at that line of code (919) in TextParser, we can see that it is in the section of code that is processing just after the first &THEN. It is trying to skip the block of code just following that &THEN because the expression in the &IF evaluated to false.

The preprocessor skipBlock code is executing infinitely or is getting called infinitely. Something in the .\abl\DCORP\Talk\ul\prg\fo\CFU.w source file OR in one of its include files (OR in a nested include file...) is triggering this infinite loop. We will need more information to track this back to the root cause.

Some questions:

1. Are you seeing any errors or warnings posted about this file? For example, do you see anything like Include file "<filename>" not found.?

2. Do you have the setting unix-escapes in your cfg/p2j.cfg.xml? Assuming that the original system on which the code runs is Windows (or that you compile this code on Windows), then the cfg/p2j.cfg.xml should have <parameter name="unix-escapes" value="false"/>. The idea here is that without this value the preprocessor can treat \ as an escape character which will lead to many strange/bad results in code that was expecting to be parsed on Windows.

RE: FWD Source Code Analytics - Added by Hynek Cihlar over 6 years ago

Atul, in addition to Constantin's suggestion also change the slashes in the key attributes to back slashes:

<?xml version="1.0"?>
<map>
   <entry key="oeframework\system\logger" value="./abl/dcorp/talk/oeframework/system/logger.cls"/>
   <entry key="oeframework\system\logfilewriter" value="./abl/dcorp/talk/oeframework/system/logfilewriter.cls"/>
   <entry key="oeframework\system\ilogger" value="./abl/dcorp/talk/oeframework/system/ilogger.cls"/>
</map>

This is needed due to the way the qualified names are handled on Windows. Please let me know whether this resolves the "Cannot find class/interface" exception.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Hynek Cihlar wrote:

Atul, in addition to Constantin's suggestion also change the slashes in the key attributes to back slashes:
[...]

This is needed due to the way the qualified names are handled on Windows. Please let me know whether this resolves the "Cannot find class/interface" exception.

Yes it resolves the "Cannot find class/interface" exception. Thanks.

Now I am parsing one class program but getting one error in the log as below

"line 127:23: unexpected token: CHARACTER"

"line 127:40: expecting LPARENS, found '8'"

At line 23, I have below code and that is correct. Not able understand the issue.

DEFINE PRIVATE PROPERTY LiceID AS CHARACTER NO-UNDO 
GET.
SET.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Atul Dalvi wrote:

Hynek Cihlar wrote:

Atul, in addition to Constantin's suggestion also change the slashes in the key attributes to back slashes:
[...]

This is needed due to the way the qualified names are handled on Windows. Please let me know whether this resolves the "Cannot find class/interface" exception.

Yes it resolves the "Cannot find class/interface" exception. Thanks.

Now I am parsing one class program but getting one error in the log as below

"line 127:23: unexpected token: CHARACTER"

"line 127:40: expecting LPARENS, found '8'"

At line 23, I have below code and that is correct. Not able understand the issue.

DEFINE PRIVATE PROPERTY LiceID AS CHARACTER NO-UNDO
GET.
SET.

Sorry at line 127 empty constructor

DESTRUCTOR PUBLIC UserSe ( ):

END DESTRUCTOR.

RE: FWD Source Code Analytics - Added by Greg Shah over 6 years ago

I suspect that the failure is in a different file or that the code you are showing is not from the .cache (preprocessed) version of the program (e.g. SomeClass.cls.cache).

If you are showing the lines from the cache file, it is probably a failure in a different source file. In this case, please show 30-40 lines of the log output around the failure.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Greg Shah wrote:

I suspect that the failure is in a different file or that the code you are showing is not from the .cache (preprocessed) version of the program (e.g. SomeClass.cls.cache).

If you are showing the lines from the cache file, it is probably a failure in a different source file. In this case, please show 30-40 lines of the log output around the failure.

Log details -----

line 50:64: unexpected token: getDesc
at com.goldencode.p2j.uast.ProgressParser.attribute_or_method(ProgressParser.java:48188)
at com.goldencode.p2j.uast.ProgressParser.chained_object_members(ProgressParser.java:19448)
at com.goldencode.p2j.uast.ProgressParser.un_type(ProgressParser.java:52820)
at com.goldencode.p2j.uast.ProgressParser.prod_expr(ProgressParser.java:52703)
at com.goldencode.p2j.uast.ProgressParser.sum_expr(ProgressParser.java:37465)
at com.goldencode.p2j.uast.ProgressParser.compare_expr(ProgressParser.java:52310)
at com.goldencode.p2j.uast.ProgressParser.log_not_expr(ProgressParser.java:52181)
at com.goldencode.p2j.uast.ProgressParser.log_and_expr(ProgressParser.java:52122)
at com.goldencode.p2j.uast.ProgressParser.expr(ProgressParser.java:8939)
at com.goldencode.p2j.uast.ProgressParser.return_core(ProgressParser.java:46643)
at com.goldencode.p2j.uast.ProgressParser.return_stmt(ProgressParser.java:31043)
at com.goldencode.p2j.uast.ProgressParser.stmt_list(ProgressParser.java:23586)
at com.goldencode.p2j.uast.ProgressParser.statement(ProgressParser.java:6087)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4958)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.oo_block(ProgressParser.java:4715)
at com.goldencode.p2j.uast.ProgressParser.user_defined_method(ProgressParser.java:5595)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4942)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.class_def(ProgressParser.java:5205)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4926)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.external_proc(ProgressParser.java:4605)
at com.goldencode.p2j.uast.AstGenerator.parse(AstGenerator.java:1487)
at com.goldencode.p2j.uast.AstGenerator.processFile(AstGenerator.java:957)
at com.goldencode.p2j.uast.ScanDriver.lambda$scan$0(ScanDriver.java:375)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:410)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:248)
at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)
line 50:71: expecting DOT, found '('
at antlr.Parser.match(Parser.java:211)
at com.goldencode.p2j.uast.ProgressParser.return_stmt(ProgressParser.java:31045)
at com.goldencode.p2j.uast.ProgressParser.stmt_list(ProgressParser.java:23586)
at com.goldencode.p2j.uast.ProgressParser.statement(ProgressParser.java:6087)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4958)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.oo_block(ProgressParser.java:4715)
at com.goldencode.p2j.uast.ProgressParser.user_defined_method(ProgressParser.java:5595)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4942)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.class_def(ProgressParser.java:5205)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4926)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.external_proc(ProgressParser.java:4605)
at com.goldencode.p2j.uast.AstGenerator.parse(AstGenerator.java:1487)
at com.goldencode.p2j.uast.AstGenerator.processFile(AstGenerator.java:957)
at com.goldencode.p2j.uast.ScanDriver.lambda$scan$0(ScanDriver.java:375)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:410)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:248)
at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)
line 61:64: unexpected token: getCharacter
at com.goldencode.p2j.uast.ProgressParser.attribute_or_method(ProgressParser.java:48188)
at com.goldencode.p2j.uast.ProgressParser.chained_object_members(ProgressParser.java:19448)
at com.goldencode.p2j.uast.ProgressParser.un_type(ProgressParser.java:52820)
at com.goldencode.p2j.uast.ProgressParser.prod_expr(ProgressParser.java:52703)
at com.goldencode.p2j.uast.ProgressParser.sum_expr(ProgressParser.java:37465)
at com.goldencode.p2j.uast.ProgressParser.compare_expr(ProgressParser.java:52310)
at com.goldencode.p2j.uast.ProgressParser.log_not_expr(ProgressParser.java:52181)
at com.goldencode.p2j.uast.ProgressParser.log_and_expr(ProgressParser.java:52122)
at com.goldencode.p2j.uast.ProgressParser.expr(ProgressParser.java:8939)
at com.goldencode.p2j.uast.ProgressParser.return_core(ProgressParser.java:46643)
at com.goldencode.p2j.uast.ProgressParser.return_stmt(ProgressParser.java:31043)
at com.goldencode.p2j.uast.ProgressParser.stmt_list(ProgressParser.java:23586)
at com.goldencode.p2j.uast.ProgressParser.statement(ProgressParser.java:6087)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4958)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.oo_block(ProgressParser.java:4715)
at com.goldencode.p2j.uast.ProgressParser.user_defined_method(ProgressParser.java:5595)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4942)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.class_def(ProgressParser.java:5205)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4926)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.external_proc(ProgressParser.java:4605)
at com.goldencode.p2j.uast.AstGenerator.parse(AstGenerator.java:1487)
at com.goldencode.p2j.uast.AstGenerator.processFile(AstGenerator.java:957)
at com.goldencode.p2j.uast.ScanDriver.lambda$scan$0(ScanDriver.java:375)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:410)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:248)
at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)
line 61:76: expecting DOT, found '('
at antlr.Parser.match(Parser.java:211)
at com.goldencode.p2j.uast.ProgressParser.return_stmt(ProgressParser.java:31045)
at com.goldencode.p2j.uast.ProgressParser.stmt_list(ProgressParser.java:23586)
at com.goldencode.p2j.uast.ProgressParser.statement(ProgressParser.java:6087)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4958)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.oo_block(ProgressParser.java:4715)
at com.goldencode.p2j.uast.ProgressParser.user_defined_method(ProgressParser.java:5595)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4942)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.class_def(ProgressParser.java:5205)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4926)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.external_proc(ProgressParser.java:4605)
at com.goldencode.p2j.uast.AstGenerator.parse(AstGenerator.java:1487)
at com.goldencode.p2j.uast.AstGenerator.processFile(AstGenerator.java:957)
at com.goldencode.p2j.uast.ScanDriver.lambda$scan$0(ScanDriver.java:375)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:410)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:248)
at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)
line 72:64: unexpected token: getDate
at com.goldencode.p2j.uast.ProgressParser.attribute_or_method(ProgressParser.java:48188)
at com.goldencode.p2j.uast.ProgressParser.chained_object_members(ProgressParser.java:19448)
at com.goldencode.p2j.uast.ProgressParser.un_type(ProgressParser.java:52820)
at com.goldencode.p2j.uast.ProgressParser.prod_expr(ProgressParser.java:52703)
at com.goldencode.p2j.uast.ProgressParser.sum_expr(ProgressParser.java:37465)
at com.goldencode.p2j.uast.ProgressParser.compare_expr(ProgressParser.java:52310)
at com.goldencode.p2j.uast.ProgressParser.log_not_expr(ProgressParser.java:52181)
at com.goldencode.p2j.uast.ProgressParser.log_and_expr(ProgressParser.java:52122)
at com.goldencode.p2j.uast.ProgressParser.expr(ProgressParser.java:8939)
at com.goldencode.p2j.uast.ProgressParser.return_core(ProgressParser.java:46643)
at com.goldencode.p2j.uast.ProgressParser.return_stmt(ProgressParser.java:31043)
at com.goldencode.p2j.uast.ProgressParser.stmt_list(ProgressParser.java:23586)
at com.goldencode.p2j.uast.ProgressParser.statement(ProgressParser.java:6087)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4958)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.oo_block(ProgressParser.java:4715)
at com.goldencode.p2j.uast.ProgressParser.user_defined_method(ProgressParser.java:5595)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4942)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.class_def(ProgressParser.java:5205)
at com.goldencode.p2j.uast.ProgressParser.single_block(ProgressParser.java:4926)
at com.goldencode.p2j.uast.ProgressParser.block(ProgressParser.java:4678)
at com.goldencode.p2j.uast.ProgressParser.external_proc(ProgressParser.java:4605)
at com.goldencode.p2j.uast.AstGenerator.parse(AstGenerator.java:1487)
at com.goldencode.p2j.uast.AstGenerator.processFile(AstGenerator.java:957)
at com.goldencode.p2j.uast.ScanDriver.lambda$scan$0(ScanDriver.java:375)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:410)
at com.goldencode.p2j.uast.ScanDriver.scan(ScanDriver.java:248)
at com.goldencode.p2j.convert.ConversionDriver.runScanDriver(ConversionDriver.java:496)
at com.goldencode.p2j.convert.ConversionDriver.front(ConversionDriver.java:377)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:2005)

RE: FWD Source Code Analytics - Added by Greg Shah over 6 years ago

Please post more of the log from above that point. Make sure to go all the way up into the filenames of the programs being parsed.

RE: FWD Source Code Analytics - Added by Atul Dalvi over 6 years ago

Greg Shah wrote:

I suspect that the failure is in a different file or that the code you are showing is not from the .cache (preprocessed) version of the program (e.g. SomeClass.cls.cache).

If you are showing the lines from the cache file, it is probably a failure in a different source file. In this case, please show 30-40 lines of the log output around the failure.

In cache file line 127

I have code like class method returning array of size 8.

METHOD PUBLIC CHARACTER EXTENT 8 getUserValueArray() :

Does parsing supports this type of coding ?

(76-100/155)