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 |
|---|---|---|---|---|---|---|
Obtiene un paquete del proyecto | public Paquete getPaquete(int index) {
return paquetes.get(index);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void reposicionarPersonajes() {\n // TODO implement here\n }",
"public void setProyecto(java.lang.String proyecto) {\n this.proyecto = proyecto;\n }",
"public void setProyecto(java.lang.String proyecto) {\n this.proyecto = proyecto;\n }",
"public Polipara() {\n //... | [
"0.652463",
"0.64935577",
"0.64935577",
"0.64709586",
"0.64002377",
"0.63512087",
"0.63428015",
"0.6311043",
"0.62802786",
"0.6272359",
"0.6233288",
"0.617026",
"0.61303115",
"0.6128556",
"0.6108338",
"0.6091863",
"0.6028535",
"0.60205436",
"0.601242",
"0.59924126",
"0.598296... | 0.5787434 | 41 |
Cambia el nombre del proyecto | public void setNombre(String nombre) {
this.nombre = nombre;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getProjectName();",
"String getProjectName();",
"@Override\r\n\tString getProjectName();",
"public static String getName() {\n\t\treturn ProjectMain._name;\n\t}",
"private String getSimplicityProjectName() {\n return properties.getProperty(\"simplicity.starter.projectName\");\n }... | [
"0.69190454",
"0.68217885",
"0.66013616",
"0.6551231",
"0.6531832",
"0.65173125",
"0.65173125",
"0.64926064",
"0.64926064",
"0.64625627",
"0.6327251",
"0.6326667",
"0.6293809",
"0.6258614",
"0.6256754",
"0.6223304",
"0.6223304",
"0.6222807",
"0.61060244",
"0.609539",
"0.60780... | 0.0 | -1 |
Obtiene los colaboradores del proyecto | public ArrayList<String> getColaboradores() {
return colaboradores;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<Proyecto> listarProyectos() {\n\t\treturn proyectoRepo.findAll();\n\t}",
"public void setColaboradores(ArrayList<String> colaboradores) {\n this.colaboradores = colaboradores;\n }",
"private void pickListCarreras(Proyecto proyecto) {\r\n sessionProyecto.getCarrerasProy... | [
"0.6487301",
"0.63942444",
"0.63503397",
"0.63151366",
"0.6211992",
"0.61434114",
"0.6106891",
"0.6099248",
"0.60510784",
"0.6043433",
"0.5960598",
"0.5892973",
"0.58901215",
"0.58877516",
"0.5822162",
"0.5819312",
"0.58063054",
"0.58061314",
"0.5782552",
"0.5778288",
"0.5758... | 0.7131787 | 0 |
Cambia la lista de colaboradores | public void setColaboradores(ArrayList<String> colaboradores) {
this.colaboradores = colaboradores;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<String> getColaboradores() {\n return colaboradores;\n }",
"private void pickListCarreras(Proyecto proyecto) {\r\n sessionProyecto.getCarrerasProyecto().clear();\r\n sessionProyecto.getFilterCarrerasProyecto().clear();\r\n List<Carrera> carrerasProyecto = new Array... | [
"0.75113034",
"0.67158574",
"0.657786",
"0.6516236",
"0.6493444",
"0.64459896",
"0.6404744",
"0.63246775",
"0.6313615",
"0.62819564",
"0.62417525",
"0.62247366",
"0.62129813",
"0.6193251",
"0.6192533",
"0.6184684",
"0.6183665",
"0.617595",
"0.6173912",
"0.616013",
"0.6150797"... | 0.7227993 | 1 |
Obtiene las tareas del proyecto | public ArrayList<Tarea> getTareas() {
return tareas;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mostrarTareas(){\n System.out.println(\"Tareas existentes:\");\n System.out.println(tareas);\n }",
"@Override\n\tpublic String getTareas() {\n\t\treturn \"TAREA COMERCIAL 3: VENDE MUCHO TODOS LOS DÍAS\";\n\t}",
"public void teclas() {\r\n\t\tif (app.key == '1') {\r\n\t\t\ttipoCom =... | [
"0.689724",
"0.6757442",
"0.63167995",
"0.5909211",
"0.59034157",
"0.5850165",
"0.5822957",
"0.5812472",
"0.57746005",
"0.5773516",
"0.57711136",
"0.57458764",
"0.57290536",
"0.57200366",
"0.5716181",
"0.5698409",
"0.56696546",
"0.5640471",
"0.5622915",
"0.56100976",
"0.55978... | 0.559887 | 20 |
Cambia la lista de tareas | public void setTareas(ArrayList<Tarea> tareas) {
this.tareas = tareas;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mostrarTareas(){\n System.out.println(\"Tareas existentes:\");\n System.out.println(tareas);\n }",
"public List<Area> listarAreas(){\r\n return cVista.listarAreas();\r\n }",
"@Override\n\tpublic String getTareas() {\n\t\treturn \"TAREA COMERCIAL 3: VENDE MUCHO TODOS LOS D... | [
"0.750336",
"0.6916344",
"0.6885585",
"0.6780947",
"0.67487776",
"0.67487776",
"0.6707711",
"0.6549792",
"0.6549792",
"0.64306206",
"0.639542",
"0.6340102",
"0.6236714",
"0.621827",
"0.62087375",
"0.61904514",
"0.6148703",
"0.6106191",
"0.6105349",
"0.6093442",
"0.6074739",
... | 0.7416705 | 1 |
elenco di tutte le lezioni | public List<BitOrarioOraLezione> get() {
List<BitOrarioOraLezione> ris = new ArrayList<>();
for (ArrayList<BitOrarioOraLezione>[] riga : orario) {
if (riga != null)
for (ArrayList<BitOrarioOraLezione> v : riga) {
if (v != null)
for (BitOrarioOraLezione bitOrarioOraLezione : v) {
if (bitOrarioOraLezione != null)
ris.add(bitOrarioOraLezione);
}
}
}
return ris;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }",
"public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"public void regolaOrdineInMenu(int codRiga) {\n\n /** variabili e costanti locali di lavor... | [
"0.65587926",
"0.6408415",
"0.629802",
"0.6286415",
"0.6230289",
"0.6139863",
"0.6139003",
"0.6135145",
"0.6133864",
"0.60953265",
"0.60832936",
"0.6080962",
"0.60799664",
"0.6076239",
"0.60607654",
"0.6050719",
"0.603783",
"0.603732",
"0.6034153",
"0.60322994",
"0.6025394",
... | 0.0 | -1 |
TODO Autogenerated method stub | public void generateNewTasks(List<CaptureTask> tasks) {
} | {
"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 | public void updateTaskStatus(CaptureTask task, String status, String description) {
} | {
"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 | public boolean checkTaskExist(CaptureTask task) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public List<CaptureTask> loadTaskToTaskPool(int poolSize) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public List<TaskGenerateTrigger> loadTaskTriggers() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Initializes the internal state of this node. | public AbstractNode() {
this.incomingEdges = new ArrayList<E>();
this.outgoingEdges = new ArrayList<E>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unchecked\")\n\t\tvoid init() {\n\t\t\tsetNodes(offHeapService.newArray(JudyIntermediateNode[].class, NODE_SIZE, true));\n\t\t}",
"public void initialize()\n {\n if (!this.seedInitialized)\n {\n throw new IllegalStateException(\"Seed \" + this.maxHeight + \" not in... | [
"0.7093444",
"0.70781446",
"0.70336854",
"0.6990012",
"0.6981321",
"0.6970405",
"0.6962037",
"0.6927524",
"0.6919839",
"0.6913459",
"0.6912163",
"0.6888094",
"0.6843523",
"0.68418",
"0.6839284",
"0.6821222",
"0.67316556",
"0.6730979",
"0.6722575",
"0.67024004",
"0.6695692",
... | 0.0 | -1 |
Add the edge to the graph. If the edge's start node is null, the edge will be added to the root node. Implicit edges are added to the graph as necessary. | @Override
public boolean addChild(N endNode)
throws GraphLogicException {
E edge = buildDirectEdge(getThis(), endNode);
return addDirectEdge(edge);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finis... | [
"0.7300775",
"0.70624024",
"0.704581",
"0.70309883",
"0.70135033",
"0.6871898",
"0.68527013",
"0.6827213",
"0.67816633",
"0.6781016",
"0.6766694",
"0.67261344",
"0.6650085",
"0.6633465",
"0.6609735",
"0.6603203",
"0.65866506",
"0.65824777",
"0.65478784",
"0.65339905",
"0.6531... | 0.5393512 | 83 |
Add the direct edge to the graph. The edge is added to the start and end nodes' collection of incoming/outgoing edges. | protected boolean addEdge(Edge<N, E> edge)
throws GraphLogicException {
return edge.attach();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge *... | [
"0.6920556",
"0.68763924",
"0.6802485",
"0.6752675",
"0.6738447",
"0.6713555",
"0.6647818",
"0.66070026",
"0.6594007",
"0.6591972",
"0.6587093",
"0.64964783",
"0.6444762",
"0.641235",
"0.64108723",
"0.639557",
"0.6395476",
"0.6378766",
"0.63434356",
"0.63390493",
"0.63346475"... | 0.5657865 | 82 |
Remove a child node. It is possible to orphan nodes by calling this method. | @Override
public boolean removeChild(N endNode) {
Edge<N, E> edge = buildDirectEdge(getThis(), endNode);
if (!outgoingEdges.contains(edge)) {
return false;
}
Edge<N, E> actualEdge = findActual(edge, outgoingEdges);
return actualEdge.detach();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void removeChild(Node node);",
"@DISPID(2)\n\t// = 0x2. The runtime will prefer the VTID if present\n\t@VTID(8)\n\tvoid removeChild(@MarshalAs(NativeType.VARIANT) java.lang.Object node);",
"public void removeChild(WSLNode node) {children.removeElement(node);}",
"public void removeFromParent(T... | [
"0.79944634",
"0.7757457",
"0.77471435",
"0.7508952",
"0.7427379",
"0.7423813",
"0.72773165",
"0.72382015",
"0.72133446",
"0.7137615",
"0.6946627",
"0.69409037",
"0.68729144",
"0.6872656",
"0.675216",
"0.66558135",
"0.66514564",
"0.66207224",
"0.6588436",
"0.6567391",
"0.6532... | 0.60468674 | 36 |
Find the element in the list which matches the object | private <T> T findActual(T matchingObject, List<? extends T> list) {
T actual = null;
for (T check : list) {
if (check.equals(matchingObject)) {
actual = check;
}
}
return actual;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T find(T element);",
"public T search(K key) {\n\t\tfor (T item : list) {\n\t\t\tif (item.matches(key)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"protected boolean findObject(Object obj){\n \n }",
"public Node searchElement(Object el) {\n\t\n\t\tfor (Node elemento : t... | [
"0.7085546",
"0.6608644",
"0.6586285",
"0.6538266",
"0.6535665",
"0.6490216",
"0.6451819",
"0.64273834",
"0.6426622",
"0.63121176",
"0.6279506",
"0.62414855",
"0.62237304",
"0.6203668",
"0.6188878",
"0.617948",
"0.6177311",
"0.6155603",
"0.6147445",
"0.6098712",
"0.6097334",
... | 0.72799873 | 0 |
For existing user profile: | public static void login(String userName, String password, String ip, LoginDoctor window) {
ConnectionManager connectServer = null;
try {
// Calls ConnectionManager, which connects to the server:
connectServer = new ConnectionManager(ip);
try {
// It tries logging in:
UserProfile up = connectServer.login(userName, password);
if(up == null) {
// If ConnectionManager returns a null value it means the server did not find the credentials.
window.incorrectPassword();
} else {
// If ConnectionManager returns a User Profile it means the server DID find the credentials.
// We then first close the login window:
window.dispose();
// Then we ask server for reports to show the reports window:
showReports(connectServer);
}
} catch (Exception e) {
// If the server found the some of the credentials but the password was wrong it displays this.
/*Side note, I thing this ought to be changed later on, this could be a security threat...*/
window.invalidUsername();
e.printStackTrace();
}
} catch (Exception e1) {
//if the server failed to answer back, display an error message.
window.failedConnection();
System.out.println("Could not connect to the server.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UserProfile createUserProfile(String username, UserProfile newProfile);",
"public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff... | [
"0.72231776",
"0.70737636",
"0.70231605",
"0.6846502",
"0.68260354",
"0.6811891",
"0.6767163",
"0.67651266",
"0.6752338",
"0.6740364",
"0.6684093",
"0.66837704",
"0.6613709",
"0.6603142",
"0.65974087",
"0.6588782",
"0.6568502",
"0.6556082",
"0.65445155",
"0.6530236",
"0.65097... | 0.0 | -1 |
For nonexisting user profile: | public static void createProfile(String userName, String password, String ip, LoginDoctor window) {
ConnectionManager connectServer = null;
try {
connectServer = new ConnectionManager(ip);
try {
// This method tries creating the credentials, if the server doesn't allow this it will throw an exception.
// If everything goes fine it will open a window to type name and surname to create new profile.
// Then the same login window will be opened to type name and password to enter the profile.
connectServer.createProfile(userName, password);
new UserConfiguration(connectServer);
//window.profileCreated();
window.dispose();
} catch(Exception e1) {
// If the server response is not valid, the login window will display an error message saying it didn't like what it saw.
window.profileNotValid();
}
} catch (Exception e) {
/*same thing as before, if the server doesn't answer back tell the user the connection failed or something.*/
window.failedConnection();
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasProfile();",
"@Override\n\tpublic Profile getProfile(Users user) {\n\t\treturn null;\n\t}",
"@java.lang.Override\n public boolean hasProfile() {\n return profile_ != null;\n }",
"@Override\n public void checkProfileUserData() {\n mProfilePresenter.checkProfileUserData();\n ... | [
"0.6673545",
"0.6621149",
"0.6585631",
"0.65516645",
"0.6507282",
"0.6497781",
"0.6481532",
"0.64391667",
"0.64025056",
"0.6297949",
"0.62939525",
"0.62709254",
"0.6249673",
"0.62488693",
"0.6248055",
"0.61866003",
"0.6157738",
"0.6127064",
"0.6103655",
"0.60874367",
"0.60860... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
unbinder = ButterKnife.bind(this, view);
mDetector = new ConnectionDetector(getActivity());
cvHomeWork.setOnClickListener(this);
cvBehaviour.setOnClickListener(this);
/* SliderImageAdapter imageAdapter = new SliderImageAdapter(getActivity());
viewPager.setAdapter(imageAdapter);
dot1.setViewPager(viewPager);*/
check_attendance.setOnClickListener(this);
vcAttendance.setOnClickListener(this);
cvUpcoming.setOnClickListener(this);
vCResult.setOnClickListener(this);
/*//For First Slider Timmer
TimerTask timerTask1 = new TimerTask() {
@Override
public void run() {
viewPager.post(new Runnable() {
@Override
public void run() {
viewPager.setCurrentItem((viewPager.getCurrentItem() + 1) % 4);
}
});
}
};
timer1 = new Timer();
timer1.schedule(timerTask1, 3400, 3400);*/
CallService();
checkLocationService();
CallTeacherbyIdService();
CallExamName();
CallbannerService();
currentTime = Calendar.getInstance().getTime();
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
SimpleDateFormat time = new SimpleDateFormat("HH:MM", Locale.getDefault());
String currentDateandTime = sdf.format(new Date());
currenttime = time.format(new Time(currentTime.getTime()));
System.out.println("currentTime::::::" + currentTime);
todaysdate.setText(currentDateandTime);
System.out.println("formateddate::::::" + currentDateandTime);
System.out.println("formatedtime::::::" + currenttime);
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6740084",
"0.6724855",
"0.6721061",
"0.669875",
"0.6690866",
"0.6688299",
"0.66871583",
"0.6685089",
"0.6676965",
"0.66749275",
"0.6666751",
"0.66662604",
"0.6664662",
"0.6660371",
"0.6653889",
"0.66494936",
"0.6642919",
"0.6638222",
"0.66376024",
"0.6634041",
"0.6625364",... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1) {
if (resultCode == Activity.RESULT_OK) {
Uri selectedFileURI = data.getData();
File file = new File(selectedFileURI.getPath().toString());
Log.d("", "File :::::::: " + file.getName());
//CallUploadResults();
}
}
} | {
"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: Return the communication channel to the service. | @Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Not yet implemented");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Channel channel() {\n return channel;\n }",
"public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}",
"SocketChannel getChannel();",
"EzyChannel getChannel();",
"public Channel getChannel()\n {\n return channel;\n }",
"java.lang.String getChannel();",
"protected Channel getC... | [
"0.7437254",
"0.73157257",
"0.7183302",
"0.7135984",
"0.7129005",
"0.71285546",
"0.7090409",
"0.7070889",
"0.7067624",
"0.7038997",
"0.6988283",
"0.6917885",
"0.68884337",
"0.67946744",
"0.67914945",
"0.67852235",
"0.677885",
"0.674656",
"0.67354923",
"0.6681876",
"0.66714543... | 0.0 | -1 |
Create a new matrix with dimensions of rows x cols with full of 0's. | public Matrix(int rows, int cols) {
this.rows = rows;
this.cols = cols;
data = new double[rows][cols];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int[][] makeMatrixZero(int[][] inputMatrix) {\n\t\tint[][] outputMat = zeroInit();\n\n\t\tfor (int i = 0; i < INDEX; i++) {\n\t\t\tfor (int j = 0; j < INDEX; j++) {\n\t\t\t\tif(outputMat[i][j] !=0)\n\t\t\t\t\toutputMat[i][j] = inputMatrix[i][j];\n\t\t\t\t\n\t\t\t\tif (inputMatrix[i][j] == 0) {\n\t\t\... | [
"0.7134423",
"0.712352",
"0.709705",
"0.69162047",
"0.6902726",
"0.6825206",
"0.6667735",
"0.66200906",
"0.65515745",
"0.65251625",
"0.64424837",
"0.64389473",
"0.6433977",
"0.63908184",
"0.638516",
"0.6332954",
"0.6223493",
"0.62064546",
"0.62048495",
"0.6168188",
"0.6157492... | 0.55992514 | 58 |
Creates a new matrix with specific data. | public Matrix(double[][] data) {
rows = data.length;
cols = data[0].length;
this.data = new double[rows][cols];
for (int i = 0; i < data.length; i++) {
System.arraycopy(data[i], 0, this.data[i], 0, data[i].length);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Matrix(double[] data) {\n m = data.length;\n n = 1;\n this.data = new double[m][n];\n for (int i = 0; i < m; i++)\n {\n for (int j = 0; j < n; j++)\n {\n \tthis.data[i][j] = data[i];\n }\n }\n }",
"protected abstract T createMatrix( int nu... | [
"0.6347886",
"0.6304376",
"0.6251528",
"0.6208592",
"0.6147106",
"0.5980633",
"0.5955021",
"0.5941114",
"0.5929649",
"0.59202695",
"0.589624",
"0.58726233",
"0.58483964",
"0.5772704",
"0.576565",
"0.57233167",
"0.5718121",
"0.5672478",
"0.5668678",
"0.56561154",
"0.563627",
... | 0.6141282 | 5 |
Sets all elements to zero of a matrix. | public void setToZero() {
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
data[i][j] = 0;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void SetMatrixToZeros() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 0;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 0;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;... | [
"0.8063911",
"0.78692466",
"0.7853004",
"0.766914",
"0.7474707",
"0.74678636",
"0.74405724",
"0.74220294",
"0.7363731",
"0.736103",
"0.73406786",
"0.72858477",
"0.72736174",
"0.7180898",
"0.716319",
"0.7150285",
"0.70953465",
"0.70542467",
"0.701759",
"0.7014395",
"0.68451786... | 0.79592466 | 1 |
Returns the element at the specified position in the matrix. | public double get(int row, int col) {
if (row >= 0 && row < this.rows && col >= 0 && col < this.cols)
return data[row][col];
else
throw new ArrayIndexOutOfBoundsException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getElement(int rowIndex, int colIndex){\r\n\t\t\r\n\t\tint res = 0;\r\n\t\tres = mat[rowIndex][colIndex];\r\n\t\treturn res;\r\n\t\r\n\t}",
"public E getElement(int position){\r\n\t\t// Position is larger than the current size.\r\n\t\tif(checkPosition(position)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t... | [
"0.69007474",
"0.6882422",
"0.6689974",
"0.66533077",
"0.65636325",
"0.6529619",
"0.64492357",
"0.64250803",
"0.63995415",
"0.63959616",
"0.63959616",
"0.63343084",
"0.63214236",
"0.63213706",
"0.6299983",
"0.6288979",
"0.6276872",
"0.626791",
"0.6264467",
"0.6264091",
"0.625... | 0.0 | -1 |
Sets the element at the specified position in the matrix. | public void set(int row, int col, double data) {
if (row >= 0 && row < this.rows && col >= 0 && col < this.cols)
this.data[row][col] = data;
else
throw new ArrayIndexOutOfBoundsException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set(int x, int y, int elem){\n matriz[x][y] = elem;\n }",
"public void setElement(int element, int rowIndex, int colIndex){\r\n\t\r\n\t\tmat[rowIndex][colIndex]=element;\r\n\t\r\n\t}",
"public void setElement(int i, int j, double aa){\r\n \tthis.matrix[i][j]=aa;\r\n \t}",
"pub... | [
"0.7601293",
"0.7473482",
"0.7124912",
"0.68975174",
"0.67917955",
"0.67705405",
"0.67129606",
"0.67058665",
"0.6682491",
"0.66764814",
"0.66549385",
"0.66296065",
"0.6617128",
"0.66092956",
"0.6588154",
"0.6588154",
"0.65709877",
"0.65699846",
"0.6545002",
"0.6521801",
"0.64... | 0.0 | -1 |
Returns the identity matrix with the given size. | static public Matrix identityMatrix(int size) {
Matrix identity = new Matrix(size, size);
for (int i = 0; i < size; i++) {
identity.data[i][i] = 1;
}
return identity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Matrix getIdentityMatrix(int size) {\r\n Matrix m = new Matrix(size, size);\r\n\r\n for (int i = 0; i < size; i++) {\r\n m.setValue(i, i, 1);\r\n }\r\n\r\n return m;\r\n }",
"public double[][] getIdentityMatrix(int size) {\n\t\tdouble[][] identityMatrix = n... | [
"0.84862787",
"0.82532036",
"0.7332451",
"0.72034174",
"0.6814291",
"0.6713667",
"0.66818416",
"0.6358805",
"0.63018394",
"0.62713903",
"0.62713903",
"0.6145656",
"0.6026441",
"0.5971254",
"0.58761287",
"0.5548647",
"0.5537484",
"0.54998916",
"0.54388595",
"0.53751963",
"0.53... | 0.875585 | 0 |
Returns the sum of two matrices with the same dimensions | public Matrix add(Matrix other) {
if (this.cols != other.cols || this.rows != other.rows)
throw new RuntimeException("Illegal matrix dimensions");
Matrix result = new Matrix(this.rows, this.cols);
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < this.cols; j++) {
result.data[i][j] = this.data[i][j] + other.data[i][j];
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int[][] matrixSum(int[][] a, int[][]b) {\n\t\tint row = a.length;\n\t\tint col = a[0].length;\n\t\t// creat a matrix array to store sum of a and b\n\t\tint[][] sum = new int[row][col];\n\t\t\n\t\t// Add elements at the same position in a matrix array\n\t\tfor (int r = 0; r < row; r++) {\n\t\t\tfor (int c =... | [
"0.76893264",
"0.7474962",
"0.7052025",
"0.6966269",
"0.69391114",
"0.67690134",
"0.67588073",
"0.6758658",
"0.6746596",
"0.6622397",
"0.66063195",
"0.6541282",
"0.64695626",
"0.64066035",
"0.6379907",
"0.63752806",
"0.6358052",
"0.6348387",
"0.634774",
"0.63001597",
"0.62865... | 0.658084 | 11 |
Multiply the matrix with a scalar value. | public Matrix multiply(double scalar) {
Matrix result = new Matrix(this.rows, this.cols);
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < this.cols; j++) {
result.data[i][j] = this.data[i][j] * scalar;
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void scalarMultiply(double s) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n matrix.get(i)[j] *= s;\n }\n }\n }",
"public void mul_(JType value) {\n TH.THTensor_(mul)(this, this, value);\n }",
"@Override\n\tpublic void\n\... | [
"0.7526341",
"0.73600805",
"0.72612655",
"0.71598125",
"0.6990671",
"0.69852483",
"0.6957425",
"0.6882545",
"0.6799235",
"0.669986",
"0.6673632",
"0.6661163",
"0.6655632",
"0.6632887",
"0.6616911",
"0.65413594",
"0.6512652",
"0.64587766",
"0.6339396",
"0.6339309",
"0.63000935... | 0.7606786 | 0 |
Multiply the matrix with another matrix. | public Matrix multiply(Matrix other) {
if (this.cols != other.rows)
throw new RuntimeException("Illegal matrix dimensions");
Matrix result = new Matrix(this.rows, other.cols); //Matrix full of zeros
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < other.cols; j++) {
for (int k = 0; k < this.cols; k++) {
result.data[i][j] += (this.data[i][k] * other.data[k][j]);
}
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Matrix multiply(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][c... | [
"0.75245523",
"0.74029905",
"0.73504215",
"0.73383635",
"0.7309981",
"0.7275593",
"0.7248127",
"0.71716106",
"0.7094114",
"0.7002515",
"0.69525623",
"0.69252914",
"0.69228077",
"0.69038385",
"0.68988514",
"0.68710214",
"0.6853693",
"0.6828195",
"0.68062025",
"0.6786808",
"0.6... | 0.76319253 | 0 |
Returns the transpose of the matrix. | public Matrix transpose() {
Matrix transposed = new Matrix(this.cols, this.rows);
for (int i = 0; i < transposed.rows; i++) {
for (int j = 0; j < transposed.cols; j++) {
transposed.data[i][j] = this.data[j][i];
}
}
return transposed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Matrix transpose(){\r\n \tMatrix tmat = new Matrix(this.ncol, this.nrow);\r\n \tdouble[][] tarray = tmat.getArrayReference();\r\n \tfor(int i=0; i<this.ncol; i++){\r\n \t\tfor(int j=0; j<this.nrow; j++){\r\n \t\ttarray[i][j]=this.matrix[j][i];\r\n \t... | [
"0.83443767",
"0.8224811",
"0.8142469",
"0.79847455",
"0.789271",
"0.7891543",
"0.76862025",
"0.7616344",
"0.7497786",
"0.71647465",
"0.69743866",
"0.695002",
"0.6909547",
"0.68821466",
"0.67412454",
"0.6704758",
"0.65638435",
"0.6534199",
"0.64627266",
"0.64562976",
"0.64329... | 0.7687111 | 6 |
Fills the matrix with random double values between the parameters. | public void randomize(double lowerBound, double upperBound) {
if (lowerBound > upperBound)
return;
Random random = new Random();
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
data[i][j] = random.nextDouble() * (upperBound - lowerBound) + lowerBound;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initMatrixRandom(DoubleMatrix m){\n\t\tfor(int i = 0; i < m.rows; i++)\n\t\t\tfor(int j = 0; j < m.columns; j++)\n\t\t\t\tm.put(i, j, randomValue());\n\t}",
"private void populateRandom(double[][] matrix, double min, double max) {\n\t\tdouble range = max - min;\n\t\tfor (int i = 0; i < matrix.length;... | [
"0.6928312",
"0.6433045",
"0.60043293",
"0.5893233",
"0.5843752",
"0.5727187",
"0.5726332",
"0.5667555",
"0.5667073",
"0.5660425",
"0.56191295",
"0.5610032",
"0.5607446",
"0.55839306",
"0.55028975",
"0.55000323",
"0.54641366",
"0.53997505",
"0.5393095",
"0.53762573",
"0.53754... | 0.0 | -1 |
Prints the matrix to the standard output. | public void print() {
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < this.cols; j++) {
System.out.format("%.4f", data[i][j]);
if (j != this.cols - 1)
System.out.print(" ");
}
System.out.println("");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void print() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n System.out.print(matrix[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"public void print() {\n mat.print();\n }",
"public void PrintMatrix() {\n\t\t\... | [
"0.83410364",
"0.8042441",
"0.7913314",
"0.77229625",
"0.76754236",
"0.74702585",
"0.7449707",
"0.74223095",
"0.74167585",
"0.7340234",
"0.7337859",
"0.7300969",
"0.7292521",
"0.72644377",
"0.7251171",
"0.7247735",
"0.72152245",
"0.72067255",
"0.7146578",
"0.7142476",
"0.7133... | 0.7229448 | 16 |
Creates a one dimensional array from the matrix. | public double[] toOneDimensionalArray() {
double[] result = new double[rows * cols];
for (int i = 0; i < rows; i++) {
System.arraycopy(this.data[i], 0, result, i * cols, cols);
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[][] toIntArray() {\r\n return matrix;\r\n }",
"Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }",
"public E[][] getMatrix() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tE[][] matrix = (E[][]) new Object[mColumnCount][mRowCount];\r\n\t\... | [
"0.659315",
"0.64245695",
"0.63833463",
"0.6352314",
"0.63327366",
"0.6263773",
"0.6178593",
"0.6011055",
"0.5999065",
"0.5907879",
"0.59073985",
"0.58883554",
"0.5886955",
"0.5880521",
"0.58269155",
"0.5822845",
"0.58182424",
"0.5814935",
"0.58094066",
"0.580378",
"0.5787372... | 0.66416335 | 0 |
Creates a matrix with the given rows and columns from a one dimensional array. | public static Matrix arrayToMatrix(double[] array, int rows, int cols) {
Matrix result = new Matrix(rows, cols);
for (int i = 0; i < rows; i++) {
System.arraycopy(array, i * cols, result.data[i], 0, cols);
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Matrix(int[][] array){\n this.matriz = array;\n }",
"public Matrix(int[][] array)\n {\n matrix = array;\n }",
"public void buildLinkedListMatrixfromArray(int[][] array){\r\n\t\tElementNode temp = null;\r\n\t\tElementNode prevRow = null;\r\n\t\tfor (int i = 0; i < this.head.getOrder(); i+... | [
"0.6776652",
"0.6613877",
"0.630344",
"0.6190729",
"0.61037695",
"0.60998374",
"0.60949415",
"0.60828745",
"0.60752636",
"0.59847313",
"0.5970794",
"0.5923806",
"0.5869903",
"0.5867584",
"0.5867511",
"0.58388925",
"0.5806722",
"0.5790753",
"0.5790388",
"0.5784207",
"0.5773391... | 0.69140273 | 0 |
Creates a vector (a matrix with a column/row of one) from a onedimensional array. | public static Matrix oneDimensionalArrayToVector(double[] array, boolean columnVector) {
double data[][] = new double[1][array.length]; //Create a two-dimensional array
data[0] = array;
Matrix result = new Matrix(data); //Now this is a row vector
if (columnVector)
return result.transpose(); //If we need column vector we transpose it.
else
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[][] getVectorWithOnes(int size) {\n\t\tdouble[][] identityMatrix = new double[size][1];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tidentityMatrix[i][0] = 1;\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"public BigInteger[] asVector() {\n if (nrOfRows != 1 && nrOfCols != 1) {\n thro... | [
"0.64434975",
"0.6167036",
"0.5945083",
"0.5779131",
"0.56204814",
"0.5534448",
"0.5528026",
"0.54804206",
"0.5469331",
"0.53944784",
"0.5345219",
"0.5335589",
"0.533493",
"0.53112644",
"0.5300958",
"0.5295079",
"0.5272776",
"0.5265747",
"0.522338",
"0.5200663",
"0.5131163",
... | 0.7222931 | 0 |
Returns the maximum value in the matrix. | public double getMaxValue() {
double max = Double.NEGATIVE_INFINITY;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
if (data[i][j] > max)
max = data[i][j];
}
}
return max;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n... | [
"0.78540945",
"0.77121127",
"0.75292444",
"0.74625945",
"0.7347905",
"0.7253487",
"0.72139645",
"0.7211502",
"0.7208414",
"0.7202915",
"0.7103093",
"0.70918036",
"0.7081575",
"0.70794845",
"0.7071923",
"0.70118845",
"0.70087826",
"0.6991775",
"0.6991489",
"0.69811285",
"0.696... | 0.77937245 | 1 |
Returns the minimum value in the matrix. | public double getMinValue() {
double min = Double.POSITIVE_INFINITY;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
if (data[i][j] < min)
min = data[i][j];
}
}
return min;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Matrix min(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols(), den = rows_c;\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n ... | [
"0.77602583",
"0.7650631",
"0.7303007",
"0.72889477",
"0.72115487",
"0.7210371",
"0.71747905",
"0.70905256",
"0.70787966",
"0.70724815",
"0.70694387",
"0.7052039",
"0.70429724",
"0.7034406",
"0.70299315",
"0.6996349",
"0.6974482",
"0.696695",
"0.69641584",
"0.6959869",
"0.694... | 0.79918 | 0 |
Returns the number of elements. | public int getSize() {
return rows * cols;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNumberOfElements();",
"public int getNumOfElements() {\n return numOfElements;\n }",
"Long getNumberOfElement();",
"public abstract Integer getNumberOfElements();",
"public int getNumElements()\n {\n return numElements;\n }",
"public int getNumElements() {\n\t\treturn... | [
"0.89427835",
"0.8689523",
"0.86338824",
"0.8625345",
"0.8595692",
"0.847794",
"0.8469816",
"0.8469816",
"0.84430426",
"0.839363",
"0.8383511",
"0.8338894",
"0.82912326",
"0.8280477",
"0.82766205",
"0.82696444",
"0.82326615",
"0.8226335",
"0.8164076",
"0.81539726",
"0.8094240... | 0.0 | -1 |
Test of findAllCars method, of class CarsRestController. | @Test
public void testFindAllCars() {
System.out.println("findAllCars");
List<CarModel> carList = new ArrayList<CarModel>();
CarModelDTO dto = new CarModelDTO();
CarModel carResult = new CarModel();
carResult.setId(new Integer(1));
carResult.setBrand("Ford");
carResult.setFrom(new Integer(2019));
carResult.setTo(new Integer(2020));
carList.add(carResult);
dto.setCars(carList);
dto.setMessage("OK");
dto.setSuccess(true);
ResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);
when(carService.findAllCars()).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<CarModelDTO> result = carController.findAllCars();
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }",
"@Test\n public void testGetCars() {\n System.out.println(\"getCars\");\n CarController instance = new CarController();\n List<Car... | [
"0.7426945",
"0.7326562",
"0.72616076",
"0.7061906",
"0.674004",
"0.6665545",
"0.6639119",
"0.66378516",
"0.6575944",
"0.6446171",
"0.64004886",
"0.63939315",
"0.6357729",
"0.63546157",
"0.6341532",
"0.6266802",
"0.62486345",
"0.6215325",
"0.62094283",
"0.6167533",
"0.6156721... | 0.8487278 | 0 |
Test of getCarById method, of class CarsRestController. | @Test
public void testGetCarById() {
System.out.println("getCarById");
int carId = 1;
List<CarModel> carList = new ArrayList<CarModel>();
CarModelDTO dto = new CarModelDTO();
CarModel carResult = new CarModel();
carResult.setId(new Integer(1));
carResult.setBrand("Ford");
carResult.setFrom(new Integer(2019));
carResult.setTo(new Integer(2020));
carList.add(carResult);
dto.setCars(carList);
dto.setMessage("OK");
dto.setSuccess(true);
ResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);
when(carService.findCarById(carId)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<CarModelDTO> result = carController.getCarById(carId);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testDeleteCarById() {\n\t\tSystem.out.println(\"deleteCarById\");\n\t\tint id = 1;\n\t\tResponseEntity<String> expResult = new ResponseEntity<String>(\"OK\", HttpStatus.OK);\n\t\twhen(carService.deleteCarById(id)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carS... | [
"0.76890904",
"0.76176834",
"0.73222476",
"0.7280654",
"0.72470623",
"0.7153293",
"0.7146855",
"0.70640117",
"0.7019757",
"0.69412476",
"0.6915156",
"0.6867123",
"0.67194796",
"0.6701651",
"0.6562791",
"0.6459309",
"0.6388474",
"0.6388153",
"0.63655007",
"0.6348353",
"0.63271... | 0.8434721 | 0 |
Test of createXMLCarModel method, of class CarsRestController. | @Test
public void testCreateXMLCarModel() {
System.out.println("createXMLCarModel");
String xml = null;
ResponseEntity<String> expResult = new ResponseEntity<String>("Error", HttpStatus.NOT_FOUND);
when(carService.createXMLCarModel(xml)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<String> result = carController.createXMLCarModel(xml);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testCreateCars() throws Exception {\n Car car = carService.generateACarObject();\n testCreateCars(new ElectricCar(car)); // Test to see if electric cars are saved right!\n testCreateCars(new GasCar(car)); // Test to see if gas cars are saved right!\n testCreateCar... | [
"0.6252448",
"0.62464905",
"0.6091103",
"0.5798638",
"0.57703316",
"0.5763128",
"0.56502175",
"0.558336",
"0.55738795",
"0.55462563",
"0.55167013",
"0.54999214",
"0.5491244",
"0.5464125",
"0.542868",
"0.5412127",
"0.5383346",
"0.5369985",
"0.53689396",
"0.5349909",
"0.5342908... | 0.81757593 | 0 |
Test of findCarsByBrand method, of class CarsRestController. | @Test
public void testFindCarsByBrand() {
System.out.println("findCarsByBrand");
String brand = "Ford";
List<CarModel> carList = new ArrayList<CarModel>();
CarModelDTO dto = new CarModelDTO();
CarModel carResult = new CarModel();
carResult.setId(new Integer(1));
carResult.setBrand("Ford");
carResult.setFrom(new Integer(2019));
carResult.setTo(new Integer(2020));
carList.add(carResult);
dto.setCars(carList);
dto.setMessage("OK");
dto.setSuccess(true);
ResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);
when(carService.findCarsByBrand(brand)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<CarModelDTO> result = carController.findCarsByBrand(brand);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Car> findCarsByBrand(String brand){\r\n return repository.findCarsByBrand(brand);\r\n }",
"List<Car> findByBrand(@NonNull String brand);",
"@Test\n\tpublic void testFindAllCars() {\n\t\tSystem.out.println(\"findAllCars\");\n\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCar... | [
"0.77412146",
"0.74236584",
"0.73287714",
"0.7120413",
"0.6868943",
"0.6820155",
"0.6807156",
"0.6578178",
"0.6482954",
"0.6431188",
"0.641427",
"0.6270936",
"0.62379795",
"0.6234424",
"0.6186131",
"0.61716264",
"0.61618054",
"0.61299944",
"0.61239284",
"0.60831165",
"0.60136... | 0.84703255 | 0 |
Test of deleteCarById method, of class CarsRestController. | @Test
public void testDeleteCarById() {
System.out.println("deleteCarById");
int id = 1;
ResponseEntity<String> expResult = new ResponseEntity<String>("OK", HttpStatus.OK);
when(carService.deleteCarById(id)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<String> result = carController.deleteCarById(id);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testDeleteCarById() {\n System.out.println(\"deleteCarById\");\n int id = 17;\n CarController instance = new CarController();\n instance.deleteCarById(id);\n assertTrue(true);\n }",
"@Transactional\r\n\tpublic void deleteCar(String id) {\n\t\tcr.delete... | [
"0.8160814",
"0.7579639",
"0.72477853",
"0.7242593",
"0.7007707",
"0.69447744",
"0.6932835",
"0.69255286",
"0.69206256",
"0.68777025",
"0.686745",
"0.6862945",
"0.68158597",
"0.67837954",
"0.67603457",
"0.6746573",
"0.6667435",
"0.6657292",
"0.6632049",
"0.6609304",
"0.660129... | 0.854607 | 0 |
write your code here | public static void main(String[] args) {
CashRegister cassa1 = new CashRegister();
cassa1.getPrice(3.50);
cassa1.getPrice(4.0);
cassa1.getPrice(55.75);
double total = cassa1.getTotal();
String change = cassa1.getChange(200);
System.out.println(total);
System.out.println(change);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"public static void generateCode()\n {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpub... | [
"0.61019534",
"0.6054925",
"0.58806974",
"0.58270746",
"0.5796887",
"0.56999695",
"0.5690986",
"0.56556827",
"0.5648637",
"0.5640487",
"0.56354505",
"0.56032085",
"0.56016207",
"0.56006724",
"0.5589654",
"0.5583692",
"0.55785793",
"0.55733466",
"0.5560209",
"0.55325305",
"0.5... | 0.0 | -1 |
/////////// PRIVATE // /////////// | private void initFaceTracker(boolean isFrontFacing) {
if (faceDetector != null) {
isReleased = true;
faceDetector.release();
}
faceDetector = new FaceDetector.Builder(context).setTrackingEnabled(true)
.setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)
//.setMode(gameManager.getCurrentGame() != null &&
// gameManager.getCurrentGame().getId().equals(Game.GAME_COOL_CAMS)
// ? FaceDetector.ACCURATE_MODE : FaceDetector.FAST_MODE)
.setMode(FaceDetector.ACCURATE_MODE)
.setProminentFaceOnly(isFrontFacing)
.setMinFaceSize(isFrontFacing ? 0.35f : 0.15f)
.build();
isReleased = false;
//Detector.Processor<Face> processor;
//if (isFrontFacing) {
// Tracker<Face> tracker = new TribeFaceTracker();
// processor = new LargestFaceFocusingProcessor.Builder(faceDetector, tracker).build();
//} else {
// MultiProcessor.Factory<Face> factory = face -> new TribeFaceTracker();
// processor = new MultiProcessor.Builder<>(factory).build();
//}
faceDetector.setProcessor(
new LargestFaceFocusingProcessor.Builder(faceDetector, new TribeFaceTracker()).build());
//faceDetector.setProcessor(processor);
if (!faceDetector.isOperational()) {
isFaceTrackerEnabled = false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n ... | [
"0.64398634",
"0.6362718",
"0.62863994",
"0.6280683",
"0.6280683",
"0.6280683",
"0.6280683",
"0.6280683",
"0.6280683",
"0.61699784",
"0.6155915",
"0.6129058",
"0.6122563",
"0.6115177",
"0.6106641",
"0.607787",
"0.60776246",
"0.6053965",
"0.6039313",
"0.5986301",
"0.59790903",... | 0.0 | -1 |
Timber.d("onUpdate : " + face); | @Override public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {
VisionAPIManager.this.face = face;
computeFace(face);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateFace(Face face) {\n mFace = face;\n postInvalidate();\n }",
"@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(faces... | [
"0.70175076",
"0.68031913",
"0.6741019",
"0.64801335",
"0.64541614",
"0.64448756",
"0.64388514",
"0.6435699",
"0.64299595",
"0.6365618",
"0.6358836",
"0.6221771",
"0.6219215",
"0.6205552",
"0.6201538",
"0.62000144",
"0.61954236",
"0.61789185",
"0.6175982",
"0.61614007",
"0.61... | 0.68323106 | 1 |
Timber.d("onMissing : " + detectionResults); | @Override public void onMissing(FaceDetector.Detections<Face> detectionResults) {
VisionAPIManager.this.face = null;
VisionAPIManager.this.rightEye = VisionAPIManager.this.leftEye = null;
onComputeFaceDone.onNext(lastFrame);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onMissing(FaceDetector.Detections<Face> detectionResults)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n Log.d(APP_LOG_TAG, \"face missing\");\n faceTrackingListener.onFaceMissing(facesFound);\n }",
"@Override\n public void onMissin... | [
"0.72386444",
"0.6805953",
"0.6343595",
"0.6104878",
"0.58107096",
"0.57471395",
"0.5743319",
"0.56970394",
"0.5632955",
"0.5590725",
"0.5590725",
"0.5580734",
"0.5546149",
"0.55382586",
"0.5495193",
"0.5482915",
"0.5452729",
"0.5452729",
"0.5452729",
"0.54414725",
"0.5427637... | 0.6304853 | 3 |
////////////// // PUBLIC // ////////////// | public void initFrameSizeChangeObs(Observable<Frame> obs) {
subscriptions.add(
obs.onBackpressureDrop().subscribe(frame -> initFaceTracker(frame.isFrontCamera())));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n... | [
"0.65991145",
"0.6520734",
"0.6444914",
"0.6434662",
"0.64181453",
"0.64023733",
"0.6326317",
"0.6283343",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6267",
"0.6227881",
"0.62111485",
"0.6201008",
"0.6201008",
"0.6184009",
"0.6178804",
... | 0.0 | -1 |
/////////////// OBSERVABLES // /////////////// | public Observable<Float> onFaceWidthChange() {
return onFaceWidthChange;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object getObservedObject();",
"void onRecvObject(Object object);",
"public Object getUpdate(IObserver obj);",
"@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onResponseReceived(Request request, R... | [
"0.6215433",
"0.6042823",
"0.6028885",
"0.59069574",
"0.58650357",
"0.5845662",
"0.5764811",
"0.5707235",
"0.5689948",
"0.5665552",
"0.5664281",
"0.56503206",
"0.5635477",
"0.5626213",
"0.5621292",
"0.5621263",
"0.56085217",
"0.55902845",
"0.5583211",
"0.55718434",
"0.5571843... | 0.0 | -1 |
Constructor for objects of class TShirtWithLogo | public TShirtWithLogo(double x, double y, double width,
double heightOfSleeves, double sleeveHeight, double sleeveLength)
{
// construct the basic house shell
super(x,y,width,heightOfSleeves, sleeveHeight, sleeveLength);
// get the GeneralPath that we are going to append stuff to
GeneralPath gp = this.get();
Ellipse2D.Double e1 = new Ellipse2D.Double(x,
y, width, (heightOfSleeves+sleeveHeight));
Ellipse2D.Double e2 = new Ellipse2D.Double(x,
y, width/1.5, (heightOfSleeves+sleeveHeight)/1.5);
Ellipse2D.Double e3 = new Ellipse2D.Double(x,
y, width/3, (heightOfSleeves+sleeveHeight)/3);
// GeneralPath wholeShirt = this.get();
gp.append(e1, false);
gp.append(e2, false);
gp.append(e3, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Turtle(int x, int y, String image){super(x, y, \"turtle.png\");}",
"public Shot() {\n }",
"public Troop() //make a overloaded constructor \n\t{\n\t\ttroopType = \"light\"; \n\t\tname = \"Default\";\n\t\thp = 50;\n\t\tatt = 20;\n\t}",
"public WebmailLogo() {\n\n }",
"public BasicSpecies() {\r\n\r\n\t}... | [
"0.67512596",
"0.6182841",
"0.61765337",
"0.6109805",
"0.6103136",
"0.60895616",
"0.6063757",
"0.605547",
"0.6002779",
"0.5937333",
"0.592555",
"0.5895963",
"0.5878215",
"0.58534837",
"0.5810443",
"0.57625353",
"0.5756665",
"0.5752622",
"0.57448477",
"0.5737018",
"0.56850517"... | 0.7160825 | 0 |
Tests the connection to the database | @Test
public void testGetConnection() throws SQLException
{
assertTrue(DatabaseGateway.getConnection() != null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void shouldConnectToDB()\n {\n assertTrue(DatabaseHelper.checkConnection());\n }",
"public boolean testConnection(){\n\t\tboolean connected = false;\n\t\ttry {\t\t\t\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tconnected = true... | [
"0.80064017",
"0.77850944",
"0.76057863",
"0.75795877",
"0.7509973",
"0.7448116",
"0.7444166",
"0.7395215",
"0.7286855",
"0.7265675",
"0.72326267",
"0.72286135",
"0.72200596",
"0.7191858",
"0.7044511",
"0.703881",
"0.6987245",
"0.69522613",
"0.6920817",
"0.6919696",
"0.690847... | 0.77478427 | 2 |
Tests adding a nail to the database and the nail entry has an entry | @Test
public void testGetTable() throws SQLException
{
new Nail("asdf",5,5,5.0,20);
ResultSet rs = DatabaseGateway.getTable("Nail");
if(rs.next())
{
assertEquals(rs.getInt("id"),1);
assertEquals(rs.getInt("ManufacturerID"),5);
assertEquals(rs.getInt("Price"),5);
assertEquals(rs.getString("UPC"),"asdf");
assertTrue(rs.getDouble("Length") == 5.0);
assertEquals(rs.getInt("NumberInBox"), 20);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean addNail(Nail nail) {\r\n\t\treturn nails.add(nail);\r\n\t}",
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"@Test\n public void addRecipe_ReturnsTrue(){\n int re... | [
"0.6578237",
"0.63298035",
"0.6282293",
"0.60967743",
"0.6085985",
"0.60755616",
"0.60683435",
"0.6023099",
"0.60078377",
"0.59757143",
"0.5959337",
"0.5906862",
"0.59031004",
"0.5877729",
"0.5859259",
"0.584413",
"0.58286875",
"0.58137447",
"0.5812545",
"0.5812293",
"0.58102... | 0.5349722 | 100 |
Tests that the key table is autogenerating values | @Test
public void testGetNewTableKey() throws SQLException
{
assertEquals(1, DatabaseGateway.getNewID());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test \n\tpublic void testGetAllKeysFromKeyTable() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tArrayList<Integer> results = DatabaseGateway.getAllKeysFromKeyTable();\n\t\tassertTrue(results.contains(1));\n\t\n\t}",
"private void doAPITest(Map<Object,Object> t... | [
"0.6604696",
"0.63507676",
"0.6282951",
"0.61653644",
"0.6048527",
"0.60123163",
"0.5986967",
"0.5969345",
"0.5966205",
"0.59212977",
"0.5906426",
"0.58886063",
"0.5843587",
"0.58415055",
"0.5798958",
"0.57909214",
"0.5781107",
"0.57805914",
"0.57603997",
"0.57465154",
"0.574... | 0.61387783 | 4 |
Tests getting an object by it's id | @Test
public void testGetObjectByID() throws SQLException
{
InventoryItem nail = new Nail("asdf",5,5,5.0,20);
ResultSet rs = DatabaseGateway.getObjectByID("Nail", nail.id);
if(rs.next())
{
assertEquals(rs.getInt("id"),1);
assertEquals(rs.getInt("ManufacturerID"),5);
assertEquals(rs.getInt("Price"),5);
assertEquals(rs.getString("UPC"),"asdf");
assertTrue(rs.getDouble("Length") == 5.0);
assertEquals(rs.getInt("NumberInBox"), 20);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"Object get(ID id) throws Exception;",
"@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n \r\n int expResult = 0;\r\n int result... | [
"0.780207",
"0.7405831",
"0.7148567",
"0.70830476",
"0.7032151",
"0.70079744",
"0.6988607",
"0.6952547",
"0.6936357",
"0.6921087",
"0.69124585",
"0.6908636",
"0.6892828",
"0.6868811",
"0.685918",
"0.6854815",
"0.68418515",
"0.68070984",
"0.68069834",
"0.67959094",
"0.6792173"... | 0.68113416 | 17 |
Tests adding a row to a database table. | @Test
public void testCreateRow() throws SQLException
{
String insertStatement = "INSERT INTO Nail (" +
"id, UPC, ManufacturerID, Price,Length, NumberInBox" +
") VALUES (1,'asdf',5,5,5.0,20)";
DatabaseGateway.createRow(insertStatement);
ResultSet rs = DatabaseGateway.getObjectByID("Nail", 1);
if(rs.next())
{
assertEquals(rs.getInt("id"),1);
assertEquals(rs.getInt("ManufacturerID"),5);
assertEquals(rs.getInt("Price"),5);
assertEquals(rs.getString("UPC"),"asdf");
assertTrue(rs.getDouble("Length") == 5.0);
assertEquals(rs.getInt("NumberInBox"), 20);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testAddRowCommit() {\n\t}",
"@Test\r\n public void testInsert() {\r\n assertTrue(false);\r\n }",
"@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(r... | [
"0.70438504",
"0.6909492",
"0.68326944",
"0.6744904",
"0.6677934",
"0.6674012",
"0.66697645",
"0.665208",
"0.65663654",
"0.65574116",
"0.65563685",
"0.65459514",
"0.65383166",
"0.6530194",
"0.652835",
"0.65174043",
"0.6515572",
"0.65020144",
"0.6469809",
"0.6453871",
"0.64370... | 0.7255298 | 0 |
Tests adding a row to the associated table PowerToolsTOStripNails | @Test
public void testCreateRowRelation() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
new StripNail("UPC", 5, 5, 3.33, 9);
new PowerToolsToStripNailsMapper(1,2);
ResultSet rs = DatabaseGateway.getTable("PowerToolsTOStripNails");
if(rs.next())
{
assertEquals(rs.getInt("PowerToolid"),1);
assertEquals(rs.getInt("StripNailid"),2);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testReadRowRelationStripNail() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tnew StripNail(\"UPC\", 5, 5, 3.33, 9);\n\t\t\n\t\tnew PowerToolsToStripNailsMapper(1,2);\n\t\t\n\t\tArrayList<Integer> stripNailsRelatedToPowerTools = DatabaseGatewa... | [
"0.6625489",
"0.57815427",
"0.57770216",
"0.574183",
"0.55100065",
"0.5489348",
"0.54668736",
"0.5455062",
"0.54529727",
"0.54331034",
"0.54123086",
"0.5376017",
"0.53706163",
"0.5325064",
"0.5324956",
"0.5293088",
"0.5289002",
"0.5267087",
"0.5259035",
"0.52498853",
"0.52464... | 0.61467725 | 1 |
Tests reading from the associated table PowerToolsTOStripNails | @Test
public void testReadRowRelationPowerTool() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
new StripNail("UPC", 5, 5, 3.33, 9);
new PowerToolsToStripNailsMapper(1,2);
ArrayList<Integer> powerToolsRelatedToStripNail = DatabaseGateway.readRowRelationPowerTool(1);
assertTrue(powerToolsRelatedToStripNail.contains(2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testReadRowRelationStripNail() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tnew StripNail(\"UPC\", 5, 5, 3.33, 9);\n\t\t\n\t\tnew PowerToolsToStripNailsMapper(1,2);\n\t\t\n\t\tArrayList<Integer> stripNailsRelatedToPowerTools = DatabaseGatewa... | [
"0.74036264",
"0.55420727",
"0.52053016",
"0.51350474",
"0.5122106",
"0.5057112",
"0.504284",
"0.50372976",
"0.5030378",
"0.5023594",
"0.5019671",
"0.5007644",
"0.49876803",
"0.4984397",
"0.49216363",
"0.48754683",
"0.4862358",
"0.48472846",
"0.48403448",
"0.48175436",
"0.479... | 0.6046069 | 1 |
Tests reading from the PowerToolsTOStripNails | @Test
public void testReadRowRelationStripNail() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
new StripNail("UPC", 5, 5, 3.33, 9);
new PowerToolsToStripNailsMapper(1,2);
ArrayList<Integer> stripNailsRelatedToPowerTools = DatabaseGateway.readRowRelationStripNail(2);
assertTrue(stripNailsRelatedToPowerTools.contains(1));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testReadTtbinFile_String()\n {\n System.out.println(\"TEST: readTtbinFile\");\n String fileName = \"src/test/resources/test.ttbin\";\n TomTomReader instance = TomTomReader.getInstance();\n Activity expResult = null;\n Activity result = instance.readTtbin... | [
"0.51836807",
"0.5137442",
"0.5114262",
"0.5083975",
"0.50775164",
"0.50770235",
"0.5006012",
"0.49816397",
"0.497856",
"0.49611995",
"0.49492547",
"0.492226",
"0.49071616",
"0.4901164",
"0.4893068",
"0.48766816",
"0.48339498",
"0.48202217",
"0.4819077",
"0.48165798",
"0.4805... | 0.5856108 | 0 |
Tests getting all keys in from the key table | @Test
public void testGetAllKeysFromKeyTable() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
ArrayList<Integer> results = DatabaseGateway.getAllKeysFromKeyTable();
assertTrue(results.contains(1));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n ... | [
"0.71038824",
"0.68671364",
"0.68365943",
"0.66824853",
"0.6515481",
"0.6494404",
"0.6472961",
"0.6461073",
"0.6406495",
"0.64031506",
"0.64031506",
"0.63909465",
"0.6296999",
"0.6289011",
"0.62887675",
"0.62763095",
"0.6245929",
"0.61753726",
"0.6170055",
"0.6156463",
"0.615... | 0.801157 | 0 |
Nav Code uses radial binary search based on location fitness scoring function | public boolean wander() {
MapLocation target = sensor.findTargetLocation();
return(nav.moveToLocation(target));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }",
"void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n ... | [
"0.647985",
"0.62563694",
"0.61223453",
"0.60132277",
"0.5798564",
"0.57487947",
"0.5719538",
"0.5683842",
"0.56792384",
"0.56750965",
"0.56699264",
"0.56552863",
"0.560102",
"0.55888873",
"0.557829",
"0.55618006",
"0.555223",
"0.553309",
"0.55271083",
"0.5512802",
"0.5510646... | 0.0 | -1 |
overwrite fitness Score for each child class | float getFitnessScore(MapLocation l) {
try{
if(rc.canSenseLocation(l) && !rc.onTheMap(l)) {
//System.out.println("dead square");
return -999999.0f;
}
} catch(Exception e){e.printStackTrace();}
float fitness = 0.0f;
for(RobotInfo ri : allRobots) {
fitness -= 1f/l.distanceSquaredTo(ri.location);
}
if(type.equals(RobotType.GARDENER)) {
for(TreeInfo ti : allTrees) {
if(ti.team.equals(Team.NEUTRAL)) {
fitness -= 1f/l.distanceSquaredTo(ti.location);
}
}
}
fitness -= 10f/l.distanceSquaredTo(lastLocation);
return fitness;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setFitnessScore(double score){\n fitnessScore = score;\n }",
"protected abstract void calcScores();",
"double getFitnessScore(){\n return fitnessScore;\n }",
"public abstract float getScore();",
"protected float getFitness()\t\t\t{\treturn fitness;\t\t}",
"public void fitnessFunc... | [
"0.6895301",
"0.64799273",
"0.6448649",
"0.63928694",
"0.6357533",
"0.62564677",
"0.6246511",
"0.6143793",
"0.61005354",
"0.6094871",
"0.60800415",
"0.6075528",
"0.60606384",
"0.60448545",
"0.60355514",
"0.6012825",
"0.59802234",
"0.59766597",
"0.59666973",
"0.5964829",
"0.59... | 0.0 | -1 |
Authenticate user response entity. | public ResponseEntity<?> authenticateUser(LoginRequest loginRequest){
if (loginRequest.getIsTeacher() == 1){
return teacherService.authenticateTeacher(loginRequest);
}else {
return studentService.authenticateStudent(loginRequest);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"AuthenticationResponseDTO authenticateUser(String email, String password);",
"public Result authenticate() {\r\n // 1. Define class to send JSON response back\r\n class Login {\r\n public Long id;\r\n public String gamerTag;\r\n public String token;\r\n\r\n ... | [
"0.69128466",
"0.6884559",
"0.67403525",
"0.6712561",
"0.6683055",
"0.6670204",
"0.6516592",
"0.64368886",
"0.63882107",
"0.6274902",
"0.6218811",
"0.6208208",
"0.6199661",
"0.61463886",
"0.6142291",
"0.6096215",
"0.60933816",
"0.6084381",
"0.60530525",
"0.60320956",
"0.60050... | 0.6491483 | 7 |
TODO code application logic here | public static void main(String[] args) throws Exception {
try{
voziTrku();
}catch(PokvarenMotorException exPom){
System.out.println("Pokvario se motor!!! skloni ga sa staze");
}catch(MaglaException exM){
System.out.println("Magla je! Nema trke");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }"... | [
"0.60802186",
"0.5912082",
"0.58425087",
"0.58339286",
"0.5810548",
"0.57580656",
"0.57396024",
"0.5721001",
"0.5705411",
"0.5666017",
"0.5657976",
"0.5613798",
"0.5611188",
"0.5611188",
"0.55960613",
"0.55933475",
"0.557677",
"0.5572332",
"0.5565667",
"0.55482084",
"0.553657... | 0.0 | -1 |
This is a helper function from Tabula to set the rotation of model parts | public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRotations(AnimationPart part)\n {\n prev_rotateAngleX = part.prev_rotateAngleX;\n prev_rotateAngleY = part.prev_rotateAngleY;\n prev_rotateAngleZ = part.prev_rotateAngleZ;\n }",
"void setRotation (DMatrix3C R);",
"private void setRotateAngle(ModelRenderer modelRenderer... | [
"0.72926825",
"0.7153771",
"0.69096076",
"0.6716232",
"0.66996807",
"0.6697504",
"0.6691873",
"0.66406965",
"0.6621071",
"0.6618826",
"0.65655965",
"0.65456283",
"0.64727277",
"0.6470881",
"0.6462611",
"0.6448111",
"0.6448111",
"0.6448111",
"0.6448111",
"0.6448111",
"0.643783... | 0.6493676 | 20 |
TODO Autogenerated method stub | @Override
public void execute(DelegateExecution execution) throws Exception {
ArticleProcessDto articleProcessDto = (ArticleProcessDto) execution.getVariable("articleProcessDto");
String nextReviewer = (String) execution.getVariable("additional_reviewer");
// EditorReviewerByScienceArea rev = unityOfWork.getEditorReviewerByScienceAreaRepository().getOne(Long.parseLong(nextReviewerId));
// String nextReviewer = rev.getEditorReviewer().getUserUsername();
articleProcessDto.getReviewers().add(nextReviewer);
execution.setVariable("articleProcessDto", articleProcessDto);
execution.setVariable("newInitiator", nextReviewer);
} | {
"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 |
Set up the PSBroker. | @Before
public void setUp() throws Exception {
if (broker == null) {
broker = new PSBrokerBuilder().build();
intSub = new IntegerSubscriber();
unreadSub = new UnreadMessageSubscriber();
pIntSub = new PredicatedIntegerSubscriber();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif(args != null && args.length > 0) {\r\n\t\t\tbroker = (Broker)args[0];\r\n\t\t} else {\r\n\t\t\tbroker = new Broke... | [
"0.661376",
"0.63120437",
"0.62013215",
"0.60957235",
"0.5972769",
"0.59616727",
"0.59560025",
"0.58834743",
"0.5830262",
"0.58210063",
"0.57783186",
"0.576672",
"0.5757057",
"0.5736789",
"0.5704975",
"0.57028013",
"0.56897825",
"0.56330615",
"0.556433",
"0.553875",
"0.553106... | 0.6535638 | 1 |
Ensure that things can subscribe without exceptions being thrown. | @Test
public void aTestValidSubscribe() {
broker.subscribe(intSub);
broker.subscribe(unreadSub);
broker.subscribe(pIntSub);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void invokeOnSubscribe0() {\n try {\n subscriber.onSubscribe(this);\n } catch (Throwable t) {\n processor.unsubscribe(this, t);\n throwIfFatal(t);\n logger.warn(\"Subscriber.onSubscribe() should not raise an exception. subscriber: {}... | [
"0.6619227",
"0.65442914",
"0.64581317",
"0.6306263",
"0.6145788",
"0.6014031",
"0.58417976",
"0.578552",
"0.57488525",
"0.5720886",
"0.56977665",
"0.5617747",
"0.5575904",
"0.55282915",
"0.5482491",
"0.54716253",
"0.54705405",
"0.54523075",
"0.54446733",
"0.5437279",
"0.5430... | 0.6662424 | 0 |
Ensure exceptions are thrown when types mismatch. | @Test(expected = SubscriberTypeMismatchException.class)
public void aTestInvalidSubscribe() {
broker.subscribe(new IntegerSubscriber(), Boolean.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validateTypes() {\r\n\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\tString type = types[i];\r\n\t\t\tif (!TypedItem.isValidType(type))\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The monster type %s is invalid\", type));\r\n\t\t\tfor (int j = i + 1; j < types.length; j++) {\r\... | [
"0.6869629",
"0.68195194",
"0.64038163",
"0.6396949",
"0.6367661",
"0.6261955",
"0.61294186",
"0.61042017",
"0.61027217",
"0.61004907",
"0.60842246",
"0.6065145",
"0.5966196",
"0.596067",
"0.59280705",
"0.589098",
"0.5876915",
"0.5828998",
"0.5799172",
"0.57890403",
"0.578273... | 0.0 | -1 |
Transform the given RootCause DO to a RootCauseDTO object. Returns an empty RootCauseDTO if the parameter is null. | RootCauseDTO toDto(RootCause rootCause) {
RootCauseDTO result = new RootCauseDTO();
result.setId(0L);
if (null != rootCause) {
result.setId(rootCause.getId());
result.setName(rootCause.getName());
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public default D toDto(E entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn DtoUtilService.staticDtoFromEntity(getDtoClass(), entity);\n\t\t}\n\t}",
"public GetUsuarioDTO convierteDTO(Integer id){\n Optional<Usuario> usuario = usuarioRepository.findById(id);\n retu... | [
"0.53701824",
"0.5150884",
"0.5108952",
"0.50803375",
"0.5066643",
"0.5041025",
"0.5006501",
"0.49875838",
"0.4982052",
"0.49792477",
"0.4975754",
"0.49627435",
"0.49375337",
"0.48848608",
"0.48689234",
"0.48491517",
"0.4824864",
"0.4814007",
"0.48013562",
"0.47930974",
"0.47... | 0.7489483 | 0 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int deleteByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"usernam... | [
"0.6774368",
"0.6546757",
"0.6232606",
"0.6198149",
"0.6080078",
"0.6032495",
"0.6009085",
"0.6007126",
"0.6003564",
"0.59547377",
"0.59334403",
"0.5869383",
"0.586615",
"0.5846932",
"0.58029634",
"0.5796425",
"0.5786658",
"0.5772355",
"0.5770656",
"0.57704866",
"0.57587886",... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int insert(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"usernam... | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int insertSelective(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"usernam... | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | DrpCommissionRule selectByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"usernam... | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int updateByPrimaryKeySelective(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"usernam... | [
"0.6774368",
"0.6546757",
"0.6232606",
"0.6198149",
"0.6080078",
"0.6032495",
"0.6009085",
"0.6007126",
"0.6003564",
"0.59547377",
"0.59334403",
"0.5869383",
"0.586615",
"0.5846932",
"0.58029634",
"0.5796425",
"0.5786658",
"0.5772355",
"0.5770656",
"0.57704866",
"0.57587886",... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int updateByPrimaryKey(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"usernam... | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194... | 0.0 | -1 |
Find all existing project(s). Support for paging and sorting. | SearchResultVO<Project> findAll(int nextPage, int num, String sortColName, String sortDirection); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Project> getAllProjects();",
"@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}",
"public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t... | [
"0.79467124",
"0.7880951",
"0.77529126",
"0.76360226",
"0.742655",
"0.7415399",
"0.74145615",
"0.73423904",
"0.73351157",
"0.730188",
"0.7070785",
"0.68844306",
"0.68269634",
"0.68171155",
"0.68155706",
"0.6773043",
"0.6733399",
"0.66999334",
"0.6684894",
"0.6649269",
"0.6636... | 0.69556016 | 11 |
Find project(s) based on [multiple search criteria]. Support for paging and sorting. | SearchResultVO<Project> findByCriteria(SearchCriteriaVO criteria, int currentPage, int num, String sortColName,
String sortDirection); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> searchProjects(\n Map<String, String> filters, List<String> accessibleIds, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n\n List... | [
"0.739421",
"0.69549596",
"0.67917967",
"0.6738938",
"0.67102265",
"0.6616768",
"0.6612095",
"0.6535425",
"0.63959306",
"0.63784397",
"0.63119525",
"0.6309713",
"0.6277891",
"0.6196299",
"0.61827385",
"0.61468077",
"0.61385167",
"0.61339706",
"0.61116964",
"0.6037494",
"0.601... | 0.6356931 | 10 |
Get the information of one project by its id. | Project getById(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Project getProjectDetails(String id) {\n\t\tProject pro;\n\t\tObject name = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet res = null;\n\t\tpro = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tcon = DBUtility.getConnection();\n\t\t\t\tString sql = \"select * from project_master where project_id='\"\n\t\t\t\... | [
"0.80235714",
"0.78352684",
"0.7688585",
"0.7640409",
"0.756081",
"0.748615",
"0.7447433",
"0.73976284",
"0.7382248",
"0.7348412",
"0.72942835",
"0.723851",
"0.7221583",
"0.72195506",
"0.71573436",
"0.71279436",
"0.7104674",
"0.7071442",
"0.69972473",
"0.69739467",
"0.6932785... | 0.8307632 | 0 |
Clone one project from existing one. | Long clone(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cloneProject(String selectedProjectName, String newProjectName) throws Exception{\n\t\tDataManager.createFolderVersion(selectedProjectName, newProjectName);\n\t\tajdtHandler.copyProject(selectedProjectName, newProjectName);\n\t}",
"public void projectClone(Project projectToBeCloned){\r\n\t\tthis.proj... | [
"0.70735073",
"0.7019312",
"0.6403004",
"0.6331484",
"0.63112324",
"0.6235028",
"0.6169909",
"0.61590904",
"0.61590904",
"0.61590904",
"0.5893379",
"0.5842452",
"0.5818061",
"0.569706",
"0.56904256",
"0.5569775",
"0.5569775",
"0.5567486",
"0.5553113",
"0.55530065",
"0.5545705... | 0.0 | -1 |
Get the information of one project by its [number]. | Project getByPrjNumber(Integer num); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String projectNumber() {\n return this.projectNumber;\n }",
"public String getProjectno() {\r\n return projectno;\r\n }",
"public Project getProject(Long projectId);",
"public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No P... | [
"0.6985611",
"0.69789755",
"0.6840991",
"0.6794742",
"0.6648422",
"0.6645893",
"0.65479606",
"0.6472614",
"0.63784367",
"0.6344903",
"0.6333665",
"0.6290095",
"0.62342304",
"0.6215445",
"0.61993635",
"0.61770916",
"0.6133096",
"0.6131089",
"0.6098621",
"0.6097647",
"0.6076705... | 0.8258811 | 0 |
Provides a list of possible proposals for the XSL Elements within the current scope. | @Override
public ArrayList<ICompletionProposal> getCompletionProposals() {
if (region.getType() == DOMRegionContext.XML_TAG_OPEN) {
computeTagOpenProposals();
} else if (region.getType() == DOMRegionContext.XML_TAG_NAME) {
computeTagNameProposals();
}
return getAllCompletionProposals();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> process(java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> proposals) {\n\t\treturn proposals;\r\n\t}",
"public static Map<Integer, Proposal> getProposals() { return proposals; }",
"public ICompletio... | [
"0.64083326",
"0.5844387",
"0.571928",
"0.558309",
"0.55707175",
"0.5469821",
"0.53752285",
"0.5329512",
"0.53228337",
"0.52196276",
"0.5214899",
"0.51981634",
"0.51178867",
"0.4991286",
"0.49715284",
"0.49303997",
"0.49108946",
"0.48213035",
"0.47746077",
"0.47517952",
"0.47... | 0.6788752 | 0 |
Calculate proposals for open content regions. | protected void computeTagOpenProposals() {
if (replacementBeginPosition == documentRegion.getStartOffset(region)) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
// at the start of an existing tag, right before the '<'
computeTagNameProposals();
}
} else {
// within the white space
ITextRegion name = getNameRegion(((IDOMNode) node)
.getStartStructuredDocumentRegion());
if ((name != null)
&& ((documentRegion.getStartOffset(name) <= replacementBeginPosition) && (documentRegion
.getEndOffset(name) >= replacementBeginPosition))) {
// replace the existing name
replacementBeginPosition = documentRegion.getStartOffset(name);
replacementLength = name.getTextLength();
} else {
// insert a valid new name, or possibly an end tag
// addEndTagProposals(contentAssistRequest);
setReplacementLength(0);
}
addTagNameProposals(getElementPosition(node));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n \tpublic ArrayList<ICompletionProposal> getCompletionProposals() {\n\n \t\tif (region.getType() == DOMRegionContext.XML_TAG_OPEN) {\n \t\t\tcomputeTagOpenProposals();\n \t\t} else if (region.getType() == DOMRegionContext.XML_TAG_NAME) {\n \t\t\tcomputeTagNameProposals();\n \t\t}\n \t\treturn getAllComp... | [
"0.6718606",
"0.6140564",
"0.6115631",
"0.60974574",
"0.58691925",
"0.5848606",
"0.5839067",
"0.5495504",
"0.5364234",
"0.53420544",
"0.53369457",
"0.5180224",
"0.5174687",
"0.5130649",
"0.5120359",
"0.5110804",
"0.5092465",
"0.50455236",
"0.48048124",
"0.479809",
"0.47766522... | 0.6717154 | 1 |
Calculates the proposals for the XML Tag Name Region. | protected void computeTagNameProposals() {
// completing the *first* tag in "<tagname1 |<tagname2"
// Ignore attributes
if (inAttributeRegion()) {
return;
}
addTagNameProposals(this.getElementPosition(node));
// addEndTagNameProposals();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void computeTagOpenProposals() {\n \n \t\tif (replacementBeginPosition == documentRegion.getStartOffset(region)) {\n \t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n \t\t\t\t// at the start of an existing tag, right before the '<'\n \t\t\t\tcomputeTagNameProposals();\n \t\t\t}\n \t\t} else {\n \t\t... | [
"0.72662926",
"0.6716229",
"0.5599355",
"0.5191257",
"0.505682",
"0.48878247",
"0.4795587",
"0.47879764",
"0.46927243",
"0.4605574",
"0.45782495",
"0.45746467",
"0.45484155",
"0.45243597",
"0.45154002",
"0.45072985",
"0.44675693",
"0.44287843",
"0.4428539",
"0.43638596",
"0.4... | 0.8019916 | 0 |
Method to initialise the environment for testing. | @BeforeClass public static void initialiseScenario(){
SelectionScenario.initialiseScenario();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupEnvironment() {\n // Create mocks for configurations\n bgpConfig = createMock(BgpConfig.class);\n participantsConfig = createMock(SdxParticipantsConfig.class);\n\n // Create mocks for services\n coreService = new TestCoreService();\n configService = new T... | [
"0.76348627",
"0.7555615",
"0.75231713",
"0.7272474",
"0.7182094",
"0.7171796",
"0.7063189",
"0.70305645",
"0.7028994",
"0.6963451",
"0.6962992",
"0.6863303",
"0.6863303",
"0.6846588",
"0.6825703",
"0.6823138",
"0.6775337",
"0.6761039",
"0.67500144",
"0.6749097",
"0.6732905",... | 0.6406178 | 60 |
End Method Method to initialise the system under test. | @Before public void initialiseSystemUnderTest(){
scenario = new SelectionScenario();
Mockito.when( scenario.shapes.canvasShapeSelection() ).thenReturn(
FXCollections.observableSet( scenario.diamond, scenario.triangle, scenario.pentagon ) );
Mockito.when( scenario.shapes.singletonSelection() ).thenReturn( FXCollections.observableSet() );
scenario.controller = new ShapeManagerSelectionControllerImpl( scenario.shapes );
systemUnderTest = new LocationItems( scenario.controller );
Assert.assertEquals( SelectionScenario.DIAMOND_CENTRE_X, scenario.diamond.centreXProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.DIAMOND_CENTRE_Y, scenario.diamond.centreYProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.TRIANGLE_CENTRE_X, scenario.triangle.centreXProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.TRIANGLE_CENTRE_Y, scenario.triangle.centreYProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.PENTAGON_CENTRE_X, scenario.pentagon.centreXProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.PENTAGON_CENTRE_Y, scenario.pentagon.centreYProperty().get(), TestCommon.precision() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@BeforeClass\r\n\tpublic static void setupSystem() {\r\n\t\tSystemActions.logSystemInfo();\r\n\t\tSystemActions.updateSettings();\r\n\t}",
"@BeforeClass\n protected void initialize() {\n try {\n Class<?> testbedClass = Class.forName(\n MainframeEnvironmentVerification.class.ge... | [
"0.74146605",
"0.7088382",
"0.7013224",
"0.6983294",
"0.68363744",
"0.6809909",
"0.6809909",
"0.6723991",
"0.6671041",
"0.6653403",
"0.66493624",
"0.66435015",
"0.6637053",
"0.6628919",
"0.6628555",
"0.66276985",
"0.66205275",
"0.66193396",
"0.6602304",
"0.6594619",
"0.658660... | 0.0 | -1 |
End Method Method to assert that the centre X is changed correctly. | private void assertCentreXProperty( double expected, double value ) {
Spinner< Double > spinner = systemUnderTest.centreXSpinner();
spinner.getValueFactory().valueProperty().set( value );
Assert.assertEquals( expected, scenario.diamond.translateXProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.triangle.translateXProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.pentagon.translateXProperty().get(), TestCommon.precision() );
shouldRetainOriginalConfigurationOfPolygon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetCenter() {\n int expResult = 3;\n int result = this.dummyDigitSize.getCenter();\n assertEquals(expResult, result);\n }",
"private int get_x() {\n return center_x;\n }",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin2() {\n\t\ttank.setX(1... | [
"0.67004657",
"0.656067",
"0.6529887",
"0.6521826",
"0.65105563",
"0.64992696",
"0.6454195",
"0.6402853",
"0.6363465",
"0.6354081",
"0.63167673",
"0.6250086",
"0.62109977",
"0.6188375",
"0.6170868",
"0.61685807",
"0.614978",
"0.61460054",
"0.61313665",
"0.6126529",
"0.6116413... | 0.75737 | 0 |
End Method Method to assert that the centre Y is changed correctly. | private void assertCentreYProperty( double expected, double value ) {
Spinner< Double > spinner = systemUnderTest.centreYSpinner();
spinner.getValueFactory().valueProperty().set( value );
Assert.assertEquals( expected, scenario.diamond.translateYProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.triangle.translateYProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.pentagon.translateYProperty().get(), TestCommon.precision() );
shouldRetainOriginalConfigurationOfPolygon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testGetSetY() {\n\t\tassertEquals(testNormal.getY(), 10);\n\t\tassertEquals(testZero.getY(), 0);\n\t\tassertEquals(testNegative.getY(), -10);\n\t\tassertEquals(testHuge.getY(), 10000);\n\t\t\n\t\t//SET NEW VALUE\n\t\ttestNormal.setY(8);\n\t\t\n\t\t//TEST GET NEW VALUE\n\t\tassertEquals(testNormal.getY(... | [
"0.70262057",
"0.6955472",
"0.67523676",
"0.66334254",
"0.662557",
"0.64929414",
"0.64803934",
"0.6388558",
"0.637309",
"0.6362346",
"0.63358206",
"0.632661",
"0.6289147",
"0.6283973",
"0.62742615",
"0.62729496",
"0.6270809",
"0.62630224",
"0.6258003",
"0.62540936",
"0.625117... | 0.7774567 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.settings, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
all events will be received here get message | @Override
public void onReceive(Context context, Intent intent) {
srvrMessage = intent.getStringExtra("message");
if (srvrMessage != null) {
String[] parametreler = srvrMessage.split("&");
String[] esitlik;
final Dictionary<String, String> collection = new Hashtable<String, String>(parametreler.length);
for (String parametre : parametreler) {
esitlik = parametre.split("=");
if (esitlik.length == 2)
collection.put(esitlik[0], esitlik[1]);
}
String gelenkomut = collection.get("komut");
GlobalApplication.Komutlar komut;
try
{
komut = GlobalApplication.Komutlar.valueOf(gelenkomut);
}
catch (Exception ex)
{
komut = GlobalApplication.Komutlar.Default;
}
switch (komut)
{
case guncellemeyiBaslat:
veriGuncellemeyiBaslat();
break;
case dosyalar:
kacinci = Integer.parseInt(collection.get("kacinci"));
kacinci++;
g.commonAsyncTask.client.sendMessage("komut=veriGonder&kacinci=" + kacinci + "&sadeceXML=0");
break;
case aktarimTamamlandi:
runOnUiThread(new Runnable() {
@Override
public void run() {
alertDialog.show();
SetViewGroupEnabled.setViewGroupEnabled((RelativeLayout) findViewById(R.id.settings), true);
if(g.bitmapDictionary !=null && g.bitmapDictionary.size()>0)
g.bitmapDictionary = null;
}
});
dosyaAktarimiVarMi = false;
break;
case modemBilgileri:
SharedPreferences.Editor editor = preferences.edit();
try {
editor.putString("SSID", collection.get("SSID"));
editor.putString("ModemSifresi", collection.get("Sifre"));
editor.apply();
showAlertDialog = new ShowAlertDialog();
AlertDialog alertDialog = showAlertDialog.showAlert(context, "Kayıt başarılı",
"Modem bilgileri kayıt edildi.");
alertDialog.show();
} catch (Exception e) {
showAlertDialog = new ShowAlertDialog();
AlertDialog alertDialog = showAlertDialog.showAlert(context, "Kayıt başarısız!",
"Modem bilgileri kayıt edilemedi.");
alertDialog.show();
}
default:
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onRecieve(RoundTimeMessage message) {\n\n\n }",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.processRequest(e);\n }",
"private void readEvent() {\n\t\t\t\n\t\t\thandlePacket();\n\t\t\t\n\t\t}",
"@Override\n public void onMessageReceived(MessageE... | [
"0.6676001",
"0.65169317",
"0.64360154",
"0.6424683",
"0.6420029",
"0.6411295",
"0.6400089",
"0.6389",
"0.63583225",
"0.6340358",
"0.6332966",
"0.6319531",
"0.6301164",
"0.62756383",
"0.6264686",
"0.6264404",
"0.6261917",
"0.6260957",
"0.6246283",
"0.62095207",
"0.61981815",
... | 0.0 | -1 |
Called when the connection to the broker is lost either unintentionally or because the client requested the disconnect. | void disconnected(MqttClient client, Throwable cause, boolean reconnecting); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void connectionLost(Throwable t) {\n System.out.println(\"Connection lost!\");\n // code to reconnect to the broker would go here if desired\n }",
"abstract protected void onDisconnection();",
"@Override\n public void connectionLost(Throwable cause)... | [
"0.78125846",
"0.73762625",
"0.7254389",
"0.7239953",
"0.7221847",
"0.7201453",
"0.7182708",
"0.71076953",
"0.7052173",
"0.70144135",
"0.6998248",
"0.6942933",
"0.6941158",
"0.6915551",
"0.69116986",
"0.6884361",
"0.6869606",
"0.6867084",
"0.6861936",
"0.6844809",
"0.6839023"... | 0.709323 | 8 |
item2() returns this node's item2. If this node is invalid, throws an exception. | public Object item2() throws InvalidNodeException {
if (!isValidNode()) {
throw new InvalidNodeException();
}
return item2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setItem2(Object item) throws InvalidNodeException {\n\t\tif (!isValidNode()) {\n\t\t\tthrow new InvalidNodeException();\n\t\t}\n\t\tthis.item2 = item;\n\t}",
"public VBox getPnItems2() {\n\t\treturn pnItems2;\n\t}",
"public String getAttribute2()\n {\n return (String)getAttributeInternal(ATTRIB... | [
"0.7652664",
"0.6698735",
"0.6175833",
"0.6148159",
"0.6148159",
"0.6148159",
"0.6148159",
"0.6148159",
"0.6144171",
"0.6144171",
"0.6113164",
"0.60481894",
"0.5990344",
"0.59888434",
"0.5926984",
"0.5910601",
"0.590326",
"0.5885804",
"0.5796904",
"0.57931376",
"0.5787978",
... | 0.8931333 | 0 |
setItem2() sets this node's item2 to "item". If this node is invalid, throws an exception. Performance: runs in O(1) time. | public void setItem2(Object item) throws InvalidNodeException {
if (!isValidNode()) {
throw new InvalidNodeException();
}
this.item2 = item;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setNode_2(java.lang.String node_2) {\n\t\t_dictData.setNode_2(node_2);\n\t}",
"public Object item2() throws InvalidNodeException {\n\t\tif (!isValidNode()) {\n\t\t\tthrow new InvalidNodeException();\n\t\t}\n\t\treturn item2;\n\t}",
"public void setItemOwned2(Item item) {\n itemO... | [
"0.70380986",
"0.6938994",
"0.65168995",
"0.6089316",
"0.5901108",
"0.5864833",
"0.5864833",
"0.5847802",
"0.58310515",
"0.5798765",
"0.57454014",
"0.56916606",
"0.5593914",
"0.5590915",
"0.55775154",
"0.5573107",
"0.55167335",
"0.55167335",
"0.55167335",
"0.55167335",
"0.551... | 0.86367756 | 0 |
ccLvl case/cocase level to ignore copying the declared variables from the previous case/cocase level | private CaseOrCocase convertCoCase(CocaseContext ccas, Function fun) throws DecompositionDiversityException {
inCC = true;
String destName = ccas.cocaseDestr().name.getText();
cccName = destName;
ConstructorOrDestructor des = null;
try {
des = env.getConsOrDes(fun.getReturnType(), destName, false);
if (des instanceof Constructor) {
String msg = "Destructor " + ccas.cocaseDestr().name.getText() + " is not declared";
Error err = ErrorFactory.createError(ccas.cocaseDestr().name.getLine(),
ccas.cocaseDestr().name.getLine(), ccas.cocaseDestr().getStart().getCharPositionInLine(),
ccas.cocaseDestr().getStop().getCharPositionInLine(), msg);
errors.add(err);
throw new NotDeclaredException(msg);
}
} catch (DecompositionDiversityException e) {
// TODO: handle exception
}
List<Variable> varList = new ArrayList<>();
if (ccas.cocaseDestr().varList() != null) {
// getVarList(ccas.cocaseDestr().varList(), varList, des, 0, fun, ccas);
getVars(ccas.cocaseDestr().varList(), varList);
try {
checkVarList(varList, fun, des);
localVarsCase.put(destName, varList);
} catch (WrongArgumentsNumber e) {
Error err = ErrorFactory.createError(ccas.cocaseDestr().getStart().getLine(),
ccas.cocaseDestr().getStop().getLine(), ccas.cocaseDestr().getStart().getCharPositionInLine(),
ccas.cocaseDestr().getStop().getCharPositionInLine(), e.getMessage());
errors.add(err);
}
// localVarsCase.put(destName, varList);
}
// if (des != null && des.getTypeNames().size() == varList.size()) {
Expression ex = ConvertExpression(ccas.expression(), fun, 0);
if (ex.getType().contains(X) && !env.getExprWithTypeX().contains(ex))
env.getExprWithTypeX().add(ex);
inCC = false;
ScopedName sn;
MODIFIER mod = destName.contains("_") ? MODIFIER.LOCAL : MODIFIER.GLOBAL;
if (des == null) {
sn = new ScopedName(mod, new QualifiedName(fun.getReturnType(), destName));
} else {
sn = des.getsName();
}
if (sn.getqName().getTypeName().contains(X))
env.getConsDesWithTypeX().add(sn);
return new CaseOrCocase(ccas.getStart(), ccas.getStop(), sn, varList, ex);
// } else {
// String msg = "Number of arguments does not match definition.";
// Error err = ErrorFactory.createError(ccas.cocaseDestr().getStart().getLine(),
// ccas.cocaseDestr().getStop().getLine(), ccas.cocaseDestr().getStart().getCharPositionInLine(),
// ccas.cocaseDestr().getStop().getCharPositionInLine(), msg);
// errors.add(err);
// throw new WrongArgumentsNumber(msg);
// }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void handleNonFrameShiftCase() {\n\t\t\tfinal boolean isInsertionAtEnd = (varAAInsertPos == wtAASeq.length());\n\t\t\tif (!isInsertionAtEnd && wtAASeq.charAt(varAAInsertPos) == '*')\n\t\t\t\thandleNonFrameShiftCaseStartsWithStopCodon();\n\t\t\telse\n\t\t\t\thandleNonFrameShiftCaseStartsWithNoStopCodon();\n... | [
"0.55735445",
"0.53235465",
"0.5134971",
"0.50924325",
"0.50918037",
"0.5001271",
"0.49959472",
"0.494832",
"0.49078694",
"0.49017784",
"0.48959088",
"0.48925376",
"0.48909593",
"0.48232722",
"0.48160237",
"0.4754727",
"0.460472",
"0.4600228",
"0.45889753",
"0.45863885",
"0.4... | 0.53842604 | 1 |
Constructor per defecte, inicialitza el koncepte amb els valors en blanc. | public CreateKonceptWorker() {
super();
this.koncept = new KoncepteParaula();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Valvula(){}",
"public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }",
"public Cgg_jur_anticipo(){}",
"public BabbleValue() {}",
... | [
"0.67590374",
"0.657526",
"0.65215224",
"0.6503876",
"0.649124",
"0.64120585",
"0.6384542",
"0.63764656",
"0.63612044",
"0.6330828",
"0.62630874",
"0.62547797",
"0.62328976",
"0.62243116",
"0.6208569",
"0.61864185",
"0.61805624",
"0.6149388",
"0.6136443",
"0.61109906",
"0.608... | 0.0 | -1 |
Constructor amb els paràmetres dels atributs del worker abstracte, per tal d'inicialitzar els atributs bàsics d'aquest. | public CreateKonceptWorker(HttpServletRequest req, HttpServletResponse res, String path, Map<String, String[]> params) {
this();
setReq(req);
setRes(res);
setPath(path);
setParams(params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataCaseWorker() {\n super();\n }",
"public Worker(){\n\n }",
"public Worker(int x, int y, int size) {\n super(x, y, size);\n// this.x = x;\n// this.y = y;\n// this.size = size;\n }",
"public Job() {\n\t\t\t\n\t\t}",
"public AbstractJob(){\n \n }",
... | [
"0.5682395",
"0.56688523",
"0.558517",
"0.5548451",
"0.54930216",
"0.54725456",
"0.5466377",
"0.5452125",
"0.542576",
"0.542503",
"0.5403126",
"0.5371684",
"0.5362807",
"0.53444374",
"0.53400254",
"0.5287129",
"0.5279588",
"0.52783614",
"0.52727765",
"0.5251159",
"0.52303797"... | 0.0 | -1 |
Mètode que executa la tasca de creació de la paraula i la seva alta a la base de dades, i l'emmagatzematge dels fitxers d'àudio al sistema de fitxers del servidor. Un cop finalitzada la tasca s'escriu la resposta apropiada i s'envia al client. | @Override
public void processRequest() {
try {
koncept.setTextcat(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_TEXT_CA)[0]);
koncept.setTextjap(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_TEXT_JP)[0]);
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_LLISTA_ESTUDI)) {
koncept.setIdLlista(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_LLISTA_ESTUDI)[0]);
}
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_PRON_JAP)) {
koncept.setPronjap(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_PRON_JAP)[0]);
}
// TODO Gestionar amb excepcions.
boolean b = DBController.konceptExists(koncept);
String id = null;
if (!b) {
id = DBController.createKoncept(koncept);
koncept.setId(id);
logger.info("Koncept created. ID = " + id);
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_JP)) {
String pathJP = processAudio(getParams(), PFCConstants.LANG_JAP, koncept);
koncept.setAudioJapones(pathJP);
}
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_CA)) {
String pathCA = processAudio(getParams(), PFCConstants.LANG_CAT, koncept);
koncept.setAudioCatala(pathCA);
}
// Actualitzem valor audio.
DBController.update(koncept);
KonceptIdResponseBean rb = new KonceptIdResponseBean(koncept.getId());
writeResponse(rb);
} else {
ResponseBean rb = new ErrorResponseBean("La paraula ja existeix");
writeResponse(rb);
}
} catch (Exception e) {
logger.error("Error processing request!");
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Resultado executar(Requisicao requisicao) throws Exception {\r\n if (Logger.estaHabilitadoDebug(this)) {\r\n Logger.debug(this, \"***** Manutencao de Itens na Cesta de Garantias Via Arquivo ***** \");\r\n }\r\n\r\n idAtivos = new HashMap();\r\n\r\n Servico validacao = new Servico... | [
"0.6231086",
"0.62230194",
"0.6220721",
"0.61993706",
"0.6167135",
"0.6134637",
"0.6102945",
"0.60780454",
"0.6064207",
"0.5997977",
"0.59946555",
"0.5989985",
"0.59795046",
"0.5979297",
"0.596376",
"0.59324735",
"0.59280604",
"0.5926921",
"0.5910236",
"0.59059435",
"0.589858... | 0.0 | -1 |
Mètode que processa l'àudio rebut en l'idioma especificat pel paràmetre. La informació d'àudio que s'ha rebut és en format Base64, que caldrà descodificar abans d'escriure al sistema de fitxers. | private String processAudio(Map<String, String[]> params, String lang, KoncepteParaula k) throws IOException {
Properties props;
try {
props = PFCUtils.getProperties(PFCConstants.KEY_PROPERTIES_SERVER_FILE);
} catch (Exception e) {
throw new IOException("Error looking for properties file.");
}
String folder = props.getProperty(PFCConstants.PROPERTY_MP3_ROOT) + System.getProperty("file.separator") + lang;
String audio = null;
if (lang.equals(PFCConstants.LANG_CAT)) {
audio = getParams().get(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_CA)[0];
} else if (lang.equals(PFCConstants.LANG_JAP)) {
audio = getParams().get(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_JP)[0];
}
String path = folder + System.getProperty("file.separator") + k.getId() + ".mp3";
OutputStream out = new FileOutputStream(new File(path));
try {
PFCUtils.saveBase64(audio, out);
} catch (Exception e) {
e.printStackTrace();
throw new IOException("Cannot save in Base64!");
}
return path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default String codificarBase64(String contenido) {\n\t\tbyte[] encoded = Base64.getEncoder().encode(contenido.getBytes(StandardCharsets.UTF_8));\n\t\treturn new String(encoded);\n\t}",
"private static String descifrarBase64(String arg) {\n Base64.Decoder decoder = Base64.getDecoder();\n byte[] deco... | [
"0.66380715",
"0.65038574",
"0.6324177",
"0.6178356",
"0.5906888",
"0.5868003",
"0.5868003",
"0.5837939",
"0.5711178",
"0.57081145",
"0.56523377",
"0.5602198",
"0.5585863",
"0.5583573",
"0.5576569",
"0.55753833",
"0.5566466",
"0.55652905",
"0.555615",
"0.54918754",
"0.5479989... | 0.0 | -1 |
Accessor de lectura de l'atribut koncept. | public KoncepteParaula getKoncept() {
return koncept;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAtk(){\n return atk;\n }",
"public int getAtk() {\n return atk;\n }",
"@Override\r\n public Object getAttribute() {\r\n return this.buttonKey;\r\n }",
"public int getTipoAtaque(){return tipoAtaque;}",
"Appearance getAppearance();",
"public int forma()\n {... | [
"0.6061672",
"0.59320146",
"0.5923804",
"0.57922024",
"0.5775482",
"0.57463545",
"0.57319725",
"0.5694271",
"0.5688415",
"0.5666908",
"0.56652975",
"0.5663722",
"0.5646704",
"0.56147385",
"0.55855906",
"0.5580808",
"0.5577565",
"0.55735934",
"0.55718774",
"0.55680466",
"0.555... | 0.58600503 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.