Skip to content

Commit 5e82023

Browse files
committed
re-factor.
1 parent 739715f commit 5e82023

33 files changed

+553
-559
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Either techniques are painful and finicky.
1111

1212
This repository is a step towards what we hope will be a universal code formatter that uses machine learning to look for patterns in a corpus and to format code using those patterns.
1313

14-
*Holy shit!* It appears to work. Working on a paper to be submitted June 2016. Details therein.
14+
*Whoa!* It appears to work. Working on a paper to be submitted June 2016. Details therein.
1515

1616
## Build complete jar
1717

src/org/antlr/codebuff/Corpus.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
import java.util.Map;
2020
import java.util.Random;
2121

22-
import static org.antlr.codebuff.Dbg.getFilenames;
23-
import static org.antlr.codebuff.Dbg.getLexer;
24-
import static org.antlr.codebuff.Dbg.getParser;
25-
import static org.antlr.codebuff.Dbg.load;
26-
import static org.antlr.codebuff.Dbg.showFileNames;
22+
import static org.antlr.codebuff.Tool.getFilenames;
23+
import static org.antlr.codebuff.Tool.getLexer;
24+
import static org.antlr.codebuff.Tool.getParser;
25+
import static org.antlr.codebuff.Tool.showFileNames;
2726

2827
public class Corpus {
2928
public static final int FEATURE_VECTOR_RANDOM_SEED = 314159; // need randomness but use same seed to get reproducibility
@@ -67,7 +66,7 @@ public Corpus(String rootDir, LangDescriptor language) throws Exception {
6766
this.language = language;
6867
if ( documents==null ) {
6968
List<String> allFiles = getFilenames(new File(rootDir), language.fileRegex);
70-
documents = load(allFiles, language);
69+
documents = Tool.load(allFiles, language);
7170
}
7271
}
7372

0 commit comments

Comments
 (0)