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 Hynek Cihlar over 6 years ago

Can you try to increase the Max Virtual Memory on your system? To at least 1.5 x physical memory (12288 MB) or even 2 x physical memory (16384 MB).

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

Hi,

Today again I ran all the processes ( AST and report generation ) for the same program but this time no java error, don't know why. PFA all the logs.

C:\FWD\Project>java -classpath ./p2j/build/lib/p2j.jar com.goldencode.p2j.conver
t.ConversionDriver f2 ./abl/DCORP/Talk/appserver/reporting/ExtractGeneratedFile.
p > log.txt 2>&1

C:\FWD\Project>ant rpt-no-front
Buildfile: C:\FWD\Project\build.xml

init:

download-ant-contrib:

init-ant-contrib:

rpt-no-front:
[java] .\data\namespace\mercator.dict
[java] .\data\namespace\procs.dict
[java] .\data\namespace\stddb.dict
[java] .\data\namespace\talkcore.dict
[java] .\data\namespace\talkmig.dict
[java] .\data\namespace\wldb.dict
[java] Elapsed job time: 00:01:59.107
[java] .\abl\DCORP\Talk\appserver\reporting\ExtractGeneratedFile.p
[java] Elapsed job time: 00:00:05.556
[echo] Report generation finished.

BUILD SUCCESSFUL
Total time: 2 minutes 9 seconds

C:\FWD\Project>

Now I started web server with below command-

C:\FWD\Project\deploy\server>report.cmd

It is showing server started in the log and I am also able to access the link https://localhost:8443/

But while accessing the reports, it showing reports categories at left side but if we click on any category it is not showing any information at right side ( summary report ) and so not able to access the detail level report. I have attached screenshots.

Pls check and suggest.

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

Atul Dalvi wrote:

But while accessing the reports, it showing reports categories at left side but if we click on any category it is not showing any information at right side ( summary report ) and so not able to access the detail level report. I have attached screenshots.

Please attach the report server log file created in deploy/server, I am assuming the name of the file is report_server.log.

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

Hi,

Server log attached.

report_server.log Magnifier (24.8 KB)

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

Atul Dalvi wrote:

Hi,

Server log attached.

I may be wrong, but I think your cfg/rootlist.xml is not configured correctly. Make sure it contains all your entry points, in your case its content should be (assuming ExtractGeneratedFile.p contains your entry points):

<?xml version="1.0"?>

<!-- Root Node List -->
<roots>
  <node filename="./abl/DCORP/Talk/appserver/reporting/ExtractGeneratedFile.p.ast" />
</roots>

For more details see Chapter_18_Call_Graph_Analyzer.

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

Hynek Cihlar wrote:

I may be wrong, but I think your cfg/rootlist.xml is not configured correctly. Make sure it contains all your entry points, in your case its content should be (assuming ExtractGeneratedFile.p contains your entry points):

Please note that the above is related to the Call graph reports feature, and likely not the cause of the screenshots you attached. There is another problem I see in the log file. I'll get back to you shortly.

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

Hi,

As suggested, I modified cfg/rootlist.xml and restarted server again but still same. XML attached.

Do I need to generate the call graph ?

rootlist.xml Magnifier (272 Bytes)

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

Atul Dalvi wrote:

Hi,

As suggested, I modified cfg/rootlist.xml and restarted server again but still same. XML attached.

Do I need to generate the call graph ?

Please attach the server report log file again.

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

Log attached.

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

Atul Dalvi wrote:

Log attached.

OK, the exception in the log file related to the Call graph feature is gone. There is one more exception which we need to solve.

Please do a recursive search for guava-21.0.jar in C:/FWD/Project/p2j and replace all the files you find with guava-19.0.jar which you can download from http://central.maven.org/maven2/com/google/guava/guava/19.0/guava-19.0.jar.

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

OK.

But after downloading guava-19.0.jar file, where to place it ?

Current file guava-21.0.jar is available in below locations -

1. C:\FWD\Project\p2j\build\lib
2. C:\FWD\Project\p2j\local-repo\com\google\guava\guava\21.0

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

Atul Dalvi wrote:

OK.

But after downloading guava-19.0.jar file, where to place it ?

Current file guava-21.0.jar is available in below locations -

1. C:\FWD\Project\p2j\build\lib
2. C:\FWD\Project\p2j\local-repo\com\google\guava\guava\21.0

Put it in both the locations.

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

Hynek Cihlar wrote:

Atul Dalvi wrote:

OK.

But after downloading guava-19.0.jar file, where to place it ?

Current file guava-21.0.jar is available in below locations -

1. C:\FWD\Project\p2j\build\lib
2. C:\FWD\Project\p2j\local-repo\com\google\guava\guava\21.0

Put it in both the locations.

Correction, remove the dir C:\FWD\Project\p2j\local-repo\com\google\guava\guava\21.0. Create dir C:\FWD\Project\p2j\local-repo\com\google\guava\guava\19.0 and put it there.

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

Hynek Cihlar wrote:

Correction, remove the dir C:\FWD\Project\p2j\local-repo\com\google\guava\guava\21.0. Create dir C:\FWD\Project\p2j\local-repo\com\google\guava\guava\19.0 and put it there.

With this change you will also need to change build.xml in order to build FWD correctly. Open the file, search for the line: fwdConvertClient group: 'com.google.guava', name: 'guava', version: '21.0' and replace it with:

    fwdConvertClient (group: 'com.google.guava', name: 'guava', version: '19.0') {
        force = true
    }

This is a problem in FWD v3.1 which has been fixed in the trunk of the FWD source tree and will be resolved with the next release.

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

Hi,

Other changes are done but in build.xml I don't find such entry.

build.xml attached.

build.xml Magnifier (26 KB)

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

Atul Dalvi wrote:

Hi,

Other changes are done but in build.xml I don't find such entry.

build.xml attached.

Sorry, it is in build.gradle.

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

OK replaced but in that file one more entry related to 21.0. Shall I replace that too ?

gwtRuntime group: 'com.google.guava', name: 'guava-gwt', version: '21.0'

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

Atul Dalvi wrote:

OK replaced but in that file one more entry related to 21.0. Shall I replace that too ?

gwtRuntime group: 'com.google.guava', name: 'guava-gwt', version: '21.0'

No, leave this one unchanged.

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

I done the changes and restarted server but still same result. Not able to see the details.

server log attached.

report_server.log Magnifier (1.83 KB)

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

Atul Dalvi wrote:

I done the changes and restarted server but still same result. Not able to see the details.

server log attached.

Good news is that I don't see any more error entries in the log file. At this point I'm not sure what could be wrong. But before somebody more eligible on FWD Code Analytics will respond, can you check the File List Filters?

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

Hi,

It is not showing anything under the File List Filters.

Screenshot attached.

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

Atul, is the ExtractGeneratedFile.p file showing up under the "Source File Listing" view?

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

Eric Faulhaber wrote:

Atul, is the ExtractGeneratedFile.p file showing up under the "Source File Listing" view?

Never mind, the problem was in FWD, and I've committed a fix to our version control system. I don't know when this will be released publicly, so please apply the patch for this, which I've posted at #3356-1, then rebuild FWD.

This addresses the summary report issue, but the incorrect display of the file filter profiles on Windows is still an open issue. I've opened #3357 to track this.

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

Hi,

I have downloaded this path but how to open that .patch file ?

Is this a zip file ?

And what do u mean by rebuild FWD again ?

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

Hi,

I modified patch changes and now trying to build again.

The gradle.bat jar worked for me. It has created build location.

Now I am running prepare_template.cmd -a command for template but it is failing. Don't know what went wrong. Earlier it worked for me but now failing with no clear error description.

C:\FWD\Project>prepare_template.cmd -a
Enter your application name (only letters or digits, first character a letter):
TALK3
1. Enter conversion configurations for your project
Edit the regex which matches all your include files (enter for default '*.[fhi]'
): .[fhi]
Edit the regex which matches all your program files (enter for default '
.[pPwW]
'): *.[pPwW]
Enter the PROPATH from your progress.ini file (enter for default '.:'): .;
2. Enter database configuration for your project
Enter the legacy database name(s), separated by a comma: mercator,procs,stddb,ta
lkcore,talkmig,wldb
1 file(s) copied.
The filename, directory name, or volume label syntax is incorrect.

(51-75/155)