*** empty log message ***
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@894 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -36,7 +36,7 @@ public class DCPD {
|
||||
|
||||
System.out.println("Tokenizing");
|
||||
job = new Job("java_lang", new Integer(1));
|
||||
tokenSetWrapper = new TokenSetsWrapper(loadTokens("C:\\j2sdk1.4.0_01\\src\\java\\lang\\", true), job.id);
|
||||
tokenSetWrapper = new TokenSetsWrapper(loadTokens("C:\\j2sdk1.4.0_01\\src\\java\\lang\\ref", true), job.id);
|
||||
System.out.println("Tokenizing complete, " + (System.currentTimeMillis()-start) + " elapsed ms");
|
||||
|
||||
System.out.println("Writing the TokenSetsWrapper to the space");
|
||||
@ -44,7 +44,7 @@ public class DCPD {
|
||||
System.out.println("Writing complete, " + (System.currentTimeMillis()-start) + " elapsed ms");
|
||||
|
||||
System.out.println("Crunching");
|
||||
DGST dgst = new DGST(space, job, tokenSetWrapper.tokenSets, 30);
|
||||
DGST dgst = new DGST(space, job, tokenSetWrapper.tokenSets, 100);
|
||||
Results results = dgst.crunch(new CPDListenerImpl());
|
||||
System.out.println("Crunching complete, " + (System.currentTimeMillis()-start) + " elapsed ms");
|
||||
|
||||
|
@ -43,9 +43,9 @@ public class DCPDWorker {
|
||||
public void jobAdded(Job job) {
|
||||
try {
|
||||
currentJob = job;
|
||||
System.out.println("Received a job " + job.name + " , id is " + job.id.intValue());
|
||||
System.out.println("Received a job " + currentJob.name + ", id is " + currentJob.id.intValue());
|
||||
|
||||
tsw = (TokenSetsWrapper)space.read(new TokenSetsWrapper(null, job.id), null, 100);
|
||||
tsw = (TokenSetsWrapper)space.read(new TokenSetsWrapper(null, currentJob.id), null, 100);
|
||||
System.out.println("Read a TokenSetsWrapper with " + tsw.tokenSets.size() + " token lists");
|
||||
|
||||
while (true) {
|
||||
|
@ -1,58 +0,0 @@
|
||||
package net.sourceforge.pmd.dcpd;
|
||||
|
||||
import net.jini.space.JavaSpace;
|
||||
import net.jini.core.lease.Lease;
|
||||
import net.jini.core.discovery.LookupLocator;
|
||||
import net.jini.core.lookup.ServiceRegistrar;
|
||||
import net.jini.core.lookup.ServiceMatches;
|
||||
import net.jini.core.lookup.ServiceTemplate;
|
||||
import net.jini.core.entry.Entry;
|
||||
import net.jini.core.entry.UnusableEntryException;
|
||||
import net.sourceforge.pmd.cpd.*;
|
||||
|
||||
import java.rmi.*;
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class Test {
|
||||
|
||||
|
||||
public static class Message implements Entry {
|
||||
public String content;
|
||||
public Message() {}
|
||||
public Message(String in) {
|
||||
content = in;
|
||||
}
|
||||
public String toString() {
|
||||
return "Message:"+content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Test() {
|
||||
try {
|
||||
JavaSpace space = Util.findSpace(Util.SPACE_SERVER);
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
System.out.println("WRITING");
|
||||
space.write(new Message("howdy"), null, Lease.FOREVER);
|
||||
long stop = System.currentTimeMillis();
|
||||
System.out.println("that took " + (stop - start) + " milliseconds");
|
||||
|
||||
start = System.currentTimeMillis();
|
||||
System.out.println("TAKING");
|
||||
Message result = (Message)space.take(new Message(), null, Long.MAX_VALUE);
|
||||
System.out.println("result = " + result.toString());
|
||||
stop = System.currentTimeMillis();
|
||||
System.out.println("that took " + (stop - start) + " milliseconds");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Test();
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@ public class TileHarvester {
|
||||
if (i>0) {
|
||||
nextExpansion = (TileWrapper)space.take(new TileWrapper(null,
|
||||
null,
|
||||
firstExpansion.jobID,
|
||||
job.id,
|
||||
TileWrapper.DONE,
|
||||
null,
|
||||
new Integer(originalPosition),
|
||||
|
Reference in New Issue
Block a user