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 |
|---|---|---|---|---|---|---|
Method created to remove a Graphic Object and it's Transform Points from the Graphic Canvas | private void removeObject() {
if(this.curr_obj != null) {
this.canvas.uRemove(this.curr_obj);
this.canvas.remove(this.transformPoints);
this.transformPoints.clear();
this.curr_obj = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void unSelect() {\n /** if we had some object selected we need to delete it's Transformation Points. */\n if(this.action.isSelect() && this.curr_obj != null) {\n this.canvas.remove(this.transformPoints);\n this.transformPoints.clear();\n this.curr_obj = null;\... | [
"0.6729262",
"0.6612344",
"0.6602157",
"0.6463408",
"0.64537424",
"0.6444445",
"0.6432393",
"0.6278594",
"0.6187124",
"0.61772466",
"0.61466056",
"0.61368185",
"0.6118663",
"0.6115067",
"0.60556704",
"0.60394603",
"0.60175306",
"0.60122967",
"0.60044074",
"0.599404",
"0.59748... | 0.85189 | 0 |
Method to send the Graphic Object to the back of the DOM order | private void backObject() {
if(this.curr_obj != null) {
this.curr_obj.uMoveToBack();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void saveGraphicsState();",
"public void restoreGraphics() {\n\n if ( g2 instanceof AimxcelGraphics2D ) {\n AimxcelGraphics2D aimxcelGraphics2D = (AimxcelGraphics2D) g2;\n aimxcelGraphics2D.popState();\n }\n else {\n if ( g2.getRenderingHin... | [
"0.62688446",
"0.62327373",
"0.61285007",
"0.6098016",
"0.59584105",
"0.5948837",
"0.5948837",
"0.59316385",
"0.59136873",
"0.586102",
"0.58199906",
"0.5800782",
"0.5778449",
"0.5778449",
"0.576159",
"0.57613117",
"0.57592463",
"0.5751182",
"0.57226783",
"0.5721",
"0.5713035"... | 0.0 | -1 |
Method to bring the Graphic Object to the front of the DOM order | private void frontObject() {
if(this.curr_obj != null) {
this.curr_obj.uMoveToFront();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toFront() {\n internalGroup.toFront();\n dataTrait.zIndex = internalGroup.getZIndex();\n }",
"public void bringToFront()\n {\n this.toFront();\n }",
"public void toFront() {\n WindowPeer peer = (WindowPeer) this.peer;\n if (peer != null) {\n pe... | [
"0.6986376",
"0.6952759",
"0.62174773",
"0.60607696",
"0.60467476",
"0.6042944",
"0.6042944",
"0.6042944",
"0.602469",
"0.60190016",
"0.6006774",
"0.59327143",
"0.58733314",
"0.5871651",
"0.58278555",
"0.58274186",
"0.57772076",
"0.574034",
"0.5680176",
"0.5657064",
"0.562511... | 0.6799205 | 2 |
This method is used to backup the current style when the user selects any object. | private void backupStyle() {
if(!this.backedup) {
this.backedup = true;
this.lastFillColor = this.currentFillColor;
this.lastFillOpacity = this.fillOpacity.getValue();
this.lastStrokeColor = this.currentStrokeColor;
this.lastStrokeOpacity = this.strokeOpacity.getValue();
this.lastStrokeSize = this.currentStrokeSize.getValue();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void restoreStyle() {\n if(this.backedup) {\n this.backedup = false;\n\n this.currentFillColor = this.lastFillColor;\n DOM.setStyleAttribute(fill.getElement(), \"backgroundColor\",currentFillColor.toCss(false));\n this.fillOpacity.setValue(this.lastFillOpa... | [
"0.7238291",
"0.6828306",
"0.6661939",
"0.6510043",
"0.6336004",
"0.6170944",
"0.61315614",
"0.59830576",
"0.597982",
"0.5958109",
"0.5942436",
"0.589051",
"0.58577824",
"0.58577824",
"0.58577824",
"0.58577824",
"0.58453214",
"0.5836488",
"0.5829034",
"0.5828702",
"0.57736135... | 0.72234315 | 1 |
This method is used to restore the previous style when the user deselects any object. | private void restoreStyle() {
if(this.backedup) {
this.backedup = false;
this.currentFillColor = this.lastFillColor;
DOM.setStyleAttribute(fill.getElement(), "backgroundColor",currentFillColor.toCss(false));
this.fillOpacity.setValue(this.lastFillOpacity);
this.currentFillColor.setAlpha(this.fillOpacity.getValue());
this.currentStrokeColor = this.lastStrokeColor;
DOM.setStyleAttribute(stroke.getElement(), "backgroundColor",currentStrokeColor.toCss(false));
this.strokeOpacity.setValue(this.lastStrokeOpacity);
this.currentStrokeColor.setAlpha(this.strokeOpacity.getValue());
this.currentStrokeSize.setValue(this.lastStrokeSize);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetCurrentlySelectedObject() {\n this.currentlySelectedObject.setTransparency(255);\n this.currentlySelectedObject = null;\n }",
"public synchronized void resetStyle() {\n \t\tstyleInitialized = false;\n \t}",
"private void backupStyle() {\n if(!this.backedup) {\n ... | [
"0.73207396",
"0.71958554",
"0.69800365",
"0.6626852",
"0.65698004",
"0.64978164",
"0.6443061",
"0.64262444",
"0.63942564",
"0.63715684",
"0.6308974",
"0.6283976",
"0.62031645",
"0.6193313",
"0.6190582",
"0.61584413",
"0.61519915",
"0.61393404",
"0.61386657",
"0.611827",
"0.6... | 0.782924 | 0 |
This method adds a Transform Point to the current Graphic Canvas | private void addTransformPoint(double x, double y, int index, GraphicObject curr, double radiansAngle) {
/** If the object is rotated, the transform point also has to be rotated.
* Here we calculate the new coordinates acording to the rotation angle. */
if(radiansAngle != 0.0) {
GeoVector vect = new GeoVector(x, y, curr.getCenterX(), curr.getCenterY());
vect.rotate(radiansAngle);
vect.addPoint(curr.getCenterX(), curr.getCenterY());
x = vect.getX();
y = vect.getY();
}
/** If it's the rotation point, then it creates a green circle */
if(index==0) {
Circle aux = new Circle(2);
aux.setFillColor(Color.GREEN);
aux.setStroke(Color.GRAY, 1);
this.transformPoints.add(aux);
this.transformPointers[index] = aux;
aux.translate((int)x, (int)y);
/** Otherwise it just creates a normal white rectangle */
} else {
Rect aux = new Rect(4,4);
aux.setFillColor(Color.WHITE);
aux.setStroke(Color.GRAY, 1);
this.transformPoints.add(aux);
this.transformPointers[index] = aux;
aux.translate((int)x-2, (int)y-2);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Action\n public void addPoint() { \n Point2D pt = randomPoint();\n PrimitiveGraphic bp = JGraphics.point(pt, RandomStyles.point());\n bp.setDefaultTooltip(\"<html><b>Point</b>: <i> \" + pt + \"</i>\");\n bp.setDragEnabled(true);\n root1.addGraphic(bp);\n }",
"publ... | [
"0.61995685",
"0.6117262",
"0.60099167",
"0.5945552",
"0.58801657",
"0.58075714",
"0.5783421",
"0.57598406",
"0.56946534",
"0.56847304",
"0.5668545",
"0.56626356",
"0.56494397",
"0.563147",
"0.5623555",
"0.5622149",
"0.5614935",
"0.55835974",
"0.55376613",
"0.55005836",
"0.54... | 0.7191331 | 0 |
This method creates the Transform Points of a Graphic object given a Rectangle representing it's boundaries | private void createTransformPoints(Rectangle bnds, GraphicObject curr) {
double degreesAngle, radiansAngle;
Rectangle novo = bnds;
this.transformPoints = new VirtualGroup();
degreesAngle = curr.getRotation();
/** If the object is rotated, we need to rotate i back to the angle 0 in order to get valid boundaries. Tatami doesn't rotates the object's bounds, instead it gives wrong bounds so we need to perform this operation and rotate the bounds on our side. */
if(degreesAngle != 0.0) {
curr.uRotate((float) (degreesAngle * -1.0));
novo = curr.getBounds();
}
radiansAngle = (degreesAngle * (2.0*Math.PI))/360.0;
addTransformPoint(novo.getCenterX(), novo.getY()+novo.getHeight()+(novo.getHeight()/4), 0, curr, radiansAngle);
addTransformPoint(novo.getX(), novo.getY(), 1, curr, radiansAngle);
addTransformPoint(novo.getCenterX(), novo.getY(), 2, curr, radiansAngle);
addTransformPoint(novo.getX() + novo.getWidth(), novo.getY(), 3, curr, radiansAngle);
addTransformPoint(novo.getX(), novo.getCenterY(), 4, curr, radiansAngle);
addTransformPoint(novo.getX() + novo.getWidth(), novo.getCenterY(), 5, curr, radiansAngle);
addTransformPoint(novo.getX(), novo.getY() + novo.getHeight(), 6, curr, radiansAngle);
addTransformPoint(novo.getCenterX(), novo.getY() + novo.getHeight(), 7, curr, radiansAngle);
addTransformPoint(novo.getX() + novo.getWidth(), novo.getY() + novo.getHeight(), 8, curr, radiansAngle);
/** This creates the line between the rotation point and the object */
Line aux2 = new Line((int)(this.transformPointers[Action.SOUTH].getX()+2), (int)(this.transformPointers[Action.SOUTH].getY()+2), (int)(this.transformPointers[Action.ROTATE].getX()), (int)(this.transformPointers[Action.ROTATE].getY()));
aux2.setStroke( Color.GRAY, 1);
this.transformPoints.add(aux2);
this.canvas.add(this.transformPoints, 0, 0);
this.transformPointers[Action.SOUTH].moveToFront();
this.transformPointers[Action.ROTATE].moveToFront();
if(degreesAngle != 0.0) {
curr.uRotate((float)degreesAngle);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void createRectangles();",
"private void transformPoints() {\r\n\r\n\t\t// angle between x-axis and the line between start and goal\r\n//\t\tthis.angle = inverse_tan (slope)\r\n\t\tthis.angle = (int) Math.toDegrees(Math.atan2(goal.getY()-robot.getY(), goal.getX()-robot.getX()));\r\n\r\n\t\t// deviation of start ... | [
"0.63904124",
"0.58125234",
"0.57964903",
"0.5588739",
"0.5407223",
"0.5330032",
"0.52736825",
"0.52316463",
"0.5224817",
"0.5217516",
"0.51677525",
"0.5167019",
"0.5086784",
"0.5086419",
"0.5062496",
"0.5046911",
"0.503505",
"0.50321066",
"0.50297856",
"0.5025725",
"0.501950... | 0.690181 | 0 |
In this method, we rotate the all the transformation points but the rotation one by "angle" degrees, around the GraphicObject's center. This is needed to implement scalling when the object is rotated | private void rotateTransformPoints(double angle) {
int i;
for(i=1; i<9;i++) {
GeoVector vec = new GeoVector(this.transformPointers[i].getX(), this.transformPointers[i].getY(), this.aux_obj.getCenterX(), this.aux_obj.getCenterY());
vec.rotate(((angle*-1.0) * (2.0*Math.PI))/360);
vec.addPoint(this.aux_obj.getCenterX(), this.aux_obj.getCenterY());
this.transformPointers[i].translate( (int)(vec.getX() - this.transformPointers[i].getX()), (int)(vec.getY() - this.transformPointers[i].getY()));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void transformObject(int x, int y) {\n double sx, sy, l, r, nx, ny, tx, ty, alpha, origCX = 0, origCY = 0;\n Rectangle bnds;\n\n if(curr_obj == transformPointers[Action.ROTATE]) {\n /* the mouse vector 1 */\n GeoVector mouseVector = new GeoVector(x, y, this.aux_ob... | [
"0.7404545",
"0.6943015",
"0.6793494",
"0.6664889",
"0.6660267",
"0.65898037",
"0.6564816",
"0.6553244",
"0.64036155",
"0.6387337",
"0.6386296",
"0.63740224",
"0.6370861",
"0.6361866",
"0.6351638",
"0.63175464",
"0.6250885",
"0.62396497",
"0.62314105",
"0.621019",
"0.61653495... | 0.76920164 | 0 |
This method unselect's the currently object so that the user can perform a new action. | private void unSelect() {
/** if we had some object selected we need to delete it's Transformation Points. */
if(this.action.isSelect() && this.curr_obj != null) {
this.canvas.remove(this.transformPoints);
this.transformPoints.clear();
this.curr_obj = null;
/** if we were in the middle of a text operation, we have to remove the TextBox and set the text to it's last version*/
} else if(this.action.isText()) {
int size = Integer.parseInt(currentFontSize.getItemText(currentFontSize.getSelectedIndex()));
curr_obj = new Text(editor.getText());
((Text)curr_obj).setFont(currFont);
addTextObject(curr_obj, (int)aux_obj.getX() + (int)((1.0/4.0)*size), (int)aux_obj.getY()+ (size) + (int)((1.0/4.0)*size));
aux_obj = null;
curr_obj = null;
apanel.remove(editor);
editor = null;
action.setAction(Action.TEXTBOX);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deselect();",
"@Override\n public void deselectGolem() {\n }",
"@Override\n\tpublic void unselect() {\n\t}",
"@Override\n protected void processUnselect() {\n \n }",
"public void deselect() {\n if (selection != null) {\n \t\tworld.destroyJoint(mouseJoint);\n \t ... | [
"0.78497463",
"0.77763116",
"0.777171",
"0.7347931",
"0.722314",
"0.70978624",
"0.7050964",
"0.6914047",
"0.691349",
"0.68844706",
"0.68755347",
"0.6855312",
"0.68281215",
"0.68277365",
"0.6753779",
"0.67219484",
"0.6713402",
"0.66578513",
"0.6633605",
"0.66237986",
"0.661697... | 0.76521766 | 3 |
This method updates the current Font with it's new properties | private void updateFont() {
this.currFont = new Font(this.currentFontFamily.getItemText(this.currentFontFamily.getSelectedIndex()),
Integer.parseInt(this.currentFontSize.getItemText(this.currentFontSize.getSelectedIndex())),
this.currentFontStyle.getItemText(this.currentFontStyle.getSelectedIndex()),
Font.NORMAL,
this.currentFontWeight.getItemText(this.currentFontWeight.getSelectedIndex()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFont(Font newFont) {\r\n\t\tfont = newFont;\r\n\t}",
"private void setFont() {\n\t}",
"public void setFont(Font newFont) {\n\tfont = newFont;\n }",
"@Override\n public void setFont(Font f) {\n super.setFont(f);\n menuDirty = true;\n ResizeUtils.updateSize(this, actio... | [
"0.78066236",
"0.77655315",
"0.7754055",
"0.7433686",
"0.7427567",
"0.7411261",
"0.73257893",
"0.72772884",
"0.7256337",
"0.72363454",
"0.7157408",
"0.71379095",
"0.7132054",
"0.7096793",
"0.7086596",
"0.7071172",
"0.70440066",
"0.70304507",
"0.70293754",
"0.7017115",
"0.6972... | 0.8495327 | 0 |
Processes requests for both HTTP GET and POST methods. | protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String method = request.getMethod();
String message = "";
String url = "/admin/home.jsp";
switch (method) {
case "GET":
url = "/QuizOnline/admin/home.jsp";
response.sendRedirect(url);
break;
case "POST":
String questionContent = request.getParameter("questionContent");
String answer1Content = request.getParameter("answer1");
String answer2Content = request.getParameter("answer2");
String answer3Content = request.getParameter("answer3");
String answer4Content = request.getParameter("answer4");
String correctAnswer = request.getParameter("correctAnswer");
String subjectID = request.getParameter("subject");
try {
if (questionContent.isEmpty() || answer1Content.isEmpty() || answer2Content.isEmpty()
|| answer3Content.isEmpty() || answer4Content.isEmpty() || correctAnswer.isEmpty() || subjectID.isEmpty()) {
throw new NullPointerException();
} else {
Question question = new Question(questionContent, Integer.parseInt(subjectID));
Answer answer1 = new Answer(answer1Content, false);
Answer answer2 = new Answer(answer2Content, false);
Answer answer3 = new Answer(answer3Content, false);
Answer answer4 = new Answer(answer4Content, false);
switch (correctAnswer) {
case "answer1":
answer1.setIsCorrect(true);
break;
case "answer2":
answer2.setIsCorrect(true);
break;
case "answer3":
answer3.setIsCorrect(true);
break;
case "answer4":
answer4.setIsCorrect(true);
break;
default:
throw new NullPointerException();
}
List<Answer> listAnswer = new ArrayList<>(4);
listAnswer.add(answer1);
listAnswer.add(answer2);
listAnswer.add(answer3);
listAnswer.add(answer4);
AdminDAO dao = new AdminDAO();
boolean flag = dao.createNewQuestion(question, listAnswer);
if (flag) {
message = "Them moi thanh cong";
} else {
message = "Them moi chua thanh cong,hay thu lai";
}
List<SearchQuestionDTO> listQuestion = dao.searchPart1("", true, null, 0);
List<String> listQuestionID = new ArrayList<>();
for (SearchQuestionDTO dto : listQuestion) {
listQuestionID.add(dto.getQuestion().getId());
}
List<Answer> listAnswerFromDB = dao.searchPart2(listQuestionID);
for (SearchQuestionDTO dto : listQuestion) {
for (Answer answer : listAnswerFromDB) {
if (dto.getQuestion().getId().equals(answer.getQuestionID())) {
dto.getListAnswers().add(answer);
}
}
}
request.setAttribute("SEARCH_RESULT", listQuestion);
}
} catch (NumberFormatException e) {
message = "Loi khi parse sang so";
logger.error("Error at AddNewQuestionServlet:" + e.toString());
} catch (NullPointerException e) {
message = "Khong duoc nhap thieu";
logger.error("Error at AddNewQuestionServlet:" + e.toString());
} catch (Exception e) {
message = "Loi khong xac dinh";
logger.error("Error at AddNewQuestionServlet:" + e.toString());
} finally {
request.setAttribute("MESSAGE", message);
request.getRequestDispatcher(url).forward(request, response);
}
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_... | [
"0.7004024",
"0.66585696",
"0.66031146",
"0.6510023",
"0.6447109",
"0.64421695",
"0.64405906",
"0.64321136",
"0.6428049",
"0.6424289",
"0.6424289",
"0.6419742",
"0.6419742",
"0.6419742",
"0.6418235",
"0.64143145",
"0.64143145",
"0.6400266",
"0.63939095",
"0.63939095",
"0.6392... | 0.0 | -1 |
Handles the HTTP GET method. | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doGet( )\n {\n \n }",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro... | [
"0.7589609",
"0.71665615",
"0.71148175",
"0.705623",
"0.7030174",
"0.70291144",
"0.6995984",
"0.697576",
"0.68883485",
"0.6873811",
"0.6853569",
"0.6843572",
"0.6843572",
"0.6835363",
"0.6835363",
"0.6835363",
"0.68195957",
"0.6817864",
"0.6797789",
"0.67810035",
"0.6761234",... | 0.0 | -1 |
Handles the HTTP POST method. | @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost( )\n {\n \n }",
"@Override\n public String getMethod() {\n return \"POST\";\n ... | [
"0.73289514",
"0.71383566",
"0.7116213",
"0.7105215",
"0.7100045",
"0.70236707",
"0.7016248",
"0.6964149",
"0.6889435",
"0.6784954",
"0.67733276",
"0.67482096",
"0.66677034",
"0.6558593",
"0.65582114",
"0.6525548",
"0.652552",
"0.652552",
"0.652552",
"0.65229493",
"0.6520197"... | 0.0 | -1 |
Returns a short description of the servlet. | @Override
public String getServletInfo() {
return "Short description";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short d... | [
"0.8763362",
"0.87320423",
"0.87320423",
"0.87320423",
"0.87320423",
"0.87320423",
"0.87320423",
"0.87320423",
"0.87320423",
"0.87320423",
"0.87320423",
"0.8698972",
"0.8698972",
"0.8698972",
"0.8698972",
"0.8698972",
"0.8698972",
"0.8531154",
"0.8531154",
"0.85280526",
"0.85... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
imageView = (ImageView) arg1.findViewById(R.id.imageView);
Log.d("1111","...............arg1 ="+(String)imageView.getTag());
Intent intent = new Intent(Intent.ACTION_VIEW);
//Uri mUri = Uri.parse("file://" + picFile.getPath());Android3.0以后最好不要通过该方法,存在一些小Bug
file = new File((String)imageView.getTag());
//File file = new File(Environment.getExternalStorageDirectory().toString()+GlobalApp.DOWNLOAD_PATH);
intent.setDataAndType(Uri.fromFile(file), "image/*");
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onResume() {
super.onResume();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onRestart() {
super.onRestart();
//init();
Log.d("1111","on restart");
DisplayMetrics dm = new DisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(dm);
width = dm.widthPixels;
fileList = FileTools.getUrls(GlobalApp.DOWNLOAD_PATH);
mGridViewAdapter = null;
Log.d("1111","new LocalPhotoAdapter");
mGridViewAdapter = new LocalPhotoAdapter(LocalPhotoWallActivity.this,fileList, mGridView,width);
//mGridViewAdapter.notifyDataSetInvalidated();
mGridView.setAdapter(mGridViewAdapter);
mGridViewAdapter.notifyDataSetInvalidated();
totalNum.setText(fileList.length+" files");
mGridView.invalidate();
} | {
"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 |
Add by zhangyanhu 2013.12.2 | @Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// DisplayMetrics dm = new DisplayMetrics();
// this.getWindowManager().getDefaultDisplay().getMetrics(dm);
// width = dm.widthPixels;
//mGridViewAdapter = new LocalPhotoAdapter(this, 0, FileTools.getUrls(GlobalApp.DOWNLOAD_PATH), mGridView, width);
//mGridView.setAdapter(mGridViewAdapter);
// try {
// Thread.currentThread().sleep(5000);
// } catch (InterruptedException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
DisplayMetrics dm = new DisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(dm);
width = dm.widthPixels;
fileList = FileTools.getUrls(GlobalApp.DOWNLOAD_PATH);
mGridViewAdapter = null;
Log.d("1111","new LocalPhotoAdapter");
mGridViewAdapter = new LocalPhotoAdapter(LocalPhotoWallActivity.this,fileList, mGridView,width);
//mGridViewAdapter.notifyDataSetInvalidated();
mGridView.setAdapter(mGridViewAdapter);
mGridViewAdapter.notifyDataSetInvalidated();
totalNum.setText(fileList.length+" files");
mGridView.invalidate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void add() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void add() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpubli... | [
"0.6772466",
"0.61398643",
"0.61139977",
"0.60786486",
"0.60415125",
"0.6017091",
"0.597813",
"0.59748554",
"0.5952635",
"0.5851756",
"0.58346844",
"0.5805073",
"0.5787952",
"0.57822996",
"0.5729358",
"0.5723782",
"0.5711656",
"0.57065815",
"0.5692447",
"0.5684389",
"0.567100... | 0.0 | -1 |
wenn der CameraButton geklickt wird dann wird die Kamera aufgerufen und man kann ein Bild machen | @Override
public void onClick(View v) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void cameraClicked() {\n\t\tif (this.pictureFromCameraString != null\n\t\t\t\t&& !\"\".equals(this.pictureFromCameraString)) {\n\t\t\timageAvailable();\n\t\t} else {\n\t\t\timageUnavailable();\n\t\t}\n\t\tthis.cameraIsActive = true;\n\t\tthis.camera.addStyleDependentName(\"highlighted\");\n\t\tthis.uploa... | [
"0.7058738",
"0.7019285",
"0.69925946",
"0.68596596",
"0.67064625",
"0.668271",
"0.66606694",
"0.6619006",
"0.65497357",
"0.65336776",
"0.64104337",
"0.63695323",
"0.63674164",
"0.6363071",
"0.6306835",
"0.6281189",
"0.62654215",
"0.6264844",
"0.6249383",
"0.6242716",
"0.6227... | 0.0 | -1 |
Returns a list of StudentAnswer objects for a given student id and quiz id. | public ArrayList<StudentAnswer> getAnswers() {
TeacherDBCommands tdbc = new TeacherDBCommands(ctx);
QuestionDBCommands qdbc = new QuestionDBCommands(ctx);
ArrayList<StudentAnswer> answers = null;
try {
answers = tdbc.getStudentAnswers(this.studentId, this.quizId);
} catch (SQLException e) {
log.log(Level.SEVERE, e.getMessage(), e);
}
tdbc.closeConnection();
if(answers != null){
for (int i = 0; i < answers.size(); i++) {
try {
answers.get(i).setQuestion(qdbc.getQuestionById(answers.get(i).getQuizTestModuleQuestionId()));
} catch (SQLException e) {
log.log(Level.SEVERE, e.getMessage(), e);
break;
}
}
}
qdbc.closeConnection();
return answers;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<StudentExam> findAllByExamId(Long examId) {\n log.debug(\"Request to get all student exams for Exam : {}\", examId);\n return studentExamRepository.findByExamId(examId);\n }",
"List<Result> getResultsByQuizId(int quizId);",
"List<Question> getQuestions(String surveyId);",
"public... | [
"0.6840287",
"0.65341187",
"0.63026786",
"0.62849385",
"0.61267096",
"0.6057431",
"0.59713715",
"0.59692544",
"0.59380525",
"0.58587986",
"0.5821672",
"0.5815335",
"0.5812183",
"0.5785601",
"0.57460254",
"0.5698992",
"0.56979066",
"0.56541634",
"0.56527936",
"0.5627679",
"0.5... | 0.6972141 | 0 |
Method for extracting the Huffman Codes from a Huffman Tree (PQHeap). | public String[] makeCodes(){
HuffmanTempTree tree = makeTree();
return tree.inOrderTreeWalkPath(tree.root, "", codes);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private HuffmanTreeNode[] heapify(int freq[][]) {\n\t\tHuffmanTreeNode[] heap = new HuffmanTreeNode[freq.length];\n\t\tfor (int i = 0; i < freq.length; i++)\n\t\t{\n\t\t\theap[i] = new HuffmanTreeNode(freq[i][1], freq[i][0], null, null);\n\t\t}\n\t\t\n\t\theap = heapSort(heap);\n\n\t\treturn heap;\n\t}",
"public... | [
"0.69321525",
"0.6516903",
"0.6486174",
"0.63072354",
"0.62683284",
"0.62192714",
"0.6136043",
"0.6123995",
"0.61110705",
"0.610073",
"0.600579",
"0.59733063",
"0.5947394",
"0.59392744",
"0.5912014",
"0.5815266",
"0.5807434",
"0.58021456",
"0.5779957",
"0.5724183",
"0.5687864... | 0.57765144 | 19 |
Method for making the a Huffman Tree from a PQHeap. Runs the Huffman Algorithm which extracts the two smallest elements from the PQHeap and merges these into a new element, which is then inserted into the PQHeap. This is done n1 = 255 times. Typecasting from Element.data (Object) to HuffmanTempTree is used. | private HuffmanTempTree makeTree() {
PQHeap queue = makeQueue();
for (int i = 0; i < frequency.length - 1; i++) {
HuffmanTempTree zTree = new HuffmanTempTree(0);
Element x = queue.extractMin();
Element y = queue.extractMin();
int zFreq = x.key + y.key;
zTree.merge((HuffmanTempTree) x.data, (HuffmanTempTree) y.data);
queue.insert(new Element(zFreq, zTree));
}
return (HuffmanTempTree) queue.extractMin().data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createHuffmanTree() {\n\t\twhile (pq.getSize() > 1) {\n\t\t\tBinaryTreeInterface<HuffmanData> b1 = pq.removeMin();\n\t\t\tBinaryTreeInterface<HuffmanData> b2 = pq.removeMin();\n\t\t\tHuffmanData newRootData =\n\t\t\t\t\t\t\tnew HuffmanData(b1.getRootData().getFrequency() +\n\t\t\t\t\t\t\t\t\t\t\tb2.get... | [
"0.7785362",
"0.7686242",
"0.74033266",
"0.73194766",
"0.70434946",
"0.7041031",
"0.68021464",
"0.669262",
"0.65665317",
"0.6544264",
"0.65233743",
"0.647479",
"0.63621676",
"0.62978286",
"0.6292996",
"0.6279537",
"0.62768835",
"0.61728966",
"0.61571157",
"0.6022622",
"0.6019... | 0.79383606 | 0 |
Creating a new Element for each of the 256 possible bit patterns (represented as an int) and inserts it into the PQHeap. | private PQHeap makeQueue(){
PQHeap queue = new PQHeap(frequency.length);
for (int i = 0; i < frequency.length; i++) {
queue.insert(new Element(frequency[i], new HuffmanTempTree(i)));
}
return queue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public HeapIntPriorityQueue() {\n elementData = new int[10];\n size = 0;\n }",
"public PriorityQueue(int size){\n heap = new Element[size];\n }",
"void insert(int ele){\n if(heapLen>=A.length)\n {\n System.out.println(\"Heap is full\");\n }\n else\n ... | [
"0.6559816",
"0.5847551",
"0.5825631",
"0.57383686",
"0.56036854",
"0.5598112",
"0.5549415",
"0.55398476",
"0.5507131",
"0.5453983",
"0.54534876",
"0.54003763",
"0.5384657",
"0.538135",
"0.53736067",
"0.53734726",
"0.53650314",
"0.53271466",
"0.5323979",
"0.5310369",
"0.52942... | 0.6480918 | 1 |
removeProperty Adds a source to the link. | public boolean addSource(Entity source) {
boolean result = IServer.associationHasSource().add(this, source);
IServer.fireLinkUpdated(new LinkEvent(this));
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteProperties(String sourceInstance, String property)\r\n\t{\r\n\t\tOntResource si = this.obtainOntResource(sourceInstance);\r\n\t\tProperty prop = this.obtainOntProperty(property);\r\n\t\tsi.removeAll(prop);\r\n\t}",
"public void unsetSource()\n {\n synchronized (monitor())\n {\n... | [
"0.6537842",
"0.6374729",
"0.6370125",
"0.62876576",
"0.619681",
"0.61859125",
"0.61854523",
"0.6136771",
"0.60891354",
"0.60131854",
"0.5981339",
"0.5816461",
"0.580818",
"0.57975507",
"0.57927734",
"0.5754941",
"0.5704852",
"0.56014377",
"0.559993",
"0.55628157",
"0.5499992... | 0.0 | -1 |
addSource Removes a source from the link. | public boolean removeSource(Entity source) {
boolean result = IServer.associationHasSource().remove(this, source);
IServer.fireLinkUpdated(new LinkEvent(this));
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void removeSource(String sourceName) {\n\t\t\n\t}",
"void removeSource(McastRoute route, HostId source);",
"public void setSource(noNamespace.SourceType source)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.Sour... | [
"0.6957234",
"0.6523635",
"0.5802395",
"0.5771873",
"0.57398283",
"0.57393825",
"0.57335764",
"0.57335764",
"0.57211715",
"0.572089",
"0.57066",
"0.5679259",
"0.56598175",
"0.5635792",
"0.5624971",
"0.5583579",
"0.55813396",
"0.55670637",
"0.554203",
"0.5538664",
"0.5538664",... | 0.6413439 | 2 |
removeSource Returns the link's source. | public OMCollection getSource() {
return IServer.associationHasSource().dr(this).range();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NameValue<String, String> removeSourceURL() {\n return removeURL(mSourceMap);\n }",
"private void removeSource(String sourceName) {\n\t\t\n\t}",
"public boolean removeSource(Entity source) {\r\n boolean result = IServer.associationHasSource().remove(this, source);\r\n IServer.fireLin... | [
"0.7285353",
"0.70879537",
"0.687701",
"0.6710051",
"0.66982335",
"0.6485871",
"0.6163841",
"0.58600646",
"0.5759039",
"0.5572766",
"0.5564344",
"0.5556293",
"0.55232674",
"0.5491147",
"0.54230744",
"0.5385495",
"0.5357262",
"0.5351466",
"0.528553",
"0.52536464",
"0.524508",
... | 0.0 | -1 |
getSource Adds a target to the link. | public boolean addTarget(Entity target) {
boolean result = IServer.associationHasTarget().add(this, target);
IServer.fireLinkUpdated(new LinkEvent(this));
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateSourceTarget(String source, String target) {\n\t\titem.setText(2, source);\n\t\titem.setText(3, target);\n\t}",
"public void setSource(Source s)\n\t{\n\t\tsource = s;\n\t}",
"public void setSource(noNamespace.SourceType source)\r\n {\r\n synchronized (monitor())\r\n ... | [
"0.5903383",
"0.58928525",
"0.5707582",
"0.5623308",
"0.55846107",
"0.55829394",
"0.5543706",
"0.54691005",
"0.54324186",
"0.541972",
"0.5418117",
"0.53949153",
"0.53927976",
"0.5383903",
"0.53829277",
"0.53829277",
"0.5377642",
"0.53728366",
"0.53701484",
"0.5366631",
"0.535... | 0.49522305 | 84 |
addTarget Removes a target from the link. | public boolean removeTarget(Entity target) {
boolean result = IServer.associationHasTarget().remove(this, target);
IServer.fireLinkUpdated(new LinkEvent(this));
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addTarget(Target target)\n {\n if (!targets.contains(target))\n {\n targets.add(target);\n }\n }",
"public abstract void removeTarget(Component target);",
"public void addTarget(Target target) {\n // XXX check out for name, if null, reject!\n targets.put(target.getName... | [
"0.67838347",
"0.6474879",
"0.6295486",
"0.6174199",
"0.59425384",
"0.58816344",
"0.57836056",
"0.5783061",
"0.577638",
"0.5772285",
"0.57236946",
"0.5680576",
"0.56654876",
"0.56624216",
"0.5622766",
"0.560491",
"0.5599662",
"0.5578754",
"0.55721307",
"0.55296516",
"0.550350... | 0.6110679 | 4 |
removeTarget Returns the link's target. | public OMCollection getTarget() {
return IServer.associationHasTarget().dr(this).range();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean removeTarget(Entity target) {\r\n boolean result = IServer.associationHasTarget().remove(this, target);\r\n IServer.fireLinkUpdated(new LinkEvent(this));\r\n return result;\r\n }",
"public abstract void removeTarget(Component target);",
"void unsetTarget();",
"public void remo... | [
"0.67614686",
"0.65316075",
"0.64657086",
"0.6191451",
"0.6158579",
"0.6015278",
"0.59995085",
"0.578125",
"0.5739708",
"0.5649675",
"0.56350523",
"0.5616295",
"0.5559053",
"0.5533191",
"0.5529451",
"0.54373795",
"0.53974444",
"0.537566",
"0.5364767",
"0.53427196",
"0.5335934... | 0.0 | -1 |
getTarget Returns all links having a specific data object as source. | public static OMCollection getLinkBySource(Entity source) {
return IServer.associationHasSource().rr(source).domain();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static OMCollection getLinkByTarget(Entity target) {\r\n return IServer.associationHasTarget().rr(target).domain();\r\n }",
"public Hashtable getTargets() {\n return targets;\n }",
"Object getTarget();",
"Object getTarget();",
"public List<Link> getTargetConnections() {\n\t\tretur... | [
"0.6409983",
"0.60997313",
"0.6072584",
"0.6072584",
"0.60067123",
"0.5871391",
"0.5858219",
"0.58404887",
"0.5758981",
"0.5729984",
"0.57293934",
"0.5724214",
"0.5714987",
"0.5699295",
"0.56602144",
"0.5646374",
"0.56362826",
"0.5627123",
"0.56271076",
"0.56271076",
"0.55995... | 0.52110255 | 62 |
getLinkBySource Returns all links having a specific data object as target. | public static OMCollection getLinkByTarget(Entity target) {
return IServer.associationHasTarget().rr(target).domain();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static OMCollection getLinkBySource(Entity source) {\r\n return IServer.associationHasSource().rr(source).domain();\r\n }",
"public boolean addSource(Entity source) {\r\n boolean result = IServer.associationHasSource().add(this, source);\r\n IServer.fireLinkUpdated(new LinkEvent(this));\r... | [
"0.6729209",
"0.5205657",
"0.5115916",
"0.511153",
"0.5084776",
"0.50482726",
"0.5018457",
"0.4993151",
"0.49410963",
"0.48803434",
"0.4842882",
"0.48407993",
"0.48063946",
"0.47913697",
"0.47702974",
"0.47649863",
"0.47564706",
"0.47438785",
"0.47309253",
"0.47064155",
"0.47... | 0.5111301 | 4 |
getLinkByTarget Returns the string to be used to label this object. | @Override
public synchronized String getLabelExtension() {
int sourceSize = (getSource() != null) ? 1 : 0;
int targetSize = (getTarget() != null) ? getTarget().size() : 0;
String prefix = (!super.getLabelExtension().equals(Constant.EMPTY_STRING)) ? super
.getLabelExtension()
: Schema.TYPE_LINK;
return prefix + Constant.BLANK + Constant.OPEN_PARENTHESIS + sourceSize
+ Constant.COMMA + Constant.BLANK + targetSize
+ Constant.CLOSE_PARENTHESIS;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getTarget() {\n return target;\n }",
"public String getTarget() {\n return this.target;\n }",
"public String getTarget() {\n return target;\n }",
"public String getTarget() {\n return target;\n }",
"String getTarget() {\r\n return this.... | [
"0.69249654",
"0.6733924",
"0.66688263",
"0.66688263",
"0.6630656",
"0.6586028",
"0.6586028",
"0.65377325",
"0.6474937",
"0.6474937",
"0.6415718",
"0.63799936",
"0.63707334",
"0.6354561",
"0.6289456",
"0.6159354",
"0.6141845",
"0.6122697",
"0.6107643",
"0.60594654",
"0.605016... | 0.5240119 | 87 |
getLabelExtension Returns an icon for the link. | @Override
public ImageIcon getIcon(int size) {
return IconTool.getIcon(ICON_NAME, size);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getIcon();",
"java.lang.String getIcon();",
"private RLabel getIconLabel() {\n if (iconLabel == null) {\n iconLabel = new RLabel();\n iconLabel.setStyle(\"border-all\");\n iconLabel.setIconUri(\"<%=ivy.cms.cr(\\\"/Icons/Large/error\\\")%>\");\n iconLabel.setStyleProperti... | [
"0.6653491",
"0.6653491",
"0.66493964",
"0.6426678",
"0.6426678",
"0.62623215",
"0.6156132",
"0.6143673",
"0.6137149",
"0.6106156",
"0.60998416",
"0.60333246",
"0.60333246",
"0.5992562",
"0.5986301",
"0.5959075",
"0.5922081",
"0.59169143",
"0.5910307",
"0.5910307",
"0.5882234... | 0.0 | -1 |
getIcon Returns a tooltip for the link. | @Override
public String getTooltip() {
return TOOLTIP;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Icon getIcon();",
"@Override\n\tpublic ToolIconURL getIconURL() {\n\t\treturn iconURL;\n\t}",
"java.lang.String getIcon();",
"java.lang.String getIcon();",
"public URL getIcon()\r\n {\r\n\treturn icon;\r\n }",
"public String getIcon() {\n\t\treturn \"icon\";\n\t}",
"String getIcon();",
"String ... | [
"0.6680081",
"0.65936995",
"0.6571954",
"0.6571954",
"0.6549641",
"0.6533488",
"0.6495244",
"0.6495244",
"0.6486",
"0.63060904",
"0.6246362",
"0.6245991",
"0.6240288",
"0.61348104",
"0.60430944",
"0.6035605",
"0.602051",
"0.60138416",
"0.60138416",
"0.60138416",
"0.60138416",... | 0.6114658 | 14 |
getTooltip Returns a string representation of the link's content. | @Override
public String toString() {
int sourceSize = (getSource() != null) ? getSource().size() : 0;
int targetSize = (getTarget() != null) ? getTarget().size() : 0;
InstanceInfo info = new InstanceInfo(this);
info.add(super.toString());
info.add(Constant.COMMA_BLANK);
info.addAttribute(SOURCE_SIZE, sourceSize);
info.addAttribute(TARGET_SIZE, targetSize);
return info.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getTooltip() {\n return mTooltip;\n }",
"public String getTooltip() {\n\t\treturn tooltip;\n\t}",
"public static String getToolTipText() {\n\t\treturn (toolTipText);\n\t}",
"@Override\n public StringTextComponent getTooltip() {\n return this.tooltip;\n }",
... | [
"0.7245518",
"0.70698035",
"0.70540565",
"0.69796365",
"0.6936128",
"0.6926207",
"0.6911429",
"0.685355",
"0.6780203",
"0.67603725",
"0.67266756",
"0.671017",
"0.66136384",
"0.6543905",
"0.6478638",
"0.6410121",
"0.6393762",
"0.63927424",
"0.6368449",
"0.6315382",
"0.6299086"... | 0.0 | -1 |
Update the stock transfered in database | private void updateStocks(StockTransferTransactionRequest item) {
Integer updatedQuantity = item.getQuantity();
StockTraderServiceFactoryIF serviceFactory = new StockTraderServiceFactory();
DematServiceIF dematService = serviceFactory.dematService();
Optional<Integer> oldQuantity = dematService.getStockStatus(item.getUserName(),
item.getStock());
if(oldQuantity != null && oldQuantity.get() > 0) {
updatedQuantity = oldQuantity.get() + item.getQuantity();
}
try(Connection conn = DriverManager.getConnection(Constants.DB_URL,
Constants.USER,
Constants.PASS);
PreparedStatement stmt = conn.prepareStatement(
Constants.MERGE_STOCK)) {
stmt.setString(1, item.getUserName());
stmt.setString(2, item.getStock().toString());
stmt.setInt(3, updatedQuantity);
stmt.execute();
} catch (SQLException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void updateStock(Stock s) {\n\n\t\ttry {\n\t String sql = \"INSERT or Replace into stockTable (hlr,sim,card,easyL,easyLR,easyP,easyPR,cash) \"\n\t \t\t+ \"VALUES (?,?,?,?,?,?,?,?)\";\n\t \n\t prepStmt = connection.prepareStatement(sql);\n\t prepStmt.... | [
"0.720802",
"0.71188146",
"0.68693084",
"0.68623453",
"0.6860469",
"0.6785983",
"0.67055017",
"0.66330695",
"0.6615943",
"0.6562656",
"0.6562656",
"0.6526694",
"0.65137154",
"0.65016377",
"0.6447136",
"0.64348257",
"0.6428349",
"0.63832545",
"0.63795483",
"0.6339764",
"0.6329... | 0.79589254 | 0 |
since this code is built against java 1.6 cant use a string in a switch case so have to use if else... | public static INLPProcessor initNLPProcessor(Class nlpFramework){
if(nlpFramework.getCanonicalName().equalsIgnoreCase("com.data.processors.OpenNLPProcessor")){
return new OpenNLPProcessor();
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String visit(SwitchStmt n, Object arg) {\n return null;\n }",
"@Override\n public String visit(SwitchExpr n, Object arg) {\n return null;\n }",
"@Override\n public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, Resour... | [
"0.61053425",
"0.6064415",
"0.6036314",
"0.60305154",
"0.60151786",
"0.6002757",
"0.59202516",
"0.5915301",
"0.5794267",
"0.57661307",
"0.57589823",
"0.5719485",
"0.5702922",
"0.5669481",
"0.5662932",
"0.5653723",
"0.5646944",
"0.56455714",
"0.56315494",
"0.56044734",
"0.5603... | 0.0 | -1 |
Metodo para limpiar tabla completamente y evitar que se mezclen registros | public void limpiartabla(JTable listaempleados){
modelo = (DefaultTableModel) listaempleados.getModel();
while(modelo.getRowCount()>0)modelo.removeRow(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Tablero consultarTablero();",
"private EstabelecimentoTable() {\n\t\t\t}",
"void prepareTables();",
"public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel... | [
"0.66364527",
"0.6622994",
"0.6617216",
"0.66113",
"0.65709513",
"0.6534935",
"0.6527364",
"0.6513902",
"0.6479109",
"0.64456934",
"0.64425534",
"0.6428465",
"0.6411281",
"0.64066285",
"0.6388567",
"0.63787514",
"0.63521564",
"0.63302094",
"0.6266195",
"0.6257273",
"0.6239617... | 0.0 | -1 |
Metodo que forma nuestra tablaempleados usando el select recogido en ProductosDatos | public DefaultTableModel tablaempleados(JTable listaempleados)throws SQLException{
Connection conexion = null;
limpiartabla(listaempleados);
try{
conexion = GestionSQL.openConnection();
if(conexion.getAutoCommit()){
conexion.setAutoCommit(false);
}
DefaultTableModel modelo = (DefaultTableModel) listaempleados.getModel();
EmpleadosDatos empleadodatos = new EmpleadosDatos();
List<Empleado>empleados = empleadodatos.select();
datosfila = new Object[modelo.getColumnCount()];
//La tabla de se llena mediante un FOR usando la lista de objectos empleado traida desde metodo select
for(int i = 0; i<empleados.size(); i++){
datosfila[0]=empleados.get(i).getIdempleado();
datosfila[1]=empleados.get(i).getNombre();
datosfila[2]=empleados.get(i).getDNI();
datosfila[3]=empleados.get(i).getTelefono();
datosfila[4]=empleados.get(i).getEmail();
modelo.addRow(datosfila);
}
}catch(SQLException e){
System.out.println("Error en listadoempleados: "+e);
System.out.println("Entramos al rollback ¿Whynot?");
try{
conexion.rollback();
}catch(SQLException ex){
ex.printStackTrace();
System.out.println("Error en rollback");
}finally{
if(conexion != null){
conexion.close();
}
}
}
//retornamos el modelo que es el aspecto y los datos que le daremos a la tabla
return modelo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void llenar_tabla() {\n \n try {\n DefaultTableModel modelo;\n conexion cnx = new conexion();\n Connection registros = cnx.conexion();\n String[] nombre_atributos = {\"id_producto\", \"nombre\",\"id_categoria\"};\n String sql = (\"SELECT *FRO... | [
"0.7448676",
"0.71476233",
"0.7110609",
"0.7063502",
"0.7035647",
"0.69687974",
"0.6955667",
"0.69260997",
"0.683008",
"0.68252236",
"0.6801255",
"0.6785039",
"0.67708015",
"0.675181",
"0.6740188",
"0.67388946",
"0.67237633",
"0.67221385",
"0.6707901",
"0.6696837",
"0.6690830... | 0.0 | -1 |
Metodo para modificar el email y/o telefono de los empleados usando su id | public void modificarempleado(Empleado empleado)throws SQLException{
Connection conexion = null;
try{
conexion = GestionSQL.openConnection();
if(conexion.getAutoCommit()){
conexion.setAutoCommit(false);
}
EmpleadosDatos empleadodatos = new EmpleadosDatos();
empleadodatos.update(empleado);
conexion.commit();
System.out.println("Empleado modificado con exito");
}catch(SQLException e){
System.out.println("Error en modificacion de empleado");
e.printStackTrace();
try{
conexion.rollback();
}catch(SQLException ex){
ex.printStackTrace();
System.out.println("Error en rollback, vamos a morir todos");
ex.printStackTrace();
}
}finally{
if(conexion != null){
conexion.close();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void actualizarUsuario(Integer id, String nombre, long documento, String email, Boolean activo) throws Exception;",
"public void alterar() {\n //metodo para alterar\n String sql = \"UPDATE empresa SET empresa = ?, cnpj = ?, \"\n + \"endereco = ?, telefone = ?, email = ? WHERE ... | [
"0.71661204",
"0.7155286",
"0.7141362",
"0.70250356",
"0.68421197",
"0.6797204",
"0.6736452",
"0.67085654",
"0.6699466",
"0.64790136",
"0.646468",
"0.6414772",
"0.6399838",
"0.6390589",
"0.63222617",
"0.6303946",
"0.6290585",
"0.6289802",
"0.6285684",
"0.62812287",
"0.6269825... | 0.60315704 | 39 |
Metodo para borrar empleado de la BD usando su id | public void borrarempleado(Empleado empleado)throws SQLException{
Connection conexion = null;
try{
conexion = GestionSQL.openConnection();
if(conexion.getAutoCommit()){
conexion.setAutoCommit(false);
}
EmpleadosDatos empleadodatos = new EmpleadosDatos();
empleadodatos.delete(empleado);
conexion.commit();
System.out.println("Empleado borrado");
}catch(SQLException e){
System.out.println("Error en borrado, entramos a rollback");
try{
conexion.rollback();
}catch(SQLException ex){
System.out.println("Error en rollback");
}
}finally{
if(conexion != null){
conexion.close();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void eliminarUsuario(Long idUsuario);",
"public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMe... | [
"0.72643286",
"0.7218365",
"0.71670735",
"0.71446216",
"0.7084288",
"0.70727557",
"0.7053698",
"0.70194817",
"0.6998552",
"0.69452214",
"0.6896681",
"0.68701524",
"0.686308",
"0.685931",
"0.68549883",
"0.68129885",
"0.6803724",
"0.68029565",
"0.68021643",
"0.67923844",
"0.678... | 0.7192038 | 2 |
Default constructor (Does nothing) | public ImageConverter() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"void DefaultConstructor(){}",
"defaultConstructor(){}",
"private Default()\n {}",
"public Generic(){\n\t\tthis(null);\n\t}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\"... | [
"0.8369692",
"0.82552683",
"0.8208076",
"0.78901327",
"0.7505341",
"0.7494133",
"0.7429229",
"0.7421201",
"0.740558",
"0.736747",
"0.7292775",
"0.72145694",
"0.7188558",
"0.7131721",
"0.7120169",
"0.70707107",
"0.70570374",
"0.7055906",
"0.7048026",
"0.7043545",
"0.7043545",
... | 0.0 | -1 |
Converts an Image to a GrayImage | public static GrayImage toGray(Image img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
if (img instanceof GrayImage) {
return toGray((GrayImage) img);
} else if (img instanceof RealGrayImage) {
return toGray((RealGrayImage) img);
} else if (img instanceof ColorImage) {
return toGray((ColorImage) img);
} else if (img instanceof RealColorImage) {
return toGray((RealColorImage) img);
} else {
return toGray((ComplexImage) img);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static BufferedImage getGrayScale(BufferedImage inputImage) {\n BufferedImage img = new BufferedImage(inputImage.getWidth(), inputImage.getHeight(),\n BufferedImage.TYPE_BYTE_GRAY);\n Graphics g = img.getGraphics();\n g.drawImage(inputImage,... | [
"0.7833978",
"0.7623466",
"0.76065904",
"0.74408877",
"0.73783726",
"0.7283563",
"0.72810656",
"0.7190784",
"0.7122525",
"0.70247376",
"0.69810075",
"0.6890209",
"0.6876261",
"0.6863352",
"0.67848253",
"0.6700197",
"0.6510964",
"0.6505058",
"0.64585286",
"0.64092654",
"0.6363... | 0.7263846 | 7 |
Converts an Image to a RealGrayImage | public static RealGrayImage toRealGray(Image img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
if (img instanceof GrayImage) {
return toRealGray((GrayImage) img);
} else if (img instanceof RealGrayImage) {
return toRealGray((RealGrayImage) img);
} else if (img instanceof ColorImage) {
return toRealGray((ColorImage) img);
} else if (img instanceof RealColorImage) {
return toRealGray((RealColorImage) img);
} else {
return toRealGray((ComplexImage) img);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealGrayImage toRealGray(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealGrayImage newimg = new RealGrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, img.get(x, y));\n\t\t\t}\n\t\t}\n\t\treturn newimg;\n\t}",
... | [
"0.8336501",
"0.82492745",
"0.78515035",
"0.7851327",
"0.7771355",
"0.7738514",
"0.7716189",
"0.7669337",
"0.7228532",
"0.712789",
"0.6923764",
"0.6878685",
"0.683901",
"0.680184",
"0.6788546",
"0.67771477",
"0.6729309",
"0.6717705",
"0.66157866",
"0.6585706",
"0.6585147",
... | 0.80098665 | 2 |
Converts an Image to a ColorImage | public static ColorImage toColor(Image img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
if (img instanceof GrayImage) {
return toColor((GrayImage) img);
} else if (img instanceof RealGrayImage) {
return toColor((RealGrayImage) img);
} else if (img instanceof ColorImage) {
return toColor((ColorImage) img);
} else if (img instanceof RealColorImage) {
return toColor((RealColorImage) img);
} else {
return toColor((ComplexImage) img);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ColorImage toColor(ColorImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tColorImage newimg = null;\n\t\tnewimg = new ColorImage(X, Y);\n\t\tnewimg.setColorModel(img.getColorModel());\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, img.get... | [
"0.7942161",
"0.75422615",
"0.7368646",
"0.73220706",
"0.7195428",
"0.69078726",
"0.67145014",
"0.64546657",
"0.62388337",
"0.6212763",
"0.6197345",
"0.6189294",
"0.60952663",
"0.6084977",
"0.6067005",
"0.6041156",
"0.6011418",
"0.5989035",
"0.5965543",
"0.59522766",
"0.58893... | 0.74004304 | 2 |
Converts an Image to a RealColorImage | public static RealColorImage toRealColor(Image img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
if (img instanceof GrayImage) {
return toRealColor((GrayImage) img);
} else if (img instanceof RealGrayImage) {
return toRealColor((RealGrayImage) img);
} else if (img instanceof ColorImage) {
return toRealColor((ColorImage) img);
} else if (img instanceof RealColorImage) {
return toRealColor((RealColorImage) img);
} else {
return toRealColor((ComplexImage) img);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(ColorImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tint[] icolor = new int[3];\n\t\tRealColorImage newimg = null;\n\t\tnewimg = new RealColorImage(X, Y);\n\t\tnewimg.setColorModel(img.getColorModel());\n\t\tfor (int y = 0; y... | [
"0.8310089",
"0.8149541",
"0.7959516",
"0.7857532",
"0.78256834",
"0.78108466",
"0.74595106",
"0.72936684",
"0.69709605",
"0.67350185",
"0.672775",
"0.6714298",
"0.6704838",
"0.6647896",
"0.6627138",
"0.6528281",
"0.6482928",
"0.63335985",
"0.62970614",
"0.6294165",
"0.629392... | 0.7564904 | 6 |
Converts an Image to a ComplexImage | public static ComplexImage toComplex(Image img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
if (img instanceof GrayImage) {
return toComplex((GrayImage) img);
} else if (img instanceof RealGrayImage) {
return toComplex((RealGrayImage) img);
} else if (img instanceof ColorImage) {
return toComplex((ColorImage) img);
} else if (img instanceof RealColorImage) {
return toComplex((RealColorImage) img);
} else {
return toComplex((ComplexImage) img);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ComplexImage toComplex(ComplexImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tComplexImage newimg = null;\n\t\tnewimg = new ComplexImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.setReal(x, y, img.getReal(x, y));\n\t\t\t\tnewimg.setIm... | [
"0.7897978",
"0.74313337",
"0.7207492",
"0.71376795",
"0.7095621",
"0.63902414",
"0.6260333",
"0.61534816",
"0.6106841",
"0.6094226",
"0.5782425",
"0.57786506",
"0.5566186",
"0.55481744",
"0.5526237",
"0.54961246",
"0.54747266",
"0.5453244",
"0.5421473",
"0.5384123",
"0.53685... | 0.74905556 | 1 |
Copies a GrayImage to form a new GrayImage. | public static GrayImage toGray(GrayImage img) {
int X = img.X();
int Y = img.Y();
GrayImage newimg = new GrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, img.get(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static BufferedImage getGrayScale(BufferedImage inputImage) {\n BufferedImage img = new BufferedImage(inputImage.getWidth(), inputImage.getHeight(),\n BufferedImage.TYPE_BYTE_GRAY);\n Graphics g = img.getGraphics();\n g.drawImage(inputImage,... | [
"0.66498464",
"0.6477378",
"0.64327246",
"0.6337437",
"0.6301257",
"0.6285824",
"0.6173975",
"0.61293215",
"0.6029274",
"0.5983422",
"0.5924325",
"0.5921727",
"0.5874179",
"0.5832716",
"0.58119893",
"0.5788399",
"0.5780165",
"0.57631594",
"0.57595986",
"0.57568777",
"0.575201... | 0.69736874 | 0 |
Converts a BinaryImage to a GrayImage | public static GrayImage toGray(BinaryImage img) {
int X = img.X();
int Y = img.Y();
GrayImage newimg = new GrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
if ((int) img.get(x, y) == 0)
newimg.set(x, y, 0);
else
newimg.set(x, y, 255);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int binaryToGray(int num) { return (num >>> 1) ^ num; }",
"public static GrayImage toGray(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tGrayImage newimg = new GrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, (... | [
"0.7205129",
"0.6996914",
"0.68688506",
"0.68242425",
"0.68019116",
"0.67329466",
"0.66495275",
"0.64879274",
"0.6357478",
"0.63517165",
"0.6292849",
"0.62526375",
"0.62447983",
"0.6209636",
"0.61951864",
"0.6163945",
"0.6129583",
"0.60634494",
"0.60455036",
"0.60412747",
"0.... | 0.809203 | 0 |
Converts a RealGrayImage to a GrayImage | public static GrayImage toGray(RealGrayImage img) {
int X = img.X();
int Y = img.Y();
GrayImage newimg = new GrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, (short) img.get(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealGrayImage toRealGray(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealGrayImage newimg = new RealGrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, img.get(x, y));\n\t\t\t}\n\t\t}\n\t\treturn newimg;\n\t}",
... | [
"0.8497793",
"0.80680686",
"0.7813711",
"0.78018594",
"0.7695945",
"0.76695627",
"0.7564981",
"0.7556177",
"0.7426256",
"0.70291036",
"0.7025832",
"0.70166475",
"0.6925392",
"0.6896109",
"0.68901694",
"0.68265295",
"0.68193924",
"0.6759341",
"0.66511",
"0.6582029",
"0.6509647... | 0.8287119 | 1 |
Converts an ColorImage to a GrayImage. Uses the following formula for calculation: gray value = (int)(red_value 0.299 + green_value 0.587 + blue_value 0.114) | public static GrayImage toGray(ColorImage img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
int X = img.X();
int Y = img.Y();
int[] color = new int[3];
int gray;
GrayImage newimg = null;
switch (img.getColorModel()) {
case ColorImage.RGB:
newimg = new GrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
color = img.get(x, y);
gray = (int) ((double) color[0] * 0.299 + (double) color[1] * 0.587 + (double) color[2] * 0.114);
newimg.set(x, y, gray);
}
}
break;
case ColorImage.CMY:
case ColorImage.YIQ:
case ColorImage.HSV:
case ColorImage.HLS:
throw new ColorModelNotSupportedException();
default:
throw new ColorModelUnknownException();
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BufferedImage RGB2GRAYSCALE() {\r\n\t\t\r\n\t\tdestImg = new BufferedImage(W, H, BufferedImage.TYPE_BYTE_GRAY);\r\n\t\tdestRaster = destImg.getRaster();\r\n\t\t\r\n\t\tfor(int row=0; row < H; row++) {\r\n\t\t\tfor(int col=0; col < W; col++) {\r\n\t\t\t\tfloat gray = 0;\r\n\t\t\t\tfor(int band=0; band<srcRas... | [
"0.71958053",
"0.71915084",
"0.7153634",
"0.712466",
"0.70532244",
"0.68662095",
"0.6826572",
"0.66876596",
"0.66138077",
"0.648518",
"0.6448577",
"0.64167625",
"0.6321249",
"0.6273656",
"0.6246107",
"0.6234385",
"0.6185621",
"0.6165242",
"0.6126579",
"0.6063372",
"0.60362774... | 0.6808102 | 7 |
Converts an RealColorImage to a GrayImage. Uses the following formula for calculation: gray value = (int)(red_value 0.299 + green_value 0.587 + blue_value 0.114) | public static GrayImage toGray(RealColorImage img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
int X = img.X();
int Y = img.Y();
float[] color = new float[3];
int gray;
GrayImage newimg = null;
switch (img.getColorModel()) {
case ColorImage.RGB:
newimg = new GrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
color = img.get(x, y);
gray = (int) (color[0] * 0.299 + color[1] * 0.587 + color[2] * 0.114);
newimg.set(x, y, gray);
}
}
break;
case ColorImage.CMY:
case ColorImage.YIQ:
case ColorImage.HSV:
case ColorImage.HLS:
throw new ColorModelNotSupportedException();
default:
throw new ColorModelUnknownException();
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tfloat gray;\n\t\tRealColorImage newimg = new RealColorImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);... | [
"0.7539967",
"0.75027645",
"0.7399723",
"0.7226301",
"0.7060517",
"0.7045929",
"0.7033008",
"0.6999505",
"0.6990598",
"0.696048",
"0.6924167",
"0.67787033",
"0.6753394",
"0.6723318",
"0.6685698",
"0.6603418",
"0.6600652",
"0.65646714",
"0.6538671",
"0.65261734",
"0.64955115",... | 0.71110934 | 4 |
Converts an ComplexImage to a GrayImage. Just throws away the imaginary part of the complex image. | public static GrayImage toGray(ComplexImage img) {
int X = img.X();
int Y = img.Y();
GrayImage newimg = null;
newimg = new GrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, (int) img.getReal(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealGrayImage toRealGray(ComplexImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealGrayImage newimg = null;\n\t\tnewimg = new RealGrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, img.getReal(x, y));\n\t\t\t}\n\t\t}\n\t\t... | [
"0.776779",
"0.74342155",
"0.7344059",
"0.69146544",
"0.6687242",
"0.66863155",
"0.661048",
"0.6539228",
"0.64494836",
"0.6412695",
"0.6356414",
"0.62665504",
"0.6257219",
"0.61983925",
"0.6194952",
"0.61843306",
"0.618035",
"0.6177579",
"0.6086458",
"0.6022815",
"0.5939348",... | 0.84619296 | 0 |
Converts an GrayImage to a RealGrayImage | public static RealGrayImage toRealGray(GrayImage img) {
int X = img.X();
int Y = img.Y();
RealGrayImage newimg = new RealGrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, (float) img.get(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealGrayImage toRealGray(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealGrayImage newimg = new RealGrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, img.get(x, y));\n\t\t\t}\n\t\t}\n\t\treturn newimg;\n\t}",
... | [
"0.8587625",
"0.7919913",
"0.790885",
"0.7901528",
"0.7887143",
"0.7851263",
"0.77716064",
"0.76512545",
"0.70277095",
"0.69279313",
"0.69266135",
"0.6788941",
"0.6715673",
"0.6567234",
"0.64992434",
"0.6498429",
"0.6336164",
"0.62465227",
"0.62435853",
"0.6241609",
"0.618742... | 0.8609751 | 0 |
Converts a RealGrayImage to a RealGrayImage | public static RealGrayImage toRealGray(RealGrayImage img) {
int X = img.X();
int Y = img.Y();
RealGrayImage newimg = new RealGrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, img.get(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealGrayImage toRealGray(GrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealGrayImage newimg = new RealGrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, (float) img.get(x, y));\n\t\t\t}\n\t\t}\n\t\treturn newimg;\n\t}... | [
"0.84286344",
"0.80323845",
"0.784206",
"0.7829642",
"0.7785133",
"0.77483577",
"0.7722892",
"0.74813056",
"0.6996566",
"0.697725",
"0.6761562",
"0.6652751",
"0.6609191",
"0.6594575",
"0.65575236",
"0.6545868",
"0.6525927",
"0.65119255",
"0.6413849",
"0.6375653",
"0.63280123"... | 0.8633919 | 0 |
Converts a ColorImage to a RealGrayImage. Uses the following formula for calculation: gray value = (float)(red_value 0.299 + green_value 0.587 + blue_value 0.114) | public static RealGrayImage toRealGray(ColorImage img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
int X = img.X();
int Y = img.Y();
int[] color = new int[3];
float gray;
RealGrayImage newimg = null;
switch (img.getColorModel()) {
case ColorImage.RGB:
newimg = new RealGrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
color = img.get(x, y);
gray = (float) color[0] * 0.299f + (float) color[1] * 0.587f + (float) color[2]
* 0.114f;
newimg.set(x, y, gray);
}
}
break;
case ColorImage.CMY:
case ColorImage.YIQ:
case ColorImage.HSV:
case ColorImage.HLS:
throw new ColorModelNotSupportedException();
default:
throw new ColorModelUnknownException();
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tfloat gray;\n\t\tRealColorImage newimg = new RealColorImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);... | [
"0.7709912",
"0.7704281",
"0.74312264",
"0.7373645",
"0.71113354",
"0.7035516",
"0.70208216",
"0.6999043",
"0.6955295",
"0.6948454",
"0.6866252",
"0.68562573",
"0.68146443",
"0.67250633",
"0.6686131",
"0.6668824",
"0.665042",
"0.66460884",
"0.66295666",
"0.66186017",
"0.65820... | 0.73393655 | 4 |
Converts a RealColorImage to a RealGrayImage. Uses the following formula for calculation: gray value = (float)(red_value 0.299 + green_value 0.587 + blue_value 0.114) | public static RealGrayImage toRealGray(RealColorImage img)
throws ColorModelNotSupportedException, ColorModelUnknownException {
int X = img.X();
int Y = img.Y();
float[] color = new float[3];
float gray;
RealGrayImage newimg = null;
switch (img.getColorModel()) {
case ColorImage.RGB:
newimg = new RealGrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
color = img.get(x, y);
gray = color[0] * 0.299f + color[1] * 0.587f + color[2] * 0.114f;
newimg.set(x, y, gray);
}
}
break;
case ColorImage.CMY:
case ColorImage.YIQ:
case ColorImage.HSV:
case ColorImage.HLS:
throw new ColorModelNotSupportedException();
default:
throw new ColorModelUnknownException();
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tfloat gray;\n\t\tRealColorImage newimg = new RealColorImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);... | [
"0.7814668",
"0.76929283",
"0.73927426",
"0.7256043",
"0.72291297",
"0.7167337",
"0.71040857",
"0.70874286",
"0.7049825",
"0.6953926",
"0.6906445",
"0.6888231",
"0.6834258",
"0.67770886",
"0.6767142",
"0.67378",
"0.6721685",
"0.65925103",
"0.647083",
"0.64458543",
"0.6372732"... | 0.7482005 | 2 |
Converts a ComplexImage to a RealGrayImage | public static RealGrayImage toRealGray(ComplexImage img) {
int X = img.X();
int Y = img.Y();
RealGrayImage newimg = null;
newimg = new RealGrayImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, img.getReal(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static GrayImage toGray(ComplexImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tGrayImage newimg = null;\n\t\tnewimg = new GrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, (int) img.getReal(x, y));\n\t\t\t}\n\t\t}\n\t\treturn new... | [
"0.79037625",
"0.7712259",
"0.7592379",
"0.72216266",
"0.7168589",
"0.7087834",
"0.70038635",
"0.6962647",
"0.69107574",
"0.68958676",
"0.68369544",
"0.67314005",
"0.6659708",
"0.6589824",
"0.64811033",
"0.6459463",
"0.6396026",
"0.6340708",
"0.62805265",
"0.6279558",
"0.6156... | 0.8677705 | 0 |
Converts a GrayImage to a ColorImage. Each plane of the color image has the same value in every pixel. | public static ColorImage toColor(GrayImage img) {
int X = img.X();
int Y = img.Y();
int[] color = new int[3];
int gray;
ColorImage newimg = new ColorImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = img.get(x, y);
color[0] = gray;
color[1] = gray;
color[2] = gray;
newimg.set(x, y, color);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ColorImage toColor(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tint[] color = new int[3];\n\t\tfloat gray;\n\t\tColorImage newimg = new ColorImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);\n\t\t\t\tcolor[0] =... | [
"0.7498243",
"0.70117486",
"0.6872367",
"0.674546",
"0.6739472",
"0.67118424",
"0.6358699",
"0.6322501",
"0.62557334",
"0.613397",
"0.61126256",
"0.5997728",
"0.5996459",
"0.59436554",
"0.5890316",
"0.58525294",
"0.5820113",
"0.581861",
"0.5698821",
"0.56968236",
"0.563243",
... | 0.76650804 | 0 |
Converts a RealGrayImage to a ColorImage. Each plane of the color image has the same value in every pixel. | public static ColorImage toColor(RealGrayImage img) {
int X = img.X();
int Y = img.Y();
int[] color = new int[3];
float gray;
ColorImage newimg = new ColorImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = img.get(x, y);
color[0] = (int) gray;
color[1] = (int) gray;
color[2] = (int) gray;
newimg.set(x, y, color);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tfloat gray;\n\t\tRealColorImage newimg = new RealColorImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);... | [
"0.8154642",
"0.8035639",
"0.7707396",
"0.7538144",
"0.7409241",
"0.7359763",
"0.6903233",
"0.687002",
"0.6863707",
"0.6829024",
"0.67499745",
"0.66346234",
"0.63582164",
"0.6323653",
"0.6284069",
"0.6276719",
"0.6263919",
"0.59674865",
"0.59400284",
"0.585556",
"0.5771726",
... | 0.793127 | 2 |
Copies a ColorImage to form a new ColorImage | public static ColorImage toColor(ColorImage img) {
int X = img.X();
int Y = img.Y();
ColorImage newimg = null;
newimg = new ColorImage(X, Y);
newimg.setColorModel(img.getColorModel());
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, img.get(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }",
"public void updateImage(ColorImage newImage) {\n currentImage.push(newImage);\n }",
"public HTColorImage(HTColorImage htImage)\n\t{\n\t\timg = HTUtil.getCopy(htImage.getImage());\n\t}",
"@SuppressWarnings(\"unused\"... | [
"0.7081708",
"0.7053027",
"0.6770043",
"0.6682333",
"0.66303325",
"0.6493876",
"0.645452",
"0.63441694",
"0.629907",
"0.62821525",
"0.62087226",
"0.61328655",
"0.61256814",
"0.6042677",
"0.60322934",
"0.60318947",
"0.60310096",
"0.6018373",
"0.6009657",
"0.5962711",
"0.595759... | 0.70963484 | 0 |
Converts a RealColorImage to a ColorImage | public static ColorImage toColor(RealColorImage img) {
int X = img.X();
int Y = img.Y();
float[] color = new float[3];
int[] icolor = new int[3];
ColorImage newimg = null;
newimg = new ColorImage(X, Y);
newimg.setColorModel(img.getColorModel());
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
color = img.get(x, y);
icolor[0] = (int) color[0];
icolor[1] = (int) color[1];
icolor[2] = (int) color[2];
newimg.set(x, y, icolor);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(ColorImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tint[] icolor = new int[3];\n\t\tRealColorImage newimg = null;\n\t\tnewimg = new RealColorImage(X, Y);\n\t\tnewimg.setColorModel(img.getColorModel());\n\t\tfor (int y = 0; y... | [
"0.83574617",
"0.81832814",
"0.7976771",
"0.79482764",
"0.7947786",
"0.7880462",
"0.7722299",
"0.76271373",
"0.7490543",
"0.7105539",
"0.7043918",
"0.69051015",
"0.6654976",
"0.6478337",
"0.6440011",
"0.64106655",
"0.6379531",
"0.6362354",
"0.60722333",
"0.60695446",
"0.60451... | 0.83807653 | 0 |
Converts a ComplexImage to a ColorImage. Uses only the real plane of the complex image. | public static ColorImage toColor(ComplexImage img) {
int X = img.X();
int Y = img.Y();
ColorImage newimg = null;
newimg = new ColorImage(X, Y);
int[] color = new int[3];
int gray;
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = (int) img.getReal(x, y);
color[0] = gray;
color[1] = gray;
color[2] = gray;
newimg.set(x, y, color);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(ComplexImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealColorImage newimg = null;\n\t\tnewimg = new RealColorImage(X, Y);\n\t\tfloat[] color = new float[3];\n\t\tfloat gray;\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgr... | [
"0.78693",
"0.7337752",
"0.71710575",
"0.70748246",
"0.6983554",
"0.6952437",
"0.6851547",
"0.67979854",
"0.6766245",
"0.67117727",
"0.6696858",
"0.6523207",
"0.6386804",
"0.63455856",
"0.6302786",
"0.62882584",
"0.6276972",
"0.62615263",
"0.6205552",
"0.5740878",
"0.56446016... | 0.83367854 | 0 |
Converts a GrayImage to a RealColorImage. Each plane of the color image has the same value in every pixel. | public static RealColorImage toRealColor(GrayImage img) {
int X = img.X();
int Y = img.Y();
float[] color = new float[3];
float gray;
RealColorImage newimg = new RealColorImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = (float) img.get(x, y);
color[0] = gray;
color[1] = gray;
color[2] = gray;
newimg.set(x, y, color);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tfloat gray;\n\t\tRealColorImage newimg = new RealColorImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);... | [
"0.8037676",
"0.76118785",
"0.7566161",
"0.74915403",
"0.74713844",
"0.73557854",
"0.71013653",
"0.70211405",
"0.6702303",
"0.65099186",
"0.64385164",
"0.64271957",
"0.64021003",
"0.61042064",
"0.59772605",
"0.58234376",
"0.5774573",
"0.563268",
"0.563268",
"0.56313515",
"0.5... | 0.81377375 | 0 |
Converts a RealGrayImage to a RealColorImage. Each plane of the color image has the same value in every pixel. | public static RealColorImage toRealColor(RealGrayImage img) {
int X = img.X();
int Y = img.Y();
float[] color = new float[3];
float gray;
RealColorImage newimg = new RealColorImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = img.get(x, y);
color[0] = gray;
color[1] = gray;
color[2] = gray;
newimg.set(x, y, color);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(GrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tfloat gray;\n\t\tRealColorImage newimg = new RealColorImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = (float) img.get(x,... | [
"0.8128961",
"0.77349806",
"0.7620562",
"0.752106",
"0.75151896",
"0.7513888",
"0.72435457",
"0.7153744",
"0.67653495",
"0.6580388",
"0.6521188",
"0.6467524",
"0.6343182",
"0.6178535",
"0.61166066",
"0.5785107",
"0.56902254",
"0.5659768",
"0.56292313",
"0.546083",
"0.545965",... | 0.81740344 | 0 |
Converts a ColorImage to a RealColorImage. | public static RealColorImage toRealColor(ColorImage img) {
int X = img.X();
int Y = img.Y();
float[] color = new float[3];
int[] icolor = new int[3];
RealColorImage newimg = null;
newimg = new RealColorImage(X, Y);
newimg.setColorModel(img.getColorModel());
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
icolor = img.get(x, y);
color[0] = (float) icolor[0];
color[1] = (float) icolor[1];
color[2] = (float) icolor[2];
newimg.set(x, y, color);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(RealColorImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealColorImage newimg = null;\n\t\tnewimg = new RealColorImage(X, Y);\n\t\tnewimg.setColorModel(img.getColorModel());\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewi... | [
"0.8266217",
"0.8046225",
"0.8005178",
"0.80040234",
"0.7923148",
"0.778031",
"0.7536891",
"0.73371065",
"0.70539135",
"0.6772653",
"0.67209786",
"0.66422063",
"0.6574405",
"0.65192604",
"0.65088266",
"0.6485194",
"0.6306829",
"0.6239488",
"0.61997956",
"0.61568946",
"0.61566... | 0.8526883 | 0 |
Converts a RealColorImage to a RealColorImage | public static RealColorImage toRealColor(RealColorImage img) {
int X = img.X();
int Y = img.Y();
RealColorImage newimg = null;
newimg = new RealColorImage(X, Y);
newimg.setColorModel(img.getColorModel());
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.set(x, y, img.get(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealColorImage toRealColor(ColorImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tint[] icolor = new int[3];\n\t\tRealColorImage newimg = null;\n\t\tnewimg = new RealColorImage(X, Y);\n\t\tnewimg.setColorModel(img.getColorModel());\n\t\tfor (int y = 0; y... | [
"0.8454933",
"0.8141358",
"0.8123837",
"0.81220204",
"0.80963147",
"0.76031613",
"0.7497332",
"0.7171662",
"0.70333153",
"0.6803495",
"0.6774284",
"0.6751344",
"0.6679906",
"0.6557685",
"0.6475548",
"0.6383899",
"0.6343021",
"0.6318003",
"0.63014793",
"0.62806773",
"0.615159"... | 0.8505006 | 0 |
Converts a ComplexImage to a RealColorImage. Uses only the real plane of the complex image. | public static RealColorImage toRealColor(ComplexImage img) {
int X = img.X();
int Y = img.Y();
RealColorImage newimg = null;
newimg = new RealColorImage(X, Y);
float[] color = new float[3];
float gray;
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = img.getReal(x, y);
color[0] = gray;
color[1] = gray;
color[2] = gray;
newimg.set(x, y, color);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RealGrayImage toRealGray(ComplexImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealGrayImage newimg = null;\n\t\tnewimg = new RealGrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, img.getReal(x, y));\n\t\t\t}\n\t\t}\n\t\t... | [
"0.7576511",
"0.750887",
"0.7417605",
"0.7365594",
"0.7285409",
"0.70667523",
"0.70044553",
"0.70002806",
"0.6931345",
"0.6879771",
"0.68603826",
"0.6692845",
"0.659409",
"0.6461868",
"0.6146472",
"0.6077373",
"0.6050742",
"0.58781105",
"0.57560164",
"0.5649987",
"0.55791146"... | 0.8557981 | 0 |
Converts a GrayImage to a ComplexImage | public static ComplexImage toComplex(GrayImage img) {
int X = img.X();
int Y = img.Y();
float gray;
ComplexImage newimg = new ComplexImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = (float) img.get(x, y);
newimg.setReal(x, y, gray);
newimg.setImag(x, y, 0f);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ComplexImage toComplex(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat gray;\n\t\tComplexImage newimg = new ComplexImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);\n\t\t\t\tnewimg.setReal(x, y, gray);\n\t\t... | [
"0.8140584",
"0.76192933",
"0.74958545",
"0.7409401",
"0.7267628",
"0.7234217",
"0.70498854",
"0.6689444",
"0.6680128",
"0.5827828",
"0.56823575",
"0.56533676",
"0.56522334",
"0.56393266",
"0.5623768",
"0.56230646",
"0.56132334",
"0.56132334",
"0.5581499",
"0.55788094",
"0.55... | 0.81940806 | 0 |
Converts a RealGrayImage to a ComplexImage | public static ComplexImage toComplex(RealGrayImage img) {
int X = img.X();
int Y = img.Y();
float gray;
ComplexImage newimg = new ComplexImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
gray = img.get(x, y);
newimg.setReal(x, y, gray);
newimg.setImag(x, y, 0f);
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ComplexImage toComplex(GrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat gray;\n\t\tComplexImage newimg = new ComplexImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = (float) img.get(x, y);\n\t\t\t\tnewimg.setReal(x, y, gray);\n... | [
"0.8203175",
"0.79286426",
"0.7546187",
"0.74606276",
"0.7356178",
"0.7347126",
"0.71912694",
"0.7029324",
"0.6320435",
"0.6265357",
"0.62297976",
"0.61983865",
"0.6148434",
"0.600013",
"0.59273815",
"0.58313185",
"0.5783946",
"0.577646",
"0.5747295",
"0.57461685",
"0.5664116... | 0.85089844 | 0 |
Converts a ColorImage to a ComplexImage. The ColorImage is first converted to a RealGrayImage object and then to a ComplexImage object. | public static ComplexImage toComplex(ColorImage img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
int X = img.X();
int Y = img.Y();
int[] color = new int[3];
float real;
ComplexImage newimg = null;
switch (img.getColorModel()) {
case ColorImage.RGB:
newimg = new ComplexImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
color = img.get(x, y);
real = (float) color[0] * 0.299f + (float) color[1] * 0.587f + (float) color[2]
* 0.114f;
newimg.setReal(x, y, real);
newimg.setImag(x, y, 0f);
}
}
break;
case ColorImage.CMY:
case ColorImage.YIQ:
case ColorImage.HSV:
case ColorImage.HLS:
throw new ColorModelNotSupportedException();
default:
throw new ColorModelUnknownException();
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ComplexImage toComplex(RealColorImage img)\n\t\t\tthrows ColorModelNotSupportedException, ColorModelUnknownException {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat[] color = new float[3];\n\t\tfloat real;\n\t\tComplexImage newimg = null;\n\t\tswitch (img.getColorModel()) {\n\t\tcase ColorIm... | [
"0.8029156",
"0.80166453",
"0.79665977",
"0.79407096",
"0.7513618",
"0.7449904",
"0.7175501",
"0.64946437",
"0.6418228",
"0.60631603",
"0.6043474",
"0.59818625",
"0.59480006",
"0.5893017",
"0.57747865",
"0.57562965",
"0.56170976",
"0.5600188",
"0.5432954",
"0.5425905",
"0.542... | 0.80777407 | 0 |
Converts a RealColorImage to a ComplexImage. The RealColorImage is first converted to a RealGrayImage object and then to a ComplexImage object. | public static ComplexImage toComplex(RealColorImage img)
throws ColorModelNotSupportedException, ColorModelUnknownException {
int X = img.X();
int Y = img.Y();
float[] color = new float[3];
float real;
ComplexImage newimg = null;
switch (img.getColorModel()) {
case ColorImage.RGB:
newimg = new ComplexImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
color = img.get(x, y);
real = (float) color[0] * 0.299f + (float) color[1] * 0.587f + (float) color[2]
* 0.114f;
newimg.setReal(x, y, real);
newimg.setImag(x, y, 0f);
}
}
break;
case ColorImage.CMY:
case ColorImage.YIQ:
case ColorImage.HSV:
case ColorImage.HLS:
throw new ColorModelNotSupportedException();
default:
throw new ColorModelUnknownException();
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ComplexImage toComplex(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat gray;\n\t\tComplexImage newimg = new ComplexImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = img.get(x, y);\n\t\t\t\tnewimg.setReal(x, y, gray);\n\t\t... | [
"0.8144405",
"0.79233056",
"0.7789587",
"0.74856794",
"0.7441271",
"0.7402692",
"0.7322997",
"0.6779107",
"0.6551032",
"0.64544666",
"0.6411795",
"0.6405162",
"0.6343212",
"0.63135487",
"0.61052024",
"0.6023775",
"0.59965444",
"0.5946286",
"0.5895711",
"0.58566487",
"0.583915... | 0.80178624 | 1 |
Converts a ComplexImage to a ComplexImage | public static ComplexImage toComplex(ComplexImage img) {
int X = img.X();
int Y = img.Y();
ComplexImage newimg = null;
newimg = new ComplexImage(X, Y);
for (int y = 0; y < Y; y++) {
for (int x = 0; x < X; x++) {
newimg.setReal(x, y, img.getReal(x, y));
newimg.setImag(x, y, img.getImag(x, y));
}
}
return newimg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ComplexImage toComplex(GrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat gray;\n\t\tComplexImage newimg = new ComplexImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = (float) img.get(x, y);\n\t\t\t\tnewimg.setReal(x, y, gray);\n... | [
"0.74573886",
"0.7281287",
"0.7230038",
"0.6984901",
"0.6944851",
"0.65357953",
"0.6313489",
"0.62283456",
"0.621007",
"0.58876294",
"0.5565759",
"0.55388135",
"0.55075544",
"0.54613584",
"0.5333835",
"0.52981174",
"0.522691",
"0.5218264",
"0.52069974",
"0.5202413",
"0.519010... | 0.7872422 | 0 |
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | public UpdateFunctionCodeRequest(UpdateFunctionCodeRequest source) {
if (source.FunctionName != null) {
this.FunctionName = new String(source.FunctionName);
}
if (source.Handler != null) {
this.Handler = new String(source.Handler);
}
if (source.CosBucketName != null) {
this.CosBucketName = new String(source.CosBucketName);
}
if (source.CosObjectName != null) {
this.CosObjectName = new String(source.CosObjectName);
}
if (source.ZipFile != null) {
this.ZipFile = new String(source.ZipFile);
}
if (source.Namespace != null) {
this.Namespace = new String(source.Namespace);
}
if (source.CosBucketRegion != null) {
this.CosBucketRegion = new String(source.CosBucketRegion);
}
if (source.InstallDependency != null) {
this.InstallDependency = new String(source.InstallDependency);
}
if (source.EnvId != null) {
this.EnvId = new String(source.EnvId);
}
if (source.Publish != null) {
this.Publish = new String(source.Publish);
}
if (source.Code != null) {
this.Code = new Code(source.Code);
}
if (source.CodeSource != null) {
this.CodeSource = new String(source.CodeSource);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void set(String key, Object value);",
"void set(K key, V value);",
"public setKeyValue_args(setKeyValue_args other) {\n if (other.isSetKey()) {\n this.key = other.key;\n }\n if (other.isSetValue()) {\n this.value = other.value;\n }\n }",
"public abstract void set(String k... | [
"0.64403355",
"0.64156294",
"0.6145026",
"0.6117383",
"0.6094351",
"0.6081591",
"0.6041468",
"0.59901243",
"0.5973955",
"0.5956007",
"0.58388424",
"0.58285606",
"0.5791485",
"0.5705579",
"0.570355",
"0.56879187",
"0.5687801",
"0.5677934",
"0.56090885",
"0.559038",
"0.5582746"... | 0.0 | -1 |
Internal implementation, normal users should not use it. | public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "FunctionName", this.FunctionName);
this.setParamSimple(map, prefix + "Handler", this.Handler);
this.setParamSimple(map, prefix + "CosBucketName", this.CosBucketName);
this.setParamSimple(map, prefix + "CosObjectName", this.CosObjectName);
this.setParamSimple(map, prefix + "ZipFile", this.ZipFile);
this.setParamSimple(map, prefix + "Namespace", this.Namespace);
this.setParamSimple(map, prefix + "CosBucketRegion", this.CosBucketRegion);
this.setParamSimple(map, prefix + "InstallDependency", this.InstallDependency);
this.setParamSimple(map, prefix + "EnvId", this.EnvId);
this.setParamSimple(map, prefix + "Publish", this.Publish);
this.setParamObj(map, prefix + "Code.", this.Code);
this.setParamSimple(map, prefix + "CodeSource", this.CodeSource);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n public ... | [
"0.62574834",
"0.6217662",
"0.6024768",
"0.5982239",
"0.5965723",
"0.59330684",
"0.5920059",
"0.58351564",
"0.5781645",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57737285",
"0.57054734",
"0.5701363",
"0.56510806",
"0.56491816",
"0.... | 0.0 | -1 |
Define o atributo tempoMedioSSPB | public void setTempoMedioSSPB(Integer tempoMedioSSPB) {
this.tempoMedioSSPB = tempoMedioSSPB;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setTempo(int tempo);",
"public void setTempoSec(int tempoSec) {\n this.tempoSec = tempoSec;\n }",
"@Override\n public void setTempo(int tempo) {\n }",
"public void setTempoPatrulha(int tempoPatrulha) {\n this.tempoPatrulha = tempoPatrulha;\n }",
"@Override\n public int g... | [
"0.62464654",
"0.61461896",
"0.60987294",
"0.5988105",
"0.5968088",
"0.5905644",
"0.58037347",
"0.5684666",
"0.56017566",
"0.5594892",
"0.55688983",
"0.55332726",
"0.55252635",
"0.5524956",
"0.54696476",
"0.54654247",
"0.54522395",
"0.5430999",
"0.5430325",
"0.5418518",
"0.53... | 0.6989467 | 0 |
/ blocklocal class not found | public static AccessibilityRecordCompat obtain()
{
class AccessibilityRecordImpl {}
return new AccessibilityRecordCompat(IMPL.obtain());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getClass_();",
"Object getClass_();",
"public hk a(String s, a a1)\n {\n class c {}\n\n c c1 = new c(null);\n /* block-local class not found */\n class b {}\n\n b.a(new b(s, a1, c1));\n return c1;\n }",
"void testLocalStaticClass() {\n // static class LocalSt... | [
"0.66284907",
"0.66284907",
"0.6452771",
"0.6295108",
"0.60229254",
"0.6019088",
"0.59964263",
"0.5946496",
"0.5838534",
"0.5837066",
"0.5810667",
"0.57805425",
"0.5714481",
"0.57138234",
"0.5696675",
"0.56487906",
"0.5637247",
"0.5632724",
"0.5630983",
"0.5629123",
"0.562438... | 0.0 | -1 |
"Already a member? Login" Button | @Override
public void onClick(View v) {
// Finish the registration screen and return to the Login activity
Intent intent = new Intent(getApplicationContext(),LoginActivity.class);
// intent.putExtra("firstname", firstname);
// intent.putExtra("lastname", lastname);
// intent.putExtra("id", id);
startActivity(intent);
finish();
overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void LoginButton() {\n\t\t\r\n\t}",
"public void btnLoginClicked() {\n String username = txfUsername.getText();\n String password = txfPassword.getText();\n DatabaseController database = new DatabaseController(new TuDbConnectionFactory());\n Authentication auth = new Authentica... | [
"0.69352597",
"0.6725127",
"0.6692609",
"0.6690891",
"0.6621344",
"0.655737",
"0.6556487",
"0.638869",
"0.6371971",
"0.63640356",
"0.6353099",
"0.6344787",
"0.63339865",
"0.6281247",
"0.62773734",
"0.6272287",
"0.62678695",
"0.62540823",
"0.6247845",
"0.62419623",
"0.62116164... | 0.0 | -1 |
On complete call either onSignupSuccess or onSignupFailed depending on success | public void run() {
if(signedUp == 1) {
onSignupSuccess();
} else{
onSignupFailed();
}
//
progressDialog.dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void signup() {\n Log.d(TAG, \"Signup\");\n\n if (!validate()) {\n onSignupFailed();\n return;\n }\n\n createProgressDialog(R.string.creating_account);\n\n final String name = _nameText.getText().toString();\n final String email = _emailText.ge... | [
"0.749818",
"0.7450446",
"0.72251976",
"0.7110287",
"0.71000487",
"0.70153224",
"0.69603664",
"0.69242877",
"0.69216275",
"0.69216275",
"0.69216275",
"0.69216275",
"0.69216275",
"0.69216275",
"0.69216275",
"0.682155",
"0.68199736",
"0.67964095",
"0.6788328",
"0.67731184",
"0.... | 0.67502373 | 21 |
Returns the underlying storage implementation. | OStorage getStorage(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Storage getStorage() {\n return this.storage;\n }",
"@NonNull\n public StorageReference getStorage() {\n return getTask().getStorage();\n }",
"public IStorage getStorage() throws CoreException\n\t{\n\n\t\treturn this.storage;\n\t}",
"public interface DBStorage {\n \n /**\n ... | [
"0.72889626",
"0.7157885",
"0.6926719",
"0.6910864",
"0.67972183",
"0.6787244",
"0.67682415",
"0.66988325",
"0.6689585",
"0.6644348",
"0.6615578",
"0.66015446",
"0.65762156",
"0.6524896",
"0.651834",
"0.64676875",
"0.64654833",
"0.64293724",
"0.6420952",
"0.6420952",
"0.64149... | 0.7413829 | 0 |
Set user for current database instance. | void setUser(OSecurityUser user); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDatabaseUser(String sDatabaseUser) throws IOException;",
"public void setDbuser(String dbuser) {\n this.dbuser = dbuser;\n }",
"public void setUser(User user) { this.user = user; }",
"public void setUser(User user) {\r\n this.user = user;\r\n }",
"private void setAuthenti... | [
"0.7605621",
"0.6727858",
"0.65308815",
"0.6526275",
"0.6525295",
"0.65231264",
"0.6510289",
"0.65043306",
"0.65043306",
"0.649431",
"0.64798373",
"0.64548534",
"0.64408374",
"0.6438962",
"0.6438198",
"0.6434465",
"0.6434358",
"0.6421608",
"0.6407845",
"0.6406547",
"0.6404924... | 0.6522799 | 6 |
Internal only: replace the storage with a new one. | void replaceStorage(OStorage iNewStorage); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setStorage(com.hps.july.persistence.StoragePlaceAccessBean newStorage) {\n\tstorage = newStorage;\n}",
"public static void lost() {\n\t\tPig.alterStorage(false);\n\t}",
"public static void gained() {\n\t\tPig.alterStorage(true);\n\t}",
"public void clearStorage();",
"public void updateStorage(M... | [
"0.66719186",
"0.6622475",
"0.65831625",
"0.6549414",
"0.64970547",
"0.63830584",
"0.62634856",
"0.6230203",
"0.61974853",
"0.61863846",
"0.6094846",
"0.59463006",
"0.5941944",
"0.5940108",
"0.593394",
"0.59322417",
"0.59093386",
"0.5852671",
"0.5817118",
"0.5794422",
"0.5783... | 0.7939939 | 0 |
Returns the database owner. Used in wrapped instances to know the up level ODatabase instance. | ODatabaseInternal<?> getDatabaseOwner(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }",
"@objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();",
"public long getOwner() {\n\t\treturn owner;\n\t}",
"public String getOwner(){\r\n \ttry{\r\n \t\t_loc... | [
"0.7939031",
"0.7085228",
"0.70782477",
"0.7076795",
"0.7062584",
"0.6936451",
"0.6842222",
"0.6841327",
"0.6827116",
"0.6761695",
"0.674537",
"0.674537",
"0.674537",
"0.674537",
"0.674537",
"0.674537",
"0.67381173",
"0.67311627",
"0.67311627",
"0.66798335",
"0.6664565",
"0... | 0.8646887 | 0 |
Internal. Sets the database owner. | ODatabaseInternal<?> setDatabaseOwner(ODatabaseInternal<?> iOwner); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOwner(User owner) {\n this.owner = owner;\n }",
"void setOwner(String owner);",
"public void setOwner(Owner owner) {\n this.owner = owner;\n }",
"public void setOwner( String owner ){\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t_owner = owner;\r\n \t_it... | [
"0.71152467",
"0.68830323",
"0.672868",
"0.66890866",
"0.66514635",
"0.6624072",
"0.6565372",
"0.6565372",
"0.6565372",
"0.6565372",
"0.65104395",
"0.64999145",
"0.64575666",
"0.64447033",
"0.6355371",
"0.634847",
"0.63323706",
"0.63292223",
"0.63292223",
"0.6316079",
"0.6311... | 0.7929847 | 0 |
Return the underlying database. Used in wrapper instances to know the down level ODatabase instance. | <DB extends ODatabase> DB getUnderlying(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }",
"public Database getDatabase() {\n return dbHandle;\n }",
"Database getDataBase() {\n return database;\n }",
"public Database getDatabase() {\n\t\treturn this.database... | [
"0.83978015",
"0.79277074",
"0.7721114",
"0.7593208",
"0.7525497",
"0.7471233",
"0.7466934",
"0.7390085",
"0.73589337",
"0.73183495",
"0.7317557",
"0.7314007",
"0.73041624",
"0.7193584",
"0.7174424",
"0.715022",
"0.7097654",
"0.7059721",
"0.7005541",
"0.6999489",
"0.699755",
... | 0.7760888 | 2 |
Internal method. Don't call it directly unless you're building an internal component. | void setInternal(ATTRIBUTES attribute, Object iValue); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initcomponent() {\n\r\n\t}",
"Component getComponent() {\n/* 224 */ return this.component;\n/* */ }",
"@Override\n public void initComponent() {\n }",
"@Override\n public void initComponent() {\n }",
"protected void onComponentRendered()\n\t{\n\t}",
"@Override\r\n pu... | [
"0.6386335",
"0.6269533",
"0.62273526",
"0.62273526",
"0.614882",
"0.61361283",
"0.59931064",
"0.59718865",
"0.59179586",
"0.59179586",
"0.58950734",
"0.5852972",
"0.58338976",
"0.58338976",
"0.58338976",
"0.58338976",
"0.58338976",
"0.58338976",
"0.58232147",
"0.57742965",
"... | 0.0 | -1 |
Opens a database using an authentication token received as an argument. | @Deprecated
<DB extends ODatabase> DB open(final OToken iToken); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract ODatabaseInternal<?> openDatabase();",
"private void openDatabase() {\n database = new DatabaseExpenses(this);\n database.open();\n }",
"public static void openDatabase() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\n\t\t\t/* change the name and password here... | [
"0.67784965",
"0.62567025",
"0.617002",
"0.61410075",
"0.6099115",
"0.60818535",
"0.6052261",
"0.5966643",
"0.5936939",
"0.5927332",
"0.59181714",
"0.59138364",
"0.58974785",
"0.587306",
"0.5852364",
"0.5844281",
"0.5838837",
"0.58115053",
"0.578517",
"0.5779101",
"0.5769612"... | 0.7022373 | 0 |
The active implicit microtransaction or active/inactive regular transaction. Use the transaction returned by this method if you are doing "system" things that affect both regular database transactions and implicit storage microtransactions wrapping nontransactional operations on the databasestorage level. | OBasicTransaction getMicroOrRegularTransaction(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public GlobalTransaction getCurrentTransaction()\n {\n return getCurrentTransaction(true);\n }",
"Transaction getCurrentTransaction();",
"public GlobalTransaction getCurrentTransaction(Transaction tx)\n {\n return getCurrentTransaction(tx, true);\n }",
"public final static Transaction getCu... | [
"0.7755285",
"0.76654655",
"0.72753453",
"0.7158676",
"0.70968956",
"0.70745975",
"0.70102954",
"0.6881463",
"0.67931443",
"0.671026",
"0.66566384",
"0.66437393",
"0.64952564",
"0.6450906",
"0.6409189",
"0.63840026",
"0.6378296",
"0.6377901",
"0.6311305",
"0.6308209",
"0.6268... | 0.7860662 | 0 |
returns the cluster map for current deploy. The keys of the map are node names, the values contain names of clusters (data files) available on the single node. | default String getLocalNodeName() {
return "local";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default Map<String, Set<String>> getActiveClusterMap() {\n Map<String, Set<String>> result = new HashMap<>();\n result.put(getLocalNodeName(), getStorage().getClusterNames());\n return result;\n }",
"public Map<String, String> getDistributedDevicePathToClusterMap()\n throws VPlexApiException... | [
"0.7194086",
"0.7031039",
"0.63740027",
"0.6236113",
"0.5910831",
"0.5910831",
"0.5905066",
"0.5889952",
"0.5834386",
"0.58161587",
"0.57949483",
"0.57916355",
"0.57210386",
"0.5655143",
"0.56470054",
"0.5628712",
"0.559838",
"0.5591501",
"0.5585798",
"0.5578832",
"0.55695456... | 0.0 | -1 |
returns the cluster map for current deploy. The keys of the map are node names, the values contain names of clusters (data files) available on the single node. | default Map<String, Set<String>> getActiveClusterMap() {
Map<String, Set<String>> result = new HashMap<>();
result.put(getLocalNodeName(), getStorage().getClusterNames());
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<String, String> getDistributedDevicePathToClusterMap()\n throws VPlexApiException {\n return _discoveryMgr.getDistributedDevicePathToClusterMap();\n }",
"public Map<String, String> getClusterIdToNameMap() {\n if (vplexClusterIdToNameCache.isEmpty()) {\n List<VPle... | [
"0.7030216",
"0.63742477",
"0.62352127",
"0.59134483",
"0.59134483",
"0.5907195",
"0.58926624",
"0.5836969",
"0.5817204",
"0.57974035",
"0.5793733",
"0.5723047",
"0.56578916",
"0.56467724",
"0.56308454",
"0.5600261",
"0.5592557",
"0.55886203",
"0.5580798",
"0.5569368",
"0.546... | 0.719396 | 0 |
returns the data center map for current deploy. The keys are data center names, the values are node names per data center | default Map<String, Set<String>> getActiveDataCenterMap() {
Map<String, Set<String>> result = new HashMap<>();
Set<String> val = new HashSet<>();
val.add(getLocalNodeName());
result.put("local", val);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<String, String> getDistributedDevicePathToClusterMap()\n throws VPlexApiException {\n return _discoveryMgr.getDistributedDevicePathToClusterMap();\n }",
"default Map<String, Set<String>> getActiveClusterMap() {\n Map<String, Set<String>> result = new HashMap<>();\n result.pu... | [
"0.66389865",
"0.6376439",
"0.6052528",
"0.5974383",
"0.5788758",
"0.576424",
"0.5699067",
"0.5442242",
"0.5423877",
"0.538855",
"0.5371179",
"0.53255653",
"0.528228",
"0.5280446",
"0.5245425",
"0.52413464",
"0.51994854",
"0.50603557",
"0.5020666",
"0.50052696",
"0.49450317",... | 0.6977031 | 0 |
checks the cluster map and tells whether this is a sharded database (ie. a distributed DB where at least two nodes contain distinct subsets of data) or not | default boolean isSharded() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isNeedSharding();",
"boolean hasCluster();",
"boolean getIsClusteringKey();",
"protected boolean isClusterRequired() {\n return true;\n }",
"boolean isAllowClusterGet();",
"boolean hasClusterName();",
"public boolean isShardable() {\n return SHARDABLE_RUNNERS.contains(runne... | [
"0.7216955",
"0.6710798",
"0.61417335",
"0.5762146",
"0.57247645",
"0.569999",
"0.55913335",
"0.5562866",
"0.55411",
"0.55171657",
"0.55002457",
"0.54903334",
"0.54756963",
"0.5407743",
"0.54002166",
"0.5391081",
"0.5377217",
"0.5366836",
"0.5255042",
"0.5234335",
"0.5225838"... | 0.0 | -1 |
If files have the same size and MD5 then they are potential duplicates. | private void checkDuplicateOfFile(Iterable<FileInfo> files, DuplicateDataDTO data) {
for(FileInfo nextFile: files) {
for(FileInfo nextFile2: files) {
if(nextFile.duplicate(nextFile2)) {
LOG.info("Duplicate - {}", nextFile);
processDuplicate(nextFile,data);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calculateDuplicate(ArrayList<String> pathList) {\n\n HashMap<String, byte[]> pathMdHashMap = new HashMap<>();\n\n for (int i = 0; i < pathList.size(); i++) {\n\n LinkedHashMap<File, String> uniquePathAndFileHash = new LinkedHashMap<>();\n\n if (pathList.get(i) == nu... | [
"0.6979287",
"0.6548208",
"0.6409197",
"0.6270499",
"0.60013545",
"0.595703",
"0.5946602",
"0.58419347",
"0.5806559",
"0.57982504",
"0.5751399",
"0.56605977",
"0.5645597",
"0.55901885",
"0.5587938",
"0.5572423",
"0.5564082",
"0.556193",
"0.55439216",
"0.5532996",
"0.5527574",... | 0.63040334 | 3 |
private empty constructor don't need to create an entity | private NewsWriter() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AbstractEntity() {\r\n\t}",
"public ExcursionEntity() {\n\t}",
"private EntityFactory() {}",
"public ExpertiseEntity() {\n }",
"public ClientDetailsEntity() {\n\t\t\n\t}",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"public MapEntity() {\n\t}... | [
"0.78003544",
"0.7621449",
"0.76183844",
"0.7501441",
"0.74695367",
"0.739469",
"0.7389066",
"0.7326614",
"0.7305402",
"0.71646345",
"0.7140958",
"0.71384853",
"0.7107672",
"0.7098079",
"0.7067233",
"0.70334226",
"0.70205057",
"0.6995782",
"0.6987141",
"0.698437",
"0.6966521"... | 0.0 | -1 |
Method create new file and write data into it | public static void write(String content, String fileName) throws IOException {
FileWriter fileWriter = new FileWriter(FileCreator.create(fileName));
fileWriter.write(content);
fileWriter.flush();
fileWriter.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileS... | [
"0.75484675",
"0.7213188",
"0.695648",
"0.6805288",
"0.6785",
"0.6772648",
"0.66626996",
"0.6599623",
"0.6582015",
"0.6512492",
"0.6498195",
"0.6489285",
"0.64661914",
"0.6465182",
"0.6451841",
"0.64377",
"0.64301825",
"0.6412958",
"0.64099056",
"0.63896024",
"0.6383755",
"... | 0.0 | -1 |
if equal we have found one digit phase | public void letterCombinations(String digits,String current,String[] mappings,int index,List<String> result){
if(digits.length()==current.length()){
result.add(current);
return;
}
// if digit is "2" , mappings['2' - '0' ] will give me mappings[2] .i.e abc
String letters = mappings[digits.charAt(index)-'0'];
//for all letters in mappings[i] call recursively
// i.e. mappings[2] => "abc",call for a, then b and then c
for (int i=0;i<letters.length();i++){
// add to current character at index i
// increment index to simulate selection condition
letterCombinations(digits,current+letters.charAt(i),mappings,index+1,result);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void cmp_with_reg(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(registers.get(passed.charAt(4)));\n\t\tS = val1>=val2?false:true;\n\t\tval2 = 256-val2;\n\t\tval2%=256;\n\t\tval1+=val2;\n\t\tCS = val1>255?true:false;\n\t\tString b = Integer.toBinaryString(val1... | [
"0.59862953",
"0.58434063",
"0.5739371",
"0.5722019",
"0.563902",
"0.5584977",
"0.55588585",
"0.5543357",
"0.55209714",
"0.5516937",
"0.54999983",
"0.5492766",
"0.547734",
"0.5462244",
"0.5428287",
"0.5425261",
"0.54251176",
"0.5411872",
"0.54093295",
"0.53868145",
"0.5380977... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void annotate(JDefinedClass cls) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void javadoc(JDefinedClass cls) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void buildConstants(JDefinedClass cls) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void buildAttributes(JDefinedClass cls) {
} | {
"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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.