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 |
|---|---|---|---|---|---|---|
Generate the SVG Library. | public void generate(boolean leaning, String bkColor, String bColor, String sColor, String string)
throws IOException, ParserConfigurationException {
int dimCanvasX = (int) ((int) library.getFrameSizeW() - 0.055 * library.getFrameSizeW());
int dimCanvasY = 1500;
int thiknessEdges = 20;
graphics.setS... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toSVG() {\n\n StringBuilder toReturn = new StringBuilder();\n toReturn.append(\"<svg width=\" + \"\\\"\" + Integer.toString(this.width)\n + \"\\\"\" + \" height=\" + \"\\\"\" + Integer.toString(this.height)\n + \"\\\"\" + \" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/... | [
"0.66946304",
"0.6676237",
"0.61945975",
"0.612754",
"0.5906935",
"0.59015995",
"0.5864651",
"0.5840733",
"0.57873315",
"0.5766339",
"0.5708766",
"0.56776124",
"0.56230456",
"0.55722004",
"0.55477744",
"0.55038965",
"0.54804397",
"0.54541206",
"0.5452811",
"0.5429457",
"0.542... | 0.5214019 | 31 |
Generate the file's name | public String generate(int length) {
String chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
String pass = "";
for (int x = 0; x < length; x++) {
int i = (int) Math.floor(Math.random() * 62);
pass += chars.charAt(i);
}
return pass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String generateFilename() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }",
"public String generateFileName()\r\n {\r\n for (;;)\r\n {\r\n String name = generateFileName(\"_\" + Math.abs(random.nextInt()));\r\n if (!(new File(name))... | [
"0.83639306",
"0.8169292",
"0.8008117",
"0.7897545",
"0.7893309",
"0.7822783",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.7798664",
"0.7602686",
"0.7578787",
"0.7473152",
"0.7473152",
"0.74298525",
"0.74298... | 0.0 | -1 |
getter of the library | public Library getLibrary() {
return library;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLibrary() {\n return library;\n }",
"public Library getLibrary() {\r\n\t\treturn library;\t\r\n\t}",
"public ArrayList getLibrary() {\n return Library;\n }",
"public Libro getLIBRO() {\r\n return LIBRO;\r\n }",
"public AbstractLibrary getOwningLibrary();",
"public... | [
"0.78719544",
"0.7851377",
"0.74417764",
"0.6849319",
"0.67620873",
"0.67553943",
"0.6688496",
"0.66696227",
"0.6649742",
"0.6569055",
"0.6555669",
"0.653491",
"0.6470187",
"0.6420696",
"0.6412356",
"0.6412307",
"0.6288624",
"0.62668514",
"0.62607795",
"0.6257157",
"0.6253411... | 0.77517813 | 2 |
getter of the new image | public String getNewImage() {
return newImage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TiledImage getNewImage() {\n return this.newImage;\n }",
"@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}",
"@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}",
"public ImageInfo getImage() {\n return image;\n }",
"public Image getImage() {\r\... | [
"0.81528515",
"0.76820177",
"0.76079446",
"0.7585006",
"0.7561417",
"0.75599957",
"0.7538581",
"0.7505457",
"0.75036925",
"0.74885476",
"0.745831",
"0.7435098",
"0.7432584",
"0.7432584",
"0.7429053",
"0.74164194",
"0.73727477",
"0.73557425",
"0.73337185",
"0.73131275",
"0.731... | 0.83874744 | 0 |
setter of the library | public void setLibrary(Library library2) {
this.library = library2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Library(String setName) {\n name = setName;\n }",
"public void setLibele(String lib){\n\t\tlibeleService = lib;\n\t}",
"@Generated(hash = 1817530046)\r\n public void setLibrary(Library library) {\r\n synchronized (this) {\r\n this.library = library;\r\n id = library =... | [
"0.6778641",
"0.6608035",
"0.65860236",
"0.6400432",
"0.633951",
"0.6090093",
"0.6060491",
"0.6039339",
"0.6027274",
"0.5925005",
"0.58519465",
"0.5795154",
"0.5745732",
"0.5718566",
"0.5715814",
"0.56800914",
"0.56534714",
"0.56519574",
"0.56513107",
"0.56330043",
"0.5628256... | 0.6786368 | 0 |
setter of the new image | public void setNewImage(String newImage) {
this.newImage = newImage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void lSetImage(Image img);",
"public void setImage(Image img) {\r\n this.img = img;\r\n }",
"public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\... | [
"0.7663138",
"0.7631961",
"0.7629929",
"0.75064164",
"0.7496825",
"0.7378403",
"0.7369977",
"0.7294773",
"0.72836494",
"0.7262638",
"0.72544104",
"0.72454596",
"0.70826423",
"0.70771813",
"0.70696545",
"0.70512784",
"0.6970745",
"0.6939088",
"0.69191015",
"0.689531",
"0.68945... | 0.6666992 | 40 |
Set the size of the book | public void setSizeBook(int ShelfHeight, int ShelfWidth, Book book, int idealWidth, int idealHeight, int widthSup,
int heightSup) {
if (!(book.getWidth() >= idealWidth && book.getWidth() <= widthSup)) {
book.setWidth(widthSup);
}
if (!(book.getHeight() >= idealHeight && book.getHeight() <= heightSup)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBookSize(String value) {\n setAttributeInternal(BOOKSIZE, value);\n }",
"void setPaperSize(short size);",
"public void setSize(int size){\n this.size = size;\n }",
"public void setSize(int size) {\r\n _size = size;\r\n }",
"public void setSize(int _size)\r\n {\r\... | [
"0.7663241",
"0.750057",
"0.7416262",
"0.7397474",
"0.73969454",
"0.7370586",
"0.7302626",
"0.7281736",
"0.7276835",
"0.7249936",
"0.7231165",
"0.7231165",
"0.72248346",
"0.7217883",
"0.7197767",
"0.7177045",
"0.71759874",
"0.71759874",
"0.715017",
"0.715017",
"0.715017",
"... | 0.6625614 | 36 |
Define the back and the outlines of the library. | private void drawBackOutlines(int dimCanvasX, int dimCanvasY, int thiknessEdges, String bkColor, String sColor) {
Shape fond = new Rectangle(0, 0, dimCanvasX, dimCanvasY);
List<Shape> edges = getEdges(dimCanvasX, dimCanvasY, thiknessEdges);
switch (bkColor) {
case "Light":
graphics.setPaint(Color.decode... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AcideDebugPanelHighLighter() {\r\n\t\tsetLines(new HashMap<String, ArrayList<Integer>>());\r\n\t\tsetHighLights(new ArrayList<Object>());\r\n\t\tsetAssertedFacs(new HashSet<String>());\r\n\t\t_highlight = true;\r\n\t}",
"private void drawWindowSetup(){\n\t\t//draw header\n\t\ttopBar.draw(graphics);\n\t\t/... | [
"0.5945546",
"0.57711923",
"0.5753047",
"0.5621509",
"0.56105244",
"0.55658853",
"0.5558059",
"0.5542003",
"0.54974836",
"0.5491356",
"0.54610676",
"0.5422835",
"0.54091525",
"0.54043126",
"0.540131",
"0.53809214",
"0.5333891",
"0.53087217",
"0.5290505",
"0.52894175",
"0.5287... | 0.5807201 | 1 |
Draw surround of the shape. | public void drawBorder(Graphics g, Shape s) {
graphics.setStroke(new BasicStroke(8f)); // set the surround size of the shape
graphics.setColor(Color.BLACK);
graphics.draw(s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }",
"public void drawShape(Shape shape);",
"@Override\r\n\tpub... | [
"0.77646726",
"0.7220243",
"0.7184817",
"0.71591353",
"0.71403605",
"0.71309733",
"0.7035527",
"0.7003898",
"0.697834",
"0.6962992",
"0.68839973",
"0.6809501",
"0.67883587",
"0.67441636",
"0.67382014",
"0.6706745",
"0.6673533",
"0.66208637",
"0.6561749",
"0.6549071",
"0.65042... | 0.0 | -1 |
Draw the title of the book | private void drawBooksAndTitles(int spaceBetweenShelves, int dimCanvasX, int thiknessEdges, int shelfWidth,
boolean leaning, List<Shape> shelves, String bColor) {
List<Shape> bookShapes = new ArrayList<>();
int idealWidth = (int) (0.6 * (shelfWidth / library.getShelves().get(0).getBooks().size()));
int ide... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void drawTitle(int bookRotation, String bookString, Shape book, double bookX, double bookY, int indexBook,\r\n\t\t\tdouble bookHeight, String bColor, double bookWidth) {\r\n\r\n\t\t// select the black color for the title\r\n\t\tif (bColor.equals(\"Dark\")) {\r\n\t\t\tgraphics.setPaint(Color.white);\r\n\t\t... | [
"0.8098338",
"0.7447182",
"0.69511896",
"0.69349575",
"0.6911711",
"0.6849773",
"0.67735165",
"0.6733104",
"0.67300636",
"0.6720845",
"0.6654049",
"0.6579086",
"0.6536111",
"0.64545614",
"0.64423406",
"0.643985",
"0.6414478",
"0.6413348",
"0.6394679",
"0.632651",
"0.62208045"... | 0.0 | -1 |
Draw the title of the book | private void drawTitle(int bookRotation, String bookString, Shape book, double bookX, double bookY, int indexBook,
double bookHeight, String bColor, double bookWidth) {
// select the black color for the title
if (bColor.equals("Dark")) {
graphics.setPaint(Color.white);
} else {
graphics.setPaint(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void drawTitle(){\n titleBox = new Rectangle(155,380, 490, 200);\n titleBorder = new Rectangle(150, 375, 500, 210);\n titleBorder.setFillColor(pink);\n titleBorder.setFilled(true);\n titleBox.setFillColor(Color.BLACK);\n titleBox.setFilled(true);\n title =... | [
"0.74464285",
"0.69507116",
"0.6935365",
"0.69120705",
"0.68513364",
"0.67731327",
"0.6732417",
"0.67307836",
"0.6722624",
"0.6654509",
"0.6579786",
"0.65368956",
"0.6454025",
"0.64426255",
"0.6439923",
"0.641581",
"0.64136696",
"0.63959754",
"0.6327954",
"0.62221384",
"0.622... | 0.80989575 | 0 |
get the cos of the angle by getting the degree in radian | private double getCos(int rot) {
return Math.cos(Math.toRadians(rot));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double cos(double number);",
"public double cosAngle(Vector3 other) {\n\t\tif (isZeroVector(this) || isZeroVector(other)) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn dot(other) / (norm() * other.norm());\n\t}",
"double cosTheta();",
"@Test\n\tvoid cosTestWithDegreeInput() throws CustomException {\n\t\tdoubl... | [
"0.7698447",
"0.75015265",
"0.7317558",
"0.7160754",
"0.7122437",
"0.7090763",
"0.7042727",
"0.69399256",
"0.6933242",
"0.6928064",
"0.69235593",
"0.6875221",
"0.681981",
"0.6819066",
"0.67443347",
"0.6708625",
"0.6698392",
"0.66300064",
"0.6609953",
"0.659785",
"0.658607",
... | 0.7660944 | 1 |
Generate the borders of the library. | private List<Shape> getEdges(int dimCanvasX, int dimCanvasY, int thinknessEdges) {
List<Shape> res = new ArrayList<>();
Shape left = new Rectangle(0, 0, thinknessEdges, dimCanvasY);
Shape right = new Rectangle(dimCanvasX - thinknessEdges, 0, thinknessEdges, dimCanvasY);
Shape top = new Rectangle(0, 0, dimCa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createCanvasBorders() {\n\n\t\tLabel lblBorderMiddle = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderMiddle.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t\tlblBorderMiddle.setBounds(0, 72, 285, 2);\n\n\t\tLabel lblBorderBottom = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderBottom.se... | [
"0.7512593",
"0.72124314",
"0.718585",
"0.70591813",
"0.7007239",
"0.6930991",
"0.6723843",
"0.6683459",
"0.658525",
"0.6467409",
"0.628891",
"0.61721635",
"0.6145661",
"0.613485",
"0.61292833",
"0.61256325",
"0.6123991",
"0.6090261",
"0.60512245",
"0.60435206",
"0.6042684",
... | 0.0 | -1 |
get the sin of the angle by getting the degree in radian | private double getSin(int rot) {
return Math.sin(Math.toRadians(rot));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double calculateSine(double angle);",
"public static float sin(float degrees) {\r\n return sinLookup((int) (degrees * precision + 0.5f));\r\n }",
"public double sin(double number);",
"public double calculateSine(double angle, String angleType);",
"public static double findSin(double radiun... | [
"0.7698675",
"0.7658577",
"0.747728",
"0.7152769",
"0.7123799",
"0.70340115",
"0.69854563",
"0.6954412",
"0.6798659",
"0.6745782",
"0.66827786",
"0.668191",
"0.6679672",
"0.6673103",
"0.66097903",
"0.65967",
"0.6589407",
"0.64977515",
"0.6485657",
"0.64528346",
"0.63658625",
... | 0.8094332 | 0 |
/ recycle connection pool | public void recycle(SnRpcConnection connection) throws Throwable {
if (null != connection) {
pool.returnObject(connection);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized void recycleConnection(Connection conn) throws SQLException{\n\t\tif ( !idlePool.contains(conn) ){\n\t\t\tactiveConnectionSemaphore.release();\n\t\t\tidlePool.addLast( conn );\n\t\t} \n\t}",
"void closeConnectionsPool();",
"public void recycle() {\n// synchronized (sPoolSync) {\n// ... | [
"0.7638424",
"0.7560004",
"0.743772",
"0.700768",
"0.6901019",
"0.6691343",
"0.6642597",
"0.6596791",
"0.6570288",
"0.655006",
"0.653636",
"0.6520299",
"0.6448161",
"0.62781894",
"0.6266406",
"0.6263133",
"0.62602174",
"0.6204365",
"0.6194799",
"0.6174137",
"0.6151545",
"0.... | 0.7198179 | 3 |
//////////////////////////////////////////////////////////////////////////////////////////////// Proxy Invocation Handler | @Override
public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
String name = method.getName();
try {
Method proxyMethod = proxyObject.getClass().getMethod(method.getName(), method.getParameterTypes());
return proxyMethod.invoke( proxyObject, ob... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Proxy(InvocationHandler h) { }",
"Proxy getProxy();",
"public static void main(String[] args) {\n Executor executor = new Executor();\n InvocationHandler handler = new DynamicProxy(executor);\n IProxy proxy = (IProxy) Proxy.newProxyInstance(handler.getClass().getClassLoader(), ex... | [
"0.76682025",
"0.7203623",
"0.68828946",
"0.6795199",
"0.6792482",
"0.6685512",
"0.66576517",
"0.6457817",
"0.6314063",
"0.6291939",
"0.62623954",
"0.6256214",
"0.6246262",
"0.62401783",
"0.6235129",
"0.6220681",
"0.621733",
"0.62071455",
"0.61722314",
"0.61685884",
"0.613829... | 0.5633545 | 78 |
Creates new form EmployeeManagement | public CustomerManagement() {
initComponents();
setLocationRelativeTo(null);
loadTable();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}",
"public addEmployee() {\n initComponents();\n \n conn = db.java_db();\n Tool... | [
"0.7641928",
"0.6853509",
"0.68508226",
"0.6632706",
"0.6629085",
"0.65116733",
"0.6508229",
"0.6430332",
"0.63982755",
"0.6385436",
"0.6363622",
"0.63491917",
"0.6301066",
"0.62939125",
"0.62746435",
"0.6273666",
"0.62608683",
"0.6247043",
"0.62442756",
"0.622158",
"0.621167... | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
panel_title = new javax.swing.JPanel();
lb_title = new javax.swing.JLabel();
btn_exit = new javax.swing.JButton();
panel_total... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.7319037",
"0.7290621",
"0.7290621",
"0.7290621",
"0.7285163",
"0.72480375",
"0.72130316",
"0.7207723",
"0.7195822",
"0.7189463",
"0.7183591",
"0.71580946",
"0.7147075",
"0.70924276",
"0.70795405",
"0.7056352",
"0.6986753",
"0.6976759",
"0.6954958",
"0.69533294",
"0.6944831... | 0.0 | -1 |
Sets the private key registry by alias. | public void setPrivateKeyRegistryByAlias(PrivateKeyRegistryByAlias privateKeyRegistryByAlias) {
this.privateKeyRegistryByAlias = privateKeyRegistryByAlias;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static void setKeyStoreAlias(String keyStoreAlias) {\n Program.keyStoreAlias = keyStoreAlias;\n }",
"public void setAlias(String newAlias) {\n alias = newAlias;\n }",
"public void setAlias(String alias);",
"public void setAlias(String alias)\n {\n this.alias = alias;\n }",
"void regi... | [
"0.60610324",
"0.5987886",
"0.5987753",
"0.56464183",
"0.5588365",
"0.55017966",
"0.5496479",
"0.5446572",
"0.54440117",
"0.5439121",
"0.53883094",
"0.53462064",
"0.5322626",
"0.53113365",
"0.5227174",
"0.5177357",
"0.51652294",
"0.5135347",
"0.5116525",
"0.5098767",
"0.50922... | 0.7864472 | 0 |
The signature algorithm. The default is SHA1withRSA. | public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSigAlgOID()\n {\n return c.getSignatureAlgorithm().getAlgorithm().getId();\n }",
"String getDigestAlgorithm();",
"public SingleSignConstants.SignAlgorithm getSignAlgorithm() {\r\n\t\treturn this.algorithm;\r\n\t}",
"public static String getKeyAlgorithmFromSigAlg(final String sig... | [
"0.69939893",
"0.6778169",
"0.6668125",
"0.6550361",
"0.6508874",
"0.6500723",
"0.6434484",
"0.6330362",
"0.6272048",
"0.62718815",
"0.62515086",
"0.62288344",
"0.6223611",
"0.62201387",
"0.6170791",
"0.6104757",
"0.60045505",
"0.60045505",
"0.60045505",
"0.59810334",
"0.5926... | 0.0 | -1 |
The charset to use when converting a string into a raw byte array representation. The default is UTF8. | public void setCharsetName(String charsetName) {
this.charsetName = charsetName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static final byte[] asUTF8(final String s) {\n return s.getBytes(StandardCharsets.UTF_8);\n }",
"@NonNull\n public static byte[] StringToByte(String string) throws UnsupportedEncodingException\n {\n return string.getBytes(\"UTF-8\");\n }",
"public static byte[] stringToBytes(St... | [
"0.70015234",
"0.6910601",
"0.6723373",
"0.6577787",
"0.64898956",
"0.64464164",
"0.6287899",
"0.6165732",
"0.60677445",
"0.60632277",
"0.5991832",
"0.5960137",
"0.5924071",
"0.59033227",
"0.5903058",
"0.5887798",
"0.58793193",
"0.5872444",
"0.5865107",
"0.5844142",
"0.583400... | 0.0 | -1 |
Sets the provider name of the specific implementation requested (e.g., "BC" for BouncyCastle, "SunJCE" for the default Sun JCE provider). | public void setProvider(String provider) {
this.provider = provider;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProvider(String value) { _provider = value; }",
"public static void setProvider(String providerName) {\n provider = providerName;\n logger.debug(\"Provider set to : \" + providerName);\n }",
"public void setProvider(String value) {\n setAttributeInternal(PROVIDER, value);... | [
"0.75884897",
"0.72551656",
"0.690718",
"0.6896059",
"0.68836",
"0.6831495",
"0.6823036",
"0.67362475",
"0.6651835",
"0.6633427",
"0.6414008",
"0.6375595",
"0.63256824",
"0.6307755",
"0.6296746",
"0.6290519",
"0.62546945",
"0.61975366",
"0.61728543",
"0.6142747",
"0.61412615"... | 0.72750235 | 2 |
Retrieving all item in the calls' list | public List<CallItem> findAllCalls() {
String orderBy = CallsDBOpenHelper.COLUMN_CALL_DATE + " DESC, " + CallsDBOpenHelper.COLUMN_CALL_HOUR + " DESC";
Cursor cursor = dataBase.query(CallsDBOpenHelper.TABLE_CALLS, callsTable_allColumns,
null, null, null, null, orderBy);
List<CallItem> calls = cursorToCallItem... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Call[] getCalls();",
"public List<MExampleCall> getExampleCalls();",
"public Set getCalls() { return calls; }",
"public CallLog[] getCallLogs();",
"public Long getCalls() {\r\n return calls;\r\n }",
"public Call getCall() {\n\treturn call;\n }",
"@Override\n public Collection<Pho... | [
"0.7402448",
"0.63885283",
"0.63680375",
"0.62834597",
"0.62733895",
"0.61824584",
"0.6095812",
"0.6087766",
"0.60676086",
"0.59990036",
"0.5910869",
"0.59009457",
"0.5845386",
"0.58055174",
"0.5778235",
"0.5753392",
"0.5704363",
"0.56838626",
"0.5652095",
"0.56124866",
"0.56... | 0.6804872 | 1 |
// confirm login for admin | @RequestMapping(value = "/admin_login")
public String adminLogin(@ModelAttribute("AdminLogCommand") Admin a, HttpSession session) {
if (a.getEmail().trim() == null || a.getPassword().trim() == null) {
return "redirect: /admin_login_page?msg=field missing";
}
Admin admin = ad... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void confirmLogin() {\n String nameString1 = this.adminName.getText();\n String passwordString1 = this.adminPassword.getText();\n UserType userType = (UserType) this.user_type_combobox.getSelectedItem();\n if (\"系统管理员\".equals(userType.getName())) {\n AdminDao admin... | [
"0.8052373",
"0.7008123",
"0.69400495",
"0.68611735",
"0.6780575",
"0.67700875",
"0.6659536",
"0.65954685",
"0.65147924",
"0.641674",
"0.6361121",
"0.6321161",
"0.630699",
"0.62868524",
"0.62805116",
"0.62805116",
"0.6252684",
"0.6238185",
"0.6209148",
"0.62018335",
"0.616631... | 0.5808041 | 47 |
Admin Edit account page | @RequestMapping(value = "/admin/admin_edit_account")
public String adminEdtitAccountPage(Model m, HttpSession session) {
AdminEditCommand adminEditCommand = new AdminEditCommand();
Admin a = (Admin) session.getAttribute("admin");
adminEditCommand.setA(a);
System.out.println("... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }",
"public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.ed... | [
"0.7366031",
"0.7284476",
"0.7258471",
"0.70941466",
"0.6898081",
"0.6825",
"0.6784004",
"0.6783607",
"0.66596115",
"0.6657883",
"0.6622889",
"0.65877485",
"0.6563285",
"0.65374535",
"0.6511079",
"0.64894927",
"0.64833224",
"0.6434093",
"0.64036465",
"0.6392816",
"0.63903517"... | 0.6775564 | 8 |
after edit admin account Update Admiit | @RequestMapping(value = "/admin/update_admin__account")
public String adminUpdateAccountPage(@ModelAttribute("AdminEditCommand") AdminEditCommand cmd, HttpSession session) {
System.out.println("form data: " + cmd.getA());
Admin current_admin = (Admin) session.getAttribute("admin");
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateAccount();",
"Account.Update update();",
"@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}",
"void updateAccount(Account account);",
"@Override\n\tpublic void updateAccount(String pwd, String field, String company) {\n\t}",
"public void testUpdateAccount(){\n\... | [
"0.71645373",
"0.66107166",
"0.6523741",
"0.65005964",
"0.6490725",
"0.64523715",
"0.6449855",
"0.63964456",
"0.639011",
"0.6309596",
"0.6308933",
"0.63037",
"0.62955505",
"0.6261428",
"0.625325",
"0.6183802",
"0.61657035",
"0.6160067",
"0.6142764",
"0.6142531",
"0.6116135",
... | 0.68495035 | 1 |
/int deleteByPrimaryKey(Long customerId); int insert(Customers customers); int insertSelective(Customers customers); | List<Customers> selectByCustomers(Customers customers); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteCustomerById(int customerId);",
"void delete(Customer customer);",
"@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}",
"public boolean deleteCustomer(String custId);",
"void deleteCustomerById(Long id);",
"void... | [
"0.7366059",
"0.7291827",
"0.6986678",
"0.6986678",
"0.6945057",
"0.68889683",
"0.66910255",
"0.6674438",
"0.66255456",
"0.65827185",
"0.6500497",
"0.64798754",
"0.64561474",
"0.64561474",
"0.6422951",
"0.6385572",
"0.6373173",
"0.6363183",
"0.63464636",
"0.632571",
"0.632392... | 0.0 | -1 |
Find by reference: deployment | public List<ActProcessDefinition> findByDeployment(ActDeployment deployment) {
return this.findByDeploymentId(deployment.getId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Optional<V1Deployment> existingDeployment(AppsV1Api appsApi) {\n try {\n return Optional.of(appsApi.readNamespacedDeployment(config.getName(),config.getNamespace(),null,false,false));\n } catch (ApiException e) {\n return Optional.empty();\n }\n }",
"private ... | [
"0.55745804",
"0.545345",
"0.5416131",
"0.54142684",
"0.5390493",
"0.5094392",
"0.50744855",
"0.4970015",
"0.49570495",
"0.4953929",
"0.4883444",
"0.4846162",
"0.48436332",
"0.48120567",
"0.4784141",
"0.47829473",
"0.47747567",
"0.4772457",
"0.4771788",
"0.47475374",
"0.47466... | 0.0 | -1 |
Find by ID of reference: deployment.id | public List<ActProcessDefinition> findByDeploymentId(String deploymentId) {
return (List<ActProcessDefinition>) this
.getEntityManager()
.createQuery(
"select e from ActProcessDefinition e where e.deployment.id = :pDeploymentId",
ActProcessDefinition.class)
.setParameter("pDeploymentId"... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n @ResponseBody\n public Deployment getDeployment(@PathVariable(\"id\") String id) {\n return processService.getDeployment(id);\n }",
"public IDeploymentTarget findTarget(ITMWProject project, String id) {\n return null;\r\n ... | [
"0.62308764",
"0.588686",
"0.57650524",
"0.5469259",
"0.54275936",
"0.5271427",
"0.5241",
"0.5169751",
"0.51611173",
"0.51004773",
"0.5097516",
"0.50684416",
"0.50680196",
"0.50554925",
"0.5045578",
"0.5024132",
"0.50237906",
"0.50230527",
"0.5022186",
"0.5020842",
"0.5016305... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int getCount() {
return resInfo.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Object getItem(int position) {
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.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 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.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 |
click on the Sign in button | public boolean isSuccessful() {
//loadSettingsFromFile(filePath);
Login();
if (EXPECTED_TITLE.equals(driver.getTitle()))
return true;
else
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"public void clickSignInButton() {\r\n\t\tdriver.findElement(signInButton).click();\r\n\t}",
"public void clickSignInButton() {\r\n\t\tsignInButton = driver.find... | [
"0.9051268",
"0.85858274",
"0.85505134",
"0.85047007",
"0.8230019",
"0.8099968",
"0.79788756",
"0.7913509",
"0.7883297",
"0.78498363",
"0.7838617",
"0.77460134",
"0.7701183",
"0.7641741",
"0.76122826",
"0.76079977",
"0.7586359",
"0.75589925",
"0.7535602",
"0.75162476",
"0.747... | 0.0 | -1 |
TODO Autogenerated method stub int[][] arr = new int[4][4]; print(arr, 3, 0, 0, ""); | public static void main(String[] args) {
int n = 4;
int[] col = new int[n];
int[] d1 = new int[2 * n];
int[] d2 = new int[2 * n];
printopti(n, 0, "", col, d1, d2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void printOneDimensionalArray(int[] arr) {\n\n\t\tfor (int value : arr) {\n\t\t\tSystem.out.print(value + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void main(String[] args) {\n\t\t\r\nint arr[][]= {{1,2,3},{4,5,6},{7,8,9}};\r\nfor(int row=0;row<3;row++)\t{\t\r\n\tfor(int col=0... | [
"0.7582327",
"0.7491363",
"0.737072",
"0.72139287",
"0.719301",
"0.7192546",
"0.7151909",
"0.71141344",
"0.7091622",
"0.7088155",
"0.7054176",
"0.7017754",
"0.70035523",
"0.6967018",
"0.69552886",
"0.6941485",
"0.6934961",
"0.69201404",
"0.6913715",
"0.6910875",
"0.69090974",... | 0.0 | -1 |
Gets the tumbler display component. | public TumblerDisplay getTumblerDisplay() {
return tumblerDisplay;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Display getDisplay () {\n return Display.getDisplay(this);\n }",
"public Display getDisplay () {\n return Display.getDisplay(this);\n }",
"public Display getDisplay() {\n return Display.getDisplay(this);\n }",
"public abstract Display getDisplay();",
"public javax.swing... | [
"0.67499065",
"0.67499065",
"0.66568524",
"0.64220405",
"0.63460404",
"0.6342053",
"0.6333044",
"0.62031674",
"0.6134991",
"0.61168593",
"0.60636395",
"0.5878158",
"0.58622015",
"0.57866806",
"0.57827044",
"0.5760438",
"0.57341194",
"0.5686793",
"0.56633055",
"0.56168056",
"0... | 0.8144527 | 0 |
Turns all the lights on. | public void turnLightsOn() {
if (isFlashing()) {
return;
}
for (int i = 0; i < topBorder.size(); i++) {
topBorder.get(i).turnOn();
}
for (int i = 0; i < bottomBorder.size(); i++) {
bottomBorder.get(i).turnOn();
}
for (i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(on... | [
"0.7563086",
"0.74004674",
"0.73539585",
"0.7250736",
"0.723721",
"0.7081113",
"0.6985954",
"0.69205964",
"0.69098926",
"0.68636703",
"0.686316",
"0.6823526",
"0.67917407",
"0.6785274",
"0.6764499",
"0.6671959",
"0.66578543",
"0.66411674",
"0.6638394",
"0.6610078",
"0.6586615... | 0.7780391 | 0 |
Turns all the lights off. | public void turnLightsOff() {
if (isFlashing()) {
return;
}
for (int i = 0; i < topBorder.size(); i++) {
topBorder.get(i).turnOff();
}
for (int i = 0; i < bottomBorder.size(); i++) {
bottomBorder.get(i).turnOff();
}
for... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void turnOffAllTheLights() {\r\n for (Light li : lightsArray) {\r\n li.turnOffLight();\r\n }\r\n }",
"public void lightsOf... | [
"0.8990175",
"0.8594699",
"0.82892364",
"0.786323",
"0.7641463",
"0.7496751",
"0.7477325",
"0.74292123",
"0.7418322",
"0.7416207",
"0.74044245",
"0.7343862",
"0.7336816",
"0.7205784",
"0.7184631",
"0.71432805",
"0.7139164",
"0.7131101",
"0.7130283",
"0.70716375",
"0.70678777"... | 0.81383973 | 3 |
Tells weather the lights are flashing or not. | public boolean isFlashing() {
return isFlashing;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }",
"@Override\n\tpublic void setFlashing(int bool) {\n\n\t}",
"public void machineFlash() {\n\t\tmachineFlash = !machineFlash;\n\t}",
"private void on(){\n\n\t\t// if light is off and there is a flash object\n... | [
"0.694418",
"0.67083186",
"0.6612025",
"0.6590465",
"0.65647066",
"0.65565616",
"0.6511759",
"0.6492263",
"0.6446797",
"0.63400596",
"0.6298835",
"0.6291381",
"0.62600154",
"0.6236019",
"0.621581",
"0.6177126",
"0.61766493",
"0.6097698",
"0.60154337",
"0.5986245",
"0.5984965"... | 0.6537787 | 6 |
called when the thread starts | public void run() {
// check if lights are already flashing
if (isFlashing()) {
return;
}
// set the keep flashing flag
keepFlashing = true;
// set the flashing flag
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void threadStarted() {\n }",
"public synchronized void startup() {\n\n if (mThread == null) {\n mThread = new CounterThread();\n new Thread(mThread).start();\n }\n Log.d(TAG, \"startup\");\n }",
"@Override\n public synchronized void star... | [
"0.770231",
"0.752599",
"0.7494456",
"0.74117047",
"0.73645794",
"0.7334728",
"0.73040056",
"0.7195476",
"0.7190969",
"0.71807563",
"0.71807235",
"0.71807235",
"0.71807235",
"0.7177022",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71... | 0.0 | -1 |
Stops the lights from flashing. | public void stopFlashingLights() {
keepFlashing = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnLightsOff() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOff();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOff();\n ... | [
"0.75701153",
"0.74674433",
"0.7421466",
"0.71589696",
"0.7120681",
"0.69463295",
"0.6919583",
"0.6896689",
"0.68727386",
"0.6768375",
"0.672957",
"0.6687545",
"0.6652182",
"0.66471666",
"0.6646972",
"0.6570211",
"0.65449685",
"0.6531733",
"0.645898",
"0.6449866",
"0.6397397"... | 0.8501288 | 0 |
Called when the component is resized. | public void componentResized(ComponentEvent event) {
// first, size the lights and corners
double width = (double)getWidth() / ((double)maxHorizontalLights + 2); //< +2 for the corners!
double height = (double)getHeight() / ((double)maxVerticalLights + 2); //< +2 for the corners!
Dimensi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Overr... | [
"0.83997416",
"0.8314756",
"0.8314756",
"0.82875186",
"0.8232234",
"0.8202646",
"0.8116406",
"0.7863458",
"0.78351635",
"0.7798397",
"0.77858084",
"0.76980734",
"0.76959985",
"0.76549083",
"0.7650625",
"0.7643026",
"0.7643026",
"0.76367515",
"0.7630392",
"0.7589877",
"0.75389... | 0.0 | -1 |
Called when the component is moved. | public void componentMoved(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentMoved(ComponentEvent e)\n {\n \n }",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componen... | [
"0.7963142",
"0.793399",
"0.790175",
"0.790175",
"0.7889652",
"0.7889652",
"0.7884502",
"0.7880069",
"0.7868672",
"0.78404564",
"0.7833209",
"0.78271246",
"0.7788659",
"0.77826816",
"0.7761193",
"0.77410215",
"0.77410215",
"0.77300555",
"0.7723345",
"0.75920016",
"0.7513733",... | 0.7338636 | 21 |
Called when the component is shown. Weeee! | public void componentShown(ComponentEvent event) {
// resize this
componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void componentSho... | [
"0.8476182",
"0.8464792",
"0.84403604",
"0.8430428",
"0.84124565",
"0.84124565",
"0.84086305",
"0.84054196",
"0.8402616",
"0.840246",
"0.8397498",
"0.83912164",
"0.83852094",
"0.83852094",
"0.83780456",
"0.83780456",
"0.83424926",
"0.8320678",
"0.8158309",
"0.8015051",
"0.779... | 0.0 | -1 |
Called when the component is hidden. | public void componentHidden(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }",
"public void componentHidden(ComponentEvent e) {}",
"@Override\r\n public void componentHidden(ComponentEvent e) {\n }",
"@Override\n public void componentHidden(ComponentEvent arg0) {\n ... | [
"0.83220524",
"0.8314688",
"0.8305834",
"0.83042413",
"0.8271392",
"0.8265295",
"0.8246965",
"0.8241001",
"0.82213783",
"0.8208623",
"0.8208623",
"0.8191876",
"0.8191876",
"0.8188189",
"0.8187741",
"0.8187741",
"0.8157129",
"0.8157129",
"0.8157129",
"0.8157129",
"0.81489164",... | 0.7786034 | 32 |
turns the light on | public void turnOn() {
// set the flag
onFlag = true;
// set the image
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (ha... | [
"0.86642015",
"0.8274964",
"0.80111545",
"0.8011073",
"0.7962846",
"0.77929753",
"0.77447134",
"0.7694096",
"0.7670061",
"0.7656643",
"0.7629563",
"0.7613128",
"0.76055294",
"0.75675154",
"0.75656706",
"0.7559075",
"0.7510131",
"0.743296",
"0.73640555",
"0.73018825",
"0.72616... | 0.6637306 | 49 |
truns the light off | public void turnOff() {
// set the flag
onFlag = false;
// set the image
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public void lightsOff() {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(false);\n bridge.setLightSt... | [
"0.78768814",
"0.77079475",
"0.76592565",
"0.7435238",
"0.7414166",
"0.73731303",
"0.73213655",
"0.727186",
"0.72547215",
"0.72520596",
"0.7224435",
"0.7216423",
"0.7215032",
"0.7192048",
"0.7188262",
"0.71565884",
"0.71564376",
"0.71223676",
"0.7116798",
"0.710545",
"0.70737... | 0.6673135 | 37 |
turns the light on if it's off, and viceversa | public void toggle() {
if (isOn()) {
turnOff();
} else {
turnOn();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;... | [
"0.8792364",
"0.8098801",
"0.79675096",
"0.7901149",
"0.7798379",
"0.75747067",
"0.7551085",
"0.7539186",
"0.75265104",
"0.75240624",
"0.7512232",
"0.74966747",
"0.7426221",
"0.7425106",
"0.73939526",
"0.73798865",
"0.7361288",
"0.73475546",
"0.72835875",
"0.7214392",
"0.7147... | 0.6756682 | 38 |
returns true if the ligh is on, and false if not | public boolean isOn() {
return onFlag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isOn() throws Exception;",
"public boolean isOn() {\n\t\treturn false;\n\t}",
"public boolean isOn(){\n return state;\n }",
"public boolean isOn() {\n return on;\n }",
"public boolean isOn()\n {\n // Check the pin state\n return ledPin.isHigh();\n }",
... | [
"0.7309443",
"0.728884",
"0.6965781",
"0.6918012",
"0.6887905",
"0.6835912",
"0.66867495",
"0.66785896",
"0.66563416",
"0.6616217",
"0.6584682",
"0.6490996",
"0.6490947",
"0.6472041",
"0.6470144",
"0.64534193",
"0.6447711",
"0.6431251",
"0.64092934",
"0.63749105",
"0.636237",... | 0.6737976 | 6 |
Sets the exact position of this component. | public void setPosition(double x, double y) {
// set the location
setLocation((int)Math.round(x), (int)Math.round(y));
// set the position variables
position.x = x;
position.y = y;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPosition(Position pos);",
"void setPosition(Position position);",
"void setPosition(Position position);",
"public void setPosition(int position);",
"void setPosition(double xPos, double yPos);",
"@Override\n public void setPosition(float x, float y) {\n }",
"public abstract void se... | [
"0.73748195",
"0.7231641",
"0.7231641",
"0.7212502",
"0.71671486",
"0.71660334",
"0.71380705",
"0.713478",
"0.712597",
"0.7086784",
"0.7084612",
"0.70820147",
"0.7080909",
"0.7060005",
"0.70122606",
"0.70122606",
"0.69872487",
"0.6956721",
"0.69344336",
"0.69273657",
"0.69257... | 0.0 | -1 |
gets the position of this component. | public Position getPosition() {
return position;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@JsOverlay\n\tpublic final String getPosition() {\n\t\treturn this.position;\n\t}",
"public Coordinate getPosition() {\n return cPosition;\n }",
"public final ControlPosition getPosition() {\n return impl.getPosition();\n }",
"public Point getPosition() {\n return this.position;\n }",... | [
"0.79439014",
"0.7907107",
"0.78304607",
"0.78230995",
"0.78109634",
"0.7806335",
"0.7742854",
"0.7741231",
"0.7697471",
"0.7697221",
"0.7694806",
"0.76736647",
"0.7659204",
"0.76489085",
"0.76457006",
"0.7638861",
"0.76294285",
"0.76292425",
"0.76106817",
"0.76106817",
"0.76... | 0.76230985 | 23 |
Called when the component is resized. | public void componentResized(ComponentEvent event) {
// resize the image
if (isOn()) {
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));
} else {
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Overr... | [
"0.83997416",
"0.8314756",
"0.8314756",
"0.82875186",
"0.8232234",
"0.8202646",
"0.8116406",
"0.7863458",
"0.78351635",
"0.7798397",
"0.77858084",
"0.76980734",
"0.76959985",
"0.76549083",
"0.7650625",
"0.7643026",
"0.7643026",
"0.76367515",
"0.7630392",
"0.7589877",
"0.75389... | 0.7325161 | 27 |
Called when the component is moved. | public void componentMoved(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentMoved(ComponentEvent e)\n {\n \n }",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componen... | [
"0.7963142",
"0.793399",
"0.790175",
"0.790175",
"0.7889652",
"0.7889652",
"0.7884502",
"0.7880069",
"0.7868672",
"0.78404564",
"0.7833209",
"0.78271246",
"0.7788659",
"0.77826816",
"0.7761193",
"0.77410215",
"0.77410215",
"0.77300555",
"0.7723345",
"0.75920016",
"0.7513733",... | 0.7338636 | 22 |
Called when the component is shown. Weeee! | public void componentShown(ComponentEvent event) {
// resize this
componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void componentSho... | [
"0.8476429",
"0.8464999",
"0.84403676",
"0.843049",
"0.84126574",
"0.84126574",
"0.84086204",
"0.84056103",
"0.8402873",
"0.8402847",
"0.839749",
"0.83913696",
"0.8384998",
"0.8384998",
"0.83780295",
"0.83780295",
"0.834243",
"0.8320708",
"0.81582797",
"0.801468",
"0.7791258"... | 0.0 | -1 |
Called when the component is hidden. | public void componentHidden(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }",
"public void componentHidden(ComponentEvent e) {}",
"@Override\r\n public void componentHidden(ComponentEvent e) {\n }",
"@Override\n public void componentHidden(ComponentEvent arg0) {\n ... | [
"0.83220524",
"0.8314688",
"0.8305834",
"0.83042413",
"0.8271392",
"0.8265295",
"0.8246965",
"0.8241001",
"0.82213783",
"0.8208623",
"0.8208623",
"0.8191876",
"0.8191876",
"0.8188189",
"0.8187741",
"0.8187741",
"0.8157129",
"0.8157129",
"0.8157129",
"0.8157129",
"0.81489164",... | 0.7786034 | 33 |
Get the corresponding externalized name for this value. | public String getExternalName() {
return externalName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n ... | [
"0.69516534",
"0.69140345",
"0.69021076",
"0.6737662",
"0.672619",
"0.6717947",
"0.67064345",
"0.67002976",
"0.6697547",
"0.6697547",
"0.668337",
"0.66692096",
"0.66532624",
"0.6647644",
"0.6647305",
"0.66165996",
"0.6612935",
"0.6529099",
"0.65250504",
"0.6477402",
"0.647740... | 0.6904213 | 2 |
Resolve an AccessType from its external name. | public static AccessType fromExternalName(String externalName) {
if (externalName == null) {
return null;
}
for (AccessType accessType : AccessType.values()) {
if (accessType.getExternalName().equals(externalName)) {
return accessType;
}
}
throw new UnknownEnumExternalNameException(externalName);... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private @Nullable Type resolveType(@NotNull String typeName) {\n QnTypeRef typeRef = new QnTypeRef(Qn.fromDotSeparated(typeName));\n return (Type) typesResolver.resolve(typeRef);\n }",
"<T> T resolve(String name, Class<T> type);",
"public Type handleTypeName(SourceLocation loc, Identifier name) {\n ... | [
"0.6087455",
"0.59618735",
"0.5809944",
"0.57581747",
"0.56522405",
"0.5582447",
"0.54430157",
"0.54268676",
"0.53512007",
"0.5264008",
"0.5254119",
"0.51733017",
"0.5172064",
"0.51116776",
"0.5087829",
"0.50766534",
"0.50543565",
"0.5012492",
"0.49585792",
"0.49475518",
"0.4... | 0.68841743 | 0 |
db instance =========// METHODS // =========// | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mAlarmId = Constants.DEFAULT_ALARM_ID;
mDb = AppDatabase.getInstance(this);
// Init the data binding object
mDetailBinding = DataBindingUtil.setContentView(this, R.layout.act... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getDB();",
"@Override\r\n public Db_db currentDb(){return curDb_;}",
"public DB getDB() {\n\treturn _db;\n }",
"public DB() {\r\n\t\r\n\t}",
"private void getDatabase(){\n\n }",
"private Db() {\n super(Ke.getDatabase(), null);\n }",
"public Database()\r\n\t{\r\n\t\tinitializeD... | [
"0.724839",
"0.7133187",
"0.68746966",
"0.68362606",
"0.6820639",
"0.67652935",
"0.66539425",
"0.66487724",
"0.6631093",
"0.6584926",
"0.65564966",
"0.6551844",
"0.6547353",
"0.65453994",
"0.64788276",
"0.6458635",
"0.64537066",
"0.64407945",
"0.6430379",
"0.6421652",
"0.6407... | 0.0 | -1 |
Save alarm ID to state (to keep it in case of phone orientation change for example) | @Override
protected void onSaveInstanceState(Bundle outState) {
outState.putParcelable(INSTANCE_ALARM_ADDRESS_DATA, mMapDestination);
outState.putInt(INSTANCE_ALARM_ID, mAlarmId);
if(mAlarmRingtone != null)
outState.putString(INSTANCE_ALARM_RINGTONE, mAlarmRingtone.toString());
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAlarm() {\n\t\tid.toAlarm();\n\t}",
"private static void saveAlarm(\n Context context, int id, boolean enabled, int hour, int minute,\n Alarm.DaysOfWeek daysOfWeek, boolean vibrate, String label,\n String alert, boolean popToast) {\n if (Log.LOGV) Log.v(\"**... | [
"0.66699404",
"0.60995144",
"0.5920001",
"0.59132856",
"0.5887128",
"0.58520585",
"0.5842702",
"0.5820369",
"0.5672103",
"0.5614559",
"0.55826527",
"0.5565496",
"0.55088884",
"0.5454942",
"0.5453884",
"0.5431364",
"0.54228604",
"0.5417847",
"0.5416836",
"0.54041547",
"0.53981... | 0.65017366 | 1 |
If member alarm is new and there is ID from intent it should load from db | private void setAlarmData(Intent intent) {
if (mAlarmId == Constants.DEFAULT_ALARM_ID) {
mAlarmId = intent.getIntExtra(Constants.EXTRA_ALARM_ID, Constants.DEFAULT_ALARM_ID);
// factory view model is used for sending parameters to the view model in our case
// with alarm entr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void onNewIntent(Intent intent) {\n\n Bundle bundle=intent.getExtras();\n int uniqueFlagID=1;\n if(bundle!=null && (bundle.getInt(\"uniqueAppId\") > 0)) {\n DBAdapter adapter = new DBAdapter(getApplicationContext());\n adapter.getUpdatePresFlag(bu... | [
"0.66436666",
"0.63221097",
"0.6057678",
"0.59358597",
"0.59141576",
"0.58034813",
"0.57818455",
"0.57773095",
"0.574783",
"0.5684301",
"0.5677872",
"0.56712544",
"0.56188244",
"0.5607395",
"0.55901074",
"0.55799735",
"0.55732554",
"0.5572143",
"0.55623007",
"0.55608314",
"0.... | 0.6484676 | 1 |
populateUI would be called to populate the UI when in update mode | private void populateUI(AlarmEntry alarm) {
mDetailBinding.clockDetails.vibrate.setChecked(alarm.isVibrate());
mDetailBinding.clockDetails.message.setText(alarm.getMessage());
setRingtoneName();
updateMapImage(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateUI(){}",
"@Override\r\n public void updateUI() {\r\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@O... | [
"0.78316545",
"0.7755091",
"0.7455374",
"0.7455374",
"0.7455374",
"0.72996426",
"0.72996426",
"0.71371466",
"0.7111963",
"0.71100706",
"0.70988864",
"0.70792586",
"0.70641184",
"0.7051993",
"0.70130646",
"0.69866633",
"0.6956352",
"0.68888867",
"0.68683517",
"0.68628126",
"0.... | 0.0 | -1 |
onSaveButtonClicked is called when the "save" button is clicked. It retrieves user input and inserts that new alarm data into the underlying database. | @RequiresApi(api = Build.VERSION_CODES.KITKAT)
public void onSaveButtonClicked() {
//check for getting address data from map at all
if(mMapDestination == null){
Toast.makeText(getApplicationContext(),
R.string.error_mandatory, Toast.LENGTH_SHORT)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void onSaveButtonClicked() {\n final String date = dayValue + \".\" + monthValue + \".\" + yearValue;\n final String name = edtEventName.getText().toString();\n final String location = edtEventLocation.getText().toString();\n final String desc = edtEventDesc.getText().toString()... | [
"0.7193388",
"0.69667",
"0.6797566",
"0.676242",
"0.6711038",
"0.65392",
"0.6527711",
"0.6423788",
"0.64224744",
"0.6404516",
"0.63973534",
"0.6396858",
"0.63903546",
"0.6373283",
"0.63713706",
"0.634734",
"0.62945324",
"0.6275611",
"0.6254694",
"0.6251154",
"0.6185805",
"0... | 0.7011871 | 1 |
This method uses the URI scheme for showing the alarm on a map. This superhandy intent is detailed in the "Common Intents" page of Android's developer site: see <a" Hint: Hold Command on Mac or Control on Windows and click that link to automatically open the Common Intents page | private void onOpenMapButtonClicked() {
// Create a new intent to start an map activity
Intent mapIntent =
new Intent(DetailActivity.this, MapsActivity.class);
if (mMapDestination != null && mMapDestination.getLocation() != null &&
mMapDestination.getRadius() >= 0) {... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\r\n intent.addCategory(Intent.CATEGORY_DEFAULT);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK /*| Intent.FLAG_ACTIVITY_CLEAR_TASK*/\r\n /*... | [
"0.61727184",
"0.6075855",
"0.5983435",
"0.5972075",
"0.58818537",
"0.5856014",
"0.5828008",
"0.5789202",
"0.5732432",
"0.571877",
"0.57184106",
"0.5715587",
"0.5692476",
"0.56811076",
"0.56328267",
"0.558094",
"0.55691653",
"0.5509999",
"0.5491854",
"0.5471095",
"0.53888255"... | 0.5793939 | 7 |
pick ringtone from default android ringtone selector. Note: this intent doesn't exist on the emulator. | public void pickRingtone() {
final Uri currentTone = getCurrentRingtone();
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, R.stri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Uri getDefaultRingtone(){\n return RingtoneManager.getActualDefaultRingtoneUri(DetailActivity.this,\n RingtoneManager.TYPE_ALARM);\n }",
"public void alarmToneButton_click(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.Media... | [
"0.7290075",
"0.710434",
"0.70231664",
"0.6510596",
"0.65061545",
"0.64890754",
"0.61073864",
"0.60665345",
"0.60240763",
"0.5995239",
"0.58980274",
"0.58383113",
"0.58095664",
"0.57948226",
"0.57610106",
"0.5760377",
"0.57356954",
"0.57356954",
"0.5727277",
"0.565084",
"0.56... | 0.83543897 | 0 |
Get default ringtone value of android device. | private Uri getDefaultRingtone(){
return RingtoneManager.getActualDefaultRingtoneUri(DetailActivity.this,
RingtoneManager.TYPE_ALARM);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Uri getCurrentRingtone(){\n return mAlarmRingtone != null ? mAlarmRingtone : getDefaultRingtone();\n }",
"public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }",
"private void saveDefaultRing(){\n \t SharedPreferences sharedPre = getSharedPreferences(\n ... | [
"0.7642854",
"0.69591457",
"0.68255067",
"0.62207013",
"0.6145164",
"0.6121304",
"0.6038287",
"0.5857406",
"0.5706638",
"0.55800986",
"0.55649954",
"0.5549802",
"0.5536093",
"0.5514254",
"0.5477157",
"0.5449438",
"0.5435678",
"0.5434065",
"0.5340404",
"0.5330556",
"0.5291278"... | 0.801337 | 0 |
Get current ringtone. If hasn't been chosen yet returns device default. | private Uri getCurrentRingtone(){
return mAlarmRingtone != null ? mAlarmRingtone : getDefaultRingtone();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Uri getDefaultRingtone(){\n return RingtoneManager.getActualDefaultRingtoneUri(DetailActivity.this,\n RingtoneManager.TYPE_ALARM);\n }",
"public void pickRingtone() {\n final Uri currentTone = getCurrentRingtone();\n Intent intent = new Intent(RingtoneManager.ACTION... | [
"0.7748719",
"0.70961744",
"0.68954355",
"0.65908015",
"0.6194056",
"0.6134991",
"0.6064857",
"0.59281296",
"0.5916985",
"0.5794913",
"0.5794781",
"0.5682098",
"0.5644952",
"0.56149167",
"0.55974984",
"0.5530809",
"0.54848605",
"0.5468472",
"0.5408944",
"0.5356203",
"0.532749... | 0.81857824 | 0 |
set the ringtone name from relevant uri > saved value or default ringtone value. | private void setRingtoneName(){
//select default ringtone when there isn't ringtone which chose
Uri ringtoneUri = getCurrentRingtone();
Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);
mDetailBinding.clockDetails.ringtone.setText(ringtone.getTitle(this));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveDefaultRing(){\n \t SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n \t if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(Rin... | [
"0.7227536",
"0.6704105",
"0.66956794",
"0.66556597",
"0.6602762",
"0.625828",
"0.624782",
"0.62100375",
"0.61207443",
"0.6050689",
"0.5897807",
"0.56114507",
"0.560859",
"0.540076",
"0.5378409",
"0.5281942",
"0.5236003",
"0.52032566",
"0.51152915",
"0.5110012",
"0.50914633",... | 0.7944912 | 0 |
Handle results from other activities. | @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RINGTONE_PICKER_REQUEST_CODE && resultCode == Activity.RESULT_OK ){
mAlarmRingtone = data.getParcelableExtra(RingtoneMan... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void invokeResults() {\r\n\t\t// Create the intent.\r\n\t\tIntent plantResultsIntent = new Intent(this, PlantResultsActivity.class);\r\n\t\t\r\n\t\t// create a bundle to pass data to the results screen.\r\n\t\tBundle data = new Bundle();\r\n\t\tdata.putString(PLANT_SEARCH_TERM, actPlantName.getText().toS... | [
"0.6658306",
"0.65651983",
"0.6562911",
"0.6443295",
"0.6335944",
"0.62670785",
"0.61998355",
"0.61943275",
"0.61054647",
"0.60543954",
"0.60432893",
"0.6038007",
"0.6033878",
"0.60304284",
"0.59563875",
"0.5913686",
"0.58989155",
"0.5883308",
"0.5875774",
"0.5870821",
"0.586... | 0.0 | -1 |
=====================// OPTION MENU METHODS // =====================// | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_detail, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void addMenuOptions();",
"public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n Syst... | [
"0.7637705",
"0.7249138",
"0.7203889",
"0.7186617",
"0.7053933",
"0.69659114",
"0.69542176",
"0.6915062",
"0.69104075",
"0.68169767",
"0.6796764",
"0.6759304",
"0.67328596",
"0.6730439",
"0.6728144",
"0.67186475",
"0.67175645",
"0.6698988",
"0.6698033",
"0.66617817",
"0.66573... | 0.0 | -1 |
Created by Andrey on 4/18/2017. | public interface StatisticView extends LoadingView{
void initActionBar();
void initWidget();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Ov... | [
"0.58504564",
"0.5713158",
"0.56873965",
"0.56544393",
"0.56361383",
"0.557315",
"0.55654705",
"0.5561416",
"0.5561416",
"0.5525161",
"0.5499161",
"0.54846376",
"0.5480092",
"0.5438616",
"0.5435073",
"0.5392929",
"0.5383405",
"0.5380238",
"0.53677344",
"0.53677344",
"0.536773... | 0.0 | -1 |
oveloading perbedaan jumlah parameter | public void jumlah(int a, int b, int c) {
System.out.println("Jumlah 3 angka =" + (a + b + c));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"public Final_parametre() {\r\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String... | [
"0.6887128",
"0.6697759",
"0.6544885",
"0.6512187",
"0.6462853",
"0.63540554",
"0.6326118",
"0.631499",
"0.6288846",
"0.62733036",
"0.6179619",
"0.6143887",
"0.60778916",
"0.6076095",
"0.6036468",
"0.6023206",
"0.60179794",
"0.5995171",
"0.5985785",
"0.5981837",
"0.59622246",... | 0.0 | -1 |
overloading perbedaan tipe data parameter | public void jumlah(double a, int b) {
System.out.println("Jumlah 2 angka (double+int) = " + (a + b));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void getData(int a, int b) {\n\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public abstract void param(byte[] data,SplitDetails name, SplitDetails value) throws Pars... | [
"0.7038019",
"0.668182",
"0.65882665",
"0.6412467",
"0.62357605",
"0.6147763",
"0.61427295",
"0.6119611",
"0.6039309",
"0.60099506",
"0.59491765",
"0.58472383",
"0.58355606",
"0.5827828",
"0.58238316",
"0.58238316",
"0.5769708",
"0.5768076",
"0.5755852",
"0.5752356",
"0.57519... | 0.0 | -1 |
overloading perbedaan urutan tipe data parameter | public void jumlah(int b, double a) {
System.out.println("Jumlah 2 angka (int+double) = " + (a + b));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void getData(int a, int b) {\n\n }",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public Final_parametre() {\r\n\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public void tutki(Suunta suunta);",
"@Override\n... | [
"0.6577357",
"0.6485281",
"0.6391455",
"0.6232509",
"0.61276805",
"0.6091329",
"0.6079656",
"0.60513276",
"0.6023441",
"0.60204476",
"0.5972762",
"0.58881307",
"0.5877322",
"0.58740705",
"0.58679074",
"0.5854109",
"0.5829285",
"0.58222806",
"0.5820681",
"0.5819633",
"0.577044... | 0.0 | -1 |
remove duplicates and return lenght | public int removeDuplicates(int[] nums){
if(nums.length <=1) return 1;
int j =0;
for(int i =1; i < nums.length; i++){
if(nums[i] !=nums[j]){
j++;
nums[j] = nums[i];
}
}
return j+1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getNumberOfDetectedDuplicates();",
"public int size() { return _byHashCode.size(); }",
"long size();",
"long size();",
"long size();",
"long size();",
"LengthDistinct createLengthDistinct();",
"public int size(){\n return set.length;\n }",
"public long size();",
"public int size(){\... | [
"0.68087995",
"0.64948046",
"0.64195293",
"0.64195293",
"0.64195293",
"0.64195293",
"0.6383319",
"0.6333794",
"0.62592614",
"0.6255786",
"0.62099475",
"0.6183452",
"0.6174906",
"0.6035172",
"0.60245085",
"0.60031486",
"0.59898293",
"0.5975509",
"0.5975509",
"0.5975509",
"0.59... | 0.0 | -1 |
TODO Autogenerated method stub | public void onClick(View v) {
String username = editTextUserName.getText().toString();
String password = editTextPassword.getText().toString();
String confirmPassword = editTextConfirmPassword.getText().toString();
// check if any of the fields are vacan... | {
"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 |
The doPost method of the servlet. This method is called when a form has its tag value method equals to post. | @Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
writeLog(new StringBuilder("POST 请求 来自:").append(request.getRemoteAddr()));
/** 取得外部输出流 用于响应POST结果请求 */
PrintWriter out= response.getWriter();
try
{
/** 初始化验证工具 */
Val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }",
"protected void doPost(HttpServletRequest request, H... | [
"0.7657267",
"0.76023376",
"0.7523978",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.7468644",
"0.74277234",
"0.74117726",
"0.74026644",
"0.7385832",
"0.73712975",
... | 0.0 | -1 |
The doGet method of the servlet. This method is called when a form has its tag value method equals to get. | @Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
try
{
String from = request.getRemoteAddr();
writeLog(new StringBuilder("GET 请求 来自:").append(from).append(request.getQueryString()));
doPost(request,response);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOEx... | [
"0.7432752",
"0.73522663",
"0.7254978",
"0.72524107",
"0.72439736",
"0.724188",
"0.7207264",
"0.7207264",
"0.7205804",
"0.7201428",
"0.72012377",
"0.718355",
"0.7173461",
"0.7171022",
"0.71595865",
"0.71556956",
"0.71526843",
"0.7151504",
"0.71406186",
"0.71390015",
"0.713900... | 0.0 | -1 |
Created by nareshm on 2/05/2015. | @Local
public interface LocalPlayerService extends PlayerService {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Overri... | [
"0.59306455",
"0.5882773",
"0.5805386",
"0.57786715",
"0.57693744",
"0.57595134",
"0.57445484",
"0.57445484",
"0.5686617",
"0.5674563",
"0.5650922",
"0.5645471",
"0.56426316",
"0.56426316",
"0.56426316",
"0.56426316",
"0.56426316",
"0.56376576",
"0.5635399",
"0.56341946",
"0.... | 0.0 | -1 |
Recipient's email ID needs to be mentioned. | private void sendEmail() {
String to = "tsutton720@gmail.com";
// Sender's email ID needs to be mentioned
String from = "web@gmail.com";
// Assuming you are sending email from localhost
String host = "localhost";
// Get system properties
Properties properties =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void recipient(String recipient) {\n }",
"@java.lang.Override\n public long getRecipientId() {\n return recipientId_;\n }",
"public void setEmail(String p) { this.idcorreo = p; }",
"@Override\n public void addRecipient(String newRecipient) {\n System.out.println(\"In... | [
"0.6679076",
"0.6535262",
"0.6473539",
"0.6443136",
"0.6432717",
"0.6348342",
"0.63348556",
"0.63263154",
"0.6296808",
"0.62781155",
"0.62391186",
"0.62367135",
"0.62210846",
"0.62085253",
"0.6185119",
"0.61475474",
"0.61453986",
"0.6130136",
"0.6077961",
"0.60607266",
"0.604... | 0.0 | -1 |
Consulta 1: libros por una editorial | public List<Book> getBooksByEditorialId(Long codePublisher) {
String queryStr = "SELECT b FROM Book b where b.publisher.code = :coPublisher";
Query query = em.createQuery(queryStr);
query.setParameter("coPublisher", codePublisher);
return query.getResultList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void mostrarLibros() {\n dlmLibros.clear();\n for (Libro libro : modelo.getLibros()) {\n dlmLibros.addElement(libro);\n }\n seleccionarLibrosOriginales();\n }",
"private static void mostrarLibros() {\n\n\t\tlibros\n\t\t.stream()\n\t\t.forEach(System.out::println)... | [
"0.6574833",
"0.63480127",
"0.6320762",
"0.6209963",
"0.61550117",
"0.6102892",
"0.607509",
"0.604889",
"0.59577656",
"0.5909291",
"0.5881754",
"0.5873633",
"0.58443886",
"0.5811071",
"0.57831997",
"0.577846",
"0.5708771",
"0.56677675",
"0.5664658",
"0.56420183",
"0.5609155",... | 0.0 | -1 |
Consulta 3: Libros de un autor | public List<Book> getBooksByAuthorId(Long authId) {
String queryStr = "SELECT b FROM BookAuthor b where b.author.id = :coAuthor";
Query query = em.createQuery(queryStr);
query.setParameter("coAuthor", authId);
return query.getResultList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Asignacion_usuario_Perfil1() {\n int CodigoAplicacion = 120;\n initComponents();\n llenadoDeCombos();\n llenadoDeTablas();\n \n\n \n }",
"Reserva Obtener();",
"public static void tener_Usuario_activo() {\n\t\t\t\tdesktop.<DomTextField>find(\"//BrowserAppli... | [
"0.6403787",
"0.63775617",
"0.6316731",
"0.6314316",
"0.6308298",
"0.61762094",
"0.6170288",
"0.6151451",
"0.612206",
"0.6038715",
"0.59379804",
"0.5924066",
"0.5883386",
"0.58576274",
"0.5834699",
"0.5818578",
"0.5771372",
"0.57625186",
"0.57587904",
"0.57573456",
"0.5746487... | 0.0 | -1 |
Returns SQL string that can generate new (unique and nonrepeating) primary key for specified DbEntity. No actual database operations are performed. | public String generatePkForDbEntityString(DbEntity ent) {
if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {
throw new CayenneRuntimeException(
"Error generating pk for DbEntity "
+ ent.getName()
+ ": pk must be single at... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String createPKString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new ... | [
"0.7671129",
"0.74215895",
"0.64512783",
"0.63143605",
"0.62703913",
"0.61667943",
"0.60225165",
"0.60198206",
"0.60165256",
"0.59953505",
"0.5994721",
"0.5970927",
"0.59332544",
"0.5894746",
"0.5889786",
"0.58765006",
"0.5857907",
"0.58364046",
"0.5807646",
"0.5773437",
"0.5... | 0.7460496 | 1 |
Returns a nonrepeating primary key for a given entity. Since OpenBasespecific mechanism is used, key caching is disabled. Instead a database operation is performed on every call. | public Object generatePkForDbEntity(DataNode node, DbEntity entity)
throws Exception {
// check for binary pk
Object binPK = binaryPK(entity);
if (binPK != null) {
return binPK;
}
return new Integer(pkFromDatabase(node, entity));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected int pkFromDatabase(DataNode node, DbEntity entity) throws Exception {\n String sql = generatePkForDbEntityString(entity);\n QueryLogger.logQuery(QueryLogger.DEFAULT_LOG_LEVEL, sql, Collections.EMPTY_LIST);\n\n Connection con = node.getDataSource().getConnection();\n try {\n ... | [
"0.68928",
"0.68638057",
"0.6803264",
"0.65346974",
"0.64884573",
"0.6460881",
"0.64352816",
"0.6324398",
"0.63001883",
"0.62615705",
"0.62615705",
"0.6239093",
"0.6223041",
"0.6101207",
"0.607262",
"0.60637605",
"0.60510135",
"0.6039385",
"0.601038",
"0.59935546",
"0.5987928... | 0.71603936 | 0 |
Generates new (unique and nonrepeating) primary key for specified DbEntity. Executed SQL looks like this: NEWID FOR Table Column COLUMN must be marked as UNIQUE in order for this to work properly. | protected int pkFromDatabase(DataNode node, DbEntity entity) throws Exception {
String sql = generatePkForDbEntityString(entity);
QueryLogger.logQuery(QueryLogger.DEFAULT_LOG_LEVEL, sql, Collections.EMPTY_LIST);
Connection con = node.getDataSource().getConnection();
try {
St... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String generatePkForDbEntityString(DbEntity ent) {\n if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \"\n + ent.getName()\n + \": pk must... | [
"0.6881461",
"0.68034226",
"0.66685337",
"0.6585739",
"0.64588314",
"0.6373454",
"0.6249772",
"0.6241632",
"0.61690754",
"0.59228456",
"0.5922811",
"0.58397657",
"0.5787124",
"0.5786171",
"0.57652277",
"0.57631886",
"0.5726774",
"0.5721379",
"0.5659842",
"0.56495583",
"0.5612... | 0.5901327 | 11 |
Returns an empty list, since OpenBase doesn't support this operation. | public List dropAutoPkStatements(List dbEntities) {
return Collections.EMPTY_LIST;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<Object> list() {\n return null;\n }",
"@Override\r\n\tpublic List<?> getAll() {\n\t\treturn null;\r\n\t}",
"public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n ... | [
"0.7611996",
"0.71473336",
"0.69713086",
"0.69159025",
"0.6893027",
"0.6743528",
"0.6737438",
"0.67255616",
"0.67055607",
"0.6699621",
"0.6645629",
"0.6631239",
"0.6631239",
"0.66196644",
"0.66099197",
"0.6558441",
"0.6537539",
"0.6502044",
"0.648523",
"0.6455008",
"0.6453888... | 0.0 | -1 |
Returns a String to create PK support for an entity. | protected String createPKString(DbEntity entity) {
List pk = entity.getPrimaryKey();
if (pk == null || pk.size() == 0) {
throw new CayenneRuntimeException(
"Entity '" + entity.getName() + "' has no PK defined.");
}
StringBuffer buffer = new StringBuffer();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String generatePkForDbEntityString(DbEntity ent) {\n if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \"\n + ent.getName()\n + \": pk must... | [
"0.78168154",
"0.71137166",
"0.6712051",
"0.66688335",
"0.66540885",
"0.66540885",
"0.66540885",
"0.66540885",
"0.66540885",
"0.6642921",
"0.65960544",
"0.6460575",
"0.64593846",
"0.6366974",
"0.629234",
"0.626318",
"0.6262747",
"0.61743367",
"0.6166444",
"0.6149744",
"0.6143... | 0.82523614 | 0 |
Returns a String to create a unique index on table primary key columns per OpenBase recommendations. | protected String createUniquePKIndexString(DbEntity entity) {
List pk = entity.getPrimaryKey();
if (pk == null || pk.size() == 0) {
throw new CayenneRuntimeException(
"Entity '" + entity.getName() + "' has no PK defined.");
}
StringBuffer buffer = new String... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String createSimpleIndexName(ColumnModel column) {\r\n\t\treturn \"I\" + column.getTable().getName() + column.getName();\r\n\t}",
"protected String createPrimaryKeyConstraint(TableModel table) {\r\n\t\tColumnModel[] pks = table.getPrimaryKeyColumns();\r\n\t\tString s = \"\";\r\n\t\tif (pks.length > 1) {\r... | [
"0.60228896",
"0.60177076",
"0.57861316",
"0.55545187",
"0.55502766",
"0.55432045",
"0.5372659",
"0.53432226",
"0.53382814",
"0.5294096",
"0.52718866",
"0.5259889",
"0.52438366",
"0.5197335",
"0.51824915",
"0.5173215",
"0.5150846",
"0.5133289",
"0.5128766",
"0.51231444",
"0.5... | 0.7282038 | 0 |
Returns zero, since PK caching is not feasible with OpenBase PK generation mechanism. | public int getPkCacheSize() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int newPrimaryKey( )\n {\n int nKey;\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n\n daoUtil.executeQuery( );\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n else\n {\n // If the table is emp... | [
"0.6622296",
"0.65902203",
"0.63699466",
"0.62617594",
"0.62421566",
"0.6199392",
"0.61778283",
"0.6109868",
"0.6060332",
"0.60244256",
"0.59938866",
"0.5983866",
"0.5983866",
"0.59685075",
"0.59676",
"0.59270346",
"0.59100753",
"0.5906859",
"0.58676434",
"0.58624583",
"0.582... | 0.63400674 | 3 |
noop, no PK caching | public void setPkCacheSize(int pkCacheSize) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getNoId();",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n public int loadAutoID() {\n return 0;\n }",
"public Object generalPK() {\n\t\treturn null;\r\n\t}",
"Object getPrimaryKey() throws IllegalSta... | [
"0.6448528",
"0.637548",
"0.637548",
"0.63523144",
"0.61977696",
"0.61239475",
"0.60707957",
"0.6058207",
"0.5931009",
"0.5916291",
"0.59134257",
"0.59076345",
"0.5893105",
"0.58894545",
"0.58234346",
"0.58105046",
"0.5780563",
"0.57467335",
"0.5734798",
"0.57284933",
"0.5708... | 0.0 | -1 |
Dummy constructor, do not touch! | private TrapdoorMixin(int i, Material m) {
super(i, m);
throw new AssertionError("Don't touch my dummy constructors");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"defaultConstructor(){}",
"void DefaultConstructor(){}",
"private Instantiation(){}",
"Reproducible newInstance();",
"public Constructor(){\n\t\t\n\t}",
"private SingleObject()\r\n {\r\n }",
"Cons... | [
"0.79357916",
"0.7669513",
"0.7625426",
"0.7601775",
"0.7480165",
"0.74145913",
"0.7392558",
"0.7379585",
"0.7265748",
"0.72209346",
"0.720279",
"0.7185301",
"0.71674615",
"0.7161922",
"0.7141212",
"0.71343917",
"0.7100272",
"0.70884883",
"0.70462036",
"0.7036192",
"0.7017683... | 0.0 | -1 |
/ We have two methods here, allowPlacementOnTransparent, and allowUnsupportedPlacement. The first redirects the call to canSuffocate so that canPlaceAt will allow placement on nonsolid blocks. The second one saves the return value of canPlaceAt so we know if the vanilla placement code should run instead of our new code... | @Redirect(method="canPlaceAt(Lnet/minecraft/level/Level;IIII)Z", at=@At(value = "INVOKE", target = "Lnet/minecraft/level/Level;canSuffocate(III)Z"))
private boolean allowPlacementOnTransparent(Level level, int x, int y, int z) { return true; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testPlaceIllegalTile1() {\n Placement placement = new Placement(Color.GREEN, 0, 0, Color.BLUE, 1, 1);\n try {\n \t\tboard.place(placement);\n fail(\"It's not legal to put tile without any adjacent occupied cells\");\n } catch (StateException e) {\n // pa... | [
"0.62447464",
"0.62208414",
"0.6168865",
"0.6078764",
"0.59096444",
"0.5873743",
"0.5838639",
"0.5714052",
"0.57007986",
"0.56825477",
"0.5623124",
"0.5598569",
"0.558513",
"0.5578803",
"0.55707395",
"0.55564326",
"0.55432546",
"0.5466834",
"0.54661167",
"0.53476506",
"0.5344... | 0.59703195 | 4 |
Prevent trapdoors from popping off when the block behind them is nonsolid. | @Redirect(method="onAdjacentBlockUpdate(Lnet/minecraft/level/Level;IIII)V", at=@At(value = "INVOKE", target = "Lnet/minecraft/level/Level;canSuffocate(III)Z"))
private boolean preventTrapdoorBreakage(Level level, int x, int y, int z) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean solid()\n {\n return false;\n }",
"protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }",
"private boolean UpdateWithoutCarriedBlock()\r\n {\r\n if ( rand.nextInt(20) == 0 )\r\n {... | [
"0.6153306",
"0.6079912",
"0.60261786",
"0.6003666",
"0.59897494",
"0.59471655",
"0.59247863",
"0.5806722",
"0.5785077",
"0.5732289",
"0.5688904",
"0.56848437",
"0.5664574",
"0.56371385",
"0.56371385",
"0.5636119",
"0.5633807",
"0.5618405",
"0.5596161",
"0.5595286",
"0.559352... | 0.5580563 | 22 |
Correct trapdoor direction/facing with borrowed dispenser/furnace code. Uses different values for meta, so be careful if you reuse it. | @Override
public void afterPlaced(Level level, int x, int y, int z, Living living) {
if (doPlayerBasedRotation) {
int rotation = MathHelper.floor((double) (living.yaw * 4.0F / 360.0F) + 0.5D) & 3;
int[] magic = {0, 3, 1, 2};
level.setTileMeta(x, y, z, magic[rotation]);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void fixDirections() {\n\t\tdouble sensDir = sens.getDirection();\n\t\tif (sensDir > 360) {\n\t\t\tsensDir -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (sensDir < 1) {\n\t\t\tsensDir += 360;\n\t\t}\n\t\tsens.setDirection(sensDir);\n\n\t\tif (desiredDirection > 360) {\n\t\t\tdesiredDire... | [
"0.66833955",
"0.5961004",
"0.5895483",
"0.5870522",
"0.58687186",
"0.5848269",
"0.5699004",
"0.5685677",
"0.56554204",
"0.56300336",
"0.56090534",
"0.5577662",
"0.5529495",
"0.5487599",
"0.5477713",
"0.54726124",
"0.5469876",
"0.54423964",
"0.5441422",
"0.5430703",
"0.541134... | 0.0 | -1 |
Do nothing if this module is not enabled. | @EventHandler(ignoreCancelled = true)
public void denyCropDupe(PlayerInteractEvent event) {
if (!settings.isCropDupe()) return;
// Do nothing if player is right clicking.
if (!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
// Do nothing if player has permission.
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void onDisabled() {\n // Do nothing.\n }",
"void disableMod();",
"@Override\n\tpublic void onDisable() {\n\t\tgetLogger().info(\"SimplyWrapper successfully disabled !\");\n\t}",
"private void checkEnabled() {\n }",
"@Override\n public boolean isProgrammable() {\n return false;\n ... | [
"0.7176143",
"0.69375426",
"0.6619999",
"0.6539546",
"0.6504644",
"0.65008295",
"0.65008295",
"0.64941615",
"0.64941615",
"0.6485786",
"0.64806503",
"0.648028",
"0.64476216",
"0.64476216",
"0.64424324",
"0.64313954",
"0.6429528",
"0.6429528",
"0.64233476",
"0.64233476",
"0.64... | 0.0 | -1 |
Recursive function, checks to ensure a block is not present at the desired teleport location, and if it is, adds 2 to the Y coordinate. Repeats until it finds an empty spot. | private void checkBlockAt(int x, int y, int z, World world,
EntityPlayer entityplayer) {
if (world.getBlock(x, y, z) == Blocks.air) {
world.playSoundEffect(x + 5.0D, y + 5.0D, z + 5.0D,
"mob.endermen.portal", 2.0F,
world.rand.nextFloat() * 0.1F + 0.9F);
entityplayer.setPosition(x, y, z);
for (in... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Location verifyLocation(Location location)\n {\n Block playerBlock = location.getBlock();\n World world = location.getWorld();\n\n if (rootC.getStringList(RootNode.WORLDS).contains(world.getName()))\n {\n // Only spawn monsters in normal world. End is crowded with ... | [
"0.5997023",
"0.58354217",
"0.578389",
"0.569833",
"0.5683149",
"0.56217784",
"0.55884856",
"0.5578758",
"0.55748737",
"0.55580914",
"0.5514881",
"0.55057126",
"0.54032284",
"0.5395889",
"0.5377845",
"0.5375985",
"0.53408796",
"0.53209287",
"0.53202176",
"0.5286657",
"0.52561... | 0.5040031 | 46 |
creating dummy user to fetch | @Test
public void getUserById() {
userDAO.createUser(new User("dummy", "dummy", 1));
//test fetching of data
assertNotNull(userResource.getUser("dummy"));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerat... | [
"0.73123133",
"0.7233645",
"0.7156817",
"0.69614357",
"0.69240624",
"0.6863686",
"0.6863081",
"0.6791472",
"0.677324",
"0.6705743",
"0.66866577",
"0.66405857",
"0.66374475",
"0.6631071",
"0.6611255",
"0.6594714",
"0.65927863",
"0.6585084",
"0.6584849",
"0.65678775",
"0.650420... | 0.6270477 | 49 |
creating dummy user to fetch | @Test
public void getUserByIdCatch() {
userDAO.createUser(new User("dummy", "dummy", 1));
//test fetching of data
assertNull(userResource.getUser("notdummy"));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerat... | [
"0.73131156",
"0.7233597",
"0.71575177",
"0.6962776",
"0.6924706",
"0.68638307",
"0.6863793",
"0.6792539",
"0.6771958",
"0.6705246",
"0.6687561",
"0.66420436",
"0.6639283",
"0.6631671",
"0.6612312",
"0.6596384",
"0.6594715",
"0.6585858",
"0.6584952",
"0.6569473",
"0.6506312",... | 0.6407468 | 28 |
creating dummy user to update | @Test
public void updateUser() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertTrue(userResource.updateUser(new User("dummy", "dummyUPDATED", 2)));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example... | [
"0.7271164",
"0.7171827",
"0.6985125",
"0.6948856",
"0.6903913",
"0.6901926",
"0.68646926",
"0.68628114",
"0.6853722",
"0.6853112",
"0.67920876",
"0.67730933",
"0.6765073",
"0.6715084",
"0.6692364",
"0.66748756",
"0.6665695",
"0.66645336",
"0.66563106",
"0.66362274",
"0.66266... | 0.6412437 | 41 |
creating dummy user to update | @Test
public void updateUserCatch() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertFalse(userDAO.updateUser(new User("notdummy", "dummyUPDATED", 2)));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example... | [
"0.727132",
"0.71717304",
"0.69853127",
"0.6949588",
"0.6904563",
"0.6902632",
"0.6865602",
"0.6864342",
"0.6853835",
"0.6853763",
"0.67912316",
"0.6773971",
"0.6765612",
"0.67148733",
"0.6692692",
"0.667534",
"0.6666473",
"0.6664004",
"0.6656607",
"0.6635528",
"0.6627075",
... | 0.63174886 | 59 |
Create dummy user to delete | @Test
public void removeUser() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertTrue(userResource.removeUser("dummy"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void deleteNewAccount() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"gamma@beta.net\");\n createUserRequest.setFirstname(\"Gamma\");\n createUserRequest.setLastname(\"Beta\");\n\n // First, we create ... | [
"0.71968305",
"0.717729",
"0.6977579",
"0.6933218",
"0.68083066",
"0.6784165",
"0.6768653",
"0.67493975",
"0.6731713",
"0.671234",
"0.67034936",
"0.6688667",
"0.6688667",
"0.6675218",
"0.6674748",
"0.66674954",
"0.66357785",
"0.6633005",
"0.6613704",
"0.6608499",
"0.65620506"... | 0.689686 | 4 |
Create dummy user to delete | @Test
public void removeUserCatch() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertFalse(userResource.removeUser("notdummy"));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void deleteNewAccount() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"gamma@beta.net\");\n createUserRequest.setFirstname(\"Gamma\");\n createUserRequest.setLastname(\"Beta\");\n\n // First, we create ... | [
"0.7196076",
"0.71776664",
"0.69772613",
"0.693324",
"0.68979007",
"0.6808124",
"0.67847604",
"0.67503077",
"0.67320955",
"0.6712543",
"0.6704026",
"0.66889256",
"0.66889256",
"0.6675547",
"0.66750365",
"0.6667968",
"0.6635831",
"0.6633636",
"0.66142714",
"0.66099465",
"0.656... | 0.67698526 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.