text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void process() {
int taskNum = 0;
List<PWMWithThreshold> thresholds = collectThreshold();
Collections.sort(thresholds, new Comparator<PWMWithThreshold>() {
@Override
public int compare(PWMWithThreshold o1, PWMWithThreshold o2) {
return o1.pwm.getName().compareTo(o2.pwm.getName());... | 6 |
private void makePrefab(){
prefab = new Prefab(x1, y1, x2, y2);
boolean found = true;
int filenumber = 0;
String pathTag = "HousePrefab";
String path = "";
do {
path = "data/" + pathTag + String.valueOf(filenumber) + ".pfb";
File f = new File(path);
if (!f.isFile()){
found = false;
} else... | 3 |
private static void selectDB() throws Exception {
int menuChoice;
do {
System.out
.println("*** Willkommen zu " + NAME + " " + VERSION + " ***\n\n"
+ "Welche Datenbankzugriffsart möchten sie nutzen? \n\n"
+ "1 SQL-D... | 9 |
private int swim(int i)
{
Key t = pq[i]; // Save key for later restoring
while (i > 1 && less(pq[i / 2], pq[i]))
{
// exch(pq, i / 2, i);
pq[i] = pq[i / 2]; // half exchanges
i = i / 2;
}
pq[i] = t; // restore key
return i;
} | 2 |
public Geometry<T> add(T elements)
{
coordinates.add(elements);
return this;
} | 0 |
public static void main(String[] args) {
String q = "howdy";
System.out.println(q); // howdy
String qq = upcase(q);
System.out.println(qq); // HOWDY
System.out.println(q); // howdy
} | 0 |
public void messageBroadcasted(final Blackboard.BlackboardMessage message)
{
if (message instanceof MatrixPatch)
{
final MatrixPatch patch = (MatrixPatch)message;
synchronized (queuedPatches)
{
queuedPatches.offerLast(patch);
queuedPatches.notifyAll();
}
}
else if (message instanceof Loc... | 9 |
public static boolean heuristicAcronymP(String itemstring) {
{ boolean letterfoundP = false;
boolean numberfoundP = false;
{ char c = Stella.NULL_CHARACTER;
String vector000 = itemstring;
int index000 = 0;
int length000 = vector000.length();
for (;index000 < length000; ... | 7 |
public void setZeroes(int[][] matrix) {
int[] rows = new int[matrix.length];
int[] cols = new int[matrix[0].length];
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < matrix[0].length; j++) {
if (matrix[i][j] == 0) {
rows[i] = 1;
cols[j] = 1;
}
}
}
for (int i = 0; i < rows.... | 9 |
private void solve() {
if (isAllOnes()) {
minimisedExpression = "1";
} else {
if (isAllZero())
minimisedExpression = "0";
else {
arrayList = new ArrayList<KarnaughNode>();
for (int i = 0; i < kmap.getRow(); i++) {
for (int j = 0; j < kmap.getColumn(); j++) {
if (kmap.getCellValue(i,... | 5 |
public void schedule(Runnable childStatement) {
executor.submit(childStatement);
} | 0 |
@Override
public void writeTo(WordWriter out)
throws IOException {
WordReader in = new WordReader(new FileInputStream(file), littleEndian);
int wordsWritten = 0;
try {
int word;
while(true) {
word = in.readWord();
if(word == -1)... | 3 |
private Chunk getChunk(int x, int z)
{
for(int i = chunks.size() - 1; i > 0; i--)
if(chunks.get(i).getX() == x && chunks.get(i).getZ() == z)
if(i < chunks.size() && i >= 0)
return chunks.get(i);
return null;
} | 5 |
public List[] getReplacements(String symbol) {
List[] toReturn = (List[]) symbolToReplacements.get(symbol);
return toReturn == null ? EMPTY_LIST : toReturn;
} | 1 |
public static void main(String[] args) {
String text;
int k = 0;
if (args.length == 1) {
k = Integer.parseInt(args[0]);
}
System.out.print("Enter string: ");
Scanner s = new Scanner(System.in);
text = s.nextLine();
MyHashMap<String, Markov> hash = new MyHashMap<String, Markov>();
int distinct = 0;
for (... | 8 |
static public void statisticMonth(){
Statement stmt = null;
ResultSet rs = null;
for(int month = 1; month <=12; month ++)
try {
String monthStr = "" + month;
if(month < 10) monthStr = "0" + monthStr;
stmt = conn.createStatement();
String sqlTxt = "select count(*) as cnt from tweet_2011_" ... | 9 |
static String escapeStringForASCII(String s) {
String out = "";
char[] cArray = s.toCharArray();
for (int i = 0; i < cArray.length; i++) {
char c = cArray[i];
if (c > 127) {
//non-ASCII Unicode
out += "\\U";
String hex = Int... | 9 |
private static ConfigurableConnectionText goodLocation( PathedGraphConnection connection, float j ) {
if( j == 0 ) {
ConfigurableConnectionText text = new ConfigurableConnectionText( connection );
text.setText( "Source" );
text.setPosition( TextStrategyFactory.positionNearSource() );
text.setAngle( TextSt... | 2 |
public void caretUpdate(CaretEvent e) {
boolean boldFound = false;
boolean italicFound = false;
boolean underlineFound = false;
int dot = e.getDot();
int mark = e.getMark();
if (dot == mark) {
wordProcessor.copy.setEnabled(false);
wordProcessor.cut.setEnabled(false);
boldFound = checkS... | 5 |
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final TDatsriPK other = (TDatsriPK) obj;
if (!Objects.equals(this.transNo, other.transNo)) {
return... | 4 |
private void drawEdges(Graphics2D g2, List<Edge> edges, boolean drawBorder, int zoomLevelToDrawName, BasicStroke roadStroke, BasicStroke borderStroke, Color roadColor, Color borderColor)
{
for (Edge edge : edges)
{
double x1 = edge.getFromNode().getxCoord();
double y1 = edge.getFromNode().getyCoord();
dou... | 6 |
public static Forme I() {
ArrayList<Vecteur> liste = new ArrayList<>();
liste.add(new Vecteur(0, 0));
liste.add(new Vecteur(0, 1));
liste.add(new Vecteur(0, 2));
liste.add(new Vecteur(0, 3));
Vecteur<Integer> _centre = new Vecteur(0, 1);
return new Forme("I", lis... | 0 |
public String[][] fileReadIn(String fileDirectory) throws IOException{
ToolBag tool = new ToolBag();
BufferedReader fileReader = null;
try {
fileReader = new BufferedReader(
new InputStreamReader(getClass().getResourceAsStream(fileDirectory)));
} catch (NullPointerException propertiesReaderNPE) {
try... | 7 |
public static void close(){
clearCache();
for(String id : staticClips.keySet()){
stop(id);
staticClips.get(id).close();
}
staticClips.clear();
} | 1 |
public String getDesignacao() {
return designacao;
} | 0 |
public void open() {
Display display = Display.getDefault();
createContents();
shlPoliciesList.open();
shlPoliciesList.layout();
while (!shlPoliciesList.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
} | 2 |
public static void makeNextWhiteMoves(){
boolean incorrectOption = true;
while(incorrectOption)
{
Move move = UserInteractions.getNextMove(Player.white);
if (CheckValidMoveForWhiteHuman(move.initialRow, move.initialCol,
move.finalRow, move.finalCol... | 2 |
@Test
public void TestCustomConnectionParameters() {
RequestConfig reqC = RequestConfig.custom()
.setSocketTimeout(10) // 1/100 of a second in miliseconds
.setConnectTimeout(10) // 1/100 of a second in miliseconds
.build();
HttpClient client = HttpClients.... | 2 |
private void findMinimalDistances(Vertex node) {
List<Vertex> adjacentNodes = getNeighbors(node);
Vertex lasttarget = null;
for (Vertex target : adjacentNodes) {
System.out.println("target.toString() " + target.toString());
if (getShortestDistance(target) > getShortestDi... | 6 |
public OptionFileMenu(final boolean ouvrir) {
setPreferredSize(new java.awt.Dimension(600,400));
final JFileChooser arbre = new JFileChooser();
if(ouvrir) {
setTitle("Ouvrir...");
} else {
setTitle("Enregistrer...");
arbre.setApproveButtonText("Sauvegarder");
}
getContentPane().add(arbre);
arb... | 5 |
@Override
public void act() {
if (canMove()) {
if (head.getSteps() == 0) {
oldDirection = direction;
direction = head.getDirection();
}
switch (direction) {
case NORTH:
this.animation = upAnimation;
... | 9 |
public Shape addItem(Shape item) {
if (item == null) {
return null;
}
items.add(item);
repaint();
return item;
} | 1 |
private void getTimerPage(HttpServletResponse response, UserSession session, Map<String, Object> pageVariables) throws ServletException, IOException {
Long userId = (session != null) ? session.getId() : null;
if (userId != null) {
pageVariables.put("time", new Date().toString());
... | 2 |
private int getLevenshteinDistance(String s, String t) {
if (s == null || t == null) {
throw new IllegalArgumentException("Can not deal with null strings");
}
if (s.length() == 0) return t.length();
if (t.length() == 0) return s.length();
int n = s.length();
int m = t.length();
int d[][] = new int[... | 9 |
public Piece(TorrentByteStorage bucket, int index, int offset, int length,
byte[] hash) {
this.bucket = bucket;
this.index = index;
this.offset = offset;
this.length = length;
this.hash = hash;
// Piece is considered invalid until first check.
this.valid = false;
// Piece start unseen
this.seen =... | 0 |
public void setLocationManually(Point point) {
moving = true;
myAutoPoint = point;
if(myView != null){
setLocation(myView.transformFromAutomatonToView(point));
}
} | 1 |
public void Init()
{
Decoder.InitBitModels(Models);
} | 0 |
@EventHandler
public void onPlace(BlockPlaceEvent e) {
Player player = e.getPlayer();
Location loc = e.getBlockAgainst().getLocation();
if (e.getBlockAgainst().getType() == Material.SIGN
|| e.getBlockAgainst().getType() == Material.SIGN_POST
|| e.getBlockAgainst().getType() == Material.WALL_SIGN) {
... | 5 |
public ListNode reverseKGroup(ListNode head, int k) {
if (k <= 1 || head == null) {
return head;
}
ListNode lastTail = null;
ListNode tail = head;
int count = 0;
Stack<ListNode> stack = new Stack<ListNode>();
while (tail != null) {
stack.push(tail);
tail = tail.next;
count++;
if (count >= k... | 6 |
boolean detectNegation() {
for (int i = 0; i < elements.length; i++) {
//termes permettant de valider une négation
if (Pattern.matches("ne|pas|jamais|rien|aucun|aucune|n|impossible|moins|peu", elements[i])) {
// expression regulière
return true;
... | 6 |
@Override
public TKey getKey() {
return _key;
} | 0 |
public static UnitTag getName(char tag) {
if (mapping == null) {
mapping = new HashMap<Character, UnitTag>();
for (UnitTag ut : values()) {
mapping.put(ut.tag, ut);
}
}
return mapping.get(tag);
} | 2 |
public boolean addStudent(Student stu) {
String insert = "INSERT INTO STUDENT VALUES(?,?,?,?,?,?,?)";
int n = 0;
try {
PreparedStatement ps = conn.prepareStatement(insert);
ps.setString(1, stu.no);
ps.setString(2, stu.name);
ps.setString(3, stu.sex);
ps.setDate(4, stu.birthday);
ps.setString(5, ... | 1 |
public Command getCommand(int commandCode) throws Exception
{
Class<? extends Command> cls = dictCodeToClass.get(commandCode);
if(cls == null )
throw new UnknownCommandException();
return cls.newInstance();
} | 2 |
public static void main(String[] args) {
// -------------------------Initialize Job Information------------------------------------
String startJobId = "job_201301181454_0001";
//String startJobId = "job_201212172252_0001";
//String jobName = "uservisits_aggre-pig-256MB";
//String jobName = "SampleWordCountWi... | 5 |
public static StationDAO getInstance(Connection conn){
if(instance == null)
instance = new StationDAO(conn);
return instance;
} | 1 |
public boolean equals(Object obj) {
if (obj == this) { // simple case
return true;
}
// now try to reject equality...
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof XYDrawableAnnotation)) {
return false;
... | 8 |
private void render(){
BufferStrategy bs = this.getBufferStrategy();
if(bs == null){
this.createBufferStrategy(3);
return;
}
Graphics graphic = bs.getDrawGraphics();
graphic.setColor(Color.black);
graphic.fillRect(0, 0, getWidth(), getHeight());
obejectHandler.render(graphic);
... | 1 |
private byte[] encrypt(EncryptableObject o, Key key) throws Exception{
String Algrithem;
if(key instanceof PublicKey){Algrithem = "RSA";}
else{Algrithem = "AES";}
ByteArrayInputStream i = new ByteArrayInputStream(o.toByteArray());
Cipher cipher = Cipher.getInstance(Algrithem);
cipher.init(Cipher.ENCRYPT_MOD... | 2 |
public Games()
{
super(new BorderLayout());
addGame(Zombies.class);
addGame(Testing.class);
addGame(Monsters.class);
addGame(AsteroidMission.class);
addGame(PolyCreator.class);
setBackground(Save.PLAYER_COLOR);
final JPanel topRow = new JPanel();
topRow.setBackground(Save.PLAYER_COLOR);
topRow.se... | 5 |
public static int reverseBits(int n) {
for (int i = 0; i < 16; i++) {
int j = 31 - i;
int a = n & (1 << i);
int b = n & (1 << j);
if ((0 == a && 0 == b) || (0 != a && 0 != b)) continue;
n = n ^ (1 << i);
n = n ^ (1 << j);
}
return n;
} | 5 |
public void report_error(String message, Object info)
{
System.err.print(message);
System.err.flush();
if (info instanceof Symbol)
if (((Symbol)info).left != -1)
System.err.println(" at character " + ((Symbol)info).left +
" of input");
else System.err.println("");
else System.err.p... | 2 |
protected void fireClientConnectEvent(ConnectOnServerEvent evt) {
if (clientConnectListenerList != null) {
Object[] listeners = clientConnectListenerList.getListenerList();
for (int i=0; i<listeners.length; i+=2) {
if (listeners[i]==ConnectOnServerListener.class) {
((ConnectOnServerLis... | 3 |
public void alignBottom(ArrayList<Element> selectedElements) {
/* Most lowest */
int minBottom = Integer.MIN_VALUE;
int currentBottom = 0;
for (Element e : selectedElements) {
if (e instanceof AbsPlace) {
AbsPlace a = (AbsPlace) e;
currentBotto... | 9 |
public String toString ()
{
StringBuffer buf = new StringBuffer (20);
buf.append ("usb");
buf.append ('-');
buf.append (busId);
if (port.length != 0) {
buf.append ('-');
for (int i = 0; i < port.length; i++) {
if (i != 0)
buf.append ('.');
// workaround for kjc 1.0.6 bug where
// port[i]... | 3 |
public static ActionStatusEnumeration fromString(String v) {
if (v != null) {
for (ActionStatusEnumeration c : ActionStatusEnumeration.values()) {
if (v.equalsIgnoreCase(c.toString())) {
return c;
}
}
}
throw new IllegalArgumentException(v);
} | 3 |
public void opRel(){
int op = stop.pop();
switch (op) {
case EGAL : iegal();
break;
case DIFFERENT : idiff();
break;
case INF : iinf();
break;
case INFOUEG : iinfegal();
break;
case SUP : isup();
break;
case SUPOUEG : isupegal();
break;
default : System.out.println("erreur ... | 6 |
@Override
public void run() {
String data = this.plugin.getFileMan().read(this.plugin.chatFile());
JSONArray jArray;
try {
jArray = (JSONArray) new JSONParser().parse(data);
for(int i=0;i<jArray.size();i++){
JSONObject json = (JSONObject) jArray.get(i);
String time = (String) json.get("time");
... | 5 |
public BSplaynForm (ArrayList<Excel> allEx)
{
allex = allEx;
setColoredExes();
} | 0 |
public Command(String command, ClientCluster c){
try{
System.out.println("["+c.getID()+"] "+c.getClient().getUsername()+") " + command);
command = command.replaceFirst("Command ", "");
if(ClientHandler.getDataQueuer().isRealUser(c.getClient())){
if(ClientHandler.getDataQueuer().getUserConfig(c.getClient(... | 6 |
public void visitInnerClassType(final String name) {
if (state != CLASS_TYPE) {
throw new IllegalStateException();
}
CheckMethodAdapter.checkIdentifier(name, "inner class name");
if (sv != null) {
sv.visitInnerClassType(name);
}
} | 2 |
private void startGetSchemaElement(String name, Attributes attrs) {
if (name.equals("slideshow")) {
for (int i = 0; i < attrs.getLength(); i++) {
if (attrs.getQName(i).equals("xsi:noNamespaceSchemaLocation")) {
// get the schema path
String path = attrs.getValue(i);
// ensure unix type file path... | 8 |
final public void GrammarComponent(GrammarSection section, Scope scope) throws ParseException {
ParsedElementAnnotation e;
Annotations a;
a = Annotations();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 5:
case IDENTIFIER:
case ESCAPED_IDENTIFIER:
Definition(section, scope, a);
break;... | 8 |
public void keyPressed(KeyEvent e) {
char keychar = e.getKeyChar();
int keycode = e.getKeyCode();
if (keycode>=0 && keycode < 256) {
keymap[keycode]=true;
lastkey=keycode;
lastkeychar=keychar;
if (wakeup_key==-1 || wakeup_key==keycode) {
if (!eng.isRunning()) {
eng.start();
// key is cle... | 8 |
@Override
public void setCell(int x, int y, boolean live) {
if (y<0 || y>=getHeight()) return;
if (x<0 || x>=getWidth()) return;
if (live)
world[y][x] = 0;
} | 5 |
public static JGSystem getInstance() {
if (instance == null) {
instance = new JGSystem();
}
return instance;
} | 1 |
public static Symbol destructureMethodNameTree(Stella_Object nametree, Object [] MV_returnarray) {
{ Surrogate testValue000 = Stella_Object.safePrimaryType(nametree);
if (testValue000 == Stella.SGT_STELLA_CONS) {
{ Cons nametree000 = ((Cons)(nametree));
if (!Stella_Object.symbolP(nametree0... | 6 |
public static Boolean canUnowned(PermissionFlag flag) {
if (flag.equals(ChunkyPermissions.BUILD))
return getBoolean(UNOWNED_BUILD);
if (flag.equals(ChunkyPermissions.DESTROY))
return getBoolean(UNOWNED_DESTROY);
if (flag.equals(ChunkyPermissions.ITEM_USE))
ret... | 4 |
public boolean exist(ValueType value) {
if (!this.isEmpty()) {
SetElement<ValueType> help = head;
while (help != tail.getNext()) {
if (help.getValue() == value) {
return true;
}
help = help.getNext();
}
... | 3 |
public String[] getInput() {
Scanner inFile = new Scanner(System.in);
System.out.println("\n\t________________________________________________________________________");
System.out.println("\n\t You must enter names for two players before starting a two player game.");
... | 7 |
public void insert(int bno)
{
Node temp, fNode, parent;
temp = new Node(bno);
try
{
if(root == null)
root = temp;
else
{
fNode = root;
while(true)
{
parent = fNode;
if(bno < fNode.getbno())
{
fNode = fNode.getLeft();
if(fNode==null)
{
parent.setLe... | 6 |
public void mouseDragged(MouseEvent e)
{
if(e.getX()>x && e.getX()<x+width)
{
if(e.getY()>y && e.getY()<y+height)
{
selected=true;
}
}
if(selected)
{
mouseX=e.getX();
mouseY=e.getY();
}
} | 5 |
@Override
public void run() {
while (isRunning) {
if (direction == 'u') {
moveCol(-1);
}
if (direction == 'd') {
moveCol(1);
}
if (direction == 'l') {
moveRow(-1);
}
if (dir... | 6 |
public void printAllInterleavingsRecurr(String str1, String str2, String interleaving, int m, int n) {
/* If we used all characters from str1 and there are some left in str2 */
if (m == str1.length() && n < str2.length()) {
System.out.println(interleaving + str2.substring(n));
return;
}
/* If we use... | 6 |
private Type simplePeek(Frame frame) {
Type type = frame.peek();
return (type == Type.TOP) ? frame.getStack(frame.getTopIndex() - 1) : type;
} | 1 |
private void debugPrintMoveList() {
for(int move : moveList) {
switch(move) {
case Move.RIGHT:
System.out.println("right");
break;
case Move.DOWN:
System.out.println("down");
break;
case Move.UP:
System.out.println("up");
break;
case Move.LEFT:
System.out.println("left");
... | 8 |
public void Clear(){
for(int i=0;i<N;i++){
for(int j=0;j<N;j++){
this.block[i][j] = 0;
}
}
} | 2 |
public static long inverseModulo(long a, long m) {
if (a <= 1 || m <= 1 || Num2.euclideEtendu(a, m)[0] != 1) throw new IllegalArgumentException();
long x0 = Num2.euclideEtendu(a, m)[1];
while (x0 < 0) {
x0 += m;
}
return x0;
} | 4 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
@Override
public double getVariance() throws VarianceException {
if (alpha > 2) {
return Math.pow(beta / (alpha - 1), 2) / (alpha - 2);
} else {
throw new VarianceException("InverseGamma variance alpha > 2.");
}
} | 1 |
public String getDescription() {
return description;
} | 0 |
public void sendReply_cgibin_zoomin_cgi(MyHTTPServer socket, List<HTTPRequestData> getData, String cookie) throws Exception
{
List<String> reply = new ArrayList<String>();
addHTTP200(reply, cookie);
addPageHeader(reply, "");
int width = 920;
int height = 150;
String host = null;
HTTPRequestData hostDa... | 8 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
} | 1 |
private void createProperties(){
Properties prop = new Properties();
OutputStream output = null;
String fileName = System.getProperty("user.dir") + "/config/config.properties";
File file = new File(fileName);
//if ( !(file.exists())) {
//Create properties file
File directo... | 4 |
public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new File("students.xml"));
Element root = doc.getDocumentE... | 0 |
private boolean jj_3_49() {
if (jj_3R_68()) return true;
if (jj_3R_66()) return true;
return false;
} | 2 |
private Row[] getViewToModel()
{
if (viewToModel == null)
{
int tableModelRowCount = tableModel.getRowCount();
viewToModel = new Row[tableModelRowCount];
for (int row = 0; row < tableModelRowCount; row++)
{
viewToModel[row] = new Row(row);
}
if (isSorting())
{
Arrays.sort(viewToModel)... | 3 |
void updateSizes( direction d )
{
edge f;
switch( d )
{
case UP:
f = head.leftEdge;
if ( null != f )
f.updateSizes( direction.UP );
f = head.rightEdge;
if ( null != f )
f.updateSizes(direction.UP);
topsize++;
break;
case DOWN:
f = si... | 6 |
public void pop(String function, boolean result)
{
Integer start = startStack.pop();
callStack.pop();
if (traceOn)
{
System.out.println(
"<- " + level-- +
": " + function +
"(" + (result ? "true" : "false") +
",s=" + start +
",l=" + (index - start) + ... | 7 |
private int handleCH(String value,
DoubleMetaphoneResult result,
int index) {
if (index > 0 && contains(value, index, 4, "CHAE")) { // Michael
result.append('K', 'X');
return index + 2;
} else if (conditionCH0(value, index)) {... | 6 |
public static void main(String[] args) {
make_translate();
String delimiter = "\t";
String infile = "C:\\Users\\kbaas.000\\Documents\\autoredistrict_data\\vtd_data.txt";
String outfile = "C:\\Users\\kbaas.000\\Documents\\autoredistrict_data\\vtd_data_out.txt";
Vector<String[]> records = readDelimited(ne... | 8 |
public JButton getConnect4Button() {
boolean test = false;
if (test || m_test) {
System.out.println("GameSelecter :: getConnect4Button() BEGIN");
}
if (test || m_test) {
System.out.println("GameSelecter :: getConnect4Button() END");
}
return m_conn... | 4 |
final void s(int i) {
anInt5445++;
if (aClass290_5520 != null)
((Class290) aClass290_5520).aBoolean3709
= Class264.method2015(i, anInt5472, 7);
if (aClass290_5460 != null)
((Class290) aClass290_5460).aBoolean3709
= Class183.method1379(4, anInt5472, i);
if (aClass290_5482 != null)
((Class290) aCla... | 6 |
public void executeSQL(String sql) {
if (conn == null)
return;
try {
Statement stmt = null;
if (sql.contains("?") && handler != null) {
PreparedStatement pstmt = conn.prepareStatement(sql);
handlerCall(pstmt);
stmt = pstmt;
} else {
stmt = conn.createStatement();
}
if (stmt instanc... | 9 |
public Villager makeBaby(){
if(village.getPopulation() <= village.getMAX_POP()){ //there is room
if(!dude){ //girl
if(kids <= MAX_BABIES){ //if less than the maximum amount of babies
if(health > 18 && health < 60){ //18 - 60
if(babyCoolDown == 0){ //wants kids
if(villag... | 8 |
public static boolean doLauncherUpdate(Stack<String> updateQueue, JSONObject versionsConfig) {
Logger.info("Updater.doLauncherUpdate", "Starting update...");
//Show progress
GlobalDialogs.showProgressDialog();
GlobalDialogs.setProgressCaption("Cleaning...");
Glo... | 6 |
public TextResourceFile(String filename) {
is = ClassLoader.getSystemResourceAsStream(filename);
if (is == null)
throw new MissingResourceException(filename, null, null);
} | 1 |
public void processLeft(Stack<XPathContext> contextStack, Stack state) throws XPathException {
XPathContext context = contextStack.peek();
final Controller controller = context.getController();
XPathContext c2 = context.newMinorContext();
c2.setOrigin(this);
Result result;
... | 9 |
private void setGeneratorsToPopulation() {
if (mapAdders != null) {
for (int i = 0; i < mapAdders.length; i++) {
mapAdders[i].stopAdding();
}
}
List<GeneratorIndividual<T>> individuals = gaPop.getIndividuals();
mapAdders = new CloudMapThread[generators.size()];
for (int i = 0; i < generators.size();... | 3 |
public String getMethodAccessor(String name, String desc, String accDesc,
MethodInfo orig)
throws CompileError
{
String key = name + ":" + desc;
String accName = (String)accessors.get(key);
if (accName != null)
return accName; // al... | 6 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.