query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
set row counts to print | public NListPrinter showCounts( int showCount ) {
if( showCount > 0 )
this.showCount = showCount;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setTotalsRowCount(int count);",
"void setHeaderRowCount(int count);",
"private void setNumRows(int rows) {\n\t\tnumRows = rows; \n\t}",
"public void setRows(int rows)\n {\n this.rows = rows;\n }",
"public void setRows(int rows) {\n this.rows = rows;\n }",
"public void setRows(In... | [
"0.75003284",
"0.71105784",
"0.69866186",
"0.65432423",
"0.6521522",
"0.65213156",
"0.65213156",
"0.65166974",
"0.6473024",
"0.64561486",
"0.63884014",
"0.6339241",
"0.63379145",
"0.63064396",
"0.6248607",
"0.62127304",
"0.61676425",
"0.61588174",
"0.6139305",
"0.61317015",
"... | 0.0 | -1 |
get max column width to print | public int maxColumnWidth() {
return maxColumnWidth;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMaxWidth() {\n return Integer.MAX_VALUE;\n }",
"public NListPrinter maxColumnWidth( int maxColumnWidth ) {\n if( maxColumnWidth > 0 )\n this.maxColumnWidth = maxColumnWidth;\n return this;\n }",
"public double getMaxWidth() throws PDFNetException {\n/* 657 *... | [
"0.7526453",
"0.745521",
"0.7062773",
"0.69564813",
"0.6883034",
"0.67924464",
"0.67536837",
"0.6700125",
"0.66735786",
"0.65617096",
"0.6530654",
"0.6508351",
"0.6469368",
"0.6467012",
"0.64505136",
"0.6438327",
"0.6433478",
"0.6406975",
"0.63878584",
"0.63222086",
"0.630925... | 0.77462363 | 0 |
set max column width to print | public NListPrinter maxColumnWidth( int maxColumnWidth ) {
if( maxColumnWidth > 0 )
this.maxColumnWidth = maxColumnWidth;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setMaxWidths(Table inputTable) {\n int colsz = inputTable.getColumnSize();\n setInitialWidths(inputTable, colsz);\n List<String> recordKeys = inputTable.getKeyList();\n for (String entry : recordKeys) {\n for (int i = 0; i < colsz; i++) {\n this.colWidth[i] = \n ... | [
"0.688259",
"0.67924446",
"0.6437415",
"0.6372197",
"0.62980914",
"0.6211245",
"0.62033653",
"0.61717355",
"0.616794",
"0.61659205",
"0.61056566",
"0.61051315",
"0.6086722",
"0.6079027",
"0.60527503",
"0.60245293",
"0.6005506",
"0.5980462",
"0.5971372",
"0.59690654",
"0.59535... | 0.75951964 | 0 |
describes the main material used for building | public Building(int yearOfCreation, double cost, double landSpace, String material) {
super(yearOfCreation, cost);
this.landSpace = landSpace;
this.material = material;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String toString() {\n return material;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Material [kd=\" + kd + \", ks=\" + ks + \", kr=\" + kr + \", kt=\" + kt + \", nShininess=\" + nShininess + \"]\";\n\t}",
"public String getMaterial() {\n return material;\n }",
... | [
"0.7015764",
"0.65619075",
"0.65430087",
"0.65430087",
"0.65268934",
"0.6443818",
"0.64226663",
"0.6354916",
"0.6309273",
"0.6244903",
"0.61638707",
"0.6127528",
"0.6116987",
"0.60703266",
"0.6066222",
"0.59981203",
"0.5960911",
"0.59385175",
"0.59284395",
"0.5889943",
"0.587... | 0.56784004 | 35 |
WebDriver browser = getDriver(); Properties prop = getProp(); | @When("^I goto Adoption page and check for unavailability$")
public void gotoAdoptionpageCheckAvailability2() throws Throwable {
ZooHomePage homePage = new ZooHomePage();
homePage.navigateToAdoption();
AdoptionPage adoptPage = new AdoptionPage();
adoptPage.selectStartDate();
adoptPage.checkAvailability2();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\r\n\t PropertyFetcher prop = new PropertyFetcher();\r\n\t \r\n\t \r\n\t \r\n\t \r\nWebDriver driver=new ChromeDriver(); \r\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Kumarshobhitsoni/workspace/SeleniumPractice/chromedriver.exe\");\r\n//System.out.pri... | [
"0.7066088",
"0.6852377",
"0.67626494",
"0.6683267",
"0.66376597",
"0.6607456",
"0.6504492",
"0.6479058",
"0.647391",
"0.6339218",
"0.6273456",
"0.626489",
"0.626489",
"0.62595975",
"0.6223598",
"0.62176734",
"0.6211682",
"0.6187804",
"0.6187804",
"0.6187804",
"0.61693233",
... | 0.0 | -1 |
Constructor for master class Cell object | public Cell(int row, int col, int startingState, int[] neighborRowIndexes,
int[] neighborColIndexes) {
myState = startingState;
myRow = row;
myCol = col;
neighborRowIndex = neighborRowIndexes;
if (hexagon) {
neighborEvenColIndex = new int[]{-1, -1, 0, 1, 0, -1};
neighborOddColIndex = new int[]{-1, 0, 1, 1, 1, 0};
neighborRowIndex = new int[]{0, -1, -1, 0, 1, 1};
} else {
neighborEvenColIndex = neighborColIndexes;
neighborOddColIndex = neighborColIndexes;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Cell(){}",
"public Cell()\n\t{\n\t}",
"public Cell(int col, int row){ // constructor\n this.col = col;\n this.row = row;\n }",
"public DataCell() {\n super();\n }",
"public NotebookCell() {}",
"public Cell ()\n {\n cellStatus = false;\n xCoordinate = 0;\n ... | [
"0.85768306",
"0.8343589",
"0.7798084",
"0.7705892",
"0.7540777",
"0.74264544",
"0.7396409",
"0.73141426",
"0.7226984",
"0.72209525",
"0.7200715",
"0.7177943",
"0.70813125",
"0.70516133",
"0.70394325",
"0.69918495",
"0.69693196",
"0.6959109",
"0.6948891",
"0.69359297",
"0.692... | 0.6660238 | 33 |
Getter method for row and column | public int[] getRowAndCol() {
return new int[]{myRow, myCol};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract T getCell(int row, int column);",
"public int getValue(int row, int column);",
"protected abstract double getCell(\r\n int row,\r\n int col);",
"public int getCol() { return _col; }",
"public int getCell() {\n return this.cell;\n }",
"public int getCol() {\n... | [
"0.78771853",
"0.76446974",
"0.75764257",
"0.7497944",
"0.7390969",
"0.73861337",
"0.7337748",
"0.73202455",
"0.7310304",
"0.728132",
"0.7275461",
"0.7268823",
"0.7267422",
"0.7252607",
"0.72374696",
"0.7213056",
"0.71739286",
"0.7161486",
"0.7112098",
"0.71007293",
"0.709970... | 0.7182281 | 16 |
Returns the states of each neighboring cell | public List<Integer> getNeighborStates(Grid theGrid) {
ArrayList<Integer> neighborStates = new ArrayList();
int[] neighborColIndexForMyRow = getNeighborColIndex();
for (int i = 0; i < neighborColIndexForMyRow.length; i++) {
if (theGrid.isValidIndex(myRow + neighborRowIndex[i], myCol + neighborColIndexForMyRow[i])) {
neighborStates.add(
theGrid.getCell((myRow + neighborRowIndex[i]), (myCol + neighborColIndexForMyRow[i]))
.getCurrentState());
} else if (toroidal) {
int[] newIndexes = getTorodialIndex(theGrid, i);
if (theGrid.isValidIndex(newIndexes[0], newIndexes[1])) {
neighborStates.add(
theGrid.getCell(newIndexes[0], newIndexes[1]).getCurrentState());
}
}
}
return neighborStates;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterable<Board> neighbors() {\n LinkedList<Board> states = new LinkedList<>();\n LinkedList<int[]> neighbors = neighborFinder();\n int[] curr_loc = blankFinder();\n\n for(int[] temp : neighbors){\n tiles[curr_loc[0]][curr_loc[1]] = tiles[temp[0]][temp[1]];\n ... | [
"0.7367908",
"0.72032434",
"0.69768715",
"0.6961383",
"0.68062437",
"0.6802907",
"0.67923087",
"0.6777242",
"0.67304516",
"0.6727589",
"0.6696652",
"0.6596902",
"0.6569724",
"0.6543601",
"0.65181226",
"0.6507251",
"0.6455037",
"0.64379007",
"0.64354247",
"0.64233583",
"0.6397... | 0.75940716 | 0 |
Setter method for cell state | public void setCellState(int newState) {
this.myState = newState;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void setCell(int x, int y, boolean state);",
"public void setCellState(int i, int j, CellState value) {\n switch (value) {\n case ZERO_CELL: {\n int ZERO_MARK = -1;\n field[i][j] = ZERO_MARK;\n break;\n }\n ca... | [
"0.7936696",
"0.7157585",
"0.6946183",
"0.6915247",
"0.68638486",
"0.6780895",
"0.6657596",
"0.6611558",
"0.6533348",
"0.64726007",
"0.6461023",
"0.64177823",
"0.6386324",
"0.6365211",
"0.63560975",
"0.6345944",
"0.6328548",
"0.6289247",
"0.6279247",
"0.6223343",
"0.6223343",... | 0.8146641 | 0 |
Cell type dependent method that changes the current state of the cell | public abstract void update(Grid theOldGrid, Grid theNewGrid); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void setCell(int x, int y, boolean state);",
"public void setCellState(int newState) {\n this.myState = newState;\n }",
"public synchronized void switchCell()\n {\n cellValue = (cellValue == ALIVE) ? DEAD : ALIVE;\n }",
"public void updateDataCell();",
"@Override\r\n\t\t... | [
"0.7591121",
"0.7365273",
"0.7106571",
"0.69865596",
"0.69689703",
"0.69689703",
"0.69440264",
"0.68846107",
"0.68724424",
"0.68664944",
"0.6658249",
"0.65536684",
"0.6518749",
"0.6514072",
"0.65016043",
"0.6423627",
"0.64149696",
"0.63332695",
"0.629967",
"0.62695324",
"0.62... | 0.0 | -1 |
Getter method for the current state of the Cell | public int getCurrentState() {
return myState;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getCell() {\n return this.cell;\n }",
"public Cell getCell() {\n\t\treturn cell;\n\t}",
"int getCellStatus(int x, int y);",
"public State getState() { return model.getState(); }",
"public ArrayList<CellState> getCells() {\n return cells;\n }",
"public TableCell getCell() {\n... | [
"0.7190112",
"0.71161395",
"0.6901899",
"0.68768626",
"0.6795446",
"0.67713594",
"0.6765642",
"0.67645764",
"0.67274547",
"0.67117316",
"0.67022884",
"0.66754425",
"0.6660164",
"0.66538185",
"0.6640801",
"0.6630536",
"0.66121936",
"0.66110915",
"0.66110915",
"0.6607854",
"0.6... | 0.64510584 | 72 |
Getter method for the column indexes for the neighborhood | public int[] getNeighborColIndex() {
if (myRow % 2 == 0) {
return neighborEvenColIndex;
} else {
return neighborOddColIndex;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int[] getNeighborRowIndex() {\n return neighborRowIndex;\n }",
"private int getNIdx() {\n return this.colStartOffset + 7;\n }",
"public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t... | [
"0.77722144",
"0.7118184",
"0.6752888",
"0.6739253",
"0.6674865",
"0.6674865",
"0.6626032",
"0.65566945",
"0.6530664",
"0.6518147",
"0.6511106",
"0.6508471",
"0.6508471",
"0.6508471",
"0.64731365",
"0.6448574",
"0.64428115",
"0.6435366",
"0.6343107",
"0.63337994",
"0.6321445"... | 0.8178054 | 0 |
Getter method for the row indexes for the neighborhood | public int[] getNeighborRowIndex() {
return neighborRowIndex;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int[] getNeighborColIndex() {\n if (myRow % 2 == 0) {\n return neighborEvenColIndex;\n } else {\n return neighborOddColIndex;\n }\n }",
"protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}",
"public abstract int getNeighboursNumber(int index);",
"private int ge... | [
"0.74282587",
"0.6939253",
"0.6931659",
"0.69312316",
"0.6910186",
"0.683274",
"0.6828172",
"0.6725709",
"0.6717248",
"0.6684302",
"0.66739684",
"0.6602293",
"0.6588695",
"0.6588651",
"0.65773773",
"0.656942",
"0.6523068",
"0.6491652",
"0.64064884",
"0.6405221",
"0.6388088",
... | 0.8419858 | 0 |
Setter method for toroidal | public void setToroidal(boolean newStatus) {
toroidal = newStatus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public void setTurtle(TurtleModel t);",
"void setSpeed(RobotSpeedValue newSpeed);",
"public void setLydoTraVe(String lydoTraVe);",
"public abstract void setTurtleRecursive(TurtleModel value);",
"@Override\n\tpublic void setLord(Lord l) {\n\t\t\n\t}",
"@Override\n protected void initialize() {... | [
"0.60591745",
"0.5863019",
"0.58490163",
"0.58263654",
"0.5814771",
"0.5780105",
"0.5770774",
"0.5726693",
"0.56895643",
"0.56661314",
"0.56225663",
"0.56140643",
"0.5610684",
"0.5589658",
"0.5584055",
"0.55683357",
"0.5566363",
"0.55561066",
"0.5552396",
"0.5551736",
"0.5537... | 0.7118725 | 0 |
Setter method for hexagon | public void setHexagon(boolean newStatus) {
hexagon = newStatus;
if (hexagon) {
neighborEvenColIndex = new int[]{-1, -1, 0, 1, 0, -1};
neighborOddColIndex = new int[]{-1, 0, 1, 1, 1, 0};
neighborRowIndex = new int[]{0, -1, -1, 0, 1, 1};
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<HexagonPos> getHexagons() {\n\t\treturn hexagonsPos;\n\t}",
"private static Hexagon createHexagon(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt... | [
"0.575754",
"0.5755528",
"0.56788725",
"0.5548328",
"0.5496882",
"0.548633",
"0.545144",
"0.54314435",
"0.5417165",
"0.5414637",
"0.54133624",
"0.5406473",
"0.54053044",
"0.53866565",
"0.53783405",
"0.535288",
"0.53365964",
"0.5327491",
"0.53033096",
"0.527758",
"0.52620816",... | 0.6753278 | 0 |
/ Inserts a word into the trie. | public void insert(String word) {
char[] w = word.toCharArray();
insert(root, w, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(String word) {\n\t\tTrie curr = this;\n\t\tfor(Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch - 'a'];\n\t\t\t\n\t\t\tif (n == null) {\n\t\t\t\tn = new Trie();\n\t\t\t\tn.isWord = false;\n\t\t\t\tcurr.nodes[ch - 'a'] = n;\n\t\t\t}\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\tcurr.isWo... | [
"0.87780553",
"0.8770245",
"0.8738215",
"0.87221473",
"0.8709556",
"0.8698251",
"0.867189",
"0.8671827",
"0.8662603",
"0.8645099",
"0.8624363",
"0.8621862",
"0.861643",
"0.86147165",
"0.86081797",
"0.85997766",
"0.8599266",
"0.85881746",
"0.85874087",
"0.8576965",
"0.8546654"... | 0.82985264 | 34 |
/ Returns list of words that start with the given prefix. | public LinkedList<String> startsWith(String prefix) {
char[] w = prefix.toCharArray();
TrieNode start = startsWith(root, w, 0);
LinkedList<String> result = new LinkedList<String>();
StringBuilder sb = new StringBuilder();
constructWords(start, prefix, result, sb);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getAllWordsStartingWith(String prefix) {\n prefix = prefix.toUpperCase();\n TrieNode node = root;\n List<String> li = new ArrayList<>();\n for (int i = 0; i < prefix.length(); i++) {\n char ch = prefix.charAt(i);\n if (node.get(ch) == null) {\n ... | [
"0.8652753",
"0.76539505",
"0.7490073",
"0.73376614",
"0.72515064",
"0.7240834",
"0.7067893",
"0.7065691",
"0.70481455",
"0.7015483",
"0.69940823",
"0.695685",
"0.6936269",
"0.6862484",
"0.68257755",
"0.681824",
"0.6770614",
"0.6753743",
"0.6732152",
"0.66841775",
"0.66354555... | 0.79169816 | 1 |
TODO Autogenerated method stub | @Override
public Iterator<? extends SKContact> iterator(long first, long count) {
List<SKContact> data = new ArrayList<SKContact>(contacts);
Collections.sort(data, new Comparator<SKContact>() {
public int compare(SKContact c1, SKContact c2) {
return c1.getFirstName().compareTo(c2.getFirstName());
}
});
return data.subList((int) first, (int) data.size()).iterator();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public long size() {
return contacts.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public IModel model(SKContact object) {
return Model.of(object);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Aca se actualiza la lista de metodos cuando el usuario selecciona una clase. | private void onClasesValueChanged() {
try {
FileInputStream in = new FileInputStream(listaArchivos.getSelectedValue());
CompilationUnit cu = JavaParser.parse(in);
if (listaClases.getSelectedValue() != null)
{
ClassOrInterfaceDeclaration clase = cu.getClassByName(listaClases.getSelectedValue()).get();
List<MethodDeclaration> metodos = clase.getMethods();
List<ConstructorDeclaration> constructores = clase.getConstructors();
String nombres[] = new String[metodos.size() + constructores.size()];
for (int i = 0; i < constructores.size(); i++) {
nombres[i] = constructores.get(i).getName().toString();
}
for (int i = 0; i < metodos.size(); i++) {
nombres[i + constructores.size()] = metodos.get(i).getName().toString();
}
actualizarLista(listaMetodos, nombres);
}
} catch (Exception e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract List<Usuario> seleccionarTodos();",
"private void listarUsuarios() {\r\n \t\r\n \tfor(String usuario : ConfigureSetup.getUsers()) {\r\n \t\tif(!usuario.equals(ConfigureSetup.getUserName()))\r\n \t\t\tlista_usuarios.getItems().add(usuario);\r\n \t}\r\n \t\r\n \t//lista_usuario... | [
"0.6772064",
"0.66706866",
"0.65847176",
"0.65402657",
"0.63614774",
"0.6266352",
"0.62599915",
"0.6231",
"0.62011015",
"0.6100862",
"0.60889906",
"0.6087768",
"0.60743403",
"0.60675627",
"0.6066695",
"0.60505927",
"0.5988165",
"0.5934587",
"0.5910579",
"0.59025204",
"0.58984... | 0.5645356 | 51 |
Get the value of dado2 | public int getDado2() {
return dado2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getDmaValue();",
"public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}",
"public Object getValue(){\n \treturn this.value;\n }",
"public Object getValue()\n {\n\treturn value;\n }",
"Object getValor();",
"public Value getValue(){\n return this.value;\n ... | [
"0.679638",
"0.6396481",
"0.63752043",
"0.628673",
"0.62730974",
"0.6271628",
"0.6240038",
"0.62180215",
"0.6183368",
"0.61818784",
"0.61554617",
"0.61506116",
"0.61309385",
"0.6110842",
"0.6107926",
"0.60953134",
"0.60859036",
"0.607337",
"0.6067235",
"0.60606265",
"0.605472... | 0.73365575 | 0 |
Set the value of dado2 | public void setDado2(int dado2) {
this.dado2 = dado2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDado(Integer dado) {\r\n\t\tthis.dado = dado;\r\n\t}",
"public void setDmaValue(int value);",
"public void setDO(int index, int value) {\n\t\tmIKar07Lib.setDigitalOutput(index, value);\n\t}",
"public abstract double set\r\n ( DataID dID // input\r\n , double value // input\r\n );",
... | [
"0.66296464",
"0.65710014",
"0.6396752",
"0.6384271",
"0.63789845",
"0.62954104",
"0.6224422",
"0.6120536",
"0.6104566",
"0.6067454",
"0.6032755",
"0.6029186",
"0.5976856",
"0.5950094",
"0.5948834",
"0.59427404",
"0.5896423",
"0.5885269",
"0.58731854",
"0.5859336",
"0.5858305... | 0.72199017 | 0 |
Get the value of dado1 | public int getNumero() {
return dado1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getDado2() {\n return dado2;\n }",
"public int getd1() {\n\t\treturn d1;\n\t}",
"public int getDmaValue();",
"public int getData1() {\n return data1_;\n }",
"public int getData1() {\n return data1_;\n }",
"public int getData1() {\n return data1_;\n }",
"... | [
"0.7653454",
"0.69749886",
"0.6609389",
"0.63290256",
"0.63290256",
"0.62960136",
"0.62960136",
"0.6221976",
"0.62012935",
"0.61983234",
"0.619812",
"0.60882866",
"0.6035338",
"0.602682",
"0.5963548",
"0.5934562",
"0.5907308",
"0.58966917",
"0.58927536",
"0.5875785",
"0.58738... | 0.7024421 | 1 |
Set the value of dado1 | public void setNumero(int numero) {
this.dado1 = numero;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDado2(int dado2) {\n this.dado2 = dado2;\n }",
"public void setDado(Integer dado) {\r\n\t\tthis.dado = dado;\r\n\t}",
"public int getDado2() {\n return dado2;\n }",
"public void setDmaValue(int value);",
"public void setDx(double dx1) {\n this.dx = dx1;\n }",
... | [
"0.71890366",
"0.71344227",
"0.638939",
"0.6283599",
"0.6206961",
"0.61963993",
"0.61395115",
"0.61093974",
"0.6058965",
"0.60421705",
"0.5943182",
"0.594168",
"0.59206474",
"0.58792067",
"0.5848418",
"0.5839753",
"0.57849425",
"0.5728686",
"0.57277256",
"0.57214504",
"0.5721... | 0.66286504 | 2 |
Returns a copy of this.Area | public double get_Area() {
return this.Area;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Rectangle getArea() {\n return area;\n }",
"public Poi ToArea()\r\n {\r\n this.lat = PoiManager.roundToHalfDown(this.lat);\r\n this.lon = PoiManager.roundToHalfDown(this.lon);\r\n return this;\r\n }",
"public String getArea() {\n return this.area;\n }",
"... | [
"0.75326276",
"0.7259231",
"0.7213212",
"0.71956307",
"0.71395665",
"0.7119922",
"0.7109002",
"0.7107519",
"0.7105974",
"0.70633906",
"0.70633906",
"0.70633906",
"0.7057531",
"0.699372",
"0.68762195",
"0.6871625",
"0.6855396",
"0.68551135",
"0.6833897",
"0.6825789",
"0.682578... | 0.71438026 | 4 |
Returns a copy of this.Easting | public double get_Easting() {
return this.Easting;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getEast() {\n return east;\n }",
"public Location east()\r\n {\r\n // return new Location(x + 1, y);\r\n Location loc = new Location(x + 1, y);\r\n return loc;\r\n }",
"public ILocation east()\n {\n Location east = new Location(x + 1, y);\n re... | [
"0.736814",
"0.72398394",
"0.7136953",
"0.69932634",
"0.6551647",
"0.6537314",
"0.63291883",
"0.63182896",
"0.61562365",
"0.59028095",
"0.57951283",
"0.57922626",
"0.5789617",
"0.5703112",
"0.5685941",
"0.5677746",
"0.5650329",
"0.56486964",
"0.5648182",
"0.5618661",
"0.56186... | 0.8330678 | 0 |
Returns a copy of this.Northing | public double get_Northing() {
return this.Northing;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Value restrictToNotModified() {\n if (!isMaybeModified())\n return this;\n Value r = new Value(this);\n r.flags &= ~MODIFIED;\n return canonicalize(r);\n }",
"public Value joinNotDontDelete() {\n checkNotUnknown();\n if (isMaybeNotDontDelete())\n ... | [
"0.63452405",
"0.6243646",
"0.6096294",
"0.604559",
"0.59581935",
"0.5945091",
"0.59098846",
"0.58797115",
"0.5875457",
"0.5858582",
"0.581066",
"0.5799703",
"0.5752673",
"0.5752579",
"0.5734167",
"0.5717551",
"0.5712644",
"0.57073414",
"0.5703762",
"0.5680904",
"0.56652737",... | 0.7181456 | 0 |
Returns the file path of the data file. | Path getRequestListFilePath(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDataFilePath() {\r\n \t\treturn dataFile;\r\n \t}",
"public String getDataPath() {\n\t\treturn \"data\";\r\n\t}",
"public String getPFDataPath() {\n\t\t// TODO Auto-generated method stub\n\t\tString path = pfDir.getPath()+\"/data/\";\n\t\treturn path;\n\t}",
"java.lang.String getFilePath();"... | [
"0.8290259",
"0.7663743",
"0.76579505",
"0.73123866",
"0.72961086",
"0.72819364",
"0.72757494",
"0.7231038",
"0.7172652",
"0.7118033",
"0.7115532",
"0.69982624",
"0.6961656",
"0.68892556",
"0.688792",
"0.6886002",
"0.6882765",
"0.68654054",
"0.68148935",
"0.68033075",
"0.6796... | 0.0 | -1 |
Resets the game so a new game can be started. | public static void resetGame() {
//Set all variables to their default values.
Main.isGameStarted = false;
Main.isSetupDone = false;
Main.isGameWon = false;
Main.isGameLost = false;
Main.isThreeHanded = false;
Main.isFourHandedSingle = false;
Main.isFourHandedTeams = false;
Main.doBidding = false;
Main.doScoring = false;
Main.dealerIsPlayer1 = false;
Main.dealerIsPlayer2 = false;
Main.dealerIsPlayer3 = false;
Main.dealerIsPlayer4 = false;
Main.isNilAllowed = true;
Main.isDoubleNilAllowed = true;
Main.nilBidTeam1 = false;
Main.nilBidTeam2 = false;
Main.doubleIsAllowedPlayer1 = false;
Main.doubleIsAllowedPlayer2 = false;
Main.doubleIsAllowedPlayer3 = false;
Main.doubleIsAllowedPlayer4 = false;
Main.doubleIsAllowedTeam1 = false;
Main.doubleIsAllowedTeam2 = false;
Main.player1 = "";
Main.player2 = "";
Main.player3 = "";
Main.player4 = "";
Main.team1 = "";
Main.team2 = "";
Main.player1Bid = "";
Main.player2Bid = "";
Main.player3Bid = "";
Main.player4Bid = "";
Main.player1TricksTaken = "";
Main.player2TricksTaken = "";
Main.player3TricksTaken = "";
Main.player4TricksTaken = "";
Main.curDealer = "";
Main.startDealer = "";
Main.bagValue = "1";
Main.nilValue = "50";
Main.doubleNilValue = "200";
Main.round = 0;
Main.player1TimesSet = 0;
Main.player2TimesSet = 0;
Main.player3TimesSet = 0;
Main.player4TimesSet = 0;
Main.player1Score = "0";
Main.player2Score = "0";
Main.player3Score = "0";
Main.player4Score = "0";
Main.team1Score = "0";
Main.team2Score = "0";
GameSetup.gameTypeHidden.setState(true);
GameSetup.threeHanded.setEnabled(true);
GameSetup.fourHandedSingle.setEnabled(true);
GameSetup.fourHandedTeams.setEnabled(true);
GameSetup.dealerHidden.setState(true);
GameSetup.choiceBoxPlayer1.setEnabled(true);
GameSetup.choiceBoxPlayer2.setEnabled(true);
GameSetup.choiceBoxPlayer3.setEnabled(true);
GameSetup.choiceBoxPlayer4.setEnabled(true);
GameSetup.hasPlayerChanged = false;
EditGame.playerChanged = false;
EditGame.scoreChanged = false;
EditGame.roundToEdit = 0;
EditGame.editedRound = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}",
"private void resetGame() {\n rockList.clear();\n\n initializeGame();\n }",
"public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer... | [
"0.84789336",
"0.83270425",
"0.82965577",
"0.8246441",
"0.823745",
"0.82304424",
"0.8229884",
"0.81757647",
"0.808918",
"0.80152774",
"0.800518",
"0.7990021",
"0.79801387",
"0.79423153",
"0.7916593",
"0.7913471",
"0.7876202",
"0.7775394",
"0.776247",
"0.7761717",
"0.7704958",... | 0.6727661 | 96 |
Shows the Game Type if it was previously selected. | public static void showPreviousSelectedGameType() {
GameSetup.threeHanded.setState(Main.isThreeHanded);
GameSetup.fourHandedSingle.setState(Main.isFourHandedSingle);
GameSetup.fourHandedTeams.setState(Main.isFourHandedTeams);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCurrentGameType(ChessFX.GameType t) {\n this.currentGameType = t;\n }",
"public static boolean isSelectGameTypeDone() {\r\n\t\tboolean gameTypeSelected = false;\r\n\t\t\r\n\t\t//Check if the game type has been selected.\r\n\t\tif (GameSetup.threeHanded.getState()) {\r\n\t\t\tgameTypeSele... | [
"0.63638884",
"0.63275325",
"0.63167334",
"0.6114979",
"0.60660565",
"0.6026065",
"0.599082",
"0.5954432",
"0.59089553",
"0.5829711",
"0.5657105",
"0.5643579",
"0.5529878",
"0.55011505",
"0.5494326",
"0.5493663",
"0.5465437",
"0.5465219",
"0.5405942",
"0.5395434",
"0.5383731"... | 0.8064887 | 0 |
Shows the player names if they were previously entered. | public static void showPreviousPlayerNames() {
GameSetup.choiceBoxPlayer1.select(Main.player1);
GameSetup.choiceBoxPlayer2.select(Main.player2);
GameSetup.choiceBoxPlayer3.select(Main.player3);
//Don't show fourth player if playing 3 handed game.
if (!Main.isThreeHanded) {
GameSetup.choiceBoxPlayer4.select(Main.player4);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void savePlayerNames() {\r\n\t\tMain.player1 = GameSetup.choiceBoxPlayer1.getSelectedItem();\r\n\t\tMain.player2 = GameSetup.choiceBoxPlayer2.getSelectedItem();\r\n\t\tMain.player3 = GameSetup.choiceBoxPlayer3.getSelectedItem();\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\... | [
"0.7499344",
"0.73610926",
"0.7316635",
"0.7129566",
"0.7123832",
"0.7058395",
"0.7053315",
"0.69780684",
"0.69228387",
"0.6875388",
"0.6846433",
"0.6827497",
"0.68098855",
"0.6787595",
"0.6754894",
"0.6735811",
"0.6627247",
"0.66222423",
"0.6574394",
"0.656878",
"0.64639056"... | 0.808902 | 0 |
Shows the dealer if it was previously selected. | public static void showPreviousSelectedDealer() {
GameSetup.player1IsDealer.setState(Main.dealerIsPlayer1);
GameSetup.player2IsDealer.setState(Main.dealerIsPlayer2);
GameSetup.player3IsDealer.setState(Main.dealerIsPlayer3);
//Don't show fourth player if playing 3 handed game.
if (!Main.isThreeHanded) {
GameSetup.player4IsDealer.setState(Main.dealerIsPlayer4);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isDealerSelectionDone() {\r\n\t\tboolean dealerSelected = false;\r\n\t\t\r\n\t\t//Check if the dealer has been selected.\r\n\t\tif (GameSetup.player1IsDealer.getState()) {\r\n\t\t\tdealerSelected = true;\r\n\t\t}\r\n\t\tif (GameSetup.player2IsDealer.getState()) {\r\n\t\t\tdealerSelected = tru... | [
"0.63951004",
"0.6118271",
"0.5697852",
"0.5626103",
"0.5542554",
"0.5522728",
"0.5493154",
"0.5461239",
"0.54522395",
"0.54168856",
"0.54087335",
"0.5379018",
"0.53778297",
"0.53738153",
"0.5360808",
"0.53456813",
"0.5327569",
"0.53246975",
"0.5300132",
"0.52936137",
"0.5264... | 0.7162932 | 0 |
Shows which skin was previously selected. ISU is default. | public static void showPreviousSelectedSkin() {
GameOptions.iowaState.setState(Main.skinIsIowaState);
GameOptions.iowa.setState(Main.skinIsIowa);
GameOptions.northernIowa.setState(Main.skinIsNorthernIowa);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setSkinSelected() {\r\n\t\tif (Main.skinIsIowaState) {\r\n\t\t\tFrameUtils.setISUColors();\r\n\t\t}\r\n\t\tif (Main.skinIsIowa) {\r\n\t\t\tFrameUtils.setIowaColors();\r\n\t\t}\r\n\t\tif (Main.skinIsNorthernIowa) {\r\n\t\t\tFrameUtils.setUNIColors();\r\n\t\t}\r\n\t}",
"public static void showPr... | [
"0.71090066",
"0.6843162",
"0.67391366",
"0.6714751",
"0.6674722",
"0.655743",
"0.6541909",
"0.6452834",
"0.64277583",
"0.6230578",
"0.61914563",
"0.6171888",
"0.6147673",
"0.5997239",
"0.59085476",
"0.58733237",
"0.5795036",
"0.5775797",
"0.5666255",
"0.560345",
"0.5596961",... | 0.828223 | 0 |
Shows what the values for these variables are. | public static void showPreviousOptions() {
GameOptions.bagValue.select(Main.bagValue);
GameOptions.nilValueTextField.setText(Main.nilValue);
GameOptions.doubleNilValueTextField.setText(Main.doubleNilValue);
GameOptions.winScoreTextField.setText(Main.winScore);
GameOptions.loseScoreTextField.setText(Main.loseScore);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }",
"public String variableValue... | [
"0.75441206",
"0.74810493",
"0.74096054",
"0.6951722",
"0.6720416",
"0.666518",
"0.66495913",
"0.6604753",
"0.6543406",
"0.65129226",
"0.6432456",
"0.643131",
"0.6354309",
"0.63397664",
"0.625605",
"0.6223962",
"0.615404",
"0.6153182",
"0.614354",
"0.6074243",
"0.6066496",
... | 0.0 | -1 |
Shows what the values for the sounds are. | public static void showPreviousSounds() {
IniSetup.locStart.select(Main.soundGameStart);
IniSetup.locBags.select(Main.soundBags);
IniSetup.locSet.select(Main.soundSet);
IniSetup.locWin.select(Main.soundWin);
IniSetup.locLose.select(Main.soundLose);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSoundDescription() {\n if (getSound() == null) {\n return ChatColor.YELLOW + \"none\";\n } else {\n StringBuilder s = new StringBuilder();\n s.append(ChatColor.GOLD).append(\"sound \");\n s.append(ChatColor.YELLOW).append(getSound());\n ... | [
"0.6750667",
"0.66778487",
"0.6647315",
"0.62076753",
"0.6149207",
"0.61431456",
"0.6129043",
"0.61281",
"0.6068395",
"0.6035352",
"0.59844804",
"0.59626716",
"0.59573716",
"0.59270656",
"0.5843932",
"0.58385575",
"0.58367354",
"0.5820041",
"0.5775289",
"0.57738864",
"0.57687... | 0.62926745 | 3 |
Shows what the values for the default options are. | public static void showPreviousDefaults() {
if (Main.skinIsIowa) IniSetup.skin.select("Iowa");
if (Main.skinIsIowaState) IniSetup.skin.select("ISU");
if (Main.skinIsNorthernIowa) IniSetup.skin.select("UNI");
IniSetup.winScore.setText(Main.winScore);
IniSetup.loseScore.setText(Main.loseScore);
IniSetup.enterSoundPath.setText(Main.soundDir);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void initDefaultOptions()\r\n\t{\n\r\n\t\taddOption(HELP, true, \"show Arguments\");\r\n\t}",
"public static void list_defaults() {\n\t\tlogger.debug(\"Called 'list_defaults'\");\n\t\tString output = get_defaults()\n\t\t\t\t.stream()\n\t\t\t\t.map(Scannable::getName)\n\t\t\t\t.collect(Collectors.jo... | [
"0.71079683",
"0.68738705",
"0.6872274",
"0.68165684",
"0.65216786",
"0.6436564",
"0.6433415",
"0.6418857",
"0.6289824",
"0.62338537",
"0.61820716",
"0.61615527",
"0.6150706",
"0.61082137",
"0.61019796",
"0.60613656",
"0.6046896",
"0.6044806",
"0.603288",
"0.6017047",
"0.6014... | 0.5885524 | 28 |
Clears the Game Type. | public static void clearGameType() {
Main.isThreeHanded = false;
Main.isFourHandedSingle = false;
Main.isFourHandedTeams = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder clearType() {\n\n\t\t\t\t\ttype_ = 0;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}",
"public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearType() {\n\n type_ = 0;\... | [
"0.705175",
"0.7044828",
"0.7044828",
"0.7044828",
"0.704071",
"0.69950545",
"0.69944555",
"0.6988464",
"0.6987366",
"0.6918824",
"0.6918824",
"0.6918824",
"0.6918824",
"0.6918824",
"0.6918824",
"0.6918824",
"0.6915838",
"0.6818415",
"0.6805283",
"0.6767628",
"0.67464507",
... | 0.8269069 | 0 |
Clear the player names. | public static void clearPlayerNames() {
if (GameSetup.choiceBoxPlayer1.isEnabled()) {
GameSetup.choiceBoxPlayer1.select(0);
Main.player1 = "";
}
if (GameSetup.choiceBoxPlayer2.isEnabled()) {
GameSetup.choiceBoxPlayer2.select(0);
Main.player2 = "";
}
if (GameSetup.choiceBoxPlayer3.isEnabled()) {
GameSetup.choiceBoxPlayer3.select(0);
Main.player3 = "";
}
//Don't show fourth player if playing 3 handed game.
if (!Main.isThreeHanded) {
if (GameSetup.choiceBoxPlayer4.isEnabled()) {
GameSetup.choiceBoxPlayer4.select(0);
Main.player4 = "";
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearNames() {\n eventTitles = null;\n guestTitles = null;\n }",
"public void deleteCharFromName() {\n \t\tif (playerName.length() > 0 && state == 4) {\n \t\t\tplayerName = playerName.substring(0, playerName.length() - 1);\n \t\t}\n \t}",
"public void resetPlayers() {\n Play... | [
"0.7357923",
"0.71511793",
"0.7001492",
"0.6783137",
"0.6743652",
"0.67396206",
"0.6621225",
"0.66032904",
"0.65922356",
"0.6558084",
"0.6552436",
"0.6544706",
"0.6506272",
"0.6452087",
"0.64416397",
"0.64408654",
"0.6404244",
"0.6398989",
"0.63830656",
"0.6362879",
"0.635979... | 0.816102 | 0 |
Clear the selected dealer. | public static void clearDealerName() {
Main.dealerIsPlayer1 = false;
Main.dealerIsPlayer2 = false;
Main.dealerIsPlayer3 = false;
GameSetup.player1IsDealer.setState(false);
GameSetup.player2IsDealer.setState(false);
GameSetup.player3IsDealer.setState(false);
Main.curDealer = "";
Main.startDealer = "";
//Don't show fourth player if playing 3 handed game.
if (!Main.isThreeHanded) {
Main.dealerIsPlayer4 = false;
GameSetup.player4IsDealer.setState(false);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setClear()\n\t{\n\t\tsbm_consignCom1.db.remove(text_BookingID.getSelectedItem());\n\t\tsbm_consignCom1.cb.setSelectedItem(\"\");\n\t\ttext_advance.setText(\"\");\n\t\ttext_adults.setText(\"\");\n\t\ttext_children.setText(\"\");\n\t}",
"public void clearDEALER() {\r\n\t\t_DEALERList.clear();\r\n\t}",
... | [
"0.6727258",
"0.6602155",
"0.6535986",
"0.63658154",
"0.6238389",
"0.62276185",
"0.6197105",
"0.5960224",
"0.59563375",
"0.5927576",
"0.5919286",
"0.5906177",
"0.5899632",
"0.58919084",
"0.58617884",
"0.5810884",
"0.5798098",
"0.5788075",
"0.5760869",
"0.5730912",
"0.57208765... | 0.59780836 | 7 |
Clear the selected skin. | public static void clearSkin() {
Main.skinIsIowaState = false;
Main.skinIsIowa = false;
Main.skinIsNorthernIowa = false;
GameOptions.iowaState.setState(false);
GameOptions.iowa.setState(false);
GameOptions.northernIowa.setState(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder clearSkin() {\n bitField0_ = (bitField0_ & ~0x00000002);\n skin_ = 0;\n onChanged();\n return this;\n }",
"@ZAttr(id=669)\n public void unsetSkinSelectionColor() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new Hash... | [
"0.76172984",
"0.6602701",
"0.6174227",
"0.61194247",
"0.6114371",
"0.5975048",
"0.5863135",
"0.5837744",
"0.5826226",
"0.5793305",
"0.57560635",
"0.5724543",
"0.5706565",
"0.5704376",
"0.56706417",
"0.56627226",
"0.56311184",
"0.5610143",
"0.55890226",
"0.5581884",
"0.558188... | 0.753667 | 1 |
Clear the sound files. | public static void clearSounds() {
Main.soundBags = "";
Main.soundSet = "";
Main.soundWin = "";
Main.soundLose = "";
Main.soundGameStart= "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetSounds() {\n\t\tCollection<SoundInfo> sounds = soundList.values();\n for(SoundInfo sound: sounds){\n \t\tsound.reset();\n }\n\t}",
"public void stopAllSounds() {\n/* 218 */ if (this.loaded) {\n/* */ \n/* 220 */ for (String s : this.playingSounds.keySet())\n/*... | [
"0.7416711",
"0.71007997",
"0.6768657",
"0.6749424",
"0.66765475",
"0.650831",
"0.6471495",
"0.6463032",
"0.64360213",
"0.63955855",
"0.63827246",
"0.63760245",
"0.6319709",
"0.6308577",
"0.62956756",
"0.6290187",
"0.6284746",
"0.6253027",
"0.62171185",
"0.62098324",
"0.61839... | 0.7829311 | 0 |
Clear the bid made. | public static void clearBidsMade() {
FrameUtils.player1Bid.select("");
FrameUtils.player2Bid.select("");
FrameUtils.player3Bid.select("");
Main.player1Bid = "";
Main.player2Bid = "";
Main.player3Bid = "";
//Only clear the fourth player bid if playing 3 handed game.
if (!Main.isThreeHanded) {
FrameUtils.player4Bid.select("");
Main.player4Bid = "";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clearBid() {\n \n bid_ = 0;\n }",
"public void clearBids(){\n this.bids.clear();\n setRequested();\n }",
"public Builder clearBid() {\n copyOnWrite();\n instance.clearBid();\n return this;\n }",
"public void resetBidCount() {\... | [
"0.88226044",
"0.7611967",
"0.73352045",
"0.7317658",
"0.70233846",
"0.6928302",
"0.67319804",
"0.65632534",
"0.65461427",
"0.64542747",
"0.64542747",
"0.6427426",
"0.6391056",
"0.6381925",
"0.6369984",
"0.6344864",
"0.6343317",
"0.6324597",
"0.6312633",
"0.63079983",
"0.6293... | 0.7261622 | 4 |
Clear the tricks taken. | public static void clearTricksTaken() {
FrameUtils.player1TricksTaken.select("");
FrameUtils.player2TricksTaken.select("");
FrameUtils.player3TricksTaken.select("");
Main.player1TricksTaken = "";
Main.player2TricksTaken = "";
Main.player3TricksTaken = "";
//Only clear the fourth player tricks taken if playing 3 handed game.
if (!Main.isThreeHanded) {
FrameUtils.player4TricksTaken.select("");
Main.player4TricksTaken = "";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clear() {\n\t\tnegatedConcepts.clear();\n\t\tnegex.clear();\n\t\tconcepts.clear();\n\t}",
"public void clear() {\n classifiedSamples.clear();\n classificationNameMap.clear();\n classifications.clear();\n sampleClassificationMap.clear();\n nextIndex = 0;\n }",
"... | [
"0.67312133",
"0.6701359",
"0.66908795",
"0.66644174",
"0.6663873",
"0.6589373",
"0.6578363",
"0.65631497",
"0.65375024",
"0.6521395",
"0.65099627",
"0.65082777",
"0.6504203",
"0.64811695",
"0.64790267",
"0.6477463",
"0.6475638",
"0.64733547",
"0.6470214",
"0.64546496",
"0.64... | 0.78442824 | 0 |
Sets the values for these game options to default. | public static void defaultGameOptions() {
GameOptions.doubleNilValueTextField.setText("200");
GameOptions.winScoreTextField.setText("500");
GameOptions.loseScoreTextField.setText("-200");
Main.doubleNilValue = "200";
Main.winScore = "500";
Main.loseScore = "-200";
//Use the appropriate value for bagValue when three handed.
if (Main.isThreeHanded){
GameOptions.bagValue.select("2");
GameOptions.nilValueTextField.setText("100");
GameOptions.nilAllowed.setState(true);
GameOptions.doubleNilAllowed.setState(true);
GameOptions.nilValueTextField.setEditable(true);
GameOptions.doubleNilValueTextField.setEditable(true);
Main.bagValue = "2";
Main.nilValue = "100";
Main.isNilAllowed = true;
Main.isDoubleNilAllowed = true;
//Use the appropriate value for bagValue when four handed single.
} else if (Main.isFourHandedSingle){
GameOptions.bagValue.select("1");
GameOptions.nilValueTextField.setText("50");
GameOptions.nilAllowed.setState(true);
GameOptions.doubleNilAllowed.setState(false);
GameOptions.nilValueTextField.setEditable(true);
GameOptions.doubleNilValueTextField.setEditable(false);
Main.bagValue = "1";
Main.nilValue = "50";
Main.isNilAllowed = true;
Main.isDoubleNilAllowed = false;
//Use the appropriate value for bagValue when four handed teams.
} else {
GameOptions.bagValue.select("1");
GameOptions.nilValueTextField.setText("50");
GameOptions.nilAllowed.setState(true);
GameOptions.doubleNilAllowed.setState(true);
GameOptions.nilValueTextField.setEditable(true);
GameOptions.doubleNilValueTextField.setEditable(true);
Main.bagValue = "1";
Main.nilValue = "50";
Main.isNilAllowed = true;
Main.isDoubleNilAllowed = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setDefaultValues() {\r\n this.nodeDegreeSpinner.setValue(display_node_degree_default);\r\n this.displayEdgesSpinner.setValue(display_edges_default);\r\n this.scaleSpinner.setValue(scale_default);\r\n this.minweightSpinner.setValue(minweight_edges_default);\r\n this.i... | [
"0.7116392",
"0.6946181",
"0.6912427",
"0.68955904",
"0.6847324",
"0.68412507",
"0.6726916",
"0.6710755",
"0.665165",
"0.6649079",
"0.6564409",
"0.6529922",
"0.6509841",
"0.64878505",
"0.6483966",
"0.6429395",
"0.63408244",
"0.63340104",
"0.6309119",
"0.6290833",
"0.6278767",... | 0.7586114 | 0 |
Determines if the game type has been selected. | public static boolean isSelectGameTypeDone() {
boolean gameTypeSelected = false;
//Check if the game type has been selected.
if (GameSetup.threeHanded.getState()) {
gameTypeSelected = true;
}
if (GameSetup.fourHandedSingle.getState()) {
gameTypeSelected = true;
}
if (GameSetup.fourHandedTeams.getState()) {
gameTypeSelected = true;
}
//Show dialog box reminder.
if (!gameTypeSelected) FrameUtils.showDialogBox("A Game Type must be selected.");
//Saves the game type.
saveGameType();
return gameTypeSelected;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean canSelectCurWorldType() {\n WorldType worldtype = WorldType.WORLD_TYPES[this.selectedIndex];\n if (worldtype != null && worldtype.canBeCreated()) {\n return worldtype == WorldType.DEBUG_ALL_BLOCK_STATES ? hasShiftDown() : true;\n } else {\n return false;\n }\n ... | [
"0.6700734",
"0.65281767",
"0.6271751",
"0.60432214",
"0.5967827",
"0.5956861",
"0.59321797",
"0.5893066",
"0.5856869",
"0.58522856",
"0.57879215",
"0.5776962",
"0.5743745",
"0.56986743",
"0.5696536",
"0.56961495",
"0.5686981",
"0.5686981",
"0.5686981",
"0.5686981",
"0.568698... | 0.8248517 | 0 |
Determines if the players names have been entered. | public static boolean isPlayersSetupDone() {
boolean playersNamed = true;
//Check if all the choice boxes have been selected.
if (GameSetup.choiceBoxPlayer1.getSelectedIndex() == -1
|| GameSetup.choiceBoxPlayer1.getSelectedIndex() == 0) {
playersNamed = false;
}
if (GameSetup.choiceBoxPlayer2.getSelectedIndex() == -1
|| GameSetup.choiceBoxPlayer2.getSelectedIndex() == 0) {
playersNamed = false;
}
if (GameSetup.choiceBoxPlayer3.getSelectedIndex() == -1
|| GameSetup.choiceBoxPlayer3.getSelectedIndex() == 0) {
playersNamed = false;
}
//Don't show fourth player if playing 3 handed game.
if (!Main.isThreeHanded) {
if (GameSetup.choiceBoxPlayer4.getSelectedIndex() == -1
|| GameSetup.choiceBoxPlayer4.getSelectedIndex() == 0) {
playersNamed = false;
}
}
//Show dialog box reminder.
if (!playersNamed) FrameUtils.showDialogBox("All players must be selected.");
//Save player names.
savePlayerNames();
return playersNamed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSendPlayerName();",
"private boolean nameEntered(String gameName) {\n if (gameName.matches(\"\")) {\n Toast.makeText(this, \"You did not enter a game name.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }",
"boolean hasTargetPlayerNa... | [
"0.7068495",
"0.70366675",
"0.6942656",
"0.65652984",
"0.6553145",
"0.65091985",
"0.6478173",
"0.64667374",
"0.63457274",
"0.6343304",
"0.6331673",
"0.63194656",
"0.6312545",
"0.630227",
"0.6302098",
"0.629746",
"0.6207551",
"0.6194189",
"0.61902726",
"0.6175769",
"0.61707747... | 0.7452107 | 0 |
Determines if the dealer selection has been completed. | public static boolean isDealerSelectionDone() {
boolean dealerSelected = false;
//Check if the dealer has been selected.
if (GameSetup.player1IsDealer.getState()) {
dealerSelected = true;
}
if (GameSetup.player2IsDealer.getState()) {
dealerSelected = true;
}
if (GameSetup.player3IsDealer.getState()) {
dealerSelected = true;
}
//Don't show fourth player if playing 3 handed game.
if (!Main.isThreeHanded) {
if (GameSetup.player4IsDealer.getState()) {
dealerSelected = true;
}
}
//Show dialog box reminder.
if (!dealerSelected) FrameUtils.showDialogBox("A dealer must be selected.");
//Save who the dealer is.
saveDealerName();
return dealerSelected;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }",
"protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }",
"public boolean completed(){\n return !activeAttackers()... | [
"0.6863117",
"0.67440385",
"0.67188305",
"0.66975284",
"0.65809155",
"0.6530984",
"0.6513613",
"0.64299196",
"0.64280933",
"0.6403082",
"0.6399344",
"0.63929343",
"0.63752884",
"0.63430256",
"0.6333332",
"0.632462",
"0.6301636",
"0.6291022",
"0.6291022",
"0.6291022",
"0.62702... | 0.82513696 | 0 |
Determines if a skin has been chosen. ISU is the default. | public static boolean isChooseSkinDone() {
boolean skinSelected = false;
//Check if the dealer has been selected.
if (GameOptions.iowaState.getState()) {
skinSelected = true;
}
if (GameOptions.iowa.getState()) {
skinSelected = true;
}
if (GameOptions.northernIowa.getState()) {
skinSelected = true;
}
//Show dialog box reminder.
if (!skinSelected) FrameUtils.showDialogBox("A skin must be selected.");
//Save which skin is selected.
saveSkinSelection();
return skinSelected;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSkin();",
"public boolean hasSkin()\n {\n NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();\n return networkplayerinfo != null && networkplayerinfo.hasLocationSkin();\n }",
"public boolean hasSkin() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",... | [
"0.7701163",
"0.7123213",
"0.6974536",
"0.69491917",
"0.6365132",
"0.6337331",
"0.62801427",
"0.6229327",
"0.6217085",
"0.6061553",
"0.60432523",
"0.60175174",
"0.59709007",
"0.58820367",
"0.58694077",
"0.58001494",
"0.5794137",
"0.5671964",
"0.56568104",
"0.5643762",
"0.5643... | 0.7753513 | 0 |
Determines if the game options have been entered. | public static boolean isOptionsDone() {
boolean gameOptionsDone = true;
//Check if all the text fields are not blank or have correct data.
try {
Integer.parseInt(GameOptions.bagValue.getSelectedItem());
} catch (NumberFormatException e) {
gameOptionsDone = false;
}
try {
Integer.parseInt(GameOptions.nilValueTextField.getText());
} catch (NumberFormatException e) {
gameOptionsDone = false;
}
try {
Integer.parseInt(GameOptions.doubleNilValueTextField.getText());
} catch (NumberFormatException e) {
gameOptionsDone = false;
}
try {
Integer.parseInt(GameOptions.winScoreTextField.getText());
} catch (NumberFormatException e) {
gameOptionsDone = false;
}
try {
Integer.parseInt(GameOptions.loseScoreTextField.getText());
} catch (NumberFormatException e) {
gameOptionsDone = false;
}
//Show dialog box reminder.
if (!gameOptionsDone) FrameUtils.showDialogBox("You have entered incorrect data.");
//Save the options.
saveOptions();
//Convert the options to ints.
convertOptionsToNumbers();
return gameOptionsDone;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasOptions();",
"boolean hasOptions();",
"boolean hasOptions();",
"boolean hasOptions();",
"boolean hasOptions();",
"boolean hasOptions();",
"private boolean canViewOptions() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getSta... | [
"0.741738",
"0.741738",
"0.741738",
"0.741738",
"0.741738",
"0.741738",
"0.7107813",
"0.6800867",
"0.6800867",
"0.6800867",
"0.6800867",
"0.6800867",
"0.6800867",
"0.65768397",
"0.65643847",
"0.6505594",
"0.6453296",
"0.6448215",
"0.6448215",
"0.6448215",
"0.6448215",
"0.64... | 0.80125886 | 0 |
Determines if the game has been won. | public static boolean isGameWon() {
boolean gameWon = false;
//Game won for three handed game.
if (Main.isThreeHanded){
if (Utils.stringToInt(Main.player1Score) >= Main.winScoreNumb ||
Utils.stringToInt(Main.player2Score) >= Main.winScoreNumb ||
Utils.stringToInt(Main.player3Score) >= Main.winScoreNumb) {
gameWon = true;
}
}
//Game won for four handed single player game.
if (Main.isFourHandedSingle){
if (Utils.stringToInt(Main.player1Score) >= Main.winScoreNumb ||
Utils.stringToInt(Main.player2Score) >= Main.winScoreNumb ||
Utils.stringToInt(Main.player3Score) >= Main.winScoreNumb ||
Utils.stringToInt(Main.player4Score) >= Main.winScoreNumb) {
gameWon = true;
}
}
//Game won for four handed team game.
if (Main.isFourHandedTeams){
if (Utils.stringToInt(Main.team1Score) >= Main.winScoreNumb ||
Utils.stringToInt(Main.team2Score) >= Main.winScoreNumb) {
gameWon = true;
}
}
//Set Main variable.
Main.isGameWon = gameWon;
return gameWon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean won()\n {\n if (currentScore >= PigGame.GOAL)\n {\n return true;\n }\n \n else\n {\n return false;\n }\n }",
"public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}",
"public boolean gameOver() {\n return winner() != null;\n }",
"public boolean isWo... | [
"0.8122757",
"0.80690336",
"0.78699076",
"0.7678588",
"0.7588894",
"0.75536394",
"0.7536052",
"0.75235665",
"0.7499587",
"0.7499576",
"0.7388976",
"0.7373716",
"0.7345434",
"0.7336288",
"0.73221654",
"0.7281072",
"0.72662824",
"0.72471863",
"0.72448945",
"0.7229484",
"0.72257... | 0.78492606 | 3 |
Determines if the game has been lost. | public static boolean isGameLost() {
boolean gameLost = false;
//Game lost for three handed game.
if (Main.isThreeHanded){
if (Utils.stringToInt(Main.player1Score) <= Main.loseScoreNumb ||
Utils.stringToInt(Main.player2Score) <= Main.loseScoreNumb ||
Utils.stringToInt(Main.player3Score) <= Main.loseScoreNumb) {
gameLost = true;
}
}
//Game lost for four handed single player game.
if (Main.isFourHandedSingle){
if (Utils.stringToInt(Main.player1Score) <= Main.loseScoreNumb ||
Utils.stringToInt(Main.player2Score) <= Main.loseScoreNumb ||
Utils.stringToInt(Main.player3Score) <= Main.loseScoreNumb ||
Utils.stringToInt(Main.player4Score) <= Main.loseScoreNumb) {
gameLost = true;
}
}
//Game lost for four handed team game.
if (Main.isFourHandedTeams){
if (Utils.stringToInt(Main.team1Score) <= Main.loseScoreNumb ||
Utils.stringToInt(Main.team2Score) <= Main.loseScoreNumb) {
gameLost = true;
}
}
//Set Main variable.
Main.isGameLost = gameLost;
return gameLost;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean lose() { return lost; }",
"public void hasLost() {\n\t\tthis.hasLost = true;\n\t}",
"public boolean hasLost(){\n return this.lost;\n }",
"public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\... | [
"0.80911225",
"0.77238905",
"0.7374285",
"0.7292521",
"0.7263318",
"0.72178626",
"0.7162271",
"0.71607244",
"0.7116338",
"0.7085784",
"0.70254123",
"0.69595104",
"0.6931918",
"0.69312865",
"0.69100684",
"0.6905238",
"0.68812746",
"0.68728536",
"0.68718725",
"0.68601865",
"0.6... | 0.7677934 | 2 |
Determines which Player won the game. TIES ARE NOT FIGURED. | public static Player whoWonGame() {
int highest = Main.winScoreNumb;
Player winner = null;
//Three handed play.
if (Main.isThreeHanded){
if (Utils.stringToInt(Main.player1Score) >= highest) {
highest = Utils.stringToInt(Main.player1Score);
winner = Main.playerOne;
}
if (Utils.stringToInt(Main.player2Score) >= highest) {
highest = Utils.stringToInt(Main.player2Score);
winner = Main.playerTwo;
}
if (Utils.stringToInt(Main.player3Score) >= highest) {
highest = Utils.stringToInt(Main.player3Score);
winner = Main.playerThree;
}
}
//Four handed play with no teams.
if (Main.isFourHandedSingle){
if (Utils.stringToInt(Main.player1Score) >= highest) {
highest = Utils.stringToInt(Main.player1Score);
winner = Main.playerOne;
}
if (Utils.stringToInt(Main.player2Score) >= highest) {
highest = Utils.stringToInt(Main.player2Score);
winner = Main.playerTwo;
}
if (Utils.stringToInt(Main.player3Score) >= highest) {
highest = Utils.stringToInt(Main.player3Score);
winner = Main.playerThree;
}
if (Utils.stringToInt(Main.player4Score) >= highest) {
highest = Utils.stringToInt(Main.player4Score);
winner = Main.playerFour;
}
}
return winner;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Player getWinningPlayer() {\n return wonGame ? currentPlayer : null;\n }",
"public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) >... | [
"0.78474337",
"0.77762693",
"0.77197796",
"0.7569368",
"0.75280964",
"0.7510803",
"0.7444973",
"0.73977774",
"0.7367237",
"0.7327201",
"0.7297567",
"0.7271475",
"0.721323",
"0.7190853",
"0.7179004",
"0.71492034",
"0.714341",
"0.7105974",
"0.708853",
"0.70884675",
"0.7060068",... | 0.79003733 | 0 |
Determines which Team won the game. TIES ARE NOT FIGURED. | public static Team whoWonGameTeam() {
int highest = Main.winScoreNumb;
Team winner = null;
//Winner is team one.
if (Utils.stringToInt(Main.team1Score) >= highest) {
highest = Utils.stringToInt(Main.team1Score);
winner = Main.teamOne;
}
//Winner is team two.
if (Utils.stringToInt(Main.team2Score) >= highest) {
highest = Utils.stringToInt(Main.team2Score);
winner = Main.teamTwo;
}
return winner;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }",
"public static Player whoWonGame() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\t... | [
"0.839785",
"0.7495353",
"0.7340135",
"0.7335729",
"0.7189031",
"0.71358436",
"0.69787794",
"0.6975371",
"0.69596034",
"0.6933839",
"0.69004595",
"0.6898062",
"0.6853504",
"0.68084455",
"0.6807961",
"0.6807634",
"0.67783403",
"0.676865",
"0.6745627",
"0.6735833",
"0.6735829",... | 0.7905872 | 1 |
Determines which Player lost the game. TIES ARE NOT FIGURED. | public static Player whoLostGame() {
int lowest = Main.loseScoreNumb;
Player loser = null;
//Three handed play.
if (Main.isThreeHanded){
if (Utils.stringToInt(Main.player1Score) <= lowest) {
lowest = Utils.stringToInt(Main.player1Score);
loser = Main.playerOne;
}
if (Utils.stringToInt(Main.player2Score) <= lowest) {
lowest = Utils.stringToInt(Main.player2Score);
loser = Main.playerTwo;
}
if (Utils.stringToInt(Main.player3Score) <= lowest) {
lowest = Utils.stringToInt(Main.player3Score);
loser = Main.playerThree;
}
}
//Four handed play with no teams.
if (Main.isFourHandedSingle){
if (Utils.stringToInt(Main.player1Score) <= lowest) {
lowest = Utils.stringToInt(Main.player1Score);
loser = Main.playerOne;
}
if (Utils.stringToInt(Main.player2Score) <= lowest) {
lowest = Utils.stringToInt(Main.player2Score);
loser = Main.playerTwo;
}
if (Utils.stringToInt(Main.player3Score) <= lowest) {
lowest = Utils.stringToInt(Main.player3Score);
loser = Main.playerThree;
}
if (Utils.stringToInt(Main.player4Score) <= lowest) {
lowest = Utils.stringToInt(Main.player4Score);
loser = Main.playerFour;
}
}
return loser;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t... | [
"0.70341593",
"0.6953119",
"0.6713494",
"0.66463697",
"0.66433305",
"0.6533767",
"0.6485182",
"0.64814",
"0.64398146",
"0.64364254",
"0.6404127",
"0.6350979",
"0.63166326",
"0.62932396",
"0.6279229",
"0.6267862",
"0.6244358",
"0.62346333",
"0.622469",
"0.62125844",
"0.6185323... | 0.75123316 | 0 |
Determines which Team lost the game. TIES ARE NOT FIGURED. | public static Team whoLostGameTeam() {
int lowest = Main.loseScoreNumb;
Team loser = null;
//Team one is the looser.
if (Utils.stringToInt(Main.team1Score) >= lowest) {
lowest = Utils.stringToInt(Main.team1Score);
loser = Main.teamOne;
}
//Team two is the loser.
if (Utils.stringToInt(Main.team2Score) >= lowest) {
lowest = Utils.stringToInt(Main.team2Score);
loser = Main.teamTwo;
}
return loser;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int losses(String team) {\n validate(team);\n int t = st.get(team);\n return matTeam[t][2];\n }",
"private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n ... | [
"0.7199039",
"0.71370107",
"0.71263725",
"0.70244545",
"0.70045006",
"0.69739467",
"0.69625276",
"0.6956437",
"0.6907345",
"0.6881037",
"0.6830515",
"0.68036634",
"0.6618112",
"0.6608714",
"0.65887207",
"0.6530074",
"0.65179527",
"0.65048623",
"0.64189786",
"0.63886964",
"0.6... | 0.76852673 | 0 |
Gets the GameType Selected and saves it to the appropriate variable. | public static void saveGameType() {
clearGameType();
if (GameSetup.threeHanded.getState()) {
Main.isThreeHanded = true;
}
if (GameSetup.fourHandedSingle.getState()) {
Main.isFourHandedSingle = true;
}
if (GameSetup.fourHandedTeams.getState()) {
Main.isFourHandedTeams = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getGameType() {\n return gameType;\n }",
"public static GameType getGameType() {\n\t\treturn type;\n\t}",
"public AbstractPokemon.Type selectType()\n {\n JOptionPane typeSelector = new JOptionPane();\n Object message = \"Select which Pokemon this trainer is ... | [
"0.7346649",
"0.70965695",
"0.68783426",
"0.68410885",
"0.67427534",
"0.6519979",
"0.651931",
"0.6447878",
"0.6224649",
"0.6094389",
"0.60037124",
"0.59818256",
"0.59255356",
"0.5879618",
"0.58230126",
"0.5820307",
"0.5777998",
"0.57658356",
"0.57600343",
"0.56919736",
"0.567... | 0.70788926 | 2 |
Gets the player names and copies them to their assigned names. | public static void savePlayerNames() {
Main.player1 = GameSetup.choiceBoxPlayer1.getSelectedItem();
Main.player2 = GameSetup.choiceBoxPlayer2.getSelectedItem();
Main.player3 = GameSetup.choiceBoxPlayer3.getSelectedItem();
//Don't show fourth player if playing 3 handed game.
if (!Main.isThreeHanded) {
Main.player4 = GameSetup.choiceBoxPlayer4.getSelectedItem();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void assignPlayerNames() {\n\t\tSystem.out.print(\"What is the name of the first player? \");\n\t\tplayer1.setName(sc.nextLine());\n\n\t\t// Read the second player's name\n\t\tSystem.out.print(\"What is the name of the second player? \");\n\t\tplayer2.setName(sc.nextLine());\n\n\t\twhile (player2.getName()... | [
"0.7446512",
"0.72726625",
"0.70061016",
"0.68815327",
"0.6788854",
"0.6755585",
"0.66150105",
"0.66012967",
"0.6568167",
"0.6550175",
"0.653725",
"0.65174264",
"0.63995373",
"0.6396151",
"0.6390665",
"0.63882583",
"0.6343285",
"0.6336032",
"0.63172334",
"0.63142353",
"0.6284... | 0.66322684 | 6 |
Gets the team names and copies them to their assigned names. | public static void saveTeamNames() {
Main.team1 = Main.teamOne.name;
Main.team2 = Main.teamTwo.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] getTeamNames()\r\n\t{\r\n\t\t\r\n\t\tString[] names = new String[NUM_TEAMS];\r\n\t\t\r\n\t\tfor(int i = 0; i < teams.size(); i++)\r\n\t\t{\r\n\t\t\tnames[i] = teams.get(i).getName();\t\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}",
"private void assignPlayerNames() {\n\t\tSystem.out.print(\"What is t... | [
"0.64817697",
"0.62950605",
"0.6203013",
"0.61971575",
"0.6093581",
"0.59295434",
"0.5867431",
"0.5805498",
"0.57621044",
"0.57620573",
"0.57521915",
"0.5688146",
"0.5664961",
"0.5623146",
"0.55951035",
"0.5588753",
"0.55869025",
"0.55582434",
"0.55540067",
"0.5515834",
"0.55... | 0.7057385 | 0 |
Gets the dealer name and copies it to the curDealer. | public static void saveDealerName() {
clearDealerName();
if (GameSetup.player1IsDealer.getState()) {
Main.dealerIsPlayer1 = true;
Main.startDealer = Main.player1;
}
if (GameSetup.player2IsDealer.getState()) {
Main.dealerIsPlayer2 = true;
Main.startDealer = Main.player2;
}
if (GameSetup.player3IsDealer.getState()) {
Main.dealerIsPlayer3 = true;
Main.startDealer = Main.player3;
}
//Don't save fourth dealer if playing three handed game.
if (!Main.isThreeHanded) {
if (GameSetup.player4IsDealer.getState()) {
Main.dealerIsPlayer4 = true;
Main.startDealer = Main.player4;
}
}
Main.curDealer = Main.startDealer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDealerName() {\n\t\treturn dealerName;\n\t}",
"public void setDealerName(String dealerName);",
"public void setDealerName(String dealerName) {\n\t\tthis.dealerName = dealerName == null ? null : dealerName.trim();\n\t}",
"public String getDealName() {\n\t\treturn this.name;\n\t}",
"@AutoEsc... | [
"0.7926599",
"0.74432373",
"0.6928291",
"0.67174786",
"0.67006975",
"0.66359115",
"0.65704113",
"0.63986707",
"0.6251172",
"0.6207931",
"0.6167532",
"0.6075673",
"0.5981356",
"0.5884848",
"0.58474225",
"0.584405",
"0.5741396",
"0.5738321",
"0.570891",
"0.5696122",
"0.5685508"... | 0.66519314 | 5 |
Saves the currently selected skin. | public static void saveSkinSelection() {
clearSkin();
if (GameOptions.iowaState.getState()) {
Main.skinIsIowaState = true;
}
if (GameOptions.iowa.getState()) {
Main.skinIsIowa = true;
}
if (GameOptions.northernIowa.getState()) {
Main.skinIsNorthernIowa = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void saveDefaultOptions() {\r\n\t\t//Save the skin that was selected.\r\n\t\tif (IniSetup.skin.getSelectedItem() == \"ISU\") {\r\n\t\t\tMain.skinIsIowaState = true;\r\n\t\t\tMain.skinIsIowa = false;\r\n\t\t\tMain.skinIsNorthernIowa = false;\r\n\t\t} else if (IniSetup.skin.getSelectedItem() == \"Iowa\... | [
"0.6525937",
"0.64996016",
"0.64803576",
"0.64770347",
"0.64552647",
"0.63832426",
"0.6331857",
"0.62798184",
"0.62268925",
"0.6111114",
"0.60884243",
"0.5971517",
"0.5965024",
"0.5937981",
"0.5932522",
"0.5929707",
"0.5902581",
"0.5875176",
"0.5847165",
"0.5837275",
"0.58122... | 0.7665814 | 0 |
Saves the currently entered sound selections. | public static void saveSoundSelections() {
Main.soundGameStart = IniSetup.locStart.getSelectedItem();
Main.soundBags = IniSetup.locBags.getSelectedItem();
Main.soundSet = IniSetup.locSet.getSelectedItem();
Main.soundWin = IniSetup.locWin.getSelectedItem();
Main.soundLose = IniSetup.locLose.getSelectedItem();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveFile() {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFileFilter wavFilter = new FileFilter() {\r\n\t\t\t@Override\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"Sound file (*.WAV)\";\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean accept(File file) {\r\n\t... | [
"0.724341",
"0.70042515",
"0.69680357",
"0.6830988",
"0.6825535",
"0.66938126",
"0.66550547",
"0.62149936",
"0.61951166",
"0.61804646",
"0.606444",
"0.60133666",
"0.6000281",
"0.59277767",
"0.5923782",
"0.58989567",
"0.58908314",
"0.58869094",
"0.58779436",
"0.58722526",
"0.5... | 0.8252926 | 0 |
Saves the currently entered default values. | public static void saveDefaultOptions() {
//Save the skin that was selected.
if (IniSetup.skin.getSelectedItem() == "ISU") {
Main.skinIsIowaState = true;
Main.skinIsIowa = false;
Main.skinIsNorthernIowa = false;
} else if (IniSetup.skin.getSelectedItem() == "Iowa") {
Main.skinIsIowaState = false;
Main.skinIsIowa = true;
Main.skinIsNorthernIowa = false;
} else if (IniSetup.skin.getSelectedItem() == "UNI") {
Main.skinIsIowaState = false;
Main.skinIsIowa = false;
Main.skinIsNorthernIowa = true;
}
//Save the entered values.
Main.winScore = IniSetup.winScore.getText();
Main.loseScore = IniSetup.loseScore.getText();
//Check if the soundPath is a folder.
String str = IniSetup.enterSoundPath.getText();
File file = new File(str);
if (file.isDirectory()) Main.soundDir = str;
//Save the state of sounds being enabled or not.
if (IniSetup.soundsEnabled.getState()) {
Main.sounds = true;
} else {
Main.sounds = false;
}
//Save the options as numbers.
convertOptionsToNumbers();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void saveOptions() {\r\n\t\tMain.bagValue = GameOptions.bagValue.getSelectedItem();\r\n\t\tMain.nilValue = GameOptions.nilValueTextField.getText();\r\n\t\tMain.doubleNilValue = GameOptions.doubleNilValueTextField.getText();\r\n\t\tMain.winScore = GameOptions.winScoreTextField.getText();\r\n\t\tMain.l... | [
"0.6761868",
"0.6537276",
"0.6517937",
"0.6493043",
"0.64070547",
"0.6401566",
"0.6377968",
"0.6353249",
"0.63017714",
"0.62592417",
"0.6130231",
"0.6130107",
"0.6111488",
"0.60995424",
"0.6090381",
"0.60868",
"0.6081854",
"0.6051191",
"0.6037072",
"0.60176736",
"0.6012634",
... | 0.7109139 | 0 |
Saves the current options entered. | public static void saveOptions() {
Main.bagValue = GameOptions.bagValue.getSelectedItem();
Main.nilValue = GameOptions.nilValueTextField.getText();
Main.doubleNilValue = GameOptions.doubleNilValueTextField.getText();
Main.winScore = GameOptions.winScoreTextField.getText();
Main.loseScore = GameOptions.loseScoreTextField.getText();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveOption() {\n SharedPreferences filterSetting = getSharedPreferences(\"filterSetting\",0);\n SharedPreferences.Editor editor = filterSetting.edit();\n editor.putBoolean(\"myMostRecent\",myMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"myDisplayAll\",myDisplay... | [
"0.7084235",
"0.7022104",
"0.69748306",
"0.6930014",
"0.6752496",
"0.67054796",
"0.6697447",
"0.66391534",
"0.6618367",
"0.65705514",
"0.655117",
"0.65246207",
"0.6520938",
"0.64874756",
"0.64511615",
"0.6354117",
"0.6332539",
"0.6304344",
"0.6287334",
"0.62711567",
"0.624270... | 0.7655137 | 0 |
Saves the bid data to the appropriate variables. | public static void saveBidData() {
Main.player1Bid = FrameUtils.player1Bid.getSelectedItem();
Main.player2Bid = FrameUtils.player2Bid.getSelectedItem();
Main.player3Bid = FrameUtils.player3Bid.getSelectedItem();
//Saves the bid data if playing with four players.
if (!Main.isThreeHanded) {
Main.player4Bid = FrameUtils.player4Bid.getSelectedItem();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveBid(BidListModel bidList) {\n bidListRep.save(bidList);\n }",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(ne... | [
"0.707891",
"0.66489065",
"0.65708864",
"0.6534217",
"0.6506333",
"0.64988565",
"0.6346341",
"0.63254595",
"0.6286058",
"0.62222934",
"0.621603",
"0.6194249",
"0.6160003",
"0.61410517",
"0.6120952",
"0.6104427",
"0.6068509",
"0.60561657",
"0.60410726",
"0.6025148",
"0.6022917... | 0.7935908 | 0 |
Saves the tricks taken data to the appropriate variables. | public static void saveTricksTakenData() {
Main.player1TricksTaken = FrameUtils.player1TricksTaken.getSelectedItem();
Main.player2TricksTaken = FrameUtils.player2TricksTaken.getSelectedItem();
Main.player3TricksTaken = FrameUtils.player3TricksTaken.getSelectedItem();
//Saves the tricks taken if playing with four players.
if (!Main.isThreeHanded) {
Main.player4TricksTaken = FrameUtils.player4TricksTaken.getSelectedItem();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void save() {\n Tile[][] field = gameController.grid.field;\n Tile[][] undoField = gameController.grid.undoField;\n// SharedPreferenceUtil.put(this, SpConstant.WIDTH, field.length);\n// SharedPreferenceUtil.put(this, SpConstant.HEIGHT, field.length);\n for (int xx = 0; xx... | [
"0.6559464",
"0.6406041",
"0.6342588",
"0.6232038",
"0.6195965",
"0.61123407",
"0.6076511",
"0.6069929",
"0.6066575",
"0.60564303",
"0.6023666",
"0.60232705",
"0.60120124",
"0.6010615",
"0.596684",
"0.59593016",
"0.59481966",
"0.59192455",
"0.58931565",
"0.58770394",
"0.58428... | 0.7705827 | 0 |
Sets the skin to the selected skin. | public static void setSkinSelected() {
if (Main.skinIsIowaState) {
FrameUtils.setISUColors();
}
if (Main.skinIsIowa) {
FrameUtils.setIowaColors();
}
if (Main.skinIsNorthernIowa) {
FrameUtils.setUNIColors();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSkin(Skin skin);",
"public Builder setSkin(int value) {\n bitField0_ |= 0x00000002;\n skin_ = value;\n onChanged();\n return this;\n }",
"public void setUiSkin(java.lang.String uiSkin) {\n this.uiSkin = uiSkin;\n }",
"public void setSkin(SkinType skin... | [
"0.8164526",
"0.7255678",
"0.70021343",
"0.691448",
"0.65167546",
"0.6475061",
"0.63019735",
"0.62222147",
"0.6211473",
"0.61639184",
"0.60092634",
"0.5987354",
"0.5950429",
"0.58810973",
"0.585483",
"0.57371366",
"0.56844693",
"0.5659317",
"0.56526244",
"0.56492376",
"0.5641... | 0.78124875 | 1 |
This method records the game data into Player Class and increments the round. | public static void recordGameData() {
//Increment round.
Main.round ++;
//Record the four handed team game data to the player class.
if (Main.isFourHandedTeams) {
//Record four handed team play when nil bid in team one.
if (Main.nilBidTeam1) {
Main.teamOne.inputRound(Main.player1Bid, Main.player3Bid,
Main.player1TricksTaken, Main.player3TricksTaken);
//Record four handed team play when no nil bid in team one.
} else {
Main.teamOne.inputRound(Main.player1Bid, Main.player3Bid,
Main.player1TricksTaken);
}
//Record four handed team play when nil bid in team two.
if (Main.nilBidTeam2) {
Main.teamTwo.inputRound(Main.player2Bid, Main.player4Bid,
Main.player2TricksTaken, Main.player4TricksTaken);
//Record four handed team play when no nil bid in team one.
} else {
Main.teamTwo.inputRound(Main.player2Bid, Main.player4Bid,
Main.player2TricksTaken);
}
//Record the three handed game data to the player class.
} else {
Main.playerOne.inputRound(Main.player1Bid, Main.player1TricksTaken);
Main.playerTwo.inputRound(Main.player2Bid, Main.player2TricksTaken);
Main.playerThree.inputRound(Main.player3Bid, Main.player3TricksTaken);
//Don't record the game data of fourth player when playing a
//three handed game.
if (!Main.isThreeHanded) {
Main.playerFour.inputRound(Main.player4Bid, Main.player4TricksTaken);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void play(){\n\n gameRounds++;\n mRound = new Round(players);\n mRound.beginRound();\n\n }",
"public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer... | [
"0.74840456",
"0.67248863",
"0.66473365",
"0.66226363",
"0.6602807",
"0.6599692",
"0.65928745",
"0.65742004",
"0.6544791",
"0.6512655",
"0.64816046",
"0.6456152",
"0.64501375",
"0.64228827",
"0.63317055",
"0.63225573",
"0.62894773",
"0.6270434",
"0.6266558",
"0.62378556",
"0.... | 0.7081418 | 1 |
This method posts the scores for each player. | public static void postScores() {
//Copies the scores for four handed team based play.
if (Main.isFourHandedTeams) {
Main.team1Score = Main.teamOne.score;
Main.team2Score = Main.teamTwo.score;
//Copies the scores for non four handed team based play.
} else {
Main.player1Score = Main.playerOne.score;
Main.player2Score = Main.playerTwo.score;
Main.player3Score = Main.playerThree.score;
//Copies the scores for four handed single player game.
if (!Main.isThreeHanded) {
Main.player4Score = Main.playerFour.score;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarn... | [
"0.6409227",
"0.63777775",
"0.63141835",
"0.61407125",
"0.61346745",
"0.6121835",
"0.6108698",
"0.6006459",
"0.5983134",
"0.597493",
"0.59302324",
"0.5913698",
"0.5849048",
"0.5818488",
"0.58034164",
"0.5781874",
"0.57815546",
"0.57440597",
"0.5743995",
"0.57292646",
"0.57224... | 0.7031788 | 0 |
Process the scoring info before the bidding screen is shown. | public static boolean processScoring() {
boolean done = true;
int player1Tricks = 0;
int player2Tricks = 0;
int player3Tricks = 0;
int player4Tricks = 0;
//Gets the data for three players.
player1Tricks = FrameUtils.player1TricksTaken.getSelectedIndex();
player2Tricks = FrameUtils.player2TricksTaken.getSelectedIndex();
player3Tricks = FrameUtils.player3TricksTaken.getSelectedIndex();
//Gets the tricks taken if playing with four players.
if (!Main.isThreeHanded) {
player4Tricks = FrameUtils.player4TricksTaken.getSelectedIndex();
}
//Check if all the choice boxes have been selected.
if (player1Tricks == -1 || player1Tricks == 0) {
done = false;
}
if (player2Tricks == -1 || player2Tricks == 0) {
done = false;
}
if (player3Tricks == -1 || player3Tricks == 0) {
done = false;
}
//Don't check fourth player if playing three handed game.
if (!Main.isThreeHanded) {
if (player4Tricks == -1 || player4Tricks == 0) {
done = false;
}
}
//Get the value of three players tricks taken.
player1Tricks = stringToInt(FrameUtils.player1TricksTaken.getSelectedItem());
player2Tricks = stringToInt(FrameUtils.player2TricksTaken.getSelectedItem());
player3Tricks = stringToInt(FrameUtils.player3TricksTaken.getSelectedItem());
//Get the value of the fourth player in a four handed game.
if (!Main.isThreeHanded) {
player4Tricks = stringToInt(FrameUtils.player4TricksTaken.getSelectedItem());
}
//Check if tricks taken in a three handed game equals 17.
if (Main.isThreeHanded) {
if (player1Tricks + player2Tricks + player3Tricks != 17) {
done = false;
}
}
//Check if tricks taken in a non-three-handed game equals 13.
if (!Main.isThreeHanded) {
if (player1Tricks + player2Tricks + player3Tricks + player4Tricks != 13) {
done = false;
}
}
//Show dialog box reminder.
if (!done) FrameUtils.showDialogBox("Tricks taken was entered wrong.");
//Save tricks taken data.
saveTricksTakenData();
return done;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void displayAvailableBidsUI() {\n\t\tSystem.out.println(\"BIDDING TIME\");\n\n ArrayList<Integer> availableBids = new ArrayList<Integer>();\n numberOfSubRounds = cardsToDealPerRound[round - 1];\n\n\t\t/* loop through the players and set their bids */\n\t\tfor (Player p: gameLogic.getArrayOfPla... | [
"0.6000594",
"0.5666362",
"0.56229",
"0.54988706",
"0.54698426",
"0.5462162",
"0.54347175",
"0.53252727",
"0.529794",
"0.5251501",
"0.52030927",
"0.5191873",
"0.5149255",
"0.51292235",
"0.5127852",
"0.5124236",
"0.51240855",
"0.51239973",
"0.5121979",
"0.5116041",
"0.50879395... | 0.0 | -1 |
Process the scoring info before the bidding screen is shown. | public static boolean processScoringTeams() {
boolean done = true;
int player1Tricks = 0;
int player2Tricks = 0;
int player3Tricks = 0;
int player4Tricks = 0;
//Get the value of all the players tricks taken.
player1Tricks = FrameUtils.player1TricksTaken.getSelectedIndex();
player2Tricks = FrameUtils.player2TricksTaken.getSelectedIndex();
player3Tricks = FrameUtils.player3TricksTaken.getSelectedIndex();
player4Tricks = FrameUtils.player4TricksTaken.getSelectedIndex();
//Check if all the choice boxes have been selected.
if (player1Tricks == -1 || player1Tricks == 0) {
done = false;
}
if (player2Tricks == -1 || player2Tricks == 0) {
done = false;
}
if (player3Tricks == -1 || player3Tricks == 0) {
done = false;
//Needed because the player bid was not a nil and the index for
//the tricks taken is never read, by design. This only happens on
//bids that are nils.
if (FrameUtils.player3Bid.getSelectedItem() != "nil" ||
FrameUtils.player3Bid.getSelectedItem() != "dbl") {
done = true;
}
}
if (player4Tricks == -1 || player4Tricks == 0) {
done = false;
//Needed because the player bid was not a nil and the index for
//the tricks taken is never read, by design. This only happens on
//bids that are nils.
if (FrameUtils.player4Bid.getSelectedItem() != "nil" ||
FrameUtils.player4Bid.getSelectedItem() != "dbl") {
done = true;
}
}
//Get the value of all the players tricks taken.
player1Tricks = stringToInt(FrameUtils.player1TricksTaken.getSelectedItem());
player2Tricks = stringToInt(FrameUtils.player2TricksTaken.getSelectedItem());
player3Tricks = stringToInt(FrameUtils.player3TricksTaken.getSelectedItem());
player4Tricks = stringToInt(FrameUtils.player4TricksTaken.getSelectedItem());
//Check if tricks taken in a game equals 13.
if (player1Tricks + player2Tricks + player3Tricks + player4Tricks != 13) {
done = false;
}
//Show dialog box reminder.
if (!done) FrameUtils.showDialogBox("Tricks taken was entered wrong.");
//Save tricks taken data.
saveTricksTakenData();
return done;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void displayAvailableBidsUI() {\n\t\tSystem.out.println(\"BIDDING TIME\");\n\n ArrayList<Integer> availableBids = new ArrayList<Integer>();\n numberOfSubRounds = cardsToDealPerRound[round - 1];\n\n\t\t/* loop through the players and set their bids */\n\t\tfor (Player p: gameLogic.getArrayOfPla... | [
"0.600076",
"0.56684",
"0.5623071",
"0.55012697",
"0.546866",
"0.5463728",
"0.54355323",
"0.5323114",
"0.5299916",
"0.5253027",
"0.52048564",
"0.5192897",
"0.5150099",
"0.51283646",
"0.5127603",
"0.5126013",
"0.51252306",
"0.5124929",
"0.5121895",
"0.51164347",
"0.50891775",
... | 0.0 | -1 |
Process the bidding info before the scoring screen is shown. | public static boolean processBidding() {
boolean done = true;
//Check if all the choice boxes have been selected.
if (FrameUtils.player1Bid.getSelectedIndex() == -1
|| FrameUtils.player1Bid.getSelectedIndex() == 0) {
done = false;
}
if (FrameUtils.player2Bid.getSelectedIndex() == -1
|| FrameUtils.player2Bid.getSelectedIndex() == 0) {
done = false;
}
if (FrameUtils.player3Bid.getSelectedIndex() == -1
|| FrameUtils.player3Bid.getSelectedIndex() == 0) {
done = false;
}
//Don't check fourth player if playing three handed game.
if (!Main.isThreeHanded) {
if (FrameUtils.player4Bid.getSelectedIndex() == -1
|| FrameUtils.player4Bid.getSelectedIndex() == 0) {
done = false;
}
}
//Show dialog box reminder.
if (!done) FrameUtils.showDialogBox("An incorrect bid was made.");
//Save bid data.
saveBidData();
return done;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void displayAvailableBidsUI() {\n\t\tSystem.out.println(\"BIDDING TIME\");\n\n ArrayList<Integer> availableBids = new ArrayList<Integer>();\n numberOfSubRounds = cardsToDealPerRound[round - 1];\n\n\t\t/* loop through the players and set their bids */\n\t\tfor (Player p: gameLogic.getArrayOfPla... | [
"0.6712783",
"0.59889513",
"0.5753833",
"0.57036054",
"0.5675957",
"0.54946727",
"0.53702027",
"0.5325055",
"0.5314901",
"0.52428246",
"0.5239966",
"0.52233726",
"0.52092046",
"0.520773",
"0.5182354",
"0.51760334",
"0.51687247",
"0.5157115",
"0.5134108",
"0.51300234",
"0.5082... | 0.6270468 | 1 |
Add names to the players list. | public static void processInputNames() {
if (!IniSetup.enterNames.getText().equals("")) {
names.add((String) IniSetup.enterNames.getText());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPlayer(String p) {\n this.playersNames.add(p);\n }",
"public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\... | [
"0.7529527",
"0.72823274",
"0.7245776",
"0.71689",
"0.7052073",
"0.70413667",
"0.6907794",
"0.6907794",
"0.67881685",
"0.67780566",
"0.67679226",
"0.6764032",
"0.67134166",
"0.6711373",
"0.67060024",
"0.66977817",
"0.66963786",
"0.6627194",
"0.66004294",
"0.6581762",
"0.65444... | 0.0 | -1 |
Delete names from the players list. | public static void processDeleteNames() {
if (!IniSetup.enterNames.getText().equals("")) {
names.remove((String) IniSetup.enterNames.getText());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removePlayer(String name) {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getName().equals(name)) {\n\t\t\t\toccupiedPositions.remove(p.getPosition());\n\t\t\t\tif(p.getType() == Player.PlayerType.Agent) {\n\t\t\t\t\treAssignRobots(p);\n\t\t\t\t\tthis.agents -= 1;\n\t\t\t\t}\n\t\t\t\tplayerList.remove(... | [
"0.71567243",
"0.7133049",
"0.7101766",
"0.6940009",
"0.67557156",
"0.6745613",
"0.67444015",
"0.6464018",
"0.63501275",
"0.63489604",
"0.63406545",
"0.6329775",
"0.62574565",
"0.62178856",
"0.62139684",
"0.616012",
"0.61593026",
"0.61564934",
"0.61464196",
"0.61388755",
"0.6... | 0.6644255 | 7 |
Saves the sounds entered and creates the sounds array list. The return true always was to keep the logic the same to similar methods. | public static boolean processSounds() {
//Save the sounds selected.
saveSoundSelections();
//Create the sounds array list.
createSoundsArrList();
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void saveSoundSelections() {\r\n\t\tMain.soundGameStart = IniSetup.locStart.getSelectedItem();\r\n\t\tMain.soundBags = IniSetup.locBags.getSelectedItem();\r\n\t\tMain.soundSet = IniSetup.locSet.getSelectedItem();\r\n\t\tMain.soundWin = IniSetup.locWin.getSelectedItem();\r\n\t\tMain.soundLose = IniSet... | [
"0.679876",
"0.6724698",
"0.637384",
"0.63082856",
"0.59875304",
"0.59615135",
"0.5918116",
"0.5817143",
"0.5795224",
"0.57835513",
"0.5768596",
"0.5768239",
"0.5746908",
"0.5677869",
"0.56696737",
"0.5662402",
"0.5646964",
"0.5644754",
"0.5634733",
"0.5633667",
"0.563057",
... | 0.7997856 | 0 |
Processes the default settings and checks for errors. | public static boolean processDefaults() {
boolean done = false;
int winScore = stringToInt(IniSetup.winScore.getText());
int loseScore = stringToInt(IniSetup.loseScore.getText());
File file = new File(Main.soundDir);
//Check winning score value.
if (winScore >= 100) {
//Check loosing score value.
if (loseScore < 0) {
//Check if the input for sounds is a directory.
if (file.isDirectory()) {
done = true;
}
}
}
//Show dialog box reminder.
if (!done) FrameUtils.showDialogBox("Check your inputs.");
//Save the default options.
saveDefaultOptions();
//Create the defaults array list.
createDefaultsArrList();
return done;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void performDefaults() {\r\n\t}",
"@Override\n\tprotected void performDefaults() {\n\t\tif (fields != null) {\n\t\t\tIterator<FieldEditor> e = fields.iterator();\n\t\t\twhile (e.hasNext()) {\n\t\t\t\tFieldEditor pe = e.next();\n\t\t\t\tpe.loadDefault();\n\t\t\t}\n\t\t}\n\t\t// Force a recalculation of ... | [
"0.642485",
"0.6158059",
"0.615411",
"0.6133278",
"0.58749807",
"0.5846815",
"0.5810883",
"0.5806633",
"0.5748654",
"0.5721506",
"0.57137674",
"0.5650861",
"0.5645063",
"0.55670154",
"0.5538686",
"0.55286926",
"0.55210555",
"0.55028373",
"0.54906064",
"0.54011106",
"0.539914"... | 0.5774818 | 8 |
This method converts the string value of a number to an int. | public static int stringToInt(String numb) {
int temp = 0;
//Convert the string to an int. Set it to a value of zero if not a number.
try {
temp = Integer.parseInt(numb);
} catch (NumberFormatException e) {
temp = 0;
}
return temp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int convertToInt(String number) {\n try {\n return Integer.parseInt(number);\n } catch (Exception e) {\n e.printStackTrace();\n return 0;\n }\n }",
"public static int convertStringToValue(String value) {\n\t\treturn Integer.valueOf(value);\n\... | [
"0.7952455",
"0.76979524",
"0.7569778",
"0.7527539",
"0.7427139",
"0.74178207",
"0.7411465",
"0.7312987",
"0.7233991",
"0.7217214",
"0.7216142",
"0.7212358",
"0.72094774",
"0.70241976",
"0.6967295",
"0.6953569",
"0.69112647",
"0.6902614",
"0.69002926",
"0.68983865",
"0.681112... | 0.72820073 | 8 |
Advances the dealer to the next player in rotation. | public static void advanceDealer() {
//Advances when current dealer is player1.
if (Main.curDealer.equals(Main.player1)) {
Main.curDealer = Main.player2;
Main.dealerIsPlayer1 = false;
Main.dealerIsPlayer2 = true;
return;
}
//Advances when current dealer is player2.
if (Main.curDealer.equals(Main.player2)) {
Main.curDealer = Main.player3;
Main.dealerIsPlayer2 = false;
Main.dealerIsPlayer3 = true;
return;
}
//Advances when current dealer is player3.
if (Main.curDealer.equals(Main.player3)) {
Main.curDealer = Main.player1;
Main.dealerIsPlayer3 = false;
Main.dealerIsPlayer1 = true;
return;
}
//For advancing the dealer when playing a four handed game.
if (!Main.isThreeHanded) {
//Advances when current dealer is player3.
if (Main.curDealer.equals(Main.player3)) {
Main.curDealer = Main.player4;
Main.dealerIsPlayer3 = false;
Main.dealerIsPlayer4 = true;
return;
}
//Advances when current dealer is player4.
if (Main.curDealer.equals(Main.player4)) {
Main.curDealer = Main.player1;
Main.dealerIsPlayer4 = false;
Main.dealerIsPlayer1 = true;
return;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void rotateNextPlayer(){\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.nextElem + 1) % players.size();\n\t\telse\t\t\t\n\t\t\tthis.nextElem = (this.nextElem - 1 + players.size()) % players.size();\n\t}",
"public void nextTurn(){\n\t\tplayers[currentPlayer].setNotCurrentPlayer();\n\t\t\n\t\t//in... | [
"0.78287786",
"0.7152059",
"0.69618416",
"0.6961592",
"0.69270575",
"0.6533986",
"0.63974625",
"0.6368492",
"0.6317029",
"0.6258748",
"0.61907345",
"0.61612487",
"0.6156873",
"0.6040911",
"0.603595",
"0.6027524",
"0.60181105",
"0.600244",
"0.59890044",
"0.59722245",
"0.595913... | 0.7197022 | 1 |
Converts the options that are strings to ints so they can be used in calculations. There is no need for checking that the string is indeed a number, since it was already checked before the code gets here. | public static void convertOptionsToNumbers() {
//Convert the options to ints.
Main.bagValueNumb = stringToInt(Main.bagValue);
Main.nilValueNumb = stringToInt(Main.nilValue);
Main.doubleNilValueNumb = stringToInt(Main.doubleNilValue);
Main.winScoreNumb = stringToInt(Main.winScore);
Main.loseScoreNumb = stringToInt(Main.loseScore);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static List<Integer> StringToIntForSelectBoxes(){\n\t\tString[] noOfEachPaxType = {pro.getProperty(\"noOfAdults\"), pro.getProperty(\"noOfChildren\"), pro.getProperty(\"noOfInfants\")};\n\t\tList<String> noOfEachPaxTypeList = Arrays.asList(noOfEachPaxType);\n\t\tList<Integer> noOfEachPaxTypeListAsInt = new... | [
"0.6740208",
"0.6230729",
"0.6188639",
"0.6187008",
"0.61765283",
"0.6077588",
"0.60493183",
"0.60389084",
"0.60003424",
"0.5974342",
"0.5916931",
"0.5877554",
"0.5854045",
"0.58480644",
"0.58410823",
"0.5840211",
"0.58333105",
"0.5818762",
"0.5805603",
"0.5804334",
"0.578480... | 0.76838845 | 0 |
This method will recalculate a player's score when a change has been made to the score or the tricks taken. | public static void reCalculateScore(Player player, int roundIn, boolean scoreChanged) {
// TODO Auto-generated block
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n ... | [
"0.7845642",
"0.767844",
"0.76322114",
"0.7551776",
"0.7470489",
"0.7214533",
"0.71181995",
"0.7097181",
"0.6985985",
"0.6954538",
"0.6936488",
"0.6923386",
"0.69187266",
"0.68691295",
"0.6828595",
"0.6820978",
"0.6785587",
"0.67854095",
"0.67818165",
"0.6756776",
"0.6727601"... | 0.7439256 | 5 |
This method will recalculate a player's score when a change has been made to the score or the tricks taken and is a four handed team game. | public static void reCalculateScore(Player player, Team team, int roundIn,
boolean scoreChanged) {
// TODO Auto-generated block
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}",
"public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n ... | [
"0.7204848",
"0.7178943",
"0.7148976",
"0.714291",
"0.7120378",
"0.7079433",
"0.7031612",
"0.69858336",
"0.695648",
"0.6806326",
"0.67365307",
"0.6717153",
"0.6657263",
"0.66266066",
"0.6610226",
"0.66006994",
"0.6530409",
"0.6525282",
"0.6519504",
"0.6411058",
"0.63835865",
... | 0.7109085 | 5 |
This method saves the player being changed and creates the new player to take his place. Also transfers bags and score from the previous player to the new player. | public static void changePlayer(Player old, Player addNew, int place) {
Main.playerPrevious = new Player(old.player);
Main.playerPrevious.equals(old);
//Copy the players from temp to the correct player.
if (place == 1) {
Main.playerOne.equals(addNew);
}
if (place == 2) {
Main.playerTwo.equals(addNew);
}
if (place == 3) {
Main.playerThree.equals(addNew);
}
if (place == 4) {
Main.playerFour.equals(addNew);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}",
"public static void savePlayer(Player player){\n if (player != null){\n try {\n ... | [
"0.65712917",
"0.65048677",
"0.6413672",
"0.6309405",
"0.6277358",
"0.62717843",
"0.616044",
"0.61277485",
"0.6122807",
"0.60133004",
"0.60019255",
"0.5987211",
"0.5958691",
"0.5945419",
"0.5923228",
"0.5922876",
"0.59019214",
"0.58961934",
"0.58695453",
"0.58579504",
"0.5843... | 0.54064196 | 100 |
This method saves the player being changed and creates the new player to take his place. Also transfers bags and score from the previous player to the new player. | public static void changePlayerTeam(Player old, Player addNew, Team team, int place) {
// TODO Auto-generated block
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}",
"public static void savePlayer(Player player){\n if (player != null){\n try {\n ... | [
"0.6570722",
"0.65047115",
"0.6415404",
"0.6308831",
"0.6276447",
"0.6273847",
"0.6162962",
"0.6131583",
"0.61218876",
"0.60122496",
"0.60020614",
"0.59895337",
"0.5960786",
"0.5944548",
"0.5925875",
"0.5921807",
"0.5900518",
"0.5896736",
"0.58723414",
"0.5861022",
"0.5846301... | 0.0 | -1 |
Provides an indication that the player can go double. | public static boolean goDoublePlayer(Player player) {
int highest= -100;
boolean allowed = false;
//Find the highest score, three handed.
if (Main.isThreeHanded) {
if(Utils.stringToInt(Main.playerOne.score) > highest)
highest = Utils.stringToInt(Main.playerOne.score);
if(Utils.stringToInt(Main.playerTwo.score) > highest)
highest = Utils.stringToInt(Main.playerTwo.score);
if(Utils.stringToInt(Main.playerThree.score) > highest)
highest = Utils.stringToInt(Main.playerThree.score);
//Compare highest with player to see if difference exceeds 200.
if (Utils.stringToInt(player.score) + 200 <= highest)
allowed = true;
}
//Find the highest score, four handed.
if (Main.isFourHandedSingle) {
if(Utils.stringToInt(Main.playerOne.score) > highest)
highest = Utils.stringToInt(Main.playerOne.score);
if(Utils.stringToInt(Main.playerTwo.score) > highest)
highest = Utils.stringToInt(Main.playerTwo.score);
if(Utils.stringToInt(Main.playerThree.score) > highest)
highest = Utils.stringToInt(Main.playerThree.score);
if(Utils.stringToInt(Main.playerFour.score) > highest)
highest = Utils.stringToInt(Main.playerFour.score);
//Compare highest with player to see if difference exceeds 200.
if (Utils.stringToInt(player.score) + 200 <= highest)
allowed = true;
}
return allowed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean activeHandCanDouble() {\n Seat s = this.getSeat(this.seatPlaying);\n if (s.hasPlayer()) {\n Human h = (Human) s.getPlayer();\n Hand hand = h.getHands().get(0);\n \n return h.canDouble() && hand.getCards().size() == 2;\n } else {\n ... | [
"0.68040144",
"0.6075035",
"0.5992463",
"0.5923061",
"0.58855087",
"0.5736837",
"0.5709363",
"0.5648419",
"0.5602856",
"0.5600761",
"0.5551602",
"0.5532194",
"0.5522053",
"0.5503156",
"0.5482578",
"0.5479317",
"0.5437115",
"0.542751",
"0.5404633",
"0.5403577",
"0.5399724",
... | 0.623626 | 1 |
Provides an indication that the team can go double. | public static boolean goDoubleTeam(Team team) {
int highest = -100;
boolean allowed = false;
//Find the highest score.
if (Utils.stringToInt(Main.teamOne.score) > highest)
highest = Utils.stringToInt(Main.teamOne.score);
if (Utils.stringToInt(Main.teamTwo.score) > highest)
highest = Utils.stringToInt(Main.teamTwo.score);
//Compare highest with team to see if difference exceeds 200.
if (Utils.stringToInt(team.score) + 200 <= highest)
allowed = true;
return allowed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean activeHandCanDouble() {\n Seat s = this.getSeat(this.seatPlaying);\n if (s.hasPlayer()) {\n Human h = (Human) s.getPlayer();\n Hand hand = h.getHands().get(0);\n \n return h.canDouble() && hand.getCards().size() == 2;\n } else {\n ... | [
"0.637091",
"0.6184087",
"0.59703696",
"0.5700645",
"0.56707287",
"0.565653",
"0.5652248",
"0.5577517",
"0.55658096",
"0.5556202",
"0.552137",
"0.55100805",
"0.5496735",
"0.5486862",
"0.54572433",
"0.54175514",
"0.5412053",
"0.53827316",
"0.53659153",
"0.53173155",
"0.5316281... | 0.6324921 | 1 |
This method saves the players or team statistics to a file on the device. | public static void saveStats() {
if(Main.optionsCheckbox.getState()) FileUtils.exportGameOptions();
if(Main.isFourHandedTeams) {
if(Main.team1Checkbox.getState()) FileUtils.exportTeamFile(Main.teamOne);
if(Main.team2Checkbox.getState()) FileUtils.exportTeamFile(Main.teamTwo);
if(Main.teamPreviousCheckbox.getState()) FileUtils.exportTeamFile(Main.teamPrevious);
}
if(Main.isFourHandedSingle) {
if(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);
if(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);
if(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);
if(Main.player4Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerFour);
if(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);
}
if(Main.isThreeHanded) {
if(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);
if(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);
if(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);
if(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter... | [
"0.6938719",
"0.69088644",
"0.6866269",
"0.6831397",
"0.67580825",
"0.6756957",
"0.66560376",
"0.66461354",
"0.6617775",
"0.6607343",
"0.6594519",
"0.6587117",
"0.6557838",
"0.65394306",
"0.65384406",
"0.64869297",
"0.64401937",
"0.64284444",
"0.64121914",
"0.64103055",
"0.63... | 0.7475255 | 0 |
Parse the ini array list and extract all the information. Assign the information to the correct variables. | public static void parseIni() {
//Find the indexes of the division headers.
int namesIndex = findIndex("[names]");
int defaultIndex = findIndex("[defaults]");
int soundIndex = findIndex("[sounds]");
//Extract the information from the ini Array List.
names = extractSettings(namesIndex);
defaults = extractSettings(defaultIndex);
sounds = extractSettings(soundIndex);
//Sort the names Array List and copy it to the main names Array List.
Collections.sort(names);
Main.names = names;
//Set the sounds to their variables.
setSounds();
//Set the default game configurations.
setDefaults();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unchecked\")\n\tprotected void parseConfig() {\n\t\t_nameservers = new ArrayList<String>();\n\t\t_nameserverPorts = new ArrayList<String>();\n\n\t\t_props = new Hashtable<String,String>();\n\t\t// Get the Carma namespace\n\t\tNamespace ns = Namespace.getNamespace(\"Carma\",\n\t\t\t\t\"http://ww... | [
"0.6094327",
"0.6079183",
"0.5615185",
"0.54945827",
"0.52407163",
"0.5209673",
"0.50884783",
"0.5069935",
"0.5038626",
"0.5029354",
"0.49995363",
"0.49840802",
"0.4981632",
"0.4979238",
"0.49656075",
"0.49488062",
"0.49386868",
"0.49365115",
"0.49236366",
"0.48779133",
"0.48... | 0.77958584 | 0 |
Create the ini array list so it can be written to a file. | public static void createIni() {
//Clear the contents of the ini array list if not null.
if (Main.ini != null) Main.ini.clear();
//Start putting in the data.
Main.ini.add("[Names]");
//Loop through the entire names array list.
for (int i = 0; i < names.size(); i++) {
Main.ini.add(names.get(i));
}
//Start putting in the data.
Main.ini.add("");
Main.ini.add("[Defaults]");
//Loop through the entire defaults array list.
for (int i = 0; i < defaults.size(); i++) {
Main.ini.add(defaults.get(i));
}
//Start putting in the data.
Main.ini.add("");
Main.ini.add("[Sounds]");
//Loop through the entire names array list.
for (int i = 0; i < sounds.size(); i++) {
Main.ini.add(sounds.get(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void createDefaultsArrList() {\r\n\t\t//Clear the defaults array list.\r\n\t\tdefaults.clear();\r\n\t\t\r\n\t\t//Determine if sounds are enabled.\r\n\t\tif (Main.sounds) {\r\n\t\t\tdefaults.add(\"Sounds=true\");\r\n\t\t} else {\r\n\t\t\tdefaults.add(\"Sounds=false\");\r\n\t\t}\r\n\t\t\r\n\t\t//Find w... | [
"0.6117219",
"0.5474003",
"0.5379028",
"0.5253245",
"0.5230582",
"0.51525223",
"0.50472254",
"0.50000036",
"0.49843132",
"0.49635115",
"0.49523723",
"0.49410623",
"0.49291128",
"0.49266592",
"0.49121898",
"0.4873295",
"0.48712072",
"0.48654008",
"0.48647383",
"0.48613396",
"0... | 0.7570542 | 0 |
Finds the index of the given string in the ini array list. | public static int findIndex(String str) {
int index = -1;
//Loop through the entire ini array list to find the setting headings.
for (int i = 0; i < Main.ini.size(); i++) {
//When found, set the index equal to i.
if (((String) Main.ini.get(i)).equalsIgnoreCase(str)) index = i;
}
return index;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer indexOf(String s){\n\t\tInteger i;\n\t\tif((i=indices.get(s))!=null)\n\t\t\treturn i;\n\t\telse\n\t\t\treturn Integer.valueOf(-1);\n\t}",
"public static int getIndex(String s) {\n\t\tint index=-1; \n\t\tfor(int i = 0 ; i < dataList.size() ; i ++ ) {\n\t\t\tif(dataList.get(i).name.equals(s)) {\n\t\... | [
"0.70830745",
"0.6996373",
"0.67647606",
"0.6545335",
"0.65268874",
"0.64306223",
"0.6425994",
"0.6412482",
"0.64070356",
"0.63908285",
"0.6387756",
"0.6351141",
"0.63039196",
"0.6296415",
"0.6294086",
"0.6236817",
"0.62089425",
"0.61855745",
"0.6106554",
"0.6075286",
"0.6041... | 0.8248672 | 0 |
This method will extract the settings from the ini Array List using an index and return them as an array list. | public static ArrayList extractSettings(int index) {
ArrayList al = new ArrayList ();
String temp = "";
//Extract the settings from the Main ini file.
for (int i = index + 1; i < Main.ini.size(); i++) {
temp = (String) Main.ini.get(i);
if (!temp.equals("")) {
al.add(temp);
} else {
break;
}
}
return al;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void parseIni() {\r\n\t\t//Find the indexes of the division headers.\r\n\t\tint namesIndex = findIndex(\"[names]\");\r\n\t\tint defaultIndex = findIndex(\"[defaults]\");\r\n\t\tint soundIndex = findIndex(\"[sounds]\");\r\n\t\t\r\n\t\t//Extract the information from the ini Array List.\r\n\t\tnames = e... | [
"0.6248259",
"0.58579934",
"0.5793319",
"0.573493",
"0.57325965",
"0.5500036",
"0.54718214",
"0.54292923",
"0.53676057",
"0.52901083",
"0.52497494",
"0.5216117",
"0.52060413",
"0.51993096",
"0.5178017",
"0.5172077",
"0.516286",
"0.51454365",
"0.50966704",
"0.5063016",
"0.5053... | 0.8294946 | 0 |
Sets the sounds in the ini file to the correct variables. | public static void setSounds() {
String temp = "";
String[] sa;
String prefix = "";
String suffix = "";
clearSounds();
//Loop through the entire sounds array list to find all the settings.
for (int i = 0; i < sounds.size(); i++) {
//When found, set the variable in main to that string..
temp = (String) sounds.get(i);
sa = splitString('=', temp);
//Set the variables to empty if the setting is empty.
if (temp.endsWith("=")) {
prefix = sa[0];
if (prefix.equalsIgnoreCase("start")) {
Main.soundGameStart = "";
} else if (prefix.equalsIgnoreCase("bags")){
Main.soundBags = "";
} else if (prefix.equalsIgnoreCase("set")){
Main.soundSet = "";
} else if (prefix.equalsIgnoreCase("win")){
Main.soundWin = "";
} else if (prefix.equalsIgnoreCase("lose")){
Main.soundLose = "";
}
//Find the properties and set them to the desired values.
} else {
prefix = sa[0];
suffix = sa[1];
if (prefix.equalsIgnoreCase("start")) {
Main.soundGameStart = suffix;
} else if (prefix.equalsIgnoreCase("bags")){
Main.soundBags = suffix;
} else if (prefix.equalsIgnoreCase("set")){
Main.soundSet = suffix;
} else if (prefix.equalsIgnoreCase("win")){
Main.soundWin = suffix;
} else if (prefix.equalsIgnoreCase("lose")){
Main.soundLose = suffix;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setDefaults() {\r\n\t\tString temp = \"\";\r\n\t\tString[] sa;\r\n\t\tString prefix = \"\";\r\n\t\tString suffix = \"\";\r\n\r\n\t\t//Reset the skins so no more than one is selected when processed.\r\n\t\tclearSkin();\r\n\t\t\t\t\r\n\t\t//Loop through the entire sounds array list to find all the... | [
"0.7253278",
"0.68671775",
"0.6728398",
"0.6696504",
"0.6677858",
"0.66766524",
"0.6555419",
"0.64511746",
"0.6417024",
"0.64042634",
"0.6359141",
"0.63546425",
"0.6344418",
"0.63348323",
"0.63202876",
"0.6286634",
"0.61371315",
"0.60987365",
"0.60782117",
"0.60763526",
"0.60... | 0.81827873 | 0 |
Sets the default settings in the ini file to the correct variables. | public static void setDefaults() {
String temp = "";
String[] sa;
String prefix = "";
String suffix = "";
//Reset the skins so no more than one is selected when processed.
clearSkin();
//Loop through the entire sounds array list to find all the settings.
for (int i = 0; i < defaults.size(); i++) {
//When found, set the variable in main to that string..
temp = (String) defaults.get(i);
sa = splitString('=', temp);
prefix = sa[0];
suffix = sa[1];
//Find the properties and set them to the desired values.
if (prefix.equalsIgnoreCase("sounds")) {
if (suffix.equalsIgnoreCase("true")) Main.sounds = true;
if (suffix.equalsIgnoreCase("false")) Main.sounds = false;
} else if (prefix.equalsIgnoreCase("skin")){
if (suffix.equalsIgnoreCase("iowa")) Main.skinIsIowa = true;
if (suffix.equalsIgnoreCase("isu")) Main.skinIsIowaState = true;
if (suffix.equalsIgnoreCase("uni")) Main.skinIsNorthernIowa = true;
} else if (prefix.equalsIgnoreCase("winscore")){
Main.winScore = suffix;
} else if (prefix.equalsIgnoreCase("losescore")){
Main.loseScore = suffix;
} else if (prefix.equalsIgnoreCase("sounddir")){
Main.soundDir = suffix;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void initVars() {\n prefFile = \"./server.ini\";\n mimeFile = \"./mime.ini\";\n }",
"private void loadSettings() {\r\n \tString fname = baseDir + \"/\" + configFile;\r\n\t\tString line = null;\r\n\r\n\t\t// Load the settings hash with defaults\r\n\t\tsettings.put(\"db_url\", \"\");\... | [
"0.7086889",
"0.69467187",
"0.6601985",
"0.65917134",
"0.65171146",
"0.65137684",
"0.63476956",
"0.6300198",
"0.61326796",
"0.6107009",
"0.6080893",
"0.59603703",
"0.5912377",
"0.590077",
"0.5861371",
"0.5843541",
"0.5838848",
"0.5811993",
"0.5806811",
"0.5802128",
"0.5777198... | 0.6811792 | 2 |
Puts the names array list in a string of my choosing. | public static String namesToString() {
String temp = "";
//Loop through the names array list and create a string.
for (int i = 0; i < names.size(); i++) {
temp += ((String) names.get(i));
temp += "\n";
}
return temp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final static String makeName(Object[] names) {\n StringBuffer buf = new StringBuffer();\n for (int i = 0; i < names.length; i++) {\n if (i != 0) {\n buf.append(\".\");\n }\n buf.append(names[i]);\n }\n return buf.toString();\n }",
"public String n... | [
"0.6637849",
"0.6604155",
"0.65284187",
"0.6343049",
"0.62788975",
"0.6250636",
"0.62180084",
"0.62168777",
"0.6146439",
"0.6133931",
"0.6133931",
"0.608714",
"0.60714054",
"0.606383",
"0.605447",
"0.60228246",
"0.6022705",
"0.601405",
"0.59914565",
"0.5936192",
"0.591359",
... | 0.7589942 | 0 |
This method will get the values of the variables and then create the sounds array list from them. | public static void createSoundsArrList() {
//Clears the sounds array list.
sounds.clear();
//Adds all the sound files to the sounds array list.
sounds.add("Start=" + Main.soundGameStart);
sounds.add("Bags=" + Main.soundBags);
sounds.add("Set=" + Main.soundSet);
sounds.add("Win=" + Main.soundWin);
sounds.add("Lose=" + Main.soundLose);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setSounds() {\r\n\t\tString temp = \"\";\r\n\t\tString[] sa;\r\n\t\tString prefix = \"\";\r\n\t\tString suffix = \"\";\r\n\t\t\r\n\t\tclearSounds();\r\n\t\t\t\t\r\n\t\t//Loop through the entire sounds array list to find all the settings.\r\n\t\tfor (int i = 0; i < sounds.size(); i++) {\r\n\t\t\t... | [
"0.6908543",
"0.6545005",
"0.6530401",
"0.6493728",
"0.6493693",
"0.6307756",
"0.62453175",
"0.624084",
"0.6229353",
"0.61936194",
"0.61517376",
"0.6059093",
"0.59947556",
"0.5984656",
"0.598193",
"0.5962969",
"0.5945002",
"0.58839756",
"0.58677745",
"0.5832749",
"0.5823793",... | 0.7737767 | 0 |
This method will get the values of the variables and then create the defaults array list from them. | public static void createDefaultsArrList() {
//Clear the defaults array list.
defaults.clear();
//Determine if sounds are enabled.
if (Main.sounds) {
defaults.add("Sounds=true");
} else {
defaults.add("Sounds=false");
}
//Find which skin is the default.
if (Main.skinIsIowa) {
defaults.add("Skin=Iowa");
} else if (Main.skinIsIowaState) {
defaults.add("Skin=ISU");
} else if (Main.skinIsNorthernIowa) {
defaults.add("Skin=UNI");
}
//Add the values set to the array list.
defaults.add("WinScore=" + Main.winScore);
defaults.add("LoseScore=" + Main.loseScore);
defaults.add("SoundDir=" + Main.soundDir);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String[] getDefaultValues();",
"public String[] getDefaults();",
"public void loadDefaultValues() {\r\n\t}",
"public void initDefaultValues() {\n }",
"public static void setDefaults() {\r\n\t\tString temp = \"\";\r\n\t\tString[] sa;\r\n\t\tString prefix = \"\";\r\n\t\tString suffix = \"\... | [
"0.67901075",
"0.6673119",
"0.63753325",
"0.6336811",
"0.62248415",
"0.62010956",
"0.61856765",
"0.6177554",
"0.6098114",
"0.5820311",
"0.58157843",
"0.58142483",
"0.576498",
"0.57262355",
"0.5659587",
"0.56256765",
"0.56043494",
"0.55811864",
"0.557901",
"0.55486196",
"0.554... | 0.73325545 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel2 = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
txtname = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
txtcnic = new javax.swing.JTextField();
txtemail = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
txtdob = new javax.swing.JTextField();
cmbgender = new javax.swing.JComboBox();
jLabel7 = new javax.swing.JLabel();
txtfname = new javax.swing.JTextField();
jButton3 = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
setBackground(java.awt.SystemColor.inactiveCaption);
setBorder(null);
setClosable(true);
setTitle("Add Customer");
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/img/Preppy-icon.png"))); // NOI18N
setVisible(false);
jPanel2.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setForeground(new java.awt.Color(102, 51, 255));
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel1.setText("Name");
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel3.setText("Gender");
txtname.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel2.setText("Email");
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel5.setText("CNIC");
txtcnic.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
txtemail.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel6.setText("Date Of Birth");
txtdob.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
cmbgender.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " ", "Male", "Female" }));
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel7.setText("Father Name");
txtfname.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/btncalendar4.png"))); // NOI18N
jButton3.setToolTipText("Calendar");
jButton3.setContentAreaFilled(false);
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(60, 60, 60)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtemail, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtcnic, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(txtdob, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(60, 60, 60)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
.addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(9, 9, 9)))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(txtname)
.addComponent(cmbgender, 0, 198, Short.MAX_VALUE))
.addComponent(txtfname, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(73, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtfname, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
.addComponent(cmbgender))
.addGap(8, 8, 8)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(txtemail)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtcnic, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6)
.addComponent(txtdob, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(24, Short.MAX_VALUE))
);
jLabel4.setBackground(new java.awt.Color(255, 255, 255));
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel4.setText("Add Customer");
jButton2.setBackground(new java.awt.Color(0, 0, 0));
jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jButton2.setForeground(new java.awt.Color(255, 255, 255));
jButton2.setText("Exit");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton1.setBackground(new java.awt.Color(0, 0, 0));
jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jButton1.setForeground(new java.awt.Color(255, 255, 255));
jButton1.setText("Submit");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(59, 59, 59)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(132, 132, 132))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(181, 181, 181)
.addComponent(jLabel4)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(19, 19, 19)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanel1.getAccessibleContext().setAccessibleName("");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.7319975",
"0.7291426",
"0.7291426",
"0.7291426",
"0.7286372",
"0.7249133",
"0.72134817",
"0.7208172",
"0.7196412",
"0.7190365",
"0.7184679",
"0.71593916",
"0.7147999",
"0.7093026",
"0.7080469",
"0.7056178",
"0.69875216",
"0.69774026",
"0.69545585",
"0.69538534",
"0.6945255... | 0.0 | -1 |
Splits a file into lines and returns them as an ArrayList. | public static List<String> readLines(String path) {
ArrayList<String> lines = new ArrayList<>();
//open file
File file = new File(path);
//Error if not readable
if (!file.canRead()) {
System.err.println("File " + file.getAbsolutePath() + " could not be read!");
System.exit(1);
}
//Return lines
try {
BufferedReader inputStream;
inputStream = new BufferedReader(new FileReader(file));
String line;
while ((line = inputStream.readLine()) != null) {
lines.add(line);
}
inputStream.close();
} catch (FileNotFoundException ex) {
System.err.println(file.getAbsolutePath() + " not found!");
System.exit(1);
} catch (IOException ex) {
System.err.println(ex);
System.exit(1);
}
return lines;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ArrayList<String> readLines(String fileName){\n\t\treturn read(fileName, false);\n\t}",
"ArrayList<String> getLines();",
"public ArrayList<String> loadLines(String filename) {\n ArrayList<String> lines = new ArrayList<String>();\n String[] rawLines = loadStrings(filename);\n for(String s... | [
"0.7363484",
"0.7318103",
"0.71648335",
"0.71277636",
"0.71059173",
"0.7046914",
"0.7022001",
"0.6987355",
"0.69666266",
"0.6935068",
"0.69185805",
"0.6882586",
"0.6853495",
"0.6786992",
"0.6775791",
"0.6769545",
"0.67667174",
"0.67567474",
"0.6719478",
"0.6700012",
"0.668850... | 0.64478695 | 36 |
Same as readLines except as a LinkedList (useful if .addFirst() is needed). | public static LinkedList<String> readLinesAsLinkedList(String path) {
return new LinkedList<>(readLines(path));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> nextOneLine() throws IOException {\n counterSeveralLines = linesAfter;\n if (StringUtils.isBlank(currentPath)) return null;\n String sCurrentLine;\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n listBefore = addToArray(sCurrentLine);\n }... | [
"0.7134717",
"0.66980284",
"0.65027326",
"0.648004",
"0.63330775",
"0.62898034",
"0.61109716",
"0.6100515",
"0.6088202",
"0.6082487",
"0.60621405",
"0.6045596",
"0.59661895",
"0.5961118",
"0.5958798",
"0.5952024",
"0.59354705",
"0.593492",
"0.5919226",
"0.5904628",
"0.590197"... | 0.71673447 | 0 |
Writes a String to a file. Overwrites previous contents of the file! | public static void writeString(String path, String content) {
//Open file
Path jPath = Paths.get(path);
//Create file if necessary
if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {
try {
Files.createFile(jPath);
} catch (IOException ex) {
System.out.print(ex);
System.exit(1);
}
}
//Error if not writable
if (!Files.isWritable(jPath)) {
System.out.println("File " + jPath + " could not be written!");
System.exit(1);
}
//Write lines
try {
Files.write(jPath, content.getBytes(Charset.forName("UTF-8")));
} catch (IOException ex) {
System.out.println(ex);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void writeStringToFile(String string) {\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(OUTPUT_FILE_TEMP))) {\n\t\t\twriter.write(string);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void writeToFile(String string){\n try {\n ... | [
"0.7760987",
"0.77246696",
"0.75066125",
"0.7463987",
"0.7295146",
"0.71702975",
"0.7169193",
"0.7143659",
"0.711918",
"0.70875984",
"0.7083525",
"0.7015211",
"0.69108325",
"0.6884285",
"0.68365794",
"0.6802039",
"0.6788039",
"0.6779404",
"0.6756982",
"0.6753665",
"0.67136365... | 0.6294184 | 56 |
Appends a String to a file. | public static void appendString(String path, String content) {
//Open file
Path jPath = Paths.get(path);
//Create file if necessary
if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {
try {
Files.createFile(jPath);
} catch (IOException ex) {
System.out.print(ex);
System.exit(1);
}
}
//Error if not writable
if (!Files.isWritable(jPath)) {
System.out.println("File " + jPath + " could not be written!");
System.exit(1);
}
//Write lines
try {
FileWriter fw = new FileWriter(path, true);
fw.write(content);//appends the string to the file
fw.close();
} catch (IOException ex) {
System.out.println(ex);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void appendStringToFile(String string, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\twriteStringToFile(string, targetFilename, true);\r\n\t}",
"private void writeStringToFile(String string, String targetFilename, boolean appendFlag)\r\n\tthrows FileNotFoundException, IOExc... | [
"0.73192406",
"0.6998023",
"0.68163145",
"0.67977583",
"0.67954093",
"0.676238",
"0.6750295",
"0.67271423",
"0.66418517",
"0.66082734",
"0.6599751",
"0.6545161",
"0.65229857",
"0.6486499",
"0.6476511",
"0.6396762",
"0.6384946",
"0.63767153",
"0.63503706",
"0.63440555",
"0.631... | 0.6935151 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.