Mondego / SourcererCC

Sourcerer's Code Clone project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question on <parentId, blockId>

rajbarik opened this issue · comments

The source code [not the pre-built jar file] seem to expect a tuple with three fields as opposed to two mentioned in the doc <parentId, blockId>. What is the third argument? Can someone clarify? Or is this a recent bug?

String[] bagAndTokens = s.split("@#@");
String[] bagMetadata = bagAndTokens[0].split(",");
String functionId = bagMetadata[0];
String bagId = bagMetadata[1];
int bagSize = Integer.parseInt(bagMetadata[2]);

The third argument is the total number of tokens in the block.
We decided that the metadata about the block of code should also be present in the input file. This allows us to do speed up the performance of SCC.

Since this was more than a month ago I am closing it.