repo
stringlengths
1
191
file
stringlengths
23
351
code
stringlengths
0
5.32M
file_length
int64
0
5.32M
avg_line_length
float64
0
2.9k
max_line_length
int64
0
288k
extension_type
stringclasses
1 value
repositoryminer
repositoryminer-master/repositoryminer-metrics/src/main/java/org/repositoryminer/metrics/codemetric/NOAV.java
package org.repositoryminer.metrics.codemetric; import org.repositoryminer.metrics.ast.AST; import org.repositoryminer.metrics.ast.AbstractMethod; import org.repositoryminer.metrics.ast.AbstractType; import org.repositoryminer.metrics.report.ClassReport; import org.repositoryminer.metrics.report.FileReport; import org...
1,450
34.390244
96
java
repositoryminer
repositoryminer-master/repositoryminer-metrics/src/main/java/org/repositoryminer/metrics/codemetric/AMW.java
package org.repositoryminer.metrics.codemetric; import java.math.BigDecimal; import org.repositoryminer.metrics.ast.AST; import org.repositoryminer.metrics.ast.AbstractType; import org.repositoryminer.metrics.report.ClassReport; import org.repositoryminer.metrics.report.FileReport; import org.repositoryminer.metrics....
1,269
30.75
93
java
repositoryminer
repositoryminer-master/repositoryminer-metrics/src/main/java/org/repositoryminer/metrics/codemetric/ATFD.java
package org.repositoryminer.metrics.codemetric; import java.util.HashSet; import java.util.Set; import org.repositoryminer.metrics.ast.AST; import org.repositoryminer.metrics.ast.AbstractFieldAccess; import org.repositoryminer.metrics.ast.AbstractMethod; import org.repositoryminer.metrics.ast.AbstractMethodInvocation...
2,409
31.567568
85
java
repositoryminer
repositoryminer-master/repositoryminer-metrics/src/main/java/org/repositoryminer/metrics/codemetric/WMC.java
package org.repositoryminer.metrics.codemetric; import org.repositoryminer.metrics.ast.AST; import org.repositoryminer.metrics.ast.AbstractMethod; import org.repositoryminer.metrics.ast.AbstractType; import org.repositoryminer.metrics.report.ClassReport; import org.repositoryminer.metrics.report.FileReport; import org...
1,201
30.631579
85
java
repositoryminer
repositoryminer-master/repositoryminer-metrics/src/main/java/org/repositoryminer/metrics/codemetric/CodeMetricId.java
package org.repositoryminer.metrics.codemetric; public enum CodeMetricId { ATFD, CYCLO, LVAR, MAXNESTING, MLOC, NOM, NOA, NOAV, PAR, LOC, TCC, WMC, AMW, DIT, NProtM, BOvR, BUR, WOC, NOPA, NOAM, LAA, FDP; }
209
29
129
java
repositoryminer
repositoryminer-master/repositoryminer-metrics/src/main/java/org/repositoryminer/metrics/codemetric/MetricFactory.java
package org.repositoryminer.metrics.codemetric; public class MetricFactory { public static CodeMetric getMetric(CodeMetricId id) { switch (id) { case AMW: return new AMW(); case ATFD: return new ATFD(); case CYCLO: return new CYCLO(); case FDP: return new FDP(); case LAA: return new LAA();...
815
16
54
java
repositoryminer
repositoryminer-master/repositoryminer-excomment/src/main/java/org/repositoryminer/excomment/ExCommentConfig.java
package org.repositoryminer.excomment; public class ExCommentConfig { private String reference; private String commentsCSV; private String patternsCSV; private String heuristicsCSV; private char delimiter = ';'; public ExCommentConfig() { } public ExCommentConfig(String reference, String commentsCSV, String...
1,504
20.197183
105
java
repositoryminer
repositoryminer-master/repositoryminer-excomment/src/main/java/org/repositoryminer/excomment/ExCommentCSVReader.java
package org.repositoryminer.excomment; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVRecord; im...
3,769
29.650407
117
java
repositoryminer
repositoryminer-master/repositoryminer-excomment/src/main/java/org/repositoryminer/excomment/RepositoryMinerExComment.java
package org.repositoryminer.excomment; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map.Entry; import org.bson.Document; import org.repositoryminer.RepositoryMinerException; import org.repositoryminer.domain.Commit; import org.repositoryminer.excomment.model.Comment;...
2,494
33.652778
100
java
repositoryminer
repositoryminer-master/repositoryminer-excomment/src/main/java/org/repositoryminer/excomment/persistence/ExCommentDAO.java
package org.repositoryminer.excomment.persistence; import java.util.List; import org.bson.Document; import org.bson.conversions.Bson; import org.repositoryminer.persistence.GenericDAO; import com.mongodb.BasicDBObject; import com.mongodb.client.model.Filters; public class ExCommentDAO extends GenericDAO { private...
925
25.457143
77
java
repositoryminer
repositoryminer-master/repositoryminer-excomment/src/main/java/org/repositoryminer/excomment/model/Comment.java
package org.repositoryminer.excomment.model; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.bson.Document; public class Comment { private int id; private double totalPattern; private double totalHeuristic; private double totalScore; private String comment; private S...
2,755
20.038168
102
java
repositoryminer
repositoryminer-master/repositoryminer-excomment/src/main/java/org/repositoryminer/excomment/model/Heuristic.java
package org.repositoryminer.excomment.model; import java.util.ArrayList; import java.util.List; import org.bson.Document; public class Heuristic { private String description; private int status; private double score; public static List<Document> toDocumentList(List<Heuristic> heuristics) { List<Document> do...
1,226
17.876923
74
java
repositoryminer
repositoryminer-master/repositoryminer-excomment/src/main/java/org/repositoryminer/excomment/model/Pattern.java
package org.repositoryminer.excomment.model; import java.util.ArrayList; import java.util.List; import org.bson.Document; public class Pattern { private String name; private double score; private String clazz; private String theme; private String tdType; public static List<Document> toDocumentList(List<Patte...
1,523
16.517241
87
java
null
Project_CodeNet-main/tools/analysis-graph-generator/src/main/java/com/ibm/wala/codeNet/DFSOrderGenerator.java
package com.ibm.wala.codeNet; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Iterator; import java.util.Map; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener; import com.ibm.wala.util.collections.HashMapFactory; ...
1,308
27.456522
131
java
null
Project_CodeNet-main/tools/analysis-graph-generator/src/main/java/com/ibm/wala/codeNet/GraphAugmentor.java
package com.ibm.wala.codeNet; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.util.Map; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener; import com.ibm.wala.cast.java.ecj.util.SourceDirCallGraph; impo...
5,034
37.143939
145
java
null
Project_CodeNet-main/tools/analysis-graph-generator/src/main/java/com/ibm/wala/codeNet/GraphGenerator.java
package com.ibm.wala.codeNet; import java.io.FileWriter; import java.io.IOException; import java.util.Comparator; import java.util.LinkedList; import java.util.List; import java.util.Map.Entry; import java.util.SortedSet; import java.util.Spliterator; import java.util.Spliterators; import java.util.TreeSet; import jav...
4,238
29.941606
145
java
null
Project_CodeNet-main/tools/analysis-graph-generator/src/main/java/com/ibm/wala/codeNet/NodeFinder.java
package com.ibm.wala.codeNet; import java.io.FileReader; import java.io.IOException; import java.util.Comparator; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParse...
3,007
28.203883
107
java
null
Project_CodeNet-main/tools/analysis-graph-generator/src/main/java/com/ibm/wala/codeNet/WalaSPTGraph.java
package com.ibm.wala.codeNet; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.stream.Stream; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener; ...
5,583
25.590476
96
java
null
Project_CodeNet-main/tools/analysis-graph-generator/src/main/java/com/ibm/wala/codeNet/WalaToGNNFiles.java
package com.ibm.wala.codeNet; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.PrintWriter; import java.io.Serializable; import java.io.UTFData...
15,496
32.326882
156
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/SPTGenerator.java
package com.ibm.ai4code.parser; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.util.BitSet; import java.util.List; import javax.management.RuntimeErrorException; import org.antlr.v4.run...
16,234
39.185644
135
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/Tokenizer.java
package com.ibm.ai4code.parser; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; import java.util.List; import javax.management.RuntimeErrorException; import org.antlr.v4....
7,468
35.434146
135
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/Utils.java
package com.ibm.ai4code.parser; import javax.management.RuntimeErrorException; public class Utils { /** * Assuming there is at least one period which seperates the real name and the file extension * return file_name and file_type * @param fileName * @return results[] results[0]: basename (base name without f...
1,575
26.649123
117
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/c/CReservedWordDecider.java
package com.ibm.ai4code.parser.c; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class CReservedWordDecider implements ReservedWordDeciderI{ // cat ckws_orig.txt | grep ":" | cut -d':' -f2 | sed "s/'/\"/g" | sed "s/;/,/g" public static final String [] keywords = { "...
2,071
14.816794
81
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/c_multi/C11ReservedWordDecider.java
package com.ibm.ai4code.parser.c_multi; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class C11ReservedWordDecider implements ReservedWordDeciderI{ // cat ckws_orig.txt | grep ":" | cut -d':' -f2 | sed "s/'/\"/g" | sed "s/;/,/g" public static final String [] keywords ...
2,081
14.89313
81
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cobol/CobolReservedWordDecider.java
package com.ibm.ai4code.parser.cobol; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class CobolReservedWordDecider implements ReservedWordDeciderI{ // grep ":" cobolkws_orig.txt | cut -d':' -f1 | awk '{ print "\""$0"\","}' | sed 's/ //g' | sed 's/_/-/g' // note we rep...
8,909
14.101695
106
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/Args.java
package com.ibm.ai4code.parser.commons; import org.apache.commons.cli.*; public class Args { public static boolean MULTI = false; // use "single" g4 file, or use "multi" g4 file, where we have different toke types public static void parse(CommandLine cmd) { if(cmd.hasOption("multi")) { MULTI = true; } } }
319
25.666667
121
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/CSVUtils.java
package com.ibm.ai4code.parser.commons; import java.io.FileWriter; import java.io.IOException; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVPrinter; public class CSVUtils { private static CSVPrinter printer = null; public static void openFile(String fileName, String ... header) throw...
926
28.903226
169
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/JsonUtils.java
package com.ibm.ai4code.parser.commons; import java.io.File; import java.util.ArrayList; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import java.util.Queue; impor...
7,941
41.698925
154
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/ReservedWordDeciderI.java
package com.ibm.ai4code.parser.commons; public interface ReservedWordDeciderI { public boolean isReserved(String word); }
125
17
40
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/SPT.java
package com.ibm.ai4code.parser.commons; import java.util.Queue; import org.antlr.v4.runtime.Vocabulary; import org.antlr.v4.runtime.tree.ParseTree; /** * Simplified ParseTree * @author weiz * */ public class SPT { private SPTNode root; private Queue<SPTNode> shadowQueue = null; private int numNodes; // weiz 2...
1,757
21.831169
102
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/SPTNode.java
package com.ibm.ai4code.parser.commons; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.Stack; import org.antlr.v4.runtime.tree.TerminalNodeImpl; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Vocabulary; import org.antlr.v4.r...
10,642
27.687332
154
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/TreeNodeIntf.java
package com.ibm.ai4code.parser.commons; import java.util.ArrayList; public interface TreeNodeIntf <T>{ ArrayList<T> getChildren(); }
139
13
39
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/commons/TreePrinter.java
package com.ibm.ai4code.parser.commons; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; public class TreePrinter<T extends TreeNodeIntf<T>> { private T root; private Queue<TreePrinterNode> queue; private Queue<TreePrinterNode> printQueue; public TreePrinter(T root) { this.root ...
1,572
22.477612
57
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cpp/CPPReservedWordDecider.java
package com.ibm.ai4code.parser.cpp; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class CPPReservedWordDecider implements ReservedWordDeciderI{ // cat cpp14kws_orig.txt | grep ":" | cut -d':' -f2 | sed "s/'/\"/g" | sed "s/;/,/g" public static final String [] keywords=...
2,925
16.520958
143
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cpp_multi/CPPReservedWordDecider.java
package com.ibm.ai4code.parser.cpp_multi; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class CPPReservedWordDecider implements ReservedWordDeciderI{ // cat cpp14kws_orig.txt | grep ":" | cut -d':' -f2 | sed "s/'/\"/g" | sed "s/;/,/g" public static final String [] key...
2,931
16.556886
143
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol/CymbolBaseListener.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.tree.ErrorNode; import org.antlr.v4.runtime.tree.TerminalNode; /** * This class provides an empty implementation of {@link CymbolListener}, * which can be extend...
4,224
25.572327
90
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol/CymbolLexer.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.run...
7,028
41.08982
97
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol/CymbolListener.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol; import org.antlr.v4.runtime.tree.ParseTreeListener; /** * This interface defines a complete listener for a parse tree produced by * {@link CymbolParser}. */ public interface CymbolListener extends ParseTreeListener { /** * Enter a pa...
3,496
30.790909
74
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol/CymbolParser.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; import java.util.List; import java.util.Iterator; import java.uti...
28,956
28.368154
228
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol/CymbolReservedWordDecider.java
package com.ibm.ai4code.parser.cymbol; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class CymbolReservedWordDecider implements ReservedWordDeciderI{ public static final String [] keywords = { "float", "int", "void", "if", "then", "else", "return"...
985
16.607143
71
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol/Main.java
package com.ibm.ai4code.parser.cymbol; import org.antlr.v4.runtime.CommonTokenStream; import com.ibm.ai4code.parser.c_multi.C11Parser; public class Main { // public static void tokenize() { // lexer = new CymbolLexer(input); // tokenStream = new CommonTokenStream(lexer); // C11Parser parser = new com.ibm.ai4cod...
664
26.708333
77
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol_multi/CymbolBaseListener.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol_multi; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.tree.ErrorNode; import org.antlr.v4.runtime.tree.TerminalNode; /** * This class provides an empty implementation of {@link CymbolListener}, * which can be ...
4,230
25.610063
90
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol_multi/CymbolLexer.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol_multi; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.*; import org.antlr....
7,034
41.125749
97
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol_multi/CymbolListener.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol_multi; import org.antlr.v4.runtime.tree.ParseTreeListener; /** * This interface defines a complete listener for a parse tree produced by * {@link CymbolParser}. */ public interface CymbolListener extends ParseTreeListener { /** * Ente...
3,502
30.845455
74
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol_multi/CymbolParser.java
// Generated from Cymbol.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol_multi; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; import java.util.List; import java.util.Iterator; import ja...
28,962
28.374239
228
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol_multi/CymbolReservedWordDecider.java
package com.ibm.ai4code.parser.cymbol_multi; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class CymbolReservedWordDecider implements ReservedWordDeciderI{ public static final String [] keywords = { "float", "int", "void", "if", "then", "else", "r...
991
16.714286
71
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol_multi/CymbolTokens.java
// Generated from CymbolTokens.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol_multi; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.*; import org....
7,940
43.363128
97
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/cymbol_multi/Cymbol_lexer_common.java
// Generated from Cymbol_lexer_common.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.cymbol_multi; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.*; impo...
6,823
40.865031
97
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/java/JavaReservedWordDecider.java
package com.ibm.ai4code.parser.java; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class JavaReservedWordDecider implements ReservedWordDeciderI{ //cat *kws_orig.txt | grep ":" | cut -d':' -f2 | sed "s/'/\"/g" | sed "s/;/,/g" public static final String [] keywords= { ...
2,998
21.380597
80
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/java_multi/JavaReservedWordDecider.java
package com.ibm.ai4code.parser.java_multi; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class JavaReservedWordDecider implements ReservedWordDeciderI{ //cat *kws_orig.txt | grep ":" | cut -d':' -f2 | sed "s/'/\"/g" | sed "s/;/,/g" public static final String [] keywor...
3,004
21.425373
80
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python/PythonLexerBase.java
package com.ibm.ai4code.parser.python; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CommonToken; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.Token; import java.util.Stack; public abstract class PythonLexerBase extends Lexer { public static int TabSize = 8; // The am...
5,439
28.405405
127
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python/PythonParserBase.java
package com.ibm.ai4code.parser.python; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.TokenStream; public abstract class PythonParserBase extends Parser { public PythonVersion Version = PythonVersion.Autodetect; protected PythonParserBase(TokenStream input) { super(input); } ...
700
24.962963
84
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python/PythonParserListener.java
// Generated from PythonParser.g4 by ANTLR 4.8 package com.ibm.ai4code.parser.python; import org.antlr.v4.runtime.tree.ParseTreeListener; /** * This interface defines a complete listener for a parse tree produced by * {@link PythonParser}. */ public interface PythonParserListener extends ParseTreeListener { /** ...
28,334
33.05649
82
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python/PythonReservedWordDecider.java
package com.ibm.ai4code.parser.python; import java.util.HashSet; import com.ibm.ai4code.parser.commons.ReservedWordDeciderI; public class PythonReservedWordDecider implements ReservedWordDeciderI{ // cat *kws_orig.txt | grep ":" | cut -d':' -f2 | sed "s/'/\"/g" | sed "s/;/,/g" public static final String [] keyword...
2,185
16.488
81
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python/PythonVersion.java
package com.ibm.ai4code.parser.python; public enum PythonVersion { Autodetect(0), Python2(2), Python3(3); private final int value; PythonVersion(int value) { this.value = value; } public int getValue() { return value; } }
274
14.277778
38
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python_multi/PythonLexerBase.java
package com.ibm.ai4code.parser.python_multi; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CommonToken; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.Token; import java.util.Stack; public abstract class PythonLexerBase extends Lexer { public static int TabSize = 8; // ...
5,445
28.437838
127
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python_multi/PythonParserBase.java
package com.ibm.ai4code.parser.python_multi; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.TokenStream; public abstract class PythonParserBase extends Parser { public PythonVersion Version = PythonVersion.Autodetect; protected PythonParserBase(TokenStream input) { super(input); ...
706
25.185185
84
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python_multi/PythonTokensLexerBase.java
package com.ibm.ai4code.parser.python_multi; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CommonToken; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.Token; import java.util.Stack; public abstract class PythonTokensLexerBase extends Lexer { public static int TabSize = 8; ...
6,392
32.124352
127
java
null
Project_CodeNet-main/tools/spt-generator/src/com/ibm/ai4code/parser/python_multi/PythonVersion.java
package com.ibm.ai4code.parser.python_multi; public enum PythonVersion { Autodetect(0), Python2(2), Python3(3); private final int value; PythonVersion(int value) { this.value = value; } public int getValue() { return value; } }
280
14.611111
44
java
or-tools
or-tools-master/cmake/samples/java/src/main/java/com/google/ortools/App.java
package com.google.ortools; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
181
12
45
java
or-tools
or-tools-master/cmake/samples/java/src/test/java/com/google/ortools/AppTest.java
package com.google.ortools; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTe...
646
15.589744
46
java
or-tools
or-tools-master/examples/contrib/AllDifferentExcept0.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,141
29.803922
95
java
or-tools
or-tools-master/examples/contrib/AllInterval.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
2,807
28.87234
99
java
or-tools
or-tools-master/examples/contrib/Circuit.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,124
28.481132
100
java
or-tools
or-tools-master/examples/contrib/CoinsGrid.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,159
29.980392
95
java
or-tools
or-tools-master/examples/contrib/CoinsGridMIP.java
/* * Copyright 2017 Darian Sastre [email protected] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
3,337
31.407767
78
java
or-tools
or-tools-master/examples/contrib/ColoringMIP.java
/* * Copyright 2017 Darian Sastre [email protected] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
4,116
31.936
99
java
or-tools
or-tools-master/examples/contrib/CoveringOpl.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,605
32.388889
98
java
or-tools
or-tools-master/examples/contrib/Crossword.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
5,203
27.12973
99
java
or-tools
or-tools-master/examples/contrib/DeBruijn.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
6,031
28.281553
90
java
or-tools
or-tools-master/examples/contrib/Diet.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
2,873
30.23913
90
java
or-tools
or-tools-master/examples/contrib/DietMIP.java
/* * Copyright 2017 Darian Sastre [email protected] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
2,858
31.123596
84
java
or-tools
or-tools-master/examples/contrib/DivisibleBy9Through1.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
5,678
29.697297
98
java
or-tools
or-tools-master/examples/contrib/GolombRuler.java
/** * Copyright (c) 1999-2011, Ecole des Mines de Nantes All rights reserved. Redistribution and use in * source and binary forms, with or without modification, are permitted provided that the following * conditions are met: * * <p>* Redistributions of source code must retain the above copyright notice, this list ...
3,737
41.965517
100
java
or-tools
or-tools-master/examples/contrib/Issue173.java
package com.google.ortools.contrib; import com.google.ortools.Loader; import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; import com.google.ortools.linearsolver.MPSolver; import com.google.ortools.linearsolver.MPVariable; public class Issue173 { public static voi...
1,046
25.846154
94
java
or-tools
or-tools-master/examples/contrib/KnapsackMIP.java
/* * Copyright 2017 Darian Sastre [email protected] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
2,981
33.275862
91
java
or-tools
or-tools-master/examples/contrib/LeastDiff.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
2,986
31.11828
95
java
or-tools
or-tools-master/examples/contrib/MagicSquare.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,615
27.928
99
java
or-tools
or-tools-master/examples/contrib/Map.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,120
32.923913
95
java
or-tools
or-tools-master/examples/contrib/Map2.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
2,795
29.064516
100
java
or-tools
or-tools-master/examples/contrib/Minesweeper.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
5,971
28.564356
99
java
or-tools
or-tools-master/examples/contrib/MultiThreadTest.java
package com.google.ortools.contrib; import com.google.ortools.Loader; import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; import com.google.ortools.linearsolver.MPSolver; import com.google.ortools.linearsolver.MPSolver.OptimizationProblemType; import com.google.orto...
3,747
30.233333
100
java
or-tools
or-tools-master/examples/contrib/NQueens.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,022
27.790476
100
java
or-tools
or-tools-master/examples/contrib/NQueens2.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
2,816
27.454545
91
java
or-tools
or-tools-master/examples/contrib/Partition.java
/** * Copyright (c) 1999-2011, Ecole des Mines de Nantes All rights reserved. Redistribution and use in * source and binary forms, with or without modification, are permitted provided that the following * conditions are met: * * <p>* Redistributions of source code must retain the above copyright notice, this list ...
4,248
39.466667
100
java
or-tools
or-tools-master/examples/contrib/QuasigroupCompletion.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
5,574
26.195122
100
java
or-tools
or-tools-master/examples/contrib/SendMoreMoney.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
2,919
33.352941
95
java
or-tools
or-tools-master/examples/contrib/SendMoreMoney2.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
5,758
31.536723
96
java
or-tools
or-tools-master/examples/contrib/SendMostMoney.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,855
29.848
99
java
or-tools
or-tools-master/examples/contrib/Seseman.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,589
28.42623
100
java
or-tools
or-tools-master/examples/contrib/SetCovering.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,007
29.693878
98
java
or-tools
or-tools-master/examples/contrib/SetCovering2.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,090
28.721154
98
java
or-tools
or-tools-master/examples/contrib/SetCovering3.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,765
30.383333
98
java
or-tools
or-tools-master/examples/contrib/SetCovering4.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,957
30.919355
98
java
or-tools
or-tools-master/examples/contrib/SetCoveringDeployment.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
4,001
30.023256
99
java
or-tools
or-tools-master/examples/contrib/SimpleRoutingTest.java
package com.google.ortools.contrib; import com.google.ortools.Loader; import com.google.ortools.constraintsolver.Assignment; import com.google.ortools.constraintsolver.FirstSolutionStrategy; import com.google.ortools.constraintsolver.RoutingIndexManager; import com.google.ortools.constraintsolver.RoutingModel; import ...
3,427
29.070175
89
java
or-tools
or-tools-master/examples/contrib/StableMarriage.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
6,232
34.214689
102
java
or-tools
or-tools-master/examples/contrib/StiglerMIP.java
/* * Copyright 2017 Darian Sastre [email protected] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
12,315
52.547826
99
java
or-tools
or-tools-master/examples/contrib/Strimko2.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,716
28.975806
100
java
or-tools
or-tools-master/examples/contrib/Sudoku.java
// Copyright 2011 Hakan Kjellerstrand [email protected] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
3,659
29.5
97
java