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 |
|---|---|---|---|---|---|---|
This Case is directed Graph If is undirected just add Double edge | Edge(Node from,Node to, int length){
this.source=from;
this.destination=to;
this.weight=length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addDirectedEdge(final Node first, final Node second)\n {\n if ( first == second )\n {\n return;\n }\n else if (first.connectedNodes.contains(second))\n return;\n else\n first.connectedNodes.add(second);\n }",
"public void addUndirecte... | [
"0.74050176",
"0.69977176",
"0.69856304",
"0.6951671",
"0.69089615",
"0.6830978",
"0.6730235",
"0.6667516",
"0.66401005",
"0.6611754",
"0.6604935",
"0.6594188",
"0.656862",
"0.6566965",
"0.6558247",
"0.65145624",
"0.6469072",
"0.6469072",
"0.64388424",
"0.64216757",
"0.641394... | 0.5983938 | 80 |
The event handler for SignChangeEvents. Allows signs to be colored using &codes. | @EventHandler(ignoreCancelled = true)
public void onSignChange(SignChangeEvent event) {
// Automatically flag players with bypass as posting non-empty signs to skip empty checks
boolean empty = !event.getPlayer().hasPermission("sblock.sign.unlogged");
for (int i = 0; i < event.getLines().length; i++) {
event.setLine(i, ChatColor.translateAlternateColorCodes('&', event.getLine(i)));
if (empty && !TextUtils.appearsEmpty(event.getLine(i))) {
empty = false;
}
}
if (empty || event.getPlayer().hasPermission("sblock.sign.unlogged")) {
return;
}
Block block = event.getBlock();
StringBuilder msg = new StringBuilder().append(ChatColor.GRAY)
.append(block.getWorld().getName()).append(' ').append(block.getX()).append("x, ")
.append(block.getY()).append("y, ").append(block.getZ()).append("z\n");
for (String line : event.getLines()) {
if (!TextUtils.appearsEmpty(line)) {
msg.append(line).append(ChatColor.GRAY).append('\n');
}
}
msg.delete(msg.length() - 3, msg.length());
if (chat.testForMute(event.getPlayer(), msg.toString(), "#sign")) {
event.setCancelled(true);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@EventHandler(priority = EventPriority.MONITOR)\r\n\tpublic void onSignChange(SignChangeEvent event) {\r\n\t\t\r\n\t\tfinal Player creator = (Player)event.getPlayer();\r\n\t\tfinal InputPlayer iplayer = bSignModule.GUI_API.getPlayer(creator);\r\n\t\tfinal Location signLocation = event.getBlock().getLocation();\r\n... | [
"0.6816308",
"0.5278512",
"0.52204674",
"0.5072807",
"0.5063955",
"0.5039004",
"0.50275946",
"0.49513045",
"0.49024564",
"0.48188585",
"0.4794606",
"0.4792897",
"0.4781667",
"0.47632688",
"0.47453076",
"0.47427413",
"0.47294298",
"0.47222495",
"0.4681101",
"0.46370348",
"0.46... | 0.67774135 | 1 |
default Property constructor; it will chain automatically to the (int, int, int, int) constructor | public Property() {
this(0, 0, 0, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Property() {}",
"public Property(int xLength, int yWidth, int xLeft, int yTop) {\n this(xLength, yWidth, xLeft, yTop, DEFAULT_REGNUM);\n }",
"public Property()\r\n {\r\n }",
"DefaultConstructor(int a){}",
"public Property(Property prop, int regNum) {\n // this code provided by D... | [
"0.67038727",
"0.66287214",
"0.65909374",
"0.654258",
"0.6494448",
"0.6298939",
"0.61835086",
"0.6174558",
"0.6114849",
"0.60567164",
"0.60027766",
"0.6000377",
"0.5944991",
"0.5938212",
"0.59182405",
"0.5906597",
"0.59030986",
"0.58720887",
"0.58703274",
"0.58689064",
"0.584... | 0.75489867 | 0 |
Property Constructor take value xLength, yWidth, xLeft, yTop from user input and default int REGNUM, this one will chain automatic (Property pro, int) constructor | public Property(int xLength, int yWidth, int xLeft, int yTop) {
this(xLength, yWidth, xLeft, yTop, DEFAULT_REGNUM);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Property(int xLength, int yWidth, int xLeft, int yTop, int regNum) {\n setXLength(xLength);\n setYWidth(yWidth);\n setXLeft(xLeft);\n setYTop(yTop);\n setRegNum(regNum);\n }",
"public Property(Property prop, int regNum) {\n // this code provided by Dave Houtman [2020] personal communica... | [
"0.855992",
"0.76550984",
"0.71643645",
"0.6811279",
"0.6269202",
"0.62220496",
"0.6100655",
"0.6067842",
"0.59123784",
"0.5883066",
"0.58599794",
"0.58579004",
"0.5800764",
"0.57320136",
"0.5730142",
"0.57045245",
"0.5702688",
"0.5668002",
"0.56478447",
"0.56469446",
"0.5617... | 0.8003013 | 1 |
Property copy constructor which only changes the regNum | public Property(Property prop, int regNum) {
// this code provided by Dave Houtman [2020] personal communication
this(prop.getXLength(), prop.getYWidth(), prop.getXLeft(), prop.getYTop(), regNum);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}",
"IGLProperty clone();",
"public REG(Reg r) {\n\t\treg = r;\n\t}",
"@Override\r\n\tpublic void copy(Property p) {\n\t\t\r\n\t}",
"public CFExp deepCopy(){\r\n return this;\... | [
"0.6310009",
"0.62074023",
"0.6107382",
"0.596489",
"0.59545714",
"0.59293526",
"0.58942026",
"0.58935267",
"0.58757794",
"0.58326703",
"0.58102447",
"0.5774749",
"0.57710904",
"0.57471293",
"0.5739583",
"0.57381684",
"0.5663351",
"0.5660752",
"0.565732",
"0.5630816",
"0.5599... | 0.671028 | 0 |
Property constructor set value of xLength, yWidth, xLeft, yTop and regNum and store in integer The parameterized constructor that take the 4 values for position and size to set to variables | public Property(int xLength, int yWidth, int xLeft, int yTop, int regNum) {
setXLength(xLength);
setYWidth(yWidth);
setXLeft(xLeft);
setYTop(yTop);
setRegNum(regNum);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Property(int xLength, int yWidth, int xLeft, int yTop) {\n this(xLength, yWidth, xLeft, yTop, DEFAULT_REGNUM);\n }",
"public Property(Property prop, int regNum) {\n // this code provided by Dave Houtman [2020] personal communication\n this(prop.getXLength(), prop.getYWidth(), prop.getXLeft(), pr... | [
"0.78729415",
"0.6926601",
"0.66976017",
"0.6498945",
"0.6437848",
"0.64014524",
"0.6383961",
"0.6352363",
"0.63420475",
"0.6332944",
"0.63261837",
"0.6323114",
"0.62610126",
"0.6253715",
"0.62392735",
"0.622503",
"0.62175447",
"0.62078905",
"0.62063056",
"0.6203426",
"0.6198... | 0.84786034 | 0 |
The getter that returns xLeft coordinate | public int getXLeft() {
return xLeft;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getLeftX() {\n\t\treturn leftX;\n\t}",
"public double getLeft() {\n return this.xL;\n }",
"public int getLeftX() {\n\t\treturn 0;\r\n\t}",
"public double getLeftX(){\r\n\t\treturn adjustInput(driverLeft.getX());\r\n\t}",
"public int getX() {\r\n\t\treturn xcoord;\r\n\t}",
"public i... | [
"0.87062",
"0.8405747",
"0.84002155",
"0.8185556",
"0.8083298",
"0.8072741",
"0.8062271",
"0.80550873",
"0.805317",
"0.80339766",
"0.8033467",
"0.80292296",
"0.8010644",
"0.7987694",
"0.79404885",
"0.79377145",
"0.7927289",
"0.79182774",
"0.79069734",
"0.7901211",
"0.7886114"... | 0.8801044 | 0 |
The setter for xLeft | public void setXLeft(int left) {
this.xLeft = left;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"public int getXLeft() {\n return xLeft;\n }",
"public float getLeftX() {\n\t\treturn leftX;\n\t}",
"protected final void setLeft(IntervalNode x) {\n\tthis.left = x;\n\n\t// recalc max and min\n\tsetMax();\n\tsetMin();\n }",
"public vo... | [
"0.84438103",
"0.7961611",
"0.78726673",
"0.7713409",
"0.7701854",
"0.7604954",
"0.7596605",
"0.7470879",
"0.7465755",
"0.74178493",
"0.7403082",
"0.72262084",
"0.7172941",
"0.7161329",
"0.7101791",
"0.7065796",
"0.7046378",
"0.70460874",
"0.7044199",
"0.7032924",
"0.7021216"... | 0.88442403 | 0 |
The getter that returns xRight coordinate | public int getXRight() {
return getXLeft() + getXLength();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getRightX() {\n\t\treturn 0;\r\n\t}",
"public double getRight() {\n return this.xR;\n }",
"public int getXTopRight() {\n return xTopRight;\n }",
"protected double getWindowRightX() {\n\t\treturn this.m_windowRightX;\n\t}",
"public double getRightXAxis() {\n\t\treturn getRawAx... | [
"0.85528827",
"0.8373238",
"0.80936",
"0.8039284",
"0.7775015",
"0.770141",
"0.7664508",
"0.76299596",
"0.7563973",
"0.7513233",
"0.7495229",
"0.7464652",
"0.745472",
"0.743613",
"0.74299806",
"0.74296373",
"0.7422329",
"0.7379661",
"0.7376426",
"0.73300475",
"0.7284616",
"... | 0.85715127 | 0 |
The getter that returns yTop coordinate | public int getYTop() {
return yTop;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getTopY() {\n\t\treturn topY;\n\t}",
"public int getY() {\r\n\t\t\r\n\t\treturn topY;\r\n\t}",
"public int getTopY() {\n\t\treturn 0;\r\n\t}",
"public int getYTopRight() {\n return yTopRight;\n }",
"public double getTop() {\n return this.yT;\n }",
"Point getTopXY();",
"... | [
"0.8873345",
"0.87438184",
"0.85687333",
"0.8222457",
"0.81706524",
"0.8084668",
"0.8020372",
"0.8002368",
"0.79734075",
"0.7965837",
"0.78994524",
"0.7835475",
"0.78194517",
"0.78193897",
"0.78193897",
"0.7815438",
"0.78147906",
"0.78029764",
"0.78026086",
"0.7799689",
"0.77... | 0.8919823 | 0 |
The setter for yTop coordinate | public void setYTop(int top) {
this.yTop = top;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getYTop() {\n return yTop;\n }",
"public float getTopY() {\n\t\treturn topY;\n\t}",
"public int getY() {\r\n\t\t\r\n\t\treturn topY;\r\n\t}",
"public void setY(int y){ yPosition = y; }",
"@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}",
"void setY(int newY) {\n this.yPos = n... | [
"0.79625875",
"0.7800294",
"0.7685133",
"0.7619933",
"0.75165695",
"0.74281484",
"0.73715776",
"0.7369329",
"0.73484105",
"0.7346463",
"0.7288197",
"0.72372955",
"0.7234346",
"0.72282976",
"0.7221921",
"0.72033745",
"0.719622",
"0.7184116",
"0.7184116",
"0.7184116",
"0.718411... | 0.8837264 | 0 |
The getter that returns xRight coordinate | public int getYBottom() {
return getYTop() + getYWidth();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getXRight() {\n return getXLeft() + getXLength();\n }",
"public int getRightX() {\n\t\treturn 0;\r\n\t}",
"public double getRight() {\n return this.xR;\n }",
"public int getXTopRight() {\n return xTopRight;\n }",
"protected double getWindowRightX() {\n\t\treturn this.m_wi... | [
"0.8571616",
"0.8552569",
"0.8373541",
"0.8092532",
"0.80395526",
"0.77745676",
"0.7701894",
"0.76651585",
"0.76297253",
"0.7563535",
"0.75141543",
"0.7492095",
"0.7461544",
"0.74538255",
"0.743493",
"0.7428776",
"0.7427034",
"0.74197406",
"0.7376752",
"0.73760635",
"0.733106... | 0.0 | -1 |
The getter that returns yWidth value | public int getYWidth() {
return yWidth;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getYSize()\n\t{\n\t\treturn this.ySize;\n\t}",
"public double getWidth()\r\n {\r\n return width;\r\n }",
"public double getWidth() {\r\n return width;\r\n }",
"public double getWidth() {\n\t\t\treturn width.get();\n\t\t}",
"double getYLength();",
"public double getWidth(... | [
"0.7625998",
"0.7575434",
"0.7552744",
"0.754295",
"0.7542909",
"0.7520479",
"0.7516373",
"0.75031877",
"0.75031877",
"0.75031877",
"0.7480299",
"0.74386096",
"0.74386096",
"0.7437527",
"0.7418134",
"0.73989546",
"0.73933727",
"0.73933727",
"0.73870045",
"0.73809475",
"0.7377... | 0.8848035 | 0 |
The setter for yWidth size | public void setYWidth(int width) {
this.yWidth = width;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getYWidth() {\n return yWidth;\n }",
"public void setYSize(int ySize) {\n\t\tif (ySize < 0) {\n\t\t\tSystem.out.println(\"ySize should be positive! It is set to \" + Y_SIZE + \".\");\n\t\t\tySize = Y_SIZE;\n\t\t}\n\t\tthis.ySize = ySize;\n\n\t\t// To update the panel with new values if necessary\n... | [
"0.7593079",
"0.7283042",
"0.7227504",
"0.7174224",
"0.6986545",
"0.6971834",
"0.6944459",
"0.6894413",
"0.685206",
"0.6848695",
"0.6811565",
"0.6811565",
"0.68084013",
"0.67985815",
"0.67924476",
"0.6777524",
"0.6755798",
"0.674552",
"0.67186934",
"0.6718354",
"0.67138326",
... | 0.8374308 | 0 |
The getter that returns xLength size | public int getXLength() {
return xLength;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLength() {\n return mySize.getLength();\n }",
"public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }",
"public long getLength();",
"public long getLength();",
"public int getLength() {\r\n return length;\r\n }",
"public int ... | [
"0.82629704",
"0.7997867",
"0.79170483",
"0.79170483",
"0.7857802",
"0.7857802",
"0.7857802",
"0.7827163",
"0.7820254",
"0.78043747",
"0.78043747",
"0.78043747",
"0.7782361",
"0.7775139",
"0.77726734",
"0.7766073",
"0.77639407",
"0.77639407",
"0.7761603",
"0.7761603",
"0.7761... | 0.80671734 | 1 |
The setter for xLength size | public void setXLength(int length) {
this.xLength = length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}",
"public int getXLength() {\n return xLength;\n }",
"public void setLength(long length);",
"public void setLength(long length);",
"public void setLength(int length) {\r\n this.length = length;\r\n }",
"public void setLength(int le... | [
"0.72242606",
"0.718216",
"0.71191084",
"0.71191084",
"0.7101478",
"0.7101478",
"0.7068937",
"0.70411885",
"0.6994938",
"0.69554603",
"0.69439197",
"0.6939507",
"0.6893014",
"0.6881288",
"0.68544585",
"0.68544585",
"0.68544585",
"0.6812726",
"0.6808757",
"0.67717105",
"0.6741... | 0.7927222 | 0 |
The getter that returns regNum value | public int getRegNum() {
return regNum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getRegNumber() {\r\n return regNumber;\r\n }",
"public int getReg() {\n\t\treturn -1;\n\t}",
"public String getNum() {\r\n return num;\r\n }",
"public String getNum() {\n return num;\n }",
"public String getNum() {\n return num;\n }",
"publi... | [
"0.8077133",
"0.7799973",
"0.73602206",
"0.73157096",
"0.73157096",
"0.7305178",
"0.7285849",
"0.7270921",
"0.7199921",
"0.7199921",
"0.71879834",
"0.71848506",
"0.71748525",
"0.7171194",
"0.7166588",
"0.7153962",
"0.7130888",
"0.70962846",
"0.7017642",
"0.701358",
"0.6989806... | 0.8468812 | 0 |
The setter for the regNum | private void setRegNum(int regNum) {
this.regNum = regNum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRegNumber(java.lang.String regNumber) {\r\n this.regNumber = regNumber;\r\n }",
"public void setRegno(String regno)\n {\n if(checker.acceptRegno(regno))\n this.regno = regno;\n else\n this.regno = \"\";\n }",
"public void setRegisNo(String regisNo)\n ... | [
"0.74196166",
"0.7133765",
"0.69849396",
"0.6936834",
"0.6813916",
"0.6796529",
"0.6783839",
"0.6713266",
"0.6609783",
"0.6591229",
"0.6461941",
"0.64204",
"0.6367175",
"0.6346447",
"0.6346447",
"0.6344969",
"0.6336406",
"0.6316128",
"0.6262808",
"0.62130624",
"0.6200237",
... | 0.8606664 | 0 |
return Area of property using formula by length width | public int getArea() {
return (getXLength() * getYWidth());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }",
"public double area(){\n\t\tdouble area=length*width;\r\n\t\treturn area;\r\n\t}",
"@Override\n public double area()\n {\n\treturn (double) length * width;\n }",
"public double calcArea() {\r\n\t\tdouble area = length * wid... | [
"0.791034",
"0.78370535",
"0.7820234",
"0.77819127",
"0.7755296",
"0.77395904",
"0.7731333",
"0.76853126",
"0.76683056",
"0.76539665",
"0.7626959",
"0.7626959",
"0.7588572",
"0.75085366",
"0.74994636",
"0.74861944",
"0.74747837",
"0.74624807",
"0.74320287",
"0.74267495",
"0.7... | 0.7092884 | 42 |
calculate tax of Property by area TAX_RATE_PER_M2 | public double getTaxes() {
return getArea() * TAX_RATE_PER_M2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getTax();",
"public Double getTax();",
"BigDecimal getTax();",
"public float calculateTax(String state, Integer flatRate);",
"public abstract double calculateTax();",
"public double calcTax() {\n\t\treturn 0.2 * calcGrossWage() ;\n\t}",
"public double calculateTax(double amount){\n return... | [
"0.66450024",
"0.64928055",
"0.6452087",
"0.64291775",
"0.64245456",
"0.63696355",
"0.636241",
"0.635273",
"0.63371366",
"0.6272838",
"0.6269119",
"0.62547034",
"0.61714745",
"0.61060494",
"0.6088926",
"0.6067379",
"0.60589135",
"0.60423803",
"0.60312974",
"0.6012668",
"0.598... | 0.6961082 | 0 |
The toString method that returns the string to print out | @Override
public String toString() {
// using String.format to display out put value and infomation of Property
return String.format(
"\nCoordinates: %d, %d\n" + "Length: %d m Width: %d m\n" + "Registrant: #%d\nArea: %d m2\n"
+ "Property Taxes : $%.1f",
this.getXLeft(), this.getYTop(), this.getXLength(), this.getYWidth(), this.getRegNum(), this.getArea(),
this.getTaxes());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"Str... | [
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"0.8754671",
"... | 0.0 | -1 |
check if the xLeft and yTop of this is equal to obj | @Override
public boolean equals(Object obj) {
// this code provided by Dave Houtman [2020] personal communication
if (!(obj instanceof Property))
return false;
Property prop = (Property) obj;
return this.getXLeft() == prop.getXLeft() && this.getYTop() == prop.getYTop() && hasSameSides(prop);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isIntersectingWithViewport(ObjectWithPosition obj){\n if(this.bounds.intersect(obj.getBounds()))\n return true;\n else return false;\n }",
"public boolean isWithinObject(int x, int y)\n {\n if( x > coX-Xsize/2 &&\n x < coX+Xsize/2 &&\n y ... | [
"0.6537717",
"0.6479366",
"0.6410143",
"0.6304278",
"0.62743014",
"0.62683463",
"0.6242063",
"0.6211866",
"0.6204778",
"0.61811537",
"0.61728036",
"0.6126273",
"0.6124601",
"0.6122075",
"0.6100182",
"0.60853326",
"0.60496783",
"0.6031916",
"0.6031347",
"0.59975934",
"0.599685... | 0.6701212 | 0 |
check if the xLength and yWidth of this is equal to obj | public boolean hasSameSides(Property prop) {
// this code provided by Dave Houtman [2020] personal communication
return this.getXLength() == prop.getXLength() && this.getYWidth() == prop.getYWidth();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean equals(Object obj)\r\n\t{\r\n\t\tif (obj instanceof FloatDimension)\r\n\t\t{\r\n\t\t\tFloatDimension dimension = (FloatDimension)obj;\r\n\t\t\treturn dimension.width == width && dimension.height == height;\r\n\t\t}\r\n\t\treturn super.equals(obj);\r\n\t}",
"@Override\n public boolean equals(Objec... | [
"0.6764187",
"0.62619334",
"0.60937107",
"0.6055153",
"0.6055153",
"0.6055153",
"0.59705555",
"0.5965954",
"0.59423107",
"0.59244984",
"0.58377343",
"0.5834507",
"0.5813304",
"0.58089465",
"0.57797414",
"0.5778495",
"0.5731868",
"0.5686089",
"0.56860024",
"0.5678012",
"0.5667... | 0.63129425 | 1 |
ThePatelGuy(2019). Check if two rectangles overlap at any point.[Webpage]. Retrieved from | public boolean overLaps(Property prop) {
if (this.getXRight() <= prop.getXLeft() || this.getXLeft() >= prop.getXRight()
|| this.getYTop() >= prop.getYBottom() || this.getYBottom() <= prop.getYTop()) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static boolean rectanglesOverlap(Rectangle r1, Rectangle r2){\n List<int[]> pointsOfInterest = new ArrayList<int[]>();\n for (int[] i : r1.getPoints())\n for (int[] j : r2.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); ... | [
"0.7459399",
"0.6985812",
"0.6981745",
"0.68845785",
"0.68672943",
"0.6678339",
"0.6612196",
"0.65365386",
"0.6471377",
"0.6460414",
"0.6438621",
"0.6382663",
"0.63670516",
"0.6331207",
"0.6314152",
"0.6314152",
"0.6293453",
"0.626898",
"0.6267849",
"0.6257837",
"0.6254159",
... | 0.0 | -1 |
return (a / b) % b; | public static boolean dividesEvenly(int a, int b) {
if ((a % b) == 0) {
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }",
"public int modulo(int a, int b) {\n return a % b;\n }",
"private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}",
"private static int wrap(int a, ... | [
"0.80061954",
"0.7947117",
"0.7859751",
"0.7844171",
"0.7540139",
"0.7323108",
"0.71928996",
"0.714367",
"0.7097991",
"0.69693875",
"0.6955937",
"0.69270444",
"0.6850551",
"0.6831497",
"0.68274605",
"0.68133223",
"0.681181",
"0.6800868",
"0.67441964",
"0.67296505",
"0.6678904... | 0.62911075 | 39 |
/ Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. | public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int[] arr = new int[N];
for (int i = 0; i < N; i++) {
arr[i] = in.nextInt();
}
Arrays.sort(arr);
int size = arr.length;
int index = 0;
while (size > 0) {
System.out.println(size);
int count = 0;
while (index + count < N && arr[index] == arr[index + count]) {
count++;
}
size -= count;
index += count;
count = 0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t//Scanner in = new Scanner(System.in);\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in... | [
"0.75280106",
"0.7303422",
"0.72608393",
"0.72363067",
"0.7178064",
"0.71745384",
"0.7022264",
"0.7022264",
"0.68939406",
"0.68699366",
"0.6857948",
"0.68238825",
"0.68213546",
"0.6809923",
"0.6807801",
"0.6805596",
"0.6782698",
"0.6770123",
"0.6755418",
"0.6753114",
"0.67508... | 0.0 | -1 |
Notification of user being revoked | public void onEventMainThread(RevokedStateEvent event) {
if (event.isRevoked()) {
EventBus.getDefault().unregister(this);
stopSelf();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void revoke();",
"void setShowRevokedStatus(boolean b);",
"public void cancelInvitionUser() {\n\n }",
"public void revokePermission(String objectId, User user, List<String> actions) throws UserManagementException;",
"User canceledUserRegistration(User user) throws LogicException;",
"@Test\n ... | [
"0.6393377",
"0.6324762",
"0.6279051",
"0.6188113",
"0.6113249",
"0.6084953",
"0.6072121",
"0.6067679",
"0.59760326",
"0.5959993",
"0.5930236",
"0.5900153",
"0.58995295",
"0.5835476",
"0.58194214",
"0.58164245",
"0.5744724",
"0.5703774",
"0.5703774",
"0.57034355",
"0.5701815"... | 0.510374 | 97 |
Created by Jasmina on 16/06/2018. | public interface EBookService {
List<EBookDTO> readAll();
List<EBookDTO> readByCategory(Long categoryId);
EBookDTO readById(Long id);
EBookDTO create(EBookDTO eBookDTO);
EBookDTO saveAndIndex(EBookDTO eBookDTO);
EBookDTO update(Long id, EBookDTO eBookDTO);
boolean delete(Long id);
File saveEBookFile(byte[] bytes) throws IOException;
EBookBaseDTO prepareBase(File file);
boolean indexEBook(EBook eBook);
boolean deleteEBookIndex(EBook eBook);
File getFile(EBook eBook);
File getFile(Long id);
String getFileName(Long id);
boolean deleteFile(String filename);
Resource loadFile(Long id);
String loadFileString(Long id);
List<ResultData> search(SingleFieldSearchDTO singleFieldSearchDTO);
List<ResultData> search(MultipleFieldSearchDTO multipleFieldSearchDTO);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpu... | [
"0.59297806",
"0.57336146",
"0.5680874",
"0.5567445",
"0.5526541",
"0.5526541",
"0.55209625",
"0.54915726",
"0.5472746",
"0.54656047",
"0.5453962",
"0.5427435",
"0.5427435",
"0.5427435",
"0.5427435",
"0.5427435",
"0.5427435",
"0.5426115",
"0.53946054",
"0.5391418",
"0.5386152... | 0.0 | -1 |
/ Konstruktor til klassen Spill hvor vi gjor alt | Spill(){
in = new Scanner(System.in);
spiller = new Spiller(in.nextLine());
datamaskin = new Spiller("Datamaskin"); // oppretter en datamaskin-spiller
spillSteinSaksPapir();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getClass_();",
"Object getClass_();",
"public MijnKlasse()\r\n\t\t{\r\n\t\t\tmijnMethode();\r\n\t\t}",
"public void consulterClassement() {\n\t\t\n\t}",
"private UsineJoueur() {}",
"public SlanjePoruke() {\n }",
"Klassenstufe createKlassenstufe();",
"public OOP_207(){\n\n }",
"public C... | [
"0.6940118",
"0.6940118",
"0.68967265",
"0.6875544",
"0.6483071",
"0.64481795",
"0.6445633",
"0.6424494",
"0.6381903",
"0.6367914",
"0.6364356",
"0.6355026",
"0.6342006",
"0.63310325",
"0.63290226",
"0.6328987",
"0.630715",
"0.61913407",
"0.61846656",
"0.61309856",
"0.6123979... | 0.0 | -1 |
/Metode for aa sjekke hvem som vant | public void finnVinner(){
if (spiller.harStein() && datamaskin.harPapir()){
System.out.println(datamaskin + " har vunnet");
}else if (spiller.harStein() && datamaskin.harSaks()){
System.out.println(spiller + " har vunnet");
}else if (spiller.harSaks() && datamaskin.harPapir()){
System.out.println(spiller + " har vunnet");
}else if (spiller.harSaks() && datamaskin.harStein()){
System.out.println(datamaskin + "har vunnet");
}else if (spiller.harPapir() && datamaskin.harStein()){
System.out.println(spiller + " har vunnet");
}else if (spiller.harPapir() && datamaskin.harSaks()){
System.out.println(datamaskin + " har vunnet");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String dohvatiKontakt();",
"public void trenneVerbindung();",
"public void asetaTeksti(){\n }",
"private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
... | [
"0.6830317",
"0.67231303",
"0.67187625",
"0.6545737",
"0.6430167",
"0.6412619",
"0.64112294",
"0.6384824",
"0.6328984",
"0.6272359",
"0.6269688",
"0.626554",
"0.6216983",
"0.6210813",
"0.6205256",
"0.62012583",
"0.6185004",
"0.6182159",
"0.6174468",
"0.61697793",
"0.6164477",... | 0.0 | -1 |
API of logic component for deliverable (should only have one interface for logic, change later) | public interface LogicDeliverable {
/**
* Executes the command and returns the result.
* @param commandText The command as entered by the user.
* @return the result of the command execution.
* @throws CommandException If an error occurs during command execution.
* @throws ParseException If an error occurs during parsing.
*/
CommandResult execute(String commandText) throws CommandException, ParseException;
/**
* Returns the DeliverableBook.
*
* @see ModelDeliverable#getDeliverableBook()
*/
ReadOnlyDeliverableBook getDeliverableBook();
/** Returns an unmodifiable view of the filtered list of deliverables */
ObservableList<Deliverable> getFilteredDeliverableList();
/** Returns the internal list of deliverables */
ObservableList<Deliverable> getInternalDeliverableList();
/** Returns the deliverable that is currently in view */
Deliverable getDeliverableInView();
/**
* Returns the user prefs' deliverable book file path.
*/
Path getDeliverableBookFilePath();
/**
* Returns the user prefs' GUI settings.
*/
GuiSettings getGuiSettings();
/**
* Set the user prefs' GUI settings.
*/
void setGuiSettings(GuiSettings guiSettings);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Delivery {\n\n void postDelivery(PlusRequest<?> plusRequest, Response<?> response);\n}",
"public interface CommunicationService {\n public String postDeployment(UnitDeliveryResource unitDeliveryResource);\n\n public String postService(UnitServiceResource unitServiceResource);\n\n pub... | [
"0.6529892",
"0.6496352",
"0.6375498",
"0.63557124",
"0.63249147",
"0.63241595",
"0.62786806",
"0.6251816",
"0.62358946",
"0.61297876",
"0.61076164",
"0.6066607",
"0.6047828",
"0.6036405",
"0.60297155",
"0.6006085",
"0.59880686",
"0.59533435",
"0.5946167",
"0.59422725",
"0.59... | 0.7749695 | 0 |
Executes the command and returns the result. | CommandResult execute(String commandText) throws CommandException, ParseException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"CommandResult execute();",
"CommandResult execute(String commandText) throws Exception;",
"protected String execute(String command)\n {\n if (this.isValid()) { \n try { \n JSch jsch = new JSch(); \n jsch.addIdentity(t... | [
"0.74551815",
"0.7035694",
"0.67570883",
"0.6724153",
"0.6695187",
"0.6687024",
"0.6687024",
"0.6687024",
"0.6674072",
"0.6486407",
"0.64638346",
"0.64378214",
"0.6309831",
"0.6302412",
"0.6300366",
"0.6294803",
"0.6294118",
"0.62903875",
"0.6281694",
"0.62784654",
"0.6260825... | 0.6678805 | 10 |
Returns an unmodifiable view of the filtered list of deliverables | ObservableList<Deliverable> getFilteredDeliverableList(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ObservableList<Deliverable> getInternalDeliverableList();",
"public java.util.List<WorldUps.UGoDeliver> getDeliveriesList() {\n if (deliveriesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(deliveries_);\n } else {\n return deliveriesBuilder_.getMessageList();\... | [
"0.6864815",
"0.63063014",
"0.60482556",
"0.5894008",
"0.5886563",
"0.58856124",
"0.5842843",
"0.5833336",
"0.5729736",
"0.56789935",
"0.5636922",
"0.5636397",
"0.5549471",
"0.554676",
"0.553067",
"0.55284554",
"0.54646784",
"0.5464577",
"0.54138833",
"0.5384799",
"0.5328079"... | 0.7773545 | 0 |
Returns the internal list of deliverables | ObservableList<Deliverable> getInternalDeliverableList(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List<WorldUps.UGoDeliver> getDeliveriesList() {\n if (deliveriesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(deliveries_);\n } else {\n return deliveriesBuilder_.getMessageList();\n }\n }",
"java.util.List<WorldUps.UDeliveryMade>... | [
"0.7045563",
"0.68881285",
"0.6839345",
"0.6788551",
"0.65542793",
"0.64947176",
"0.6396337",
"0.62168926",
"0.6210158",
"0.61779666",
"0.61398894",
"0.61375433",
"0.6124526",
"0.6076981",
"0.6042919",
"0.5947919",
"0.5865431",
"0.58590275",
"0.5845016",
"0.5830924",
"0.58194... | 0.773432 | 0 |
Returns the deliverable that is currently in view | Deliverable getDeliverableInView(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isDeliverable() {\n if (getMode().isCollection() || !isCarried()) return false;\n return Map.isSameLocation(plan.cdst, carrier.getLocation());\n }",
"@Override\n\tpublic boolean isDeliverable() {\n\t\treturn true;\n\t}",
"public boolean isDelivered() {\n return !getMode()... | [
"0.67460436",
"0.64641565",
"0.63814074",
"0.6190437",
"0.6106238",
"0.59694546",
"0.58896613",
"0.5848677",
"0.5686198",
"0.56515765",
"0.5606476",
"0.55845636",
"0.5579025",
"0.5551794",
"0.5539016",
"0.5499753",
"0.5445166",
"0.5431576",
"0.5422804",
"0.53991914",
"0.53919... | 0.8601268 | 0 |
Returns the user prefs' deliverable book file path. | Path getDeliverableBookFilePath(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Path getUserPrefsFilePath() {\n return userPrefsStorage.getUserPrefsFilePath();\n }",
"public static Path getUserSaveDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null));\n\t}",
"Path getAddressBookFilePath();",
"public static File getPreferencesDirector... | [
"0.70415527",
"0.65636665",
"0.63289833",
"0.6203356",
"0.6198801",
"0.6189864",
"0.6173233",
"0.6162748",
"0.6111891",
"0.60363406",
"0.5974701",
"0.59600204",
"0.5936732",
"0.58095443",
"0.57601255",
"0.5708091",
"0.5686362",
"0.56837285",
"0.5670188",
"0.5612367",
"0.55845... | 0.7980686 | 0 |
Returns the user prefs' GUI settings. | GuiSettings getGuiSettings(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ReactivePreferences preferences() {\n\t\treturn ReactivePreferences.userRoot();\n\t}",
"GuiSettings getCurrentGuiSetting() {\n return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),\n (int) primaryStage.getX(), (int) primaryStage.getY());\n }",
"ReadOnlyUserPr... | [
"0.6816022",
"0.6768748",
"0.67441183",
"0.67441183",
"0.67441183",
"0.67441183",
"0.66998833",
"0.6665768",
"0.6560002",
"0.64900774",
"0.6487052",
"0.6462275",
"0.6316966",
"0.6316718",
"0.6295891",
"0.62830025",
"0.6245727",
"0.6164226",
"0.6161001",
"0.61140084",
"0.61110... | 0.7832417 | 6 |
Set the user prefs' GUI settings. | void setGuiSettings(GuiSettings guiSettings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSettings(UserPrefs prefs) {\n tfDataPath.setText(prefs.getProperty(UserPrefs.DATA_ROOT));\n // Save this for a comparison later\n existingDataPath = prefs.getProperty(UserPrefs.DATA_ROOT);\n\n String backup = prefs.getProperty(UserPrefs.BACKUP_FOLDER);\n // Nothing... | [
"0.78317875",
"0.69390213",
"0.66959566",
"0.66888314",
"0.6654882",
"0.6621704",
"0.66071826",
"0.65355814",
"0.63041353",
"0.6288255",
"0.6260576",
"0.624673",
"0.61866",
"0.61674017",
"0.61674017",
"0.61674017",
"0.61674017",
"0.61674017",
"0.61674017",
"0.61674017",
"0.61... | 0.7727082 | 7 |
Returns a SFML Color based on the tile's type | private Color determineColorFromType(String type)
{
Iterator<String> iterator = this.tileTypeColorMap.keySet().iterator();
while (iterator.hasNext())
{
String key = iterator.next();
if (key == type)
{
return tileTypeColorMap.get(key);
}
}
return this.ERROR_COLOR;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Color getColor(BlockType type) {\n\t\tswitch (type) {\n\t\tcase Z : \n\t\t\treturn z;\n\t\tcase S :\n\t\t\treturn s;\n\t\tcase LEFT :\n\t\t\treturn left;\n\t\tcase RIGHT : \n\t\t\treturn right;\n\t\tcase LINE :\n\t\t\treturn line;\n\t\tcase TRIANGLE :\n\t\t\treturn tri;\n\t\tcase SQUARE :\n\t\t\treturn squa... | [
"0.6829812",
"0.6789101",
"0.64524007",
"0.6309163",
"0.6243598",
"0.6151531",
"0.61470884",
"0.61470884",
"0.61470884",
"0.61470884",
"0.61470884",
"0.6104537",
"0.5984494",
"0.59787494",
"0.59663194",
"0.594107",
"0.59362304",
"0.5921079",
"0.5917269",
"0.5917269",
"0.59136... | 0.7359738 | 0 |
Loops the glyphs and draws them all to the screen | public void renderMap(GameMap gameMap, Player player)
{
this.drawMapGlyphs(gameMap, player);
// this.getGlyphs(gameMap, player);
// for(Text text : this.getGlyphs(gameMap))
// window.getRenderWindow().draw(text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n ... | [
"0.6658745",
"0.6547148",
"0.6515815",
"0.64729714",
"0.64443815",
"0.6361403",
"0.632005",
"0.62867004",
"0.6271745",
"0.6242199",
"0.62169725",
"0.6215647",
"0.6196041",
"0.6181473",
"0.6154363",
"0.61170346",
"0.61029226",
"0.6088035",
"0.6075837",
"0.6071251",
"0.60531074... | 0.0 | -1 |
This is previous page_terms | public List<PageNode> getPages() {
return page_terms;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void previousPage() throws IndexOutOfBoundsException;",
"private void prevPage()\n {\n if(currentPage - 1 >= 1)\n {\n nextPageButton.setEnabled(true);\n if(currentPage -2 < 1)\n prevPageButton.setEnabled(false);\n \n paginate(--currentPa... | [
"0.6087295",
"0.6076642",
"0.6061875",
"0.59544975",
"0.5936211",
"0.5909506",
"0.58590496",
"0.5857581",
"0.5810854",
"0.5803336",
"0.5748241",
"0.57017356",
"0.5697384",
"0.5674848",
"0.5652355",
"0.5630291",
"0.5614658",
"0.56139165",
"0.55801034",
"0.5557516",
"0.55568814... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
for(int count = 1 ; count <=3 ; ++count) {
System.out.print(count+"★★★★");//요자리 요거 대신에 13~15행의 내용??
System.out.println();
}
for( int col = 1; col <=4 ; col++ ) {
System.out.print('★');
}
System.out.println("///////////");
for(int count = 1 ; count <=3 ; ++count) {
for(int col = 1 ; count <=4 ; col++) {
System.out.print('★');
}
System.out.println();
}
} | {
"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 |
Methods for LOGIN MODULE | @RequestMapping(value = "/user/loginForm", method = RequestMethod.GET)
public ModelAndView loginForm(HttpServletRequest request) {
log.debug("User login");
String communityId = "-1";
ModelAndView model=new ModelAndView("form/login","command",new User());
model.addObject("selectedCommunity", communityId);
return model;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void login() {\n\t\t\r\n\t}",
"public static void Login() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void login() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void login() {\n\r\n\t}",
"Login() { \n }",
"public void LogIn() {\n\t\t\r\n\t}",
"private void login(String username,String password... | [
"0.7940014",
"0.79192984",
"0.77405554",
"0.7600756",
"0.7579557",
"0.7558272",
"0.75383663",
"0.7350786",
"0.7341708",
"0.73357123",
"0.72461796",
"0.7229644",
"0.72250503",
"0.72131",
"0.7204095",
"0.7199166",
"0.7189963",
"0.7151239",
"0.711982",
"0.71103436",
"0.709917",
... | 0.0 | -1 |
Methods for REGISTRATION MODULE | @RequestMapping(value = "/user/registrationForm", method = RequestMethod.GET)
public ModelAndView registrationForm(HttpServletRequest request) {
log.debug("User registration");
String communityId = "-1";
ModelAndView model=new ModelAndView("form/registration","command",new User());
model.addObject("selectedCommunity", communityId);
return model;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"RegistrationModule createRegistrationModule();",
"private reg1() {\n }",
"public abstract void register();",
"String regen();",
"private void registToWX() {\n }",
"void register();",
"public void register(){\n }",
"Registry getRegistry();",
"Registry getRegistry();",
"Registry getReg... | [
"0.6860322",
"0.6580184",
"0.65491456",
"0.6496682",
"0.64664465",
"0.64492106",
"0.6382805",
"0.6315728",
"0.6315728",
"0.6313044",
"0.62832856",
"0.628272",
"0.626372",
"0.6244169",
"0.62423766",
"0.62423766",
"0.6178976",
"0.6161297",
"0.6112476",
"0.6047629",
"0.60371435"... | 0.0 | -1 |
Method for Forgot Password | @RequestMapping(value = "/user/forgotPasswordForm", method = RequestMethod.GET)
public ModelAndView forgotPasswordForm(HttpServletRequest request) {
ModelAndView model=new ModelAndView("form/forgotPassword","command",new User());
return model;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void onForgetPwd() {\n Intent intent = new Intent(this, ForgotPasswordActivity.class);\n startActivity(intent);\n finish();\n }",
"public void clickForgotPassword() {\r\n\t\tutilities.clickOnElement(aForgotPassword);\r\n\t}",
"private void getResetPassword() {\n\t\t// TODO Auto-... | [
"0.7318434",
"0.72286946",
"0.69949764",
"0.69793886",
"0.6927798",
"0.68959534",
"0.68718326",
"0.68265975",
"0.68159556",
"0.67596704",
"0.6702235",
"0.66954213",
"0.6644417",
"0.6627165",
"0.66226095",
"0.65963393",
"0.659602",
"0.6594267",
"0.65510994",
"0.6531558",
"0.65... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public ArrayList<CauThu> getDSCauThu(String maDoi) {
return null;
} | {
"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 |
Get Report List request sample returns a list of reports; by default the most recent ten reports, regardless of their acknowledgement status | private static void invokeGetReportList(MarketplaceWebService service, GetReportListRequest request)
{
try
{
GetReportListResponse response = service.getReportList(request);
System.out.println("3454823177017127");
}
catch (MarketplaceWebServiceException ex)
{
System.out.println("Caught Exception: " + ex.getMessage());
System.out.println("Response Status Code: " + ex.getStatusCode());
System.out.println("Error Code: " + ex.getErrorCode());
System.out.println("Error Type: " + ex.getErrorType());
System.out.println("Request ID: " + ex.getRequestId());
System.out.print("XML: " + ex.getXML());
System.out.println("ResponseHeaderMetadata: " + ex.getResponseHeaderMetadata());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(method = RequestMethod.GET, value = \"/getReports\")\r\n public List<Reports> getReports() {\r\n\r\n List<Reports> results = reportsRepository.getReportsByDate();\r\n return results;\r\n\r\n }",
"List<ReportDescriptor> getReportDescriptors();",
"@Path(\"/list\")\n @GET\n ... | [
"0.7072525",
"0.6873185",
"0.67181987",
"0.6599422",
"0.65726197",
"0.6399923",
"0.6327831",
"0.632128",
"0.62480885",
"0.6233416",
"0.62065446",
"0.6197544",
"0.6175207",
"0.6163015",
"0.6138302",
"0.61346805",
"0.6103605",
"0.6097305",
"0.6039529",
"0.60188025",
"0.59855354... | 0.63838637 | 6 |
TODO Autogenerated method stub | @Override
public Object getItem(int arg0) {
return null;
} | {
"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 getItemId(int position) {
return 0;
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Raw height and width of image | public int calculateInSampleSize(
BitmapFactory.Options options, int reqWidth, int reqHeight) {
final int height = options.outHeight;
final int width = options.outWidth;
int inSampleSize = 1;
if (height > reqHeight || width > reqWidth) {
if (width > height) {
inSampleSize = Math.round((float)height / (float)reqHeight);
} else {
inSampleSize = Math.round((float)width / (float)reqWidth);
}
}
return inSampleSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getImageHeight() {\n\treturn height;\n }",
"public int getImageWidth() {\n\treturn width;\n }",
"private void getImgSize(){\n imgSizeX = 1080; //mAttacher.getDisplayRect().right - mAttacher.getDisplayRect().left;\n imgSizeY = 888.783f; //mAttacher.getDisplayRect().botto... | [
"0.7013478",
"0.699988",
"0.67583126",
"0.6750033",
"0.6720698",
"0.669873",
"0.6689511",
"0.66860753",
"0.66664755",
"0.65853953",
"0.6539114",
"0.6529669",
"0.6516078",
"0.65081245",
"0.64257",
"0.63865346",
"0.63722134",
"0.63092506",
"0.6291426",
"0.6288455",
"0.6252946",... | 0.0 | -1 |
Defines hashing for a type. | @FunctionalInterface
public interface Hashing<A>
{
/**
* <p>
* See {@link Object#hashCode()}.
* </p>
*
* @param a
* the thing whose hash code is to be computed
*
* @return
* the hash code of the thing
*/
int hashCodeOf (A a);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getHashType() {\n\t\treturn _hash_type;\n\t}",
"public HashAlgorithm getHashInstance(int type) {\n switch (type){\n case Average_Hash:\n return new AverageHashAlgorithm();\n case Difference_Hash:\n return new DifferenceHashAlgorithm();\n ... | [
"0.7387302",
"0.6893273",
"0.6782454",
"0.6771881",
"0.67345697",
"0.6650856",
"0.66252804",
"0.6591038",
"0.6529147",
"0.6461094",
"0.64430267",
"0.6399238",
"0.63879067",
"0.63791656",
"0.63748586",
"0.63638145",
"0.6340492",
"0.627147",
"0.6264796",
"0.6172105",
"0.6172105... | 0.0 | -1 |
Created by znaznazna on 12/5/2016. | public interface DBUpdateListener {
void onSuccess(int operationType);
void onFailure();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\... | [
"0.61329395",
"0.5871224",
"0.58459777",
"0.5800242",
"0.5787542",
"0.5781705",
"0.57731485",
"0.57731485",
"0.57727563",
"0.57375044",
"0.5737001",
"0.56903553",
"0.56643647",
"0.56639177",
"0.5648756",
"0.5617466",
"0.5612185",
"0.55949014",
"0.5591008",
"0.55691254",
"0.55... | 0.0 | -1 |
Get the display name of the ingredient. | public abstract String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDispl... | [
"0.728732",
"0.728732",
"0.728732",
"0.728732",
"0.728732",
"0.728732",
"0.70825523",
"0.70825523",
"0.70825523",
"0.70825523",
"0.70825523",
"0.70825523",
"0.7030718",
"0.70163023",
"0.69530207",
"0.68597925",
"0.68187845",
"0.6803337",
"0.6803337",
"0.6798222",
"0.6798222",... | 0.0 | -1 |
Create a new ingredient object. | public abstract Ingredient getNew(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Ingredient() { }",
"public Ingredient(){\r\n\t}",
"public Ingredient() {\n }",
"public Ingredient(){\r\n \r\n }",
"public void addIngredientRecipe(IngredientRecipePOJO ingr);",
"public Ingredient(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public static ItemIngredient of(String... | [
"0.72905207",
"0.72323155",
"0.7173357",
"0.7032844",
"0.6964622",
"0.68783116",
"0.65172327",
"0.6485407",
"0.6357105",
"0.6289212",
"0.6287944",
"0.62730354",
"0.6214655",
"0.619458",
"0.6124406",
"0.6091719",
"0.60845137",
"0.608329",
"0.6076012",
"0.6066685",
"0.6029073",... | 0.6563777 | 6 |
The Ingredient constructor with 1 parameter only, used to construct an ingredient of fixed volume. | public Ingredient(int fixed) {
this.volume = fixed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Ingredient(){\r\n\t}",
"public Ingredient() { }",
"public Ingredient() {\n }",
"public Ingredient(){\r\n \r\n }",
"public Ingredient(int lower, int upper) {\n\t\tRandom rand = new Random();\n\t\tthis.volume = lower + rand.nextInt(upper - lower + 1);\n\t}",
"public Ingredient(String na... | [
"0.75722075",
"0.7510604",
"0.73093003",
"0.72810894",
"0.7099039",
"0.7015046",
"0.67695934",
"0.66878283",
"0.6447795",
"0.6417808",
"0.62675416",
"0.62618554",
"0.62534136",
"0.6228305",
"0.6204192",
"0.6191742",
"0.6073974",
"0.6067007",
"0.6065281",
"0.60132813",
"0.5993... | 0.8573289 | 0 |
The Ingredient constructor with 2 parameters, used to construct an ingredient of random volume. | public Ingredient(int lower, int upper) {
Random rand = new Random();
this.volume = lower + rand.nextInt(upper - lower + 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Ingredient(){\r\n\t}",
"public Ingredient(int fixed) {\n\t\tthis.volume = fixed;\n\t}",
"public Ingredient() { }",
"public Ingredient(){\r\n \r\n }",
"public Ingredient() {\n }",
"public Ingredient(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public Ingredient(String nouveauNom,... | [
"0.75738925",
"0.7572835",
"0.75090706",
"0.73566234",
"0.73360044",
"0.71165276",
"0.66032445",
"0.6601803",
"0.64268064",
"0.63767153",
"0.6276023",
"0.622878",
"0.6178811",
"0.61640537",
"0.6079387",
"0.6053944",
"0.6018883",
"0.60160506",
"0.60113055",
"0.5933545",
"0.588... | 0.78439075 | 0 |
Get volume of the ingredient. | public int getVolume() {
return this.volume;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getVolume() {\n return mBundle.getInt(KEY_VOLUME);\n }",
"public double getVolume()\n {\n return volume / 512;\n }",
"public int getVolume() {\n return volume;\n }",
"public int getVolume() {\n return volume_;\n }",
"public int getVolume() {\n ... | [
"0.7730417",
"0.7567146",
"0.75192446",
"0.7491451",
"0.7477963",
"0.74196637",
"0.74048746",
"0.73807216",
"0.73728186",
"0.7357169",
"0.733355",
"0.7333491",
"0.73195463",
"0.72829884",
"0.72829884",
"0.7271723",
"0.723057",
"0.7215244",
"0.7204278",
"0.7175379",
"0.7167187... | 0.7349765 | 10 |
TODO Autogenerated method stub | @Override
public int saveLending(Lending lending) {
int key = 0;
System.out.println(lending);
try
{
connection = getConnection();
System.out.println("======================user=======================");
statement = connection.prepareStatement("insert into lending(user_id,lib_book_id,lending_date,return_date,returned_date,status) values(?,?,?,?,?,?);",
Statement.RETURN_GENERATED_KEYS);
statement.setInt(1, lending.getUser().getId());
statement.setInt(2, lending.getBook().getId());
statement.setString(3, lending.getLending_date());
statement.setString(4, lending.getReturn_date());
statement.setString(5, lending.getReturned_date());
statement.setInt(6, lending.getLending_status());
statement.executeUpdate();
ResultSet generatedKeys = statement.getGeneratedKeys();
if(generatedKeys.next())
{
System.out.println("Insertion done successfully...");
System.out.println("Registration id = ");
key = generatedKeys.getInt(1);
}
else
{
System.out.println("Registration id = not found ");
}
}
catch(SQLException e)
{
System.out.println("Error occured in insertion");
e.printStackTrace();
}
closeDBResource();
return key;
} | {
"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 boolean updateLending(Lending lending) {
boolean is_update = false;
try
{
connection = getConnection();
statement = connection.prepareStatement("update lending set "+ getAllColumnName()+ "where id=?");
statement.setInt(1, lending.getUser().getId());
statement.setInt(2, lending.getBook().getId());
statement.setString(3,lending.getLending_date());
statement.setString(4, lending.getReturn_date());
statement.setString(5, lending.getReturned_date());
statement.setInt(6,lending.getLending_status());
statement.setInt(7,lending.getId());
int check_id = statement.executeUpdate();
is_update = check_id>0;
if(is_update)
{
Constants.Response.MSG = Constants.Response.MSG_SUCCESS;
}
else
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
System.out.println("Updation Failed");
}
}
catch(SQLException e)
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
System.out.println("Error occured in insertion");
e.printStackTrace();
}
closeDBResource();
return is_update;
} | {
"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.66713095",
"0.6567948",
"0.652319",
"0.648097",
"0.64770466",
"0.64586824",
"0.64132667",
"0.6376419",
"0.62759",
"0.62545097",
"0.62371093",
"0.62237984",
"0.6201738",
"0.619477",
"0.619477",
"0.61924416",
"0.61872935",
"0.6173417",
"0.613289",
"0.6127952",
"0.6080854",
... | 0.0 | -1 |
TODO Autogenerated method stub | private String getAllColumnName() {
StringBuilder builder = new StringBuilder();
// .append(COLUMN_id).append("=?,").
builder.append("user_id").append("=?,");
builder.append("lib_book_id").append("=?,");
builder.append("lending_date").append("=?,");
builder.append("return_date").append("=?,");
builder.append("returned_date").append("=?,");
builder.append("status").append("=?");
return builder.toString();
} | {
"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 Lending findLendingById(int id) {
Lending lending = new Lending();
ResultSet resultset = null;
try
{
connection = getConnection();
statement = connection.prepareStatement("select * from lending where id=?;");
statement.setInt(1,id);
resultset = statement.executeQuery();
while(resultset!=null && resultset.next())
{
int user_id = resultset.getInt(2);
UserService us_se = new UserServiceImpl();
User user = us_se.findUserById(user_id);
int lib_book_id = resultset.getInt(3);
LibraryBookService lb_se = new LibraryBookServiceImpl();
LibraryBook book = lb_se.findLibraryBookById(lib_book_id);
String lending_date = resultset.getString(4);
String return_date = resultset.getString(5);
String returned_date = resultset.getString(6);
int lending_status = resultset.getInt(7);
lending = new Lending(id,user,book,lending_date,return_date,returned_date,lending_status);
Constants.Response.MSG = Constants.Response.MSG_SUCCESS;
}
}
catch(SQLException e)
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
System.out.println("Error occured in finding data");
e.printStackTrace();
}
closeDBResource();
return lending;
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Lending> findAllLending() {
List<Lending> objectList = new ArrayList<Lending>();
Lending lending = new Lending();
ResultSet resultset = null;
try
{
connection = getConnection();
statement = connection.prepareStatement("select * from lending;");
resultset = statement.executeQuery();
while(resultset!=null && resultset.next())
{
int id = resultset.getInt(1);
int user_id = resultset.getInt(2);
UserService us_se = new UserServiceImpl();
User user = us_se.findUserById(user_id);
int lib_book_id = resultset.getInt(3);
LibraryBookService lb_se = new LibraryBookServiceImpl();
LibraryBook book = lb_se.findLibraryBookById(lib_book_id);
String lending_date = resultset.getString(4);
String return_date = resultset.getString(5);
String returned_date = resultset.getString(6);
int lending_status = resultset.getInt(7);
lending = new Lending(id,user,book,lending_date,return_date,returned_date,lending_status);
objectList.add(lending);
Constants.Response.MSG = Constants.Response.MSG_SUCCESS;
}
}
catch(SQLException e)
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
System.out.println("Error occured in data finding");
e.printStackTrace();
}
closeDBResource();
return objectList;
} | {
"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 boolean deleteLending(int id) {
boolean is_delete = false;
try
{
connection = getConnection();
statement = connection.prepareStatement("delete from lending where id=?;");
statement.setInt(1, id);
int check_id = statement.executeUpdate();
is_delete = check_id>0;
if(is_delete)
{
Constants.Response.MSG = Constants.Response.MSG_SUCCESS;
}
else
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
}
System.out.println("Deletion completed Successfully");
}
catch(SQLException e)
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
System.out.println("Error occured in deletion");
e.printStackTrace();
}
closeDBResource();
return is_delete;
} | {
"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.66713095",
"0.6567948",
"0.652319",
"0.648097",
"0.64770466",
"0.64586824",
"0.64132667",
"0.6376419",
"0.62759",
"0.62545097",
"0.62371093",
"0.62237984",
"0.6201738",
"0.619477",
"0.619477",
"0.61924416",
"0.61872935",
"0.6173417",
"0.613289",
"0.6127952",
"0.6080854",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean updateLending1(Lending lending1) {
boolean is_update = false;
try
{
connection = getConnection();
statement = connection.prepareStatement("update lending set returned_date=?,status=? where id=?");
statement.setString(1, lending1.getReturned_date());
statement.setInt(2, 0);
statement.setInt(3, lending1.getId());
int check_id = statement.executeUpdate();
is_update = check_id>0;
if(is_update)
{
Constants.Response.MSG = Constants.Response.MSG_SUCCESS;
}
else
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
System.out.println("Updation Failed");
}
}
catch(SQLException e)
{
Constants.Response.MSG = Constants.Response.MSG_FAILED;
System.out.println("Error occured in insertion");
e.printStackTrace();
}
closeDBResource();
return is_update;
} | {
"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 |
Load the configured parameters through the properties file. TODO: Move to XML instead of properties file | private void loadConfig() throws IOException {
final boolean hasPropertiesFile = configFile != null && configFile.exists()
&& configFile.canRead() && configFile.isFile();
if (hasPropertiesFile) {
Properties props = new Properties();
FileInputStream fis = null;
try {
fis = new FileInputStream(configFile);
props.load(fis);
Iterator<Object> keys = props.keySet().iterator();
envVariables = new ArrayList<Variable>();
while (keys.hasNext()) {
String key = (String) keys.next();
if (key.equalsIgnoreCase(GRKeys.GDAL_CACHEMAX)) {
// Setting GDAL_CACHE_MAX Environment variable if available
String cacheMax = null;
try {
cacheMax = (String) props.get(GRKeys.GDAL_CACHEMAX);
if (cacheMax != null) {
int gdalCacheMaxMemory = Integer.parseInt(cacheMax); // Only for validation
Variable var = new Variable();
var.setKey(GRKeys.GDAL_CACHEMAX);
var.setValue(cacheMax);
envVariables.add(var);
}
} catch (NumberFormatException nfe) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, "Unable to parse the specified property as a number: "
+ cacheMax, nfe);
}
}
} else if (key.equalsIgnoreCase(GRKeys.GDAL_DATA)
|| key.equalsIgnoreCase(GRKeys.GDAL_LOGGING_DIR)
|| key.equalsIgnoreCase(GRKeys.TEMP_DIR)) {
// Parsing specified folder path
String path = (String) props.get(key);
if (path != null) {
final File directory = new File(path);
if (directory.exists() && directory.isDirectory()
&& ((key.equalsIgnoreCase(GRKeys.GDAL_DATA) && directory.canRead()) || directory.canWrite())) {
Variable var = new Variable();
var.setKey(key);
var.setValue(path);
envVariables.add(var);
} else {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, "The specified folder for " + key + " variable isn't valid, "
+ "or it doesn't exist or it isn't a readable directory or it is a "
+ "destination folder which can't be written: " + path);
}
}
}
} else if (key.equalsIgnoreCase(GRKeys.EXECUTION_TIMEOUT)) {
// Parsing execution timeout
String timeout = null;
try {
timeout = (String) props.get(GRKeys.EXECUTION_TIMEOUT);
if (timeout != null) {
executionTimeout = Long.parseLong(timeout); // Only for validation
}
} catch (NumberFormatException nfe) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, "Unable to parse the specified property as a number: "
+ timeout, nfe);
}
}
} else if (key.equalsIgnoreCase(GRKeys.GDAL_WARP_PARAMS)
|| key.equalsIgnoreCase(GRKeys.GDAL_TRANSLATE_PARAMS)) {
// Parsing gdal operations custom option parameters
String param = (String) props.get(key);
if (param != null) {
if (key.equalsIgnoreCase(GRKeys.GDAL_WARP_PARAMS)) {
gdalWarpingParameters = param.trim();
} else {
gdalTranslateParameters = param.trim();
}
}
} else if (key.endsWith("PATH")) {
// Dealing with properties like LD_LIBRARY_PATH, PATH, ...
String param = (String) props.get(key);
if (param != null) {
Variable var = new Variable();
var.setKey(key);
var.setValue(param);
envVariables.add(var);
}
}
}
} catch (FileNotFoundException e) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, "Unable to parse the config file: " + configFile.getAbsolutePath(), e);
}
} catch (IOException e) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, "Unable to parse the config file: " + configFile.getAbsolutePath(), e);
}
} finally {
if (fis != null) {
try {
fis.close();
} catch (Throwable t) {
// Does nothing
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Configuracion(Parametros params) {\n this.params = params;\n\n if (params.properties != null) {\n try {\n properties.load(new FileInputStream(params.properties));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n ... | [
"0.7241633",
"0.7170848",
"0.715796",
"0.71569246",
"0.7135945",
"0.70529157",
"0.6954845",
"0.6926495",
"0.6827503",
"0.68164927",
"0.67816603",
"0.6780846",
"0.6764151",
"0.6721687",
"0.671047",
"0.6690758",
"0.6636349",
"0.66029775",
"0.6578151",
"0.6569653",
"0.6541612",
... | 0.0 | -1 |
Make sure the specified folder path exist or try to create it | private File initFolder(final String folderPath) throws IOException {
File tempFolder = new File(folderPath);
if (!tempFolder.exists()) {
boolean createdFolder = false;
try {
createdFolder = tempFolder.mkdir();
} catch (SecurityException se) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("Unable to create the specified folder: " + folderPath
+ "\nProceeding with using the System temp folder: " + SYSTEM_TEMP_DIR);
}
}
if (!createdFolder) {
tempFolder = new File(SYSTEM_TEMP_DIR);
}
}
if (!tempFolder.exists() || !tempFolder.canWrite()) {
throw new IOException("Unable to write on the specified folder: "
+ tempFolder.getAbsolutePath());
}
return tempFolder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean createFolder (Path path) {\n if (Files.notExists(path)) {\n // If the folder doesn't already exists we create it\n File f = new File(path.toString());\n try {\n // Create the folder\n f.mkdir();\n // Create an empt... | [
"0.7857454",
"0.7460132",
"0.73692065",
"0.72508436",
"0.70292336",
"0.70166147",
"0.70151365",
"0.69963104",
"0.69412214",
"0.6916341",
"0.689286",
"0.6884099",
"0.6873913",
"0.6852191",
"0.6775873",
"0.67516756",
"0.6740433",
"0.6740071",
"0.6729516",
"0.67193687",
"0.66969... | 0.6415011 | 38 |
Kill all threads on web app context shutdown to avoid permgen leaks | public void onApplicationEvent(ApplicationEvent event) {
if(event instanceof ContextClosedEvent) {
timer.cancel();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void destroy() throws Exception\n\t{\n\t\tlog.debug(\"Shutdown threadpool\");\n\t\tpool.shutdownNow(); // disable new tasks from being submitted and interrupt running threads.\n\n\t\t// Wait briefly for tasks to respond to being cancelled\n\t\tif (!pool.awaitTermination(1, TimeUnit.SECONDS))\n\... | [
"0.6567385",
"0.6400765",
"0.62798697",
"0.62737226",
"0.6229483",
"0.6222936",
"0.6218712",
"0.61996156",
"0.61918324",
"0.61088693",
"0.61062664",
"0.6105855",
"0.6090268",
"0.6078029",
"0.60768884",
"0.6063085",
"0.60576",
"0.60540366",
"0.60504",
"0.604648",
"0.6038327",
... | 0.0 | -1 |
Ao inserir lembrar de instanciar os filhos como nos vazios | @Override
public void insert(T element) {
if (element != null) {
BSTNode<T> nilParent = new BSTNode<>(); //Para o caso de estarmos inserindo a raiz (que tem parent NIL)
insert(this.root, element, nilParent);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void inserir(Filme obj) throws Exception {\n System.out.println(\"Salvar o objeto filme\");\r\n }",
"public void criar() throws IOException {\nif (!directorio.exists()) {\n directorio.mkdir();\n System.out.println(\"Directorio criado\");\n } else {\n Syste... | [
"0.711615",
"0.6292495",
"0.6280158",
"0.61940116",
"0.616939",
"0.6126956",
"0.61229736",
"0.6010012",
"0.5989479",
"0.59395677",
"0.593213",
"0.58881557",
"0.5840675",
"0.5838979",
"0.58362824",
"0.58272165",
"0.58265716",
"0.58087814",
"0.5792889",
"0.57922727",
"0.5779496... | 0.0 | -1 |
This method is already implemented using recursion. You must understand how it work and use similar idea with the other methods. | @Override
public int size() {
return size(root);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\t\tpublic void applyRecursivelyGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; s ⊆ ℤ |- r∈s ↔ s\",\n\t\t\t\t\trm(\"\", ri(\"\", rm(\"2.1\", empty))));\n\t\t}",
"public static void main(String[] args){\n LinkedListDeque<String> lld = new LinkedListDeque<>();\n lld.addFirst(\"Hello\");\n lld.... | [
"0.5636984",
"0.5562669",
"0.5522478",
"0.550733",
"0.54973805",
"0.5454202",
"0.5450925",
"0.54262125",
"0.534992",
"0.53497845",
"0.5349613",
"0.5342725",
"0.5336694",
"0.53117883",
"0.529355",
"0.52728826",
"0.52643085",
"0.5257328",
"0.5248396",
"0.5246978",
"0.5232954",
... | 0.0 | -1 |
Restore the previously serialized current dropdown position. | @Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
if (savedInstanceState.containsKey(STATE_SELECTED_NAVIGATION_ITEM)) {
getActionBar().setSelectedNavigationItem(
savedInstanceState.getInt(STATE_SELECTED_NAVIGATION_ITEM));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void restoreTreeSelection() {\n _spTree.setIgnoreSelection(true);\n tree.setSelectionPaths(selections);\n\n // Restore the lead selection\n if (leadSelection != null) {\n tree.removeSelectionPath(leadSelection);\n tree.addSelectionPath(leadSelection);\n ... | [
"0.6354027",
"0.60478854",
"0.59809107",
"0.5952256",
"0.58303195",
"0.5810178",
"0.57806015",
"0.57800454",
"0.57638025",
"0.5741767",
"0.56497145",
"0.5612684",
"0.5590208",
"0.5586884",
"0.55808634",
"0.55790484",
"0.55777675",
"0.55622935",
"0.55529255",
"0.5534189",
"0.5... | 0.5159413 | 84 |
Serialize the current dropdown position. | @Override
public void onSaveInstanceState(Bundle outState) {
outState.putInt(STATE_SELECTED_NAVIGATION_ITEM,
getActionBar().getSelectedNavigationIndex());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String toString() {\n return value + \" \" + position.name();\n }",
"public String getPositionList() {\r\n return PositionList;\r\n }",
"@Override\n\tpublic void serializeUI() {\n\t\t\n\t}",
"@Override\n public void onSaveInstanceState(Bundle outState) {\n... | [
"0.5525344",
"0.54025036",
"0.5342054",
"0.53404444",
"0.53252935",
"0.5296584",
"0.52618617",
"0.5179936",
"0.517683",
"0.5176272",
"0.51565737",
"0.51565737",
"0.51495665",
"0.51440525",
"0.5129414",
"0.5118096",
"0.5104432",
"0.5100243",
"0.5087029",
"0.5082901",
"0.506598... | 0.48278886 | 60 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.chat, menu);
return super.onCreateOptionsMenu(menu);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7247427",
"0.720267",
"0.7196145",
"0.7178052",
"0.71080035",
"0.7040695",
"0.7039065",
"0.7012457",
"0.7011027",
"0.6980861",
"0.69456106",
"0.69392735",
"0.6934666",
"0.691844",
"0.691844",
"0.6891824",
"0.6884514",
"0.6875728",
"0.6875644",
"0.6862535",
"0.6862535",
"... | 0.0 | -1 |
When the given dropdown item is selected, show its contents in the container view. | @Override
public boolean onNavigationItemSelected(int position, long id) {
Fragment fragment = new DummySectionFragment();
Bundle args = new Bundle();
args.putInt(DummySectionFragment.ARG_SECTION_NUMBER, position + 1);
fragment.setArguments(args);
getSupportFragmentManager().beginTransaction()
.replace(R.id.container, fragment)
.commit();
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showSelection () {\n checkWidget();\n if( selectedIndex != -1 ) {\n showItem( getSelection() );\n }\n }",
"public void showSelectedItemScreen(Item item){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/... | [
"0.6892586",
"0.6231021",
"0.6024242",
"0.60177463",
"0.58848816",
"0.58363235",
"0.5787543",
"0.5787543",
"0.5787543",
"0.5787543",
"0.57755584",
"0.57680124",
"0.5739526",
"0.570026",
"0.56370795",
"0.56330943",
"0.5577319",
"0.55728716",
"0.5547726",
"0.55277133",
"0.55271... | 0.0 | -1 |
TODO Autogenerated method stub | private void setKey() {
} | {
"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 | private void sendImage(Uri selectedImageUri) {
} | {
"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.66713095",
"0.6567948",
"0.652319",
"0.648097",
"0.64770466",
"0.64586824",
"0.64132667",
"0.6376419",
"0.62759",
"0.62545097",
"0.62371093",
"0.62237984",
"0.6201738",
"0.619477",
"0.619477",
"0.61924416",
"0.61872935",
"0.6173417",
"0.613289",
"0.6127952",
"0.6080854",
... | 0.0 | -1 |
Provides the caller with a random Chuck Norris Fact | @RequestMapping(method = RequestMethod.GET)
public ChuckNorrisFact getChuckNorrisFact() {
return client.callChuckNorrisIo();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFact() {\n Random randomGenerator = new Random();\n int randomNumber = randomGenerator.nextInt(facts.length);\n return facts[randomNumber];\n }",
"Randomizer getRandomizer();",
"public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseab... | [
"0.6868335",
"0.62962663",
"0.6102473",
"0.60911685",
"0.6027719",
"0.602764",
"0.59886146",
"0.5984847",
"0.5973523",
"0.58520985",
"0.5850019",
"0.5849381",
"0.58461374",
"0.5804081",
"0.57549125",
"0.57538027",
"0.5722531",
"0.57065415",
"0.56774783",
"0.5659908",
"0.56514... | 0.58023727 | 14 |
Constructor for objects of class Dog | public Dog ()
{
super ("Dog", "Hi! My name is Snoop Dawg");
this.x = "A bone";
/*
* This dog has many features to it
* Do not provoke it or else it will bite!
* Otherwise, It's a nice dog so have fun!
*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Dog() {\r\n\r\n }",
"public Dog() {\n // Default constructor\n }",
"Dog(){\n\t\t\n\t\t//I want to create a chemicals object. Inorder to do this, I have to first create a Cardiac obj, then a Cells obj, then a Chemicals object.\n\t\t//I have to create a Chemicals object, to get a chemicals co... | [
"0.85389996",
"0.8463445",
"0.76474434",
"0.76444215",
"0.7441576",
"0.73643744",
"0.71118784",
"0.68984437",
"0.66749",
"0.664863",
"0.662353",
"0.65982884",
"0.6586585",
"0.6528765",
"0.6524118",
"0.650212",
"0.6463079",
"0.63723165",
"0.62754303",
"0.6250099",
"0.62300295"... | 0.7550351 | 4 |
endregion region SERVER/CLIENT STUFF | private void serverConfigurations() {
client = new Client();
client.start();
Network.register(client);
client.addListener(new Listener() {
public void connected(Connection connection) {
}
public void received(Connection connection, Object object) {
if (object instanceof IsFull)
transitionTo(mainMenu);
if (object instanceof Abort) {
//
}
if (object instanceof CanStart)
Platform.runLater(() -> transitionTo(mainGame));
if (object instanceof WhoseTurn) {
WhoseTurn whoseTurn = (WhoseTurn) object;
Platform.runLater(() -> setTurnLabel(whoseTurn.name));
}
if (object instanceof ConnectedPlayers) {
System.out.println("CONNECTED PLAYERS");
ConnectedPlayers players = (ConnectedPlayers) object;
Platform.runLater(() -> {
textArea.clear();
for (String name : players.names)
textArea.appendText(name + "\n");
}
);
}
if (object instanceof ReadyForShips)
Platform.runLater(() -> transitionTo(setShips));
if (object instanceof OthersSpecs) {
OthersSpecs othersSpecs = (OthersSpecs) object;
Platform.runLater(() -> {
ene1.serverID = othersSpecs.ene1;
ene1.name = othersSpecs.ene1n;
ene1.labeln.setText(ene1.name);
cWl1.setText(ene1.name);
ene2.serverID = othersSpecs.ene2;
ene2.name = othersSpecs.ene2n;
ene2.labeln.setText(ene2.name);
cWl2.setText(ene2.name);
});
}
if (object instanceof YourBoardToPaint)
//System.out.println("MY BOARD TO PAINT");
Platform.runLater(() -> mGSelfBoard.updateTiles(((YourBoardToPaint) object).board));
if (object instanceof EnemiesBoardsToPaint) {
//System.out.println("ENEMIES BOARDS TO PAINT");
Platform.runLater(() -> {
ene1.b.startTiles(((EnemiesBoardsToPaint) object).board1);
ene2.b.startTiles(((EnemiesBoardsToPaint) object).board2);
});
}
if (object instanceof EnemyBoardToPaint) {
Platform.runLater(() -> {
EnemyBoardToPaint ebp = (EnemyBoardToPaint) object;
updateEnemyBoard(ebp.id, ebp.newAttackedBoard);
System.out.println("ENEMY BOARD TO PAINT WITH INDEX " + ebp.id);
});
}
if (object instanceof AnAttackResponse) {
Platform.runLater(() -> {
lastAttacked.b.updateTiles(((AnAttackResponse) object).newAttackedBoard);
iCanAttack = ((AnAttackResponse) object).again;
doSounds(((AnAttackResponse) object).actualHit, ((AnAttackResponse) object).shipHit);
});
}
if (object instanceof YourTurn) {
Platform.runLater(() -> {
iCanAttack = true;
setTurnLabel("My TURN!!");
});
}
if (object instanceof YouDead) {
Platform.runLater(() -> {
lost("You died a horrible death. RIP you");
transitionTo(mainMenu);
});
}
if (object instanceof PlayerDied) {
Platform.runLater(() -> {
removeEnemy(((PlayerDied) object).who);
});
}
if (object instanceof YouWon) {
Platform.runLater(() -> {
Alert lost = new Alert(Alert.AlertType.CONFIRMATION);
lost.setContentText("YOU BEAT THEM ALL");
lost.showAndWait();
won();
});
}
if (object instanceof ChatMessage) {
Platform.runLater(() -> {
EnemyLocal toUpdate = ene1;
if (((ChatMessage) object).saidIt == ene2.serverID) {
toUpdate = ene2;
}
toUpdate.conversation.setText(toUpdate.conversation.getText() + ((ChatMessage) object).message);
});
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void conectServer() {\n\n\t}",
"S getServer();",
"@Override\n\tpublic void updateClient() {\n\t\t\n\t}",
"void clientReady();",
"private void requestClientNameFromServer() {\n writeToServer(ServerAction.GET_NAME + \"\");\n }",
"public interface ClientInterface extends Remote {\n\tpublic... | [
"0.6465724",
"0.6427999",
"0.6407851",
"0.6404646",
"0.6362011",
"0.6324752",
"0.6297271",
"0.6289364",
"0.62663716",
"0.62432575",
"0.62225306",
"0.62145275",
"0.61703885",
"0.6168923",
"0.6148403",
"0.61483276",
"0.6125722",
"0.6119457",
"0.611419",
"0.61140746",
"0.6092186... | 0.0 | -1 |
CALL BEFORE OTHER STUFF | private void transitionTo(Scene scene) {
for (EmptyGraphBoardFX g : toAnimate)
g.stopAnimating();
toAnimate.clear();
theStage.setScene(scene);
if (scene == mainGame)
toAnimate.add(mGSelfBoard);
if (scene == attackScene) {
toAnimate.add(ene1.b);
toAnimate.add(ene2.b);
}
if (scene == setShips)
toAnimate.add(sSboard);
if (scene == AIScene) {
toAnimate.add(selfvsAI);
toAnimate.add(ai.b);
}
for (EmptyGraphBoardFX g : toAnimate)
g.startAnimating();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void beforeCall();",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"protected abstract void before();",
"@Override\n public void preRun() {\n super.preRun();\n }",
"@Override\n public void beforeFirstLogic() {\n }",
"protected void runBeforeIteration() {}",... | [
"0.72277504",
"0.7206366",
"0.7185782",
"0.706427",
"0.69574124",
"0.6764864",
"0.6719381",
"0.671632",
"0.67154634",
"0.67075485",
"0.66915095",
"0.6678482",
"0.65822834",
"0.657101",
"0.6513093",
"0.64968413",
"0.6478356",
"0.6422335",
"0.6388805",
"0.6383934",
"0.6362709",... | 0.0 | -1 |
WASN'T SEARCHING BEFORE SEE IF HIT IF HIT, PREPARE THE NEXT ATTACKS ALREADY | private void thinkAboutNext(ArrayList<Point> pos, boolean hit, boolean destroyedIt) {
if (!searching && hit) {
betweenTwo = false;
System.out.println("WAS A NEW TARGET");
if(!destroyedIt) {
int[] d = Direction.DOWN.getDirectionVector();
Point n = new Point(justBefore.x + d[0], justBefore.y + d[1]);
if (inBounds(n) && pos.contains(n))
directionsToGo.add(Direction.DOWN);
d = Direction.UP.getDirectionVector();
n = new Point(justBefore.x + d[0], justBefore.y + d[1]);
if (inBounds(n) && pos.contains(n))
directionsToGo.add(Direction.UP);
d = Direction.LEFT.getDirectionVector();
n = new Point(justBefore.x + d[0], justBefore.y + d[1]);
if (inBounds(n) && pos.contains(n))
directionsToGo.add(Direction.LEFT);
d = Direction.RIGHT.getDirectionVector();
n = new Point(justBefore.x + d[0], justBefore.y + d[1]);
if (inBounds(n) && pos.contains(n))
directionsToGo.add(Direction.RIGHT);
directionLooking = directionsToGo.get(directionsToGo.size() - 1);
}
}
else if (searching) {
//FILTER OUT ALREADY ATTACKED
System.out.println("WAS AN OLD TARGET");
//FAILED
if(!hit) {
justBefore = firstHit;
int size = directionsToGo.size();
for(int i = size - 1; i >= 0; i--){
Point n = new Point(justBefore.x + directionsToGo.get(i).getDirectionVector()[0],
justBefore.y + directionsToGo.get(i).getDirectionVector()[1]);
if(!pos.contains(n))
directionsToGo.remove(i);
}
directionLooking = directionsToGo.get(0);
}
else
if(!pos.contains(pWD(justBefore, directionLooking))) {
justBefore = firstHit;
directionLooking = directionLooking.getOpposite();
}
}
if(hit) {
searching = !destroyedIt;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default void hit() {\n\t\tcount(1);\n\t}",
"@Given(\"prepare to Attempt sending crafted records to DNS cache\")\npublic void preattemptsendingcraftedrecordstodnscache(){\n}",
"abstract public boolean performNextAttack();",
"public void readyNextAttackers() {\n if(battleAlly == null && battleEnemy == n... | [
"0.5598465",
"0.5478575",
"0.5458752",
"0.5444847",
"0.5370623",
"0.5311778",
"0.5308822",
"0.5189282",
"0.5168376",
"0.5154709",
"0.5152507",
"0.5110691",
"0.50864726",
"0.50835544",
"0.5083436",
"0.5037798",
"0.50272804",
"0.50245714",
"0.5021281",
"0.498839",
"0.49613374",... | 0.5455538 | 3 |
/public String mySettingPageName = LinMobileConstants.APP_VIEWS[6] .split(LinMobileConstants.ARRAY_SPLITTER)[1].trim(); public String publisherViewPageName = (LinMobileConstants.APP_VIEWS[0]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; public String advertiserViewPageName = (LinMobileConstants.APP_VIEWS[1]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; public String mediaPlannerPageName = (LinMobileConstants.APP_VIEWS[2]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; public String adminPageName = (LinMobileConstants.APP_VIEWS[5]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; public String operationalViewPageName = (LinMobileConstants.APP_VIEWS[2]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; public String poolPageName = (LinMobileConstants.APP_VIEWS[3]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; public String newsAndResearchPageName = (LinMobileConstants.APP_VIEWS[4]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; public String unifiedCampaign = (LinMobileConstants.APP_VIEWS[7]) .split(LinMobileConstants.ARRAY_SPLITTER)[1]; | public boolean isAuthorised(SessionObjectDTO sessionDTO) {
try {
IUserService service = (IUserService) BusinessServiceLocator.locate(IUserService.class);
sessionDTO = (SessionObjectDTO) session.get("sessionDTO");
service.getAuthorisations(userDetailsDTO, sessionDTO.getRoleId());
service.getAuthorisedPagesForUser(sessionDTO.getRoleId(), sessionDTO.getUserId(), userDetailsDTO);
if(userDetailsDTO.getAuthorisedPagesList() != null && userDetailsDTO.getAuthorisedPagesList().contains((LinMobileConstants.APP_VIEWS[2]).split(LinMobileConstants.ARRAY_SPLITTER)[1].trim())) {
sessionDTO.setPageName((LinMobileConstants.APP_VIEWS[2]).split(LinMobileConstants.ARRAY_SPLITTER)[1].trim());
return true;
}
}
catch (Exception e) {
log.severe("Exception in execution of isAuthorised : " + e.getMessage());
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String _buildpage() throws Exception{\n_buildtheme();\r\n //BA.debugLineNum = 103;BA.debugLine=\"page.InitializeWithTheme(Name, \\\"/ws/\\\" & ABMShared\";\r\n_page.InitializeWithTheme(_name,\"/ws/\"+_abmshared._appname+\"/\"+_name,__c.False,_abmshared._sessionmaxinactiveintervalseconds,_theme);\r\n //BA.d... | [
"0.5584313",
"0.55263644",
"0.52137613",
"0.5133729",
"0.504267",
"0.5031494",
"0.49973026",
"0.49882954",
"0.49790064",
"0.49774587",
"0.49703115",
"0.49574548",
"0.49322644",
"0.49312174",
"0.4892794",
"0.48901176",
"0.48840404",
"0.4870962",
"0.48692447",
"0.48638955",
"0.... | 0.0 | -1 |
Data comes to this method in form of json. The source of data(at present) is the map. This method uses the products and other data to prefill the unifiedCampaignDTO values. | private void setJsonDataInUnifiedCampaign(UnifiedCampaignDTO unifiedCampaignDTO, boolean checkMaster){
try{
JSONObject jsonObject = (JSONObject) JSONSerializer.toJSON(request.getParameter("jsonParam").trim());
IProductService productService = (IProductService) BusinessServiceLocator.locate(IProductService.class);
String products = jsonObject.getString("products");
Date startDate = new Date();
Date endDate = DateUtil.getDateBeforeAfterDays(30);
unifiedCampaignDTO.setStartDate(DateUtil.getDateAsString(startDate, "MM-dd-yyyy"));
unifiedCampaignDTO.setEndDate(DateUtil.getDateAsString(endDate, "MM-dd-yyyy"));
unifiedCampaignDTO.setPStartDate(DateUtil.getDateAsString(startDate, "MM-dd-yyyy"));
unifiedCampaignDTO.setPEndDate(DateUtil.getDateAsString(endDate, "MM-dd-yyyy"));
if(products != null && products.trim().length() > 0){
List<ProductsObj> productsList = productService.loadProducts(Arrays.asList(products.split(",")));
if(productsList != null){
Set<CommonDTO> creatives = new HashSet<CommonDTO>();
Set<CommonDTO> platforms = new HashSet<CommonDTO>();
Set<CommonDTO> devices = new HashSet<CommonDTO>();
for(ProductsObj product: productsList){
if(product.getCreative() != null){
for(CreativeObj creative: product.getCreative()){
creatives.add(new CommonDTO(String.valueOf(creative.getId()), creative.getSize()));
}
}
if(product.getPlatforms() != null && product.getPlatforms().size() > 0){
for(PlatformObj platform : product.getPlatforms()){
if(String.valueOf(platform.getId()).equals(ProductService.allOptionId)){
platforms.clear();
platforms.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));
break;
}
platforms.add(new CommonDTO(String.valueOf(platform.getId()), platform.getText()));
}
}else {
platforms.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));
}
if(product.getDevices() != null && product.getDevices().size() > 0){
for(DeviceObj device : product.getDevices()){
if(String.valueOf(device.getId()).equals(ProductService.allOptionId)){
devices.clear();
devices.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));
break;
}
devices.add(new CommonDTO(String.valueOf(device.getId()), device.getText()));
}
}else {
devices.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));
}
unifiedCampaignDTO.setDeviceCapability(product.getDeviceCapability());
unifiedCampaignDTO.setSelectedDevicePlacementList(new ArrayList<CommonDTO>(devices));
unifiedCampaignDTO.setSelectedPlatformPlacementList(new ArrayList<CommonDTO>(platforms));
unifiedCampaignDTO.setSelectedCreativePlacementList(new ArrayList<CommonDTO>(creatives));
}
}
int deviceCapability = ReportUtil.TARGETING_ANY;
for(ProductsObj product: productsList){
if((deviceCapability == ReportUtil.TARGETING_MOBILE_WEB_ONLY && product.getDeviceCapability() == ReportUtil.TARGETING_MOBILE_APP_ONLY)||
(deviceCapability == ReportUtil.TARGETING_MOBILE_APP_ONLY && product.getDeviceCapability() == ReportUtil.TARGETING_MOBILE_WEB_ONLY)){
deviceCapability = ReportUtil.TARGETING_MOBILE_APP_AND_WEB;
continue;
}
if(product.getDeviceCapability() == ReportUtil.TARGETING_ANY){
deviceCapability = ReportUtil.TARGETING_ANY;
break;
}
deviceCapability = product.getDeviceCapability();
}
unifiedCampaignDTO.setDeviceCapability(deviceCapability);
}
try{unifiedCampaignDTO.setSelectedPlacementProducts(jsonObject.getString("products"));}catch(Exception e){}
try{unifiedCampaignDTO.setUpperAge(jsonObject.getString("upperAge"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setLowerAge(jsonObject.getString("lowerAge"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setUpperIncome(jsonObject.getString("upperIncome"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setLowerIncome(jsonObject.getString("lowerIncome"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setGender(jsonObject.getString("gender"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedEducationList(getDTOListFromJSONObject(jsonObject.getString("educationList"), unifiedCampaignDTO.getEducationList(), checkMaster));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedEthinicityList(getDTOListFromJSONObject(jsonObject.getString("ethnicityList"), unifiedCampaignDTO.getEthinicityList(), checkMaster));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedCountryList(getDTOListFromJSON(jsonObject.getString("countryList"), unifiedCampaignDTO.getCountryList(), checkMaster));unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedDMAPlacementList(getDTOListFromJSONObject(jsonObject.getString("dmaList"), unifiedCampaignDTO.getDmaList(), checkMaster));unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedStateList(getDTOListFromJSONObject(jsonObject.getString("stateList"), unifiedCampaignDTO.getStateList(), checkMaster));unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());}catch(Exception e){}
try{
String cityList = jsonObject.getString("cityList");
if(cityList != null && cityList.trim().length()>0){
unifiedCampaignDTO.setCityJSON("{\"cityList\":"+cityList+"}");
}
unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());
}catch(Exception e){}
try{
String zipList = jsonObject.getString("zipList");
if(zipList != null && zipList.trim().length()>0){
unifiedCampaignDTO.setZipJSON("{\"zipList\":"+zipList+"}");
}
unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());
}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedCensusAge(jsonObject.getString("age"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedCensusIncome(jsonObject.getString("income"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedCensusEducation(jsonObject.getString("education"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedCensusEthnicity(jsonObject.getString("ethnicity"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedCensusGender(jsonObject.getString("gender"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}
try{unifiedCampaignDTO.setSelectedCensusRank(jsonObject.getString("rank"));}catch(Exception e){}
}catch(Exception e){
log.severe("ERROR while parsing main JSON ["+ request.getParameter("jsonParam") +"]");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n @Transactional(propagation = Propagation.REQUIRED)\n public JSONObject fetchMasterDataForGSTFields(List<FieldParams> list, Map mapData) throws ServiceException, JSONException {\n JSONObject result = new JSONObject();\n KwlReturnObject kwlReturnObject = null;\n String companyi... | [
"0.5710336",
"0.5558113",
"0.5519186",
"0.54597944",
"0.5425615",
"0.5379281",
"0.5351705",
"0.52405626",
"0.52044624",
"0.5201011",
"0.5158075",
"0.5137141",
"0.5135715",
"0.51118207",
"0.50960624",
"0.5086088",
"0.50822854",
"0.5070475",
"0.50556237",
"0.5034732",
"0.503419... | 0.6805686 | 0 |
/ Not used right now Under development, need for query | public String addAdvertiserAccount(){
log.info("In addAdvertiserAccount method of SmartCampaignPlannerAction ..");
ISmartCampaignPlannerService service = (ISmartCampaignPlannerService) BusinessServiceLocator.locate(ISmartCampaignPlannerService.class);
try{
sessionDTO = (SessionObjectDTO) session.get("sessionDTO");
if(sessionDTO !=null ){
String name = request.getParameter("name").trim();
String address = request.getParameter("address");
String phone = request.getParameter("phone").trim();
String fax = request.getParameter("fax").trim();
String email = request.getParameter("email").trim();
String zip = request.getParameter("zip").trim();
String accountType=LinMobileConstants.ADVERTISER_ID_PREFIX;
String dfpNetworkCode=LinMobileConstants.LIN_MOBILE_DFP_NETWORK_CODE;
IUserService userService=(IUserService) BusinessServiceLocator.locate(IUserService.class);
List<CompanyObj> userCompanyList=userService.getSelectedCompaniesByUserId(sessionDTO.getUserId());
if(userCompanyList!=null && userCompanyList.size()>0){
CompanyObj companyObj=null;
if(userCompanyList.size()>1){
for(CompanyObj company:userCompanyList){
if(company.getAdServerId().contains(dfpNetworkCode)){
companyObj=company;
break;
}
}
}
if(companyObj==null){
//Assign first company if , there is only one company to this user
// or all the companies assigned to this user don't have company with LIN_MOBILE_DFP_NETWORK_CODE
companyObj=userCompanyList.get(0);
}
// Right now we are setting up on LIN Mobile new DFP....
if(companyObj==null || dfpNetworkCode==null){
companyObj=userCompanyList.get(0);
}
//advertisersObj = service.addAdvertiser(name, address, phone, fax, email, zip,sessionDTO.getUserId(),accountType);
accountObj = service.addAccount(name, address,accountType, phone, fax, email, zip,sessionDTO.getUserId(),dfpNetworkCode,companyObj);
if(accountObj!=null){
return Action.SUCCESS;
}else{
return Action.ERROR;
}
}else{
throw new Exception("No company exist for this user, please assign a company first to this user.");
}
}else{
throw new Exception("Invalid user or session not exist..");
}
}catch(Exception e){
log.severe("Exception in addAdvertiser method of SmartCampaignPlannerAction"+e.getMessage());
return Action.ERROR;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"private void searchFunction() {\n\t\t\r\n\t}",
"private void montaQuery(Publicacao object, Query q) {\t\t\n\t}",
"private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}",
"public void method_4270() {}",
"private DbQuery() {}",
"pu... | [
"0.54522693",
"0.5233147",
"0.5180559",
"0.5091728",
"0.50585914",
"0.5052578",
"0.49730715",
"0.49278638",
"0.4919325",
"0.48942634",
"0.4888071",
"0.48879272",
"0.48855013",
"0.4878812",
"0.48769164",
"0.48656568",
"0.48639983",
"0.48622924",
"0.48592082",
"0.48581356",
"0.... | 0.0 | -1 |
/ Getters / Setters | public InvocationType getInvocationType() {
return invocationType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Set method_1559();",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"@Override\n public void get() {}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public void get() {\n }",
"public void setdat()\n {\n }",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
... | [
"0.68003595",
"0.6558789",
"0.6552484",
"0.64120036",
"0.62294185",
"0.6210205",
"0.61401826",
"0.61208946",
"0.6081686",
"0.6043031",
"0.5965628",
"0.5945217",
"0.59434736",
"0.5939926",
"0.5920166",
"0.5899987",
"0.5898689",
"0.58881354",
"0.5869365",
"0.5869247",
"0.583858... | 0.0 | -1 |
Genero l'handler per il caso d'uso, che a sua volta genera la configurazione. | @Override
public void esegui(Console console) {
console.getSistema().setHandlerConfigurazioni();
this.handlerConfigurazione = console.getSistema().getHandlerConfigurazioni();
//Genero una variabile per il loop
Boolean fine = true;
String cat = null;
while (fine) {
console.print(categorieList());
console.print("Seleziona una categoria inserendo il suo codice intero: \n");
Integer selezione = console.getInt();
if (selezione != null) {
cat = this.mappaCorrispondenzaCategorie.get(selezione.intValue());
console.print("Seleziona una componente, tra quelle che vengono mostrate a video, inserendo il suo codice numerico:\n");
Map<Integer, Componente> mappaComponenti = this.handlerConfigurazione.selezionaCategoria(cat);
for (Integer key : mappaComponenti.keySet()) {
console.print("\n ---Codice: "+key +" Componente: "+ mappaComponenti.get(key) +"--- \n");
}
console.print("---INSERISCI CODICE COMPONENTE--- \n");
Componente componenteAttuale = this.handlerConfigurazione.selezionaComponente(console.getInt());
if (componenteAttuale != null) {
console.print("\n\n ECCO I DETTAGLI DEL COMPONENTE SELEZIONATO"+componenteAttuale.toString());
console.print("\n Ti soddisfa il componente selezionato? Inserisci Si o No \n");
if (console.getYesNo()) {
console.print(this.handlerConfigurazione.confermaComponente());
/*Vengono mostrati a video eventuali messaggi di incompatibilitá previsti
dalla clase Configuration Handler...
*/
}else console.print("Non inserisco il componente...");
console.print("Desideri continuare con l'inserimento componenti? \n");
if (!console.getYesNo()) { //Nel caso di valore true o non valido continuo con l'inserimento delle componenti
console.print("---TERMINA ASSEMBLAGGIO: ESECUZIONE DEI CONTROLLI--- \n");
if (this.handlerConfigurazione.terminaAssemblaggio() == true) {
fine = false;
console.print("---ASSEMBLAGGIO ANDATO A BUON FINE: RIEPILOGO--- \n");
console.print(this.handlerConfigurazione.getStringaComunicazioni());
this.handlerConfigurazione.confermaConfigurazione();
console.print("---SALVATAGGIO IN CATALOGO IN CORSO--- \n");
console.getSistema().getHandlerComponenti().salvaCatalogo();
}
else {
console.print("---ASSEMBLAGGIO NON RIUSCITO--- \n");
console.print(this.handlerConfigurazione.getStringaComunicazioni());
console.print("---RIPROVA INSERENDO UN NUOVO COMPONENTE--- \n");
}
}
}else console.print("Hai inserito un codice non valido");
}else console.print("Hai inserito un codice non valido");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void configHandler(Handlers me) {\n\r\n\t}",
"CreateHandler()\n {\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:47.199 -0500\", hash_original_method = \"41983E4AD1DCA5E034973FB71B6F64E2\", hash_generated_method = \"FE0086... | [
"0.688342",
"0.5707415",
"0.5511158",
"0.5322334",
"0.5282124",
"0.52674764",
"0.52431965",
"0.52056015",
"0.51671124",
"0.51242685",
"0.5110821",
"0.51005995",
"0.50995356",
"0.5093228",
"0.5066576",
"0.50646174",
"0.50415903",
"0.5030697",
"0.5024947",
"0.50168467",
"0.5016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean payToArtistByPurchaseOrder(long id) {
return false;
} | {
"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 |
Interface for handling Ocean updates | public interface IOnUpdateField {
/**
* Handles Ocean update
*/
public void updateField();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"interface Update {}",
"public void receivedUpdateFromServer();",
"void updateInformation();",
"Update createUpdate();",
"interface Update {\n\n }",
"void update(Information info);",
"@Override\n\tpublic void update(UpdateInfo updateInfo) {\n\t\t\n\t}",
"interface Update extends\n Appliable<Se... | [
"0.6466599",
"0.6281397",
"0.6211941",
"0.61744374",
"0.6153742",
"0.60462224",
"0.60236645",
"0.60076547",
"0.5989511",
"0.5989511",
"0.5984646",
"0.59738594",
"0.5949357",
"0.5948642",
"0.5948642",
"0.5915635",
"0.5896934",
"0.58814925",
"0.587032",
"0.58670455",
"0.5858053... | 0.6626287 | 0 |
Method for displaying the receipt. | public String showReceipt(Account account); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void displayReceipt()\r\n\t{\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"Receipt \");\r\n\t\tSystem.out.println(\"__________________________________________________________\")... | [
"0.8551617",
"0.78501654",
"0.7516671",
"0.74918354",
"0.74393106",
"0.7355217",
"0.68416953",
"0.6756246",
"0.674427",
"0.66368556",
"0.662998",
"0.6610814",
"0.66088253",
"0.65970206",
"0.6569539",
"0.65598845",
"0.65346843",
"0.6522254",
"0.65176594",
"0.6496442",
"0.64321... | 0.7094908 | 6 |
whether scaling or stretching | public MutableImage(@NonNull Path imageFile) throws IOException {
image = ImageIO.read(imageFile.toFile());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasScale() { return hasScale; }",
"public void rescale()\r\n\t{\n\t}",
"@Override\n\tpublic float getRenderSizeModifier() {\n\t\treturn getScale();\n\t}",
"public void setCanScale(boolean scale){\n mScale = scale;\n }",
"public void setStretch(float stretch) {\n this.stretch... | [
"0.67669445",
"0.6754956",
"0.6510135",
"0.6465749",
"0.643657",
"0.6337063",
"0.6281309",
"0.62793726",
"0.6275955",
"0.62429637",
"0.62118196",
"0.6196876",
"0.61919826",
"0.6155373",
"0.61532587",
"0.61532587",
"0.61532587",
"0.61205333",
"0.6117105",
"0.6113849",
"0.61116... | 0.0 | -1 |
Decodes a Base64 image string. | public static MutableImage fromBase64String(String base64Image)
throws IOException {
if (base64Image == null) {
return null;
}
var base64 = base64Image.replaceFirst("(?is)^.*?base64,(.*)$", "$1");
var bais = new ByteArrayInputStream(
Base64.getMimeDecoder().decode(base64));
return new MutableImage(ImageIO.read(bais));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String base64Decode(String str) throws StoreFactoryException;",
"public static Bitmap decodeBase64(String input) \n\t\t{\n\t\t byte[] decodedByte = Base64.decode(input, 0);\n\t\t return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length); \n\t\t}",
"public static Bitmap decodeBase64(... | [
"0.7797506",
"0.7552004",
"0.75402695",
"0.744886",
"0.737703",
"0.7350599",
"0.73349565",
"0.7303382",
"0.7295617",
"0.72031635",
"0.71774954",
"0.71309674",
"0.7096101",
"0.70611304",
"0.7022861",
"0.7016887",
"0.68349683",
"0.68178284",
"0.67304766",
"0.67213875",
"0.67066... | 0.69410414 | 16 |
Rotation Rotates this image counterclockwise by 90 degrees. | public MutableImage rotateLeft() {
return rotate(-90);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getRotation();",
"public void rotate(float angle);",
"@Override\n\tpublic void rotate90() {\n\n\t\tint[][] rotate = new int[this.frame[0].length][this.frame.length];\n\n\t\tfor (int x = 0; x < rotate[0].length; x++) {\n\t\t\tfor (int y = 0; y < rotate.length; y++) {\n\t\t\t\trotate[y][x] = this.f... | [
"0.7172498",
"0.688471",
"0.6813597",
"0.6731874",
"0.67264086",
"0.67160445",
"0.67159194",
"0.66994315",
"0.6660618",
"0.6650751",
"0.66441804",
"0.6626332",
"0.66143614",
"0.6602404",
"0.6574927",
"0.6540847",
"0.6522839",
"0.651529",
"0.6503279",
"0.64573807",
"0.64296156... | 0.6479147 | 19 |
Rotates this image clockwise by 90 degrees. | public MutableImage rotateRight() {
return rotate(90);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void rotate90() {\n\n\t\tint[][] rotate = new int[this.frame[0].length][this.frame.length];\n\n\t\tfor (int x = 0; x < rotate[0].length; x++) {\n\t\t\tfor (int y = 0; y < rotate.length; y++) {\n\t\t\t\trotate[y][x] = this.frame[this.frame.length - x - 1][y];\n\t\t\t}\n\t\t} \n\n\t\tthis.frame =... | [
"0.6944046",
"0.678056",
"0.67572004",
"0.6710405",
"0.6619083",
"0.6602006",
"0.6584758",
"0.65425074",
"0.6482874",
"0.6482359",
"0.64265704",
"0.6373551",
"0.63533896",
"0.6344648",
"0.6333107",
"0.6310863",
"0.6302866",
"0.6292422",
"0.6253304",
"0.625165",
"0.62457037",
... | 0.65210754 | 8 |
Rotates this image clockwise by the specified degrees. | public MutableImage rotate(double degrees) {
return apply(t -> {
var w = image.getWidth();
var h = image.getHeight();
var rads = Math.toRadians(degrees);
var sin = Math.abs(Math.sin(rads));
var cos = Math.abs(Math.cos(rads));
var newWidth = (int) Math.floor(w * cos + h * sin);
var newHeight = (int) Math.floor(h * cos + w * sin);
t.translate((newWidth - w) / 2d, (newHeight - h) / 2d);
var x = w / 2;
var y = h / 2;
t.rotate(rads, x, y);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public native MagickImage rotateImage(double degrees)\n\t\t\tthrows MagickException;",
"public void rotate(float angle);",
"public void rotate(boolean clockwise) \n\t{\n\t\tcircular_shift(connections, clockwise);\n\t\torientation = next(orientation, clockwise);\n\t}",
"public void rotate(double degrees) {\n\... | [
"0.7147946",
"0.6878637",
"0.6780003",
"0.6753541",
"0.66581404",
"0.6632075",
"0.66012794",
"0.65613055",
"0.6527902",
"0.6402568",
"0.63795865",
"0.63378114",
"0.62934476",
"0.6230387",
"0.6226645",
"0.6219647",
"0.6185071",
"0.6157743",
"0.6125738",
"0.6125102",
"0.6121529... | 0.7101301 | 1 |
Remove alpha layer for formats not supporting it. This prevents some files from having a colored background (instead of transparency) or to not be saved properly (e.g. png to bmp). | private BufferedImage deAlpha(BufferedImage img, String format) {
if (EqualsUtil.equalsNoneIgnoreCase(format, "png", "gif")) {
var fixedImg = new BufferedImage(img.getWidth(), img.getHeight(),
BufferedImage.TYPE_INT_RGB);
fixedImg.createGraphics().drawImage(
img, 0, 0, Color.WHITE, null);
return fixedImg;
}
return img;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clearAlphaInfo() {\n \n alphaInfo_ = 0;\n }",
"protected void removealphaOpeque() {\n\t\tlistbackground.setAlpha(1f);\n\t\tbackground.setAlpha(1f);\n\t\tlv.setClickable(true);\n\t\tlvx.setClickable(true);\n\t\trefresh.setClickable(true);\n\t\tsearch.setClickable(true);\n\t\tsearch.setEnabled(... | [
"0.62990505",
"0.60984623",
"0.5694035",
"0.56268704",
"0.5519385",
"0.5457486",
"0.5350618",
"0.5321541",
"0.5320708",
"0.5248804",
"0.51676625",
"0.513858",
"0.51114976",
"0.5093209",
"0.5024683",
"0.50208724",
"0.50073963",
"0.4997482",
"0.4990369",
"0.49760115",
"0.494673... | 0.6547118 | 0 |
CHECKME AK: what's this for? | public void setCancelDelegate(NextPageDelegate cancelDelegate); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void smell() {\n\t\t\n\t}",
"@Override\n\tpublic void check() {\n\t\t\n\t}",
"@Override\n\tpublic void check() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"public void method_4270() {}",
"void check() throws YangException;",
"private void m50366E() {\n }",
"void check();",
"void check(... | [
"0.6045142",
"0.59867805",
"0.59867805",
"0.59413254",
"0.58739877",
"0.57764274",
"0.57600695",
"0.5687729",
"0.5687729",
"0.56245726",
"0.554257",
"0.5508994",
"0.5505902",
"0.5491975",
"0.5487144",
"0.54753894",
"0.54242885",
"0.541892",
"0.541249",
"0.54086554",
"0.539957... | 0.0 | -1 |
Preselect a query match value | public void setQueryMatchForKey(Object value, String selector, String key); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void strictMatches(boolean b) { strict_matches_cbmi.setSelected(b); }",
"public void resetSearchSelection() {\n this.quantSearchSelection = null;\n SelectionChanged(\"reset_quant_searching\");\n }",
"public void select() {}",
"public void testKeepSelectionOnFilterChange() {\n ... | [
"0.5247668",
"0.5213187",
"0.5103376",
"0.5002707",
"0.49992913",
"0.49422088",
"0.49018794",
"0.4892972",
"0.485427",
"0.4815259",
"0.4813005",
"0.480321",
"0.4800359",
"0.47876012",
"0.4770682",
"0.47615677",
"0.47580987",
"0.47493395",
"0.47492152",
"0.47342592",
"0.472562... | 0.5368048 | 0 |
Returns the query datasource. Not having this is annoying... | public EODataSource queryDataSource(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDatasource()\r\n\t{\r\n\t\treturn _dataSource;\r\n\t}",
"String getDataSource();",
"public DataSource getDatasource() {\n return datasource;\n }",
"@Override\n public String getDataSource()\n {\n return dataSource;\n }",
"public static DataSource getDataSource() t... | [
"0.76726973",
"0.76209575",
"0.7322812",
"0.71591204",
"0.7099408",
"0.7043845",
"0.6977622",
"0.6950327",
"0.6942205",
"0.69276893",
"0.69162524",
"0.68789923",
"0.6846028",
"0.68111366",
"0.6803701",
"0.67638934",
"0.6733145",
"0.6731323",
"0.6726145",
"0.6710969",
"0.66923... | 0.8125535 | 0 |
Set the level of the zoom. | private void setZoomLevel() {
final float oldMaxScale = photoView.getMaximumScale();
photoView.setMaximumScale(oldMaxScale *2);
photoView.setMediumScale(oldMaxScale);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void zoomToLevel(int level) {\n \t\tfloat scale = getScaleFromZoom(level);\n \t\tzoomToScale(scale);\n \t}",
"public void setZoom(){\n\t\tactive.setZoom();\n\t}",
"@Override\n public void setLevel(int level) {\n if (level > 1) {\n this.level = level;\n scaleUp();\n ... | [
"0.7693182",
"0.75415486",
"0.7430071",
"0.73562545",
"0.72288764",
"0.7144337",
"0.711562",
"0.7098923",
"0.70384765",
"0.703531",
"0.6972437",
"0.6972437",
"0.6964441",
"0.6958604",
"0.695142",
"0.69486934",
"0.6942646",
"0.69367725",
"0.6921951",
"0.6915609",
"0.68935245",... | 0.790801 | 0 |
load the photo into the view, show the photo to the user. | private void loadPhotoIntoView(String photoPath) {
Glide.with(this)
.load(photoPath)
.transition(DrawableTransitionOptions.withCrossFade())
.into(photoView);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showView() {\n\t\tfinal ImageView image = (ImageView) findViewById(R.id.image); \n\t\t//screen.addView(image);\n\t\t//image.setImageResource(images[0]);\n\n\t\tString fileName = getFilesDir().getPath() + \"/\" + FILE_NAME;\n\t\t//System.out.println(fileName);\n\t\tBitmap bm = BitmapFactory.decodeFile(... | [
"0.70911384",
"0.70596135",
"0.69729584",
"0.68110925",
"0.6649921",
"0.6552507",
"0.64896554",
"0.6474001",
"0.64563113",
"0.6443536",
"0.640251",
"0.64012426",
"0.6389919",
"0.6388241",
"0.63701016",
"0.6365049",
"0.63206524",
"0.6307779",
"0.63002497",
"0.63002163",
"0.626... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(final LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_wardrobe, container, false);
ImageItemUtil imageItemUtil = new ImageItemUtil(getActivity());
imageItems.addAll(imageItemUtil.getData("Top"));
gridView = (GridView) view.findViewById(R.id.gridViewFragment);
gridAdapter = new GridViewAdapter(getActivity(), R.layout.wardrobe_item, imageItems);
gridView.setAdapter(gridAdapter);
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
ImageItem item = (ImageItem) parent.getItemAtPosition(position);
//Create intent
Intent intent = new Intent(getActivity(), ItemDetailActivity.class);
intent.putExtra("title", item.getDescription());
intent.putExtra("image", item.getImage());
String tags = "";
for (int i = 0; i < item.getTags().size(); i++)
{
tags += item.getTags().get(i) + ", ";
}
String tag = tags.substring(0, tags.length() - 2);
intent.putExtra("tags", tag);
intent.putExtra("category", item.getCategory());
intent.putExtra("id",item.getId());
intent.putExtra("path", item.getFilepath());
//Start details activity
startActivity(intent);
//getActivity().finish();
}
});
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6740675",
"0.6725193",
"0.67224836",
"0.6699259",
"0.6691596",
"0.668896",
"0.6687658",
"0.66861755",
"0.667755",
"0.66756433",
"0.6667425",
"0.66667783",
"0.6665166",
"0.66614723",
"0.66549766",
"0.665031",
"0.6643759",
"0.6639389",
"0.66378653",
"0.66345453",
"0.6626348"... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.